@weppy/roblox-mcp 2.12.4 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dashboard/dist/assets/AssetsPage-BVUpssWN.css +1 -0
- package/dashboard/dist/assets/AssetsPage-D2V0I3vJ.js +61 -0
- package/dashboard/dist/assets/{ChangelogDetailPage-DJm43K1h.js → ChangelogDetailPage-Blm2KD_v.js} +1 -1
- package/dashboard/dist/assets/{ChangelogPage-M0lIALvl.js → ChangelogPage-3W6oNyob.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-DLCMn2dM.js → ConfirmModal-D0J2TdvP.js} +1 -1
- package/dashboard/dist/assets/{ConnectionPage-e-YP0BDu.js → ConnectionPage-BRMJY695.js} +1 -1
- package/dashboard/dist/assets/{ControlsPage-DlaSStpW.js → ControlsPage-Bsvd6IMH.js} +1 -1
- package/dashboard/dist/assets/{CurrentPlaceScope-DZ2orV5_.js → CurrentPlaceScope-Cf6Ul4of.js} +1 -1
- package/dashboard/dist/assets/{GameChangeDetail-78Ke4Pr3.js → GameChangeDetail-WiUFqrAr.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-C3n2_cRi.js → InfoLabel-DUnzLQMx.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-a_Newk4P.js → OverviewPage-CN7-ORIn.js} +1 -1
- package/dashboard/dist/assets/{PageHeader-A_rnhaxW.js → PageHeader-Bp67sdNa.js} +2 -2
- package/dashboard/dist/assets/{PlaytestPage-CN7oefOU.js → PlaytestPage-BkXd5qVL.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-C0RRWcLC.js → SettingsPage-DcuPwNrv.js} +1 -1
- package/dashboard/dist/assets/{StatusBadge-DYqnLMML.js → StatusBadge-Dww3HZdU.js} +1 -1
- package/dashboard/dist/assets/{SyncPage-CsQe96fg.js → SyncPage-BPoKRe2z.js} +1 -1
- package/dashboard/dist/assets/{Tabs--X3ZBrw-.js → Tabs-COiFxn38.js} +1 -1
- package/dashboard/dist/assets/{ToolsPage-a0ReLV98.js → ToolsPage-B3j9RnJM.js} +1 -1
- package/dashboard/dist/assets/{TooltipText-Duhv_UBS.js → TooltipText-dbQ6BSkp.js} +1 -1
- package/dashboard/dist/assets/{UiPrimitive-Bi3cIHAa.js → UiPrimitive-iWZdGr_k.js} +1 -1
- package/dashboard/dist/assets/{UiStudioPage-Bnbxjpb2.js → UiStudioPage-BJDqOz5h.js} +1 -1
- package/dashboard/dist/assets/{WhatsNewPage-CD2k2oln.js → WhatsNewPage-CQaXn8pK.js} +1 -1
- package/dashboard/dist/assets/{copy-hmyydPjO.js → copy-BkVzYP8s.js} +1 -1
- package/dashboard/dist/assets/{index-jDDNKuJU.css → index-CkZeRxRT.css} +1 -1
- package/dashboard/dist/assets/{index-je833Nom.js → index-O8KXvp28.js} +78 -190
- package/dashboard/dist/assets/{sample-requests-B-6uBLqA.js → sample-requests-CnK8aw_2.js} +1 -1
- package/dashboard/dist/assets/{useLiveUptime-DcWAg-Dy.js → useLiveUptime-dbgoJqzy.js} +1 -1
- package/dashboard/dist/assets/{useSettings-JrNGM1Q7.js → useSettings-q3UtZNG2.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dist/index.js +91 -91
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/AssetsPage-Czc93xoU.css +0 -1
- package/dashboard/dist/assets/AssetsPage-FUa9ddzs.js +0 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weppy/roblox-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.1",
|
|
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_u8a6t_1{display:flex;flex-direction:column;gap:14px;min-height:100%;max-width:var(--content-max)}._experimentalBadge_u8a6t_9{display:inline-flex;align-items:center;min-height:20px;border:1px solid color-mix(in srgb,var(--accent) 45%,var(--border));border-radius:var(--radius-control);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_u8a6t_23{position:relative;z-index:30;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:12px 0}._toolbar_u8a6t_23{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._toolbar_u8a6t_23>._segmented_u8a6t_39{order:1}._toolbar_u8a6t_23>._placeSelectorLabel_u8a6t_43{order:2}._toolbar_u8a6t_23>._listContextSummary_u8a6t_47{order:3;flex:1 1 auto;min-width:220px}._toolbar_u8a6t_23>._toolbarActions_u8a6t_53{order:4;margin-left:auto}._categoryControl_u8a6t_58{order:5;display:inline-flex;align-items:center;gap:8px;width:100%;min-width:0;flex:1 0 100%}._listContextSummary_u8a6t_47{color:var(--text-secondary);font-size:12px;line-height:1.4}._listContextSummary_u8a6t_47 strong{color:var(--text-primary);font-family:var(--font-label);font-weight:600}._contextDivider_u8a6t_80{color:var(--text-muted)}._categoryControlLabel_u8a6t_84{flex:0 0 auto;color:var(--text-secondary);font-size:12px}._categoryRail_u8a6t_90{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}._categoryButton_u8a6t_98{min-height:32px;border:1px solid var(--border);border-radius:var(--radius-control);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_u8a6t_98:hover{border-color:var(--accent);color:var(--text-primary)}._categoryButton_u8a6t_98:disabled{cursor:not-allowed;opacity:.48}._categoryButton_u8a6t_98:disabled:hover{border-color:var(--border);color:var(--text-secondary)}._categoryButtonActive_u8a6t_127{border-color:color-mix(in srgb,var(--accent) 76%,var(--border));background:var(--accent-dim);color:var(--accent)}._categoryButton_u8a6t_98:focus-visible{outline:none;box-shadow:var(--focus-ring)}._toolbarActions_u8a6t_53,._actionRow_u8a6t_139,._copyRow_u8a6t_140,._buttonRow_u8a6t_141{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._segmented_u8a6t_39{display:inline-flex;min-height:32px;border:1px solid var(--border);border-radius:var(--radius-control);overflow:hidden;background:var(--bg-card)}._segmented_u8a6t_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;transition:background var(--transition),color var(--transition)}._segmented_u8a6t_39 button:hover:not(:disabled){background:var(--accent-dim);color:var(--accent)}._segmented_u8a6t_39 button:focus-visible{outline:none;box-shadow:inset var(--focus-ring)}._segmented_u8a6t_39 button:last-child{border-right:0}._segmented_u8a6t_39 ._segmentedActive_u8a6t_183{background:var(--accent-dim);color:var(--accent)}._placeSelectorLabel_u8a6t_43{display:inline-flex;align-items:center;gap:8px;min-width:0;color:var(--text-secondary);font-size:12px}._placeSelectorLabel_u8a6t_43 span{flex:0 0 auto}._placeSelect_u8a6t_43{min-width:190px;max-width:min(320px,100%);min-height:32px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-card);color:var(--text-primary);padding:0 8px;font:inherit}._filterLabel_u8a6t_213{display:inline-flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:12px}._filterLabel_u8a6t_213 select{min-height:32px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-card);color:var(--text-primary);padding:0 8px;font:inherit}._commandButton_u8a6t_231,._primaryButton_u8a6t_232,._iconButton_u8a6t_233{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--border);border-radius:var(--radius-control);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_u8a6t_231{min-height:32px;padding:6px 10px;text-decoration:none}._primaryButton_u8a6t_232{min-height:34px;padding:7px 12px;border-color:var(--accent);color:var(--accent)}._iconButton_u8a6t_233{width:32px;height:32px;padding:0}._commandButton_u8a6t_231:hover,._primaryButton_u8a6t_232:hover,._iconButton_u8a6t_233:hover{border-color:var(--accent)}._dangerButton_u8a6t_273{border-color:var(--danger-border);background:var(--danger-bg);color:var(--danger-text)}._dangerButton_u8a6t_273:hover{border-color:var(--danger);background:var(--danger-hover-bg);color:var(--danger-text)}._commandButton_u8a6t_231:focus-visible,._primaryButton_u8a6t_232:focus-visible,._iconButton_u8a6t_233:focus-visible,._placeSelect_u8a6t_43:focus-visible,._filterLabel_u8a6t_213 select:focus-visible{outline:none;box-shadow:var(--focus-ring)}._iconButtonActive_u8a6t_294{border-color:var(--accent);background:var(--accent-dim);color:var(--accent)}._commandButton_u8a6t_231:disabled,._primaryButton_u8a6t_232:disabled,._iconButton_u8a6t_233:disabled{cursor:not-allowed;opacity:.5}._grid_u8a6t_307{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}._assetCard_u8a6t_313{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_u8a6t_327{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 40%,transparent)}._thumbnailWrap_u8a6t_332{display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border-radius:6px;background:var(--bg-secondary)}._thumbnail_u8a6t_332{width:100%;height:100%;object-fit:contain}._thumbnailFallback_u8a6t_348{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_u8a6t_359{display:flex;flex-direction:column;gap:6px;min-width:0}._assetName_u8a6t_366{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-label);font-size:13px}._assetMeta_u8a6t_374{display:flex;align-items:center;justify-content:space-between;gap:8px}._statusChip_u8a6t_381,._categoryPill_u8a6t_382{min-height:20px;padding:2px 7px}._assetId_u8a6t_387,._scopeText_u8a6t_388,._muted_u8a6t_389{color:var(--text-muted);font-size:12px}._emptyState_u8a6t_394,._notice_u8a6t_395,._errorState_u8a6t_396,._messageState_u8a6t_397{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:14px;color:var(--text-secondary)}._emptyState_u8a6t_394{min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._emptyState_u8a6t_394 p{margin:0;color:var(--text-primary);font-family:var(--font-label)}._notice_u8a6t_395{color:var(--warning-text);border-color:var(--warning-border);background:var(--warning-bg)}._proNotice_u8a6t_427{color:var(--pro-text);border-color:var(--pro-border);background:var(--pro-bg-soft)}._errorState_u8a6t_396{color:var(--error);border-color:var(--error)}._messageState_u8a6t_397{color:var(--success);border-color:var(--success)}._rbxmGuide_u8a6t_443{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_u8a6t_443 h2{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;letter-spacing:0}._rbxmGuide_u8a6t_443 p{margin:0;max-width:760px;color:var(--text-secondary);font-size:12px;line-height:1.5}._drawer_u8a6t_469{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_u8a6t_483{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_u8a6t_1 .12s ease-out;transform-origin:top right}._settingsDrawer_u8a6t_503{width:min(560px,100%)}@keyframes _settingsPopoverIn_u8a6t_1{0%{opacity:0;transform:translateY(-4px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}._detailPopupLayer_u8a6t_519{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_u8a6t_535{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_u8a6t_535:focus{outline:none}._detailDialogHeader_u8a6t_552{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_u8a6t_563{min-width:0;display:flex;flex-direction:column;gap:3px}._detailTitleBlock_u8a6t_563 h2{margin:0;font-size:18px;letter-spacing:0}._detailTitleBlock_u8a6t_563 span:last-child{overflow:hidden;color:var(--text-muted);font-family:var(--font-code);font-size:12px;text-overflow:ellipsis;white-space:nowrap}._detailEyebrow_u8a6t_585{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._detailHeaderActions_u8a6t_594{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._detailDialogBody_u8a6t_602{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.1fr);gap:0;overflow:hidden}._detailPreviewPane_u8a6t_611{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_u8a6t_611,._detailPreviewFallback_u8a6t_623{width:100%;max-width:520px;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._detailPreview_u8a6t_611{display:block;object-fit:contain}._detailPreviewFallback_u8a6t_623{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._detailPreviewFallback_u8a6t_623 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._detailPreviewFallback_u8a6t_623 small{max-width:88%;color:var(--text-muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere;text-align:center}._detailContentPane_u8a6t_659{min-width:0;overflow-y:auto;padding:18px 22px 24px}._detailContentPane_u8a6t_659 ._formStack_u8a6t_665{margin-top:0}._drawerHeader_u8a6t_669{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}._settingsInlinePanel_u8a6t_483 ._drawerHeader_u8a6t_669{margin-bottom:0}._drawerHeader_u8a6t_669 h2{margin:0;font-size:18px;letter-spacing:0}._drawerHeader_u8a6t_669 span{color:var(--text-muted);font-size:12px}._preview_u8a6t_692,._previewFallback_u8a6t_693{width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);margin-bottom:14px}._preview_u8a6t_692{object-fit:contain}._previewFallback_u8a6t_693{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._previewFallback_u8a6t_693 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._formStack_u8a6t_665,._detailSection_u8a6t_720,._noticeList_u8a6t_721,._settingsPanel_u8a6t_722{display:flex;flex-direction:column;gap:10px;margin-top:14px}._noticeList_u8a6t_721{color:var(--text-muted);font-size:12px;line-height:1.45}._noticeList_u8a6t_721 p{margin:0}._setupNotice_u8a6t_739{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_u8a6t_739 strong{color:var(--text-primary);font-size:13px}._setupNotice_u8a6t_739 p{margin:0}._setupNotice_u8a6t_739 ._commandButton_u8a6t_231{justify-self:start}._field_u8a6t_764{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary)}._fieldLabelRow_u8a6t_772{display:flex;align-items:center;gap:4px;min-height:24px}._fieldLabelRow_u8a6t_772 label,._fieldLabelRow_u8a6t_772 span{min-width:0}._field_u8a6t_764 input,._field_u8a6t_764 textarea,._field_u8a6t_764 select{width:100%;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-primary);padding:8px;font:inherit}._fieldHelp_u8a6t_796{color:var(--text-muted);line-height:1.35}._twoColumn_u8a6t_801{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}._detailSection_u8a6t_720{padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_u8a6t_812{margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_u8a6t_812 summary{cursor:pointer;color:var(--text-secondary);font-size:13px;font-weight:600}._technicalDetails_u8a6t_812 summary:hover{color:var(--text-primary)}._technicalDetails_u8a6t_812 ._detailGrid_u8a6t_829,._technicalDetails_u8a6t_812 ._metadataList_u8a6t_830{margin-top:10px}._detailSection_u8a6t_720 h3{margin:0;font-size:13px;letter-spacing:0}._detailGrid_u8a6t_829,._compactMeta_u8a6t_841{display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px 10px;margin:0;font-size:12px}._compactMeta_u8a6t_841{border:1px solid var(--border);border-radius:var(--radius);padding:10px;background:var(--bg-card)}._detailGrid_u8a6t_829 dt,._compactMeta_u8a6t_841 dt{color:var(--text-muted)}._detailGrid_u8a6t_829 dd,._compactMeta_u8a6t_841 dd{margin:0;min-width:0;overflow-wrap:anywhere}._copyableValue_u8a6t_868{display:inline-flex;align-items:center;gap:6px}._copyableValue_u8a6t_868 span{min-width:0;overflow-wrap:anywhere}._inlineCopyButton_u8a6t_879{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid var(--border);border-radius:var(--radius-control);background:transparent;color:var(--text-muted);cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition)}._inlineCopyButton_u8a6t_879:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}._hashText_u8a6t_900{font-family:var(--font-code)}._usageList_u8a6t_904{display:flex;flex-direction:column;gap:8px}._usageItem_u8a6t_910,._metadataItem_u8a6t_911{display:grid;gap:4px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--bg-card);font-size:12px}._metadataList_u8a6t_830{display:flex;flex-direction:column;gap:8px}._metadataList_u8a6t_830 strong,._usageItem_u8a6t_910 strong{color:var(--text-primary);overflow-wrap:anywhere}._metadataItem_u8a6t_911 span{color:var(--text-secondary);overflow-wrap:anywhere}._metadataItem_u8a6t_911 code,._usageItem_u8a6t_910 code{color:var(--accent);overflow-wrap:anywhere}._settingsPanel_u8a6t_722{border:1px solid var(--border);border-radius:8px;padding:12px;background:var(--bg-card)}._settingsInlinePanel_u8a6t_483 ._settingsPanel_u8a6t_722{border:0;border-radius:0;background:transparent;padding:0;margin-top:0}._settingsSubsection_u8a6t_959{display:grid;gap:8px}._settingsSectionHeader_u8a6t_964{display:flex;align-items:center;justify-content:space-between;gap:10px}._settingsSectionHeader_u8a6t_964 h3{margin:0;color:var(--text-primary);font-size:13px}._settingsDefinitionList_u8a6t_977{display:grid;gap:6px;margin:0}._settingsDefinitionList_u8a6t_977 div{display:grid;grid-template-columns:minmax(96px,max-content) minmax(0,1fr);gap:10px}._settingsDefinitionList_u8a6t_977 dt{color:var(--text-muted)}._settingsDefinitionList_u8a6t_977 dd{margin:0;color:var(--text-primary);overflow-wrap:anywhere}._toggleRow_u8a6t_999{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}._toggleRow_u8a6t_999 span{display:grid;gap:3px}._toggleRow_u8a6t_999 small,._inlineHelp_u8a6t_1013{color:var(--text-muted);font-size:12px}._toggleRow_u8a6t_999 input{width:18px;height:18px}._inlineHelp_u8a6t_1013{margin:0}._inlineHelp_u8a6t_1013 a{color:var(--accent)}@media(max-width:1120px){._detailPopupLayer_u8a6t_519{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}._detailDialogBody_u8a6t_602{grid-template-columns:minmax(240px,.8fr) minmax(320px,1.2fr)}}@media(max-width:820px){._detailPopupLayer_u8a6t_519{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}._detailDialogHeader_u8a6t_552{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._detailHeaderActions_u8a6t_594{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._detailDialogBody_u8a6t_602{grid-template-columns:minmax(0,1fr);overflow-y:auto}._detailPreviewPane_u8a6t_611{min-height:auto;padding:14px;border-right:0;border-bottom:1px solid var(--border)}._detailPreview_u8a6t_611,._detailPreviewFallback_u8a6t_623{max-width:340px}._detailContentPane_u8a6t_659{overflow:visible;padding:14px}}@media(max-width:720px){._headerRow_u8a6t_1090,._toolbar_u8a6t_23{align-items:stretch;flex-direction:column}._headerMeta_u8a6t_1096{justify-items:start}._toolbarActions_u8a6t_53{justify-content:flex-start}._placeSelectorLabel_u8a6t_43,._placeSelect_u8a6t_43{width:100%}._settingsInlinePanel_u8a6t_483{right:auto;left:0;width:100%;transform-origin:top left}._twoColumn_u8a6t_801{grid-template-columns:1fr}}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import{i as ne,a as L,o as ve,u as me,j as t,P as mt,I as ht,r as c,p as xt,R as Qe,X as Ue,E as gt,q as et,g as bt,e as ft,h as yt}from"./index-je833Nom.js";import{C as tt}from"./ConfirmModal-DLCMn2dM.js";import{D as Ee,a as jt,P as vt}from"./PageHeader-A_rnhaxW.js";import{T as K}from"./TooltipText-Duhv_UBS.js";import{B as Te,C as Ct}from"./UiPrimitive-Bi3cIHAa.js";import{C as st}from"./copy-hmyydPjO.js";import"./ConfirmModal.module-DJksQHBd.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 _t=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],St=ne("arrow-left",_t);/**
|
|
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 It=[["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"}]],Nt=ne("audio-lines",It);/**
|
|
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 At=[["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"}]],kt=ne("badge",At);/**
|
|
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 Pt=[["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"}]],Rt=ne("box",Pt);/**
|
|
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 $t=[["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"}]],wt=ne("clapperboard",$t);/**
|
|
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 Lt=[["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"}]],Bt=ne("film",Lt);/**
|
|
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 Ut=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dt=ne("search",Ut);/**
|
|
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 Et=[["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"}]],Tt=ne("trash-2",Et);/**
|
|
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 Ot=[["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"}]],Ft=ne("upload",Ot);function at(e){if(e.scope==="place"&&typeof e.placeId=="number")return{placeId:String(e.placeId)}}function se(e){const s=at(e);return s?`?placeId=${encodeURIComponent(s.placeId)}`:""}function Ce(e){return`/api/assets/${encodeURIComponent(e.scope)}/${encodeURIComponent(e.category)}`}function ce(e,s){return`${Ce(e)}/${encodeURIComponent(s)}`}async function Mt(e){return L.get(Ce(e),at(e))}async function Ht(e){return L.post(`${Ce(e)}/rescan${se(e)}`,{})}async function Kt(e,s,i){return(await L.patch(`${ce(e,s)}${se(e)}`,i)).asset}async function Gt(e,s){return L.delete(`${ce(e,s)}${se(e)}`)}async function zt(e,s,i){return(await L.post(`${ce(e,s)}/upload${se(e)}`,i)).asset}async function Oe(e,s){return(await L.post(`${ce(e,s)}/status-refresh${se(e)}`,{})).asset}async function Wt(e,s,i){const n={...e,placeId:i??e.placeId};return L.post(`${ce(e,s)}/usage-scan${se(n)}`,{})}async function Vt(e,s){return L.post(`${Ce(e)}/export-selection-rbxm${se(e)}`,s)}async function Yt(e,s,i){return L.post(`${ce(e,s)}/import-rbxm${se(e)}`,i)}async function Xt(e,s){return(await L.post(`${ce(e,s)}/thumbnail-generate${se(e)}`,{})).asset}function nt(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 ot(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 rt=["all","image","decal","rbxm"],qt=new Set(rt),Fe=["model","animation"];function ye(e){return/\.(rbxm|rbxmx)$/i.test(e.file.original)}function Zt(e){return qt.has(e)}function Le(e,s){return e==="all"?s("assets.category.all","All"):s(`assets.category.${e}`,e==="rbxm"?"RBXM":e)}function ie(e,s){return Le(ye(e)?"rbxm":e.category,s)}function Me(e){return e==="all"?["image","decal",...Fe]:e==="rbxm"?Fe:[e]}function Jt(e,s){return s==="all"?e.category==="image"||e.category==="decal"||ye(e):s==="rbxm"?ye(e):(s==="model"||s==="animation")&&ye(e)?!1:e.category===s}function Qt(e){return[...e].sort((s,i)=>i.createdAt.localeCompare(s.createdAt)||i.id.localeCompare(s.id))}const es="_page_u8a6t_1",ts="_experimentalBadge_u8a6t_9",ss="_toolbarShell_u8a6t_23",as="_toolbar_u8a6t_23",ns="_segmented_u8a6t_39",os="_placeSelectorLabel_u8a6t_43",rs="_listContextSummary_u8a6t_47",ls="_toolbarActions_u8a6t_53",is="_categoryControl_u8a6t_58",cs="_contextDivider_u8a6t_80",ds="_categoryControlLabel_u8a6t_84",us="_categoryRail_u8a6t_90",ps="_categoryButton_u8a6t_98",ms="_categoryButtonActive_u8a6t_127",hs="_copyRow_u8a6t_140",xs="_buttonRow_u8a6t_141",gs="_segmentedActive_u8a6t_183",bs="_placeSelect_u8a6t_43",fs="_commandButton_u8a6t_231",ys="_primaryButton_u8a6t_232",js="_iconButton_u8a6t_233",vs="_dangerButton_u8a6t_273",Cs="_iconButtonActive_u8a6t_294",_s="_grid_u8a6t_307",Ss="_assetCard_u8a6t_313",Is="_assetCardSelected_u8a6t_327",Ns="_thumbnailWrap_u8a6t_332",As="_thumbnail_u8a6t_332",ks="_thumbnailFallback_u8a6t_348",Ps="_assetCardBody_u8a6t_359",Rs="_assetName_u8a6t_366",$s="_assetMeta_u8a6t_374",ws="_statusChip_u8a6t_381",Ls="_categoryPill_u8a6t_382",Bs="_assetId_u8a6t_387",Us="_scopeText_u8a6t_388",Ds="_muted_u8a6t_389",Es="_emptyState_u8a6t_394",Ts="_notice_u8a6t_395",Os="_errorState_u8a6t_396",Fs="_messageState_u8a6t_397",Ms="_proNotice_u8a6t_427",Hs="_rbxmGuide_u8a6t_443",Ks="_settingsInlinePanel_u8a6t_483",Gs="_settingsDrawer_u8a6t_503",zs="_detailPopupLayer_u8a6t_519",Ws="_detailDialog_u8a6t_535",Vs="_detailDialogHeader_u8a6t_552",Ys="_detailTitleBlock_u8a6t_563",Xs="_detailEyebrow_u8a6t_585",qs="_detailHeaderActions_u8a6t_594",Zs="_detailDialogBody_u8a6t_602",Js="_detailPreviewPane_u8a6t_611",Qs="_detailPreview_u8a6t_611",ea="_detailPreviewFallback_u8a6t_623",ta="_detailContentPane_u8a6t_659",sa="_formStack_u8a6t_665",aa="_drawerHeader_u8a6t_669",na="_detailSection_u8a6t_720",oa="_noticeList_u8a6t_721",ra="_settingsPanel_u8a6t_722",la="_setupNotice_u8a6t_739",ia="_field_u8a6t_764",ca="_fieldLabelRow_u8a6t_772",da="_fieldHelp_u8a6t_796",ua="_twoColumn_u8a6t_801",pa="_technicalDetails_u8a6t_812",ma="_detailGrid_u8a6t_829",ha="_metadataList_u8a6t_830",xa="_compactMeta_u8a6t_841",ga="_copyableValue_u8a6t_868",ba="_inlineCopyButton_u8a6t_879",fa="_hashText_u8a6t_900",ya="_usageList_u8a6t_904",ja="_usageItem_u8a6t_910",va="_metadataItem_u8a6t_911",Ca="_settingsSubsection_u8a6t_959",_a="_settingsSectionHeader_u8a6t_964",Sa="_settingsDefinitionList_u8a6t_977",Ia="_toggleRow_u8a6t_999",Na="_inlineHelp_u8a6t_1013",a={page:es,experimentalBadge:ts,toolbarShell:ss,toolbar:as,segmented:ns,placeSelectorLabel:os,listContextSummary:rs,toolbarActions:ls,categoryControl:is,contextDivider:cs,categoryControlLabel:ds,categoryRail:us,categoryButton:ps,categoryButtonActive:ms,copyRow:hs,buttonRow:xs,segmentedActive:gs,placeSelect:bs,commandButton:fs,primaryButton:ys,iconButton:js,dangerButton:vs,iconButtonActive:Cs,grid:_s,assetCard:Ss,assetCardSelected:Is,thumbnailWrap:Ns,thumbnail:As,thumbnailFallback:ks,assetCardBody:Ps,assetName:Rs,assetMeta:$s,statusChip:ws,categoryPill:Ls,assetId:Bs,scopeText:Us,muted:Ds,emptyState:Es,notice:Ts,errorState:Os,messageState:Fs,proNotice:Ms,rbxmGuide:Hs,settingsInlinePanel:Ks,settingsDrawer:Gs,detailPopupLayer:zs,detailDialog:Ws,detailDialogHeader:Vs,detailTitleBlock:Ys,detailEyebrow:Xs,detailHeaderActions:qs,detailDialogBody:Zs,detailPreviewPane:Js,detailPreview:Qs,detailPreviewFallback:ea,detailContentPane:ta,formStack:sa,drawerHeader:aa,detailSection:na,noticeList:oa,settingsPanel:ra,setupNotice:la,field:ia,fieldLabelRow:ca,fieldHelp:da,twoColumn:ua,technicalDetails:pa,detailGrid:ma,metadataList:ha,compactMeta:xa,copyableValue:ga,inlineCopyButton:ba,hashText:fa,usageList:ya,usageItem:ja,metadataItem:va,settingsSubsection:Ca,settingsSectionHeader:_a,settingsDefinitionList:Sa,toggleRow:Ia,inlineHelp:Na},Aa={image:ht,decal:kt,audio:Nt,mesh:Rt,model:mt,video:Bt,animation:wt};function Be(e,s){return s(`assets.status.${e}`,e)}function ka(e){switch(e){case"uploaded":return"success";case"failed":return"error";case"processing":case"uploading":return"warning";case"localOnly":case"superseded":default:return"neutral"}}function Pa(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function Ra(e){return e.category==="decal"?e.roblox.creatorAssetId??e.roblox.assetId:e.roblox.assetId}function lt(e,s){var y;const i=((y=e.rbxm)==null?void 0:y.studioUploads)??[];if(i.length===0)return null;const n=i.filter(S=>S.status==="uploaded").length,l=i.filter(S=>S.status==="failed").length,A=[n>0?`${n} ${s("assets.detail.rbxmStudioUploadsUploaded","uploaded")}`:null,l>0?`${l} ${s("assets.detail.rbxmStudioUploadsFailed","failed")}`:null].filter(Boolean);return`${s("assets.detail.rbxmStudioUploadsLabel","Studio uploads")}: ${A.join(", ")}`}function $a({assets:e,selectedAssetId:s,onSelect:i}){const{t:n}=me();return e.length===0?t.jsxs("div",{className:a.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:a.grid,children:e.map(l=>{const A=Aa[l.category],y=Ra(l),S=lt(l,n);return t.jsxs("button",{type:"button",className:[a.assetCard,s===l.id?a.assetCardSelected:""].filter(Boolean).join(" "),onClick:()=>i(l.id),children:[t.jsx("span",{className:a.thumbnailWrap,children:Pa(l)?t.jsx("img",{className:a.thumbnail,src:ot(l),alt:l.displayName,loading:"lazy"}):t.jsx("span",{className:a.thumbnailFallback,"aria-hidden":"true",children:t.jsx(A,{size:30})})}),t.jsxs("span",{className:a.assetCardBody,children:[t.jsx("span",{className:a.assetName,children:l.displayName}),t.jsxs("span",{className:a.assetMeta,children:[t.jsx(Te,{variant:"neutral",className:a.categoryPill,children:ie(l,n)}),t.jsx(Te,{variant:ka(l.status),className:a.statusChip,children:Be(l.status,n)})]}),t.jsxs("span",{className:a.assetMeta,children:[t.jsx("span",{className:a.scopeText,children:l.scope.kind==="shared"?n("assets.scope.shared","Shared"):n("assets.scope.place","Current Place")}),t.jsx("span",{className:a.assetId,children:y?`#${y}`:S??n("assets.status.localOnly","Local only")})]})]})]},l.id)})})}const wa="https://create.roblox.com/dashboard/creations/store",La=/^https:\/\/create\.roblox\.com\/store\/asset\/\d+(?:\/.*)?$/;function Ba(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function je(e){const s=new Date(e);if(Number.isNaN(s.getTime()))return e;const i=s.getFullYear(),n=String(s.getMonth()+1).padStart(2,"0"),l=String(s.getDate()).padStart(2,"0"),A=String(s.getHours()).padStart(2,"0"),y=String(s.getMinutes()).padStart(2,"0");return`${i}-${n}-${l} ${A}:${y}`}function Ua(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function Da(e){return e.file.preview?ot(e):nt(e)}function Ea(e){var i;const s=Object.entries(((i=e.rbxm)==null?void 0:i.classCounts)??{}).sort((n,l)=>l[1]-n[1]).slice(0,8);return s.length===0?"-":s.map(([n,l])=>`${n} ${l}`).join(", ")}function He(e){var l;const s=(l=e.rbxm)==null?void 0:l.thumbnail;if(!s)return"-";const i=s.source?` via ${s.source}`:"",n=s.message?` · ${s.message}`:"";return`${s.status}${i}${n}`}function Ta(e){var l,A;const s=(A=(l=e.rbxm)==null?void 0:l.review)==null?void 0:A.summary;if(!s)return"-";const i=[["roots",s.rootCount],["parts",s.partCount],["mesh parts",s.meshPartCount],["scripts",s.scriptCount],["unanchored",s.unanchoredPartCount]].flatMap(([y,S])=>typeof S=="number"?[`${y} ${S}`]:[]),n=s.bounds;if(n&&typeof n=="object"&&"size"in n){const y=n.size;if(y&&typeof y=="object"){const{x:S,y:m,z:E}=y;typeof S=="number"&&typeof m=="number"&&typeof E=="number"&&i.push(`bounds ${S} x ${m} x ${E}`)}}return i.length>0?i.join(", "):"-"}function Oa(e){var i,n;const s=(i=e.rbxm)==null?void 0:i.generation;return s?s.schemaMode==="custom"&&((n=s.schemaGroups)!=null&&n.length)?`custom · ${s.schemaGroups.join(", ")}`:s.predefinedSchema?`${s.schemaMode??"predefined"} · ${s.predefinedSchema}`:s.schemaMode??"-":"-"}function Ke(e){const{width:s,height:i}=e.file;return s===null||i===null?null:`${s} x ${i}px`}function Ge(e){const{durationMs:s}=e.file;return s===null?null:s<1e3?`${s} ms`:`${(s/1e3).toFixed(1)} s`}function Fa(e){return`${wa}/${e}/configure`}function Ma(e){return e.category==="decal"?e.roblox.creatorAssetId??e.roblox.assetId??null:e.roblox.assetId??null}function Ha(e){const s=Ma(e),i=s?Fa(s):null,n=e.category==="decal"?e.roblox.creatorAssetWebUrl??e.roblox.assetWebUrl:e.roblox.assetWebUrl;return!n||i&&La.test(n)?i:n}function Ka(e){return`${je(e.startedAt)} -> ${e.status}`}function ze(e){return!e.creatorType||!e.creatorId?null:`${e.creatorType} ${e.creatorId}`}function We(e){return e.assetRole?`Asset role: ${e.assetRole}`:null}function Ga(e){const s=e.sourceProperty?` · ${e.sourceProperty}`:"";return`${e.path} · ${e.assetType} · ${e.status}${s}`}function za(e){return e.assetUri&&e.assetId?`${e.assetUri} (#${e.assetId})`:e.assetUri?e.assetUri:e.assetId?`#${e.assetId}`:e.message??"-"}function fe({label:e,value:s}){return s?t.jsx("button",{type:"button",className:a.inlineCopyButton,"aria-label":e,title:e,onClick:()=>{var i;return void((i=navigator.clipboard)==null?void 0:i.writeText(s))},children:t.jsx(st,{size:13})}):null}function Wa({asset:e,busyAction:s,canUpload:i,canImportRbxm:n,importRbxmTooltip:l,importRbxmTargetParent:A,onClose:y,onSave:S,onUpload:m,onDelete:E,onImportRbxm:V,onRefreshStatus:T,onScanUsage:h}){var P,x;const{t:o}=me(),Y=c.useRef(null),[G,z]=c.useState(""),[M,J]=c.useState("");if(c.useEffect(()=>{z((e==null?void 0:e.displayName)??""),J((e==null?void 0:e.description)??"")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),c.useEffect(()=>{var C;if(!e)return;(C=Y.current)==null||C.focus();const r=te=>{te.key==="Escape"&&y()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,y]),!e)return null;const O=e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath),Q=!!e.roblox.assetUri,U=Ha(e),ee=e.roblox.uploadAttempts??[],F=e.category==="decal"&&!!(e.roblox.creatorAssetId||e.roblox.backingImageAssetId||e.roblox.assetId),v=e.roblox.creatorAssetId??e.roblox.assetId,b=e.roblox.backingImageAssetId??e.roblox.assetId,k=lt(e,o),B=e.roblox.assetId?e.usage.lastScannedAt?o("assets.detail.noUsageAfterScan","No references were found in local Sync files during the last check."):o("assets.detail.noUsageUnscanned","Run Scan usage to search local Sync files for this Roblox Asset ID."):o("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:a.detailPopupLayer,onClick:y,role:"presentation",children:t.jsxs("section",{ref:Y,className:a.detailDialog,role:"dialog","aria-modal":"true","aria-label":o("assets.detail.title","Asset details"),tabIndex:-1,onClick:r=>r.stopPropagation(),children:[t.jsxs("div",{className:a.detailDialogHeader,children:[t.jsxs("div",{className:a.detailTitleBlock,children:[t.jsxs("span",{className:a.detailEyebrow,children:[ie(e,o)," · ",Be(e.status,o)]}),t.jsx("h2",{children:e.displayName}),t.jsx("span",{children:e.id})]}),t.jsxs("div",{className:a.detailHeaderActions,children:[t.jsx(K,{text:i?o("assets.upload.open.tooltip","Upload this local file to Roblox through Open Cloud."):o("assets.proOnly.tooltip","Roblox upload is available on Pro."),children:t.jsxs("button",{type:"button",className:a.commandButton,disabled:!i,onClick:m,children:[t.jsx(Ft,{size:15}),o("assets.upload.open","Upload")]})}),n&&t.jsx(K,{text:l,children:t.jsxs("button",{type:"button",className:a.commandButton,disabled:s==="import-rbxm",onClick:()=>void V(),children:[t.jsx(xt,{size:15}),o("assets.detail.importRbxm","Insert into Studio")]})}),t.jsxs("button",{type:"button",className:a.commandButton,disabled:!O||s==="status-refresh",onClick:()=>void T(),children:[t.jsx(Qe,{size:15}),o("assets.detail.refreshStatus","Refresh")]}),t.jsxs("button",{type:"button",className:a.commandButton,disabled:!e.roblox.assetId||s==="usage-scan",onClick:()=>void h(),children:[t.jsx(Dt,{size:15}),o("assets.detail.scanUsage","Scan usage")]}),t.jsx(K,{text:o("assets.delete.tooltip","Delete this local Asset Library item."),children:t.jsxs("button",{type:"button",className:`${a.commandButton} ${a.dangerButton}`,disabled:s==="delete",onClick:E,children:[t.jsx(Tt,{size:15}),o("common.delete","Delete")]})}),t.jsx(K,{text:o("common.close","Close"),children:t.jsx("button",{type:"button",className:a.iconButton,onClick:y,"aria-label":o("common.close","Close"),children:t.jsx(Ue,{size:16})})})]})]}),t.jsxs("div",{className:a.detailDialogBody,children:[t.jsx("div",{className:a.detailPreviewPane,children:Ua(e)?t.jsx("img",{className:a.detailPreview,src:Da(e),alt:e.displayName}):t.jsxs("div",{className:a.detailPreviewFallback,children:[t.jsx("span",{children:ie(e,o)}),t.jsx("code",{children:e.file.original}),((P=e.rbxm)==null?void 0:P.thumbnail)&&t.jsx("small",{children:He(e)})]})}),t.jsxs("div",{className:a.detailContentPane,children:[t.jsxs("div",{className:a.formStack,children:[t.jsxs("label",{className:a.field,children:[t.jsx("span",{children:o("assets.detail.displayName","Display name")}),t.jsx("input",{value:G,onChange:r=>z(r.target.value)})]}),t.jsxs("label",{className:a.field,children:[t.jsx("span",{children:o("assets.detail.description","Description")}),t.jsx("textarea",{value:M,rows:3,onChange:r=>J(r.target.value)})]}),t.jsx("button",{type:"button",className:a.primaryButton,disabled:s==="update",onClick:()=>void S(G,M),children:o("assets.detail.save","Save metadata")})]}),t.jsxs("section",{className:a.detailSection,children:[t.jsx("h3",{children:o("assets.detail.localFile","Local file")}),t.jsxs("dl",{className:a.detailGrid,children:[t.jsx("dt",{children:o("assets.detail.fileName","File")}),t.jsx("dd",{children:e.file.original}),t.jsx("dt",{children:o("assets.detail.source","Source path")}),t.jsx("dd",{children:e.source.originalPath}),t.jsx("dt",{children:o("assets.detail.category","Category")}),t.jsx("dd",{children:ie(e,o)}),t.jsx("dt",{children:o("assets.detail.scope","Scope")}),t.jsx("dd",{children:e.scope.kind==="shared"?o("assets.scope.shared","Shared"):o("assets.scope.place","Current Place")}),t.jsx("dt",{children:o("assets.detail.mimeType","Type")}),t.jsx("dd",{children:e.file.mimeType}),t.jsx("dt",{children:o("assets.detail.size","Size")}),t.jsx("dd",{children:Ba(e.file.sizeBytes)}),Ke(e)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.dimensions","Dimensions")}),t.jsx("dd",{children:Ke(e)})]}),Ge(e)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.duration","Duration")}),t.jsx("dd",{children:Ge(e)})]})]})]}),e.rbxm&&t.jsxs("section",{className:a.detailSection,children:[t.jsx("h3",{children:o("assets.detail.rbxm","RBXM contents")}),t.jsxs("dl",{className:a.detailGrid,children:[t.jsx("dt",{children:o("assets.detail.rbxmExportedCount","Exported roots")}),t.jsx("dd",{children:e.rbxm.exportedCount}),t.jsx("dt",{children:o("assets.detail.rbxmClasses","Classes")}),t.jsx("dd",{children:Ea(e)}),t.jsx("dt",{children:o("assets.detail.rbxmThumbnail","Thumbnail")}),t.jsx("dd",{children:He(e)}),k&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.rbxmStudioUploadsLabel","Studio uploads")}),t.jsx("dd",{children:k})]}),n&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.studioInsertTarget","Studio insert target")}),t.jsx("dd",{children:A})]})]}),e.rbxm.roots.length>0&&t.jsxs("div",{className:a.metadataList,children:[t.jsx("strong",{children:o("assets.detail.rbxmRoots","Root tree")}),e.rbxm.roots.map(r=>t.jsxs("div",{className:a.metadataItem,children:[t.jsxs("span",{children:[r.name," (",r.className,")"]}),t.jsx("code",{children:r.path})]},`${r.path}-${r.className}`))]}),e.rbxm.resourceReferences.length>0&&t.jsxs("div",{className:a.metadataList,children:[t.jsx("strong",{children:o("assets.detail.rbxmReferences","Asset references")}),e.rbxm.resourceReferences.map((r,C)=>t.jsxs("div",{className:a.metadataItem,children:[t.jsxs("span",{children:[r.path," · ",r.property]}),t.jsx("code",{children:r.assetId?`${r.value} (#${r.assetId})`:r.value})]},`${r.path}-${r.property}-${C}`))]}),e.rbxm.studioUploads&&e.rbxm.studioUploads.length>0&&t.jsxs("div",{className:a.metadataList,children:[t.jsx("strong",{children:o("assets.detail.rbxmStudioUploads","Embedded Studio uploads")}),e.rbxm.studioUploads.map((r,C)=>t.jsxs("div",{className:a.metadataItem,children:[t.jsx("span",{children:Ga(r)}),t.jsx("code",{children:za(r)})]},`${r.path}-${r.assetType}-${r.sourceProperty??""}-${C}`))]}),e.rbxm.generation&&t.jsxs("div",{className:a.metadataList,children:[t.jsx("strong",{children:o("assets.detail.rbxmGeneration","Generated model")}),t.jsxs("div",{className:a.metadataItem,children:[t.jsx("span",{children:o("assets.detail.rbxmGenerationProvider","Provider")}),t.jsx("code",{children:e.rbxm.generation.provider})]}),e.rbxm.generation.prompt&&t.jsxs("div",{className:a.metadataItem,children:[t.jsx("span",{children:o("assets.detail.rbxmGenerationPrompt","Prompt")}),t.jsx("code",{children:e.rbxm.generation.prompt})]}),t.jsxs("div",{className:a.metadataItem,children:[t.jsx("span",{children:o("assets.detail.rbxmGenerationSchema","Schema")}),t.jsx("code",{children:Oa(e)})]}),e.rbxm.generation.path&&t.jsxs("div",{className:a.metadataItem,children:[t.jsx("span",{children:o("assets.detail.rbxmGenerationPath","Studio path")}),t.jsx("code",{children:e.rbxm.generation.path})]})]}),e.rbxm.review&&t.jsxs("div",{className:a.metadataList,children:[t.jsx("strong",{children:o("assets.detail.rbxmReview","Model review")}),t.jsxs("div",{className:a.metadataItem,children:[t.jsx("span",{children:o("assets.detail.rbxmReviewReadiness","Readiness")}),t.jsx("code",{children:e.rbxm.review.readiness})]}),t.jsxs("div",{className:a.metadataItem,children:[t.jsx("span",{children:o("assets.detail.rbxmReviewSummary","Summary")}),t.jsx("code",{children:Ta(e)})]}),e.rbxm.review.findings.slice(0,8).map((r,C)=>t.jsxs("div",{className:a.metadataItem,children:[t.jsxs("span",{children:[r.severity," · ",r.category," · ",r.code]}),t.jsx("code",{children:r.path?`${r.path}: ${r.message}`:r.message})]},`${r.code}-${r.path}-${C}`))]})]}),t.jsxs("section",{className:a.detailSection,children:[t.jsx("h3",{children:o("assets.detail.roblox","Roblox upload status")}),t.jsxs("dl",{className:a.detailGrid,children:[t.jsx("dt",{children:o("assets.detail.status","Status")}),t.jsx("dd",{children:Be(e.status,o)}),F?t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.decalAssetId","Roblox Decal ID")}),t.jsxs("dd",{className:a.copyableValue,children:[t.jsx("span",{children:v??o("assets.status.localOnly","Local only")}),t.jsx(fe,{label:o("assets.detail.copyDecalAssetId","Copy Roblox Decal ID"),value:v})]}),t.jsx("dt",{children:o("assets.detail.studioTextureImageId","Studio Texture Image ID")}),t.jsxs("dd",{className:a.copyableValue,children:[t.jsx("span",{children:b??"-"}),t.jsx(fe,{label:o("assets.detail.copyStudioTextureImageId","Copy Studio Texture Image ID"),value:b})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.assetId","Asset ID")}),t.jsxs("dd",{className:a.copyableValue,children:[t.jsx("span",{children:e.roblox.assetId??o("assets.status.localOnly","Local only")}),t.jsx(fe,{label:o("assets.detail.copyAssetId","Copy Asset ID"),value:e.roblox.assetId})]})]}),t.jsx("dt",{children:o("assets.detail.studioUri","Studio URI")}),t.jsx("dd",{children:e.roblox.assetUri??"-"}),t.jsx("dt",{children:o("assets.detail.robloxWebUrl","Creator Dashboard URL")}),t.jsxs("dd",{className:a.copyableValue,children:[t.jsx("span",{children:U??"-"}),t.jsx(fe,{label:o("assets.detail.copyWebUrl","Copy configure URL"),value:U})]}),e.roblox.errorMessage&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.error","Error")}),t.jsx("dd",{children:e.roblox.errorMessage})]})]}),t.jsxs("div",{className:a.copyRow,children:[t.jsxs("button",{type:"button",className:a.commandButton,disabled:!Q,onClick:()=>{var r;return e.roblox.assetUri&&void((r=navigator.clipboard)==null?void 0:r.writeText(e.roblox.assetUri))},children:[t.jsx(st,{size:15}),o("assets.detail.copyStudioUri","Copy Studio URI")]}),U&&t.jsxs("a",{className:a.commandButton,href:U,target:"_blank",rel:"noreferrer",children:[t.jsx(gt,{size:15}),o("assets.detail.openRobloxPage","Open configure page")]})]}),e.roblox.assetId&&t.jsx("p",{className:a.muted,children:o("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:a.metadataList,children:[t.jsx("strong",{children:o("assets.detail.uploadHistory","Upload history")}),ee.slice().reverse().map((r,C)=>t.jsxs("div",{className:a.metadataItem,children:[t.jsx("span",{children:Ka(r)}),ze(r)&&t.jsx("code",{children:ze(r)}),We(r)&&t.jsx("code",{children:We(r)}),r.operationPath&&t.jsx("code",{children:r.operationPath}),r.assetId&&t.jsxs("code",{children:[o("assets.detail.assetId","Asset ID"),": ",r.assetId]}),r.remotePath&&t.jsx("code",{children:r.remotePath}),r.message&&t.jsx("code",{children:r.message}),r.errorMessage&&t.jsx("code",{children:r.errorMessage})]},`${r.startedAt}-${r.operationPath??C}`))]})]}),t.jsxs("section",{className:a.detailSection,children:[t.jsx("h3",{children:o("assets.detail.usedInPlace","Where this asset is used in this Place")}),t.jsxs("dl",{className:a.detailGrid,children:[t.jsx("dt",{children:o("assets.detail.usageSource","Checked against")}),t.jsx("dd",{children:e.usage.scanSource==="localSync"?o("assets.detail.usageSource.localSync","Local Sync files"):o("assets.detail.usageSource.notScanned","Not checked yet")}),t.jsx("dt",{children:o("assets.detail.lastScanned","Last checked")}),t.jsx("dd",{children:e.usage.lastScannedAt?o("assets.detail.lastScannedAt","Last checked: {time}").replace("{time}",je(e.usage.lastScannedAt)):o("assets.detail.lastScanned.never","No check yet")})]}),e.usage.references.length===0?t.jsx("p",{className:a.muted,children:B}):t.jsx("div",{className:a.usageList,children:e.usage.references.map((r,C)=>t.jsxs("div",{className:a.usageItem,children:[t.jsx("strong",{children:r.kind==="property"?r.instancePath:r.filePath}),t.jsx("span",{children:r.property??o("assets.detail.line","line {line}").replace("{line}",String(r.line??"-"))}),t.jsx("code",{children:r.value})]},`${r.kind}-${C}`))})]}),t.jsxs("details",{className:a.technicalDetails,children:[t.jsx("summary",{children:o("assets.detail.technicalDetails","Technical details")}),t.jsxs("dl",{className:a.detailGrid,children:[t.jsx("dt",{children:o("assets.detail.stableId","Stable ID")}),t.jsx("dd",{className:a.hashText,children:e.id}),t.jsx("dt",{children:o("assets.detail.sourceKind","Source kind")}),t.jsx("dd",{children:e.source.kind}),t.jsx("dt",{children:o("assets.detail.sha256","SHA-256")}),t.jsx("dd",{className:a.hashText,children:e.file.sha256}),t.jsx("dt",{children:o("assets.detail.createdAt","Created")}),t.jsx("dd",{children:je(e.createdAt)}),t.jsx("dt",{children:o("assets.detail.updatedAt","Updated")}),t.jsx("dd",{children:je(e.updatedAt)}),e.roblox.operationId&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.operationId","Operation ID")}),t.jsx("dd",{className:a.hashText,children:e.roblox.operationId})]}),e.roblox.operationPath&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.operationPath","Operation path")}),t.jsx("dd",{className:a.hashText,children:e.roblox.operationPath})]}),e.roblox.versionId&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.versionId","Version ID")}),t.jsx("dd",{className:a.hashText,children:e.roblox.versionId})]}),e.roblox.remotePath&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.remotePath","Remote path")}),t.jsx("dd",{className:a.hashText,children:e.roblox.remotePath})]}),e.roblox.moderationState&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:o("assets.detail.moderationState","Moderation")}),t.jsx("dd",{children:e.roblox.moderationState})]})]}),((x=e.rbxm)==null?void 0:x.thumbnail.attempts)&&e.rbxm.thumbnail.attempts.length>0&&t.jsxs("div",{className:a.metadataList,children:[t.jsx("strong",{children:o("assets.detail.rbxmThumbnailAttempts","Thumbnail attempts")}),e.rbxm.thumbnail.attempts.map((r,C)=>t.jsxs("div",{className:a.metadataItem,children:[t.jsxs("span",{children:[r.method," · ",r.status]}),r.message&&t.jsx("code",{children:r.message})]},`${r.method}-${C}`))]})]})]})]})]})})}function it(e){return{assetUploadByOpenCloudEnabled:e.hot.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD===!0}}function Va(e){const s={};return typeof e.assetUploadByOpenCloudEnabled=="boolean"&&(s.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD=e.assetUploadByOpenCloudEnabled),s}async function ct(){const e=await L.get("/api/dashboard/settings");return it(e)}async function Ya(e){const s=await L.patch("/api/dashboard/settings",Va(e));return it(s)}async function dt(){return L.get("/api/dashboard/open-cloud/credential-profiles")}async function Xa(e){return L.post("/api/dashboard/open-cloud/credential-profiles",e)}async function qa(e){return L.patch("/api/dashboard/open-cloud/credential-profiles/active",{profileId:e})}async function Za(e,s){return L.put(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/api-key`,s)}async function Ja(e){return L.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}`)}async function Qa(e,s){return L.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators`,s)}async function en(e,s){return L.patch(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(s)}/default`,{})}async function tn(e,s){return L.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(s)}`)}async function sn(e,s){return L.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/test`,s?{creatorPresetId:s}:{})}async function an(e){return L.post("/api/dashboard/open-cloud/credential/test",e?{apiKey:e}:{})}function nn(e){return e.category==="image"||e.category==="decal"}function on(e,s){return e==="group"?s("assets.creator.group","Group"):s("assets.creator.user","User")}function rn(e,s){return`${e.label} · ${on(e.creatorType,s)} ${e.creatorId}`}function Ve(e){if(!e)return null;if(e.defaultCreatorId){const s=e.creators.find(i=>i.id===e.defaultCreatorId);if(s)return s}return e.creators[0]??null}function ln({asset:e,open:s,canUpload:i,busyAction:n,onClose:l,onBack:A,onOpenSettings:y,onUpload:S}){const{t:m}=me(),E=c.useRef(null),[V,T]=c.useState(null),[h,o]=c.useState(null),[Y,G]=c.useState(!1),[z,M]=c.useState(null),[J,O]=c.useState(""),[Q,U]=c.useState(""),[ee,F]=c.useState(""),[v,b]=c.useState("user"),[k,B]=c.useState("");if(c.useEffect(()=>{O((e==null?void 0:e.displayName)??""),U((e==null?void 0:e.description)??"")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),c.useEffect(()=>{if(!s)return;let g=!1;return G(!0),M(null),(async()=>{try{const[I,D]=await Promise.all([ct(),dt()]);if(g)return;T(I);const ae=D.profiles.find(de=>de.id===D.activeProfileId)??D.profiles[0]??null;o(ae);const $=Ve(ae);F(($==null?void 0:$.id)??""),b(($==null?void 0:$.creatorType)??"user"),B(($==null?void 0:$.creatorId)??"")}catch(I){if(g)return;M(I instanceof Error?I.message:m("assets.upload.settingsLoadFailed","Failed to load upload settings.")),T(null),o(null)}finally{g||G(!1)}})(),()=>{g=!0}},[s,m]),c.useEffect(()=>{var I;if(!s||!e)return;(I=E.current)==null||I.focus();const g=D=>{D.key==="Escape"&&l()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[e,l,s]),!s||!e)return null;const P=(V==null?void 0:V.assetUploadByOpenCloudEnabled)===!0,x=!!h,r=Ve(h),C=(h==null?void 0:h.creators.find(g=>g.id===ee))??null,te=!!r,q=(h==null?void 0:h.storageProvider)==="env"&&x&&!te,H=q&&k.trim().length>0,p=i&&!Y&&!z&&(!P||!x||!te&&!q),Z=i&&!Y&&!z&&P&&x&&(te||H)&&n!=="upload";return t.jsx("div",{className:a.detailPopupLayer,onClick:l,role:"presentation",children:t.jsxs("section",{ref:E,className:a.detailDialog,role:"dialog","aria-modal":"true","aria-label":m("assets.upload.title","Upload asset"),tabIndex:-1,onClick:g=>g.stopPropagation(),children:[t.jsxs("div",{className:a.detailDialogHeader,children:[t.jsxs("div",{className:a.detailTitleBlock,children:[t.jsxs("span",{className:a.detailEyebrow,children:[ie(e,m)," · ",m("assets.upload.intent","Upload to Roblox")]}),t.jsx("h2",{children:m("assets.upload.title","Upload asset")}),t.jsx("span",{children:e.displayName})]}),t.jsxs("div",{className:a.detailHeaderActions,children:[t.jsxs("button",{type:"button",className:a.commandButton,onClick:A,children:[t.jsx(St,{size:15}),m("assets.upload.backToDetails","Back to details")]}),t.jsx(K,{text:m("common.close","Close"),children:t.jsx("button",{type:"button",className:a.iconButton,onClick:l,"aria-label":m("common.close","Close"),children:t.jsx(Ue,{size:16})})})]})]}),t.jsxs("div",{className:a.detailDialogBody,children:[t.jsx("div",{className:a.detailPreviewPane,children:nn(e)?t.jsx("img",{className:a.detailPreview,src:nt(e),alt:e.displayName}):t.jsxs("div",{className:a.detailPreviewFallback,children:[t.jsx("span",{children:ie(e,m)}),t.jsx("code",{children:e.file.original})]})}),t.jsxs("div",{className:a.detailContentPane,children:[!i&&t.jsx("div",{className:a.notice,children:m("assets.proOnly.upload","Roblox upload is available on Pro.")}),Y&&t.jsx("div",{className:a.notice,children:m("assets.upload.checkingSettings","Checking upload settings...")}),z&&t.jsx("div",{className:a.errorState,children:z}),t.jsxs("dl",{className:a.compactMeta,children:[t.jsx("dt",{children:m("assets.detail.category","Category")}),t.jsx("dd",{children:ie(e,m)}),t.jsx("dt",{children:m("assets.detail.source","Source")}),t.jsx("dd",{children:e.source.originalPath})]}),p&&t.jsxs("div",{className:a.setupNotice,children:[t.jsx("strong",{children:m("assets.upload.settingsRequired","Upload settings required")}),t.jsx("p",{children:x?P?m("assets.upload.settingsRequired.creator","Save a default Creator before uploading."):m("assets.upload.settingsRequired.toggle","Enable Open Cloud upload before uploading."):m("assets.upload.settingsRequired.apiKey","Save an Open Cloud API key before uploading.")}),t.jsxs("button",{type:"button",className:a.commandButton,onClick:y,children:[t.jsx(et,{size:15}),m("assets.upload.openSettings","Open Asset Library settings")]})]}),t.jsxs("div",{className:a.formStack,children:[t.jsxs("label",{className:a.field,children:[t.jsx("span",{children:m("assets.detail.displayName","Display name")}),t.jsx("input",{value:J,disabled:!i,onChange:g=>O(g.target.value)}),t.jsx("small",{className:a.fieldHelp,children:m("assets.upload.displayNameHelp","Saved to Roblox as the asset display name.")})]}),t.jsxs("label",{className:a.field,children:[t.jsx("span",{children:m("assets.detail.description","Description")}),t.jsx("textarea",{value:Q,rows:3,disabled:!i,onChange:g=>U(g.target.value)}),t.jsx("small",{className:a.fieldHelp,children:m("assets.upload.descriptionHelp","Saved to Roblox as the asset description.")})]}),te&&t.jsxs("label",{className:a.field,children:[t.jsx("span",{children:m("assets.upload.creator","Creator")}),t.jsx("select",{"aria-label":m("assets.upload.creator","Creator"),value:ee,disabled:!i||Y,onChange:g=>F(g.target.value),children:h==null?void 0:h.creators.map(g=>t.jsx("option",{value:g.id,children:rn(g,m)},g.id))}),t.jsx("small",{className:a.fieldHelp,children:m("assets.upload.creatorHelp","Used by Open Cloud as the owner of the uploaded asset.")})]}),q&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:a.inlineHelp,children:m("assets.upload.envCreatorHelp","Environment API keys cannot save a default Creator here. Enter the Creator for this upload.")}),t.jsxs("div",{className:a.twoColumn,children:[t.jsxs("label",{className:a.field,children:[t.jsx("span",{children:m("assets.upload.creatorType","Creator type")}),t.jsxs("select",{value:v,disabled:!i,onChange:g=>b(g.target.value),children:[t.jsx("option",{value:"user",children:m("assets.creator.user","User")}),t.jsx("option",{value:"group",children:m("assets.creator.group","Group")})]}),t.jsx("small",{className:a.fieldHelp,children:m("assets.upload.creatorTypeHelp","Sent to Open Cloud as the Creator type.")})]}),t.jsxs("label",{className:a.field,children:[t.jsx("span",{children:m("assets.upload.creatorId","Creator ID")}),t.jsx("input",{value:k,disabled:!i,onChange:g=>B(g.target.value)}),t.jsx("small",{className:a.fieldHelp,children:m("assets.upload.creatorIdHelp","Sent to Open Cloud as the User or Group ID that owns the uploaded asset.")})]})]})]}),t.jsx("button",{type:"button",className:a.primaryButton,disabled:!Z,onClick:()=>{const g=k.trim(),I=q&&g?{creatorType:v,creatorId:g}:{},D=!q&&C&&r&&C.id!==r.id?{creatorType:C.creatorType,creatorId:C.creatorId}:{};S({displayName:J,description:Q,...I,...D})},children:n==="upload"?m("assets.upload.uploading","Uploading..."):m("assets.upload.submit","Upload with Roblox Open Cloud")})]}),t.jsxs("div",{className:a.noticeList,children:[t.jsx("p",{children:m("assets.upload.noDelete","WEPPY does not provide Roblox asset deletion.")}),t.jsx("p",{children:m("assets.upload.delay","Roblox processing and moderation can delay visibility in Studio or Creator Dashboard.")})]})]})]})]})})}function Ye(e,s){return e==="env"?s("assets.settings.credential.env","Environment variable"):s("assets.settings.credential.local","Local encrypted file")}function Re(e,s){return e==="valid"?s("assets.settings.validation.valid","Connected"):e==="invalid"?s("assets.settings.validation.invalid","Needs attention"):s("assets.settings.validation.unknown","Not tested")}function cn(e,s){return(e==null?void 0:e.status)==="valid"?s("assets.settings.apiKeyTested","Open Cloud API key connection tested."):(e==null?void 0:e.message)??s("assets.settings.tested","Connection tested.")}function dn(e,s){return(e==null?void 0:e.status)==="valid"?s("assets.settings.apiKeyTested","Open Cloud API key connection tested."):(e==null?void 0:e.message)??s("assets.settings.tested","Connection tested.")}function un(e,s){return e==="group"?s("assets.creator.group","Group"):s("assets.creator.user","User")}function pn(e,s){return`${un(e.creatorType,s)} ${e.creatorId}`}function mn({open:e,tier:s,onClose:i}){const{t:n}=me(),[l,A]=c.useState(null),[y,S]=c.useState(null),[m,E]=c.useState(""),[V,T]=c.useState(!1),[h,o]=c.useState(""),[Y,G]=c.useState(""),[z,M]=c.useState("user"),[J,O]=c.useState(""),[Q,U]=c.useState(""),[ee,F]=c.useState(!0),[v,b]=c.useState(null),[k,B]=c.useState(null),[P,x]=c.useState(!1),r=s==="basic",C=c.useCallback(async()=>{x(!0),b(null);try{const[u,N]=await Promise.all([ct(),dt()]);A(u),S(N);const w=N.profiles.find(re=>re.id===N.activeProfileId)??N.profiles[0]??null;E((w==null?void 0:w.id)??""),T(!w),F(!w||w.creators.length===0),M("user"),O(""),U("")}catch(u){b(u instanceof Error?u.message:n("assets.settings.loadFailed","Failed to load upload settings."))}finally{x(!1)}},[n]);if(c.useEffect(()=>{e&&C()},[C,e]),!e)return null;const te=(l==null?void 0:l.assetUploadByOpenCloudEnabled)===!0,X=Y.trim(),q=J.trim(),H=(y==null?void 0:y.profiles)??[],p=H.find(u=>u.id===m)??H[0]??null,Z=!!p,g=Z&&(p==null?void 0:p.storageProvider)==="localFile",I=Z&&(p==null?void 0:p.storageProvider)==="env",D=p!=null&&p.defaultCreatorId?p.creators.find(u=>u.id===p.defaultCreatorId):p==null?void 0:p.creators[0],ae=!!(p!=null&&p.creators.length),$=!ae||ee,de=H.length>1,oe=r?n("assets.settings.action.proRequired","Asset upload settings are available on Pro."):P?n("assets.settings.action.busy","Wait for the current settings action to finish."):null,_e=r||P||!X,Se=oe??(X?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.")),he=r||P||!X&&!Z,xe=oe??(X?n("assets.settings.testConnection.tooltip.entered","Test the entered API key before saving it."):Z?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.")),ge=r||P||!g,be=oe??(g?n("assets.settings.removeApiKey.tooltip.ready","Remove the locally saved Open Cloud API key."):I?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.")),Ie=r||P||!g||!q,Ne=oe??(I?n("assets.settings.saveCreator.tooltip.env","Environment API keys cannot save a default Creator here. Enter Creator details in the upload dialog."):g?q?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.")),Ae=oe??(g?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.")),ke=r||P||I||!g,d=oe??(g?n("assets.settings.unregisterCreator.tooltip.ready","Unregister this Creator from the selected profile."):I?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"),j=(p==null?void 0:p.label)??n("assets.settings.credential.none","No API key saved"),_=u=>{const N=u.profiles.find(w=>w.id===u.activeProfileId)??u.profiles[0]??null;S(u),E((N==null?void 0:N.id)??""),F(!N||N.creators.length===0),T(u.profiles.length===0)},R=async()=>{if(p){x(!0);try{const u=await sn(p.id,D==null?void 0:D.id);_(u),b(dn(u.validation,n))}catch(u){b(u instanceof Error?u.message:n("assets.settings.testFailed","Connection test failed."))}finally{x(!1)}}},W=async()=>{if(k){x(!0);try{if(k.kind==="apiKey"){const u=await Ja(k.profileId);_(u),b(n("assets.settings.apiKeyRemoved","Open Cloud API key unregistered from local storage."))}else{const u=await tn(k.profileId,k.creatorPresetId);_(u),b(n("assets.settings.creatorUnregistered","Creator unregistered from this profile."))}B(null)}catch(u){b(u instanceof Error?u.message:k.kind==="apiKey"?n("assets.settings.removeFailed","Failed to unregister API key."):n("assets.settings.creatorUnregisterFailed","Failed to unregister Creator."))}finally{x(!1)}}},ue=(k==null?void 0:k.kind)==="apiKey"?n("assets.settings.unregisterApiKey.title","Unregister API Key?"):n("assets.settings.unregisterCreator.title","Unregister Creator?"),ut=(k==null?void 0:k.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."),pt=(k==null?void 0:k.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:`${a.settingsInlinePanel} ${a.settingsDrawer}`,role:"region","aria-label":n("assets.settings.title","Asset Library settings"),"data-panel-placement":"toolbar-popover",children:[t.jsxs("div",{className:a.drawerHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:n("assets.settings.title","Asset Library settings")}),t.jsx("span",{children:j})]}),t.jsx(K,{text:n("common.close","Close"),children:t.jsx("button",{type:"button",className:a.iconButton,onClick:i,"aria-label":n("common.close","Close"),children:t.jsx(Ue,{size:16})})})]}),r&&t.jsx("div",{className:`${a.notice} ${a.proNotice}`,children:n("assets.settings.proOnly","Roblox upload settings and Open Cloud credential controls are available on Pro.")}),t.jsxs("section",{className:a.settingsPanel,children:[t.jsxs("label",{className:a.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(Ct,{checked:te,disabled:r||P,onChange:u=>{(async()=>{x(!0);try{const N=await Ya({assetUploadByOpenCloudEnabled:u.target.checked});A(N),b(n("assets.settings.saved","Upload settings saved."))}catch(N){b(N instanceof Error?N.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{x(!1)}})()}})]}),de&&t.jsx("div",{className:a.metadataList,children:H.map(u=>{const N=u.id===(p==null?void 0:p.id);return t.jsxs("div",{className:a.metadataItem,children:[t.jsx("strong",{children:u.label}),t.jsxs("span",{children:[n("assets.settings.field.storage","Storage"),": ",Ye(u.storageProvider,n)]}),t.jsxs("span",{children:[n("assets.settings.field.validationStatus","Validation status"),": ",Re(u.validationStatus,n)]}),N&&t.jsx("code",{children:n("assets.settings.activeProfileBadge","Active")}),!N&&u.storageProvider==="localFile"&&t.jsx("button",{type:"button",className:a.commandButton,disabled:r||P,onClick:()=>{(async()=>{x(!0);try{const w=await qa(u.id),re=w.profiles.find(Pe=>Pe.id===(w.activeProfileId??u.id))??u;S(w),E(re.id),F(re.creators.length===0),M("user"),O(""),U(""),b(n("assets.settings.profileSelected","Open Cloud credential profile selected."))}catch(w){b(w instanceof Error?w.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{x(!1)}})()},children:n("assets.settings.useProfile","Use profile")})]},u.id)})}),p&&t.jsxs("div",{className:a.settingsSubsection,children:[t.jsx("div",{className:a.settingsSectionHeader,children:t.jsx("h3",{children:n("assets.settings.credentialProfile","Credential Profile")})}),t.jsxs("div",{className:a.metadataItem,children:[t.jsxs("dl",{className:a.settingsDefinitionList,children:[t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.profile","Profile")}),t.jsx("dd",{children:p.label})]}),p.maskedKey&&t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.apiKey","API Key")}),t.jsx("dd",{children:p.maskedKey})]}),t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.storage","Storage")}),t.jsx("dd",{children:Ye(p.storageProvider,n)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.validationStatus","Validation status")}),t.jsx("dd",{children:Re(p.validationStatus,n)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:n("assets.settings.field.creators","Creators")}),t.jsx("dd",{children:p.creators.length})]})]}),!V&&t.jsxs("div",{className:a.buttonRow,children:[t.jsx(K,{text:xe,children:t.jsx("button",{type:"button",className:a.commandButton,disabled:he,onClick:()=>{R()},children:n("assets.settings.testConnection","Test Connection")})}),g&&t.jsx("button",{type:"button",className:a.commandButton,disabled:r||P,onClick:()=>T(!0),children:n("assets.settings.replaceApiKey","Replace API Key")}),t.jsx(K,{text:be,children:t.jsx("button",{type:"button",className:`${a.commandButton} ${a.dangerButton}`,disabled:ge,onClick:()=>B({kind:"apiKey",profileId:p.id}),children:n("assets.settings.removeApiKey","Unregister API Key")})})]})]})]}),V&&t.jsxs("div",{className:a.formStack,children:[t.jsxs("div",{className:a.field,children:[t.jsx("div",{className:a.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:h,disabled:r||P,onChange:u=>o(u.target.value),placeholder:n("assets.settings.profileLabel.placeholder","Studio automation key")}),t.jsx("p",{className:a.inlineHelp,children:n("assets.settings.profileLabel.help","Optional. If left blank, WEPPY saves this profile as Open Cloud key automatically.")})]}),t.jsxs("div",{className:a.field,children:[t.jsxs("div",{className:a.fieldLabelRow,children:[t.jsx("label",{htmlFor:"asset-settings-open-cloud-api-key",children:n("assets.settings.apiKey","Open Cloud API Key")}),t.jsx(Ee,{topicId:"openCloudApiKey",variant:"field",state:{hasOpenCloudCredential:Z}})]}),t.jsx("input",{id:"asset-settings-open-cloud-api-key",value:Y,type:"password",disabled:r||P,onChange:u=>G(u.target.value)}),t.jsx("p",{className:a.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.")})]}),!Z&&t.jsx("p",{className:a.inlineHelp,children:t.jsx("a",{href:jt["open_cloud.api_key"].docsUrl,target:"_blank",rel:"noreferrer",children:n("assets.settings.apiKeyGuide","Create a Roblox API key with Assets Read and Write permissions.")})}),t.jsxs("div",{className:a.buttonRow,children:[t.jsx(K,{text:Se,children:t.jsx("button",{type:"button",className:a.commandButton,disabled:_e,onClick:()=>{(async()=>{var u;x(!0);try{const N={apiKey:X,...h.trim()?{label:h.trim()}:{}},w=(p==null?void 0:p.storageProvider)==="localFile"?await Za(p.id,N):await Xa(N),re=w.profiles.find(Pe=>{var De;return Pe.id===(w.activeProfileId??((De=w.profile)==null?void 0:De.id))});S(w),E(w.activeProfileId??((u=w.profile)==null?void 0:u.id)??""),F(!re||re.creators.length===0),T(!1),G(""),o(""),b(n("assets.settings.apiKeySaved","Open Cloud API key saved locally."))}catch(N){b(N instanceof Error?N.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{x(!1)}})()},children:n("assets.settings.saveApiKey","Save API Key")})}),t.jsx(K,{text:xe,children:t.jsx("button",{type:"button",className:a.commandButton,disabled:he,onClick:()=>{(async()=>{x(!0);try{const u=await an(X||void 0);b(cn(u.validation,n))}catch(u){b(u instanceof Error?u.message:n("assets.settings.testFailed","Connection test failed."))}finally{x(!1)}})()},children:n("assets.settings.testConnection","Test Connection")})}),t.jsx(K,{text:be,children:t.jsx("button",{type:"button",className:`${a.commandButton} ${a.dangerButton}`,disabled:ge,onClick:()=>{p&&B({kind:"apiKey",profileId:p.id})},children:n("assets.settings.removeApiKey","Unregister API Key")})})]})]}),t.jsx("div",{className:a.metadataList,children:p==null?void 0:p.creators.map(u=>t.jsxs("div",{className:a.metadataItem,children:[t.jsx("strong",{children:u.label}),t.jsx("span",{children:pn(u,n)}),u.id===p.defaultCreatorId&&t.jsx("code",{children:n("assets.settings.defaultCreatorBadge","Default")}),t.jsxs("span",{children:[n("assets.settings.field.validationStatus","Validation status"),": ",Re(u.validationStatus,n)]}),t.jsxs("div",{className:a.buttonRow,children:[u.id!==p.defaultCreatorId&&p.storageProvider==="localFile"&&t.jsx("button",{type:"button",className:a.commandButton,disabled:r||P,onClick:()=>{(async()=>{if(p){x(!0);try{const N=await en(p.id,u.id);S(N),b(n("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(N){b(N instanceof Error?N.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{x(!1)}}})()},children:n("assets.settings.makeDefaultCreator","Make default")}),t.jsx(K,{text:d,children:t.jsx("button",{type:"button",className:`${a.commandButton} ${a.dangerButton}`,disabled:ke,onClick:()=>B({kind:"creator",profileId:p.id,creatorPresetId:u.id}),children:n("assets.settings.unregisterCreator","Unregister Creator")})})]})]},u.id))}),ae&&!ee&&t.jsx(K,{text:Ae,children:t.jsx("button",{type:"button",className:a.commandButton,disabled:r||P||I||!g,onClick:()=>{M("user"),O(""),U(""),F(!0)},children:n("assets.settings.addCreator","Add Creator")})}),$&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:a.twoColumn,children:[t.jsxs("div",{className:a.field,children:[t.jsx("div",{className:a.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:z,disabled:r||P||I||!g,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:a.field,children:[t.jsxs("div",{className:a.fieldLabelRow,children:[t.jsx("label",{htmlFor:"asset-settings-creator-id",children:n("assets.upload.creatorId","Creator ID")}),t.jsx(Ee,{topicId:"openCloudCreatorId",variant:"field",state:{hasDefaultCreator:!!D}})]}),t.jsx("input",{id:"asset-settings-creator-id",value:J,disabled:r||P||I||!g,onChange:u=>O(u.target.value)}),t.jsx("p",{className:a.inlineHelp,children:n("assets.settings.creatorId.inlineHelp","Default owner for new Roblox assets: your User ID or a Group ID.")})]})]}),t.jsxs("div",{className:a.field,children:[t.jsx("div",{className:a.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:r||P||I||!g,onChange:u=>U(u.target.value),placeholder:n("assets.settings.creatorLabel.placeholder","Main studio group")}),t.jsx("p",{className:a.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:a.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:a.buttonRow,children:[t.jsx(K,{text:Ne,children:t.jsx("button",{type:"button",className:a.primaryButton,disabled:Ie,onClick:()=>{(async()=>{if(p){x(!0);try{const u=await Qa(p.id,{creatorType:z,creatorId:q,makeDefault:!D,...Q.trim()?{label:Q.trim()}:{}});S(u),O(""),U(""),F(!1),b(n("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(u){b(u instanceof Error?u.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{x(!1)}}})()},children:f})}),ae&&t.jsx("button",{type:"button",className:a.commandButton,disabled:r||P,onClick:()=>{M("user"),O(""),U(""),F(!1)},children:n("assets.settings.cancelCreator","Cancel")})]})]})]}),v&&t.jsx("div",{className:a.messageState,children:v}),t.jsx(tt,{open:k!==null,title:ue,message:ut,cancelLabel:n("common.cancel","Cancel"),confirmLabel:pt,loading:P,onCancel:()=>B(null),onConfirm:()=>{W()}})]})}const hn=12,xn=5e3;function le(e,s){return e instanceof Error&&e.message.trim().length>0?e.message:s}function Xe(e,s){return e.some(n=>n.id===s.id)?e.map(n=>n.id===s.id?s:n):[s,...e]}function qe(e,s){return e.id!==s.id||e.category!==s.category||e.scope.kind!==s.scope.kind?!1:e.scope.kind==="shared"||s.scope.kind==="place"&&e.scope.placeId===s.scope.placeId}function gn(e,s){return e.some(i=>qe(i,s))?e.map(i=>qe(i,s)?s:i):e}function $e(e,s){return Qt(e.filter(i=>Jt(i,s)))}function pe(e,s){return e?`${e.displayName} (${e.id})`:s??"unknown asset"}function bn(e){return e.length===0?"none":e.map(s=>pe(s)).join(", ")}function Ze(e){const s=`status ${e.status}`;return e.roblox.assetId?`Roblox asset ${e.roblox.assetId}; ${s}`:s}function fn(e,s){const i=pe(s);return e==="update"?`Updated metadata for asset: ${i}.`:e==="upload"?`Uploaded asset: ${i} -> ${Ze(s)}.`:e==="thumbnail-generate"?`Generated thumbnail for asset: ${i}.`:e==="status-refresh"?`Refreshed Roblox status for asset: ${i} -> ${Ze(s)}.`:e==="usage-scan"?`Scanned usage for asset: ${i} -> ${s.usage.references.length} reference(s).`:`Updated asset: ${i}.`}function yn(e){return e!=="upload"&&e!=="status-refresh"}function we(e,s){if((s==null?void 0:s.id)===e)return s.category;const i=/^asset_(image|decal|audio|mesh|model|video|animation)_/.exec(e);return i!=null&&i[1]?i[1]:null}function Je(e){return e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath)}function jn(e){return{scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0,category:e.category}}function vn(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 s=e.places[0];return{placeId:(s==null?void 0:s.placeId)??null,placeName:(s==null?void 0:s.placeName)??null,studioConnected:!1}}function Cn(e,s){if(typeof s=="number"){const i=e.places.find(n=>n.placeId===s);if(i)return{placeId:i.placeId,placeName:i.placeName,studioConnected:i.isConnected,overrideStillValid:!0}}return{...vn(e),overrideStillValid:s===null}}function _n(){const[e,s]=c.useState([]),[i,n]=c.useState(0),[l,A]=c.useState(null),[y,S]=c.useState("place"),[m,E]=c.useState("all"),[V,T]=c.useState([]),[h,o]=c.useState(null),[Y,G]=c.useState(null),[z,M]=c.useState(null),[J,O]=c.useState(null),[Q,U]=c.useState(!1),[ee,F]=c.useState(!1),[v,b]=c.useState(!0),[k,B]=c.useState(null),[P,x]=c.useState(null),[r,C]=c.useState(null),te=c.useRef(!0),X=c.useRef(new Map),q=c.useRef(new Set),H=c.useMemo(()=>e.find(d=>d.id===l)??null,[e,l]),p=c.useCallback(d=>{const f=X.current.get(d);f!==void 0&&(clearTimeout(f),X.current.delete(d))},[]),Z=c.useCallback((d,f=hn)=>{if(!Je(d)||f<=0){p(d.id);return}q.current.has(d.id)||(p(d.id),q.current.add(d.id),(async()=>{try{const j=await Oe(jn(d),d.id);if(!te.current)return;if(s(_=>gn(_,j)),Je(j)&&f>1){const _=setTimeout(()=>{X.current.delete(j.id),Z(j,f-1)},xn);X.current.set(j.id,_);return}p(j.id)}catch(j){if(!te.current)return;p(d.id),x(le(j,"Asset Library status refresh failed."))}finally{q.current.delete(d.id)}})())},[p]);c.useEffect(()=>()=>{te.current=!1;for(const d of X.current.values())clearTimeout(d);X.current.clear(),q.current.clear()},[]);const g=c.useCallback(()=>({scope:y,placeId:y==="place"?z:void 0}),[z,y]),I=c.useCallback(d=>({...g(),category:d}),[g]),D=c.useCallback(async()=>{try{const d=await bt(),f=Cn(d,h);return T(d.places),f.overrideStillValid||o(null),G(f.placeId),M(f.placeId),O(f.placeName),U(f.studioConnected),F(f.studioConnected),f.placeId}catch{return T([]),G(null),M(null),O(null),U(!1),F(!1),null}},[h]),ae=c.useCallback(async()=>{x(null);try{const d=await D(),f={scope:y,placeId:y==="place"?d:void 0};if(y==="place"&&d===null){s([]),n(0),b(!1),x("No active place is connected for place-scoped assets.");return}const j=await Promise.all(Me(m).map(R=>Mt({...f,category:R}))),_=$e(j.flatMap(R=>R.assets),m);s(_),n(_.length);for(const R of _)Z(R)}catch(d){x(le(d,"Failed to load Asset Library."))}finally{b(!1)}},[m,D,y,Z]);c.useEffect(()=>{ae()},[ae]);const $=c.useCallback(async(d,f,j)=>{const _=we(f,H);if(!_)return x("Asset category is unavailable."),null;B(d),x(null),C(null);try{const R=await j(I(_));return s(W=>Xe(W,R)),A(R.id),yn(d)&&C(fn(d,R)),R}catch(R){return x(le(R,"Asset Library action failed.")),null}finally{B(null)}},[I,H]),de=c.useCallback(async()=>{B("rescan"),x(null),C(null);try{const d=await Promise.all(Me(m).map(W=>Ht(I(W)))),f=$e(d.flatMap(W=>W.assets),m),j=d.reduce((W,ue)=>W+ue.adoptedCount,0),_=d.reduce((W,ue)=>W+ue.skippedCount,0),R=$e(d.flatMap(W=>W.adopted),m);s(f),n(f.length),C(`Rescan complete for ${m}: ${j} asset(s) added, ${_} skipped. Added: ${bn(R)}.`)}catch(d){x(le(d,"Asset Library rescan failed."))}finally{B(null)}},[m,I]),oe=c.useCallback(async(d,f)=>{B("export-selection-rbxm"),x(null),C(null);try{const j=await Vt(I(d),f);return s(_=>Xe(_,j.asset)),A(j.asset.id),C(`Exported Studio selection as RBXM asset: ${pe(j.asset)}${j.deduplicated?" (reused existing local asset)":""}.`),j}catch(j){return x(le(j,"Asset Library .rbxm export failed.")),null}finally{B(null)}},[I]),_e=c.useCallback((d,f)=>$("update",d,j=>Kt(j,d,f)),[$]),Se=c.useCallback(async(d,f)=>{const j=await $("upload",d,_=>zt(_,d,f));return j&&Z(j),j},[$,Z]),he=c.useCallback(async d=>{const f=we(d,H);if(!f)return x("Asset category is unavailable."),!1;p(d);const j=e.find(_=>_.id===d)??H;B("delete"),x(null),C(null);try{return await Gt(I(f),d),s(_=>{const R=_.filter(W=>W.id!==d);return n(R.length),R}),A(_=>_===d?null:_),C(`Deleted asset: ${pe(j,d)}. Local files removed; uploaded Roblox assets were not deleted.`),!0}catch(_){return x(le(_,"Asset Library delete failed.")),!1}finally{B(null)}},[e,p,I,H]),xe=c.useCallback(async(d,f)=>{const j=we(d,H);if(!j)return x("Asset category is unavailable."),null;const _=e.find(R=>R.id===d)??H;B("import-rbxm"),x(null),C(null);try{const R=await Yt(I(j),d,f);return A(d),C(`Imported RBXM asset: ${pe(_,d)} -> ${R.importedCount} instance(s) to ${R.targetParent}.`),R}catch(R){return x(le(R,"Asset Library .rbxm import failed.")),null}finally{B(null)}},[e,I,H]),ge=c.useCallback(d=>$("thumbnail-generate",d,f=>Xt(f,d)),[$]),be=c.useCallback(d=>(p(d),$("status-refresh",d,f=>Oe(f,d))),[p,$]),Ie=c.useCallback((d,f)=>$("usage-scan",d,async j=>(await Wt(j,d,f)).asset),[$]),Ne=c.useCallback(d=>{S(d),A(null)},[]),Ae=c.useCallback(d=>{o(d),A(null)},[]),ke=c.useCallback(d=>{Zt(d)&&(E(d),A(null))},[]);return{assets:e,totalCount:i,selectedAsset:H,selectedAssetId:l,scope:y,categoryFilter:m,availablePlaces:V,selectedPlaceId:Y,activePlaceId:z,activePlaceName:J,selectedPlaceIsConnected:Q,studioConnected:ee,loading:v,busyAction:k,error:P,lastMessage:r,setScope:Ne,setSelectedPlaceId:Ae,setCategoryFilter:ke,selectAsset:A,refresh:ae,rescan:de,exportSelectionRbxm:oe,updateMetadata:_e,uploadAsset:Se,deleteAsset:he,importRbxm:xe,generateThumbnail:ge,refreshStatus:be,scanUsage:Ie}}function Sn(e,s){return s("assets.count.shown","Shown assets: {count}").replace("{count}",String(e))}function In(e,s){return e===null?null:s("assets.place.id","Place ID {placeId}").replace("{placeId}",String(e))}function Ln(){const{t:e}=me(),{trackEvent:s}=ft(),{tier:i,loading:n}=yt(),l=_n(),[A,y]=c.useState(!1),[S,m]=c.useState(!1),[E,V]=c.useState(!1),T=!n&&i==="pro",h=l.selectedAsset,o=(h==null?void 0:h.file.original.toLowerCase().endsWith(".rbxm"))??!1,Y=(h==null?void 0:h.category)==="model"||(h==null?void 0:h.category)==="animation",G="game.Workspace",M=!!(T&&l.studioConnected&&h&&o&&Y),J=l.availablePlaces??[],O=l.selectedPlaceId??l.activePlaceId,Q=c.useMemo(()=>l.scope==="shared"?[e("assets.scope.shared","Shared")]:[l.activePlaceName??e("assets.scope.place","Current Place"),In(l.activePlaceId,e),l.selectedPlaceIsConnected?e("assets.place.connected","Connected"):null].filter(v=>!!v),[l.activePlaceId,l.activePlaceName,l.scope,l.selectedPlaceIsConnected,e]),U=c.useMemo(()=>Le(l.categoryFilter,e),[l.categoryFilter,e]),ee=Sn(l.totalCount,e),F=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:a.page,children:[t.jsx(vt,{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:a.experimentalBadge,children:e("assets.experimental","Experimental")}),helpTopicId:"assets",helpState:{tier:i}}),t.jsxs("div",{className:a.toolbarShell,children:[t.jsxs("div",{className:a.toolbar,children:[t.jsxs("div",{className:a.segmented,role:"group","aria-label":e("assets.scope.label","Asset scope"),children:[t.jsx("button",{type:"button",className:l.scope==="place"?a.segmentedActive:"",onClick:()=>l.setScope("place"),children:e("assets.scope.place","Current Place")}),t.jsx("button",{type:"button",className:l.scope==="shared"?a.segmentedActive:"",onClick:()=>l.setScope("shared"),children:e("assets.scope.shared","Shared")})]}),l.scope==="place"&&J.length>0?t.jsxs("label",{className:a.placeSelectorLabel,children:[t.jsx("span",{children:e("assets.place.selector","Asset place")}),t.jsx("select",{className:a.placeSelect,value:typeof O=="number"?String(O):"",onChange:v=>{const b=Number.parseInt(v.currentTarget.value,10);Number.isInteger(b)&&l.setSelectedPlaceId(b)},children:J.map(v=>t.jsxs("option",{value:v.placeId,children:[v.placeName," (",v.placeId,")"]},v.placeId))})]}):null,t.jsxs("div",{className:a.listContextSummary,children:[Q.map((v,b)=>t.jsxs("span",{children:[b>0?t.jsx("span",{className:a.contextDivider,children:" · "}):null,v]},`${v}-${b}`)),t.jsx("span",{className:a.contextDivider,children:" · "}),t.jsx("span",{children:U}),t.jsx("span",{className:a.contextDivider,children:" · "}),t.jsx("strong",{children:ee})]}),t.jsxs("div",{className:a.toolbarActions,children:[t.jsx(K,{text:e("assets.rescan.tooltip","Scan inbox folders for the current filter."),children:t.jsxs("button",{type:"button",className:a.commandButton,disabled:l.busyAction==="rescan",onClick:()=>{s("dashboard_click_event",{click_target:"assets_rescan",page:"assets"}),l.rescan()},children:[t.jsx(Qe,{size:15}),e("assets.rescan","Rescan")]})}),t.jsx(K,{text:S?"":e("assets.settings.open.tooltip","Open Roblox upload settings."),children:t.jsx("button",{type:"button",className:[a.iconButton,S?a.iconButtonActive:""].filter(Boolean).join(" "),onClick:()=>{s("dashboard_click_event",{click_target:"assets_open_settings",page:"assets"}),m(v=>!v)},"aria-label":e("assets.settings.open","Open settings"),"aria-controls":"asset-library-settings-panel","aria-expanded":S,children:t.jsx(et,{size:16})})})]}),t.jsxs("div",{className:a.categoryControl,children:[t.jsx("span",{id:"assets-category-filter-label",className:a.categoryControlLabel,children:e("assets.category.filter","Category")}),t.jsx("div",{className:a.categoryRail,role:"radiogroup","aria-labelledby":"assets-category-filter-label",children:rt.map(v=>{const b=l.categoryFilter===v,k=Le(v,e);return t.jsx("button",{type:"button",role:"radio","aria-checked":b,className:[a.categoryButton,b?a.categoryButtonActive:""].filter(Boolean).join(" "),onClick:()=>{l.setCategoryFilter(v)},children:k},v)})})]})]}),t.jsx(mn,{open:S,tier:i,onClose:()=>m(!1)})]}),l.error&&t.jsx("div",{className:a.errorState,children:l.error}),l.lastMessage&&t.jsx("div",{className:a.messageState,children:l.lastMessage}),l.categoryFilter==="rbxm"&&t.jsxs("section",{className:a.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.")})]}),!T&&!n&&t.jsx("div",{className:`${a.notice} ${a.proNotice}`,children:e("assets.basic.notice","Browse, preview, edit metadata, and scan usage on Basic. Roblox upload controls are available on Pro.")}),l.loading?t.jsx("div",{className:a.emptyState,children:e("common.loading","Loading...")}):t.jsx($a,{assets:l.assets,selectedAssetId:l.selectedAssetId,onSelect:l.selectAsset}),t.jsx(Wa,{asset:A||S||E?null:h,busyAction:l.busyAction,canUpload:T,canImportRbxm:M,importRbxmTooltip:F,importRbxmTargetParent:G,onClose:()=>l.selectAsset(null),onSave:async(v,b)=>{h&&await l.updateMetadata(h.id,{displayName:v,description:b})},onUpload:()=>y(!0),onDelete:()=>V(!0),onImportRbxm:async()=>{h&&(s("dashboard_click_event",{click_target:"assets_import_rbxm",page:"assets"}),await l.importRbxm(h.id,{targetParent:G}))},onRefreshStatus:async()=>{h&&await l.refreshStatus(h.id)},onScanUsage:async()=>{h&&(s("dashboard_click_event",{click_target:"assets_usage_scan",page:"assets"}),await l.scanUsage(h.id,l.activePlaceId??void 0))}}),t.jsx(tt,{open:E&&!!h,title:e("assets.delete.title","Delete asset"),message:e("assets.delete.message","This removes the local Asset Library files only. Uploaded Roblox assets are not deleted."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.delete","Delete"),loading:l.busyAction==="delete",onCancel:()=>V(!1),onConfirm:()=>{h&&(s("dashboard_click_event",{click_target:"assets_delete",page:"assets"}),l.deleteAsset(h.id).then(v=>{v&&V(!1)}))}}),t.jsx(ln,{asset:h,open:A,canUpload:T,busyAction:l.busyAction,onClose:()=>{y(!1),l.selectAsset(null)},onBack:()=>y(!1),onOpenSettings:()=>{y(!1),m(!0)},onUpload:async v=>{if(!h)return;s("dashboard_click_event",{click_target:"assets_upload_submit",page:"assets"}),await l.uploadAsset(h.id,v)&&y(!1)}})]})}export{Ln as Component};
|