@weppy/roblox-mcp 2.9.3 → 2.10.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 (71) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dashboard/dist/assets/AssetsPage-Czc93xoU.css +1 -0
  3. package/dashboard/dist/assets/AssetsPage-D9X2pUea.js +46 -0
  4. package/dashboard/dist/assets/{ChangelogDetailPage-DTl_Tw_v.js → ChangelogDetailPage-Bc77mNht.js} +1 -1
  5. package/dashboard/dist/assets/{ChangelogPage-BqASaB-l.js → ChangelogPage-Cvy3ismU.js} +1 -1
  6. package/dashboard/dist/assets/{ConfirmModal-knJOxPTQ.js → ConfirmModal-CEmy8izm.js} +1 -1
  7. package/dashboard/dist/assets/ConfirmModal-izJskKtO.css +1 -0
  8. package/dashboard/dist/assets/ConfirmModal.module-D1aZY2bQ.js +1 -0
  9. package/dashboard/dist/assets/ConnectionPage-B5daijue.css +1 -0
  10. package/dashboard/dist/assets/ConnectionPage-C_XNqIG-.js +11 -0
  11. package/dashboard/dist/assets/{ControlsPage-da-JrES8.js → ControlsPage-CkTB6mEk.js} +1 -1
  12. package/dashboard/dist/assets/CurrentPlaceScope-CuZXV9Ku.js +1 -0
  13. package/dashboard/dist/assets/CurrentPlaceScope-D-0g0WrM.css +1 -0
  14. package/dashboard/dist/assets/{GameChangeDetail-sTt5o48Z.js → GameChangeDetail-D2QTkbEB.js} +1 -1
  15. package/dashboard/dist/assets/{InfoLabel-DwsCwdUw.js → InfoLabel-BUXacsTE.js} +1 -1
  16. package/dashboard/dist/assets/{OverviewPage-9cIh9Q5a.js → OverviewPage-CX5zVj8P.js} +1 -1
  17. package/dashboard/dist/assets/PageHeader-B0qiATU4.js +6 -0
  18. package/dashboard/dist/assets/PageHeader-CrhjZjgp.css +1 -0
  19. package/dashboard/dist/assets/PlaytestPage-CVEtQ4dU.css +1 -0
  20. package/dashboard/dist/assets/PlaytestPage-folHMgTW.js +11 -0
  21. package/dashboard/dist/assets/SettingsPage-ByHSUA7b.css +1 -0
  22. package/dashboard/dist/assets/SettingsPage-nlNo4CBL.js +1 -0
  23. package/dashboard/dist/assets/{StatusBadge-CYejTjWf.js → StatusBadge-B2VLfqa6.js} +1 -1
  24. package/dashboard/dist/assets/SyncPage-Bi8xaHnB.js +4 -0
  25. package/dashboard/dist/assets/SyncPage-CIZWp8Ul.css +1 -0
  26. package/dashboard/dist/assets/Tabs-CIszXeoU.css +1 -0
  27. package/dashboard/dist/assets/{Tabs-wK2yL-C6.js → Tabs-DqGYr78-.js} +1 -1
  28. package/dashboard/dist/assets/ToolsPage-CAaH9fIQ.css +1 -0
  29. package/dashboard/dist/assets/ToolsPage-DVYql6ES.js +1 -0
  30. package/dashboard/dist/assets/{TooltipText-LAwR8aaI.js → TooltipText-DaLR7eg1.js} +1 -1
  31. package/dashboard/dist/assets/UiStudioPage-CHzKSJCc.js +11 -0
  32. package/dashboard/dist/assets/UiStudioPage-LH2dcLkr.css +1 -0
  33. package/dashboard/dist/assets/{WhatsNewPage-B9st_b8H.js → WhatsNewPage-D5LMzwyf.js} +1 -1
  34. package/dashboard/dist/assets/{copy-DwoEPqC3.js → copy-0T6g5IWT.js} +1 -1
  35. package/dashboard/dist/assets/index-BDJHcdyQ.js +686 -0
  36. package/dashboard/dist/assets/{index-Dd1aCYFM.css → index-DzkZyWCv.css} +1 -1
  37. package/dashboard/dist/assets/sample-requests-DmUwqmFE.css +1 -0
  38. package/dashboard/dist/assets/sample-requests-Fif4AVnz.js +1 -0
  39. package/dashboard/dist/assets/{useLiveUptime-DM28rhji.js → useLiveUptime-KCA8LzCI.js} +1 -1
  40. package/dashboard/dist/assets/useSettings-BJSPSJ0b.js +1 -0
  41. package/dashboard/dist/assets/useSettings-KAiL5E_X.css +1 -0
  42. package/dashboard/dist/index.html +2 -2
  43. package/dist/index.js +94 -94
  44. package/package.json +1 -1
  45. package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  46. package/dashboard/dist/assets/AssetsPage-Be5aZDhj.css +0 -1
  47. package/dashboard/dist/assets/AssetsPage-CqgdG2Ni.js +0 -46
  48. package/dashboard/dist/assets/ConfirmModal-D1kfK31C.css +0 -1
  49. package/dashboard/dist/assets/ConfirmModal.module-NrFlfTWy.js +0 -1
  50. package/dashboard/dist/assets/ConnectionPage-BkkqcLRE.js +0 -11
  51. package/dashboard/dist/assets/ConnectionPage-D1GWlHZP.css +0 -1
  52. package/dashboard/dist/assets/CurrentPlaceScope-BOfr5n7U.js +0 -1
  53. package/dashboard/dist/assets/CurrentPlaceScope-v3pl1mLI.css +0 -1
  54. package/dashboard/dist/assets/PageHeader-2-fusgsY.css +0 -1
  55. package/dashboard/dist/assets/PageHeader-DwlcGnaB.js +0 -6
  56. package/dashboard/dist/assets/PlaytestPage-BeRZc6wz.js +0 -11
  57. package/dashboard/dist/assets/PlaytestPage-DjjsIkke.css +0 -1
  58. package/dashboard/dist/assets/SettingsPage-BiCf2ur7.js +0 -1
  59. package/dashboard/dist/assets/SettingsPage-DSipzuEo.css +0 -1
  60. package/dashboard/dist/assets/SyncPage-CHe2NPfN.js +0 -4
  61. package/dashboard/dist/assets/SyncPage-COxqxAjv.css +0 -1
  62. package/dashboard/dist/assets/Tabs-876h0_zB.css +0 -1
  63. package/dashboard/dist/assets/ToolsPage-Bt9vYA7u.css +0 -1
  64. package/dashboard/dist/assets/ToolsPage-Cq8crPCz.js +0 -1
  65. package/dashboard/dist/assets/UiStudioPage-eSinjpOX.css +0 -1
  66. package/dashboard/dist/assets/UiStudioPage-xZ96a4BR.js +0 -11
  67. package/dashboard/dist/assets/index-CJJYSnlB.js +0 -606
  68. package/dashboard/dist/assets/sample-requests-CygerZZ_.css +0 -1
  69. package/dashboard/dist/assets/sample-requests-tNeuJCdB.js +0 -1
  70. package/dashboard/dist/assets/useSettings-Bsfu70PT.css +0 -1
  71. package/dashboard/dist/assets/useSettings-CYVeWZ0i.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weppy/roblox-mcp",
3
- "version": "2.9.3",
3
+ "version": "2.10.0",
4
4
  "description": "MCP (Model Context Protocol) server for Roblox Studio integration - enables AI coding agents to interact with Roblox Studio in real-time",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
Binary file
@@ -1 +0,0 @@
1
- ._page_188au_1{display:flex;flex-direction:column;gap:14px;min-height:100%;max-width:var(--content-max)}._experimentalBadge_188au_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_188au_23{position:relative;z-index:30;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:12px 0}._toolbar_188au_23{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._toolbar_188au_23>._segmented_188au_39{order:1}._toolbar_188au_23>._placeSelectorLabel_188au_43{order:2}._toolbar_188au_23>._listContextSummary_188au_47{order:3;flex:1 1 auto;min-width:220px}._toolbar_188au_23>._toolbarActions_188au_53{order:4;margin-left:auto}._categoryControl_188au_58{order:5;display:inline-flex;align-items:center;gap:8px;width:100%;min-width:0;flex:1 0 100%}._listContextSummary_188au_47{color:var(--text-secondary);font-size:12px;line-height:1.4}._listContextSummary_188au_47 strong{color:var(--text-primary);font-family:var(--font-label);font-weight:600}._contextDivider_188au_80{color:var(--text-muted)}._categoryControlLabel_188au_84{flex:0 0 auto;color:var(--text-secondary);font-size:12px}._categoryRail_188au_90{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}._categoryButton_188au_98{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_188au_98:hover{border-color:var(--accent);color:var(--text-primary)}._categoryButton_188au_98:disabled{cursor:not-allowed;opacity:.48}._categoryButton_188au_98:disabled:hover{border-color:var(--border);color:var(--text-secondary)}._categoryButtonActive_188au_127{border-color:color-mix(in srgb,var(--accent) 76%,var(--border));background:var(--accent-dim);color:var(--accent)}._toolbarActions_188au_53,._actionRow_188au_134,._copyRow_188au_135,._buttonRow_188au_136{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._segmented_188au_39{display:inline-flex;min-height:32px;border:1px solid var(--border);border-radius:6px;overflow:hidden;background:var(--bg-card)}._segmented_188au_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_188au_39 button:last-child{border-right:0}._segmented_188au_39 ._segmentedActive_188au_167{background:var(--accent-dim);color:var(--accent)}._placeSelectorLabel_188au_43{display:inline-flex;align-items:center;gap:8px;min-width:0;color:var(--text-secondary);font-size:12px}._placeSelectorLabel_188au_43 span{flex:0 0 auto}._placeSelect_188au_43{min-width:190px;max-width:min(320px,100%);min-height:32px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);padding:0 8px;font:inherit}._filterLabel_188au_197{display:inline-flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:12px}._filterLabel_188au_197 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_188au_215,._primaryButton_188au_216,._iconButton_188au_217{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_188au_215{min-height:32px;padding:6px 10px;text-decoration:none}._primaryButton_188au_216{min-height:34px;padding:7px 12px;border-color:var(--accent);color:var(--accent)}._iconButton_188au_217{width:32px;height:32px;padding:0}._commandButton_188au_215:hover,._primaryButton_188au_216:hover,._iconButton_188au_217:hover{border-color:var(--accent)}._dangerButton_188au_257{color:var(--error-text)}._dangerButton_188au_257:hover{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text)}._iconButtonActive_188au_267{border-color:var(--accent);background:var(--accent-dim);color:var(--accent)}._commandButton_188au_215:disabled,._primaryButton_188au_216:disabled,._iconButton_188au_217:disabled{cursor:not-allowed;opacity:.5}._grid_188au_280{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}._assetCard_188au_286{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_188au_300{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 40%,transparent)}._thumbnailWrap_188au_305{display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border-radius:6px;background:var(--bg-secondary)}._thumbnail_188au_305{width:100%;height:100%;object-fit:contain}._thumbnailFallback_188au_321{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_188au_332{display:flex;flex-direction:column;gap:6px;min-width:0}._assetName_188au_339{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-label);font-size:13px}._assetMeta_188au_347{display:flex;align-items:center;justify-content:space-between;gap:8px}._statusChip_188au_354,._categoryPill_188au_355{border:1px solid var(--border);border-radius:4px;padding:2px 6px;font-size:11px;color:var(--text-secondary)}._categoryPill_188au_355{color:var(--text-primary);background:var(--bg-secondary)}._status_uploaded_188au_368{color:var(--success);border-color:var(--success)}._status_failed_188au_373{color:var(--error);border-color:var(--error)}._status_processing_188au_378,._status_uploading_188au_379{color:var(--warning);border-color:var(--warning)}._assetId_188au_384,._scopeText_188au_385,._muted_188au_386{color:var(--text-muted);font-size:12px}._emptyState_188au_391,._notice_188au_392,._errorState_188au_393,._messageState_188au_394{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:14px;color:var(--text-secondary)}._emptyState_188au_391{min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._emptyState_188au_391 p{margin:0;color:var(--text-primary);font-family:var(--font-label)}._notice_188au_392{color:var(--warning-text);border-color:var(--warning-border);background:var(--warning-bg)}._proNotice_188au_424{color:var(--pro-text);border-color:var(--pro-border);background:var(--pro-bg-soft)}._errorState_188au_393{color:var(--error);border-color:var(--error)}._messageState_188au_394{color:var(--success);border-color:var(--success)}._rbxmGuide_188au_440{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_188au_440 h2{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;letter-spacing:0}._rbxmGuide_188au_440 p{margin:0;max-width:760px;color:var(--text-secondary);font-size:12px;line-height:1.5}._drawer_188au_466{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_188au_480{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_188au_1 .12s ease-out;transform-origin:top right}._settingsDrawer_188au_500{width:min(560px,100%)}@keyframes _settingsPopoverIn_188au_1{0%{opacity:0;transform:translateY(-4px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}._detailPopupLayer_188au_516{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_188au_532{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_188au_532:focus{outline:none}._detailDialogHeader_188au_549{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_188au_560{min-width:0;display:flex;flex-direction:column;gap:3px}._detailTitleBlock_188au_560 h2{margin:0;font-size:18px;letter-spacing:0}._detailTitleBlock_188au_560 span:last-child{overflow:hidden;color:var(--text-muted);font-family:var(--font-code);font-size:12px;text-overflow:ellipsis;white-space:nowrap}._detailEyebrow_188au_582{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._detailHeaderActions_188au_591{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._detailDialogBody_188au_599{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.1fr);gap:0;overflow:hidden}._detailPreviewPane_188au_608{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_188au_608,._detailPreviewFallback_188au_620{width:100%;max-width:520px;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._detailPreview_188au_608{display:block;object-fit:contain}._detailPreviewFallback_188au_620{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._detailPreviewFallback_188au_620 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._detailPreviewFallback_188au_620 small{max-width:88%;color:var(--text-muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere;text-align:center}._detailContentPane_188au_656{min-width:0;overflow-y:auto;padding:18px 22px 24px}._detailContentPane_188au_656 ._formStack_188au_662{margin-top:0}._drawerHeader_188au_666{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}._settingsInlinePanel_188au_480 ._drawerHeader_188au_666{margin-bottom:0}._drawerHeader_188au_666 h2{margin:0;font-size:18px;letter-spacing:0}._drawerHeader_188au_666 span{color:var(--text-muted);font-size:12px}._preview_188au_689,._previewFallback_188au_690{width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);margin-bottom:14px}._preview_188au_689{object-fit:contain}._previewFallback_188au_690{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._previewFallback_188au_690 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._formStack_188au_662,._detailSection_188au_717,._noticeList_188au_718,._settingsPanel_188au_719{display:flex;flex-direction:column;gap:10px;margin-top:14px}._noticeList_188au_718{color:var(--text-muted);font-size:12px;line-height:1.45}._noticeList_188au_718 p{margin:0}._setupNotice_188au_736{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_188au_736 strong{color:var(--text-primary);font-size:13px}._setupNotice_188au_736 p{margin:0}._setupNotice_188au_736 ._commandButton_188au_215{justify-self:start}._field_188au_761{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary)}._fieldLabelRow_188au_769{display:flex;align-items:center;gap:4px;min-height:24px}._fieldLabelRow_188au_769 label,._fieldLabelRow_188au_769 span{min-width:0}._field_188au_761 input,._field_188au_761 textarea,._field_188au_761 select{width:100%;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);padding:8px;font:inherit}._fieldHelp_188au_793{color:var(--text-muted);line-height:1.35}._twoColumn_188au_798{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}._detailSection_188au_717{padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_188au_809{margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_188au_809 summary{cursor:pointer;color:var(--text-secondary);font-size:13px;font-weight:600}._technicalDetails_188au_809 summary:hover{color:var(--text-primary)}._technicalDetails_188au_809 ._detailGrid_188au_826,._technicalDetails_188au_809 ._metadataList_188au_827{margin-top:10px}._detailSection_188au_717 h3{margin:0;font-size:13px;letter-spacing:0}._detailGrid_188au_826,._compactMeta_188au_838{display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px 10px;margin:0;font-size:12px}._compactMeta_188au_838{border:1px solid var(--border);border-radius:6px;padding:10px;background:var(--bg-card)}._detailGrid_188au_826 dt,._compactMeta_188au_838 dt{color:var(--text-muted)}._detailGrid_188au_826 dd,._compactMeta_188au_838 dd{margin:0;min-width:0;overflow-wrap:anywhere}._copyableValue_188au_865{display:inline-flex;align-items:center;gap:6px}._copyableValue_188au_865 span{min-width:0;overflow-wrap:anywhere}._inlineCopyButton_188au_876{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_188au_876:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}._hashText_188au_897{font-family:var(--font-code)}._usageList_188au_901{display:flex;flex-direction:column;gap:8px}._usageItem_188au_907,._metadataItem_188au_908{display:grid;gap:4px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--bg-card);font-size:12px}._metadataList_188au_827{display:flex;flex-direction:column;gap:8px}._metadataList_188au_827 strong,._usageItem_188au_907 strong{color:var(--text-primary);overflow-wrap:anywhere}._metadataItem_188au_908 span{color:var(--text-secondary);overflow-wrap:anywhere}._metadataItem_188au_908 code,._usageItem_188au_907 code{color:var(--accent);overflow-wrap:anywhere}._settingsPanel_188au_719{border:1px solid var(--border);border-radius:8px;padding:12px;background:var(--bg-card)}._settingsInlinePanel_188au_480 ._settingsPanel_188au_719{border:0;border-radius:0;background:transparent;padding:0;margin-top:0}._settingsSubsection_188au_956{display:grid;gap:8px}._settingsSectionHeader_188au_961{display:flex;align-items:center;justify-content:space-between;gap:10px}._settingsSectionHeader_188au_961 h3{margin:0;color:var(--text-primary);font-size:13px}._settingsDefinitionList_188au_974{display:grid;gap:6px;margin:0}._settingsDefinitionList_188au_974 div{display:grid;grid-template-columns:minmax(96px,max-content) minmax(0,1fr);gap:10px}._settingsDefinitionList_188au_974 dt{color:var(--text-muted)}._settingsDefinitionList_188au_974 dd{margin:0;color:var(--text-primary);overflow-wrap:anywhere}._toggleRow_188au_996{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}._toggleRow_188au_996 span{display:grid;gap:3px}._toggleRow_188au_996 small,._inlineHelp_188au_1010{color:var(--text-muted);font-size:12px}._toggleRow_188au_996 input{width:18px;height:18px}._inlineHelp_188au_1010{margin:0}._inlineHelp_188au_1010 a{color:var(--accent)}@media(max-width:1120px){._detailPopupLayer_188au_516{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}._detailDialogBody_188au_599{grid-template-columns:minmax(240px,.8fr) minmax(320px,1.2fr)}}@media(max-width:820px){._detailPopupLayer_188au_516{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}._detailDialogHeader_188au_549{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._detailHeaderActions_188au_591{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._detailDialogBody_188au_599{grid-template-columns:minmax(0,1fr);overflow-y:auto}._detailPreviewPane_188au_608{min-height:auto;padding:14px;border-right:0;border-bottom:1px solid var(--border)}._detailPreview_188au_608,._detailPreviewFallback_188au_620{max-width:340px}._detailContentPane_188au_656{overflow:visible;padding:14px}}@media(max-width:720px){._headerRow_188au_1087,._toolbar_188au_23{align-items:stretch;flex-direction:column}._headerMeta_188au_1093{justify-items:start}._toolbarActions_188au_53{justify-content:flex-start}._placeSelectorLabel_188au_43,._placeSelect_188au_43{width:100%}._settingsInlinePanel_188au_480{right:auto;left:0;width:100%;transform-origin:top left}._twoColumn_188au_798{grid-template-columns:1fr}}
@@ -1,46 +0,0 @@
1
- import{i as ne,a as R,n as ve,u as he,j as t,P as dt,I as ut,r as i,o as pt,R as qe,X as De,E as ht,p as Ze,g as mt,e as gt,h as xt}from"./index-CJJYSnlB.js";import{C as Je}from"./ConfirmModal-knJOxPTQ.js";import{D as Ue,P as bt}from"./PageHeader-DwlcGnaB.js";import{T as K}from"./TooltipText-LAwR8aaI.js";import{C as Qe}from"./copy-DwoEPqC3.js";import"./ConfirmModal.module-NrFlfTWy.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 ft=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],yt=ne("arrow-left",ft);/**
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 jt=[["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"}]],vt=ne("audio-lines",jt);/**
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 Ct=[["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"}]],_t=ne("badge",Ct);/**
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 St=[["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"}]],At=ne("box",St);/**
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 It=[["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=ne("clapperboard",It);/**
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:"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"}]],Pt=ne("film",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 Rt=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],wt=ne("search",Rt);/**
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 Lt=[["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"}]],$t=ne("trash-2",Lt);/**
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 Bt=[["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"}]],Dt=ne("upload",Bt);function et(e){if(e.scope==="place"&&typeof e.placeId=="number")return{placeId:String(e.placeId)}}function se(e){const a=et(e);return a?`?placeId=${encodeURIComponent(a.placeId)}`:""}function Ce(e){return`/api/assets/${encodeURIComponent(e.scope)}/${encodeURIComponent(e.category)}`}function ce(e,a){return`${Ce(e)}/${encodeURIComponent(a)}`}async function Et(e){return R.get(Ce(e),et(e))}async function Ut(e){return R.post(`${Ce(e)}/rescan${se(e)}`,{})}async function Tt(e,a,d){return(await R.patch(`${ce(e,a)}${se(e)}`,d)).asset}async function Ot(e,a){return R.delete(`${ce(e,a)}${se(e)}`)}async function Ft(e,a,d){return(await R.post(`${ce(e,a)}/upload${se(e)}`,d)).asset}async function Te(e,a){return(await R.post(`${ce(e,a)}/status-refresh${se(e)}`,{})).asset}async function Mt(e,a,d){const n={...e,placeId:d??e.placeId};return R.post(`${ce(e,a)}/usage-scan${se(n)}`,{})}async function Ht(e,a){return R.post(`${Ce(e)}/export-selection-rbxm${se(e)}`,a)}async function Kt(e,a,d){return R.post(`${ce(e,a)}/import-rbxm${se(e)}`,d)}async function Gt(e,a){return(await R.post(`${ce(e,a)}/thumbnail-generate${se(e)}`,{})).asset}function tt(e){return e.fileUrl?`${ve}${e.fileUrl}`:`${ve}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/file${se({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}function st(e){return e.previewUrl?`${ve}${e.previewUrl}`:`${ve}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/preview${se({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}const at=["all","image","decal","rbxm"],Wt=new Set(at),Oe=["model","animation"];function ye(e){return/\.(rbxm|rbxmx)$/i.test(e.file.original)}function zt(e){return Wt.has(e)}function $e(e,a){return e==="all"?a("assets.category.all","All"):a(`assets.category.${e}`,e==="rbxm"?"RBXM":e)}function ie(e,a){return $e(ye(e)?"rbxm":e.category,a)}function Fe(e){return e==="all"?["image","decal",...Oe]:e==="rbxm"?Oe:[e]}function Vt(e,a){return a==="all"?e.category==="image"||e.category==="decal"||ye(e):a==="rbxm"?ye(e):(a==="model"||a==="animation")&&ye(e)?!1:e.category===a}function Yt(e){return[...e].sort((a,d)=>d.createdAt.localeCompare(a.createdAt)||d.id.localeCompare(a.id))}const Xt="_page_188au_1",qt="_experimentalBadge_188au_9",Zt="_toolbarShell_188au_23",Jt="_toolbar_188au_23",Qt="_segmented_188au_39",es="_placeSelectorLabel_188au_43",ts="_listContextSummary_188au_47",ss="_toolbarActions_188au_53",as="_categoryControl_188au_58",ns="_contextDivider_188au_80",os="_categoryControlLabel_188au_84",ls="_categoryRail_188au_90",rs="_categoryButton_188au_98",is="_categoryButtonActive_188au_127",cs="_actionRow_188au_134",ds="_copyRow_188au_135",us="_buttonRow_188au_136",ps="_segmentedActive_188au_167",hs="_placeSelect_188au_43",ms="_filterLabel_188au_197",gs="_commandButton_188au_215",xs="_primaryButton_188au_216",bs="_iconButton_188au_217",fs="_dangerButton_188au_257",ys="_iconButtonActive_188au_267",js="_grid_188au_280",vs="_assetCard_188au_286",Cs="_assetCardSelected_188au_300",_s="_thumbnailWrap_188au_305",Ss="_thumbnail_188au_305",As="_thumbnailFallback_188au_321",Is="_assetCardBody_188au_332",Ns="_assetName_188au_339",ks="_assetMeta_188au_347",Ps="_statusChip_188au_354",Rs="_categoryPill_188au_355",ws="_status_uploaded_188au_368",Ls="_status_failed_188au_373",$s="_status_processing_188au_378",Bs="_status_uploading_188au_379",Ds="_assetId_188au_384",Es="_scopeText_188au_385",Us="_muted_188au_386",Ts="_emptyState_188au_391",Os="_notice_188au_392",Fs="_errorState_188au_393",Ms="_messageState_188au_394",Hs="_proNotice_188au_424",Ks="_rbxmGuide_188au_440",Gs="_drawer_188au_466",Ws="_settingsInlinePanel_188au_480",zs="_settingsPopoverIn_188au_1",Vs="_settingsDrawer_188au_500",Ys="_detailPopupLayer_188au_516",Xs="_detailDialog_188au_532",qs="_detailDialogHeader_188au_549",Zs="_detailTitleBlock_188au_560",Js="_detailEyebrow_188au_582",Qs="_detailHeaderActions_188au_591",ea="_detailDialogBody_188au_599",ta="_detailPreviewPane_188au_608",sa="_detailPreview_188au_608",aa="_detailPreviewFallback_188au_620",na="_detailContentPane_188au_656",oa="_formStack_188au_662",la="_drawerHeader_188au_666",ra="_preview_188au_689",ia="_previewFallback_188au_690",ca="_detailSection_188au_717",da="_noticeList_188au_718",ua="_settingsPanel_188au_719",pa="_setupNotice_188au_736",ha="_field_188au_761",ma="_fieldLabelRow_188au_769",ga="_fieldHelp_188au_793",xa="_twoColumn_188au_798",ba="_technicalDetails_188au_809",fa="_detailGrid_188au_826",ya="_metadataList_188au_827",ja="_compactMeta_188au_838",va="_copyableValue_188au_865",Ca="_inlineCopyButton_188au_876",_a="_hashText_188au_897",Sa="_usageList_188au_901",Aa="_usageItem_188au_907",Ia="_metadataItem_188au_908",Na="_settingsSubsection_188au_956",ka="_settingsSectionHeader_188au_961",Pa="_settingsDefinitionList_188au_974",Ra="_toggleRow_188au_996",wa="_inlineHelp_188au_1010",La="_headerRow_188au_1087",$a="_headerMeta_188au_1093",s={page:Xt,experimentalBadge:qt,toolbarShell:Zt,toolbar:Jt,segmented:Qt,placeSelectorLabel:es,listContextSummary:ts,toolbarActions:ss,categoryControl:as,contextDivider:ns,categoryControlLabel:os,categoryRail:ls,categoryButton:rs,categoryButtonActive:is,actionRow:cs,copyRow:ds,buttonRow:us,segmentedActive:ps,placeSelect:hs,filterLabel:ms,commandButton:gs,primaryButton:xs,iconButton:bs,dangerButton:fs,iconButtonActive:ys,grid:js,assetCard:vs,assetCardSelected:Cs,thumbnailWrap:_s,thumbnail:Ss,thumbnailFallback:As,assetCardBody:Is,assetName:Ns,assetMeta:ks,statusChip:Ps,categoryPill:Rs,status_uploaded:ws,status_failed:Ls,status_processing:$s,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:na,formStack:oa,drawerHeader:la,preview:ra,previewFallback:ia,detailSection:ca,noticeList:da,settingsPanel:ua,setupNotice:pa,field:ha,fieldLabelRow:ma,fieldHelp:ga,twoColumn:xa,technicalDetails:ba,detailGrid:fa,metadataList:ya,compactMeta:ja,copyableValue:va,inlineCopyButton:Ca,hashText:_a,usageList:Sa,usageItem:Aa,metadataItem:Ia,settingsSubsection:Na,settingsSectionHeader:ka,settingsDefinitionList:Pa,toggleRow:Ra,inlineHelp:wa,headerRow:La,headerMeta:$a},Ba={image:ut,decal:_t,audio:vt,mesh:At,model:dt,video:Pt,animation:Nt};function Be(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:d}){const{t:n}=he();return e.length===0?t.jsxs("div",{className:s.emptyState,children:[t.jsx("p",{children:n("assets.empty.title","No assets yet")}),t.jsx("span",{children:n("assets.empty.body","Choose a scope and category, then rescan that inbox folder.")})]}):t.jsx("div",{className:s.grid,children:e.map(r=>{const N=Ba[r.category],v=Ea(r);return t.jsxs("button",{type:"button",className:[s.assetCard,a===r.id?s.assetCardSelected:""].filter(Boolean).join(" "),onClick:()=>d(r.id),children:[t.jsx("span",{className:s.thumbnailWrap,children:Da(r)?t.jsx("img",{className:s.thumbnail,src:st(r),alt:r.displayName,loading:"lazy"}):t.jsx("span",{className:s.thumbnailFallback,"aria-hidden":"true",children:t.jsx(N,{size:30})})}),t.jsxs("span",{className:s.assetCardBody,children:[t.jsx("span",{className:s.assetName,children:r.displayName}),t.jsxs("span",{className:s.assetMeta,children:[t.jsx("span",{className:s.categoryPill,children:ie(r,n)}),t.jsx("span",{className:`${s.statusChip} ${s[`status_${r.status}`]??""}`,children:Be(r.status,n)})]}),t.jsxs("span",{className:s.assetMeta,children:[t.jsx("span",{className:s.scopeText,children:r.scope.kind==="shared"?n("assets.scope.shared","Shared"):n("assets.scope.place","Current Place")}),t.jsx("span",{className:s.assetId,children:v?`#${v}`:n("assets.status.localOnly","Local only")})]})]})]},r.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 je(e){const a=new Date(e);if(Number.isNaN(a.getTime()))return e;const d=a.getFullYear(),n=String(a.getMonth()+1).padStart(2,"0"),r=String(a.getDate()).padStart(2,"0"),N=String(a.getHours()).padStart(2,"0"),v=String(a.getMinutes()).padStart(2,"0");return`${d}-${n}-${r} ${N}:${v}`}function Ma(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function Ha(e){return e.file.preview?st(e):tt(e)}function Ka(e){var d;const a=Object.entries(((d=e.rbxm)==null?void 0:d.classCounts)??{}).sort((n,r)=>r[1]-n[1]).slice(0,8);return a.length===0?"-":a.map(([n,r])=>`${n} ${r}`).join(", ")}function Me(e){var r;const a=(r=e.rbxm)==null?void 0:r.thumbnail;if(!a)return"-";const d=a.source?` via ${a.source}`:"",n=a.message?` · ${a.message}`:"";return`${a.status}${d}${n}`}function He(e){const{width:a,height:d}=e.file;return a===null||d===null?null:`${a} x ${d}px`}function Ke(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),d=a?Ga(a):null,n=e.category==="decal"?e.roblox.creatorAssetWebUrl??e.roblox.assetWebUrl:e.roblox.assetWebUrl;return!n||d&&Oa.test(n)?d:n}function Va(e){return`${je(e.startedAt)} -> ${e.status}`}function Ge(e){return!e.creatorType||!e.creatorId?null:`${e.creatorType} ${e.creatorId}`}function We(e){return e.assetRole?`Asset role: ${e.assetRole}`:null}function fe({label:e,value:a}){return a?t.jsx("button",{type:"button",className:s.inlineCopyButton,"aria-label":e,title:e,onClick:()=>{var d;return void((d=navigator.clipboard)==null?void 0:d.writeText(a))},children:t.jsx(Qe,{size:13})}):null}function Ya({asset:e,busyAction:a,canUpload:d,canImportRbxm:n,importRbxmTooltip:r,importRbxmTargetParent:N,onClose:v,onSave:E,onUpload:p,onDelete:V,onImportRbxm:Y,onRefreshStatus:U,onScanUsage:g}){var k,S;const{t:l}=he(),X=i.useRef(null),[G,W]=i.useState(""),[M,Z]=i.useState("");if(i.useEffect(()=>{W((e==null?void 0:e.displayName)??""),Z((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 j;if(!e)return;(j=X.current)==null||j.focus();const o=L=>{L.key==="Escape"&&v()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e,v]),!e)return null;const T=e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath),Q=!!e.roblox.assetUri,$=za(e),ee=e.roblox.uploadAttempts??[],O=e.category==="decal"&&!!(e.roblox.creatorAssetId||e.roblox.backingImageAssetId||e.roblox.assetId),y=e.roblox.creatorAssetId??e.roblox.assetId,x=e.roblox.backingImageAssetId??e.roblox.assetId,I=e.roblox.assetId?e.usage.lastScannedAt?l("assets.detail.noUsageAfterScan","No references were found in local Sync files during the last check."):l("assets.detail.noUsageUnscanned","Run Scan usage to search local Sync files for this Roblox Asset ID."):l("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:v,role:"presentation",children:t.jsxs("section",{ref:X,className:s.detailDialog,role:"dialog","aria-modal":"true","aria-label":l("assets.detail.title","Asset details"),tabIndex:-1,onClick:o=>o.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,l)," · ",Be(e.status,l)]}),t.jsx("h2",{children:e.displayName}),t.jsx("span",{children:e.id})]}),t.jsxs("div",{className:s.detailHeaderActions,children:[t.jsx(K,{text:d?l("assets.upload.open.tooltip","Upload this local file to Roblox through Open Cloud."):l("assets.proOnly.tooltip","Roblox upload is available on Pro."),children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:!d,onClick:p,children:[t.jsx(Dt,{size:15}),l("assets.upload.open","Upload")]})}),n&&t.jsx(K,{text:r,children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:a==="import-rbxm",onClick:()=>void Y(),children:[t.jsx(pt,{size:15}),l("assets.detail.importRbxm","Insert into Studio")]})}),t.jsxs("button",{type:"button",className:s.commandButton,disabled:!T||a==="status-refresh",onClick:()=>void U(),children:[t.jsx(qe,{size:15}),l("assets.detail.refreshStatus","Refresh")]}),t.jsxs("button",{type:"button",className:s.commandButton,disabled:!e.roblox.assetId||a==="usage-scan",onClick:()=>void g(),children:[t.jsx(wt,{size:15}),l("assets.detail.scanUsage","Scan usage")]}),t.jsx(K,{text:l("assets.delete.tooltip","Delete this local Asset Library item."),children:t.jsxs("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:a==="delete",onClick:V,children:[t.jsx($t,{size:15}),l("common.delete","Delete")]})}),t.jsx(K,{text:l("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:v,"aria-label":l("common.close","Close"),children:t.jsx(De,{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,l)}),t.jsx("code",{children:e.file.original}),((k=e.rbxm)==null?void 0:k.thumbnail)&&t.jsx("small",{children:Me(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:l("assets.detail.displayName","Display name")}),t.jsx("input",{value:G,onChange:o=>W(o.target.value)})]}),t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:l("assets.detail.description","Description")}),t.jsx("textarea",{value:M,rows:3,onChange:o=>Z(o.target.value)})]}),t.jsx("button",{type:"button",className:s.primaryButton,disabled:a==="update",onClick:()=>void E(G,M),children:l("assets.detail.save","Save metadata")})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:l("assets.detail.localFile","Local file")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:l("assets.detail.fileName","File")}),t.jsx("dd",{children:e.file.original}),t.jsx("dt",{children:l("assets.detail.source","Source path")}),t.jsx("dd",{children:e.source.originalPath}),t.jsx("dt",{children:l("assets.detail.category","Category")}),t.jsx("dd",{children:ie(e,l)}),t.jsx("dt",{children:l("assets.detail.scope","Scope")}),t.jsx("dd",{children:e.scope.kind==="shared"?l("assets.scope.shared","Shared"):l("assets.scope.place","Current Place")}),t.jsx("dt",{children:l("assets.detail.mimeType","Type")}),t.jsx("dd",{children:e.file.mimeType}),t.jsx("dt",{children:l("assets.detail.size","Size")}),t.jsx("dd",{children:Fa(e.file.sizeBytes)}),He(e)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:l("assets.detail.dimensions","Dimensions")}),t.jsx("dd",{children:He(e)})]}),Ke(e)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:l("assets.detail.duration","Duration")}),t.jsx("dd",{children:Ke(e)})]})]})]}),e.rbxm&&t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:l("assets.detail.rbxm","RBXM contents")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:l("assets.detail.rbxmExportedCount","Exported roots")}),t.jsx("dd",{children:e.rbxm.exportedCount}),t.jsx("dt",{children:l("assets.detail.rbxmClasses","Classes")}),t.jsx("dd",{children:Ka(e)}),t.jsx("dt",{children:l("assets.detail.rbxmThumbnail","Thumbnail")}),t.jsx("dd",{children:Me(e)}),n&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:l("assets.detail.studioInsertTarget","Studio insert target")}),t.jsx("dd",{children:N})]})]}),e.rbxm.roots.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:l("assets.detail.rbxmRoots","Root tree")}),e.rbxm.roots.map(o=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[o.name," (",o.className,")"]}),t.jsx("code",{children:o.path})]},`${o.path}-${o.className}`))]}),e.rbxm.resourceReferences.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:l("assets.detail.rbxmReferences","Asset references")}),e.rbxm.resourceReferences.map((o,j)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[o.path," · ",o.property]}),t.jsx("code",{children:o.assetId?`${o.value} (#${o.assetId})`:o.value})]},`${o.path}-${o.property}-${j}`))]})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:l("assets.detail.roblox","Roblox upload status")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:l("assets.detail.status","Status")}),t.jsx("dd",{children:Be(e.status,l)}),O?t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:l("assets.detail.decalAssetId","Roblox Decal ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:y??l("assets.status.localOnly","Local only")}),t.jsx(fe,{label:l("assets.detail.copyDecalAssetId","Copy Roblox Decal ID"),value:y})]}),t.jsx("dt",{children:l("assets.detail.studioTextureImageId","Studio Texture Image ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:x??"-"}),t.jsx(fe,{label:l("assets.detail.copyStudioTextureImageId","Copy Studio Texture Image ID"),value:x})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:l("assets.detail.assetId","Asset ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:e.roblox.assetId??l("assets.status.localOnly","Local only")}),t.jsx(fe,{label:l("assets.detail.copyAssetId","Copy Asset ID"),value:e.roblox.assetId})]})]}),t.jsx("dt",{children:l("assets.detail.studioUri","Studio URI")}),t.jsx("dd",{children:e.roblox.assetUri??"-"}),t.jsx("dt",{children:l("assets.detail.robloxWebUrl","Creator Dashboard URL")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:$??"-"}),t.jsx(fe,{label:l("assets.detail.copyWebUrl","Copy configure URL"),value:$})]}),e.roblox.errorMessage&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:l("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 o;return e.roblox.assetUri&&void((o=navigator.clipboard)==null?void 0:o.writeText(e.roblox.assetUri))},children:[t.jsx(Qe,{size:15}),l("assets.detail.copyStudioUri","Copy Studio URI")]}),$&&t.jsxs("a",{className:s.commandButton,href:$,target:"_blank",rel:"noreferrer",children:[t.jsx(ht,{size:15}),l("assets.detail.openRobloxPage","Open configure page")]})]}),e.roblox.assetId&&t.jsx("p",{className:s.muted,children:l("assets.detail.robloxWebUrlNotice","Opening this page requires the Roblox account that owns or can manage the uploaded asset.")}),ee.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:l("assets.detail.uploadHistory","Upload history")}),ee.slice().reverse().map((o,j)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsx("span",{children:Va(o)}),Ge(o)&&t.jsx("code",{children:Ge(o)}),We(o)&&t.jsx("code",{children:We(o)}),o.operationPath&&t.jsx("code",{children:o.operationPath}),o.assetId&&t.jsxs("code",{children:[l("assets.detail.assetId","Asset ID"),": ",o.assetId]}),o.remotePath&&t.jsx("code",{children:o.remotePath}),o.message&&t.jsx("code",{children:o.message}),o.errorMessage&&t.jsx("code",{children:o.errorMessage})]},`${o.startedAt}-${o.operationPath??j}`))]})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:l("assets.detail.usedInPlace","Where this asset is used in this Place")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:l("assets.detail.usageSource","Checked against")}),t.jsx("dd",{children:e.usage.scanSource==="localSync"?l("assets.detail.usageSource.localSync","Local Sync files"):l("assets.detail.usageSource.notScanned","Not checked yet")}),t.jsx("dt",{children:l("assets.detail.lastScanned","Last checked")}),t.jsx("dd",{children:e.usage.lastScannedAt?l("assets.detail.lastScannedAt","Last checked: {time}").replace("{time}",je(e.usage.lastScannedAt)):l("assets.detail.lastScanned.never","No check yet")})]}),e.usage.references.length===0?t.jsx("p",{className:s.muted,children:I}):t.jsx("div",{className:s.usageList,children:e.usage.references.map((o,j)=>t.jsxs("div",{className:s.usageItem,children:[t.jsx("strong",{children:o.kind==="property"?o.instancePath:o.filePath}),t.jsx("span",{children:o.property??l("assets.detail.line","line {line}").replace("{line}",String(o.line??"-"))}),t.jsx("code",{children:o.value})]},`${o.kind}-${j}`))})]}),t.jsxs("details",{className:s.technicalDetails,children:[t.jsx("summary",{children:l("assets.detail.technicalDetails","Technical details")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:l("assets.detail.stableId","Stable ID")}),t.jsx("dd",{className:s.hashText,children:e.id}),t.jsx("dt",{children:l("assets.detail.sourceKind","Source kind")}),t.jsx("dd",{children:e.source.kind}),t.jsx("dt",{children:l("assets.detail.sha256","SHA-256")}),t.jsx("dd",{className:s.hashText,children:e.file.sha256}),t.jsx("dt",{children:l("assets.detail.createdAt","Created")}),t.jsx("dd",{children:je(e.createdAt)}),t.jsx("dt",{children:l("assets.detail.updatedAt","Updated")}),t.jsx("dd",{children:je(e.updatedAt)}),e.roblox.operationId&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:l("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:l("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:l("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:l("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:l("assets.detail.moderationState","Moderation")}),t.jsx("dd",{children:e.roblox.moderationState})]})]}),((S=e.rbxm)==null?void 0:S.thumbnail.attempts)&&e.rbxm.thumbnail.attempts.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:l("assets.detail.rbxmThumbnailAttempts","Thumbnail attempts")}),e.rbxm.thumbnail.attempts.map((o,j)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[o.method," · ",o.status]}),o.message&&t.jsx("code",{children:o.message})]},`${o.method}-${j}`))]})]})]})]})]})})}function nt(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 ot(){const e=await R.get("/api/dashboard/settings");return nt(e)}async function qa(e){const a=await R.patch("/api/dashboard/settings",Xa(e));return nt(a)}async function lt(){return R.get("/api/dashboard/open-cloud/credential-profiles")}async function Za(e){return R.post("/api/dashboard/open-cloud/credential-profiles",e)}async function Ja(e){return R.patch("/api/dashboard/open-cloud/credential-profiles/active",{profileId:e})}async function Qa(e,a){return R.put(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/api-key`,a)}async function en(e){return R.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}`)}async function tn(e,a){return R.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators`,a)}async function sn(e,a){return R.patch(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(a)}/default`,{})}async function an(e,a){return R.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(a)}`)}async function nn(e,a){return R.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/test`,a?{creatorPresetId:a}:{})}async function on(e){return R.post("/api/dashboard/open-cloud/credential/test",e?{apiKey:e}:{})}function ln(e){return e.category==="image"||e.category==="decal"}function rn(e,a){return e==="group"?a("assets.creator.group","Group"):a("assets.creator.user","User")}function cn(e,a){return`${e.label} · ${rn(e.creatorType,a)} ${e.creatorId}`}function ze(e){if(!e)return null;if(e.defaultCreatorId){const a=e.creators.find(d=>d.id===e.defaultCreatorId);if(a)return a}return e.creators[0]??null}function dn({asset:e,open:a,canUpload:d,busyAction:n,onClose:r,onBack:N,onOpenSettings:v,onUpload:E}){const{t:p}=he(),V=i.useRef(null),[Y,U]=i.useState(null),[g,l]=i.useState(null),[X,G]=i.useState(!1),[W,M]=i.useState(null),[Z,T]=i.useState(""),[Q,$]=i.useState(""),[ee,O]=i.useState(""),[y,x]=i.useState("user"),[I,k]=i.useState("");if(i.useEffect(()=>{T((e==null?void 0:e.displayName)??""),$((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 m=!1;return G(!0),M(null),(async()=>{try{const[w,D]=await Promise.all([ot(),lt()]);if(m)return;U(w);const F=D.profiles.find(de=>de.id===D.activeProfileId)??D.profiles[0]??null;l(F);const J=ze(F);O((J==null?void 0:J.id)??""),x((J==null?void 0:J.creatorType)??"user"),k((J==null?void 0:J.creatorId)??"")}catch(w){if(m)return;M(w instanceof Error?w.message:p("assets.upload.settingsLoadFailed","Failed to load upload settings.")),U(null),l(null)}finally{m||G(!1)}})(),()=>{m=!0}},[a,p]),i.useEffect(()=>{var w;if(!a||!e)return;(w=V.current)==null||w.focus();const m=D=>{D.key==="Escape"&&r()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,r,a]),!a||!e)return null;const S=(Y==null?void 0:Y.assetUploadByOpenCloudEnabled)===!0,o=!!g,j=ze(g),L=(g==null?void 0:g.creators.find(m=>m.id===ee))??null,ae=!!j,B=(g==null?void 0:g.storageProvider)==="env"&&o&&!ae,H=B&&I.trim().length>0,h=d&&!X&&!W&&(!S||!o||!ae&&!B),te=d&&!X&&!W&&S&&o&&(ae||H)&&n!=="upload";return t.jsx("div",{className:s.detailPopupLayer,onClick:r,role:"presentation",children:t.jsxs("section",{ref:V,className:s.detailDialog,role:"dialog","aria-modal":"true","aria-label":p("assets.upload.title","Upload asset"),tabIndex:-1,onClick:m=>m.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:N,children:[t.jsx(yt,{size:15}),p("assets.upload.backToDetails","Back to details")]}),t.jsx(K,{text:p("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:r,"aria-label":p("common.close","Close"),children:t.jsx(De,{size:16})})})]})]}),t.jsxs("div",{className:s.detailDialogBody,children:[t.jsx("div",{className:s.detailPreviewPane,children:ln(e)?t.jsx("img",{className:s.detailPreview,src:tt(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:[!d&&t.jsx("div",{className:s.notice,children:p("assets.proOnly.upload","Roblox upload is available on Pro.")}),X&&t.jsx("div",{className:s.notice,children:p("assets.upload.checkingSettings","Checking upload settings...")}),W&&t.jsx("div",{className:s.errorState,children:W}),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:o?S?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:v,children:[t.jsx(Ze,{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:Z,disabled:!d,onChange:m=>T(m.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:!d,onChange:m=>$(m.target.value)}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.descriptionHelp","Saved to Roblox as the asset description.")})]}),ae&&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:ee,disabled:!d||X,onChange:m=>O(m.target.value),children:g==null?void 0:g.creators.map(m=>t.jsx("option",{value:m.id,children:cn(m,p)},m.id))}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.creatorHelp","Used by Open Cloud as the owner of the uploaded asset.")})]}),B&&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:y,disabled:!d,onChange:m=>x(m.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:I,disabled:!d,onChange:m=>k(m.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:!te,onClick:()=>{const m=I.trim(),w=B&&m?{creatorType:y,creatorId:m}:{},D=!B&&L&&j&&L.id!==j.id?{creatorType:L.creatorType,creatorId:L.creatorId}:{};E({displayName:Z,description:Q,...w,...D})},children:n==="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 Ve(e,a){return e==="env"?a("assets.settings.credential.env","Environment variable"):a("assets.settings.credential.local","Local encrypted file")}function Pe(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 un(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 pn(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 hn(e,a){return e==="group"?a("assets.creator.group","Group"):a("assets.creator.user","User")}function mn(e,a){return`${hn(e.creatorType,a)} ${e.creatorId}`}function gn({open:e,tier:a,onClose:d}){const{t:n}=he(),[r,N]=i.useState(null),[v,E]=i.useState(null),[p,V]=i.useState(""),[Y,U]=i.useState(!1),[g,l]=i.useState(""),[X,G]=i.useState(""),[W,M]=i.useState("user"),[Z,T]=i.useState(""),[Q,$]=i.useState(""),[ee,O]=i.useState(!0),[y,x]=i.useState(null),[I,k]=i.useState(null),[S,o]=i.useState(!1),j=a==="basic",L=i.useCallback(async()=>{o(!0),x(null);try{const[u,_]=await Promise.all([ot(),lt()]);N(u),E(_);const P=_.profiles.find(le=>le.id===_.activeProfileId)??_.profiles[0]??null;V((P==null?void 0:P.id)??""),U(!P),O(!P||P.creators.length===0),M("user"),T(""),$("")}catch(u){x(u instanceof Error?u.message:n("assets.settings.loadFailed","Failed to load upload settings."))}finally{o(!1)}},[n]);if(i.useEffect(()=>{e&&L()},[L,e]),!e)return null;const ae=(r==null?void 0:r.assetUploadByOpenCloudEnabled)===!0,q=X.trim(),B=Z.trim(),H=(v==null?void 0:v.profiles)??[],h=H.find(u=>u.id===p)??H[0]??null,te=!!h,m=te&&(h==null?void 0:h.storageProvider)==="localFile",w=te&&(h==null?void 0:h.storageProvider)==="env",D=h!=null&&h.defaultCreatorId?h.creators.find(u=>u.id===h.defaultCreatorId):h==null?void 0:h.creators[0],F=!!(h!=null&&h.creators.length),J=!F||ee,de=H.length>1,oe=j?n("assets.settings.action.proRequired","Asset upload settings are available on Pro."):S?n("assets.settings.action.busy","Wait for the current settings action to finish."):null,_e=j||S||!q,Se=oe??(q?n("assets.settings.saveApiKey.tooltip.ready","Save this API key to local encrypted storage."):n("assets.settings.saveApiKey.tooltip.enter","Enter an Open Cloud API key to save it locally.")),me=j||S||!q&&!te,ge=oe??(q?n("assets.settings.testConnection.tooltip.entered","Test the entered API key before saving it."):te?n("assets.settings.testConnection.tooltip.saved","Test the saved Open Cloud API key."):n("assets.settings.testConnection.tooltip.enterOrSaved","Enter an API key or save one before testing the connection.")),xe=j||S||!m,be=oe??(m?n("assets.settings.removeApiKey.tooltip.ready","Remove the locally saved Open Cloud API key."):w?n("assets.settings.removeApiKey.tooltip.env","Environment API keys cannot be removed from Dashboard. Remove ROBLOX_OPEN_CLOUD_API_KEY outside WEPPY."):n("assets.settings.removeApiKey.tooltip.none","No local Open Cloud API key is saved.")),Ae=j||S||!m||!B,Ie=oe??(w?n("assets.settings.saveCreator.tooltip.env","Environment API keys cannot save a default Creator here. Enter Creator details in the upload dialog."):m?B?n("assets.settings.saveCreator.tooltip.ready","Save this Creator as the default owner for uploads."):n("assets.settings.saveCreator.tooltip.enterId","Enter a user or group ID before saving the default Creator."):n("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),Ne=oe??(m?n("assets.settings.addCreator.tooltip.ready","Add another User or Group Creator preset to this profile."):n("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),c=j||S||w||!m,b=oe??(m?n("assets.settings.unregisterCreator.tooltip.ready","Unregister this Creator from the selected profile."):w?n("assets.settings.saveCreator.tooltip.env","Environment API keys cannot save a default Creator here. Enter Creator details in the upload dialog."):n("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),f=D?n("assets.settings.saveCreatorPreset","Save Creator"):n("assets.settings.saveCreator","Save default Creator"),C=(h==null?void 0:h.label)??n("assets.settings.credential.none","No API key saved"),A=u=>{const _=u.profiles.find(P=>P.id===u.activeProfileId)??u.profiles[0]??null;E(u),V((_==null?void 0:_.id)??""),O(!_||_.creators.length===0),U(u.profiles.length===0)},z=async()=>{if(h){o(!0);try{const u=await nn(h.id,D==null?void 0:D.id);A(u),x(pn(u.validation,n))}catch(u){x(u instanceof Error?u.message:n("assets.settings.testFailed","Connection test failed."))}finally{o(!1)}}},ue=async()=>{if(I){o(!0);try{if(I.kind==="apiKey"){const u=await en(I.profileId);A(u),x(n("assets.settings.apiKeyRemoved","Open Cloud API key unregistered from local storage."))}else{const u=await an(I.profileId,I.creatorPresetId);A(u),x(n("assets.settings.creatorUnregistered","Creator unregistered from this profile."))}k(null)}catch(u){x(u instanceof Error?u.message:I.kind==="apiKey"?n("assets.settings.removeFailed","Failed to unregister API key."):n("assets.settings.creatorUnregisterFailed","Failed to unregister Creator."))}finally{o(!1)}}},rt=(I==null?void 0:I.kind)==="apiKey"?n("assets.settings.unregisterApiKey.title","Unregister API Key?"):n("assets.settings.unregisterCreator.title","Unregister Creator?"),it=(I==null?void 0:I.kind)==="apiKey"?n("assets.settings.unregisterApiKey.message","Roblox API key is not revoked. WEPPY only removes the local Credential Profile registration on this device."):n("assets.settings.unregisterCreator.message","Roblox user or group is not deleted. WEPPY only removes this Creator from the selected API Key profile."),ct=(I==null?void 0:I.kind)==="apiKey"?n("assets.settings.removeApiKey","Unregister API Key"):n("assets.settings.unregisterCreator","Unregister Creator");return t.jsxs("section",{id:"asset-library-settings-panel",className:`${s.settingsInlinePanel} ${s.settingsDrawer}`,role:"region","aria-label":n("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:n("assets.settings.title","Asset Library settings")}),t.jsx("span",{children:C})]}),t.jsx(K,{text:n("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:d,"aria-label":n("common.close","Close"),children:t.jsx(De,{size:16})})})]}),j&&t.jsx("div",{className:`${s.notice} ${s.proNotice}`,children:n("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:n("assets.settings.openCloudToggle","Open Cloud upload")}),t.jsx("small",{children:n("assets.settings.openCloudToggle.help","Controls whether server-side Open Cloud upload mutations can run.")})]}),t.jsx("input",{type:"checkbox",checked:ae,disabled:j||S,onChange:u=>{(async()=>{o(!0);try{const _=await qa({assetUploadByOpenCloudEnabled:u.target.checked});N(_),x(n("assets.settings.saved","Upload settings saved."))}catch(_){x(_ instanceof Error?_.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{o(!1)}})()}})]}),de&&t.jsx("div",{className:s.metadataList,children:H.map(u=>{const _=u.id===(h==null?void 0:h.id);return t.jsxs("div",{className:s.metadataItem,children:[t.jsx("strong",{children:u.label}),t.jsxs("span",{children:[n("assets.settings.field.storage","Storage"),": ",Ve(u.storageProvider,n)]}),t.jsxs("span",{children:[n("assets.settings.field.validationStatus","Validation status"),": ",Pe(u.validationStatus,n)]}),_&&t.jsx("code",{children:n("assets.settings.activeProfileBadge","Active")}),!_&&u.storageProvider==="localFile"&&t.jsx("button",{type:"button",className:s.commandButton,disabled:j||S,onClick:()=>{(async()=>{o(!0);try{const P=await Ja(u.id),le=P.profiles.find(ke=>ke.id===(P.activeProfileId??u.id))??u;E(P),V(le.id),O(le.creators.length===0),M("user"),T(""),$(""),x(n("assets.settings.profileSelected","Open Cloud credential profile selected."))}catch(P){x(P instanceof Error?P.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{o(!1)}})()},children:n("assets.settings.useProfile","Use profile")})]},u.id)})}),h&&t.jsxs("div",{className:s.settingsSubsection,children:[t.jsx("div",{className:s.settingsSectionHeader,children:t.jsx("h3",{children:n("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:n("assets.settings.field.profile","Profile")}),t.jsx("dd",{children:h.label})]}),h.maskedKey&&t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.apiKey","API Key")}),t.jsx("dd",{children:h.maskedKey})]}),t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.storage","Storage")}),t.jsx("dd",{children:Ve(h.storageProvider,n)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.validationStatus","Validation status")}),t.jsx("dd",{children:Pe(h.validationStatus,n)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.creators","Creators")}),t.jsx("dd",{children:h.creators.length})]})]}),!Y&&t.jsxs("div",{className:s.buttonRow,children:[t.jsx(K,{text:ge,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:me,onClick:()=>{z()},children:n("assets.settings.testConnection","Test Connection")})}),m&&t.jsx("button",{type:"button",className:s.commandButton,disabled:j||S,onClick:()=>U(!0),children:n("assets.settings.replaceApiKey","Replace API Key")}),t.jsx(K,{text:be,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:xe,onClick:()=>k({kind:"apiKey",profileId:h.id}),children:n("assets.settings.removeApiKey","Unregister API Key")})})]})]})]}),Y&&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:n("assets.settings.profileLabel","Profile name")})}),t.jsx("input",{id:"asset-settings-open-cloud-profile-label",value:g,disabled:j||S,onChange:u=>l(u.target.value),placeholder:n("assets.settings.profileLabel.placeholder","Studio automation key")}),t.jsx("p",{className:s.inlineHelp,children:n("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:n("assets.settings.apiKey","Open Cloud API Key")}),t.jsx(Ue,{topicId:"openCloudApiKey",variant:"field",state:{hasOpenCloudCredential:te}})]}),t.jsx("input",{id:"asset-settings-open-cloud-api-key",value:X,type:"password",disabled:j||S,onChange:u=>G(u.target.value)}),t.jsx("p",{className:s.inlineHelp,children:n("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.")})]}),!te&&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:n("assets.settings.apiKeyGuide","Create a Roblox API key with Assets Read and Write permissions.")})}),t.jsxs("div",{className:s.buttonRow,children:[t.jsx(K,{text:Se,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:_e,onClick:()=>{(async()=>{var u;o(!0);try{const _={apiKey:q,...g.trim()?{label:g.trim()}:{}},P=(h==null?void 0:h.storageProvider)==="localFile"?await Qa(h.id,_):await Za(_),le=P.profiles.find(ke=>{var Ee;return ke.id===(P.activeProfileId??((Ee=P.profile)==null?void 0:Ee.id))});E(P),V(P.activeProfileId??((u=P.profile)==null?void 0:u.id)??""),O(!le||le.creators.length===0),U(!1),G(""),l(""),x(n("assets.settings.apiKeySaved","Open Cloud API key saved locally."))}catch(_){x(_ instanceof Error?_.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{o(!1)}})()},children:n("assets.settings.saveApiKey","Save API Key")})}),t.jsx(K,{text:ge,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:me,onClick:()=>{(async()=>{o(!0);try{const u=await on(q||void 0);x(un(u.validation,n))}catch(u){x(u instanceof Error?u.message:n("assets.settings.testFailed","Connection test failed."))}finally{o(!1)}})()},children:n("assets.settings.testConnection","Test Connection")})}),t.jsx(K,{text:be,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:xe,onClick:()=>{h&&k({kind:"apiKey",profileId:h.id})},children:n("assets.settings.removeApiKey","Unregister API Key")})})]})]}),t.jsx("div",{className:s.metadataList,children:h==null?void 0:h.creators.map(u=>t.jsxs("div",{className:s.metadataItem,children:[t.jsx("strong",{children:u.label}),t.jsx("span",{children:mn(u,n)}),u.id===h.defaultCreatorId&&t.jsx("code",{children:n("assets.settings.defaultCreatorBadge","Default")}),t.jsxs("span",{children:[n("assets.settings.field.validationStatus","Validation status"),": ",Pe(u.validationStatus,n)]}),t.jsxs("div",{className:s.buttonRow,children:[u.id!==h.defaultCreatorId&&h.storageProvider==="localFile"&&t.jsx("button",{type:"button",className:s.commandButton,disabled:j||S,onClick:()=>{(async()=>{if(h){o(!0);try{const _=await sn(h.id,u.id);E(_),x(n("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(_){x(_ instanceof Error?_.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{o(!1)}}})()},children:n("assets.settings.makeDefaultCreator","Make default")}),t.jsx(K,{text:b,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:c,onClick:()=>k({kind:"creator",profileId:h.id,creatorPresetId:u.id}),children:n("assets.settings.unregisterCreator","Unregister Creator")})})]})]},u.id))}),F&&!ee&&t.jsx(K,{text:Ne,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:j||S||w||!m,onClick:()=>{M("user"),T(""),$(""),O(!0)},children:n("assets.settings.addCreator","Add Creator")})}),J&&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:n("assets.upload.creatorType","Creator type")})}),t.jsxs("select",{id:"asset-settings-creator-type",value:W,disabled:j||S||w||!m,onChange:u=>M(u.target.value),children:[t.jsx("option",{value:"user",children:n("assets.creator.user","User")}),t.jsx("option",{value:"group",children:n("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:n("assets.upload.creatorId","Creator ID")}),t.jsx(Ue,{topicId:"openCloudCreatorId",variant:"field",state:{hasDefaultCreator:!!D}})]}),t.jsx("input",{id:"asset-settings-creator-id",value:Z,disabled:j||S||w||!m,onChange:u=>T(u.target.value)}),t.jsx("p",{className:s.inlineHelp,children:n("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:n("assets.settings.creatorLabel","Creator label")})}),t.jsx("input",{id:"asset-settings-creator-label",value:Q,disabled:j||S||w||!m,onChange:u=>$(u.target.value),placeholder:n("assets.settings.creatorLabel.placeholder","Main studio group")}),t.jsx("p",{className:s.inlineHelp,children:n("assets.settings.creatorLabel.help","Optional. If left blank, WEPPY automatically saves a label like User 123 or Group 456.")})]}),!D&&t.jsx("p",{className:s.inlineHelp,children:n("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(K,{text:Ie,children:t.jsx("button",{type:"button",className:s.primaryButton,disabled:Ae,onClick:()=>{(async()=>{if(h){o(!0);try{const u=await tn(h.id,{creatorType:W,creatorId:B,makeDefault:!D,...Q.trim()?{label:Q.trim()}:{}});E(u),T(""),$(""),O(!1),x(n("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(u){x(u instanceof Error?u.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{o(!1)}}})()},children:f})}),F&&t.jsx("button",{type:"button",className:s.commandButton,disabled:j||S,onClick:()=>{M("user"),T(""),$(""),O(!1)},children:n("assets.settings.cancelCreator","Cancel")})]})]})]}),y&&t.jsx("div",{className:s.messageState,children:y}),t.jsx(Je,{open:I!==null,title:rt,message:it,cancelLabel:n("common.cancel","Cancel"),confirmLabel:ct,loading:S,onCancel:()=>k(null),onConfirm:()=>{ue()}})]})}const xn=12,bn=5e3;function re(e,a){return e instanceof Error&&e.message.trim().length>0?e.message:a}function Re(e,a){return e.some(n=>n.id===a.id)?e.map(n=>n.id===a.id?a:n):[a,...e]}function we(e,a){return Yt(e.filter(d=>Vt(d,a)))}function pe(e,a){return e?`${e.displayName} (${e.id})`:a??"unknown asset"}function fn(e){return e.length===0?"none":e.map(a=>pe(a)).join(", ")}function Ye(e){const a=`status ${e.status}`;return e.roblox.assetId?`Roblox asset ${e.roblox.assetId}; ${a}`:a}function yn(e,a){const d=pe(a);return e==="update"?`Updated metadata for asset: ${d}.`:e==="upload"?`Uploaded asset: ${d} -> ${Ye(a)}.`:e==="thumbnail-generate"?`Generated thumbnail for asset: ${d}.`:e==="status-refresh"?`Refreshed Roblox status for asset: ${d} -> ${Ye(a)}.`:e==="usage-scan"?`Scanned usage for asset: ${d} -> ${a.usage.references.length} reference(s).`:`Updated asset: ${d}.`}function jn(e){return e!=="upload"&&e!=="status-refresh"}function Le(e,a){if((a==null?void 0:a.id)===e)return a.category;const d=/^asset_(image|decal|audio|mesh|model|video|animation)_/.exec(e);return d!=null&&d[1]?d[1]:null}function Xe(e){return e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath)}function vn(e){return{scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0,category:e.category}}function Cn(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 _n(e,a){if(typeof a=="number"){const d=e.places.find(n=>n.placeId===a);if(d)return{placeId:d.placeId,placeName:d.placeName,studioConnected:d.isConnected,overrideStillValid:!0}}return{...Cn(e),overrideStillValid:a===null}}function Sn(){const[e,a]=i.useState([]),[d,n]=i.useState(0),[r,N]=i.useState(null),[v,E]=i.useState("place"),[p,V]=i.useState("all"),[Y,U]=i.useState([]),[g,l]=i.useState(null),[X,G]=i.useState(null),[W,M]=i.useState(null),[Z,T]=i.useState(null),[Q,$]=i.useState(!1),[ee,O]=i.useState(!1),[y,x]=i.useState(!0),[I,k]=i.useState(null),[S,o]=i.useState(null),[j,L]=i.useState(null),ae=i.useRef(!0),q=i.useRef(new Map),B=i.useMemo(()=>e.find(c=>c.id===r)??null,[e,r]),H=i.useCallback(c=>{const b=q.current.get(c);b!==void 0&&(clearTimeout(b),q.current.delete(c))},[]),h=i.useCallback((c,b=xn)=>{if(!Xe(c)||b<=0){H(c.id);return}H(c.id),(async()=>{try{const f=await Te(vn(c),c.id);if(!ae.current)return;if(a(C=>Re(C,f)),Xe(f)&&b>1){const C=setTimeout(()=>{q.current.delete(f.id),h(f,b-1)},bn);q.current.set(f.id,C);return}H(f.id)}catch(f){if(!ae.current)return;H(c.id),o(re(f,"Asset Library status refresh failed."))}})()},[H]);i.useEffect(()=>()=>{ae.current=!1;for(const c of q.current.values())clearTimeout(c);q.current.clear()},[]);const te=i.useCallback(()=>({scope:v,placeId:v==="place"?W:void 0}),[W,v]),m=i.useCallback(c=>({...te(),category:c}),[te]),w=i.useCallback(async()=>{try{const c=await mt(),b=_n(c,g);return U(c.places),b.overrideStillValid||l(null),G(b.placeId),M(b.placeId),T(b.placeName),$(b.studioConnected),O(b.studioConnected),b.placeId}catch{return U([]),G(null),M(null),T(null),$(!1),O(!1),null}},[g]),D=i.useCallback(async()=>{o(null);try{const c=await w(),b={scope:v,placeId:v==="place"?c:void 0};if(v==="place"&&c===null){a([]),n(0),x(!1),o("No active place is connected for place-scoped assets.");return}const f=await Promise.all(Fe(p).map(A=>Et({...b,category:A}))),C=we(f.flatMap(A=>A.assets),p);a(C),n(C.length)}catch(c){o(re(c,"Failed to load Asset Library."))}finally{x(!1)}},[p,w,v]);i.useEffect(()=>{D()},[D]);const F=i.useCallback(async(c,b,f)=>{const C=Le(b,B);if(!C)return o("Asset category is unavailable."),null;k(c),o(null),L(null);try{const A=await f(m(C));return a(z=>Re(z,A)),N(A.id),jn(c)&&L(yn(c,A)),A}catch(A){return o(re(A,"Asset Library action failed.")),null}finally{k(null)}},[m,B]),J=i.useCallback(async()=>{k("rescan"),o(null),L(null);try{const c=await Promise.all(Fe(p).map(z=>Ut(m(z)))),b=we(c.flatMap(z=>z.assets),p),f=c.reduce((z,ue)=>z+ue.adoptedCount,0),C=c.reduce((z,ue)=>z+ue.skippedCount,0),A=we(c.flatMap(z=>z.adopted),p);a(b),n(b.length),L(`Rescan complete for ${p}: ${f} asset(s) added, ${C} skipped. Added: ${fn(A)}.`)}catch(c){o(re(c,"Asset Library rescan failed."))}finally{k(null)}},[p,m]),de=i.useCallback(async(c,b)=>{k("export-selection-rbxm"),o(null),L(null);try{const f=await Ht(m(c),b);return a(C=>Re(C,f.asset)),N(f.asset.id),L(`Exported Studio selection as RBXM asset: ${pe(f.asset)}${f.deduplicated?" (reused existing local asset)":""}.`),f}catch(f){return o(re(f,"Asset Library .rbxm export failed.")),null}finally{k(null)}},[m]),oe=i.useCallback((c,b)=>F("update",c,f=>Tt(f,c,b)),[F]),_e=i.useCallback(async(c,b)=>{const f=await F("upload",c,C=>Ft(C,c,b));return f&&h(f),f},[F,h]),Se=i.useCallback(async c=>{const b=Le(c,B);if(!b)return o("Asset category is unavailable."),!1;H(c);const f=e.find(C=>C.id===c)??B;k("delete"),o(null),L(null);try{return await Ot(m(b),c),a(C=>{const A=C.filter(z=>z.id!==c);return n(A.length),A}),N(C=>C===c?null:C),L(`Deleted asset: ${pe(f,c)}. Local files removed; uploaded Roblox assets were not deleted.`),!0}catch(C){return o(re(C,"Asset Library delete failed.")),!1}finally{k(null)}},[e,H,m,B]),me=i.useCallback(async(c,b)=>{const f=Le(c,B);if(!f)return o("Asset category is unavailable."),null;const C=e.find(A=>A.id===c)??B;k("import-rbxm"),o(null),L(null);try{const A=await Kt(m(f),c,b);return N(c),L(`Imported RBXM asset: ${pe(C,c)} -> ${A.importedCount} instance(s) to ${A.targetParent}.`),A}catch(A){return o(re(A,"Asset Library .rbxm import failed.")),null}finally{k(null)}},[e,m,B]),ge=i.useCallback(c=>F("thumbnail-generate",c,b=>Gt(b,c)),[F]),xe=i.useCallback(c=>(H(c),F("status-refresh",c,b=>Te(b,c))),[H,F]),be=i.useCallback((c,b)=>F("usage-scan",c,async f=>(await Mt(f,c,b)).asset),[F]),Ae=i.useCallback(c=>{E(c),N(null)},[]),Ie=i.useCallback(c=>{l(c),N(null)},[]),Ne=i.useCallback(c=>{zt(c)&&(V(c),N(null))},[]);return{assets:e,totalCount:d,selectedAsset:B,selectedAssetId:r,scope:v,categoryFilter:p,availablePlaces:Y,selectedPlaceId:X,activePlaceId:W,activePlaceName:Z,selectedPlaceIsConnected:Q,studioConnected:ee,loading:y,busyAction:I,error:S,lastMessage:j,setScope:Ae,setSelectedPlaceId:Ie,setCategoryFilter:Ne,selectAsset:N,refresh:D,rescan:J,exportSelectionRbxm:de,updateMetadata:oe,uploadAsset:_e,deleteAsset:Se,importRbxm:me,generateThumbnail:ge,refreshStatus:xe,scanUsage:be}}function An(e,a){return a("assets.count.shown","Shown assets: {count}").replace("{count}",String(e))}function In(e,a){return e===null?null:a("assets.place.id","Place ID {placeId}").replace("{placeId}",String(e))}function $n(){const{t:e}=he(),{trackEvent:a}=gt(),{tier:d,loading:n}=xt(),r=Sn(),[N,v]=i.useState(!1),[E,p]=i.useState(!1),[V,Y]=i.useState(!1),U=!n&&d==="pro",g=r.selectedAsset,l=(g==null?void 0:g.file.original.toLowerCase().endsWith(".rbxm"))??!1,X=(g==null?void 0:g.category)==="model"||(g==null?void 0:g.category)==="animation",G="game.Workspace",M=!!(U&&r.studioConnected&&g&&l&&X),Z=r.availablePlaces??[],T=r.selectedPlaceId??r.activePlaceId,Q=i.useMemo(()=>r.scope==="shared"?[e("assets.scope.shared","Shared")]:[r.activePlaceName??e("assets.scope.place","Current Place"),In(r.activePlaceId,e),r.selectedPlaceIsConnected?e("assets.place.connected","Connected"):null].filter(y=>!!y),[r.activePlaceId,r.activePlaceName,r.scope,r.selectedPlaceIsConnected,e]),$=i.useMemo(()=>$e(r.categoryFilter,e),[r.categoryFilter,e]),ee=An(r.totalCount,e),O=e("assets.detail.importRbxm.tooltip","Insert this local RBXM asset into {target} in the connected Studio place.").replace("{target}",G);return t.jsxs("div",{className:s.page,children:[t.jsx(bt,{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:d}}),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:r.scope==="place"?s.segmentedActive:"",onClick:()=>r.setScope("place"),children:e("assets.scope.place","Current Place")}),t.jsx("button",{type:"button",className:r.scope==="shared"?s.segmentedActive:"",onClick:()=>r.setScope("shared"),children:e("assets.scope.shared","Shared")})]}),r.scope==="place"&&Z.length>0?t.jsxs("label",{className:s.placeSelectorLabel,children:[t.jsx("span",{children:e("assets.place.selector","Asset place")}),t.jsx("select",{className:s.placeSelect,value:typeof T=="number"?String(T):"",onChange:y=>{const x=Number.parseInt(y.currentTarget.value,10);Number.isInteger(x)&&r.setSelectedPlaceId(x)},children:Z.map(y=>t.jsxs("option",{value:y.placeId,children:[y.placeName," (",y.placeId,")"]},y.placeId))})]}):null,t.jsxs("div",{className:s.listContextSummary,children:[Q.map((y,x)=>t.jsxs("span",{children:[x>0?t.jsx("span",{className:s.contextDivider,children:" · "}):null,y]},`${y}-${x}`)),t.jsx("span",{className:s.contextDivider,children:" · "}),t.jsx("span",{children:$}),t.jsx("span",{className:s.contextDivider,children:" · "}),t.jsx("strong",{children:ee})]}),t.jsxs("div",{className:s.toolbarActions,children:[t.jsx(K,{text:e("assets.rescan.tooltip","Scan inbox folders for the current filter."),children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:r.busyAction==="rescan",onClick:()=>{a("dashboard_click_event",{click_target:"assets_rescan",page:"assets"}),r.rescan()},children:[t.jsx(qe,{size:15}),e("assets.rescan","Rescan")]})}),t.jsx(K,{text:E?"":e("assets.settings.open.tooltip","Open Roblox upload settings."),children:t.jsx("button",{type:"button",className:[s.iconButton,E?s.iconButtonActive:""].filter(Boolean).join(" "),onClick:()=>{a("dashboard_click_event",{click_target:"assets_open_settings",page:"assets"}),p(y=>!y)},"aria-label":e("assets.settings.open","Open settings"),"aria-controls":"asset-library-settings-panel","aria-expanded":E,children:t.jsx(Ze,{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:at.map(y=>{const x=r.categoryFilter===y,I=$e(y,e);return t.jsx("button",{type:"button",role:"radio","aria-checked":x,className:[s.categoryButton,x?s.categoryButtonActive:""].filter(Boolean).join(" "),onClick:()=>{r.setCategoryFilter(y)},children:I},y)})})]})]}),t.jsx(gn,{open:E,tier:d,onClose:()=>p(!1)})]}),r.error&&t.jsx("div",{className:s.errorState,children:r.error}),r.lastMessage&&t.jsx("div",{className:s.messageState,children:r.lastMessage}),r.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&&!n&&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.")}),r.loading?t.jsx("div",{className:s.emptyState,children:e("common.loading","Loading...")}):t.jsx(Ua,{assets:r.assets,selectedAssetId:r.selectedAssetId,onSelect:r.selectAsset}),t.jsx(Ya,{asset:N||E||V?null:g,busyAction:r.busyAction,canUpload:U,canImportRbxm:M,importRbxmTooltip:O,importRbxmTargetParent:G,onClose:()=>r.selectAsset(null),onSave:async(y,x)=>{g&&await r.updateMetadata(g.id,{displayName:y,description:x})},onUpload:()=>v(!0),onDelete:()=>Y(!0),onImportRbxm:async()=>{g&&(a("dashboard_click_event",{click_target:"assets_import_rbxm",page:"assets"}),await r.importRbxm(g.id,{targetParent:G}))},onRefreshStatus:async()=>{g&&await r.refreshStatus(g.id)},onScanUsage:async()=>{g&&(a("dashboard_click_event",{click_target:"assets_usage_scan",page:"assets"}),await r.scanUsage(g.id,r.activePlaceId??void 0))}}),t.jsx(Je,{open:V&&!!g,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:r.busyAction==="delete",onCancel:()=>Y(!1),onConfirm:()=>{g&&(a("dashboard_click_event",{click_target:"assets_delete",page:"assets"}),r.deleteAsset(g.id).then(y=>{y&&Y(!1)}))}}),t.jsx(dn,{asset:g,open:N,canUpload:U,busyAction:r.busyAction,onClose:()=>{v(!1),r.selectAsset(null)},onBack:()=>v(!1),onOpenSettings:()=>{v(!1),p(!0)},onUpload:async y=>{if(!g)return;a("dashboard_click_event",{click_target:"assets_upload_submit",page:"assets"}),await r.uploadAsset(g.id,y)&&v(!1)}})]})}export{$n as Component};
@@ -1 +0,0 @@
1
- ._backdrop_1ozbv_1{position:fixed;top:0;right:0;bottom:0;left:0;background:#0c1018b8;display:grid;place-items:center;z-index:1000;padding:24px}._modal_1ozbv_12{width:min(420px,100%);background:var(--bg-overlay);border:1px solid var(--border);border-radius:18px;box-shadow:0 24px 48px #0307126b;padding:24px}._title_1ozbv_23{margin:0 0 12px;color:var(--text-primary);font-size:20px}._message_1ozbv_30{margin:0;color:var(--text-secondary);line-height:1.6}._actions_1ozbv_37{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}._cancelButton_1ozbv_44,._confirmButton_1ozbv_45{border:0;border-radius:var(--radius);padding:10px 14px;font:inherit;cursor:pointer}._cancelButton_1ozbv_44{background:var(--border);border:1px solid transparent;color:var(--text-primary)}._confirmButton_1ozbv_45{background:var(--error-bg);border:1px solid var(--error-border);color:var(--error-text)}._cancelButton_1ozbv_44:disabled,._confirmButton_1ozbv_45:disabled{cursor:not-allowed;opacity:.6}._pathBlock_1ozbv_75{display:grid;gap:6px}._pathLabel_1ozbv_80{font-size:12px;font-weight:700;color:var(--text-secondary)}._pathCode_1ozbv_86{display:block;overflow-wrap:anywhere;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-size:12px;line-height:1.5}._bodyGrid_1ozbv_98{display:grid;gap:14px;margin-top:18px}._warningList_1ozbv_104{margin:0;padding-left:18px;color:var(--text-secondary);line-height:1.6}._errorMessage_1ozbv_111{margin-top:0;color:var(--error-text)}
@@ -1 +0,0 @@
1
- const o="_backdrop_1ozbv_1",t="_modal_1ozbv_12",_="_title_1ozbv_23",s="_message_1ozbv_30",n="_actions_1ozbv_37",a="_cancelButton_1ozbv_44",c="_confirmButton_1ozbv_45",e="_pathBlock_1ozbv_75",b="_pathLabel_1ozbv_80",r="_pathCode_1ozbv_86",i="_bodyGrid_1ozbv_98",l="_warningList_1ozbv_104",d="_errorMessage_1ozbv_111",p={backdrop:o,modal:t,title:_,message:s,actions:n,cancelButton:a,confirmButton:c,pathBlock:e,pathLabel:b,pathCode:r,bodyGrid:i,warningList:l,errorMessage:d};export{p as s};
@@ -1,11 +0,0 @@
1
- import{i as Z,u as ee,r as d,j as e,f as te,a as D,D as ne,L as se,M as ce,k as V,e as ie,l as le,s as ae}from"./index-CJJYSnlB.js";import{I as h}from"./InfoLabel-DwsCwdUw.js";import{P as re}from"./PageHeader-DwlcGnaB.js";import{S as oe}from"./StatusBadge-CYejTjWf.js";import{T as de}from"./TooltipText-LAwR8aaI.js";import{C as X}from"./ConfirmModal-knJOxPTQ.js";import{u as ge,f as pe}from"./useLiveUptime-DM28rhji.js";import{C as K}from"./copy-DwoEPqC3.js";import"./ConfirmModal.module-NrFlfTWy.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 ue=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],he=Z("bot",ue);/**
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 ye=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],me=Z("server",ye),xe="_container_1h084_2",_e="_entry_1h084_14",fe="_timestamp_1h084_21",je="_message_1h084_27",ve="_warn_1h084_34",Ce="_error_1h084_39",Se="_empty_1h084_44",O={container:xe,entry:_e,timestamp:fe,message:je,warn:ve,error:Ce,empty:Se};function be(o){const s=new Date(o);return Number.isNaN(s.getTime())?o:`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Ne({entries:o}){const{t:s}=ee(),n=d.useRef(null);return d.useEffect(()=>{const i=n.current;i&&(i.scrollTop=i.scrollHeight)},[o.length]),e.jsx("div",{ref:n,className:O.container,children:o.length===0?e.jsx("div",{className:O.empty,children:s("connection.log.empty","No events yet")}):o.map((i,r)=>e.jsxs("div",{className:`${O.entry} ${i.type?O[i.type]:""}`,children:[e.jsx("span",{className:O.timestamp,children:be(i.timestamp)}),e.jsx("span",{className:O.message,children:i.message})]},r))})}const J=50;function we(){const o=new Date;return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}`}function Ie(){const{level:o,status:s,error:n}=te(),[i,r]=d.useState(null),[f,g]=d.useState(null),[c,L]=d.useState([]),b=d.useRef(null),A=d.useCallback((p,j)=>{L(w=>{const _=[...w,{timestamp:we(),message:p,type:j}];return _.length>J?_.slice(-J):_})},[]),y=d.useCallback(async()=>{try{const p=await D.get("/connection-info");r(p)}catch{r(null)}},[]),M=d.useCallback(async()=>{try{const p=await D.get("/api/dashboard/studio-routing");g(p)}catch{g(null)}},[]),I=d.useCallback(async p=>{const j=await D.patch("/api/dashboard/studio-routing",p);return g(j),await y(),j},[y]),B=d.useCallback(async()=>{try{const p=await D.get("/api/dashboard/connection-log");L(p.entries??[])}catch{L([])}},[]),E=d.useCallback(async()=>{await D.post("/api/dashboard/connection-log/clear"),L([])},[]),N=d.useCallback(async p=>{await D.post("/api/dashboard/kill-agent",{instanceId:p}),await y()},[y]);return d.useEffect(()=>{o!=="disconnected"&&s?(y(),M()):g(null),B()},[o,s,y,B,M]),d.useEffect(()=>{const p=new ne;b.current=p,p.connect();const j=p.on("connection",_=>{const u=_;u.status!=="updated"&&u.clientId&&A(`Plugin ${u.status} — ${u.clientId}`,u.status==="disconnected"?"warn":"info"),y(),M()}),w=p.on("mcp_status",_=>{const u=_,z=u.status==="registered"?"registered":"unregistered";A(`MCP ${z} — ${u.aiClientName}`,u.status==="registered"?"info":"warn"),y(),M()});return()=>{j(),w(),p.disconnect(),b.current=null}},[A,y,M]),{status:s,connectionInfo:i,studioRouting:f,connectionLog:c,level:o,error:n,clearConnectionLog:E,killAgent:N,updateStudioRouting:I}}const ke="_page_17f6d_2",Le="_card_17f6d_11",Ae="_topologyCard_17f6d_19",Me="_topologyDisconnected_17f6d_26",Pe="_topologyHeader_17f6d_30",Be="_topologyIntro_17f6d_38",$e="_topologyNetwork_17f6d_45",Ee="_topologyLinks_17f6d_49",Te="_topologyLink_17f6d_49",He="_topologyLink_agent_17f6d_66",De="_topologyLink_studio_17f6d_70",Oe="_topologyGrid_17f6d_74",Fe="_topologyColumn_17f6d_83",ze="_topologyColumnHeader_17f6d_90",Ue="_topologyColumnHeaderSpacer_17f6d_101",Ge="_topologyCount_17f6d_105",qe="_topologyList_17f6d_120",We="_topologyListCentered_17f6d_128",Ve="_topologyNode_17f6d_132",Ke="_topologyNodeTitle_17f6d_140",Ye="_topologyNodeMeta_17f6d_156",Re="_topologyNodeSubtle_17f6d_157",Xe="_topologyState_17f6d_170",Je="_topologyEmpty_17f6d_183",Qe="_topologyOverflow_17f6d_198",Ze="_topologyOverflowButton_17f6d_213",eo="_topologyServerColumn_17f6d_236",oo="_topologyServer_17f6d_236",to="_topologyServerIcon_17f6d_254",no="_topologyServerBody_17f6d_267",so="_topologyServerTitle_17f6d_276",co="_topologyServerMeta_17f6d_283",io="_routingSummaryCompact_17f6d_290",lo="_disabled_17f6d_298",ao="_cardHeader_17f6d_304",ro="_cardHint_17f6d_317",go="_clearButton_17f6d_324",po="_serverGrid_17f6d_334",uo="_statusRow_17f6d_352",ho="_metaItem_17f6d_359",yo="_table_17f6d_366",mo="_tableWrap_17f6d_386",xo="_routingSummary_17f6d_290",_o="_manageLink_17f6d_402",fo="_segment_17f6d_428",jo="_segmentActive_17f6d_429",vo="_targetPrimary_17f6d_463",Co="_monoMuted_17f6d_467",So="_copyIconButton_17f6d_471",bo="_routingBadge_17f6d_496",No="_toggleBtn_17f6d_511",wo="_disconnected_17f6d_526",Io="_disconnectedActions_17f6d_543",ko="_btn_17f6d_550",Lo="_activity_active_17f6d_568",Ao="_activity_stale_17f6d_569",Mo="_activity_unknown_17f6d_570",Po="_killBtn_17f6d_594",Bo="_emptyRow_17f6d_614",t={page:ke,card:Le,topologyCard:Ae,topologyDisconnected:Me,topologyHeader:Pe,topologyIntro:Be,topologyNetwork:$e,topologyLinks:Ee,topologyLink:Te,topologyLink_agent:He,topologyLink_studio:De,topologyGrid:Oe,topologyColumn:Fe,topologyColumnHeader:ze,topologyColumnHeaderSpacer:Ue,topologyCount:Ge,topologyList:qe,topologyListCentered:We,topologyNode:Ve,topologyNodeTitle:Ke,topologyNodeMeta:Ye,topologyNodeSubtle:Re,topologyState:Xe,topologyEmpty:Je,topologyOverflow:Qe,topologyOverflowButton:Ze,topologyServerColumn:eo,topologyServer:oo,topologyServerIcon:to,topologyServerBody:no,topologyServerTitle:so,topologyServerMeta:co,routingSummaryCompact:io,disabled:lo,cardHeader:ao,cardHint:ro,clearButton:go,serverGrid:po,statusRow:uo,metaItem:ho,table:yo,tableWrap:mo,routingSummary:xo,manageLink:_o,segment:fo,segmentActive:jo,targetPrimary:vo,monoMuted:Co,copyIconButton:So,routingBadge:bo,toggleBtn:No,disconnected:wo,disconnectedActions:Io,btn:ko,activity_active:Lo,activity_stale:Ao,activity_unknown:Mo,killBtn:Po,emptyRow:Bo},W=5;function $o(o){return o?Date.now()-o<3e4?"active":"stale":"unknown"}function Eo(o,s){return o==="active"?s("connection.topology.active","Active"):o==="stale"?s("connection.topology.stale","Stale"):s("connection.topology.unknown","Unknown")}function To(o){return o.length>10?o.slice(0,10):o}function Q(o,s){return o.replace("{count}",String(s))}function Ho(o,s){return o.length!==s.length?!1:o.every((n,i)=>{const r=s[i];return r!==void 0&&n.id===r.id&&n.side===r.side&&Math.abs(n.x1-r.x1)<.5&&Math.abs(n.y1-r.y1)<.5&&Math.abs(n.x2-r.x2)<.5&&Math.abs(n.y2-r.y2)<.5})}function S(o,s,n){return{x:s-o.left,y:n-o.top}}function Do(o,s,n,i){if(s.right<=n.left){const g=S(i,s.right,s.top+s.height/2),c=S(i,n.left,n.top+n.height/2);return{id:o,side:"agent",x1:g.x,y1:g.y,x2:c.x,y2:c.y}}if(s.bottom<=n.top){const g=S(i,s.left+s.width/2,s.bottom),c=S(i,n.left+n.width/2,n.top);return{id:o,side:"agent",x1:g.x,y1:g.y,x2:c.x,y2:c.y}}const r=S(i,s.left+s.width/2,s.top),f=S(i,n.left+n.width/2,n.bottom);return{id:o,side:"agent",x1:r.x,y1:r.y,x2:f.x,y2:f.y}}function Oo(o,s,n,i){if(n.right<=s.left){const g=S(i,s.left,s.top+s.height/2),c=S(i,n.right,n.top+n.height/2);return{id:o,side:"studio",x1:g.x,y1:g.y,x2:c.x,y2:c.y}}if(n.bottom<=s.top){const g=S(i,s.left+s.width/2,s.top),c=S(i,n.left+n.width/2,n.bottom);return{id:o,side:"studio",x1:g.x,y1:g.y,x2:c.x,y2:c.y}}const r=S(i,s.left+s.width/2,s.bottom),f=S(i,n.left+n.width/2,n.top);return{id:o,side:"studio",x1:r.x,y1:r.y,x2:f.x,y2:f.y}}function Fo({agents:o,isDisconnected:s,pinnedTargetClientId:n,priorityTarget:i,status:r,studioRoutingMode:f,studioTargets:g,t:c,timeAgo:L,onCopySelector:b,onManageRouting:A}){const[y,M]=d.useState(!1),[I,B]=d.useState(!1),[E,N]=d.useState([]),p=d.useRef(null),j=d.useRef(null),w=d.useRef(new Map),_=d.useRef(new Map),u=f==="pinned"?c("connection.routing.pinned","Manual: Pinned Studio"):c("connection.routing.recentPriority","Automatic: Recent priority"),z=s?"offline":"online",C=d.useMemo(()=>y?o:o.slice(0,W),[o,y]),T=Math.max(0,o.length-C.length),v=d.useMemo(()=>I?g:g.slice(0,W),[g,I]),$=Math.max(0,g.length-v.length),Y=[t.topologyList,C.length<=1?t.topologyListCentered:""].filter(Boolean).join(" "),R=[t.topologyList,v.length<=1?t.topologyListCentered:""].filter(Boolean).join(" "),H=d.useCallback(a=>m=>{if(m){w.current.set(a,m);return}w.current.delete(a)},[]),l=d.useCallback(a=>m=>{if(m){_.current.set(a,m);return}_.current.delete(a)},[]),k=d.useCallback(()=>{const a=p.current,m=j.current;if(!a||!m){N([]);return}const x=a.getBoundingClientRect(),U=m.getBoundingClientRect(),q=[];C.forEach(P=>{const G=w.current.get(P.instanceId);G&&q.push(Do(`agent-${P.instanceId}`,G.getBoundingClientRect(),U,x))}),v.forEach(P=>{const G=_.current.get(P.clientId);G&&q.push(Oo(`studio-${P.clientId}`,G.getBoundingClientRect(),U,x))}),N(P=>Ho(P,q)?P:q)},[C,v]);return d.useLayoutEffect(()=>{k();const a=[p.current,j.current,...C.map(x=>w.current.get(x.instanceId)),...v.map(x=>_.current.get(x.clientId))].filter(x=>x!=null);if(window.addEventListener("resize",k),typeof ResizeObserver>"u")return()=>{window.removeEventListener("resize",k)};const m=new ResizeObserver(k);return a.forEach(x=>m.observe(x)),()=>{window.removeEventListener("resize",k),m.disconnect()}},[k,C,v]),e.jsxs("section",{className:`${t.topologyCard} ${s?t.topologyDisconnected:""}`,"aria-label":c("connection.topology.ariaLabel","Connection topology"),children:[e.jsxs("div",{className:t.topologyHeader,children:[e.jsxs("div",{children:[e.jsx("div",{className:t.cardHeader,children:c("connection.topology.title","Connection topology")}),e.jsx("p",{className:t.topologyIntro,children:c("connection.topology.description","AI agents and Roblox Studio windows connect through one WEPPY MCP Server.")})]}),e.jsx(se,{to:"/controls?section=studio-routing",className:t.manageLink,onClick:A,children:c("connection.routing.manage","Manage routing")})]}),e.jsxs("div",{className:t.topologyNetwork,ref:p,children:[e.jsx("svg",{"aria-hidden":"true",className:t.topologyLinks,"data-testid":"topology-connection-lines",focusable:"false",children:E.map(a=>e.jsx("line",{className:`${t.topologyLink} ${t[`topologyLink_${a.side}`]}`,"data-side":a.side,vectorEffect:"non-scaling-stroke",x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2},a.id))}),e.jsxs("div",{className:t.topologyGrid,children:[e.jsxs("div",{className:t.topologyColumn,children:[e.jsxs("div",{className:t.topologyColumnHeader,children:[e.jsx(he,{size:15,"aria-hidden":"true"}),e.jsx("span",{children:c("connection.agents.title","AI Agents")}),e.jsx("span",{className:t.topologyCount,children:o.length})]}),e.jsxs("div",{className:Y,children:[o.length>0?C.map(a=>{const m=$o(a.lastSeen),x=a.aiClientName??To(a.instanceId),U=a.lastSeen??a.lastCommandAt??a.connectedAt;return e.jsxs("div",{className:t.topologyNode,ref:H(a.instanceId),children:[e.jsxs("div",{className:t.topologyNodeTitle,children:[e.jsx("span",{className:t[`activity_${m}`]}),e.jsx("strong",{children:x}),e.jsx("span",{className:t.topologyState,children:Eo(m,c)})]}),e.jsx("div",{className:t.topologyNodeMeta,children:U?`${c("connection.topology.lastActivity","Last activity")} ${L(U)}`:c("connection.topology.noActivity","No recent activity")})]},a.instanceId)}):e.jsx("div",{className:t.topologyEmpty,children:c("connection.agents.none","No agents connected")}),o.length>W?e.jsxs("div",{className:t.topologyOverflow,children:[T>0?e.jsx("span",{children:Q(c("connection.topology.moreAgents","+{count} more agents"),T)}):e.jsx("span",{children:c("connection.topology.allAgentsVisible","All agents visible")}),e.jsx("button",{type:"button",className:t.topologyOverflowButton,"aria-label":y?c("connection.topology.showLessAgents","Show less AI agents"):c("connection.topology.showAllAgents","Show all AI agents"),onClick:()=>M(a=>!a),children:y?c("connection.topology.showLess","Show less"):c("connection.topology.showAll","Show all")})]}):null]})]}),e.jsxs("div",{className:t.topologyServerColumn,children:[e.jsx("div",{className:t.topologyColumnHeaderSpacer,"aria-hidden":"true"}),e.jsxs("div",{className:`${t.topologyNode} ${t.topologyServer}`,ref:j,children:[e.jsx("div",{className:t.topologyServerIcon,children:e.jsx(me,{size:18,"aria-hidden":"true"})}),e.jsxs("div",{className:t.topologyServerBody,children:[e.jsx("div",{className:t.topologyServerTitle,children:c("connection.topology.serverTitle","MCP Server")}),e.jsx(oe,{status:z}),e.jsxs("div",{className:t.topologyServerMeta,children:[r!=null&&r.version?`v${r.version}`:c("connection.topology.versionUnknown","Version unknown"),r!=null&&r.sessionId?` · ${c("connection.server.session","Session")} ${r.sessionId.slice(0,8)}`:""]}),e.jsx("div",{className:t.routingSummaryCompact,children:e.jsx("span",{className:t.routingBadge,children:u})})]})]})]}),e.jsxs("div",{className:t.topologyColumn,children:[e.jsxs("div",{className:t.topologyColumnHeader,children:[e.jsx(ce,{size:15,"aria-hidden":"true"}),e.jsx("span",{children:c("connection.targets.title","Studio Targets")}),e.jsx("span",{className:t.topologyCount,children:g.length})]}),e.jsxs("div",{className:R,children:[g.length>0?v.map(a=>{const m=f==="pinned"&&n===a.clientId,x=f==="recentPriority"&&(i==null?void 0:i.clientId)===a.clientId;return e.jsxs("div",{className:t.topologyNode,ref:l(a.clientId),children:[e.jsxs("div",{className:t.topologyNodeTitle,children:[e.jsx("span",{className:t.targetPrimary,children:a.targetAlias}),e.jsx(V,{text:c("connection.targets.copyTargetAlias","Copy Studio ID"),children:e.jsx("button",{type:"button",className:t.copyIconButton,"aria-label":c("connection.targets.copyTargetAlias","Copy Studio ID"),onClick:()=>b(a.targetAlias,"target_alias"),children:e.jsx(K,{size:13,"aria-hidden":"true"})})}),m?e.jsx("span",{className:t.routingBadge,children:c("connection.routing.pinnedBadge","Pinned")}):x?e.jsx("span",{className:t.routingBadge,children:c("connection.routing.priorityBadge","Priority")}):null]}),e.jsxs("div",{className:t.topologyNodeMeta,children:[e.jsx("span",{children:a.placeName??c("connection.topology.placeUnknown","Place unknown")}),a.placeId!==void 0?` · ${a.placeId}`:""]}),e.jsxs("div",{className:t.topologyNodeSubtle,children:[a.connectionState," · ",c("connection.targets.lastSeen","Last Seen")," ",L(a.lastSeen)]})]},a.clientId)}):e.jsx("div",{className:t.topologyEmpty,children:c("connection.targets.none","No Studio targets connected. Open Roblox Studio and connect WEPPY Plugin.")}),g.length>W?e.jsxs("div",{className:t.topologyOverflow,children:[$>0?e.jsx("span",{children:Q(c("connection.topology.moreStudios","+{count} more studios"),$)}):e.jsx("span",{children:c("connection.topology.allStudiosVisible","All studios visible")}),e.jsx("button",{type:"button",className:t.topologyOverflowButton,"aria-label":I?c("connection.topology.showLessStudios","Show less Studio targets"):c("connection.topology.showAllStudios","Show all Studio targets"),onClick:()=>B(a=>!a),children:I?c("connection.topology.showLess","Show less"):c("connection.topology.showAll","Show all")})]}):null]})]})]})]})]})}function F(o,s){const n=Math.max(0,Math.floor((Date.now()-o)/1e3));return n<60?`${n}${s("connection.time.secondsAgo","s ago")}`:n<3600?`${Math.floor(n/60)}${s("connection.time.minutesAgo","m ago")}`:`${Math.floor(n/3600)}${s("connection.time.hoursAgo","h ago")}`}function zo(o){return o?Date.now()-o<3e4?"active":"stale":"unknown"}function Jo(){const{t:o}=ee(),{trackEvent:s}=ie(),{status:n,connectionInfo:i,studioRouting:r,connectionLog:f,level:g,clearConnectionLog:c,killAgent:L}=Ie(),{show:b}=le(),[A,y]=d.useState(!0),[M,I]=d.useState(!1),[B,E]=d.useState(!1),[N,p]=d.useState(null),[j,w]=d.useState(!1),_=ge(n==null?void 0:n.uptime),u=g==="disconnected",z=u?"offline":"online",C=(r==null?void 0:r.studioRoutingMode)??(n==null?void 0:n.studioRoutingMode)??"recentPriority",T=(r==null?void 0:r.pinnedTargetClientId)??(n==null?void 0:n.pinnedTargetClientId)??null,v=ae((r==null?void 0:r.targets)??(n==null?void 0:n.pluginClients)??[],C,T),$=(r==null?void 0:r.priorityTarget)??v[0],Y=async()=>{if(N){w(!0);try{await L(N.instanceId),b(o("connection.agents.killed","Agent killed"),"success"),p(null)}catch{b(o("connection.agents.killFailed","Failed to kill agent"),"error")}finally{w(!1)}}},R=async()=>{E(!0);try{await c(),b(o("toast.clearSuccess","Cleared successfully"),"success"),I(!1)}catch{b(o("toast.clearFailed","Failed to clear data"),"error")}finally{E(!1)}},H=async(l,k)=>{try{await navigator.clipboard.writeText(l),b(o("connection.targets.copied","Copied value"),"success"),s("dashboard_click_event",{click_target:`connection_copy_${k}`,page:"connection"})}catch{b(o("connection.targets.copyFailed","Failed to copy value"),"error")}};return e.jsxs("div",{className:t.page,children:[e.jsx(re,{title:o("page.connection.title","Connection"),description:o("page.connection.description","Inspect MCP server, AI agent, Studio plugin, and connection log status."),helpTopicId:"connection",helpState:{connectionLevel:g}}),e.jsx(Fo,{agents:(i==null?void 0:i.mcpInstances)??[],isDisconnected:u,pinnedTargetClientId:T,priorityTarget:$,status:n??null,studioRoutingMode:C,studioTargets:v,t:o,timeAgo:l=>F(l,o),onCopySelector:H,onManageRouting:()=>s("dashboard_click_event",{click_target:"connection_manage_routing",page:"connection"})}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:o("connection.server.title","Server Status")}),u?e.jsxs("div",{className:t.disconnected,children:[e.jsx("h3",{children:o("level.l0.title")}),e.jsx("p",{children:o("level.l0.message")}),e.jsx("p",{children:o("common.reconnecting")}),e.jsxs("div",{className:t.disconnectedActions,children:[e.jsx("button",{className:t.btn,onClick:()=>window.location.reload(),children:o("connection.reconnect","Reconnect")}),e.jsx("button",{className:t.btn,onClick:()=>{window.location.hash="#/settings"},children:o("connection.checkSettings","Check Settings")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:t.statusRow,children:e.jsx(oe,{status:z})}),e.jsxs("dl",{className:t.serverGrid,children:[(n==null?void 0:n.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:o("connection.server.version","Version"),tooltip:o("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(de,{text:o("connection.server.version.tooltip","Installed MCP server version"),children:`v${n.version}`})})]}),(n==null?void 0:n.pid)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:o("connection.server.pid","PID"),tooltip:o("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("dd",{children:n.pid})]}),(n==null?void 0:n.uptime)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:o("connection.server.uptime","Uptime"),tooltip:o("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:pe(_??n.uptime)})]}),(n==null?void 0:n.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:o("connection.server.session","Session"),tooltip:o("connection.server.session.tooltip","Current MCP session identifier")})}),e.jsx("dd",{children:n.sessionId.slice(0,8)})]}),(i==null?void 0:i.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:o("connection.server.exec","Exec"),tooltip:o("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:i.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${t.card} ${u?t.disabled:""}`,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsxs("span",{children:[o("connection.agents.title","AI Agents")," ","(",(i==null?void 0:i.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:t.toggleBtn,onClick:()=>y(l=>!l),"aria-label":A?o("common.collapse","Collapse"):o("common.expand","Expand"),children:A?"▾":"▸"})]}),A&&e.jsxs("table",{className:t.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:o("connection.agents.name","Agent")}),e.jsx("th",{children:e.jsx(h,{label:o("connection.server.pid","PID"),tooltip:o("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.agents.projectRoot","Project Root"),tooltip:o("connection.agents.projectRoot.tooltip","Authoritative project root for sync ownership")})}),e.jsx("th",{children:o("connection.agents.connected","Connected")}),e.jsx("th",{children:e.jsx(h,{label:o("connection.agents.lastSeen","Last Seen"),tooltip:o("connection.agents.lastSeen.tooltip","Most recent heartbeat or activity from this agent")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.agents.lastCommand","Last Command"),tooltip:o("connection.agents.lastCommand.tooltip","Most recent tool call executed by this agent")})}),e.jsx("th",{})]})}),e.jsx("tbody",{children:i!=null&&i.mcpInstances&&i.mcpInstances.length>0?i.mcpInstances.map(l=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:t[`activity_${zo(l.lastSeen)}`]}),l.aiClientName??o("connection.agents.unknown","Unknown")]}),e.jsx("td",{children:l.pid}),e.jsx("td",{children:l.projectRoot??l.cwd??o("connection.agents.projectRoot.unresolved","Unresolved")}),e.jsx("td",{children:F(l.connectedAt,o)}),e.jsx("td",{children:l.lastSeen?F(l.lastSeen,o):"-"}),e.jsx("td",{children:l.lastCommandAt?F(l.lastCommandAt,o):"-"}),e.jsx("td",{children:!l.isServer&&e.jsx("button",{className:t.killBtn,onClick:()=>{s("dashboard_click_event",{click_target:"connection_kill_agent",page:"connection"}),p({instanceId:l.instanceId,name:l.aiClientName??l.instanceId.slice(0,8)})},children:o("connection.agents.kill","Kill")})})]},l.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:t.emptyRow,children:o("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${t.card} ${u?t.disabled:""}`,children:[e.jsxs("div",{className:t.cardHeader,children:[o("connection.targets.title","Studio Targets")," ","(",v.length,")"]}),e.jsx("p",{className:t.cardHint,children:o("connection.targets.help","When multiple Studio windows are connected, tell the agent to use Studio ID studio-1 to choose one.")}),e.jsx("div",{className:t.tableWrap,children:e.jsxs("table",{className:t.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.target","Studio ID"),tooltip:o("connection.targets.target.tooltip","Short name for this Roblox Studio window")})}),e.jsx("th",{children:o("connection.targets.place","Place")}),e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.placeId","Place ID"),tooltip:o("connection.targets.placeId.tooltip","Roblox Place ID for this Studio window")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.clientId","Connection ID"),tooltip:o("connection.targets.clientId.tooltip","Full connection ID for diagnostics. Usually use Studio ID instead.")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.session","Session"),tooltip:o("connection.targets.session.tooltip","Command channel state for this Studio target")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.lastUsed","Last Used"),tooltip:o("connection.targets.lastUsed.tooltip","Most recent plugin-route request routed to this Studio target")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.lastSeen","Last Seen"),tooltip:o("connection.targets.lastSeen.tooltip","Most recent heartbeat received from this Studio target")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.version","Version"),tooltip:o("connection.targets.version.tooltip","Installed plugin version reported by Studio")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.routing","Routing"),tooltip:o("connection.targets.routing.tooltip","Routing priority for requests without a named Studio target")})}),e.jsx("th",{children:e.jsx(h,{label:o("connection.targets.inFlight","In Flight"),tooltip:o("connection.targets.inFlight.tooltip","Active command request currently routed to this Studio target")})})]})}),e.jsx("tbody",{children:v.length>0?v.map(l=>{const k=l.clientId.slice(0,10);return e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:t.monoMuted,title:l.clientId,children:l.targetAlias}),e.jsx(V,{text:o("connection.targets.copyTargetAlias","Copy Studio ID"),children:e.jsx("button",{type:"button",className:t.copyIconButton,"aria-label":o("connection.targets.copyTargetAlias","Copy Studio ID"),onClick:()=>H(l.targetAlias,"target_alias"),children:e.jsx(K,{size:13,"aria-hidden":"true"})})})]}),e.jsx("td",{children:e.jsx("span",{className:t.targetPrimary,children:l.placeName??"-"})}),e.jsxs("td",{children:[l.placeId??"-",l.placeId!==void 0?e.jsx(V,{text:o("connection.targets.copyPlaceId","Copy Place ID"),children:e.jsx("button",{type:"button",className:t.copyIconButton,"aria-label":o("connection.targets.copyPlaceId","Copy Place ID"),onClick:()=>H(String(l.placeId),"place_id"),children:e.jsx(K,{size:13,"aria-hidden":"true"})})}):null]}),e.jsxs("td",{children:[e.jsx("span",{className:t.monoMuted,title:l.clientId,children:k}),e.jsx(V,{text:o("connection.targets.copyClientId","Copy Connection ID"),children:e.jsx("button",{type:"button",className:t.copyIconButton,"aria-label":o("connection.targets.copyClientId","Copy Connection ID"),onClick:()=>H(l.clientId,"client_id"),children:e.jsx(K,{size:13,"aria-hidden":"true"})})})]}),e.jsx("td",{children:l.connectionState}),e.jsx("td",{children:l.lastRoutedAt?F(l.lastRoutedAt,o):"-"}),e.jsx("td",{children:F(l.lastSeen,o)}),e.jsx("td",{children:l.pluginVersion??"-"}),e.jsx("td",{children:C==="pinned"&&T===l.clientId?e.jsx("span",{className:t.routingBadge,children:o("connection.routing.pinnedBadge","Pinned")}):C==="recentPriority"&&($==null?void 0:$.clientId)===l.clientId?e.jsx("span",{className:t.routingBadge,children:o("connection.routing.priorityBadge","Priority")}):e.jsx("span",{className:t.monoMuted,children:"-"})}),e.jsx("td",{children:l.inFlightRequestId?l.inFlightRequestId.slice(0,8):"-"})]},l.clientId)}):e.jsx("tr",{children:e.jsx("td",{colSpan:9,className:t.emptyRow,children:o("connection.targets.none","No Studio targets connected. Open Roblox Studio and connect WEPPY Plugin.")})})})]})})]}),e.jsxs("div",{className:`${t.card} ${u?t.disabled:""}`,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx("span",{children:o("connection.log.title","Connection Log")}),e.jsx("button",{className:t.clearButton,onClick:()=>{s("dashboard_click_event",{click_target:"connection_clear_log",page:"connection"}),I(!0)},children:o("common.clear","Clear")})]}),e.jsx(Ne,{entries:f})]}),e.jsx(X,{open:M,title:o("connection.clear.title","Clear connection log?"),message:o("connection.clear.message","This permanently removes the stored connection log for the current project."),cancelLabel:o("common.cancel","Cancel"),confirmLabel:o("common.clear","Clear"),loading:B,onCancel:()=>!B&&I(!1),onConfirm:R}),e.jsx(X,{open:!!N,title:o("connection.agents.kill.title","Kill agent?"),message:`"${N==null?void 0:N.name}" 프로세스를 강제 종료합니다. 해당 에이전트의 진행 중인 작업이 중단됩니다.`,cancelLabel:o("common.cancel","Cancel"),confirmLabel:o("connection.agents.kill","Kill"),loading:j,onCancel:()=>!j&&p(null),onConfirm:Y})]})}export{Jo as Component};
@@ -1 +0,0 @@
1
- ._container_1h084_2{max-height:200px;overflow-y:auto;font-family:var(--font-code);font-size:12px;line-height:1.6;padding:8px 12px;background:var(--bg-secondary);border-radius:4px}._entry_1h084_14{display:flex;gap:8px;white-space:nowrap}._timestamp_1h084_21{color:var(--text-muted);flex-shrink:0}._message_1h084_27{color:var(--text-primary);overflow:hidden;text-overflow:ellipsis}._warn_1h084_34 ._message_1h084_27{color:var(--warning)}._error_1h084_39 ._message_1h084_27{color:var(--error)}._empty_1h084_44{color:var(--text-muted);font-style:italic;padding:8px 0}._page_17f6d_2{display:flex;flex-direction:column;gap:16px;width:100%;max-width:1180px}._card_17f6d_11{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._topologyCard_17f6d_19{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:18px 20px 20px}._topologyDisconnected_17f6d_26{border-color:var(--error-border)}._topologyHeader_17f6d_30{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}._topologyIntro_17f6d_38{margin:-6px 0 0;color:var(--text-secondary);font-size:13px;line-height:1.5}._topologyNetwork_17f6d_45{position:relative}._topologyLinks_17f6d_49{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:100%;height:100%;pointer-events:none;overflow:visible}._topologyLink_17f6d_49{stroke:color-mix(in srgb,var(--accent) 62%,var(--border));stroke-linecap:round;stroke-width:1.5;opacity:.82}._topologyLink_agent_17f6d_66{stroke:color-mix(in srgb,var(--accent) 58%,var(--border))}._topologyLink_studio_17f6d_70{stroke:color-mix(in srgb,var(--accent) 66%,var(--border))}._topologyGrid_17f6d_74{position:relative;z-index:1;display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,.82fr) minmax(240px,1.18fr);align-items:start;gap:52px}._topologyColumn_17f6d_83{min-width:0;display:flex;flex-direction:column;gap:10px}._topologyColumnHeader_17f6d_90{display:flex;align-items:center;gap:8px;min-height:28px;color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:700}._topologyColumnHeaderSpacer_17f6d_101{min-height:28px}._topologyCount_17f6d_105{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 6px;border-radius:var(--radius-pill);background:var(--bg-secondary);border:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-code);font-size:11px}._topologyList_17f6d_120{display:flex;flex-direction:column;gap:8px;justify-content:flex-start;min-height:178px}._topologyListCentered_17f6d_128{justify-content:center}._topologyNode_17f6d_132{min-width:0;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);padding:10px 12px}._topologyNodeTitle_17f6d_140{display:flex;align-items:center;min-width:0;gap:8px;color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600}._topologyNodeTitle_17f6d_140 strong,._topologyNodeTitle_17f6d_140 span{min-width:0}._topologyNodeMeta_17f6d_156,._topologyNodeSubtle_17f6d_157{margin-top:6px;color:var(--text-secondary);font-family:var(--font-code);font-size:11px;line-height:1.4;overflow-wrap:anywhere}._topologyNodeSubtle_17f6d_157{color:var(--text-muted)}._topologyState_17f6d_170{margin-left:auto;flex:0 0 auto;border:1px solid var(--border);border-radius:var(--radius-pill);padding:2px 7px;background:color-mix(in srgb,var(--bg-card) 76%,transparent);color:var(--text-secondary);font-family:var(--font-label);font-size:10px;font-weight:600}._topologyEmpty_17f6d_183{min-height:82px;display:flex;align-items:center;justify-content:center;border:1px dashed var(--border);border-radius:8px;color:var(--text-muted);background:color-mix(in srgb,var(--bg-secondary) 58%,transparent);padding:12px;text-align:center;font-size:12px;line-height:1.45}._topologyOverflow_17f6d_198{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;padding:6px 8px 6px 12px;border:1px solid var(--border);border-radius:7px;background:color-mix(in srgb,var(--bg-card) 72%,transparent);color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._topologyOverflowButton_17f6d_213{flex:0 0 auto;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;font-family:var(--font-label);font-size:11px;font-weight:600;padding:4px 8px;transition:background var(--transition),border-color var(--transition),color var(--transition)}._topologyOverflowButton_17f6d_213:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent)}._topologyServerColumn_17f6d_236{min-width:0;display:flex;flex-direction:column;gap:10px}._topologyServer_17f6d_236{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:178px;border-color:color-mix(in srgb,var(--accent) 42%,var(--border));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 16%,transparent)}._topologyServerIcon_17f6d_254{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid var(--border-highlight);border-radius:50%;background:var(--accent-dim);color:var(--accent);margin-bottom:10px}._topologyServerBody_17f6d_267{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;width:100%}._topologyServerTitle_17f6d_276{color:var(--text-primary);font-family:var(--font-label);font-size:15px;font-weight:700}._topologyServerMeta_17f6d_283{color:var(--text-secondary);font-family:var(--font-code);font-size:11px;overflow-wrap:anywhere}._routingSummaryCompact_17f6d_290{display:flex;justify-content:center;width:100%;min-width:0}._disabled_17f6d_298{opacity:.4;pointer-events:none}._cardHeader_17f6d_304{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}._cardHint_17f6d_317{margin:-4px 0 12px;color:var(--text-muted);font-size:12px;line-height:1.5}._clearButton_17f6d_324{border:1px solid var(--error-border);background:var(--error-bg);color:var(--error-text);border-radius:var(--radius-sm);padding:6px 12px;cursor:pointer}._serverGrid_17f6d_334{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-family:var(--font-code);font-size:13px}._serverGrid_17f6d_334 dt{color:var(--text-muted)}._serverGrid_17f6d_334 dd{color:var(--text-primary);margin:0}._statusRow_17f6d_352{display:flex;align-items:center;gap:16px;margin-bottom:12px}._metaItem_17f6d_359{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._table_17f6d_366{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_17f6d_366 th{text-align:left;color:var(--text-muted);font-weight:400;padding:4px 8px 4px 0;border-bottom:1px solid var(--border)}._table_17f6d_366 td{padding:6px 8px 6px 0;color:var(--text-primary)}._tableWrap_17f6d_386{overflow-x:auto}._table_17f6d_366 tr:hover td{background:var(--accent-dim)}._routingSummary_17f6d_290{display:inline-flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}._manageLink_17f6d_402{display:inline-flex;align-items:center;height:24px;padding:0 8px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:11px;font-weight:600;text-decoration:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._manageLink_17f6d_402:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent);text-decoration:none}._segment_17f6d_428,._segmentActive_17f6d_429{height:28px;padding:0 10px;border:none;border-right:1px solid var(--border);background:transparent;color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer}._segment_17f6d_428:last-child,._segmentActive_17f6d_429:last-child{border-right:none}._segment_17f6d_428:hover:not(:disabled){background:var(--accent-dim);color:var(--accent)}._segmentActive_17f6d_429{background:var(--accent-dim);color:var(--text-primary);font-weight:600}._segment_17f6d_428:disabled,._segmentActive_17f6d_429:disabled{cursor:default;opacity:.55}._targetPrimary_17f6d_463{white-space:nowrap}._monoMuted_17f6d_467{color:var(--text-secondary)}._copyIconButton_17f6d_471{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-left:6px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer;vertical-align:middle;transition:border-color var(--transition),background var(--transition),color var(--transition)}._copyIconButton_17f6d_471:hover{color:var(--accent);border-color:var(--border-highlight);background:var(--accent-dim)}._routingBadge_17f6d_496{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border:1px solid var(--border-highlight);border-radius:var(--radius-sm);background:var(--accent-dim);color:var(--text-primary);font-family:var(--font-label);font-size:11px;font-weight:600}._toggleBtn_17f6d_511{background:none;border:none;color:var(--text-secondary);cursor:pointer;font-size:12px;padding:0 4px;transition:color var(--transition)}._toggleBtn_17f6d_511:hover{color:var(--accent)}._disconnected_17f6d_526{text-align:center;padding:32px 16px}._disconnected_17f6d_526 h3{color:var(--error);font-size:16px;margin:0 0 8px}._disconnected_17f6d_526 p{color:var(--text-secondary);font-size:13px;margin:0 0 4px}._disconnectedActions_17f6d_543{display:flex;gap:8px;justify-content:center;margin-top:16px}._btn_17f6d_550{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_17f6d_550:hover{border-color:var(--accent);background:var(--accent-dim)}._activity_active_17f6d_568,._activity_stale_17f6d_569,._activity_unknown_17f6d_570{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:middle}._activity_active_17f6d_568{background:var(--success);box-shadow:0 0 4px var(--success)}._activity_stale_17f6d_569{background:var(--text-muted)}._activity_unknown_17f6d_570{background:var(--text-muted);opacity:.4}._killBtn_17f6d_594{font-family:var(--font-label);font-size:11px;padding:3px 10px;border-radius:var(--radius-sm);border:1px solid var(--error-border);background:var(--error-bg);color:var(--error-text);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._killBtn_17f6d_594:hover{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text);filter:brightness(1.15)}._emptyRow_17f6d_614{color:var(--text-muted);font-style:italic}@media(max-width:980px){._topologyHeader_17f6d_30{flex-direction:column;align-items:stretch}._topologyGrid_17f6d_74{grid-template-columns:1fr;gap:10px}._topologyColumnHeaderSpacer_17f6d_101{display:none}._topologyServer_17f6d_236{min-height:150px}}@media(max-width:640px){._card_17f6d_11,._topologyCard_17f6d_19{padding:14px}._topologyNodeTitle_17f6d_140{flex-wrap:wrap}._topologyState_17f6d_170{margin-left:0}}
@@ -1 +0,0 @@
1
- import{u as _,r as b,j as a,g as h}from"./index-CJJYSnlB.js";const m="_scope_120mz_1",x="_main_120mz_13",j="_label_120mz_20",I="_selectorLabel_120mz_28",L="_placeSelect_120mz_35",z="_name_120mz_48",A="_id_120mz_59",w="_badgeLive_120mz_66",k="_badgeMuted_120mz_67",y="_copy_120mz_86",E="_note_120mz_98",n={scope:m,main:x,label:j,selectorLabel:I,placeSelect:L,name:z,id:A,badgeLive:w,badgeMuted:k,copy:y,note:E};function d(e,l){return l===null?null:e.places.find(c=>c.placeId===l)??null}function S(e){var l;return e.lastActivePlaceId!==null?e.lastActivePlaceId:((l=e.places[0])==null?void 0:l.placeId)??null}function M(e){return e.pluginConnected&&e.activePlaceId!==null?e.activePlaceId:S(e)}function U(e,l){if(e.pluginConnected&&e.activePlaceId!==null){const t=d(e,e.activePlaceId);return{label:l("placeScope.current.label","Current Place"),placeId:e.activePlaceId,placeName:e.activePlaceName??(t==null?void 0:t.placeName)??l("placeScope.unknownPlace","Unknown place"),badge:l("placeScope.live","Live"),live:!0,note:null}}const c=S(e),s=d(e,c);if(c!==null){const t=c===e.lastActivePlaceId?e.lastActivePlaceName:null;return{label:l("placeScope.lastActive.label","Last Active Place"),placeId:c,placeName:t??(s==null?void 0:s.placeName)??l("placeScope.unknownPlace","Unknown place"),badge:l("placeScope.pluginRequired","Plugin required"),live:!1,note:l("placeScope.pluginRequired.note","Connect WEPPY Plugin to confirm the live active place.")}}return{label:l("placeScope.noPlace.label","Place scope"),placeId:null,placeName:l("placeScope.noPlace.value","No place data available yet"),badge:l("placeScope.noPlace.badge","No place"),live:!1,note:l("placeScope.noPlace.note","Connect WEPPY Plugin and sync a place to create place-scoped data.")}}function q(e,l,c){const s=typeof l=="number"?d(e,l):null,t=M(e),o=(s==null?void 0:s.placeId)??t,r=d(e,o);if(o===null)return{label:c("placeScope.noPlace.label","Place scope"),placeId:null,placeName:c("placeScope.noPlace.value","No place data available yet"),badge:c("placeScope.noPlace.badge","No place"),live:!1,note:c("placeScope.noPlace.note","Connect WEPPY Plugin and sync a place to create place-scoped data.")};const u=e.pluginConnected&&e.activePlaceId===o,f=o===e.lastActivePlaceId?e.lastActivePlaceName:null;return{label:u?c("placeScope.current.label","Current Place"):c("placeScope.selected.label","Selected Place"),placeId:o,placeName:(r==null?void 0:r.placeName)??f??c("placeScope.unknownPlace","Unknown place"),badge:u?c("placeScope.live","Live"):c("placeScope.stored","Stored"),live:u,note:u?null:c("placeScope.selected.note","Showing stored data only. Studio routing is unchanged.")}}function F(e,l){switch(e){case"sync":return l("placeScope.surface.sync","Sync status and logs use this place.");case"changelog":return l("placeScope.surface.changelog","Changelog sessions use this place.");case"playtest":return l("placeScope.surface.playtest","Playtest reports use this place.");case"uiStudio":return l("placeScope.surface.uiStudio","UI captures and change history use this place.");case"tools":return l("placeScope.surface.tools","Tool history and statistics use this place.")}}function T({surface:e,selectable:l=!1,selectedPlaceId:c=null,onSelectedPlaceIdChange:s}){const{t}=_(),[o,r]=b.useState(null),[u,f]=b.useState(!0);if(b.useEffect(()=>{let i=!1;async function v(){try{const P=await h();i||r(P)}catch{i||r(null)}finally{i||f(!1)}}return v(),()=>{i=!0}},[]),b.useEffect(()=>{!l||!o||typeof c!="number"||d(o,c)||s==null||s(null)},[s,l,c,o]),u)return a.jsx("div",{className:n.scope,"aria-live":"polite",children:a.jsx("span",{className:n.label,children:t("placeScope.loading","Loading place scope...")})});if(!o)return a.jsx("div",{className:n.scope,"aria-live":"polite",children:a.jsx("span",{className:n.label,children:t("placeScope.unavailable","Place scope unavailable")})});const p=l?q(o,c,t):U(o,t),g=typeof p.placeId=="number"?String(p.placeId):"",N=l&&o.places.length>0;return a.jsxs("div",{className:n.scope,"aria-live":"polite",children:[a.jsxs("div",{className:n.main,children:[N?a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:n.selectorLabel,children:[a.jsx("span",{className:n.label,children:t("placeScope.selector.label","Place data")}),a.jsx("select",{className:n.placeSelect,value:g,onChange:i=>{const v=Number.parseInt(i.currentTarget.value,10);s==null||s(Number.isInteger(v)?v:null)},children:o.places.map(i=>a.jsxs("option",{value:i.placeId,children:[i.placeName," (",i.placeId,")"]},i.placeId))})]}),a.jsx("span",{className:n.label,children:p.label}),a.jsx("span",{className:n.name,children:p.placeName})]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:n.label,children:p.label}),a.jsx("span",{className:n.name,children:p.placeName})]}),p.placeId!==null?a.jsx("span",{className:n.id,children:p.placeId}):null,a.jsx("span",{className:p.live?n.badgeLive:n.badgeMuted,children:p.badge})]}),a.jsxs("div",{className:n.copy,children:[a.jsx("span",{children:F(e,t)}),p.note?a.jsx("span",{className:n.note,children:p.note}):null]})]})}export{T as C};
@@ -1 +0,0 @@
1
- ._scope_120mz_1{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:9px 12px;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary)}._main_120mz_13{display:flex;align-items:center;gap:8px;min-width:0}._label_120mz_20{flex:0 0 auto;color:var(--text-secondary);font-family:var(--font-label);font-size:11px;font-weight:600}._selectorLabel_120mz_28{display:flex;align-items:center;gap:8px;min-width:0}._placeSelect_120mz_35{min-width:180px;max-width:280px;height:30px;padding:0 28px 0 10px;border:1px solid var(--border);border-radius:6px;background:var(--bg-primary);color:var(--text-primary);font:inherit;font-size:12px}._name_120mz_48{min-width:0;color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._id_120mz_59{flex:0 0 auto;color:var(--text-muted);font-family:var(--font-code);font-size:11px}._badgeLive_120mz_66,._badgeMuted_120mz_67{flex:0 0 auto;padding:2px 7px;border-radius:999px;font-family:var(--font-label);font-size:10px;font-weight:600}._badgeLive_120mz_66{background:var(--success-bg);color:var(--success)}._badgeMuted_120mz_67{background:var(--warning-bg);color:var(--warning)}._copy_120mz_86{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--text-secondary);font-size:12px;line-height:1.4;text-align:right}._note_120mz_98{color:var(--text-muted)}@media(max-width:720px){._scope_120mz_1{align-items:flex-start;flex-direction:column}._copy_120mz_86{align-items:flex-start;flex-direction:column;text-align:left}._selectorLabel_120mz_28{width:100%}._placeSelect_120mz_35{flex:1 1 auto;min-width:0;max-width:none}}
@@ -1 +0,0 @@
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}}
@@ -1,6 +0,0 @@
1
- import{i as z,u as J,e as Q,r as p,j as t,X as V,E as Z,J as ee}from"./index-CJJYSnlB.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 te=[["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"}]],oe=z("circle-question-mark",te),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"}},ne="https://create.roblox.com/docs/cloud/auth/api-keys",se="https://create.roblox.com/docs/cloud/guides/usage-assets",ae="https://create.roblox.com/docs/cloud/reference/features/assets",re="https://create.roblox.com/docs/reference/engine/classes/DataModel#CreatorId",le="https://create.roblox.com/docs/reference/engine/classes/Player#UserId",ie="https://create.roblox.com/docs/projects/groups",ce="https://create.roblox.com/docs/cloud/reference/features/groups";function g(e,s,n,h){return{id:e,title:{key:`dashboardHelp.${e}.title`,fallback:s},sections:n,links:h}}function l(e,s,n,h){return{heading:e,items:h.map((i,P)=>({key:`dashboardHelp.${s}.${n}.${P+1}`,fallback:i}))}}function r(e,s,n){return{heading:a.currentState,items:[{key:`dashboardHelp.${e}.currentState.${s}`,fallback:n}]}}function m(e,s,n,h,i,P){return g(e,s,[l(a.canDo,e,"canDo",n),l(a.needs,e,"needs",h),l(a.currentState,e,"currentState",i)],P)}function de(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 ue(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 pe(e,s={}){return e==="openCloudApiKey"?g(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:ne},{label:{key:"dashboardHelp.openCloudApiKey.link.assetsGuide",fallback:"Assets API usage guide"},href:se},{label:{key:"dashboardHelp.openCloudApiKey.link.assetsReference",fallback:"Assets API reference"},href:ae}]):e==="openCloudCreatorId"?g(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:re},{label:{key:"dashboardHelp.openCloudCreatorId.link.userId",fallback:"User ID reference"},href:le},{label:{key:"dashboardHelp.openCloudCreatorId.link.groups",fallback:"Roblox groups"},href:ie},{label:{key:"dashboardHelp.openCloudCreatorId.link.groupsApi",fallback:"Groups Cloud API"},href:ce}]):{overview:g("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:m("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:g("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."]),ue(s)]),assets:g("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."]),de(s)]),changelog:m("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:g("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:g("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:m("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 Controls > General Settings and confirm history/statistics are enabled. Expand failed rows to inspect input, permission, or connection causes."]),controls:m("controls","Controls help",["Manage Project Root, Studio routing, and MCP hot settings."],["Project Root and Studio Routing need MCP server connection. Hot settings need a server response. Asset upload controls live in Assets settings."],["Use Project Root only when MCP should write sync data under a different project folder. Use Studio Routing only for requests where the agent does not name Studio ID, Connection ID, or Place ID."]),settings:m("settings","Settings help",["Manage License, 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:m("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 he="_root_rxppj_1",fe="_rootPage_rxppj_7",ge="_rootField_rxppj_11",ye="_button_rxppj_15",be="_panel_rxppj_50",ve="_panelField_rxppj_65",me="_panelPage_rxppj_69",Pe="_panelHeader_rxppj_73",ke="_closeButton_rxppj_91",_e="_sectionStack_rxppj_112",we="_helpSection_rxppj_117",Ce="_linkList_rxppj_118",c={root:he,rootPage:fe,rootField:ge,button:ye,panel:be,panelField:ve,panelPage:me,panelHeader:Pe,closeButton:ke,sectionStack:_e,helpSection:we,linkList:Ce},y=12,A=8,xe=120,Ae=360,Ee=340,Y=560;function Re({topicId:e,state:s,variant:n="page",className:h}){const{t:i}=J(),{trackEvent:P}=Q(),[f,w]=p.useState(!1),[C,D]=p.useState(null),j=p.useId(),M=p.useRef(null),U=p.useRef(null),R=p.useRef(null),b=pe(e,s),I=i(b.title.key,b.title.fallback),x=p.useCallback(()=>{const o=U.current,d=R.current;if(!o||!d||typeof window>"u")return;const u=o.getBoundingClientRect(),v=d.getBoundingClientRect(),k=window.innerWidth,_=window.innerHeight,q=n==="field"?Ee:Ae,N=v.width||Math.min(q,k-y*2),B=v.height||Y;let S=n==="field"?u.left:u.right-N;S=Math.max(y,Math.min(S,k-N-y));const L=_-u.bottom-A-y,W=u.top-A-y,T=L<Math.min(B,220)&&W>L,$=Math.max(xe,T?W:L),G=Math.min(Y,$),F=Math.min(B,G);let H=T?u.top-A-F:u.bottom+A;H=Math.max(y,Math.min(H,_-F-y)),D({top:Math.round(H),left:Math.round(S),maxHeight:Math.round(G)})},[n]);p.useLayoutEffect(()=>{f?x():D(null)},[f,x]),p.useEffect(()=>{if(!f)return;const o=u=>{var k,_;const v=u.target;v&&!((k=M.current)!=null&&k.contains(v))&&!((_=R.current)!=null&&_.contains(v))&&w(!1)},d=u=>{u.key==="Escape"&&w(!1)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",d)}},[f]),p.useEffect(()=>{if(!f)return;const o=()=>x();return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[f,x]);const K=n==="field"?i("dashboardHelp.fieldButton.ariaLabel","Open field help"):i("dashboardHelp.pageButton.ariaLabel","Open page help"),X=C?{top:C.top,left:C.left,maxHeight:C.maxHeight}:{top:-9999,left:-9999,visibility:"hidden"},O=f?t.jsxs("section",{ref:R,id:j,className:[c.panel,n==="field"?c.panelField:c.panelPage].filter(Boolean).join(" "),style:X,role:"dialog","aria-label":I,"data-panel-placement":"help-portal",children:[t.jsxs("div",{className:c.panelHeader,children:[t.jsx("h2",{children:I}),t.jsx("button",{type:"button",className:c.closeButton,"aria-label":i("common.close","Close"),onClick:()=>w(!1),children:t.jsx(V,{size:15,"aria-hidden":"true"})})]}),t.jsx("div",{className:c.sectionStack,children:b.sections.map(o=>t.jsxs("section",{className:c.helpSection,children:[t.jsx("h3",{children:i(o.heading.key,o.heading.fallback)}),t.jsx("ul",{children:o.items.map(d=>t.jsx("li",{children:i(d.key,d.fallback)},d.key))})]},o.heading.key))}),b.links&&b.links.length>0&&t.jsxs("div",{className:c.linkList,children:[t.jsx("h3",{children:i("dashboardHelp.section.links","Related links")}),b.links.map(o=>t.jsxs("a",{href:o.href,target:"_blank",rel:"noreferrer",children:[i(o.label.key,o.label.fallback),t.jsx(Z,{size:12,"aria-hidden":"true"})]},o.href))]})]}):null;return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:M,className:[c.root,n==="field"?c.rootField:c.rootPage,h??""].filter(Boolean).join(" "),children:t.jsxs("button",{ref:U,type:"button",className:c.button,"aria-label":`${K}: ${I}`,"aria-expanded":f,"aria-controls":j,onClick:()=>{w(o=>{const d=!o;return o||P("dashboard_click_event",{click_target:"dashboard_help_open",help_topic:e,placement:n}),d})},children:[t.jsx(oe,{size:n==="field"?14:16,"aria-hidden":"true"}),n==="page"&&t.jsx("span",{children:i("dashboardHelp.button","Help")})]})}),O&&typeof document<"u"?ee.createPortal(O,document.body):null]})}const Ie="_pageHeader_qym7v_1",Se="_copy_qym7v_9",Le="_titleLine_qym7v_16",He="_actions_qym7v_39",E={pageHeader:Ie,copy:Se,titleLine:Le,actions:He};function je({title:e,description:s,badge:n,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}),n]}),t.jsx("p",{children:s})]}),t.jsx("div",{className:E.actions,children:t.jsx(Re,{topicId:h,state:i})})]})}export{Re as D,je as P};
@@ -1,11 +0,0 @@
1
- import{r as o,a as v,u as N,j as t,e as H,h as D,l as E,T as $}from"./index-CJJYSnlB.js";import{P as U}from"./PageHeader-DwlcGnaB.js";import{I as R}from"./InfoLabel-DwsCwdUw.js";import{C as O}from"./CurrentPlaceScope-BOfr5n7U.js";import{T as S}from"./TooltipText-LAwR8aaI.js";import{C as F}from"./ConfirmModal-knJOxPTQ.js";import"./ConfirmModal.module-NrFlfTWy.js";const V=5e3;function B(e){if(typeof e=="number")return{placeId:String(e)}}function W(e,r){return typeof r!="number"?e:`${e}?placeId=${encodeURIComponent(String(r))}`}function z(e){const r=(e==null?void 0:e.enabled)??!0,n=(e==null?void 0:e.placeId)??null,[l,a]=o.useState([]),[p,i]=o.useState(null),[d,c]=o.useState(r),m=o.useRef(null),u=o.useCallback(async()=>{try{const y=B(n),x=y?await v.get("/api/dashboard/playtest/history",y):await v.get("/api/dashboard/playtest/history");a(x.entries??[])}catch{}},[n]),h=o.useCallback(async()=>{if(!r){c(!1);return}await u(),c(!1)},[r,u]),g=o.useCallback(async()=>{r&&(await v.post(W("/api/dashboard/playtest/history/clear",n)),a([]),i(null))},[r,n]);o.useEffect(()=>{i(null)},[n]);const f=o.useCallback(async y=>{if(r)try{const x=B(n),w=x?await v.get(`/api/dashboard/playtest/report/${y}`,x):await v.get(`/api/dashboard/playtest/report/${y}`);i(w)}catch{i(null)}},[r,n]);return o.useEffect(()=>{if(!r){c(!1);return}return h(),m.current=setInterval(h,V),()=>{m.current&&clearInterval(m.current)}},[r,h]),{history:l,selectedReport:p,loading:d,loadReport:f,clearHistory:g}}function G(e){const r="2026-03-27T15:26:00.000Z",n={testScenario:e("playtest.sample.context.why","Spawn into the arena, survive the opener, and verify the HUD responds immediately."),expectedBehavior:e("playtest.sample.context.expected","The player spawns safely, the countdown UI appears within one second, and the first wave starts without errors."),observedBehavior:e("playtest.sample.context.observed","Spawn protection held, the HUD updated on time, and wave one completed with no gameplay regressions.")};return{history:[{timestamp:r,testName:e("playtest.sample.history.name","Sample Arena Smoke Test"),mode:"play",status:"passed",durationMs:4820,contextId:"sample_playtest_preview",contextSummary:n}],report:{markdown:e("playtest.sample.report.markdown",`# Sample Arena Smoke Test
2
-
3
- - Spawn flow: PASS
4
- - HUD countdown: PASS
5
- - Wave bootstrap: PASS
6
-
7
- This is a sample preview. Live playtests and real reports are available with Pro.`),logs:e("playtest.sample.report.logs",`[sample] boot playtest preview
8
- [sample] spawn protection active
9
- [sample] hud countdown rendered
10
- [sample] wave one completed
11
- [sample] preview report finished`),contextId:"sample_playtest_preview",contextSummary:n}}}const Q="_page_3lq3l_2",Y="_sampleBanner_3lq3l_9",Z="_sampleBannerRow_3lq3l_21",J="_sampleBannerMain_3lq3l_28",K="_sampleBadge_3lq3l_35",X="_sampleTitle_3lq3l_50",ee="_sampleMessage_3lq3l_57",te="_sampleActions_3lq3l_64",se="_primaryAction_3lq3l_72",ae="_secondaryAction_3lq3l_73",re="_card_3lq3l_109",ne="_cardHeader_3lq3l_116",le="_clearButton_3lq3l_128",oe="_statusRow_3lq3l_143",ie="_statusIndicator_3lq3l_150",ce="_statusRunning_3lq3l_158",de="_statusPaused_3lq3l_163",pe="_statusNotRunning_3lq3l_167",me="_statusLabel_3lq3l_171",ue="_statusMeta_3lq3l_178",he="_controlButtons_3lq3l_184",ye="_btn_3lq3l_191",_e="_btnPrimary_3lq3l_213",xe="_btnDanger_3lq3l_223",ge="_historyList_3lq3l_233",ve="_historyItem_3lq3l_241",Se="_historyItemSelected_3lq3l_260",fe="_historyItemHeader_3lq3l_265",be="_historyIcon_3lq3l_271",je="_historyTimestamp_3lq3l_276",we="_historyName_3lq3l_283",Ne="_historyItemMeta_3lq3l_293",Ce="_historyMode_3lq3l_302",qe="_historyDuration_3lq3l_306",Ie="_historyStatus_3lq3l_310",Le="_status_passed_3lq3l_317",Pe="_status_failed_3lq3l_321",Re="_status_running_3lq3l_325",Be="_historyError_3lq3l_329",Te="_historyContext_3lq3l_339",Me="_historyContextLine_3lq3l_348",ke="_historyContextLabel_3lq3l_354",Ae="_reportContainer_3lq3l_363",He="_reportContextPanel_3lq3l_369",De="_reportContextRow_3lq3l_379",Ee="_reportContextLabel_3lq3l_387",$e="_reportSection_3lq3l_395",Ue="_reportSectionHeader_3lq3l_401",Oe="_reportMarkdown_3lq3l_413",Fe="_reportLogs_3lq3l_426",Ve="_emptyState_3lq3l_441",We="_emptyStateTitle_3lq3l_448",ze="_emptyStateMessage_3lq3l_456",Ge="_upgradePanel_3lq3l_465",Qe="_upgradePanelIcon_3lq3l_473",Ye="_upgradePanelTitle_3lq3l_478",Ze="_upgradePanelDesc_3lq3l_486",Je="_benefitList_3lq3l_496",Ke="_benefitItem_3lq3l_507",Xe="_upgradeActions_3lq3l_522",s={page:Q,sampleBanner:Y,sampleBannerRow:Z,sampleBannerMain:J,sampleBadge:K,sampleTitle:X,sampleMessage:ee,sampleActions:te,primaryAction:se,secondaryAction:ae,card:re,cardHeader:ne,clearButton:le,statusRow:oe,statusIndicator:ie,statusRunning:ce,statusPaused:de,statusNotRunning:pe,statusLabel:me,statusMeta:ue,controlButtons:he,btn:ye,btnPrimary:_e,btnDanger:xe,historyList:ge,historyItem:ve,historyItemSelected:Se,historyItemHeader:fe,historyIcon:be,historyTimestamp:je,historyName:we,historyItemMeta:Ne,historyMode:Ce,historyDuration:qe,historyStatus:Ie,status_passed:Le,status_failed:Pe,status_running:Re,historyError:Be,historyContext:Te,historyContextLine:Me,historyContextLabel:ke,reportContainer:Ae,reportContextPanel:He,reportContextRow:De,reportContextLabel:Ee,reportSection:$e,reportSectionHeader:Ue,reportMarkdown:Oe,reportLogs:Fe,emptyState:Ve,emptyStateTitle:We,emptyStateMessage:ze,upgradePanel:Ge,upgradePanelIcon:Qe,upgradePanelTitle:Ye,upgradePanelDesc:Ze,benefitList:Je,benefitItem:Ke,upgradeActions:Xe};function j(e){return e.trim().toLowerCase()}function et(e){switch(j(e)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function tt(e,r){switch(j(r)){case"run":return e("playtest.status.mode.run","Run");case"server":return e("playtest.status.mode.server","Server");case"edit":return e("playtest.status.mode.edit","Edit");case"play":return e("playtest.status.mode.play","Play");default:return r}}function st(e,r){switch(j(r)){case"passed":return e("playtest.history.status.passed","Passed");case"failed":return e("playtest.history.status.failed","Failed");case"running":return e("playtest.history.status.running","Running");default:return e("playtest.history.status.unknown","Unknown")}}function at(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function rt({entries:e,onSelect:r,selectedTimestamp:n}){const{t:l}=N();return e.length===0?t.jsx("div",{className:s.emptyState,children:l("playtest.history.empty","No test results yet")}):t.jsx("div",{className:s.historyList,children:e.map(a=>{var i,d,c,m,u,h;const p=a.timestamp===n;return t.jsxs("button",{className:`${s.historyItem} ${p?s.historyItemSelected:""}`,onClick:()=>r(a.timestamp),children:[t.jsxs("div",{className:s.historyItemHeader,children:[t.jsx("span",{className:s.historyIcon,children:et(a.status)}),t.jsx("span",{className:s.historyTimestamp,children:a.timestamp}),t.jsx("span",{className:s.historyName,children:a.testName})]}),t.jsxs("div",{className:s.historyItemMeta,children:[t.jsx(S,{text:l("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:t.jsxs("span",{className:s.historyMode,children:[l("playtest.history.mode","Mode"),": ",tt(l,a.mode)]})}),t.jsx("span",{className:s.historyDuration,children:at(a.durationMs)}),t.jsx(S,{text:l("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:t.jsx("span",{className:`${s.historyStatus} ${s[`status_${j(a.status)}`]??""}`,children:st(l,a.status)})})]}),a.errorMessage&&t.jsx("div",{className:s.historyError,children:a.errorMessage}),(a.contextId||((i=a.contextSummary)==null?void 0:i.testScenario)||((d=a.contextSummary)==null?void 0:d.expectedBehavior)||((c=a.contextSummary)==null?void 0:c.observedBehavior))&&t.jsxs("div",{className:s.historyContext,children:[a.contextId&&t.jsxs("div",{className:s.historyContextLine,children:[t.jsx("span",{className:s.historyContextLabel,children:l("playtest.context.contextId","Context ID")}),t.jsx("span",{children:a.contextId})]}),((m=a.contextSummary)==null?void 0:m.testScenario)&&t.jsxs("div",{className:s.historyContextLine,children:[t.jsx("span",{className:s.historyContextLabel,children:l("playtest.context.why","Why this test ran")}),t.jsx("span",{children:a.contextSummary.testScenario})]}),((u=a.contextSummary)==null?void 0:u.expectedBehavior)&&t.jsxs("div",{className:s.historyContextLine,children:[t.jsx("span",{className:s.historyContextLabel,children:l("playtest.context.expected","Expected")}),t.jsx("span",{children:a.contextSummary.expectedBehavior})]}),((h=a.contextSummary)==null?void 0:h.observedBehavior)&&t.jsxs("div",{className:s.historyContextLine,children:[t.jsx("span",{className:s.historyContextLabel,children:l("playtest.context.observed","Observed")}),t.jsx("span",{children:a.contextSummary.observedBehavior})]})]})]},a.timestamp)})})}function nt({report:e}){var l,a,p,i,d,c;const{t:r}=N(),n=!!((l=e.contextSummary)!=null&&l.testScenario||(a=e.contextSummary)!=null&&a.expectedBehavior||(p=e.contextSummary)!=null&&p.observedBehavior);return t.jsxs("div",{className:s.reportContainer,children:[n&&t.jsxs("div",{className:s.reportContextPanel,children:[((i=e.contextSummary)==null?void 0:i.testScenario)&&t.jsxs("div",{className:s.reportContextRow,children:[t.jsx("span",{className:s.reportContextLabel,children:r("playtest.context.why","Why this test ran")}),t.jsx("span",{children:e.contextSummary.testScenario})]}),((d=e.contextSummary)==null?void 0:d.expectedBehavior)&&t.jsxs("div",{className:s.reportContextRow,children:[t.jsx("span",{className:s.reportContextLabel,children:r("playtest.context.expected","Expected")}),t.jsx("span",{children:e.contextSummary.expectedBehavior})]}),((c=e.contextSummary)==null?void 0:c.observedBehavior)&&t.jsxs("div",{className:s.reportContextRow,children:[t.jsx("span",{className:s.reportContextLabel,children:r("playtest.context.observed","Observed")}),t.jsx("span",{children:e.contextSummary.observedBehavior})]})]}),e.markdown&&t.jsxs("div",{className:s.reportSection,children:[t.jsx("div",{className:s.reportSectionHeader,children:t.jsx(S,{text:r("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:t.jsx("span",{children:r("playtest.report.content","Report")})})}),t.jsx("pre",{className:s.reportMarkdown,children:e.markdown})]}),e.logs&&t.jsxs("div",{className:s.reportSection,children:[t.jsx("div",{className:s.reportSectionHeader,children:t.jsx(S,{text:r("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:t.jsx("span",{children:r("playtest.report.logs","Logs")})})}),t.jsx("pre",{className:s.reportLogs,children:e.logs})]}),!e.markdown&&!e.logs&&t.jsx("div",{className:s.emptyState,children:r("playtest.report.empty","No report content available")})]})}function ut(){var P;const{t:e}=N(),{trackEvent:r}=H(),{tier:n,loading:l}=D(),a=!l&&n==="basic",[p,i]=o.useState(null),d=z({enabled:!a,placeId:p}),{show:c}=E(),[m,u]=o.useState(null),[h,g]=o.useState(!1),[f,y]=o.useState(!1),{history:x,selectedReport:w,loading:T}=d,_=a?G(e):null,C=((P=_==null?void 0:_.history[0])==null?void 0:P.timestamp)??null,q=a?m??C:m,I=(_==null?void 0:_.history)??x,L=_&&q===C?_.report:w,M=a?!1:T,k=b=>{u(b),!a&&d.loadReport(b)},A=async()=>{y(!0);try{await d.clearHistory(),c(e("toast.clearSuccess","Cleared successfully"),"success"),g(!1),u(null)}catch{c(e("toast.clearFailed","Failed to clear data"),"error")}finally{y(!1)}};return t.jsxs("div",{className:s.page,children:[t.jsx(U,{title:e("page.playtest.title","Playtest"),description:e("page.playtest.description","Review automated playtest runs, saved reports, and result history."),helpTopicId:"playtest",helpState:{tier:n}}),!a&&t.jsx(O,{surface:"playtest",selectable:!0,selectedPlaceId:p,onSelectedPlaceIdChange:b=>{i(b),u(null)}}),a&&t.jsx("div",{className:s.sampleBanner,children:t.jsxs("div",{className:s.sampleBannerRow,children:[t.jsxs("div",{className:s.sampleBannerMain,children:[t.jsx("div",{className:s.sampleBadge,children:e("playtest.sample.badge","Preview of the Pro playtest view")}),t.jsx("div",{className:s.sampleTitle,children:e("playtest.sample.title","You are previewing the report viewer that becomes available after upgrading to Pro.")}),t.jsx("div",{className:s.sampleMessage,children:e("playtest.sample.message","This preview uses sample data. Real playtest history management and stored reports unlock with Pro.")})]}),t.jsx("div",{className:s.sampleActions,children:t.jsx("a",{className:s.primaryAction,href:$.playtest,target:"_blank",rel:"noreferrer",onClick:()=>r("dashboard_click_event",{click_target:"upgrade_cta",placement:"playtest_sample_banner",page:"playtest"}),children:e("tier.upgrade","View Pro")})})]})}),t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx(R,{label:e("playtest.history.title","Test History"),tooltip:e("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")}),a?t.jsx(S,{text:e("playtest.sample.clearDisabled","Available with Pro for live playtest history."),children:t.jsx("span",{children:t.jsx("button",{className:s.clearButton,disabled:!0,children:e("common.clear","Clear")})})}):t.jsx("button",{className:s.clearButton,onClick:()=>{r("dashboard_click_event",{click_target:"playtest_clear_history",page:"playtest"}),g(!0)},children:e("common.clear","Clear")})]}),M?t.jsx("div",{className:s.emptyState,children:e("common.loading","Loading...")}):I.length===0?t.jsxs("div",{className:s.emptyState,children:[t.jsx("div",{className:s.emptyStateTitle,children:e("playtest.empty.title","No playtest results yet")}),t.jsx("div",{className:s.emptyStateMessage,children:e("playtest.empty.message","Test results for this place will appear here after the AI Agent runs a Playtest.")})]}):t.jsx(rt,{entries:I,onSelect:k,selectedTimestamp:q??void 0})]}),L&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:t.jsx(R,{label:e("playtest.report.title","Selected Report"),tooltip:e("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),t.jsx(nt,{report:L})]}),!a&&t.jsx(F,{open:h,title:e("playtest.clear.title","Clear test history?"),message:e("playtest.clear.message","This permanently removes the stored playtest reports for the current place."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:f,onCancel:()=>!f&&g(!1),onConfirm:A})]})}export{ut as Component};
@@ -1 +0,0 @@
1
- ._page_3lq3l_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._sampleBanner_3lq3l_9{display:flex;flex-direction:column;gap:12px;padding:18px 20px;border:1px solid var(--pro-border);border-radius:var(--radius);background:linear-gradient(135deg,#f0bd5829,#f0bd5808 55%),var(--bg-card)}._sampleBannerRow_3lq3l_21{display:flex;align-items:center;justify-content:space-between;gap:20px}._sampleBannerMain_3lq3l_28{display:flex;flex-direction:column;gap:8px;min-width:0}._sampleBadge_3lq3l_35{width:fit-content;padding:0;border-radius:0;background:none;border:none;color:var(--pro-text);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:none;opacity:.92}._sampleTitle_3lq3l_50{font-family:var(--font-label);font-size:16px;font-weight:600;color:var(--text-primary)}._sampleMessage_3lq3l_57{max-width:560px;color:var(--text-secondary);font-size:13px;line-height:1.5}._sampleActions_3lq3l_64{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._primaryAction_3lq3l_72,._secondaryAction_3lq3l_73{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 14px;border-radius:8px;font-family:var(--font-label);font-size:12px;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._secondaryAction_3lq3l_73{border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer}._secondaryAction_3lq3l_73:hover{border-color:var(--accent);background:var(--accent-dim)}._primaryAction_3lq3l_72{border:1px solid var(--pro-badge);background:var(--pro-badge);color:var(--pro-text-on-badge)}._primaryAction_3lq3l_72:hover{opacity:.9}._card_3lq3l_109{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_3lq3l_116{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}._clearButton_3lq3l_128{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:var(--error-text);border-radius:8px;padding:6px 12px;cursor:pointer}._clearButton_3lq3l_128:disabled{cursor:not-allowed;opacity:.55}._statusRow_3lq3l_143{display:flex;align-items:center;gap:12px;margin-bottom:8px}._statusIndicator_3lq3l_150{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}._statusRunning_3lq3l_158{background:var(--success);box-shadow:0 0 6px var(--success)}._statusPaused_3lq3l_163{background:var(--warning)}._statusNotRunning_3lq3l_167{background:var(--text-muted)}._statusLabel_3lq3l_171{font-family:var(--font-code);font-size:13px;font-weight:600;color:var(--text-primary)}._statusMeta_3lq3l_178{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._controlButtons_3lq3l_184{display:flex;gap:8px;margin-top:12px}._btn_3lq3l_191{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_3lq3l_191:hover{border-color:var(--accent);background:var(--accent-dim)}._btn_3lq3l_191:disabled{opacity:.4;pointer-events:none}._btnPrimary_3lq3l_213{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_3lq3l_213:hover{opacity:.9}._btnDanger_3lq3l_223{border-color:var(--error);color:var(--error)}._btnDanger_3lq3l_223:hover{background:#ef44441a}._historyList_3lq3l_233{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow-y:auto}._historyItem_3lq3l_241{display:flex;flex-direction:column;gap:4px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);cursor:pointer;text-align:left;width:100%;font-family:inherit;transition:border-color var(--transition)}._historyItem_3lq3l_241:hover{border-color:var(--accent)}._historyItemSelected_3lq3l_260{border-color:var(--accent);background:var(--accent-dim)}._historyItemHeader_3lq3l_265{display:flex;align-items:center;gap:8px}._historyIcon_3lq3l_271{font-size:14px;flex-shrink:0}._historyTimestamp_3lq3l_276{font-family:var(--font-code);font-size:11px;color:var(--text-muted);flex-shrink:0}._historyName_3lq3l_283{font-family:var(--font-label);font-size:12px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyItemMeta_3lq3l_293{display:flex;gap:12px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary);padding-left:22px}._historyMode_3lq3l_302{color:var(--text-muted)}._historyDuration_3lq3l_306{color:var(--text-secondary)}._historyStatus_3lq3l_310{font-weight:500;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._status_passed_3lq3l_317{color:var(--success)}._status_failed_3lq3l_321{color:var(--error)}._status_running_3lq3l_325{color:var(--accent)}._historyError_3lq3l_329{font-family:var(--font-code);font-size:11px;color:var(--error);padding-left:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyContext_3lq3l_339{display:flex;flex-direction:column;gap:4px;padding-left:22px;color:var(--text-secondary);font-size:11px}._historyContextLine_3lq3l_348{display:flex;flex-direction:column;gap:2px}._historyContextLabel_3lq3l_354{font-family:var(--font-label);font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}._reportContainer_3lq3l_363{display:flex;flex-direction:column;gap:12px}._reportContextPanel_3lq3l_369{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._reportContextRow_3lq3l_379{display:flex;flex-direction:column;gap:4px;color:var(--text-primary);font-size:12px}._reportContextLabel_3lq3l_387{font-family:var(--font-label);font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}._reportSection_3lq3l_395{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._reportSectionHeader_3lq3l_401{font-family:var(--font-label);font-size:11px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em;padding:6px 12px;background:var(--bg-secondary);border-bottom:1px solid var(--border)}._reportMarkdown_3lq3l_413{padding:12px;margin:0;font-family:var(--font-code);font-size:12px;line-height:1.6;color:var(--text-primary);white-space:pre-wrap;word-break:break-word;max-height:400px;overflow-y:auto}._reportLogs_3lq3l_426{padding:12px;margin:0;font-family:var(--font-code);font-size:11px;line-height:1.5;color:var(--text-secondary);white-space:pre-wrap;word-break:break-word;max-height:240px;overflow-y:auto;background:var(--bg-secondary)}._emptyState_3lq3l_441{text-align:center;padding:32px 16px;color:var(--text-muted);font-size:13px}._emptyStateTitle_3lq3l_448{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-secondary);margin-bottom:8px}._emptyStateMessage_3lq3l_456{font-size:12px;color:var(--text-muted);max-width:360px;margin:0 auto;line-height:1.5}._upgradePanel_3lq3l_465{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:32px 24px;text-align:center}._upgradePanelIcon_3lq3l_473{font-size:32px;margin-bottom:12px}._upgradePanelTitle_3lq3l_478{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:8px}._upgradePanelDesc_3lq3l_486{font-size:13px;color:var(--text-secondary);margin-bottom:16px;max-width:400px;margin-left:auto;margin-right:auto;line-height:1.5}._benefitList_3lq3l_496{list-style:none;padding:0;margin:0 auto 16px;display:flex;flex-direction:column;gap:4px;max-width:360px;text-align:left}._benefitItem_3lq3l_507{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_3lq3l_507:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_3lq3l_522{display:flex;gap:8px;justify-content:center}@media(max-width:720px){._sampleBannerRow_3lq3l_21{flex-direction:column;align-items:stretch}._sampleActions_3lq3l_64{justify-content:stretch}._primaryAction_3lq3l_72,._secondaryAction_3lq3l_73{width:100%}}