@weppy/roblox-mcp 2.17.1 → 2.17.3
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 +20 -0
- package/README.md +2 -0
- package/dashboard/dist/assets/AiPromptExamples-DniGyTTn.js +1 -0
- package/dashboard/dist/assets/AiPromptExamples-DvVR2a1g.css +1 -0
- package/dashboard/dist/assets/AssetsPage--90xGzmZ.js +61 -0
- package/dashboard/dist/assets/AssetsPage-DX8NUPQo.css +1 -0
- package/dashboard/dist/assets/{ChangelogPage-CRXXHovV.js → ChangelogPage-Bg9Kg_qZ.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-Dz7mVKLZ.js → ConfirmModal-Dp7bIaIr.js} +1 -1
- package/dashboard/dist/assets/{ConnectionPage-CKKn3lt0.js → ConnectionPage-C9BrvjSI.js} +1 -1
- package/dashboard/dist/assets/{ControlsPage-Ch6He2CV.js → ControlsPage-Cz7l6oLO.js} +1 -1
- package/dashboard/dist/assets/{CurrentPlaceScope-DhPCqaMU.js → CurrentPlaceScope-BjpoPQlM.js} +1 -1
- package/dashboard/dist/assets/{GameChangeDetail-CZuYgFvS.js → GameChangeDetail-COMtVAQK.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-BGeOUBIl.js → InfoLabel-Duu_xBC8.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-B-CtTLEP.js → OverviewPage-Bw6nCN_K.js} +1 -1
- package/dashboard/dist/assets/{PageHeader-CYbeZdtL.js → PageHeader-DCh0GrcW.js} +1 -1
- package/dashboard/dist/assets/PlaytestAiPromptExamples-Cv4yOTd0.js +1 -0
- package/dashboard/dist/assets/{PlaytestPage-C092tN-C.js → PlaytestPage-DM7NkrhI.js} +2 -2
- package/dashboard/dist/assets/{SettingsPage-bEHQn_8W.js → SettingsPage-DOx4zPQB.js} +1 -1
- package/dashboard/dist/assets/{StatusBadge-BmR5_DsF.js → StatusBadge-DB7SzHxU.js} +1 -1
- package/dashboard/dist/assets/{SyncPage-BFz_XQ40.js → SyncPage-Bgb0V6Yy.js} +1 -1
- package/dashboard/dist/assets/{Tabs-C7TenrZD.js → Tabs-8coaSlFl.js} +1 -1
- package/dashboard/dist/assets/{TierPromoPanel-C02VRkHz.js → TierPromoPanel-C6AtGEJN.js} +1 -1
- package/dashboard/dist/assets/{ToolsPage-CJeoFakm.js → ToolsPage-DkCD8pPL.js} +1 -1
- package/dashboard/dist/assets/{TooltipText-sb-BSgUg.js → TooltipText-B2gmJunf.js} +1 -1
- package/dashboard/dist/assets/UiStudioPage-CNWTVJ4w.js +11 -0
- package/dashboard/dist/assets/UiStudioPage-CtSFtEbS.css +1 -0
- package/dashboard/dist/assets/WhatsNewPage-CX_N1RVO.js +1 -0
- package/dashboard/dist/assets/{bot-oMwejCZF.js → bot-DRBnM_Dv.js} +1 -1
- package/dashboard/dist/assets/{check-EdHXSSef.js → check-DFGDcGQp.js} +1 -1
- package/dashboard/dist/assets/{copy-CePVq0VI.js → copy-DGkh5PJA.js} +1 -1
- package/dashboard/dist/assets/{index-DchewB5y.js → index-UFZ5peom.js} +39 -39
- package/dashboard/dist/assets/{sample-requests-CQvn7a4-.js → sample-requests-CcJyTFj5.js} +1 -1
- package/dashboard/dist/assets/{trash-2-8V3SCC8q.js → trash-2-OtWthCQY.js} +1 -1
- package/dashboard/dist/assets/{useLiveUptime-BeZ9TLyF.js → useLiveUptime-hS0F15wX.js} +1 -1
- package/dashboard/dist/assets/{useSettings-D5XHMODc.js → useSettings-B6gBfQjz.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dist/index.js +167 -445
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/AssetsPage-BRZSoLQp.css +0 -1
- package/dashboard/dist/assets/AssetsPage-ClzgrkC_.js +0 -56
- package/dashboard/dist/assets/PlaytestAiPromptExamples-DHVX0Ljy.css +0 -1
- package/dashboard/dist/assets/PlaytestAiPromptExamples-flhav1EU.js +0 -1
- package/dashboard/dist/assets/UiStudioPage-C5dYQMax.js +0 -11
- package/dashboard/dist/assets/UiStudioPage-CSK5gQMN.css +0 -1
- package/dashboard/dist/assets/WhatsNewPage-C_z4g3oa.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weppy/roblox-mcp",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.3",
|
|
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_1ebbq_1{display:flex;flex-direction:column;gap:var(--space-page);min-height:100%;max-width:var(--content-max)}._experimentalBadge_1ebbq_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_1ebbq_23{position:relative;z-index:30;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:12px 0}._toolbar_1ebbq_23{display:grid;grid-template-columns:auto minmax(220px,320px) minmax(0,1fr) auto;grid-template-areas:"scope place summary actions" "category category category category";align-items:center;gap:12px}._toolbar_1ebbq_23>._segmented_1ebbq_41{grid-area:scope}._placeContextSlot_1ebbq_45{grid-area:place;min-width:0}._toolbar_1ebbq_23>._listContextSummary_1ebbq_50{grid-area:summary}._toolbar_1ebbq_23>._toolbarActions_1ebbq_54{grid-area:actions;justify-self:end}._categoryControl_1ebbq_59{grid-area:category;display:inline-flex;align-items:center;gap:8px;width:100%;min-width:0}._listContextSummary_1ebbq_50{min-width:0;overflow:hidden;color:var(--text-secondary);font-size:12px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}._listContextSummary_1ebbq_50 strong{color:var(--text-primary);font-family:var(--font-label);font-weight:600}._contextDivider_1ebbq_84{color:var(--text-muted)}._categoryControlLabel_1ebbq_88{flex:0 0 auto;color:var(--text-secondary);font-size:12px}._categoryRail_1ebbq_94{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}._categoryButton_1ebbq_102{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_1ebbq_102:hover{border-color:var(--accent);color:var(--text-primary)}._categoryButton_1ebbq_102:disabled{cursor:not-allowed;opacity:.48}._categoryButton_1ebbq_102:disabled:hover{border-color:var(--border);color:var(--text-secondary)}._categoryButtonActive_1ebbq_131{border-color:color-mix(in srgb,var(--accent) 76%,var(--border));background:var(--accent-dim);color:var(--accent)}._categoryButton_1ebbq_102:focus-visible{outline:none;box-shadow:var(--focus-ring)}._toolbarActions_1ebbq_54,._actionRow_1ebbq_143,._copyRow_1ebbq_144,._buttonRow_1ebbq_145{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._segmented_1ebbq_41{display:inline-flex;min-height:32px;border:1px solid var(--border);border-radius:var(--radius-control);overflow:hidden;background:var(--bg-card)}._segmented_1ebbq_41 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_1ebbq_41 button:hover:not(:disabled){background:var(--accent-dim);color:var(--accent)}._segmented_1ebbq_41 button:focus-visible{outline:none;box-shadow:inset var(--focus-ring)}._segmented_1ebbq_41 button:last-child{border-right:0}._segmented_1ebbq_41 ._segmentedActive_1ebbq_187{background:var(--accent-dim);color:var(--accent)}._placeSelectorLabel_1ebbq_192{display:inline-flex;align-items:center;gap:8px;width:100%;min-width:0;color:var(--text-secondary);font-size:12px}._placeSelectorLabel_1ebbq_192 span{flex:0 0 auto}._placeSelect_1ebbq_192{width:100%;min-width:0;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}._sharedPlaceContext_1ebbq_218{display:inline-flex;align-items:center;min-height:32px;color:var(--text-secondary);font-size:12px}._filterLabel_1ebbq_226{display:inline-flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:12px}._filterLabel_1ebbq_226 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_1ebbq_244,._primaryButton_1ebbq_245,._iconButton_1ebbq_246{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_1ebbq_244{min-height:32px;padding:6px 10px;text-decoration:none}._primaryButton_1ebbq_245{min-height:34px;padding:7px 12px;border-color:var(--accent);color:var(--accent)}._iconButton_1ebbq_246{width:32px;height:32px;padding:0}._commandButton_1ebbq_244:hover,._primaryButton_1ebbq_245:hover,._iconButton_1ebbq_246:hover{border-color:var(--accent)}._dangerButton_1ebbq_286{border-color:var(--danger-border);background:var(--danger-bg);color:var(--danger-text)}._dangerButton_1ebbq_286:hover{border-color:var(--danger);background:var(--danger-hover-bg);color:var(--danger-text)}._commandButton_1ebbq_244:focus-visible,._primaryButton_1ebbq_245:focus-visible,._iconButton_1ebbq_246:focus-visible,._placeSelect_1ebbq_192:focus-visible,._filterLabel_1ebbq_226 select:focus-visible{outline:none;box-shadow:var(--focus-ring)}._iconButtonActive_1ebbq_307{border-color:var(--accent);background:var(--accent-dim);color:var(--accent)}._commandButton_1ebbq_244:disabled,._primaryButton_1ebbq_245:disabled,._iconButton_1ebbq_246:disabled{cursor:not-allowed;opacity:.5}._grid_1ebbq_320{--asset-card-min: 190px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--asset-card-min)),1fr));gap:12px}._grid_1ebbq_320[data-grid-size=small],._folderGrid_1ebbq_328[data-grid-size=small]{--asset-card-min: 144px}._grid_1ebbq_320[data-grid-size=large],._folderGrid_1ebbq_328[data-grid-size=large]{--asset-card-min: 260px}._explorer_1ebbq_337{display:flex;min-width:0;flex-direction:column;gap:14px}._explorerToolbar_1ebbq_344{display:flex;min-width:0;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);padding-bottom:12px}._explorerLocation_1ebbq_354{min-width:0}._explorerLocation_1ebbq_354 h2{margin:5px 0 2px;overflow-wrap:anywhere;color:var(--text-primary);font-size:var(--type-surface-title-size);font-weight:600;line-height:var(--leading-title);letter-spacing:0}._explorerLocation_1ebbq_354 h2:focus-visible{outline:none;box-shadow:var(--focus-ring)}._explorerLocation_1ebbq_354 p{margin:0;color:var(--text-muted);font-size:var(--type-control-size);line-height:var(--leading-body)}._breadcrumb_1ebbq_380,._breadcrumbSegment_1ebbq_381{display:inline-flex;min-width:0;align-items:center;gap:2px;color:var(--text-muted);font-size:12px}._breadcrumb_1ebbq_380{max-width:100%;flex-wrap:wrap}._breadcrumb_1ebbq_380 button{min-height:44px;border:0;border-radius:var(--radius-control);background:transparent;color:var(--text-secondary);padding:0 7px;font:inherit;cursor:pointer;transition:background var(--transition),color var(--transition)}._breadcrumb_1ebbq_380 button:hover{background:var(--accent-dim);color:var(--accent)}._breadcrumb_1ebbq_380 button:focus-visible{outline:none;box-shadow:var(--focus-ring)}._breadcrumb_1ebbq_380 [aria-current=page]{min-width:0;overflow-wrap:anywhere;color:var(--text-primary);padding:0 5px}._viewOptions_1ebbq_424{display:flex;flex:0 0 auto;align-items:center;gap:8px;min-height:44px}._organizationModeControl_1ebbq_432,._viewModeControl_1ebbq_433,._gridSizeControl_1ebbq_434{display:inline-flex;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-card)}._organizationModeControl_1ebbq_432 button,._viewModeControl_1ebbq_433 button,._gridSizeControl_1ebbq_434 button{display:inline-flex;min-height:32px;align-items:center;justify-content:center;gap:5px;border:0;border-right:1px solid var(--border);background:transparent;color:var(--text-secondary);padding:0 9px;font-family:var(--font-label);font-size:11px;cursor:pointer;transition:background var(--transition),color var(--transition)}._organizationModeControl_1ebbq_432 button:last-child,._viewModeControl_1ebbq_433 button:last-child,._gridSizeControl_1ebbq_434 button:last-child{border-right:0}._organizationModeControl_1ebbq_432 button[aria-pressed=true],._viewModeControl_1ebbq_433 button[aria-pressed=true],._gridSizeControl_1ebbq_434 button[aria-pressed=true]{background:var(--accent-dim);color:var(--accent)}._organizationModeControl_1ebbq_432 button:focus-visible,._viewModeControl_1ebbq_433 button:focus-visible,._gridSizeControl_1ebbq_434 button:focus-visible{z-index:1;outline:none;box-shadow:inset var(--focus-ring)}._gridSizeControl_1ebbq_434 button:disabled{cursor:not-allowed;opacity:.42}._explorerSection_1ebbq_487{display:flex;min-width:0;flex-direction:column;gap:8px}._explorerSection_1ebbq_487 h3{margin:0;color:var(--text-secondary);font-family:var(--font-label);font-size:12px;font-weight:600;letter-spacing:0}._folderGrid_1ebbq_328{--asset-card-min: 190px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--asset-card-min)),1fr));gap:12px}._folderTile_1ebbq_510{display:grid;min-width:0;min-height:84px;grid-template-columns:46px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;column-gap:10px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);padding:11px;text-align:left;cursor:pointer;transition:border-color var(--transition),background var(--transition),transform var(--transition)}._folderTile_1ebbq_510:hover{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 6%,var(--bg-card));transform:translateY(-1px)}._folderTile_1ebbq_510:focus-visible,._folderListRow_1ebbq_535:focus-visible,._assetListRow_1ebbq_536:focus-visible,._assetCard_1ebbq_537:focus-visible{outline:none;box-shadow:var(--focus-ring)}._folderIcon_1ebbq_542{display:grid;grid-row:1 / span 2;place-items:center;width:40px;height:40px;border:1px solid color-mix(in srgb,var(--accent) 30%,var(--border));border-radius:8px;background:var(--accent-dim);color:var(--accent)}._folderName_1ebbq_554{min-width:0;align-self:end;overflow:hidden;color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600;overflow-wrap:anywhere;text-overflow:ellipsis}._folderCount_1ebbq_566{align-self:start;color:var(--text-muted);font-size:12px}._assetList_1ebbq_536,._folderList_1ebbq_535{display:flex;min-width:0;flex-direction:column;gap:4px}._assetListHeader_1ebbq_580,._assetListRow_1ebbq_536,._folderListRow_1ebbq_535{display:grid;min-width:0;grid-template-columns:44px minmax(160px,1fr) 110px 120px 110px 110px;align-items:center;gap:10px}._assetListHeader_1ebbq_580{min-height:28px;border-bottom:1px solid var(--border);color:var(--text-muted);padding:0 10px 5px;font-size:11px}._assetListRow_1ebbq_536,._folderListRow_1ebbq_535{min-height:52px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-card);color:var(--text-secondary);padding:7px 10px;text-align:left;cursor:pointer;transition:border-color var(--transition),background var(--transition)}._assetListRow_1ebbq_536:hover,._folderListRow_1ebbq_535:hover{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 5%,var(--bg-card))}._listPreviewWrap_1ebbq_617,._listPreview_1ebbq_617,._listPreviewFallback_1ebbq_619{width:36px;height:36px;border-radius:6px}._listPreviewWrap_1ebbq_617{display:grid;overflow:hidden;place-items:center;background:var(--bg-secondary)}._listPreview_1ebbq_617{object-fit:contain}._listPreviewFallback_1ebbq_619{display:grid;place-items:center;color:var(--text-secondary)}._folderListRow_1ebbq_535 ._folderIcon_1ebbq_542{grid-row:auto;width:36px;height:36px}._listAssetName_1ebbq_648,._folderListRow_1ebbq_535 ._folderName_1ebbq_554{min-width:0;overflow:hidden;color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._listAssetCategory_1ebbq_660,._listAssetScope_1ebbq_661,._listAssetUpdated_1ebbq_662,._folderType_1ebbq_663,._folderScope_1ebbq_664,._folderStatus_1ebbq_665,._folderUpdated_1ebbq_666{min-width:0;overflow:hidden;color:var(--text-muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}._assetCard_1ebbq_537{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;transition:border-color var(--transition),background var(--transition),transform var(--transition)}._assetCard_1ebbq_537:hover{border-color:var(--accent);transform:translateY(-1px)}._assetCardSelected_1ebbq_695{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 40%,transparent)}._thumbnailWrap_1ebbq_700{display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border-radius:6px;background:var(--bg-secondary)}._thumbnail_1ebbq_700{width:100%;height:100%;object-fit:contain}._thumbnailFallback_1ebbq_716{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_1ebbq_727{display:flex;flex-direction:column;gap:6px;min-width:0}._assetName_1ebbq_734{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-label);font-size:13px}._assetMeta_1ebbq_742{display:flex;align-items:center;justify-content:space-between;gap:8px}._statusChip_1ebbq_749,._categoryPill_1ebbq_750{min-height:20px;padding:2px 7px}._assetId_1ebbq_755,._scopeText_1ebbq_756,._muted_1ebbq_757{color:var(--text-muted);font-size:12px}._emptyState_1ebbq_762,._notice_1ebbq_763,._errorState_1ebbq_764,._messageState_1ebbq_765{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:14px;color:var(--text-secondary)}._emptyState_1ebbq_762{min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._emptyState_1ebbq_762 p{margin:0;color:var(--text-primary);font-family:var(--font-label)}._notice_1ebbq_763{color:var(--warning-text);border-color:var(--warning-border);background:var(--warning-bg)}._proNotice_1ebbq_795{color:var(--pro-text);border-color:var(--pro-border);background:var(--pro-bg-soft)}._errorState_1ebbq_764{display:grid;gap:4px;color:var(--error);border-color:var(--error)}._messageState_1ebbq_765{color:var(--success);border-color:var(--success)}._rbxmGuide_1ebbq_813{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_1ebbq_813 h2{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;letter-spacing:0}._rbxmGuide_1ebbq_813 p{margin:0;max-width:760px;color:var(--text-secondary);font-size:12px;line-height:1.5}._drawer_1ebbq_839{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_1ebbq_853{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_1ebbq_1 .12s ease-out;transform-origin:top right}._settingsDrawer_1ebbq_873{width:min(560px,100%)}@keyframes _settingsPopoverIn_1ebbq_1{0%{opacity:0;transform:translateY(-4px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}._detailPopupLayer_1ebbq_889{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_1ebbq_905{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_1ebbq_905:focus{outline:none}._detailDialogHeader_1ebbq_922{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_1ebbq_933{min-width:0;display:flex;flex-direction:column;gap:3px}._detailTitleBlock_1ebbq_933 h2{margin:0;font-size:var(--type-surface-title-size);letter-spacing:0}._detailTitleBlock_1ebbq_933 span:last-child{overflow:hidden;color:var(--text-muted);font-family:var(--font-code);font-size:12px;text-overflow:ellipsis;white-space:nowrap}._detailEyebrow_1ebbq_955{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._detailHeaderActions_1ebbq_964{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._detailDialogBody_1ebbq_972{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.1fr);gap:0;overflow:hidden}._detailPreviewPane_1ebbq_981{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_1ebbq_981,._detailPreviewFallback_1ebbq_993{width:100%;max-width:520px;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._detailPreview_1ebbq_981{display:block;object-fit:contain}._detailPreviewFallback_1ebbq_993{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._detailPreviewFallback_1ebbq_993 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._detailPreviewFallback_1ebbq_993 small{max-width:88%;color:var(--text-muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere;text-align:center}._detailContentPane_1ebbq_1029{min-width:0;overflow-y:auto;padding:18px 22px 24px}._detailContentPane_1ebbq_1029 ._formStack_1ebbq_1035{margin-top:0}._drawerHeader_1ebbq_1039{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}._settingsInlinePanel_1ebbq_853 ._drawerHeader_1ebbq_1039{margin-bottom:0}._drawerHeader_1ebbq_1039 h2{margin:0;font-size:var(--type-surface-title-size);letter-spacing:0}._drawerHeader_1ebbq_1039 span{color:var(--text-muted);font-size:12px}._preview_1ebbq_1062,._previewFallback_1ebbq_1063{width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);margin-bottom:14px}._preview_1ebbq_1062{object-fit:contain}._previewFallback_1ebbq_1063{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._previewFallback_1ebbq_1063 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._formStack_1ebbq_1035,._detailSection_1ebbq_1090,._noticeList_1ebbq_1091,._settingsPanel_1ebbq_1092{display:flex;flex-direction:column;gap:10px;margin-top:14px}._noticeList_1ebbq_1091{color:var(--text-muted);font-size:12px;line-height:1.45}._noticeList_1ebbq_1091 p{margin:0}._setupNotice_1ebbq_1109{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_1ebbq_1109 strong{color:var(--text-primary);font-size:13px}._setupNotice_1ebbq_1109 p{margin:0}._setupNotice_1ebbq_1109 ._commandButton_1ebbq_244{justify-self:start}._field_1ebbq_1134{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary)}._fieldLabelRow_1ebbq_1142{display:flex;align-items:center;gap:4px;min-height:24px}._fieldLabelRow_1ebbq_1142 label,._fieldLabelRow_1ebbq_1142 span{min-width:0}._field_1ebbq_1134 input,._field_1ebbq_1134 textarea,._field_1ebbq_1134 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_1ebbq_1166{color:var(--text-muted);line-height:1.35}._twoColumn_1ebbq_1171{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}._detailSection_1ebbq_1090{padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_1ebbq_1182{margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_1ebbq_1182 summary{cursor:pointer;color:var(--text-secondary);font-size:13px;font-weight:600}._technicalDetails_1ebbq_1182 summary:hover{color:var(--text-primary)}._technicalDetails_1ebbq_1182 ._detailGrid_1ebbq_1199,._technicalDetails_1ebbq_1182 ._metadataList_1ebbq_1200{margin-top:10px}._detailSection_1ebbq_1090 h3{margin:0;font-size:13px;letter-spacing:0}._detailGrid_1ebbq_1199,._compactMeta_1ebbq_1211{display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px 10px;margin:0;font-size:12px}._compactMeta_1ebbq_1211{border:1px solid var(--border);border-radius:var(--radius);padding:10px;background:var(--bg-card)}._detailGrid_1ebbq_1199 dt,._compactMeta_1ebbq_1211 dt{color:var(--text-muted)}._detailGrid_1ebbq_1199 dd,._compactMeta_1ebbq_1211 dd{margin:0;min-width:0;overflow-wrap:anywhere}._copyableValue_1ebbq_1238{display:inline-flex;align-items:center;gap:6px}._copyableValue_1ebbq_1238 span{min-width:0;overflow-wrap:anywhere}._inlineCopyButton_1ebbq_1249{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_1ebbq_1249:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}._hashText_1ebbq_1270{font-family:var(--font-code)}._usageList_1ebbq_1274{display:flex;flex-direction:column;gap:8px}._usageItem_1ebbq_1280,._metadataItem_1ebbq_1281{display:grid;gap:4px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--bg-card);font-size:12px}._metadataList_1ebbq_1200{display:flex;flex-direction:column;gap:8px}._metadataList_1ebbq_1200 strong,._usageItem_1ebbq_1280 strong{color:var(--text-primary);overflow-wrap:anywhere}._metadataItem_1ebbq_1281 span{color:var(--text-secondary);overflow-wrap:anywhere}._metadataItem_1ebbq_1281 code,._usageItem_1ebbq_1280 code{color:var(--accent);overflow-wrap:anywhere}._settingsPanel_1ebbq_1092{border:1px solid var(--border);border-radius:8px;padding:12px;background:var(--bg-card)}._settingsInlinePanel_1ebbq_853 ._settingsPanel_1ebbq_1092{border:0;border-radius:0;background:transparent;padding:0;margin-top:0}._settingsSubsection_1ebbq_1329{display:grid;gap:8px}._settingsSectionHeader_1ebbq_1334{display:flex;align-items:center;justify-content:space-between;gap:10px}._settingsSectionHeader_1ebbq_1334 h3{margin:0;color:var(--text-primary);font-size:13px}._settingsDefinitionList_1ebbq_1347{display:grid;gap:6px;margin:0}._settingsDefinitionList_1ebbq_1347 div{display:grid;grid-template-columns:minmax(96px,max-content) minmax(0,1fr);gap:10px}._settingsDefinitionList_1ebbq_1347 dt{color:var(--text-muted)}._settingsDefinitionList_1ebbq_1347 dd{margin:0;color:var(--text-primary);overflow-wrap:anywhere}._toggleRow_1ebbq_1369{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}._toggleRow_1ebbq_1369 span{display:grid;gap:3px}._toggleRow_1ebbq_1369 small,._inlineHelp_1ebbq_1383{color:var(--text-muted);font-size:12px}._toggleRow_1ebbq_1369 input{width:18px;height:18px}._inlineHelp_1ebbq_1383{margin:0}._inlineHelp_1ebbq_1383 a{color:var(--accent)}@media(max-width:1120px){._detailPopupLayer_1ebbq_889{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}._detailDialogBody_1ebbq_972{grid-template-columns:minmax(240px,.8fr) minmax(320px,1.2fr)}}@media(max-width:820px){._detailPopupLayer_1ebbq_889{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}._detailDialogHeader_1ebbq_922{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._detailHeaderActions_1ebbq_964{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._detailDialogBody_1ebbq_972{grid-template-columns:minmax(0,1fr);overflow-y:auto}._detailPreviewPane_1ebbq_981{min-height:auto;padding:14px;border-right:0;border-bottom:1px solid var(--border)}._detailPreview_1ebbq_981,._detailPreviewFallback_1ebbq_993{max-width:340px}._detailContentPane_1ebbq_1029{overflow:visible;padding:14px}}@media(max-width:720px){._headerRow_1ebbq_1460{align-items:stretch;flex-direction:column}._toolbar_1ebbq_23{grid-template-columns:minmax(0,1fr);grid-template-areas:"scope" "place" "summary" "actions" "category";align-items:stretch}._toolbar_1ebbq_23>._segmented_1ebbq_41,._placeContextSlot_1ebbq_45,._toolbar_1ebbq_23>._toolbarActions_1ebbq_54,._categoryControl_1ebbq_59{width:100%}._toolbar_1ebbq_23>._toolbarActions_1ebbq_54{justify-self:stretch}._headerMeta_1ebbq_1487{justify-items:start}._toolbarActions_1ebbq_54{justify-content:flex-start}._explorerToolbar_1ebbq_344{align-items:stretch;flex-direction:column}._viewOptions_1ebbq_424{width:100%;align-items:stretch;flex-direction:column}._organizationModeControl_1ebbq_432,._viewModeControl_1ebbq_433,._gridSizeControl_1ebbq_434{display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}._gridSizeControl_1ebbq_434{grid-template-columns:repeat(3,minmax(0,1fr))}._organizationModeControl_1ebbq_432 button,._viewModeControl_1ebbq_433 button,._gridSizeControl_1ebbq_434 button{min-width:0}._assetListHeader_1ebbq_580{display:none}._assetListRow_1ebbq_536,._folderListRow_1ebbq_535{grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"preview name status" "preview type type" "preview scope updated";gap:3px 8px}._listPreviewWrap_1ebbq_617,._folderListRow_1ebbq_535 ._folderIcon_1ebbq_542{grid-area:preview}._listAssetName_1ebbq_648,._folderListRow_1ebbq_535 ._folderName_1ebbq_554{grid-area:name}._listAssetCategory_1ebbq_660,._folderType_1ebbq_663{grid-area:type}._listAssetScope_1ebbq_661,._folderScope_1ebbq_664{grid-area:scope}._assetListRow_1ebbq_536 ._statusChip_1ebbq_749,._folderStatus_1ebbq_665{grid-area:status;justify-self:end}._listAssetUpdated_1ebbq_662,._folderUpdated_1ebbq_666{grid-area:updated;justify-self:end}._placeSelectorLabel_1ebbq_192,._placeSelect_1ebbq_192{width:100%}._settingsInlinePanel_1ebbq_853{right:auto;left:0;width:100%;transform-origin:top left}._twoColumn_1ebbq_1171{grid-template-columns:1fr}}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import{f as oe,b as O,l as Ne,u as me,j as s,P as As,I as Is,r as c,F as Ps,m as ks,R as hs,X as Ke,E as ws,n as ms,g as Rs,a as $s,e as Ls}from"./index-DchewB5y.js";import{C as bs}from"./ConfirmModal-Dz7mVKLZ.js";import{B as De,C as Bs,D as Ye,b as Us,P as Ts}from"./PageHeader-CYbeZdtL.js";import{T as Z}from"./TooltipText-sb-BSgUg.js";import{T as Es}from"./trash-2-8V3SCC8q.js";import{C as xs}from"./copy-CePVq0VI.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 Ds=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],qs=oe("arrow-left",Ds);/**
|
|
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 Fs=[["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"}]],Os=oe("audio-lines",Fs);/**
|
|
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 Ms=[["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"}]],zs=oe("badge",Ms);/**
|
|
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 Hs=[["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"}]],Ks=oe("box",Hs);/**
|
|
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 Gs=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qe=oe("chevron-right",Gs);/**
|
|
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 Ws=[["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"}]],Vs=oe("clapperboard",Ws);/**
|
|
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 Ys=[["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"}]],Xs=oe("film",Ys);/**
|
|
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 Js=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]],Zs=oe("grid-2x2",Js);/**
|
|
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 Qs=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],et=oe("list",Qs);/**
|
|
47
|
-
* @license lucide-react v1.8.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const st=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],tt=oe("search",st);/**
|
|
52
|
-
* @license lucide-react v1.8.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const at=[["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"}]],nt=oe("upload",at);function gs(e){if(e.scope==="place"&&typeof e.placeId=="number")return{placeId:String(e.placeId)}}function le(e){const t=gs(e);return t?`?placeId=${encodeURIComponent(t.placeId)}`:""}function Ie(e){return`/api/assets/${encodeURIComponent(e.scope)}/${encodeURIComponent(e.category)}`}function pe(e,t){return`${Ie(e)}/${encodeURIComponent(t)}`}async function ot(e){return O.get(Ie(e),gs(e))}async function lt(e){return O.post(`${Ie(e)}/rescan${le(e)}`,{})}async function rt(e,t,r){return(await O.patch(`${pe(e,t)}${le(e)}`,r)).asset}async function it(e,t){return O.delete(`${pe(e,t)}${le(e)}`)}async function ct(e,t,r){return(await O.post(`${pe(e,t)}/upload${le(e)}`,r)).asset}async function Xe(e,t){return(await O.post(`${pe(e,t)}/status-refresh${le(e)}`,{})).asset}async function dt(e,t,r){const n={...e,placeId:r??e.placeId};return O.post(`${pe(e,t)}/usage-scan${le(n)}`,{})}async function ut(e,t){return O.post(`${Ie(e)}/export-selection-rbxm${le(e)}`,t)}async function pt(e,t,r){return O.post(`${pe(e,t)}/import-rbxm${le(e)}`,r)}async function ht(e,t){return(await O.post(`${pe(e,t)}/thumbnail-generate${le(e)}`,{})).asset}function fs(e){return e.fileUrl?`${Ne}${e.fileUrl}`:`${Ne}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/file${le({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}function ze(e){return e.previewUrl?`${Ne}${e.previewUrl}`:`${Ne}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/preview${le({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}const ys=["all","image","decal","rbxm"],mt=new Set(ys),Je=["model","animation"];function _e(e){return/\.(rbxm|rbxmx)$/i.test(e.file.original)}function bt(e){return mt.has(e)}function He(e,t){return e==="all"?t("assets.category.all","All"):t(`assets.category.${e}`,e==="rbxm"?"RBXM":e)}function de(e,t){return He(_e(e)?"rbxm":e.category,t)}function xt(e){return e==="all"?["image","decal",...Je]:e==="rbxm"?Je:[e]}function gt(e,t){return t==="all"?e.category==="image"||e.category==="decal"||_e(e):t==="rbxm"?_e(e):(t==="model"||t==="animation")&&_e(e)?!1:e.category===t}function ft(e){return[...e].sort((t,r)=>r.createdAt.localeCompare(t.createdAt)||r.id.localeCompare(t.id))}function Pe(e){return e?e.split("/").filter(Boolean):[]}function Ge(e,t){return t.every((r,n)=>e[n]===r)}function js(e,t){return t.createdAt.localeCompare(e.createdAt)||t.id.localeCompare(e.id)}function te(e){const t=e.scope.kind==="place"?e.scope.placeId:"-";return`${e.scope.kind}:${t}:${e.category}:${e.id}`}function We(e){return Pe(e.folderPath)}function yt(e,t){const r=Pe(t),n=new Map;for(const l of e){const g=We(l);if(g.length<=r.length||!Ge(g,r))continue;const x=g[r.length],m=[...r,x].join("/"),p=n.get(m);p?p.descendantCount+=1:n.set(m,{name:x,path:m,descendantCount:1})}return[...n.values()].sort((l,g)=>l.name.localeCompare(g.name))}function jt(e,t){const r=Pe(t);return e.filter(n=>{const l=We(n);return l.length===r.length&&Ge(l,r)}).sort(js)}function vt(e){return[...e].sort(js)}function Ct(e,t){const r=Pe(t);for(;r.length>0;){if(e.some(l=>{const g=We(l);return g.length>=r.length&&Ge(g,r)}))return r.join("/");r.pop()}return""}const _t="_page_1ebbq_1",St="_experimentalBadge_1ebbq_9",Nt="_toolbarShell_1ebbq_23",At="_toolbar_1ebbq_23",It="_segmented_1ebbq_41",Pt="_placeContextSlot_1ebbq_45",kt="_listContextSummary_1ebbq_50",wt="_toolbarActions_1ebbq_54",Rt="_categoryControl_1ebbq_59",$t="_contextDivider_1ebbq_84",Lt="_categoryControlLabel_1ebbq_88",Bt="_categoryRail_1ebbq_94",Ut="_categoryButton_1ebbq_102",Tt="_categoryButtonActive_1ebbq_131",Et="_copyRow_1ebbq_144",Dt="_buttonRow_1ebbq_145",qt="_segmentedActive_1ebbq_187",Ft="_placeSelectorLabel_1ebbq_192",Ot="_placeSelect_1ebbq_192",Mt="_sharedPlaceContext_1ebbq_218",zt="_commandButton_1ebbq_244",Ht="_primaryButton_1ebbq_245",Kt="_iconButton_1ebbq_246",Gt="_dangerButton_1ebbq_286",Wt="_iconButtonActive_1ebbq_307",Vt="_grid_1ebbq_320",Yt="_folderGrid_1ebbq_328",Xt="_explorer_1ebbq_337",Jt="_explorerToolbar_1ebbq_344",Zt="_explorerLocation_1ebbq_354",Qt="_breadcrumb_1ebbq_380",ea="_breadcrumbSegment_1ebbq_381",sa="_viewOptions_1ebbq_424",ta="_organizationModeControl_1ebbq_432",aa="_viewModeControl_1ebbq_433",na="_gridSizeControl_1ebbq_434",oa="_explorerSection_1ebbq_487",la="_folderTile_1ebbq_510",ra="_folderListRow_1ebbq_535",ia="_assetListRow_1ebbq_536",ca="_assetCard_1ebbq_537",da="_folderIcon_1ebbq_542",ua="_folderName_1ebbq_554",pa="_folderCount_1ebbq_566",ha="_assetList_1ebbq_536",ma="_folderList_1ebbq_535",ba="_assetListHeader_1ebbq_580",xa="_listPreviewWrap_1ebbq_617",ga="_listPreview_1ebbq_617",fa="_listPreviewFallback_1ebbq_619",ya="_listAssetName_1ebbq_648",ja="_listAssetCategory_1ebbq_660",va="_listAssetScope_1ebbq_661",Ca="_listAssetUpdated_1ebbq_662",_a="_folderType_1ebbq_663",Sa="_folderScope_1ebbq_664",Na="_folderStatus_1ebbq_665",Aa="_folderUpdated_1ebbq_666",Ia="_assetCardSelected_1ebbq_695",Pa="_thumbnailWrap_1ebbq_700",ka="_thumbnail_1ebbq_700",wa="_thumbnailFallback_1ebbq_716",Ra="_assetCardBody_1ebbq_727",$a="_assetName_1ebbq_734",La="_assetMeta_1ebbq_742",Ba="_statusChip_1ebbq_749",Ua="_categoryPill_1ebbq_750",Ta="_assetId_1ebbq_755",Ea="_scopeText_1ebbq_756",Da="_muted_1ebbq_757",qa="_emptyState_1ebbq_762",Fa="_notice_1ebbq_763",Oa="_errorState_1ebbq_764",Ma="_messageState_1ebbq_765",za="_proNotice_1ebbq_795",Ha="_rbxmGuide_1ebbq_813",Ka="_settingsInlinePanel_1ebbq_853",Ga="_settingsDrawer_1ebbq_873",Wa="_detailPopupLayer_1ebbq_889",Va="_detailDialog_1ebbq_905",Ya="_detailDialogHeader_1ebbq_922",Xa="_detailTitleBlock_1ebbq_933",Ja="_detailEyebrow_1ebbq_955",Za="_detailHeaderActions_1ebbq_964",Qa="_detailDialogBody_1ebbq_972",en="_detailPreviewPane_1ebbq_981",sn="_detailPreview_1ebbq_981",tn="_detailPreviewFallback_1ebbq_993",an="_detailContentPane_1ebbq_1029",nn="_formStack_1ebbq_1035",on="_drawerHeader_1ebbq_1039",ln="_detailSection_1ebbq_1090",rn="_noticeList_1ebbq_1091",cn="_settingsPanel_1ebbq_1092",dn="_setupNotice_1ebbq_1109",un="_field_1ebbq_1134",pn="_fieldLabelRow_1ebbq_1142",hn="_fieldHelp_1ebbq_1166",mn="_twoColumn_1ebbq_1171",bn="_technicalDetails_1ebbq_1182",xn="_detailGrid_1ebbq_1199",gn="_metadataList_1ebbq_1200",fn="_compactMeta_1ebbq_1211",yn="_copyableValue_1ebbq_1238",jn="_inlineCopyButton_1ebbq_1249",vn="_hashText_1ebbq_1270",Cn="_usageList_1ebbq_1274",_n="_usageItem_1ebbq_1280",Sn="_metadataItem_1ebbq_1281",Nn="_settingsSubsection_1ebbq_1329",An="_settingsSectionHeader_1ebbq_1334",In="_settingsDefinitionList_1ebbq_1347",Pn="_toggleRow_1ebbq_1369",kn="_inlineHelp_1ebbq_1383",a={page:_t,experimentalBadge:St,toolbarShell:Nt,toolbar:At,segmented:It,placeContextSlot:Pt,listContextSummary:kt,toolbarActions:wt,categoryControl:Rt,contextDivider:$t,categoryControlLabel:Lt,categoryRail:Bt,categoryButton:Ut,categoryButtonActive:Tt,copyRow:Et,buttonRow:Dt,segmentedActive:qt,placeSelectorLabel:Ft,placeSelect:Ot,sharedPlaceContext:Mt,commandButton:zt,primaryButton:Ht,iconButton:Kt,dangerButton:Gt,iconButtonActive:Wt,grid:Vt,folderGrid:Yt,explorer:Xt,explorerToolbar:Jt,explorerLocation:Zt,breadcrumb:Qt,breadcrumbSegment:ea,viewOptions:sa,organizationModeControl:ta,viewModeControl:aa,gridSizeControl:na,explorerSection:oa,folderTile:la,folderListRow:ra,assetListRow:ia,assetCard:ca,folderIcon:da,folderName:ua,folderCount:pa,assetList:ha,folderList:ma,assetListHeader:ba,listPreviewWrap:xa,listPreview:ga,listPreviewFallback:fa,listAssetName:ya,listAssetCategory:ja,listAssetScope:va,listAssetUpdated:Ca,folderType:_a,folderScope:Sa,folderStatus:Na,folderUpdated:Aa,assetCardSelected:Ia,thumbnailWrap:Pa,thumbnail:ka,thumbnailFallback:wa,assetCardBody:Ra,assetName:$a,assetMeta:La,statusChip:Ba,categoryPill:Ua,assetId:Ta,scopeText:Ea,muted:Da,emptyState:qa,notice:Fa,errorState:Oa,messageState:Ma,proNotice:za,rbxmGuide:Ha,settingsInlinePanel:Ka,settingsDrawer:Ga,detailPopupLayer:Wa,detailDialog:Va,detailDialogHeader:Ya,detailTitleBlock:Xa,detailEyebrow:Ja,detailHeaderActions:Za,detailDialogBody:Qa,detailPreviewPane:en,detailPreview:sn,detailPreviewFallback:tn,detailContentPane:an,formStack:nn,drawerHeader:on,detailSection:ln,noticeList:rn,settingsPanel:cn,setupNotice:dn,field:un,fieldLabelRow:pn,fieldHelp:hn,twoColumn:mn,technicalDetails:bn,detailGrid:xn,metadataList:gn,compactMeta:fn,copyableValue:yn,inlineCopyButton:jn,hashText:vn,usageList:Cn,usageItem:_n,metadataItem:Sn,settingsSubsection:Nn,settingsSectionHeader:An,settingsDefinitionList:In,toggleRow:Pn,inlineHelp:kn},wn={image:Is,decal:zs,audio:Os,mesh:Ks,model:As,video:Xs,animation:Vs};function Ae(e,t){return t(`assets.status.${e}`,e)}function Ze(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 Qe(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function Rn(e){return e.category==="decal"?e.roblox.creatorAssetId??e.roblox.assetId:e.roblox.assetId}function vs(e,t){var x;const r=((x=e.rbxm)==null?void 0:x.studioUploads)??[];if(r.length===0)return null;const n=r.filter(m=>m.status==="uploaded").length,l=r.filter(m=>m.status==="failed").length,g=[n>0?`${n} ${t("assets.detail.rbxmStudioUploadsUploaded","uploaded")}`:null,l>0?`${l} ${t("assets.detail.rbxmStudioUploadsFailed","failed")}`:null].filter(Boolean);return`${t("assets.detail.rbxmStudioUploadsLabel","Studio uploads")}: ${g.join(", ")}`}function $n({assets:e,selectedAssetId:t,selectedAssetKey:r=null,viewMode:n="grid",gridSize:l="medium",onSelect:g}){const{t:x}=me();return e.length===0?s.jsxs("div",{className:a.emptyState,children:[s.jsx("p",{children:x("assets.empty.title","No assets yet")}),s.jsx("span",{children:x("assets.empty.body","Choose a scope and category, then rescan that inbox folder.")})]}):s.jsx("div",{className:n==="list"?a.assetList:a.grid,"data-view-mode":n,"data-grid-size":l,children:e.map(m=>{const p=wn[m.category],R=Rn(m),W=vs(m,x),U=te(m),w=r?r===U:t===m.id,o=m.scope.kind==="shared"?x("assets.scope.shared","Shared"):x("assets.scope.place","Current Place");return n==="list"?s.jsxs("button",{type:"button",className:[a.assetListRow,w?a.assetCardSelected:""].filter(Boolean).join(" "),onClick:()=>g(U),children:[s.jsx("span",{className:a.listPreviewWrap,children:Qe(m)?s.jsx("img",{className:a.listPreview,src:ze(m),alt:"",loading:"lazy"}):s.jsx("span",{className:a.listPreviewFallback,"aria-hidden":"true",children:s.jsx(p,{size:18})})}),s.jsx("span",{className:a.listAssetName,children:m.displayName}),s.jsx("span",{className:a.listAssetCategory,children:de(m,x)}),s.jsx("span",{className:a.listAssetScope,children:o}),s.jsx(De,{variant:Ze(m.status),className:a.statusChip,children:Ae(m.status,x)}),s.jsx("time",{className:a.listAssetUpdated,dateTime:m.updatedAt,children:new Date(m.updatedAt).toLocaleDateString()})]},U):s.jsxs("button",{type:"button",className:[a.assetCard,w?a.assetCardSelected:""].filter(Boolean).join(" "),onClick:()=>g(U),children:[s.jsx("span",{className:a.thumbnailWrap,children:Qe(m)?s.jsx("img",{className:a.thumbnail,src:ze(m),alt:m.displayName,loading:"lazy"}):s.jsx("span",{className:a.thumbnailFallback,"aria-hidden":"true",children:s.jsx(p,{size:30})})}),s.jsxs("span",{className:a.assetCardBody,children:[s.jsx("span",{className:a.assetName,children:m.displayName}),s.jsxs("span",{className:a.assetMeta,children:[s.jsx(De,{variant:"neutral",className:a.categoryPill,children:de(m,x)}),s.jsx(De,{variant:Ze(m.status),className:a.statusChip,children:Ae(m.status,x)})]}),s.jsxs("span",{className:a.assetMeta,children:[s.jsx("span",{className:a.scopeText,children:o}),s.jsx("span",{className:a.assetId,children:R?`#${R}`:W??x("assets.status.localOnly","Local only")})]})]})]},U)})})}function es(e){return{scope:e==="all"?null:e,folderPath:""}}function Fe(e,t,r){return t==="shared"?e.scope.kind==="shared":e.scope.kind==="place"&&(r===null||e.scope.placeId===r)}function Ln(e,t){var r;return t?e.folderPath===t||((r=e.folderPath)==null?void 0:r.startsWith(`${t}/`))===!0:!0}function Bn({displayScope:e,assets:t,place:r,categoryFilter:n,organizationMode:l,viewMode:g,gridSize:x,selectedAssetKey:m,onSelectAsset:p,onClearSelection:R,onOrganizationModeChange:W,onViewModeChange:U,onGridSizeChange:w}){const{t:o}=me(),[S,Y]=c.useState(()=>es(e)),T=c.useRef(`${e}:${r.placeId??"-"}`),M=c.useRef(!1),Q=c.useRef(null),E=h=>h==="shared"?o("assets.scope.shared","Shared"):r.placeName??o("assets.scope.place","Current Place"),G=h=>{M.current=!0,Y(h),R()};c.useEffect(()=>{const h=`${e}:${r.placeId??"-"}`;T.current!==h&&(T.current=h,M.current=!0,Y(es(e)),R())},[e,R,r.placeId]),c.useEffect(()=>{var h;M.current&&(M.current=!1,(h=Q.current)==null||h.focus())},[S]);const B=c.useMemo(()=>S.scope===null?[]:t.filter(h=>Fe(h,S.scope,r.placeId)),[t,S.scope,r.placeId]);c.useEffect(()=>{if(S.scope===null)return;const h=Ct(B,S.folderPath);h!==S.folderPath&&(M.current=!0,Y(D=>({...D,folderPath:h})),R())},[n,S.folderPath,S.scope,R,B]);const X=c.useMemo(()=>l==="folders"?yt(B,S.folderPath):[],[S.folderPath,l,B]),H=c.useMemo(()=>e==="all"?t:t.filter(h=>Fe(h,e,r.placeId)),[t,e,r.placeId]),F=c.useMemo(()=>l==="all-assets"?vt(H):jt(B,S.folderPath),[H,S.folderPath,l,B]);c.useEffect(()=>{m&&(F.some(h=>te(h)===m)||R())},[R,m,F]);const P=S.folderPath?S.folderPath.split("/"):[],$=l==="all-assets"?o("assets.organization.all","All assets"):P[P.length-1]??(S.scope?E(S.scope):o("assets.scope.all","All scopes")),v=S.scope===null?t.length:B.filter(h=>Ln(h,S.folderPath)).length,A=Math.max(0,v-F.length),f=l==="all-assets"?o("assets.organization.summary","{count} assets").replace("{count}",String(F.length)):o("assets.explorer.summary","{direct} in this folder · {descendant} in subfolders").replace("{direct}",String(F.length)).replace("{descendant}",String(A)),i=h=>h===1?o("assets.folder.count.one","1 asset"):o("assets.folder.count.many","{count} assets").replace("{count}",String(h)),k=(h,D,I,b,K)=>s.jsxs("button",{type:"button",className:g==="list"?a.folderListRow:a.folderTile,"aria-label":`${D}, ${i(I)}`,onClick:K,children:[s.jsx("span",{className:a.folderIcon,"aria-hidden":"true",children:s.jsx(Ps,{size:g==="list"?22:28})}),s.jsx("span",{className:a.folderName,children:D}),g==="list"?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:a.folderType,children:o("assets.folder.type","Folder")}),s.jsx("span",{className:a.folderScope,children:E(b)}),s.jsx("span",{className:a.folderStatus,children:i(I)}),s.jsx("span",{className:a.folderUpdated,children:"—"})]}):s.jsx("span",{className:a.folderCount,children:i(I)})]},h),J=l==="folders"&&e==="all"&&S.scope===null?[{scope:"place",name:E("place")},{scope:"shared",name:E("shared")}].map(({scope:h,name:D})=>({scope:h,name:D,count:t.filter(I=>Fe(I,h,r.placeId)).length})):[];return s.jsxs("section",{className:a.explorer,"aria-label":o("assets.explorer.label","Asset explorer"),children:[s.jsxs("div",{className:a.explorerToolbar,children:[s.jsxs("div",{className:a.explorerLocation,children:[s.jsxs("nav",{className:a.breadcrumb,"aria-label":o("assets.breadcrumb.label","Asset path"),children:[l==="all-assets"?s.jsxs(s.Fragment,{children:[s.jsx("span",{children:e==="all"?o("assets.scope.all","All scopes"):E(e)}),s.jsx(qe,{size:14,"aria-hidden":"true"}),s.jsx("span",{"aria-current":"page",children:o("assets.organization.all","All assets")})]}):e==="all"?S.scope===null?s.jsx("span",{"aria-current":"page",children:o("assets.scope.all","All scopes")}):s.jsx("button",{type:"button",onClick:()=>G({scope:null,folderPath:""}),children:o("assets.scope.all","All scopes")}):null,l==="folders"&&S.scope?s.jsxs(s.Fragment,{children:[e==="all"?s.jsx(qe,{size:14,"aria-hidden":"true"}):null,P.length>0?s.jsx("button",{type:"button",onClick:()=>G({scope:S.scope,folderPath:""}),children:E(S.scope)}):s.jsx("span",{"aria-current":"page",children:E(S.scope)})]}):null,l==="folders"&&P.map((h,D)=>{const I=P.slice(0,D+1).join("/"),b=D===P.length-1;return s.jsxs("span",{className:a.breadcrumbSegment,children:[s.jsx(qe,{size:14,"aria-hidden":"true"}),b?s.jsx("span",{"aria-current":"page",children:h}):s.jsx("button",{type:"button",onClick:()=>G({scope:S.scope,folderPath:I}),children:h})]},I)})]}),s.jsx("h2",{ref:Q,tabIndex:-1,children:$}),s.jsx("p",{children:f})]}),s.jsxs("div",{className:a.viewOptions,"aria-label":o("assets.view.options","View options"),children:[s.jsxs("div",{className:a.organizationModeControl,role:"group","aria-label":o("assets.organization.label","Browse"),children:[s.jsx("button",{type:"button","aria-pressed":l==="folders",onClick:()=>W("folders"),children:o("assets.organization.folders","Folders")}),s.jsx("button",{type:"button","aria-pressed":l==="all-assets",onClick:()=>W("all-assets"),children:o("assets.organization.all","All assets")})]}),s.jsxs("div",{className:a.viewModeControl,role:"group","aria-label":o("assets.view.mode","View mode"),children:[s.jsxs("button",{type:"button","aria-pressed":g==="grid",onClick:()=>U("grid"),children:[s.jsx(Zs,{size:14}),o("assets.view.grid","Grid")]}),s.jsxs("button",{type:"button","aria-pressed":g==="list",onClick:()=>U("list"),children:[s.jsx(et,{size:14}),o("assets.view.list","List")]})]}),s.jsx("div",{className:a.gridSizeControl,role:"group","aria-label":o("assets.view.thumbnailSize","Thumbnail size"),title:g==="list"?o("assets.view.thumbnailSize.listReason","Thumbnail size is available in Grid view."):void 0,children:["small","medium","large"].map(h=>s.jsx("button",{type:"button","aria-pressed":x===h,disabled:g==="list",onClick:()=>w(h),children:o(`assets.view.size.${h}`,h[0].toUpperCase()+h.slice(1))},h))})]})]}),g==="list"&&(J.length>0||X.length>0||F.length>0)?s.jsxs("div",{className:a.assetListHeader,"aria-hidden":"true",children:[s.jsx("span",{}),s.jsx("span",{children:o("assets.list.name","Name")}),s.jsx("span",{children:o("assets.list.type","Type")}),s.jsx("span",{children:o("assets.list.scope","Scope")}),s.jsx("span",{children:o("assets.list.status","Status")}),s.jsx("span",{children:o("assets.list.updated","Updated")})]}):null,J.length>0?s.jsxs("section",{className:a.explorerSection,children:[s.jsx("h3",{children:o("assets.folders.title","Folders")}),s.jsx("div",{className:g==="list"?a.folderList:a.folderGrid,"data-grid-size":x,children:J.map(h=>k(`scope:${h.scope}`,h.name,h.count,h.scope,()=>G({scope:h.scope,folderPath:""})))})]}):null,X.length>0?s.jsxs("section",{className:a.explorerSection,children:[s.jsx("h3",{children:o("assets.folders.title","Folders")}),s.jsx("div",{className:g==="list"?a.folderList:a.folderGrid,"data-grid-size":x,children:X.map(h=>k(h.path,h.name,h.descendantCount,S.scope,()=>G({scope:S.scope,folderPath:h.path})))})]}):null,F.length>0?s.jsxs("section",{className:a.explorerSection,"aria-label":l==="all-assets"?o("assets.organization.all","All assets"):void 0,children:[l==="folders"?s.jsx("h3",{children:o("assets.folder.assetsTitle","Assets in this folder")}):null,s.jsx($n,{assets:F,selectedAssetId:null,selectedAssetKey:m,viewMode:g,gridSize:x,onSelect:p})]}):null,X.length===0&&F.length===0&&(J.length===0||t.length===0)?s.jsxs("div",{className:a.emptyState,children:[s.jsx("p",{children:t.length===0?n==="all"?o("assets.empty.title","No assets yet"):o("assets.empty.filteredTitle","No assets match this filter"):o("assets.empty.folderTitle","No matching assets in this folder")}),s.jsx("span",{children:t.length===0?n==="all"?o("assets.empty.body","Choose a scope and category, then rescan that inbox folder."):o("assets.empty.filteredBody","Choose another category or rescan the matching inbox folders."):o("assets.empty.folderBody","Try another folder or category filter.")})]}):null]})}const Un="https://create.roblox.com/dashboard/creations/store",Tn=/^https:\/\/create\.roblox\.com\/store\/asset\/\d+(?:\/.*)?$/;function En(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function Se(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0"),g=String(t.getHours()).padStart(2,"0"),x=String(t.getMinutes()).padStart(2,"0");return`${r}-${n}-${l} ${g}:${x}`}function Dn(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function qn(e){return e.file.preview?ze(e):fs(e)}function Fn(e){var r;const t=Object.entries(((r=e.rbxm)==null?void 0:r.classCounts)??{}).sort((n,l)=>l[1]-n[1]).slice(0,8);return t.length===0?"-":t.map(([n,l])=>`${n} ${l}`).join(", ")}function ss(e){var l;const t=(l=e.rbxm)==null?void 0:l.thumbnail;if(!t)return"-";const r=t.source?` via ${t.source}`:"",n=t.message?` · ${t.message}`:"";return`${t.status}${r}${n}`}function On(e){var l,g;const t=(g=(l=e.rbxm)==null?void 0:l.review)==null?void 0:g.summary;if(!t)return"-";const r=[["roots",t.rootCount],["parts",t.partCount],["mesh parts",t.meshPartCount],["scripts",t.scriptCount],["unanchored",t.unanchoredPartCount]].flatMap(([x,m])=>typeof m=="number"?[`${x} ${m}`]:[]),n=t.bounds;if(n&&typeof n=="object"&&"size"in n){const x=n.size;if(x&&typeof x=="object"){const{x:m,y:p,z:R}=x;typeof m=="number"&&typeof p=="number"&&typeof R=="number"&&r.push(`bounds ${m} x ${p} x ${R}`)}}return r.length>0?r.join(", "):"-"}function Mn(e){var r,n;const t=(r=e.rbxm)==null?void 0:r.generation;return t?t.schemaMode==="custom"&&((n=t.schemaGroups)!=null&&n.length)?`custom · ${t.schemaGroups.join(", ")}`:t.predefinedSchema?`${t.schemaMode??"predefined"} · ${t.predefinedSchema}`:t.schemaMode??"-":"-"}function ts(e){const{width:t,height:r}=e.file;return t===null||r===null?null:`${t} x ${r}px`}function as(e){const{durationMs:t}=e.file;return t===null?null:t<1e3?`${t} ms`:`${(t/1e3).toFixed(1)} s`}function zn(e){return`${Un}/${e}/configure`}function Hn(e){return e.category==="decal"?e.roblox.creatorAssetId??e.roblox.assetId??null:e.roblox.assetId??null}function Kn(e){const t=Hn(e),r=t?zn(t):null,n=e.category==="decal"?e.roblox.creatorAssetWebUrl??e.roblox.assetWebUrl:e.roblox.assetWebUrl;return!n||r&&Tn.test(n)?r:n}function Gn(e){return`${Se(e.startedAt)} -> ${e.status}`}function ns(e){return!e.creatorType||!e.creatorId?null:`${e.creatorType} ${e.creatorId}`}function os(e){return e.assetRole?`Asset role: ${e.assetRole}`:null}function Wn(e){const t=e.sourceProperty?` · ${e.sourceProperty}`:"";return`${e.path} · ${e.assetType} · ${e.status}${t}`}function Vn(e){return e.assetUri&&e.assetId?`${e.assetUri} (#${e.assetId})`:e.assetUri?e.assetUri:e.assetId?`#${e.assetId}`:e.message??"-"}function ve({label:e,value:t}){return t?s.jsx("button",{type:"button",className:a.inlineCopyButton,"aria-label":e,title:e,onClick:()=>{var r;return void((r=navigator.clipboard)==null?void 0:r.writeText(t))},children:s.jsx(xs,{size:13})}):null}function Yn({asset:e,busyAction:t,canUpload:r,canImportRbxm:n,importRbxmTooltip:l,importRbxmTargetParent:g,onClose:x,onSave:m,onUpload:p,onDelete:R,onImportRbxm:W,onRefreshStatus:U,onScanUsage:w}){var A,f;const{t:o}=me(),S=c.useRef(null),[Y,T]=c.useState(""),[M,Q]=c.useState("");if(c.useEffect(()=>{T((e==null?void 0:e.displayName)??""),Q((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 k;if(!e)return;(k=S.current)==null||k.focus();const i=J=>{J.key==="Escape"&&x()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e,x]),!e)return null;const E=e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath),G=!!e.roblox.assetUri,B=Kn(e),X=e.roblox.uploadAttempts??[],H=e.category==="decal"&&!!(e.roblox.creatorAssetId||e.roblox.backingImageAssetId||e.roblox.assetId),F=e.roblox.creatorAssetId??e.roblox.assetId,P=e.roblox.backingImageAssetId??e.roblox.assetId,$=vs(e,o),v=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 s.jsx("div",{className:a.detailPopupLayer,onClick:x,role:"presentation",children:s.jsxs("section",{ref:S,className:a.detailDialog,role:"dialog","aria-modal":"true","aria-label":o("assets.detail.title","Asset details"),tabIndex:-1,onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:a.detailDialogHeader,children:[s.jsxs("div",{className:a.detailTitleBlock,children:[s.jsxs("span",{className:a.detailEyebrow,children:[de(e,o)," · ",Ae(e.status,o)]}),s.jsx("h2",{children:e.displayName}),s.jsx("span",{children:e.id})]}),s.jsxs("div",{className:a.detailHeaderActions,children:[s.jsx(Z,{text:r?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:s.jsxs("button",{type:"button",className:a.commandButton,disabled:!r,onClick:p,children:[s.jsx(nt,{size:15}),o("assets.upload.open","Upload")]})}),n&&s.jsx(Z,{text:l,children:s.jsxs("button",{type:"button",className:a.commandButton,disabled:t==="import-rbxm",onClick:()=>void W(),children:[s.jsx(ks,{size:15}),o("assets.detail.importRbxm","Insert into Studio")]})}),s.jsxs("button",{type:"button",className:a.commandButton,disabled:!E||t==="status-refresh",onClick:()=>void U(),children:[s.jsx(hs,{size:15}),o("assets.detail.refreshStatus","Refresh")]}),s.jsxs("button",{type:"button",className:a.commandButton,disabled:!e.roblox.assetId||t==="usage-scan",onClick:()=>void w(),children:[s.jsx(tt,{size:15}),o("assets.detail.scanUsage","Scan usage")]}),s.jsx(Z,{text:o("assets.delete.tooltip","Delete this local Asset Library item."),children:s.jsxs("button",{type:"button",className:`${a.commandButton} ${a.dangerButton}`,disabled:t==="delete",onClick:R,children:[s.jsx(Es,{size:15}),o("common.delete","Delete")]})}),s.jsx(Z,{text:o("common.close","Close"),children:s.jsx("button",{type:"button",className:a.iconButton,onClick:x,"aria-label":o("common.close","Close"),children:s.jsx(Ke,{size:16})})})]})]}),s.jsxs("div",{className:a.detailDialogBody,children:[s.jsx("div",{className:a.detailPreviewPane,children:Dn(e)?s.jsx("img",{className:a.detailPreview,src:qn(e),alt:e.displayName}):s.jsxs("div",{className:a.detailPreviewFallback,children:[s.jsx("span",{children:de(e,o)}),s.jsx("code",{children:e.file.original}),((A=e.rbxm)==null?void 0:A.thumbnail)&&s.jsx("small",{children:ss(e)})]})}),s.jsxs("div",{className:a.detailContentPane,children:[s.jsxs("div",{className:a.formStack,children:[s.jsxs("label",{className:a.field,children:[s.jsx("span",{children:o("assets.detail.displayName","Display name")}),s.jsx("input",{value:Y,onChange:i=>T(i.target.value)})]}),s.jsxs("label",{className:a.field,children:[s.jsx("span",{children:o("assets.detail.description","Description")}),s.jsx("textarea",{value:M,rows:3,onChange:i=>Q(i.target.value)})]}),s.jsx("button",{type:"button",className:a.primaryButton,disabled:t==="update",onClick:()=>void m(Y,M),children:o("assets.detail.save","Save metadata")})]}),s.jsxs("section",{className:a.detailSection,children:[s.jsx("h3",{children:o("assets.detail.localFile","Local file")}),s.jsxs("dl",{className:a.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.fileName","File")}),s.jsx("dd",{children:e.file.original}),s.jsx("dt",{children:o("assets.detail.source","Source path")}),s.jsx("dd",{children:e.source.originalPath}),s.jsx("dt",{children:o("assets.detail.category","Category")}),s.jsx("dd",{children:de(e,o)}),s.jsx("dt",{children:o("assets.detail.scope","Scope")}),s.jsx("dd",{children:e.scope.kind==="shared"?o("assets.scope.shared","Shared"):o("assets.scope.place","Current Place")}),s.jsx("dt",{children:o("assets.detail.mimeType","Type")}),s.jsx("dd",{children:e.file.mimeType}),s.jsx("dt",{children:o("assets.detail.size","Size")}),s.jsx("dd",{children:En(e.file.sizeBytes)}),ts(e)&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.dimensions","Dimensions")}),s.jsx("dd",{children:ts(e)})]}),as(e)&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.duration","Duration")}),s.jsx("dd",{children:as(e)})]})]})]}),e.rbxm&&s.jsxs("section",{className:a.detailSection,children:[s.jsx("h3",{children:o("assets.detail.rbxm","RBXM contents")}),s.jsxs("dl",{className:a.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.rbxmExportedCount","Exported roots")}),s.jsx("dd",{children:e.rbxm.exportedCount}),s.jsx("dt",{children:o("assets.detail.rbxmClasses","Classes")}),s.jsx("dd",{children:Fn(e)}),s.jsx("dt",{children:o("assets.detail.rbxmThumbnail","Thumbnail")}),s.jsx("dd",{children:ss(e)}),$&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.rbxmStudioUploadsLabel","Studio uploads")}),s.jsx("dd",{children:$})]}),n&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.studioInsertTarget","Studio insert target")}),s.jsx("dd",{children:g})]})]}),e.rbxm.roots.length>0&&s.jsxs("div",{className:a.metadataList,children:[s.jsx("strong",{children:o("assets.detail.rbxmRoots","Root tree")}),e.rbxm.roots.map(i=>s.jsxs("div",{className:a.metadataItem,children:[s.jsxs("span",{children:[i.name," (",i.className,")"]}),s.jsx("code",{children:i.path})]},`${i.path}-${i.className}`))]}),e.rbxm.resourceReferences.length>0&&s.jsxs("div",{className:a.metadataList,children:[s.jsx("strong",{children:o("assets.detail.rbxmReferences","Asset references")}),e.rbxm.resourceReferences.map((i,k)=>s.jsxs("div",{className:a.metadataItem,children:[s.jsxs("span",{children:[i.path," · ",i.property]}),s.jsx("code",{children:i.assetId?`${i.value} (#${i.assetId})`:i.value})]},`${i.path}-${i.property}-${k}`))]}),e.rbxm.studioUploads&&e.rbxm.studioUploads.length>0&&s.jsxs("div",{className:a.metadataList,children:[s.jsx("strong",{children:o("assets.detail.rbxmStudioUploads","Embedded Studio uploads")}),e.rbxm.studioUploads.map((i,k)=>s.jsxs("div",{className:a.metadataItem,children:[s.jsx("span",{children:Wn(i)}),s.jsx("code",{children:Vn(i)})]},`${i.path}-${i.assetType}-${i.sourceProperty??""}-${k}`))]}),e.rbxm.generation&&s.jsxs("div",{className:a.metadataList,children:[s.jsx("strong",{children:o("assets.detail.rbxmGeneration","Generated model")}),s.jsxs("div",{className:a.metadataItem,children:[s.jsx("span",{children:o("assets.detail.rbxmGenerationProvider","Provider")}),s.jsx("code",{children:e.rbxm.generation.provider})]}),e.rbxm.generation.prompt&&s.jsxs("div",{className:a.metadataItem,children:[s.jsx("span",{children:o("assets.detail.rbxmGenerationPrompt","Prompt")}),s.jsx("code",{children:e.rbxm.generation.prompt})]}),s.jsxs("div",{className:a.metadataItem,children:[s.jsx("span",{children:o("assets.detail.rbxmGenerationSchema","Schema")}),s.jsx("code",{children:Mn(e)})]}),e.rbxm.generation.path&&s.jsxs("div",{className:a.metadataItem,children:[s.jsx("span",{children:o("assets.detail.rbxmGenerationPath","Studio path")}),s.jsx("code",{children:e.rbxm.generation.path})]})]}),e.rbxm.review&&s.jsxs("div",{className:a.metadataList,children:[s.jsx("strong",{children:o("assets.detail.rbxmReview","Model review")}),s.jsxs("div",{className:a.metadataItem,children:[s.jsx("span",{children:o("assets.detail.rbxmReviewReadiness","Readiness")}),s.jsx("code",{children:e.rbxm.review.readiness})]}),s.jsxs("div",{className:a.metadataItem,children:[s.jsx("span",{children:o("assets.detail.rbxmReviewSummary","Summary")}),s.jsx("code",{children:On(e)})]}),e.rbxm.review.findings.slice(0,8).map((i,k)=>s.jsxs("div",{className:a.metadataItem,children:[s.jsxs("span",{children:[i.severity," · ",i.category," · ",i.code]}),s.jsx("code",{children:i.path?`${i.path}: ${i.message}`:i.message})]},`${i.code}-${i.path}-${k}`))]})]}),s.jsxs("section",{className:a.detailSection,children:[s.jsx("h3",{children:o("assets.detail.roblox","Roblox upload status")}),s.jsxs("dl",{className:a.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.status","Status")}),s.jsx("dd",{children:Ae(e.status,o)}),H?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.decalAssetId","Roblox Decal ID")}),s.jsxs("dd",{className:a.copyableValue,children:[s.jsx("span",{children:F??o("assets.status.localOnly","Local only")}),s.jsx(ve,{label:o("assets.detail.copyDecalAssetId","Copy Roblox Decal ID"),value:F})]}),s.jsx("dt",{children:o("assets.detail.studioTextureImageId","Studio Texture Image ID")}),s.jsxs("dd",{className:a.copyableValue,children:[s.jsx("span",{children:P??"-"}),s.jsx(ve,{label:o("assets.detail.copyStudioTextureImageId","Copy Studio Texture Image ID"),value:P})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.assetId","Asset ID")}),s.jsxs("dd",{className:a.copyableValue,children:[s.jsx("span",{children:e.roblox.assetId??o("assets.status.localOnly","Local only")}),s.jsx(ve,{label:o("assets.detail.copyAssetId","Copy Asset ID"),value:e.roblox.assetId})]})]}),s.jsx("dt",{children:o("assets.detail.studioUri","Studio URI")}),s.jsx("dd",{children:e.roblox.assetUri??"-"}),s.jsx("dt",{children:o("assets.detail.robloxWebUrl","Creator Dashboard URL")}),s.jsxs("dd",{className:a.copyableValue,children:[s.jsx("span",{children:B??"-"}),s.jsx(ve,{label:o("assets.detail.copyWebUrl","Copy configure URL"),value:B})]}),e.roblox.errorMessage&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.error","Error")}),s.jsx("dd",{children:e.roblox.errorMessage})]})]}),s.jsxs("div",{className:a.copyRow,children:[s.jsxs("button",{type:"button",className:a.commandButton,disabled:!G,onClick:()=>{var i;return e.roblox.assetUri&&void((i=navigator.clipboard)==null?void 0:i.writeText(e.roblox.assetUri))},children:[s.jsx(xs,{size:15}),o("assets.detail.copyStudioUri","Copy Studio URI")]}),B&&s.jsxs("a",{className:a.commandButton,href:B,target:"_blank",rel:"noreferrer",children:[s.jsx(ws,{size:15}),o("assets.detail.openRobloxPage","Open configure page")]})]}),e.roblox.assetId&&s.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.")}),X.length>0&&s.jsxs("div",{className:a.metadataList,children:[s.jsx("strong",{children:o("assets.detail.uploadHistory","Upload history")}),X.slice().reverse().map((i,k)=>s.jsxs("div",{className:a.metadataItem,children:[s.jsx("span",{children:Gn(i)}),ns(i)&&s.jsx("code",{children:ns(i)}),os(i)&&s.jsx("code",{children:os(i)}),i.operationPath&&s.jsx("code",{children:i.operationPath}),i.assetId&&s.jsxs("code",{children:[o("assets.detail.assetId","Asset ID"),": ",i.assetId]}),i.remotePath&&s.jsx("code",{children:i.remotePath}),i.message&&s.jsx("code",{children:i.message}),i.errorMessage&&s.jsx("code",{children:i.errorMessage})]},`${i.startedAt}-${i.operationPath??k}`))]})]}),s.jsxs("section",{className:a.detailSection,children:[s.jsx("h3",{children:o("assets.detail.usedInPlace","Where this asset is used in this Place")}),s.jsxs("dl",{className:a.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.usageSource","Checked against")}),s.jsx("dd",{children:e.usage.scanSource==="localSync"?o("assets.detail.usageSource.localSync","Local Sync files"):o("assets.detail.usageSource.notScanned","Not checked yet")}),s.jsx("dt",{children:o("assets.detail.lastScanned","Last checked")}),s.jsx("dd",{children:e.usage.lastScannedAt?o("assets.detail.lastScannedAt","Last checked: {time}").replace("{time}",Se(e.usage.lastScannedAt)):o("assets.detail.lastScanned.never","No check yet")})]}),e.usage.references.length===0?s.jsx("p",{className:a.muted,children:v}):s.jsx("div",{className:a.usageList,children:e.usage.references.map((i,k)=>s.jsxs("div",{className:a.usageItem,children:[s.jsx("strong",{children:i.kind==="property"?i.instancePath:i.filePath}),s.jsx("span",{children:i.property??o("assets.detail.line","line {line}").replace("{line}",String(i.line??"-"))}),s.jsx("code",{children:i.value})]},`${i.kind}-${k}`))})]}),s.jsxs("details",{className:a.technicalDetails,children:[s.jsx("summary",{children:o("assets.detail.technicalDetails","Technical details")}),s.jsxs("dl",{className:a.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.stableId","Stable ID")}),s.jsx("dd",{className:a.hashText,children:e.id}),s.jsx("dt",{children:o("assets.detail.sourceKind","Source kind")}),s.jsx("dd",{children:e.source.kind}),s.jsx("dt",{children:o("assets.detail.sha256","SHA-256")}),s.jsx("dd",{className:a.hashText,children:e.file.sha256}),s.jsx("dt",{children:o("assets.detail.createdAt","Created")}),s.jsx("dd",{children:Se(e.createdAt)}),s.jsx("dt",{children:o("assets.detail.updatedAt","Updated")}),s.jsx("dd",{children:Se(e.updatedAt)}),e.roblox.operationId&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.operationId","Operation ID")}),s.jsx("dd",{className:a.hashText,children:e.roblox.operationId})]}),e.roblox.operationPath&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.operationPath","Operation path")}),s.jsx("dd",{className:a.hashText,children:e.roblox.operationPath})]}),e.roblox.versionId&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.versionId","Version ID")}),s.jsx("dd",{className:a.hashText,children:e.roblox.versionId})]}),e.roblox.remotePath&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.remotePath","Remote path")}),s.jsx("dd",{className:a.hashText,children:e.roblox.remotePath})]}),e.roblox.moderationState&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.moderationState","Moderation")}),s.jsx("dd",{children:e.roblox.moderationState})]})]}),((f=e.rbxm)==null?void 0:f.thumbnail.attempts)&&e.rbxm.thumbnail.attempts.length>0&&s.jsxs("div",{className:a.metadataList,children:[s.jsx("strong",{children:o("assets.detail.rbxmThumbnailAttempts","Thumbnail attempts")}),e.rbxm.thumbnail.attempts.map((i,k)=>s.jsxs("div",{className:a.metadataItem,children:[s.jsxs("span",{children:[i.method," · ",i.status]}),i.message&&s.jsx("code",{children:i.message})]},`${i.method}-${k}`))]})]})]})]})]})})}function Cs(e){return{assetUploadByOpenCloudEnabled:e.hot.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD===!0}}function Xn(e){const t={};return typeof e.assetUploadByOpenCloudEnabled=="boolean"&&(t.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD=e.assetUploadByOpenCloudEnabled),t}async function _s(){const e=await O.get("/api/dashboard/settings");return Cs(e)}async function Jn(e){const t=await O.patch("/api/dashboard/settings",Xn(e));return Cs(t)}async function Ss(){return O.get("/api/dashboard/open-cloud/credential-profiles")}async function Zn(e){return O.post("/api/dashboard/open-cloud/credential-profiles",e)}async function Qn(e){return O.patch("/api/dashboard/open-cloud/credential-profiles/active",{profileId:e})}async function eo(e,t){return O.put(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/api-key`,t)}async function so(e){return O.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}`)}async function to(e,t){return O.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators`,t)}async function ao(e,t){return O.patch(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(t)}/default`,{})}async function no(e,t){return O.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(t)}`)}async function oo(e,t){return O.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/test`,t?{creatorPresetId:t}:{})}async function lo(e){return O.post("/api/dashboard/open-cloud/credential/test",e?{apiKey:e}:{})}function ro(e){return e.category==="image"||e.category==="decal"}function io(e,t){return e==="group"?t("assets.creator.group","Group"):t("assets.creator.user","User")}function co(e,t){return`${e.label} · ${io(e.creatorType,t)} ${e.creatorId}`}function ls(e){if(!e)return null;if(e.defaultCreatorId){const t=e.creators.find(r=>r.id===e.defaultCreatorId);if(t)return t}return e.creators[0]??null}function uo({asset:e,open:t,canUpload:r,busyAction:n,onClose:l,onBack:g,onOpenSettings:x,onUpload:m}){const{t:p}=me(),R=c.useRef(null),[W,U]=c.useState(null),[w,o]=c.useState(null),[S,Y]=c.useState(!1),[T,M]=c.useState(null),[Q,E]=c.useState(""),[G,B]=c.useState(""),[X,H]=c.useState(""),[F,P]=c.useState("user"),[$,v]=c.useState("");if(c.useEffect(()=>{E((e==null?void 0:e.displayName)??""),B((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(!t)return;let C=!1;return Y(!0),M(null),(async()=>{try{const[z,V]=await Promise.all([_s(),Ss()]);if(C)return;U(z);const re=V.profiles.find(ae=>ae.id===V.activeProfileId)??V.profiles[0]??null;o(re);const ee=ls(re);H((ee==null?void 0:ee.id)??""),P((ee==null?void 0:ee.creatorType)??"user"),v((ee==null?void 0:ee.creatorId)??"")}catch(z){if(C)return;M(z instanceof Error?z.message:p("assets.upload.settingsLoadFailed","Failed to load upload settings.")),U(null),o(null)}finally{C||Y(!1)}})(),()=>{C=!0}},[t,p]),c.useEffect(()=>{var z;if(!t||!e)return;(z=R.current)==null||z.focus();const C=V=>{V.key==="Escape"&&l()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[e,l,t]),!t||!e)return null;const A=(W==null?void 0:W.assetUploadByOpenCloudEnabled)===!0,f=!!w,i=ls(w),k=(w==null?void 0:w.creators.find(C=>C.id===X))??null,J=!!i,D=(w==null?void 0:w.storageProvider)==="env"&&f&&!J,I=D&&$.trim().length>0,b=r&&!S&&!T&&(!A||!f||!J&&!D),K=r&&!S&&!T&&A&&f&&(J||I)&&n!=="upload";return s.jsx("div",{className:a.detailPopupLayer,onClick:l,role:"presentation",children:s.jsxs("section",{ref:R,className:a.detailDialog,role:"dialog","aria-modal":"true","aria-label":p("assets.upload.title","Upload asset"),tabIndex:-1,onClick:C=>C.stopPropagation(),children:[s.jsxs("div",{className:a.detailDialogHeader,children:[s.jsxs("div",{className:a.detailTitleBlock,children:[s.jsxs("span",{className:a.detailEyebrow,children:[de(e,p)," · ",p("assets.upload.intent","Upload to Roblox")]}),s.jsx("h2",{children:p("assets.upload.title","Upload asset")}),s.jsx("span",{children:e.displayName})]}),s.jsxs("div",{className:a.detailHeaderActions,children:[s.jsxs("button",{type:"button",className:a.commandButton,onClick:g,children:[s.jsx(qs,{size:15}),p("assets.upload.backToDetails","Back to details")]}),s.jsx(Z,{text:p("common.close","Close"),children:s.jsx("button",{type:"button",className:a.iconButton,onClick:l,"aria-label":p("common.close","Close"),children:s.jsx(Ke,{size:16})})})]})]}),s.jsxs("div",{className:a.detailDialogBody,children:[s.jsx("div",{className:a.detailPreviewPane,children:ro(e)?s.jsx("img",{className:a.detailPreview,src:fs(e),alt:e.displayName}):s.jsxs("div",{className:a.detailPreviewFallback,children:[s.jsx("span",{children:de(e,p)}),s.jsx("code",{children:e.file.original})]})}),s.jsxs("div",{className:a.detailContentPane,children:[!r&&s.jsx("div",{className:a.notice,children:p("assets.proOnly.upload","Roblox upload is available on Pro.")}),S&&s.jsx("div",{className:a.notice,children:p("assets.upload.checkingSettings","Checking upload settings...")}),T&&s.jsx("div",{className:a.errorState,children:T}),s.jsxs("dl",{className:a.compactMeta,children:[s.jsx("dt",{children:p("assets.detail.category","Category")}),s.jsx("dd",{children:de(e,p)}),s.jsx("dt",{children:p("assets.detail.source","Source")}),s.jsx("dd",{children:e.source.originalPath})]}),b&&s.jsxs("div",{className:a.setupNotice,children:[s.jsx("strong",{children:p("assets.upload.settingsRequired","Upload settings required")}),s.jsx("p",{children:f?A?p("assets.upload.settingsRequired.creator","Save a default Creator before uploading."):p("assets.upload.settingsRequired.toggle","Enable Open Cloud upload before uploading."):p("assets.upload.settingsRequired.apiKey","Save an Open Cloud API key before uploading.")}),s.jsxs("button",{type:"button",className:a.commandButton,onClick:x,children:[s.jsx(ms,{size:15}),p("assets.upload.openSettings","Open Asset Library settings")]})]}),s.jsxs("div",{className:a.formStack,children:[s.jsxs("label",{className:a.field,children:[s.jsx("span",{children:p("assets.detail.displayName","Display name")}),s.jsx("input",{value:Q,disabled:!r,onChange:C=>E(C.target.value)}),s.jsx("small",{className:a.fieldHelp,children:p("assets.upload.displayNameHelp","Saved to Roblox as the asset display name.")})]}),s.jsxs("label",{className:a.field,children:[s.jsx("span",{children:p("assets.detail.description","Description")}),s.jsx("textarea",{value:G,rows:3,disabled:!r,onChange:C=>B(C.target.value)}),s.jsx("small",{className:a.fieldHelp,children:p("assets.upload.descriptionHelp","Saved to Roblox as the asset description.")})]}),J&&s.jsxs("label",{className:a.field,children:[s.jsx("span",{children:p("assets.upload.creator","Creator")}),s.jsx("select",{"aria-label":p("assets.upload.creator","Creator"),value:X,disabled:!r||S,onChange:C=>H(C.target.value),children:w==null?void 0:w.creators.map(C=>s.jsx("option",{value:C.id,children:co(C,p)},C.id))}),s.jsx("small",{className:a.fieldHelp,children:p("assets.upload.creatorHelp","Used by Open Cloud as the owner of the uploaded asset.")})]}),D&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:a.inlineHelp,children:p("assets.upload.envCreatorHelp","Environment API keys cannot save a default Creator here. Enter the Creator for this upload.")}),s.jsxs("div",{className:a.twoColumn,children:[s.jsxs("label",{className:a.field,children:[s.jsx("span",{children:p("assets.upload.creatorType","Creator type")}),s.jsxs("select",{value:F,disabled:!r,onChange:C=>P(C.target.value),children:[s.jsx("option",{value:"user",children:p("assets.creator.user","User")}),s.jsx("option",{value:"group",children:p("assets.creator.group","Group")})]}),s.jsx("small",{className:a.fieldHelp,children:p("assets.upload.creatorTypeHelp","Sent to Open Cloud as the Creator type.")})]}),s.jsxs("label",{className:a.field,children:[s.jsx("span",{children:p("assets.upload.creatorId","Creator ID")}),s.jsx("input",{value:$,disabled:!r,onChange:C=>v(C.target.value)}),s.jsx("small",{className:a.fieldHelp,children:p("assets.upload.creatorIdHelp","Sent to Open Cloud as the User or Group ID that owns the uploaded asset.")})]})]})]}),s.jsx("button",{type:"button",className:a.primaryButton,disabled:!K,onClick:()=>{const C=$.trim(),z=D&&C?{creatorType:F,creatorId:C}:{},V=!D&&k&&i&&k.id!==i.id?{creatorType:k.creatorType,creatorId:k.creatorId}:{};m({displayName:Q,description:G,...z,...V})},children:n==="upload"?p("assets.upload.uploading","Uploading..."):p("assets.upload.submit","Upload with Roblox Open Cloud")})]}),s.jsxs("div",{className:a.noticeList,children:[s.jsx("p",{children:p("assets.upload.noDelete","WEPPY does not provide Roblox asset deletion.")}),s.jsx("p",{children:p("assets.upload.delay","Roblox processing and moderation can delay visibility in Studio or Creator Dashboard.")})]})]})]})]})})}function rs(e,t){return e==="env"?t("assets.settings.credential.env","Environment variable"):t("assets.settings.credential.local","Local encrypted file")}function Oe(e,t){return e==="valid"?t("assets.settings.validation.valid","Connected"):e==="invalid"?t("assets.settings.validation.invalid","Needs attention"):t("assets.settings.validation.unknown","Not tested")}function po(e,t){return(e==null?void 0:e.status)==="valid"?t("assets.settings.apiKeyTested","Open Cloud API key connection tested."):(e==null?void 0:e.message)??t("assets.settings.tested","Connection tested.")}function ho(e,t){return(e==null?void 0:e.status)==="valid"?t("assets.settings.apiKeyTested","Open Cloud API key connection tested."):(e==null?void 0:e.message)??t("assets.settings.tested","Connection tested.")}function mo(e,t){return e==="group"?t("assets.creator.group","Group"):t("assets.creator.user","User")}function bo(e,t){return`${mo(e.creatorType,t)} ${e.creatorId}`}function xo({open:e,tier:t,onClose:r}){const{t:n}=me(),[l,g]=c.useState(null),[x,m]=c.useState(null),[p,R]=c.useState(""),[W,U]=c.useState(!1),[w,o]=c.useState(""),[S,Y]=c.useState(""),[T,M]=c.useState("user"),[Q,E]=c.useState(""),[G,B]=c.useState(""),[X,H]=c.useState(!0),[F,P]=c.useState(null),[$,v]=c.useState(null),[A,f]=c.useState(!1),i=t==="basic",k=c.useCallback(async()=>{f(!0),P(null);try{const[u,_]=await Promise.all([_s(),Ss()]);g(u),m(_);const L=_.profiles.find(ue=>ue.id===_.activeProfileId)??_.profiles[0]??null;R((L==null?void 0:L.id)??""),U(!L),H(!L||L.creators.length===0),M("user"),E(""),B("")}catch(u){P(u instanceof Error?u.message:n("assets.settings.loadFailed","Failed to load upload settings."))}finally{f(!1)}},[n]);if(c.useEffect(()=>{e&&k()},[k,e]),!e)return null;const J=(l==null?void 0:l.assetUploadByOpenCloudEnabled)===!0,h=S.trim(),D=Q.trim(),I=(x==null?void 0:x.profiles)??[],b=I.find(u=>u.id===p)??I[0]??null,K=!!b,C=K&&(b==null?void 0:b.storageProvider)==="localFile",z=K&&(b==null?void 0:b.storageProvider)==="env",V=b!=null&&b.defaultCreatorId?b.creators.find(u=>u.id===b.defaultCreatorId):b==null?void 0:b.creators[0],re=!!(b!=null&&b.creators.length),ee=!re||X,ae=I.length>1,ie=i?n("assets.settings.action.proRequired","Asset upload settings are available on Pro."):A?n("assets.settings.action.busy","Wait for the current settings action to finish."):null,ke=i||A||!h,we=ie??(h?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.")),ge=i||A||!h&&!K,fe=ie??(h?n("assets.settings.testConnection.tooltip.entered","Test the entered API key before saving it."):K?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.")),ye=i||A||!C,je=ie??(C?n("assets.settings.removeApiKey.tooltip.ready","Remove the locally saved Open Cloud API key."):z?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.")),Re=i||A||!C||!D,$e=ie??(z?n("assets.settings.saveCreator.tooltip.env","Environment API keys cannot save a default Creator here. Enter Creator details in the upload dialog."):C?D?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.")),Le=ie??(C?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.")),Be=i||A||z||!C,Ue=ie??(C?n("assets.settings.unregisterCreator.tooltip.ready","Unregister this Creator from the selected profile."):z?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.")),Te=V?n("assets.settings.saveCreatorPreset","Save Creator"):n("assets.settings.saveCreator","Save default Creator"),d=(b==null?void 0:b.label)??n("assets.settings.credential.none","No API key saved"),y=u=>{const _=u.profiles.find(L=>L.id===u.activeProfileId)??u.profiles[0]??null;m(u),R((_==null?void 0:_.id)??""),H(!_||_.creators.length===0),U(u.profiles.length===0)},j=async()=>{if(b){f(!0);try{const u=await oo(b.id,V==null?void 0:V.id);y(u),P(ho(u.validation,n))}catch(u){P(u instanceof Error?u.message:n("assets.settings.testFailed","Connection test failed."))}finally{f(!1)}}},N=async()=>{if($){f(!0);try{if($.kind==="apiKey"){const u=await so($.profileId);y(u),P(n("assets.settings.apiKeyRemoved","Open Cloud API key unregistered from local storage."))}else{const u=await no($.profileId,$.creatorPresetId);y(u),P(n("assets.settings.creatorUnregistered","Creator unregistered from this profile."))}v(null)}catch(u){P(u instanceof Error?u.message:$.kind==="apiKey"?n("assets.settings.removeFailed","Failed to unregister API key."):n("assets.settings.creatorUnregisterFailed","Failed to unregister Creator."))}finally{f(!1)}}},q=($==null?void 0:$.kind)==="apiKey"?n("assets.settings.unregisterApiKey.title","Unregister API Key?"):n("assets.settings.unregisterCreator.title","Unregister Creator?"),ne=($==null?void 0:$.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."),se=($==null?void 0:$.kind)==="apiKey"?n("assets.settings.removeApiKey","Unregister API Key"):n("assets.settings.unregisterCreator","Unregister Creator");return s.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:[s.jsxs("div",{className:a.drawerHeader,children:[s.jsxs("div",{children:[s.jsx("h2",{children:n("assets.settings.title","Asset Library settings")}),s.jsx("span",{children:d})]}),s.jsx(Z,{text:n("common.close","Close"),children:s.jsx("button",{type:"button",className:a.iconButton,onClick:r,"aria-label":n("common.close","Close"),children:s.jsx(Ke,{size:16})})})]}),i&&s.jsx("div",{className:`${a.notice} ${a.proNotice}`,children:n("assets.settings.proOnly","Roblox upload settings and Open Cloud credential controls are available on Pro.")}),s.jsxs("section",{className:a.settingsPanel,children:[s.jsxs("label",{className:a.toggleRow,children:[s.jsxs("span",{children:[s.jsx("strong",{children:n("assets.settings.openCloudToggle","Open Cloud upload")}),s.jsx("small",{children:n("assets.settings.openCloudToggle.help","Controls whether server-side Open Cloud upload mutations can run.")})]}),s.jsx(Bs,{checked:J,disabled:i||A,onChange:u=>{(async()=>{f(!0);try{const _=await Jn({assetUploadByOpenCloudEnabled:u.target.checked});g(_),P(n("assets.settings.saved","Upload settings saved."))}catch(_){P(_ instanceof Error?_.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{f(!1)}})()}})]}),ae&&s.jsx("div",{className:a.metadataList,children:I.map(u=>{const _=u.id===(b==null?void 0:b.id);return s.jsxs("div",{className:a.metadataItem,children:[s.jsx("strong",{children:u.label}),s.jsxs("span",{children:[n("assets.settings.field.storage","Storage"),": ",rs(u.storageProvider,n)]}),s.jsxs("span",{children:[n("assets.settings.field.validationStatus","Validation status"),": ",Oe(u.validationStatus,n)]}),_&&s.jsx("code",{children:n("assets.settings.activeProfileBadge","Active")}),!_&&u.storageProvider==="localFile"&&s.jsx("button",{type:"button",className:a.commandButton,disabled:i||A,onClick:()=>{(async()=>{f(!0);try{const L=await Qn(u.id),ue=L.profiles.find(Ee=>Ee.id===(L.activeProfileId??u.id))??u;m(L),R(ue.id),H(ue.creators.length===0),M("user"),E(""),B(""),P(n("assets.settings.profileSelected","Open Cloud credential profile selected."))}catch(L){P(L instanceof Error?L.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{f(!1)}})()},children:n("assets.settings.useProfile","Use profile")})]},u.id)})}),b&&s.jsxs("div",{className:a.settingsSubsection,children:[s.jsx("div",{className:a.settingsSectionHeader,children:s.jsx("h3",{children:n("assets.settings.credentialProfile","Credential Profile")})}),s.jsxs("div",{className:a.metadataItem,children:[s.jsxs("dl",{className:a.settingsDefinitionList,children:[s.jsxs("div",{children:[s.jsx("dt",{children:n("assets.settings.field.profile","Profile")}),s.jsx("dd",{children:b.label})]}),b.maskedKey&&s.jsxs("div",{children:[s.jsx("dt",{children:n("assets.settings.field.apiKey","API Key")}),s.jsx("dd",{children:b.maskedKey})]}),s.jsxs("div",{children:[s.jsx("dt",{children:n("assets.settings.field.storage","Storage")}),s.jsx("dd",{children:rs(b.storageProvider,n)})]}),s.jsxs("div",{children:[s.jsx("dt",{children:n("assets.settings.field.validationStatus","Validation status")}),s.jsx("dd",{children:Oe(b.validationStatus,n)})]}),s.jsxs("div",{children:[s.jsx("dt",{children:n("assets.settings.field.creators","Creators")}),s.jsx("dd",{children:b.creators.length})]})]}),!W&&s.jsxs("div",{className:a.buttonRow,children:[s.jsx(Z,{text:fe,children:s.jsx("button",{type:"button",className:a.commandButton,disabled:ge,onClick:()=>{j()},children:n("assets.settings.testConnection","Test Connection")})}),C&&s.jsx("button",{type:"button",className:a.commandButton,disabled:i||A,onClick:()=>U(!0),children:n("assets.settings.replaceApiKey","Replace API Key")}),s.jsx(Z,{text:je,children:s.jsx("button",{type:"button",className:`${a.commandButton} ${a.dangerButton}`,disabled:ye,onClick:()=>v({kind:"apiKey",profileId:b.id}),children:n("assets.settings.removeApiKey","Unregister API Key")})})]})]})]}),W&&s.jsxs("div",{className:a.formStack,children:[s.jsxs("div",{className:a.field,children:[s.jsx("div",{className:a.fieldLabelRow,children:s.jsx("label",{htmlFor:"asset-settings-open-cloud-profile-label",children:n("assets.settings.profileLabel","Profile name")})}),s.jsx("input",{id:"asset-settings-open-cloud-profile-label",value:w,disabled:i||A,onChange:u=>o(u.target.value),placeholder:n("assets.settings.profileLabel.placeholder","Studio automation key")}),s.jsx("p",{className:a.inlineHelp,children:n("assets.settings.profileLabel.help","Optional. If left blank, WEPPY saves this profile as Open Cloud key automatically.")})]}),s.jsxs("div",{className:a.field,children:[s.jsxs("div",{className:a.fieldLabelRow,children:[s.jsx("label",{htmlFor:"asset-settings-open-cloud-api-key",children:n("assets.settings.apiKey","Open Cloud API Key")}),s.jsx(Ye,{topicId:"openCloudApiKey",variant:"field",state:{hasOpenCloudCredential:K}})]}),s.jsx("input",{id:"asset-settings-open-cloud-api-key",value:S,type:"password",disabled:i||A,onChange:u=>Y(u.target.value)}),s.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.")})]}),!K&&s.jsx("p",{className:a.inlineHelp,children:s.jsx("a",{href:Us["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.")})}),s.jsxs("div",{className:a.buttonRow,children:[s.jsx(Z,{text:we,children:s.jsx("button",{type:"button",className:a.commandButton,disabled:ke,onClick:()=>{(async()=>{var u;f(!0);try{const _={apiKey:h,...w.trim()?{label:w.trim()}:{}},L=(b==null?void 0:b.storageProvider)==="localFile"?await eo(b.id,_):await Zn(_),ue=L.profiles.find(Ee=>{var Ve;return Ee.id===(L.activeProfileId??((Ve=L.profile)==null?void 0:Ve.id))});m(L),R(L.activeProfileId??((u=L.profile)==null?void 0:u.id)??""),H(!ue||ue.creators.length===0),U(!1),Y(""),o(""),P(n("assets.settings.apiKeySaved","Open Cloud API key saved locally."))}catch(_){P(_ instanceof Error?_.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{f(!1)}})()},children:n("assets.settings.saveApiKey","Save API Key")})}),s.jsx(Z,{text:fe,children:s.jsx("button",{type:"button",className:a.commandButton,disabled:ge,onClick:()=>{(async()=>{f(!0);try{const u=await lo(h||void 0);P(po(u.validation,n))}catch(u){P(u instanceof Error?u.message:n("assets.settings.testFailed","Connection test failed."))}finally{f(!1)}})()},children:n("assets.settings.testConnection","Test Connection")})}),s.jsx(Z,{text:je,children:s.jsx("button",{type:"button",className:`${a.commandButton} ${a.dangerButton}`,disabled:ye,onClick:()=>{b&&v({kind:"apiKey",profileId:b.id})},children:n("assets.settings.removeApiKey","Unregister API Key")})})]})]}),s.jsx("div",{className:a.metadataList,children:b==null?void 0:b.creators.map(u=>s.jsxs("div",{className:a.metadataItem,children:[s.jsx("strong",{children:u.label}),s.jsx("span",{children:bo(u,n)}),u.id===b.defaultCreatorId&&s.jsx("code",{children:n("assets.settings.defaultCreatorBadge","Default")}),s.jsxs("span",{children:[n("assets.settings.field.validationStatus","Validation status"),": ",Oe(u.validationStatus,n)]}),s.jsxs("div",{className:a.buttonRow,children:[u.id!==b.defaultCreatorId&&b.storageProvider==="localFile"&&s.jsx("button",{type:"button",className:a.commandButton,disabled:i||A,onClick:()=>{(async()=>{if(b){f(!0);try{const _=await ao(b.id,u.id);m(_),P(n("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(_){P(_ instanceof Error?_.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{f(!1)}}})()},children:n("assets.settings.makeDefaultCreator","Make default")}),s.jsx(Z,{text:Ue,children:s.jsx("button",{type:"button",className:`${a.commandButton} ${a.dangerButton}`,disabled:Be,onClick:()=>v({kind:"creator",profileId:b.id,creatorPresetId:u.id}),children:n("assets.settings.unregisterCreator","Unregister Creator")})})]})]},u.id))}),re&&!X&&s.jsx(Z,{text:Le,children:s.jsx("button",{type:"button",className:a.commandButton,disabled:i||A||z||!C,onClick:()=>{M("user"),E(""),B(""),H(!0)},children:n("assets.settings.addCreator","Add Creator")})}),ee&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:a.twoColumn,children:[s.jsxs("div",{className:a.field,children:[s.jsx("div",{className:a.fieldLabelRow,children:s.jsx("label",{htmlFor:"asset-settings-creator-type",children:n("assets.upload.creatorType","Creator type")})}),s.jsxs("select",{id:"asset-settings-creator-type",value:T,disabled:i||A||z||!C,onChange:u=>M(u.target.value),children:[s.jsx("option",{value:"user",children:n("assets.creator.user","User")}),s.jsx("option",{value:"group",children:n("assets.creator.group","Group")})]})]}),s.jsxs("div",{className:a.field,children:[s.jsxs("div",{className:a.fieldLabelRow,children:[s.jsx("label",{htmlFor:"asset-settings-creator-id",children:n("assets.upload.creatorId","Creator ID")}),s.jsx(Ye,{topicId:"openCloudCreatorId",variant:"field",state:{hasDefaultCreator:!!V}})]}),s.jsx("input",{id:"asset-settings-creator-id",value:Q,disabled:i||A||z||!C,onChange:u=>E(u.target.value)}),s.jsx("p",{className:a.inlineHelp,children:n("assets.settings.creatorId.inlineHelp","Default owner for new Roblox assets: your User ID or a Group ID.")})]})]}),s.jsxs("div",{className:a.field,children:[s.jsx("div",{className:a.fieldLabelRow,children:s.jsx("label",{htmlFor:"asset-settings-creator-label",children:n("assets.settings.creatorLabel","Creator label")})}),s.jsx("input",{id:"asset-settings-creator-label",value:G,disabled:i||A||z||!C,onChange:u=>B(u.target.value),placeholder:n("assets.settings.creatorLabel.placeholder","Main studio group")}),s.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.")})]}),!V&&s.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.")}),s.jsxs("div",{className:a.buttonRow,children:[s.jsx(Z,{text:$e,children:s.jsx("button",{type:"button",className:a.primaryButton,disabled:Re,onClick:()=>{(async()=>{if(b){f(!0);try{const u=await to(b.id,{creatorType:T,creatorId:D,makeDefault:!V,...G.trim()?{label:G.trim()}:{}});m(u),E(""),B(""),H(!1),P(n("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(u){P(u instanceof Error?u.message:n("assets.settings.saveFailed","Failed to save upload settings."))}finally{f(!1)}}})()},children:Te})}),re&&s.jsx("button",{type:"button",className:a.commandButton,disabled:i||A,onClick:()=>{M("user"),E(""),B(""),H(!1)},children:n("assets.settings.cancelCreator","Cancel")})]})]})]}),F&&s.jsx("div",{className:a.messageState,children:F}),s.jsx(bs,{open:$!==null,title:q,message:ne,cancelLabel:n("common.cancel","Cancel"),confirmLabel:se,loading:A,onCancel:()=>v(null),onConfirm:()=>{N()}})]})}const go=12,fo=5e3;function ce(e,t){return e instanceof Error&&e.message.trim().length>0?e.message:t}function is(e,t){return e.some(n=>xe(n,t))?e.map(n=>xe(n,t)?t:n):[t,...e]}function xe(e,t){return e.id!==t.id||e.category!==t.category||e.scope.kind!==t.scope.kind?!1:e.scope.kind==="shared"||t.scope.kind==="place"&&e.scope.placeId===t.scope.placeId}function yo(e,t){return e.some(r=>xe(r,t))?e.map(r=>xe(r,t)?t:r):e}function Me(e,t){return ft(e.filter(r=>gt(r,t)))}function be(e,t){return e?`${e.displayName} (${e.id})`:t??"unknown asset"}function jo(e){return e.length===0?"none":e.map(t=>be(t)).join(", ")}function cs(e){const t=`status ${e.status}`;return e.roblox.assetId?`Roblox asset ${e.roblox.assetId}; ${t}`:t}function vo(e,t){const r=be(t);return e==="update"?`Updated metadata for asset: ${r}.`:e==="upload"?`Uploaded asset: ${r} -> ${cs(t)}.`:e==="thumbnail-generate"?`Generated thumbnail for asset: ${r}.`:e==="status-refresh"?`Refreshed Roblox status for asset: ${r} -> ${cs(t)}.`:e==="usage-scan"?`Scanned usage for asset: ${r} -> ${t.usage.references.length} reference(s).`:`Updated asset: ${r}.`}function Co(e){return e!=="upload"&&e!=="status-refresh"}function ds(e){return e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath)}function Ce(e){return{scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0,category:e.category}}function _o(e,t){return e==="shared"?[{scope:"shared"}]:e==="place"?t===null?[]:[{scope:"place",placeId:t}]:[...t===null?[]:[{scope:"place",placeId:t}],{scope:"shared"}]}function us(e,t,r){return _o(e,t).flatMap(n=>xt(r).map(l=>({request:{...n,category:l},label:`${n.scope}/${l}`})))}function ps(e,t){if(t.length===0)return null;const r=t.map(({label:n,reason:l})=>`${n}: ${ce(l,"request failed")}`);return`${e}: ${r.join("; ")}`}function So(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 t=e.places[0];return{placeId:(t==null?void 0:t.placeId)??null,placeName:(t==null?void 0:t.placeName)??null,studioConnected:!1}}function No(e,t){if(typeof t=="number"){const r=e.places.find(n=>n.placeId===t);if(r)return{placeId:r.placeId,placeName:r.placeName,studioConnected:r.isConnected,overrideStillValid:!0}}return{...So(e),overrideStillValid:t===null}}function Ao(){const[e,t]=c.useState([]),[r,n]=c.useState(0),[l,g]=c.useState(null),[x,m]=c.useState("place"),[p,R]=c.useState("all"),[W,U]=c.useState([]),[w,o]=c.useState(null),[S,Y]=c.useState(null),[T,M]=c.useState(null),[Q,E]=c.useState(null),[G,B]=c.useState(!1),[X,H]=c.useState(!1),[F,P]=c.useState(!0),[$,v]=c.useState(null),[A,f]=c.useState(null),[i,k]=c.useState(null),J=c.useRef(!0),h=c.useRef(new Map),D=c.useRef(new Set),I=c.useMemo(()=>e.find(d=>te(d)===l)??null,[e,l]),b=(I==null?void 0:I.id)??null;c.useEffect(()=>{l&&(e.some(d=>te(d)===l)||g(null))},[e,l]);const K=c.useCallback(d=>{const y=h.current.get(d);y!==void 0&&(clearTimeout(y),h.current.delete(d))},[]),C=c.useCallback((d,y=go)=>{const j=te(d);if(!ds(d)||y<=0){K(j);return}D.current.has(j)||(K(j),D.current.add(j),(async()=>{try{const N=await Xe(Ce(d),d.id);if(!J.current)return;if(t(q=>yo(q,N)),ds(N)&&y>1){const q=te(N),ne=setTimeout(()=>{h.current.delete(q),C(N,y-1)},fo);h.current.set(q,ne);return}K(te(N))}catch(N){if(!J.current)return;K(j),f(ce(N,"Asset Library status refresh failed."))}finally{D.current.delete(j)}})())},[K]);c.useEffect(()=>()=>{J.current=!1;for(const d of h.current.values())clearTimeout(d);h.current.clear(),D.current.clear()},[]);const z=c.useCallback(()=>x==="shared"?{scope:"shared"}:{scope:"place",placeId:T??void 0},[T,x]),V=c.useCallback(d=>({...z(),category:d}),[z]),re=c.useCallback(async()=>{try{const d=await Rs(),y=No(d,w);return U(d.places),y.overrideStillValid||o(null),Y(y.placeId),M(y.placeId),E(y.placeName),B(y.studioConnected),H(y.studioConnected),y.placeId}catch{return U([]),Y(null),M(null),E(null),B(!1),H(!1),null}},[w]),ee=c.useCallback(async()=>{f(null);try{const d=await re();if(x==="place"&&d===null){t([]),n(0),P(!1),f("No active place is connected for place-scoped assets.");return}const y=us(x,d,p),j=await Promise.allSettled(y.map(({request:se})=>ot(se))),N=j.flatMap(se=>se.status==="fulfilled"?[se.value]:[]),q=j.flatMap((se,u)=>se.status==="rejected"?[{label:y[u].label,reason:se.reason}]:[]);x==="all"&&d===null&&q.unshift({label:"place",reason:new Error("No active place is available")});const ne=Me(N.flatMap(se=>se.assets),p);t(ne),n(ne.length);for(const se of ne)C(se);f(ps("Some Asset Library requests failed",q))}catch(d){f(ce(d,"Failed to load Asset Library."))}finally{P(!1)}},[p,re,x,C]);c.useEffect(()=>{ee()},[ee]);const ae=c.useCallback(async(d,y,j)=>{const N=(I==null?void 0:I.id)===y?I:e.find(q=>q.id===y)??null;if(!N)return f("Asset context is unavailable."),null;v(d),f(null),k(null);try{const q=await j(Ce(N));return t(ne=>is(ne,q)),g(te(q)),Co(d)&&k(vo(d,q)),q}catch(q){return f(ce(q,"Asset Library action failed.")),null}finally{v(null)}},[e,I]),ie=c.useCallback(async()=>{v("rescan"),f(null),k(null);try{const d=us(x,T,p);if(x==="place"&&T===null){f("No active place is connected for place-scoped assets.");return}const y=await Promise.allSettled(d.map(({request:_})=>lt(_))),j=y.flatMap(_=>_.status==="fulfilled"?[_.value]:[]),N=y.flatMap((_,L)=>_.status==="rejected"?[{label:d[L].label,reason:_.reason}]:[]);x==="all"&&T===null&&N.unshift({label:"place",reason:new Error("No active place is available")});const q=Me(j.flatMap(_=>_.assets),p),ne=j.reduce((_,L)=>_+L.adoptedCount,0),se=j.reduce((_,L)=>_+L.skippedCount,0),u=Me(j.flatMap(_=>_.adopted),p);t(q),n(q.length),k(`Rescan complete for ${p}: ${ne} asset(s) added, ${se} skipped. Added: ${jo(u)}.`),f(ps("Some Asset Library rescans failed",N))}catch(d){f(ce(d,"Asset Library rescan failed."))}finally{v(null)}},[T,p,x]),ke=c.useCallback(async(d,y)=>{v("export-selection-rbxm"),f(null),k(null);try{const j=await ut(V(d),y);return t(N=>is(N,j.asset)),g(te(j.asset)),k(`Exported Studio selection as RBXM asset: ${be(j.asset)}${j.deduplicated?" (reused existing local asset)":""}.`),j}catch(j){return f(ce(j,"Asset Library .rbxm export failed.")),null}finally{v(null)}},[V]),we=c.useCallback((d,y)=>ae("update",d,j=>rt(j,d,y)),[ae]),ge=c.useCallback(async(d,y)=>{const j=await ae("upload",d,N=>ct(N,d,y));return j&&C(j),j},[ae,C]),fe=c.useCallback(async d=>{const y=(I==null?void 0:I.id)===d?I:e.find(N=>N.id===d)??null;if(!y)return f("Asset context is unavailable."),!1;const j=te(y);K(j),v("delete"),f(null),k(null);try{return await it(Ce(y),d),t(N=>{const q=N.filter(ne=>!xe(ne,y));return n(q.length),q}),g(N=>N===j?null:N),k(`Deleted asset: ${be(y,d)}. Local files removed; uploaded Roblox assets were not deleted.`),!0}catch(N){return f(ce(N,"Asset Library delete failed.")),!1}finally{v(null)}},[e,K,I]),ye=c.useCallback(async(d,y)=>{const j=(I==null?void 0:I.id)===d?I:e.find(N=>N.id===d)??null;if(!j)return f("Asset context is unavailable."),null;v("import-rbxm"),f(null),k(null);try{const N=await pt(Ce(j),d,y);return g(te(j)),k(`Imported RBXM asset: ${be(j,d)} -> ${N.importedCount} instance(s) to ${N.targetParent}.`),N}catch(N){return f(ce(N,"Asset Library .rbxm import failed.")),null}finally{v(null)}},[e,I]),je=c.useCallback(d=>ae("thumbnail-generate",d,y=>ht(y,d)),[ae]),Re=c.useCallback(d=>{const y=(I==null?void 0:I.id)===d?I:e.find(j=>j.id===d)??null;return y&&K(te(y)),ae("status-refresh",d,j=>Xe(j,d))},[e,K,ae,I]),$e=c.useCallback((d,y)=>ae("usage-scan",d,async j=>(await dt(j,d,y)).asset),[ae]),Le=c.useCallback(d=>{m(d),g(null)},[]),Be=c.useCallback(d=>{o(d),g(null)},[]),Ue=c.useCallback(d=>{bt(d)&&R(d)},[]),Te=c.useCallback(d=>{if(d===null){g(null);return}const j=e.find(N=>te(N)===d)??e.find(N=>N.id===d);g(j?te(j):d)},[e]);return{assets:e,totalCount:r,selectedAsset:I,selectedAssetId:b,selectedAssetKey:l,scope:x,categoryFilter:p,availablePlaces:W,selectedPlaceId:S,activePlaceId:T,activePlaceName:Q,selectedPlaceIsConnected:G,studioConnected:X,loading:F,busyAction:$,error:A,lastMessage:i,setScope:Le,setSelectedPlaceId:Be,setCategoryFilter:Ue,selectAsset:Te,refresh:ee,rescan:ie,exportSelectionRbxm:ke,updateMetadata:we,uploadAsset:ge,deleteAsset:fe,importRbxm:ye,generateThumbnail:je,refreshStatus:Re,scanUsage:$e}}const Ns="weppy-assets-view-preferences-v1",he={organizationMode:"folders",viewMode:"grid",gridSize:"medium"};function Io(e){return e==="folders"||e==="all-assets"}function Po(e){return e==="grid"||e==="list"}function ko(e){return e==="small"||e==="medium"||e==="large"}function wo(){if(typeof window>"u")return he;try{const e=window.localStorage.getItem(Ns);if(!e)return he;const t=JSON.parse(e);return{organizationMode:Io(t.organizationMode)?t.organizationMode:he.organizationMode,viewMode:Po(t.viewMode)?t.viewMode:he.viewMode,gridSize:ko(t.gridSize)?t.gridSize:he.gridSize}}catch{return he}}function Ro(){const[e,t]=c.useState(wo);return c.useEffect(()=>{try{window.localStorage.setItem(Ns,JSON.stringify(e))}catch{}},[e]),{...e,setOrganizationMode:r=>{t(n=>({...n,organizationMode:r}))},setViewMode:r=>{t(n=>({...n,viewMode:r}))},setGridSize:r=>{t(n=>({...n,gridSize:r}))}}}function $o(e,t){return t("assets.count.shown","Shown assets: {count}").replace("{count}",String(e))}function Lo(e,t){return e===null?null:t("assets.place.id","Place ID {placeId}").replace("{placeId}",String(e))}function Oo(){const{t:e}=me(),{trackEvent:t}=$s(),{tier:r,loading:n}=Ls(),l=Ao(),g=Ro(),[x,m]=c.useState(!1),[p,R]=c.useState(!1),[W,U]=c.useState(!1),w=!n&&r==="pro",o=l.selectedAsset,S=(o==null?void 0:o.file.original.toLowerCase().endsWith(".rbxm"))??!1,Y=(o==null?void 0:o.category)==="model"||(o==null?void 0:o.category)==="animation",T="game.Workspace",Q=!!(w&&l.studioConnected&&o&&S&&Y),E=l.availablePlaces??[],G=l.selectedPlaceId??l.activePlaceId,B=l.selectedAssetKey??(o?te(o):null),X=c.useCallback(()=>{l.selectAsset(null)},[l.selectAsset]),H=c.useMemo(()=>l.scope==="shared"?[e("assets.scope.shared","Shared")]:l.scope==="all"?[e("assets.scope.all","All scopes"),l.activePlaceName??e("assets.scope.place","Current Place"),e("assets.scope.shared","Shared")]:[l.activePlaceName??e("assets.scope.place","Current Place"),Lo(l.activePlaceId,e),l.selectedPlaceIsConnected?e("assets.place.connected","Connected"):null].filter(v=>!!v),[l.activePlaceId,l.activePlaceName,l.scope,l.selectedPlaceIsConnected,e]),F=c.useMemo(()=>He(l.categoryFilter,e),[l.categoryFilter,e]),P=$o(l.totalCount,e),$=e("assets.detail.importRbxm.tooltip","Insert this local RBXM asset into {target} in the connected Studio place.").replace("{target}",T);return s.jsxs("div",{className:a.page,children:[s.jsx(Ts,{title:e("assets.title","Assets"),description:e("assets.subtitle","Browse local originals, upload to Roblox, and inspect synced usage by place."),badge:s.jsx("span",{className:a.experimentalBadge,children:e("assets.experimental","Experimental")}),helpTopicId:"assets",helpState:{tier:r}}),s.jsxs("div",{className:a.toolbarShell,children:[s.jsxs("div",{className:a.toolbar,children:[s.jsxs("div",{className:a.segmented,role:"group","aria-label":e("assets.scope.label","Asset scope"),children:[s.jsx("button",{type:"button","aria-pressed":l.scope==="all",className:l.scope==="all"?a.segmentedActive:"",onClick:()=>l.setScope("all"),children:e("assets.scope.all","All scopes")}),s.jsx("button",{type:"button","aria-pressed":l.scope==="place",className:l.scope==="place"?a.segmentedActive:"",onClick:()=>l.setScope("place"),children:e("assets.scope.place","Current Place")}),s.jsx("button",{type:"button","aria-pressed":l.scope==="shared",className:l.scope==="shared"?a.segmentedActive:"",onClick:()=>l.setScope("shared"),children:e("assets.scope.shared","Shared")})]}),s.jsx("div",{className:a.placeContextSlot,role:"group","aria-label":e("assets.place.context","Asset place context"),children:l.scope==="shared"?s.jsx("span",{className:a.sharedPlaceContext,children:e("assets.place.sharedLibrary","Shared library")}):E.length>0?s.jsxs("label",{className:a.placeSelectorLabel,children:[s.jsx("span",{children:e("assets.place.selector","Asset place")}),s.jsx("select",{className:a.placeSelect,value:typeof G=="number"?String(G):"",onChange:v=>{const A=Number.parseInt(v.currentTarget.value,10);Number.isInteger(A)&&l.setSelectedPlaceId(A)},children:E.map(v=>s.jsxs("option",{value:v.placeId,children:[v.placeName," (",v.placeId,")"]},v.placeId))})]}):s.jsx("span",{className:a.sharedPlaceContext,children:l.activePlaceName??e("assets.scope.place","Current Place")})}),s.jsxs("div",{className:a.listContextSummary,children:[H.map((v,A)=>s.jsxs("span",{children:[A>0?s.jsx("span",{className:a.contextDivider,children:" · "}):null,v]},`${v}-${A}`)),s.jsx("span",{className:a.contextDivider,children:" · "}),s.jsx("span",{children:F}),s.jsx("span",{className:a.contextDivider,children:" · "}),s.jsx("strong",{children:P})]}),s.jsxs("div",{className:a.toolbarActions,children:[s.jsx(Z,{text:e("assets.rescan.tooltip","Scan inbox folders for the current filter."),children:s.jsxs("button",{type:"button",className:a.commandButton,disabled:l.busyAction==="rescan",onClick:()=>{t("dashboard_click_event",{click_target:"assets_rescan",page:"assets"}),l.rescan()},children:[s.jsx(hs,{size:15}),e("assets.rescan","Rescan")]})}),s.jsx(Z,{text:p?"":e("assets.settings.open.tooltip","Open Roblox upload settings."),children:s.jsx("button",{type:"button",className:[a.iconButton,p?a.iconButtonActive:""].filter(Boolean).join(" "),onClick:()=>{t("dashboard_click_event",{click_target:"assets_open_settings",page:"assets"}),R(v=>!v)},"aria-label":e("assets.settings.open","Open settings"),"aria-controls":"asset-library-settings-panel","aria-expanded":p,children:s.jsx(ms,{size:16})})})]}),s.jsxs("div",{className:a.categoryControl,children:[s.jsx("span",{id:"assets-category-filter-label",className:a.categoryControlLabel,children:e("assets.category.filter","Category")}),s.jsx("div",{className:a.categoryRail,role:"radiogroup","aria-labelledby":"assets-category-filter-label",children:ys.map(v=>{const A=l.categoryFilter===v,f=He(v,e);return s.jsx("button",{type:"button",role:"radio","aria-checked":A,className:[a.categoryButton,A?a.categoryButtonActive:""].filter(Boolean).join(" "),onClick:()=>{l.setCategoryFilter(v)},children:f},v)})})]})]}),s.jsx(xo,{open:p,tier:r,onClose:()=>R(!1)})]}),l.error&&s.jsxs("div",{className:a.errorState,children:[l.scope==="all"?s.jsx("strong",{children:e("assets.partial.title","Some locations could not be loaded")}):null,s.jsx("span",{children:l.error})]}),l.lastMessage&&s.jsx("div",{className:a.messageState,children:l.lastMessage}),l.categoryFilter==="rbxm"&&s.jsxs("section",{className:a.rbxmGuide,"aria-label":e("assets.rbxmGuide.title","Save RBXM from Studio"),children:[s.jsx("h2",{children:e("assets.rbxmGuide.title","Save RBXM from Studio")}),s.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.")}),s.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.")})]}),!w&&!n&&s.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?s.jsx("div",{className:a.emptyState,children:e("assets.loading.scope","Loading {scope} assets...").replace("{scope}",l.scope==="all"?e("assets.scope.all","All scopes"):l.scope==="shared"?e("assets.scope.shared","Shared"):e("assets.scope.place","Current Place"))}):s.jsx(Bn,{displayScope:l.scope,assets:l.assets,place:{placeId:l.activePlaceId,placeName:l.activePlaceName},categoryFilter:l.categoryFilter,organizationMode:g.organizationMode,viewMode:g.viewMode,gridSize:g.gridSize,selectedAssetKey:B,onSelectAsset:l.selectAsset,onClearSelection:X,onOrganizationModeChange:g.setOrganizationMode,onViewModeChange:g.setViewMode,onGridSizeChange:g.setGridSize}),s.jsx(Yn,{asset:x||p||W?null:o,busyAction:l.busyAction,canUpload:w,canImportRbxm:Q,importRbxmTooltip:$,importRbxmTargetParent:T,onClose:()=>l.selectAsset(null),onSave:async(v,A)=>{o&&await l.updateMetadata(o.id,{displayName:v,description:A})},onUpload:()=>m(!0),onDelete:()=>U(!0),onImportRbxm:async()=>{o&&(t("dashboard_click_event",{click_target:"assets_import_rbxm",page:"assets"}),await l.importRbxm(o.id,{targetParent:T}))},onRefreshStatus:async()=>{o&&await l.refreshStatus(o.id)},onScanUsage:async()=>{o&&(t("dashboard_click_event",{click_target:"assets_usage_scan",page:"assets"}),await l.scanUsage(o.id,l.activePlaceId??void 0))}}),s.jsx(bs,{open:W&&!!o,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:()=>U(!1),onConfirm:()=>{o&&(t("dashboard_click_event",{click_target:"assets_delete",page:"assets"}),l.deleteAsset(o.id).then(v=>{v&&U(!1)}))}}),s.jsx(uo,{asset:o,open:x,canUpload:w,busyAction:l.busyAction,onClose:()=>{m(!1),l.selectAsset(null)},onBack:()=>m(!1),onOpenSettings:()=>{m(!1),R(!0)},onUpload:async v=>{if(!o)return;t("dashboard_click_event",{click_target:"assets_upload_submit",page:"assets"}),await l.uploadAsset(o.id,v)&&m(!1)}})]})}export{Oo as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._examples_1f2hy_1{display:flex;flex-direction:column;gap:var(--space-section)}._example_1f2hy_1{display:flex;flex-direction:column;gap:var(--space-related);min-width:0}._example_1f2hy_1 h4{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600;line-height:var(--leading-title)}._request_1f2hy_23{margin:0;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-size:var(--type-body-size);line-height:var(--leading-body);white-space:pre-wrap;-webkit-user-select:text;user-select:text}._actionRow_1f2hy_36{display:flex;align-items:center;gap:var(--space-related);min-height:34px}._copyButton_1f2hy_43{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:var(--type-control-size);font-weight:600;cursor:pointer}._copyButton_1f2hy_43:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._copyButton_1f2hy_43:focus-visible{outline:none;box-shadow:var(--focus-ring)}._copyButton_1f2hy_43:disabled{cursor:wait;opacity:.65}._success_1f2hy_75,._error_1f2hy_76{margin:0;font-size:var(--type-control-size);line-height:var(--leading-body)}._success_1f2hy_75{color:var(--success-text)}._error_1f2hy_76{color:var(--error-text)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as h,r as p,j as t}from"./index-DchewB5y.js";import{C as f}from"./copy-CePVq0VI.js";const j=["character","automated-check","selection","game-state"];function q(a){return j.map(c=>({id:c,title:a(`playtest.ai.examples.${c}.title`),request:a(`playtest.ai.examples.${c}.request`)}))}const g="_examples_1f2hy_1",w="_example_1f2hy_1",C="_request_1f2hy_23",P="_actionRow_1f2hy_36",R="_copyButton_1f2hy_43",b="_success_1f2hy_75",N="_error_1f2hy_76",o={examples:g,example:w,request:C,actionRow:P,copyButton:R,success:b,error:N};function E(a){const{locale:c,t:r}=h(),[m,i]=p.useState({}),l=p.useRef(0),u=a.exampleIds.join("|"),x=p.useMemo(()=>{const e=new Set(a.exampleIds);return q(r).filter(s=>e.has(s.id))},[u,r]);p.useEffect(()=>{l.current+=1,i({})},[c,u]);const _=async(e,s)=>{var d;const y=++l.current;i(n=>({...n,[e]:"copying"}));try{if(!((d=navigator.clipboard)!=null&&d.writeText))throw new Error("clipboard_unavailable");if(await navigator.clipboard.writeText(s),y!==l.current)return;i(n=>({...n,[e]:"copied"}))}catch{if(y!==l.current)return;i(n=>({...n,[e]:"error"}))}};return t.jsx("div",{className:o.examples,children:x.map(e=>{const s=m[e.id]??"idle";return t.jsxs("section",{className:o.example,children:[t.jsx("h4",{children:e.title}),t.jsx("p",{className:o.request,children:e.request}),t.jsxs("div",{className:o.actionRow,children:[t.jsxs("button",{type:"button",className:o.copyButton,disabled:s==="copying",onClick:()=>void _(e.id,e.request),children:[t.jsx(f,{size:14,"aria-hidden":"true"}),s==="copying"?r("playtest.ai.copying","Copying…"):r("playtest.ai.copy","Copy request")]}),s==="copied"&&t.jsx("span",{className:o.success,role:"status",children:r("playtest.ai.copied","Copied")})]}),s==="error"&&t.jsx("p",{className:o.error,role:"alert",children:r("playtest.ai.copyFailed","Could not copy. Select the request text and copy it manually.")})]},e.id)})})}export{E as P};
|