@weppy/roblox-mcp 2.17.10 → 2.17.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +2 -0
  3. package/dashboard/dist/assets/{AiPromptExamples-BSFrFYar.js → AiPromptExamples-B3Uy68MJ.js} +1 -1
  4. package/dashboard/dist/assets/{AssetsPage-Bt9gZnJ_.js → AssetsPage-DGSoVLnO.js} +1 -1
  5. package/dashboard/dist/assets/{ChangelogPage-C4tBBoXT.js → ChangelogPage-B9dCtQOo.js} +1 -1
  6. package/dashboard/dist/assets/{ConfirmModal-BbqpSaVw.js → ConfirmModal-B6ovGUld.js} +1 -1
  7. package/dashboard/dist/assets/{ConnectionPage-Sy7xUWtJ.js → ConnectionPage-B3NzHXCM.js} +1 -1
  8. package/dashboard/dist/assets/{ControlsPage-ECpr55X_.js → ControlsPage-dQj67_QM.js} +1 -1
  9. package/dashboard/dist/assets/{GameChangeDetail-DJ0xywJq.js → GameChangeDetail-BfltcON0.js} +1 -1
  10. package/dashboard/dist/assets/{InfoLabel-DAd1I756.js → InfoLabel-CUAC4KaS.js} +1 -1
  11. package/dashboard/dist/assets/{OverviewPage-C2xJb1Wf.js → OverviewPage-DAHV_J9P.js} +1 -1
  12. package/dashboard/dist/assets/{PageHeader-_z4Dtkbg.js → PageHeader-BbXDD7J9.js} +1 -1
  13. package/dashboard/dist/assets/{PlaceSelectOptions-Dd_m61bQ.js → PlaceSelectOptions-CoWR0lUt.js} +1 -1
  14. package/dashboard/dist/assets/{PlaytestAiPromptExamples-CNe0qWb1.js → PlaytestAiPromptExamples-CNzT1Zzl.js} +1 -1
  15. package/dashboard/dist/assets/{PlaytestPage-DZa14JH0.js → PlaytestPage-DoyKVZGe.js} +1 -1
  16. package/dashboard/dist/assets/{SettingsPage-BiDPnuz8.js → SettingsPage-DmuhCaCs.js} +1 -1
  17. package/dashboard/dist/assets/SyncPage-BeZ52U2s.css +1 -0
  18. package/dashboard/dist/assets/SyncPage-DTwGdjCc.js +1 -0
  19. package/dashboard/dist/assets/{Tabs-BoD1I6c5.js → Tabs-CI7QBRFn.js} +1 -1
  20. package/dashboard/dist/assets/{TierPromoPanel-CQQdO5mK.js → TierPromoPanel-BcWyr5ni.js} +1 -1
  21. package/dashboard/dist/assets/{ToolsPage-D7ovZ3QM.js → ToolsPage-BYlAjTDF.js} +1 -1
  22. package/dashboard/dist/assets/{TooltipText-NA7u0bu6.js → TooltipText-C8S8B8k6.js} +1 -1
  23. package/dashboard/dist/assets/UiStudioPage-DmWjv22S.css +1 -0
  24. package/dashboard/dist/assets/UiStudioPage-Sg9Sc7dA.js +11 -0
  25. package/dashboard/dist/assets/{WhatsNewPage-D3cvOOAD.js → WhatsNewPage-Xu9jN9ei.js} +1 -1
  26. package/dashboard/dist/assets/{bot-D89pfHg8.js → bot-GYHFrFjr.js} +1 -1
  27. package/dashboard/dist/assets/{check-GVlTbKVy.js → check-CK84xvEL.js} +1 -1
  28. package/dashboard/dist/assets/{copy-DVGVC27v.js → copy-Dagqdoq_.js} +1 -1
  29. package/dashboard/dist/assets/{index-uP4eoQi-.js → index-Dryjq9a5.js} +32 -32
  30. package/dashboard/dist/assets/{rotate-ccw-Dxk8CuFi.js → rotate-ccw-BhctsB9r.js} +1 -1
  31. package/dashboard/dist/assets/{sample-requests-CQy_WSFJ.js → sample-requests-B6Kd_Wul.js} +1 -1
  32. package/dashboard/dist/assets/{trash-2-CEfHj47n.js → trash-2-BkWSghui.js} +1 -1
  33. package/dashboard/dist/assets/{useLiveUptime-BGDr-4gk.js → useLiveUptime-C0rFrLl1.js} +1 -1
  34. package/dashboard/dist/assets/{useSettings-kOu_k9zT.js → useSettings-CyIbYDSy.js} +1 -1
  35. package/dashboard/dist/index.html +1 -1
  36. package/dist/index.js +379 -319
  37. package/package.json +1 -1
  38. package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  39. package/dashboard/dist/assets/SyncPage-BIm9tW0s.css +0 -1
  40. package/dashboard/dist/assets/SyncPage-EcDvwdB8.js +0 -1
  41. package/dashboard/dist/assets/UiStudioPage-CtSFtEbS.css +0 -1
  42. package/dashboard/dist/assets/UiStudioPage-wYZQClUu.js +0 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weppy/roblox-mcp",
3
- "version": "2.17.10",
3
+ "version": "2.17.12",
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_gotyl_2{display:flex;flex-direction:column;gap:var(--space-page);max-width:900px}._detailsStack_gotyl_9{display:flex;flex-direction:column;gap:var(--space-page)}._refreshButton_gotyl_15{min-height:32px;padding:4px 10px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-primary);font:inherit;font-size:12px;cursor:pointer}._refreshButton_gotyl_15:hover{border-color:var(--border-highlight)}._refreshButton_gotyl_15:focus-visible,._targetRow_gotyl_29:focus-visible,._storedRow_gotyl_30:focus-visible,._storedDisclosure_gotyl_31:focus-visible{outline:none;box-shadow:var(--focus-ring)}._targetList_gotyl_33,._storedList_gotyl_33{display:flex;flex-direction:column;gap:4px}._targetRow_gotyl_29{display:grid;width:100%;min-height:56px;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) 132px;align-items:center;gap:12px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);text-align:left;cursor:pointer}._targetRow_gotyl_29:hover,._storedRow_gotyl_30:hover:not(:disabled){border-color:var(--border-highlight)}._targetRowSelected_gotyl_53{border-color:var(--accent)!important;background:var(--accent-dim)}._targetIdentity_gotyl_54,._targetStudio_gotyl_54,._targetState_gotyl_54{display:flex;min-width:0;flex-direction:column;gap:3px}._targetIdentity_gotyl_54>[data-tooltip-text],._targetStudio_gotyl_54>[data-tooltip-text]{min-width:0;max-width:100%}._targetIdentity_gotyl_54 strong{display:block;min-width:0;max-width:100%;overflow:hidden;font-size:14px;text-overflow:ellipsis;white-space:nowrap}._targetIdentity_gotyl_54 span,._targetStudio_gotyl_54 span,._stateNote_gotyl_57{color:var(--text-secondary);font-size:11px}._targetStudio_gotyl_54>[data-tooltip-text]>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._targetState_gotyl_54{align-items:flex-end;text-align:right}._storedDisclosure_gotyl_31{display:flex;width:100%;align-items:center;justify-content:space-between;border:0;background:none;color:var(--text-primary);font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600;cursor:pointer}._storedList_gotyl_33{margin-top:12px}._storedRow_gotyl_30{display:flex;min-height:42px;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-primary);font:inherit;font-size:12px;text-align:left;cursor:pointer}._storedRow_gotyl_30:disabled{color:var(--text-muted);cursor:default}._selectedScope_gotyl_94{display:flex;min-width:0;align-items:center;flex-wrap:wrap;gap:8px;padding:9px 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-size:12px}._selectedScope_gotyl_94 strong{min-width:0;color:var(--text-primary);overflow-wrap:anywhere}._selectedScope_gotyl_94 span:last-child{margin-left:auto}._sharedNote_gotyl_109,._emptyMessage_gotyl_109{margin:8px 0 0;color:var(--text-secondary);font-size:12px;line-height:1.45}._errorMessage_gotyl_110{margin:8px 0;color:var(--error-text);font-size:12px;line-height:1.45;overflow-wrap:anywhere}._card_gotyl_113{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:var(--card-padding-block) var(--card-padding-inline)}._cardHeader_gotyl_120{font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600;color:var(--text-primary);margin-bottom:var(--space-section);display:flex;align-items:center;justify-content:space-between;gap:var(--space-related)}._clearButton_gotyl_132{border:1px solid var(--danger-border);background:var(--danger-bg);color:var(--danger-text);border-radius:var(--radius-control);padding:6px 12px;font-family:var(--font-label);font-size:12px;font-weight:600;cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._clearButton_gotyl_132:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._clearButton_gotyl_132:disabled{opacity:.55;cursor:not-allowed}._clearButton_gotyl_132:focus-visible{outline:none;box-shadow:var(--focus-ring)}._statusRow_gotyl_158{display:flex;align-items:center;gap:12px;margin-bottom:8px}._metaItem_gotyl_165{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._statusGrid_gotyl_171{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:12px}._statusGrid_gotyl_171 dt{color:var(--text-secondary);font-family:var(--font-label)}._statusGrid_gotyl_171 dd{margin:0;font-family:var(--font-code);color:var(--text-primary);min-width:0;overflow-wrap:anywhere}._migrationPanel_gotyl_192{display:flex;flex-direction:column;gap:16px;font-size:16px}._migrationHeader_gotyl_199{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}._migrationTitle_gotyl_206{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:20px;line-height:1.25;font-weight:600}._migrationDescription_gotyl_215{max-width:640px;margin:8px 0 0;color:var(--text-secondary);font-size:16px;line-height:1.5}._migrationLedger_gotyl_223{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--border);background:var(--bg-secondary)}._migrationLedgerItem_gotyl_230{display:flex;min-width:0;min-height:64px;flex-direction:column;justify-content:center;gap:4px;padding:8px 12px;border-right:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-label);font-size:14px}._migrationLedgerItem_gotyl_230:last-child{border-right:0}._migrationLedgerItem_gotyl_230 strong{color:var(--text-primary);font-family:var(--font-code);font-size:20px;font-variant-numeric:tabular-nums}._migrationLedgerBlocked_gotyl_255 strong{color:var(--warning-text)}._migrationSection_gotyl_259{display:flex;flex-direction:column;gap:8px}._migrationSection_gotyl_259 h3{margin:0;color:var(--text-secondary);font-family:var(--font-label);font-size:14px;font-weight:600}._migrationList_gotyl_273{display:flex;flex-direction:column;gap:0;margin:0;padding:0;border:1px solid var(--border);list-style:none}._migrationRow_gotyl_283{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:start;gap:12px;padding:12px;border-bottom:1px solid var(--border)}._migrationRow_gotyl_283:last-child{border-bottom:0}._migrationOperation_gotyl_296{min-width:76px;text-transform:uppercase}._migrationRowBody_gotyl_301{display:flex;min-width:0;flex-direction:column;gap:4px}._migrationRowBody_gotyl_301 code{overflow-wrap:anywhere;color:var(--text-primary);font-family:var(--font-code);font-size:14px;line-height:1.4}._migrationRowBody_gotyl_301 span{color:var(--text-secondary);font-size:14px;line-height:1.4}._migrationNotice_gotyl_322{min-height:24px;color:var(--warning-text);font-size:16px;line-height:1.5}._migrationActions_gotyl_329{display:flex;justify-content:flex-end;gap:8px}._migrationButton_gotyl_335{min-height:44px;padding:0 16px;font-size:16px}@media(max-width:640px){._migrationHeader_gotyl_199{flex-direction:column}._migrationLedger_gotyl_223{grid-template-columns:repeat(2,minmax(0,1fr))}._migrationLedgerItem_gotyl_230:nth-child(2){border-right:0}._migrationLedgerItem_gotyl_230:nth-child(-n+2){border-bottom:1px solid var(--border)}._migrationRow_gotyl_283{grid-template-columns:1fr}._migrationActions_gotyl_329{flex-direction:column-reverse}._migrationButton_gotyl_335{width:100%}}._policySummary_gotyl_372{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--border)}._policySummaryItem_gotyl_383{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.2fr);align-items:center;min-height:48px;gap:12px;padding:10px 12px;background:var(--bg-secondary)}._policySummaryItem_gotyl_383 dt{color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._policySummaryItem_gotyl_383 dd{min-width:0;margin:0;color:var(--text-primary);font-family:var(--font-code);font-size:13px;overflow-wrap:anywhere}._policyPrimaryValue_gotyl_408{font-family:var(--font-label)!important;font-size:16px!important;font-weight:600}._policyReviewNotice_gotyl_414{margin-top:12px;padding:10px 12px;border:1px solid var(--warning-border);border-radius:var(--radius-control);background:var(--warning-bg);color:var(--warning-text);font-size:14px;line-height:1.45}._policyApplySection_gotyl_425{margin-top:12px}._policyApplyHeader_gotyl_429{margin-bottom:10px}._policyApplyTitle_gotyl_433{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;font-weight:600}._policyApplyDescription_gotyl_441{margin:4px 0 0;color:var(--text-secondary);font-family:var(--font-label);font-size:13px;line-height:1.45}._policyInfoLabel_gotyl_449{border-bottom:1px dotted var(--text-muted);cursor:help}._policyInfoLabel_gotyl_449:focus-visible{outline:none;border-radius:2px;box-shadow:var(--focus-ring)}._policySafetyRow_gotyl_460{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:48px;margin-top:8px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-control)}._policySafetyLabel_gotyl_472{color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._policySafetyBadge_gotyl_478{min-height:22px}._policyDisclosure_gotyl_482{display:flex;width:100%;min-height:42px;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:0 12px;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:13px;font-weight:600;text-align:left;cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._policyDisclosure_gotyl_482:hover{border-color:var(--border-highlight);background:var(--bg-secondary);color:var(--accent)}._policyDisclosure_gotyl_482:focus-visible{outline:none;box-shadow:var(--focus-ring)}._policyDisclosureIcon_gotyl_514{flex:0 0 auto;color:var(--text-muted);font-family:var(--font-code);transition:transform var(--transition)}._policyDisclosureIconOpen_gotyl_521{transform:rotate(180deg)}._policyScopeList_gotyl_525{margin-top:8px;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control)}._policyScopeRow_gotyl_532{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(0,1.1fr);align-items:center;min-height:44px;gap:16px;padding:8px 12px;border-bottom:1px solid var(--border)}._policyScopeRow_gotyl_532:last-child{border-bottom:0}._policyScopeName_gotyl_546{min-width:0;color:var(--text-secondary);font-family:var(--font-label);font-size:13px;overflow-wrap:anywhere}._policyScopeRow_gotyl_532>[data-tooltip-text]{width:100%}._policyDirectionRail_gotyl_558{display:grid;width:100%;min-width:0;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);align-items:center;color:var(--text-secondary);font-family:var(--font-code)}._policyDirectionRail_gotyl_558:focus-visible{outline:none;border-radius:2px;box-shadow:var(--focus-ring)}._policyDirectionEndpoint_gotyl_574{min-width:0;font-size:11px;font-weight:500;overflow-wrap:anywhere}._policyDirectionEndpointStudio_gotyl_581{text-align:right}._policyDirectionArrow_gotyl_585{color:var(--accent);font-size:15px;font-weight:600;text-align:center}@media(max-width:640px){._policySummary_gotyl_372{grid-template-columns:1fr}._policySummaryItem_gotyl_383{grid-template-columns:minmax(112px,.8fr) minmax(0,1.2fr)}._policyScopeRow_gotyl_532{grid-template-columns:1fr;gap:6px}._policySafetyRow_gotyl_460{grid-template-columns:1fr;align-items:start;gap:8px;padding:10px 12px}._policySafetyRow_gotyl_460>[data-tooltip-text]{max-width:100%;justify-self:start}._policySafetyBadge_gotyl_478{height:auto;min-height:22px;white-space:normal;line-height:1.25;text-align:left}}._forwardBadge_gotyl_628{display:inline-flex;align-items:center;min-height:20px;padding:2px 8px;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-control)}._logContainer_gotyl_643{max-height:240px;overflow-y:auto;font-family:var(--font-code);font-size:11px}._logEntry_gotyl_650{display:flex;gap:10px;padding:3px 0;border-bottom:1px solid var(--border);color:var(--text-primary)}._logEntry_gotyl_650:last-child{border-bottom:none}._logTime_gotyl_662{color:var(--text-muted);flex-shrink:0;width:44px}._logType_gotyl_668{font-weight:500;flex-shrink:0;width:90px;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._logTypeWrite_gotyl_677{color:var(--success)}._logTypeUpdate_gotyl_681{color:var(--accent)}._logTypeDelete_gotyl_685{color:var(--error)}._logTypeIdle_gotyl_689{color:var(--text-muted)}._logPath_gotyl_693{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logEmpty_gotyl_700{color:var(--text-muted);font-style:italic;padding:8px 0}._overlay_gotyl_707{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;gap:16px}._overlayTitle_gotyl_717{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary)}._overlayMessage_gotyl_724{font-size:13px;color:var(--text-secondary);max-width:400px}._checklist_gotyl_730{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;text-align:left}._checkItem_gotyl_740{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);padding-left:20px;position:relative}._checkItem_gotyl_740:before{content:"○";position:absolute;left:0;color:var(--text-muted)}._upgradePanel_gotyl_756{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._upgradePanelHeader_gotyl_763{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--accent);margin-bottom:8px}._benefitList_gotyl_771{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}._benefitItem_gotyl_780{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_gotyl_780:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_gotyl_795{display:flex;gap:8px}._btn_gotyl_800{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_gotyl_800:hover{border-color:var(--accent);background:var(--accent-dim)}._btnPrimary_gotyl_817{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_gotyl_817:hover{opacity:.9}._disabled_gotyl_828{opacity:.4;pointer-events:none}
@@ -1 +0,0 @@
1
- import{r,b as W,h as Z,D as re,u as oe,j as e,a as de,d as pe,e as ye,k as ue,T as ge}from"./index-uP4eoQi-.js";import{B as E,a as ee,P as me}from"./PageHeader-_z4Dtkbg.js";import{I as Y}from"./InfoLabel-DAd1I756.js";import{T as k}from"./TooltipText-NA7u0bu6.js";import{C as ae}from"./ConfirmModal-BbqpSaVw.js";import{T as he}from"./TierPromoPanel-CQQdO5mK.js";import"./ConfirmModal.module-DJksQHBd.js";const fe=5e3,T={report:null,loading:!1,applying:!1,error:null};function _e(t,i){if(i===null)return null;const g=t.filter(c=>c.placeId===i);return g.length===1?g[0]:i===0?null:g.find(c=>c.folderStatus==="canonical")??null}function ie(t,i){if(i===null||!Number.isSafeInteger(i)||i<0)return!1;const g=t.filter(c=>c.placeId===i);return i===0?g.length===1:g.length===0||g.some(c=>c.folderStatus==="canonical")}function z(t,i){return i.placeId<=0||!Number.isSafeInteger(i.placeId)?!1:ie(t,i.placeId)&&(i.folderStatus==="canonical"||t.filter(g=>g.placeId===i.placeId).length===1)}function Se(){const[t,i]=r.useState([]),[g,c]=r.useState(null),[l,n]=r.useState(null),[f,j]=r.useState(!0),[L,A]=r.useState(null),[h,C]=r.useState([]),[J,B]=r.useState(!1),[Q,H]=r.useState(null),[u,m]=r.useState(T),p=r.useRef(0),v=r.useRef(0),I=r.useRef(null),O=r.useRef(!1),x=r.useRef(null),b=r.useRef(new Set),R=r.useCallback(async()=>{const o=++p.current;try{const[y,d]=await Promise.all([W.get("/api/dashboard/sync/targets"),W.get("/api/dashboard/place-summary")]);if(o!==p.current)return;i(y.targets??[]),c(d),A(null)}catch(y){if(o!==p.current)return;i([]),c(null),A(y instanceof Error?y.message:String(y))}finally{o===p.current&&j(!1)}},[]),D=r.useMemo(()=>(g==null?void 0:g.places)??[],[g]),F=r.useMemo(()=>new Set(t.map(o=>o.placeId).filter(o=>typeof o=="number")),[t]),U=r.useMemo(()=>D.filter(o=>o.placeId===0||!F.has(o.placeId)),[F,D]);r.useEffect(()=>{f||L||n(o=>{if((o==null?void 0:o.kind)==="target"&&t.some(d=>d.clientId===o.clientId)||(o==null?void 0:o.kind)==="stored"&&U.some(d=>d.placeId===o.placeId&&d.placeDirName===o.placeDirName&&z(D,d)))return o;if(t[0])return{kind:"target",clientId:t[0].clientId};const y=U.find(d=>z(D,d));return y?{kind:"stored",placeId:y.placeId,placeDirName:y.placeDirName}:null})},[f,D,L,U,t]);const M=(l==null?void 0:l.kind)==="target"?t.find(o=>o.clientId===l.clientId)??null:null,_=(M==null?void 0:M.placeId)??((l==null?void 0:l.kind)==="stored"?l.placeId:null),V=(l==null?void 0:l.kind)==="stored"?U.find(o=>o.placeId===l.placeId&&o.placeDirName===l.placeDirName)??null:_e(D,_),w=(l==null?void 0:l.kind)==="stored"?V!==null&&z(D,V):ie(D,_),q=(l==null?void 0:l.kind)==="target"?`target:${l.clientId}:${_??"none"}`:(l==null?void 0:l.kind)==="stored"?`stored:${l.placeDirName}`:null;I.current=_,O.current=w,x.current=q;const P=r.useCallback(async(o,y,d=!1)=>{if(o===null){m(T);return}if(!(d&&x.current!==null&&b.current.has(x.current))){d||m({...T,loading:!0});try{const S=await W.get("/api/sync/migration",{placeId:String(o)});if(y!==v.current||x.current!==null&&b.current.has(x.current))return;m({...T,report:S,applying:x.current!==null&&b.current.has(x.current),error:S.status==="blocked"?"migration_blocked":null})}catch(S){if(y!==v.current||x.current!==null&&b.current.has(x.current))return;S instanceof Z&&(S.status===404||S.status===503)?m(T):m({...T,error:"unknown"})}}},[]),a=r.useCallback(async(o,y,d=!1)=>{const S=++v.current;if(d||(C([]),H(null),m(T)),o===null||!y){B(!1);return}d||B(!0);const X=W.get("/api/dashboard/sync/history",{placeId:String(o),limit:"30"}).then(G=>{S===v.current&&(C(G.entries??[]),H(null))}).catch(G=>{S===v.current&&H(G instanceof Error?G.message:String(G))}).finally(()=>{S===v.current&&B(!1)});await Promise.all([X,P(o,S,d)])},[P]);r.useEffect(()=>(a(_,w),()=>{v.current+=1}),[a,_,w,(l==null?void 0:l.kind)==="target"?l.clientId:l==null?void 0:l.placeDirName]);const N=r.useCallback(()=>{R(),a(_,w)},[a,R,_,w]),$=r.useCallback(async()=>{w&&await P(_,v.current)},[P,_,w]),K=r.useCallback(async()=>{const o=u.report;if(!o||o.status!=="ready"||u.applying||!w||o.placeId!==_)return;const y=x.current;if(!(y===null||b.current.has(y))){b.current.add(y),m(d=>({...d,applying:!0,error:null}));try{const d=await W.post("/api/sync/migration",{placeId:o.placeId,fromVersion:2,previewFingerprint:o.previewFingerprint,apply:!0});if(b.current.delete(y),x.current!==y||I.current!==o.placeId)return;m({...T,report:d}),R()}catch(d){if(b.current.delete(y),x.current!==y||I.current!==o.placeId)return;if(d instanceof Z&&d.status===409&&(d.error==="preview_stale"||d.error==="migration_blocked")){if(await P(o.placeId,v.current),x.current!==y||I.current!==o.placeId)return;m(S=>({...S,applying:!1,error:d.error}))}else m(S=>({...S,applying:!1,error:"unknown"}))}}},[P,R,u,_,w]),ce=r.useCallback(async o=>{if((await W.post(`/api/dashboard/sync/history/clear?placeId=${encodeURIComponent(String(o))}`)).placeId!==o)throw new Error("Cleared Place differs from the confirmed Place.");I.current===o&&O.current&&a(o,!0)},[a]);r.useEffect(()=>{R();const o=()=>{R(),I.current!==null&&O.current&&a(I.current,!0,!0)},y=setInterval(o,fe),d=new re;d.connect();const S=d.on("sync",o),X=d.on("connection",o);return()=>{clearInterval(y),S(),X(),d.disconnect(),p.current+=1}},[a,R]);const le=u.report&&u.report.placeId!==_?T:{...u,applying:u.applying||q!==null&&b.current.has(q)};return{targets:t,places:D,selection:l,selectedTarget:M,selectedPlace:V,selectedPlaceId:_,storageSafe:w,history:h,historyLoading:J,historyError:Q,loading:f,snapshotError:L,migration:le,selectTarget:o=>n({kind:"target",clientId:o}),selectStored:o=>n({kind:"stored",placeId:o.placeId,placeDirName:o.placeDirName}),refresh:N,refreshMigration:$,applyMigration:K,clearHistory:ce}}const xe="_page_gotyl_2",je="_detailsStack_gotyl_9",we="_refreshButton_gotyl_15",Ne="_targetRow_gotyl_29",ve="_storedRow_gotyl_30",Ie="_storedDisclosure_gotyl_31",be="_targetList_gotyl_33",Re="_storedList_gotyl_33",De="_targetRowSelected_gotyl_53",ke="_targetIdentity_gotyl_54",Le="_targetStudio_gotyl_54",Pe="_targetState_gotyl_54",Te="_stateNote_gotyl_57",Ce="_selectedScope_gotyl_94",Ee="_sharedNote_gotyl_109",Ae="_emptyMessage_gotyl_109",Be="_errorMessage_gotyl_110",Me="_card_gotyl_113",$e="_cardHeader_gotyl_120",He="_clearButton_gotyl_132",Oe="_statusRow_gotyl_158",Fe="_metaItem_gotyl_165",Ue="_statusGrid_gotyl_171",Ve="_migrationPanel_gotyl_192",qe="_migrationHeader_gotyl_199",We="_migrationTitle_gotyl_206",Ge="_migrationDescription_gotyl_215",Ke="_migrationLedger_gotyl_223",Ye="_migrationLedgerItem_gotyl_230",ze="_migrationLedgerBlocked_gotyl_255",Je="_migrationSection_gotyl_259",Qe="_migrationList_gotyl_273",Xe="_migrationRow_gotyl_283",Ze="_migrationOperation_gotyl_296",et="_migrationRowBody_gotyl_301",tt="_migrationNotice_gotyl_322",st="_migrationActions_gotyl_329",nt="_migrationButton_gotyl_335",ot="_policySummary_gotyl_372",at="_policySummaryItem_gotyl_383",it="_policyPrimaryValue_gotyl_408",ct="_policyReviewNotice_gotyl_414",lt="_policyApplySection_gotyl_425",rt="_policyApplyHeader_gotyl_429",dt="_policyApplyTitle_gotyl_433",pt="_policyApplyDescription_gotyl_441",yt="_policyInfoLabel_gotyl_449",ut="_policySafetyRow_gotyl_460",gt="_policySafetyLabel_gotyl_472",mt="_policySafetyBadge_gotyl_478",ht="_policyDisclosure_gotyl_482",ft="_policyDisclosureIcon_gotyl_514",_t="_policyDisclosureIconOpen_gotyl_521",St="_policyScopeList_gotyl_525",xt="_policyScopeRow_gotyl_532",jt="_policyScopeName_gotyl_546",wt="_policyDirectionRail_gotyl_558",Nt="_policyDirectionEndpoint_gotyl_574",vt="_policyDirectionEndpointStudio_gotyl_581",It="_policyDirectionArrow_gotyl_585",bt="_forwardBadge_gotyl_628",Rt="_logContainer_gotyl_643",Dt="_logEntry_gotyl_650",kt="_logTime_gotyl_662",Lt="_logType_gotyl_668",Pt="_logTypeWrite_gotyl_677",Tt="_logTypeUpdate_gotyl_681",Ct="_logTypeDelete_gotyl_685",Et="_logTypeIdle_gotyl_689",At="_logPath_gotyl_693",Bt="_logEmpty_gotyl_700",s={page:xe,detailsStack:je,refreshButton:we,targetRow:Ne,storedRow:ve,storedDisclosure:Ie,targetList:be,storedList:Re,targetRowSelected:De,targetIdentity:ke,targetStudio:Le,targetState:Pe,stateNote:Te,selectedScope:Ce,sharedNote:Ee,emptyMessage:Ae,errorMessage:Be,card:Me,cardHeader:$e,clearButton:He,statusRow:Oe,metaItem:Fe,statusGrid:Ue,migrationPanel:Ve,migrationHeader:qe,migrationTitle:We,migrationDescription:Ge,migrationLedger:Ke,migrationLedgerItem:Ye,migrationLedgerBlocked:ze,migrationSection:Je,migrationList:Qe,migrationRow:Xe,migrationOperation:Ze,migrationRowBody:et,migrationNotice:tt,migrationActions:st,migrationButton:nt,policySummary:ot,policySummaryItem:at,policyPrimaryValue:it,policyReviewNotice:ct,policyApplySection:lt,policyApplyHeader:rt,policyApplyTitle:dt,policyApplyDescription:pt,policyInfoLabel:yt,policySafetyRow:ut,policySafetyLabel:gt,policySafetyBadge:mt,policyDisclosure:ht,policyDisclosureIcon:ft,policyDisclosureIconOpen:_t,policyScopeList:St,policyScopeRow:xt,policyScopeName:jt,policyDirectionRail:wt,policyDirectionEndpoint:Nt,policyDirectionEndpointStudio:vt,policyDirectionArrow:It,forwardBadge:bt,logContainer:Rt,logEntry:Dt,logTime:kt,logType:Lt,logTypeWrite:Pt,logTypeUpdate:Tt,logTypeDelete:Ct,logTypeIdle:Et,logPath:At,logEmpty:Bt};function Mt(t){return t==="add"?"success":t==="delete"?"danger":"accent"}function $t(t){return`sync.migration.reason.${t}`}function Ht(t){return`sync.migration.reason.${t}`}function Ot({migration:t,onRefresh:i,onApply:g}){const{t:c}=oe(),[l,n]=r.useState(!1),f=t==null?void 0:t.report;if(!t||!f||f.status==="not_required")return null;const j=f.status==="blocked",L=f.status==="ready"&&!t.loading&&!t.applying,A=async()=>{await g(),n(!1)};return e.jsxs("section",{className:`${s.card} ${s.migrationPanel}`,"aria-labelledby":"sync-migration-title",children:[e.jsxs("div",{className:s.migrationHeader,children:[e.jsxs("div",{children:[e.jsx("h2",{id:"sync-migration-title",className:s.migrationTitle,children:c("sync.migration.title","Sync format update available")}),e.jsx("p",{className:s.migrationDescription,children:c("sync.migration.description","Review the metadata changes before updating this place from sync format v2 to v3.")})]}),e.jsx(E,{variant:j?"warning":"accent",children:j?c("sync.migration.status.blocked","Blocked"):c("sync.migration.status.ready","Ready to review")})]}),e.jsxs("div",{className:s.migrationLedger,"aria-label":c("sync.migration.preview","Review changes"),children:[e.jsxs("div",{className:s.migrationLedgerItem,children:[e.jsx("span",{children:c("sync.migration.summary.add","Add")}),e.jsx("strong",{children:f.summary.add})]}),e.jsxs("div",{className:s.migrationLedgerItem,children:[e.jsx("span",{children:c("sync.migration.summary.modify","Modify")}),e.jsx("strong",{children:f.summary.modify})]}),e.jsxs("div",{className:s.migrationLedgerItem,children:[e.jsx("span",{children:c("sync.migration.summary.delete","Delete")}),e.jsx("strong",{children:f.summary.delete})]}),e.jsxs("div",{className:`${s.migrationLedgerItem} ${j?s.migrationLedgerBlocked:""}`,children:[e.jsx("span",{children:c("sync.migration.summary.blocked","Blocked")}),e.jsx("strong",{children:f.summary.blocked})]})]}),f.changes.length>0&&e.jsxs("div",{className:s.migrationSection,children:[e.jsx("h3",{children:c("sync.migration.changes","Metadata changes")}),e.jsx("ul",{className:s.migrationList,children:f.changes.map(h=>e.jsxs("li",{className:s.migrationRow,children:[e.jsx(E,{variant:Mt(h.operation),className:s.migrationOperation,children:c(`sync.migration.operation.${h.operation}`,h.operation)}),e.jsxs("div",{className:s.migrationRowBody,children:[e.jsx("code",{children:h.path}),e.jsx("span",{children:c($t(h.reason),h.reason.replace(/_/g," "))})]})]},`${h.operation}:${h.path}`))})]}),f.blockers.length>0&&e.jsxs("div",{className:s.migrationSection,children:[e.jsx("h3",{children:c("sync.migration.blockers","Items to resolve")}),e.jsx("ul",{className:s.migrationList,children:f.blockers.map((h,C)=>e.jsxs("li",{className:s.migrationRow,children:[e.jsx(E,{variant:"warning",className:s.migrationOperation,children:c("sync.migration.summary.blocked","Blocked")}),e.jsxs("div",{className:s.migrationRowBody,children:[h.path&&e.jsx("code",{children:h.path}),e.jsx("span",{children:c(Ht(h.reason),h.reason.replace(/_/g," "))})]})]},`${h.reason}:${h.path??C}`))})]}),e.jsxs("div",{className:s.migrationNotice,"aria-live":"polite",children:[(j||t.error==="migration_blocked")&&e.jsx("span",{children:c("sync.migration.blocked","Resolve sync conflicts before updating")}),t.error==="preview_stale"&&e.jsx("span",{children:c("sync.migration.stale","Preview changed. Review the latest diff.")}),t.error==="unknown"&&e.jsx("span",{children:c("sync.migration.error","Could not update the sync format. Try again.")})]}),e.jsxs("div",{className:s.migrationActions,children:[e.jsx(ee,{variant:"secondary",className:s.migrationButton,disabled:t.loading||t.applying,onClick:()=>void i(),children:t.loading?c("sync.migration.refreshing","Refreshing…"):c("sync.migration.refresh","Refresh preview")}),e.jsx(ee,{variant:"primary",className:s.migrationButton,disabled:!L,onClick:()=>n(!0),children:t.applying?c("sync.migration.applying","Applying…"):c("sync.migration.apply","Apply update")})]}),e.jsx(ae,{open:l,title:c("sync.migration.confirm.title","Apply sync format update?"),message:c("sync.migration.confirm.message","Back up and update the listed sync metadata. Your Luau source files will not change."),cancelLabel:c("common.cancel","Cancel"),confirmLabel:c("sync.migration.apply","Apply update"),loading:t.applying,onCancel:()=>!t.applying&&n(!1),onConfirm:()=>void A()})]})}const Ft=["scriptSource","properties","structure","serviceProperties"];function Ut(t){const i=new Date(t);return`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function Vt(t){switch(t){case"write":return s.logTypeWrite;case"update":return s.logTypeUpdate;case"delete":return s.logTypeDelete;default:return s.logTypeIdle}}const te={unknown:"neutral",off:"neutral",idle:"neutral",initializing:"info",syncing:"success",paused:"warning",error:"error"},se={unknown:"Unknown",off:"Sync OFF",idle:"Waiting",initializing:"Initializing",syncing:"Syncing",paused:"Paused",error:"Error"};function qt(t,i){const g={studio_first:"Studio First",bidirectional_review:"Bidirectional",local_code_studio_world:"Local Code, Studio World",custom:"Custom"};return t(`sync.policy.preset.${i}`,g[i])}function ne(t,i){return i==="auto"?t("sync.policy.apply.auto","Auto apply"):t("sync.policy.apply.manual","Review first")}function Wt(t,i){const g={forward:"Studio → Local",reverse:"Local → Studio",bidirectional:"Both ways"};return t(`sync.policy.direction.${i}`,g[i])}function Gt(t){return{forward:"←",reverse:"→",bidirectional:"⇄"}[t]}function Kt(t,i){const g={forward:"Studio changes are written to local files.",reverse:"Local file changes are applied to Studio.",bidirectional:"Changes can move from Studio to local files and from local files to Studio."};return t(`sync.policy.direction.${i}.tooltip`,g[i])}function Yt(t,i){return i?t("sync.policy.safety.auto","Auto delete to Studio"):t("sync.policy.safety.review","Review before delete")}function zt(t,i){return i?t("sync.policy.safety.auto.tooltip","Deleting local files may automatically remove matching Studio instances. This is separate from UI Studio automatic cleanup."):t("sync.policy.safety.review.tooltip","Local file deletions wait for review before matching Studio instances are removed. This is separate from UI Studio automatic cleanup.")}function Jt(t,i){switch(i){case"write":return t("sync.log.type.write","WRITE");case"update":return t("sync.log.type.update","UPDATE");case"delete":return t("sync.log.type.delete","DELETE");default:return t("sync.log.type.idle","IDLE")}}function Qt(t,i){switch(i){case"write":return t("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return t("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return t("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return t("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function as(){var M,_,V,w,q,P;const{t}=oe(),{trackEvent:i}=de(),{level:g}=pe(),{tier:c,loading:l}=ye(),n=Se(),{show:f}=ue(),[j,L]=r.useState(null),[A,h]=r.useState(!1),[C,J]=r.useState(!1),[B,Q]=r.useState(!1),H=!l&&c==="basic",u=n.selectedTarget,m=u==null?void 0:u.sync,p=u?{...u.sync.status,syncEnabled:u.sync.syncEnabled,policy:u.sync.policy,policyCapabilities:u.sync.policyCapabilities,policyReviewRequired:u.sync.policyReviewRequired}:null,v=(u==null?void 0:u.placeName)??((M=n.selectedPlace)==null?void 0:M.placeName)??t("sync.targets.unknownPlace","Unknown place"),I=n.selectedPlaceId===null?v:v+" · "+n.selectedPlaceId,O=n.storageSafe?(p==null?void 0:p.instanceCount)??((_=n.selectedPlace)==null?void 0:_.instanceCount):null,x=n.storageSafe?(p==null?void 0:p.scriptCount)??((V=n.selectedPlace)==null?void 0:V.scriptCount):null,b=new Set(n.targets.map(a=>a.placeId)),R=n.places.filter(a=>a.placeId===0||!b.has(a.placeId)),D=e.jsx(me,{title:t("page.sync.title","Sync"),description:t("page.sync.description","Monitor Studio to local sync status, direction, apply mode, and recent sync logs."),helpTopicId:"sync",helpState:{connectionLevel:g,tier:c}}),F=n.history,U=async()=>{if(j){h(!0);try{await n.clearHistory(j.placeId),f(t("toast.clearSuccess","Cleared successfully"),"success"),L(null)}catch{f(t("toast.clearFailed","Failed to clear data"),"error")}finally{h(!1)}}};return e.jsxs("div",{className:s.page,children:[D,e.jsxs("section",{className:s.card,"aria-label":t("sync.targets.title","Connected Studios"),children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[t("sync.targets.title","Connected Studios")," (",n.targets.length,")"]}),e.jsx("button",{type:"button",className:s.refreshButton,onClick:n.refresh,children:t("sync.targets.refresh","Refresh")})]}),n.loading?e.jsx("p",{className:s.emptyMessage,children:t("sync.targets.loading","Loading Studio Sync status…")}):n.snapshotError?e.jsxs("p",{className:s.errorMessage,role:"alert",children:[t("sync.targets.unavailable","Studio Sync status is unavailable. Retry to check the current state.")," ",n.snapshotError]}):n.targets.length===0?e.jsx("p",{className:s.emptyMessage,children:t("sync.targets.empty","No Studio is connected. Connect the WEPPY Plugin to see live Sync status.")}):e.jsx("div",{className:s.targetList,children:n.targets.map(a=>{var $;const N=(($=n.selection)==null?void 0:$.kind)==="target"&&n.selection.clientId===a.clientId;return e.jsxs("button",{type:"button",className:`${s.targetRow} ${N?s.targetRowSelected:""}`,"aria-pressed":N,onClick:()=>n.selectTarget(a.clientId),children:[e.jsxs("span",{className:s.targetIdentity,children:[e.jsx(k,{text:a.placeName||t("sync.targets.unknownPlace","Unknown place"),children:e.jsx("strong",{children:a.placeName||t("sync.targets.unknownPlace","Unknown place")})}),e.jsxs("span",{children:[t("sync.targets.placeId","Place ID"),": ",a.placeId??"—"]})]}),e.jsxs("span",{className:s.targetStudio,children:[e.jsx(k,{text:a.clientId,children:e.jsxs("span",{children:[t("sync.targets.studioId","Studio ID"),": ",a.targetAlias]})}),e.jsx("span",{children:t("sync.targets.connected","Connected")})]}),e.jsxs("span",{className:s.targetState,children:[e.jsx(E,{variant:te[a.sync.state],shape:"pill",children:t("sync.targets.state."+a.sync.state,se[a.sync.state])}),a.sync.syncEnabled===null&&e.jsx("span",{className:s.stateNote,children:t("sync.targets.notReported","Not reported yet")})]})]},a.clientId)})})]}),R.length>0&&e.jsxs("section",{className:s.card,"aria-label":t("sync.stored.title","Stored places"),children:[e.jsxs("button",{type:"button",className:s.storedDisclosure,"aria-expanded":B,onClick:()=>Q(a=>!a),children:[e.jsxs("span",{children:[t("sync.stored.title","Stored places")," (",R.length,")"]}),e.jsx("span",{"aria-hidden":"true",children:B?"⌃":"⌄"})]}),B&&e.jsx("div",{className:s.storedList,children:R.map(a=>{var K;const N=z(n.places,a),$=((K=n.selection)==null?void 0:K.kind)==="stored"&&n.selection.placeDirName===a.placeDirName;return e.jsxs("button",{type:"button",className:`${s.storedRow} ${$?s.targetRowSelected:""}`,disabled:!N,"aria-pressed":$,onClick:()=>n.selectStored(a),children:[e.jsxs("span",{children:[a.placeName," · ",a.placeId]}),e.jsx("span",{children:N?t("sync.stored.data","Stored data"):t("sync.stored.ambiguous","Storage location unconfirmed")})]},a.placeDirName)})})]}),n.selection&&!n.snapshotError&&e.jsxs("div",{className:s.selectedScope,children:[e.jsx("span",{children:t("sync.detail.scope","Viewing Sync details for")}),e.jsx("strong",{children:I}),u&&e.jsxs("span",{children:[t("sync.targets.studioId","Studio ID"),": ",u.targetAlias]}),e.jsx("span",{children:t("sync.detail.readOnly","Viewing details does not change Studio routing.")})]}),!n.selection&&!n.loading&&!n.snapshotError&&e.jsx("p",{className:s.emptyMessage,children:t("sync.detail.empty","Select a connected Studio or stored place to view details.")}),n.selection&&!n.snapshotError&&e.jsxs("div",{className:s.detailsStack,children:[e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(k,{text:t("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:t("sync.status.title","Sync Status")}),H&&e.jsx(k,{text:t("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:e.jsx("span",{className:s.forwardBadge,children:t("sync.status.forwardOnly","Forward Only")})})]}),e.jsxs("div",{className:s.statusRow,children:[m?e.jsx(E,{variant:te[m.state],shape:"pill",children:t("sync.targets.state."+m.state,se[m.state])}):e.jsx(E,{variant:"neutral",shape:"pill",children:t("sync.stored.data","Stored data")}),e.jsx("span",{className:s.metaItem,children:I})]}),(m==null?void 0:m.state)==="unknown"&&e.jsx("p",{className:s.emptyMessage,children:t("sync.detail.unknown","This Studio has not reported its Sync state yet.")}),(m==null?void 0:m.state)==="error"&&e.jsx("p",{className:s.errorMessage,role:"alert",children:t("sync.detail.error","Sync reported an error. Check the Studio Plugin for details.")}),e.jsxs("dl",{className:s.statusGrid,children:[u&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:t("sync.targets.studioId","Studio ID")}),e.jsx("dd",{children:u.targetAlias}),e.jsx("dt",{children:t("sync.targets.connectionId","Connection ID")}),e.jsx("dd",{children:u.clientId})]}),(p==null?void 0:p.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(Y,{label:t("sync.status.path","Place Root"),tooltip:t("sync.status.path.tooltip","Local filesystem root currently used for this place sync output.")})}),e.jsx("dd",{children:p.syncRoot})]}),((w=n.selectedPlace)==null?void 0:w.placeDirName)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(Y,{label:t("sync.detail.placeFolder","Place folder"),tooltip:t("sync.detail.placeFolder.tooltip","The stored folder shared by Studios opening this Place.")})}),e.jsx("dd",{children:n.selectedPlace.placeDirName})]}),O!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(Y,{label:t("sync.status.instances","Instances"),tooltip:t("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),e.jsx("dd",{children:O})]}),x!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(Y,{label:t("sync.status.scripts","Scripts"),tooltip:t("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),e.jsx("dd",{children:x})]})]}),e.jsx("p",{className:s.sharedNote,children:t("sync.detail.sharedData","Path, counts, and log belong to the Place and are shared by Studios opening it.")})]}),n.storageSafe&&e.jsx(Ot,{migration:n.migration,onRefresh:n.refreshMigration,onApply:n.applyMigration},[n.selection.kind==="target"?n.selection.clientId:n.selection.placeDirName,n.selectedPlaceId,(P=(q=n.migration)==null?void 0:q.report)==null?void 0:P.previewFingerprint].join(":")),(p==null?void 0:p.policy)&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(k,{text:t("sync.policy.title.tooltip","Effective Sync policy reported by the connected Studio plugin."),children:t("sync.policy.title","Sync Policy")})}),e.jsxs("dl",{className:s.policySummary,children:[e.jsxs("div",{className:s.policySummaryItem,children:[e.jsx("dt",{children:t("sync.policy.activation","Activation")}),e.jsx("dd",{children:e.jsx(E,{variant:p.syncEnabled?"success":"neutral",children:p.syncEnabled?t("sync.policy.activation.on","Sync ON"):t("sync.policy.activation.off","Sync OFF")})})]}),e.jsxs("div",{className:s.policySummaryItem,children:[e.jsx("dt",{children:t("sync.policy.preset","Workflow")}),e.jsx("dd",{className:s.policyPrimaryValue,children:qt(t,p.policy.preset)})]})]}),p.policyReviewRequired&&e.jsx("div",{className:s.policyReviewNotice,role:"status",children:t("sync.policy.reviewRequired","Review this policy in the Studio plugin before starting Sync.")}),e.jsxs("section",{className:s.policyApplySection,"aria-labelledby":"sync-policy-apply-title",children:[e.jsxs("div",{className:s.policyApplyHeader,children:[e.jsx("h3",{id:"sync-policy-apply-title",className:s.policyApplyTitle,children:t("sync.policy.apply.title","How local changes apply to Studio")}),e.jsx("p",{className:s.policyApplyDescription,children:t("sync.policy.apply.description","Shows whether changes made locally are reviewed first or applied to Studio automatically.")})]}),e.jsxs("dl",{className:s.policySummary,children:[e.jsxs("div",{className:s.policySummaryItem,children:[e.jsx("dt",{children:e.jsx(k,{text:t("sync.policy.apply.content.tooltip","Script Source, property, and Service property changes made locally. Instance creation, deletion, renaming, and moves are Structure changes."),children:e.jsx("span",{className:s.policyInfoLabel,tabIndex:0,children:t("sync.policy.apply.content","Content changes")})})}),e.jsx("dd",{children:ne(t,p.policy.apply.contentChanges)})]}),e.jsxs("div",{className:s.policySummaryItem,children:[e.jsx("dt",{children:e.jsx(k,{text:t("sync.policy.apply.structure.tooltip","Instance creation, deletion, renaming, and moves made locally. Automatic local deletion additionally requires the separate delete option below."),children:e.jsx("span",{className:s.policyInfoLabel,tabIndex:0,children:t("sync.policy.apply.structure","Structure changes")})})}),e.jsx("dd",{children:ne(t,p.policy.apply.structureChanges)})]})]}),e.jsxs("div",{className:s.policySafetyRow,children:[e.jsx("span",{className:s.policySafetyLabel,children:t("sync.policy.safety.localDeletes","Local delete → Studio instance removal")}),e.jsx(k,{text:zt(t,p.policy.autoApplyLocalDeletesToStudio),children:e.jsx(E,{variant:p.policy.autoApplyLocalDeletesToStudio?"warning":"neutral",className:s.policySafetyBadge,tabIndex:0,children:Yt(t,p.policy.autoApplyLocalDeletesToStudio)})})]})]}),e.jsxs("button",{type:"button",className:s.policyDisclosure,"aria-expanded":C,"aria-controls":"sync-policy-scope-panel",onClick:()=>J(a=>!a),children:[e.jsx("span",{children:t("sync.policy.scope.disclosure","Scope directions")}),e.jsx("span",{"aria-hidden":"true",className:`${s.policyDisclosureIcon} ${C?s.policyDisclosureIconOpen:""}`,children:"⌄"})]}),C&&e.jsx("div",{id:"sync-policy-scope-panel",className:s.policyScopeList,children:Ft.map(a=>{const N=p.policy.directions[a];return e.jsxs("div",{className:s.policyScopeRow,"data-testid":"sync-policy-scope-row",children:[e.jsx("span",{className:s.policyScopeName,children:t(`sync.policy.scope.${a}`,a)}),e.jsx(k,{text:Kt(t,N),children:e.jsxs("span",{className:s.policyDirectionRail,"data-testid":"sync-policy-direction-rail",role:"img","aria-label":Wt(t,N),tabIndex:0,children:[e.jsx("span",{className:s.policyDirectionEndpoint,children:t("sync.policy.endpoint.local","Local")}),e.jsx("span",{className:s.policyDirectionArrow,"aria-hidden":"true",children:Gt(N)}),e.jsx("span",{className:`${s.policyDirectionEndpoint} ${s.policyDirectionEndpointStudio}`,children:t("sync.policy.endpoint.studio","Studio")})]})})]},a)})})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[t("sync.log.title","Sync Log")," · ",t("sync.log.shared","Shared Place log")]}),e.jsx("button",{className:s.clearButton,type:"button",disabled:!n.storageSafe||n.selectedPlaceId===null,onClick:()=>{n.selectedPlaceId!==null&&(i("dashboard_click_event",{click_target:"sync_clear_log",page:"sync"}),L({placeId:n.selectedPlaceId,label:I}))},children:t("common.clear","Clear")})]}),e.jsx("div",{className:s.logContainer,children:n.storageSafe?n.historyError?e.jsxs("div",{className:s.errorMessage,role:"alert",children:[t("sync.log.unavailable","The Place log could not be loaded. Retry to check it.")," ",n.historyError]}):n.historyLoading&&F.length===0?e.jsx("div",{className:s.logEmpty,children:t("sync.log.loading","Loading Place log…")}):F.length===0?e.jsx("div",{className:s.logEmpty,children:t("sync.log.empty","No sync events yet")}):F.map((a,N)=>e.jsxs("div",{className:s.logEntry,children:[e.jsx("span",{className:s.logTime,children:Ut(a.timestamp)}),e.jsx(k,{text:Qt(t,a.type),children:e.jsx("span",{className:`${s.logType} ${Vt(a.type)}`,children:Jt(t,a.type)})}),e.jsxs("span",{className:s.logPath,children:[a.path,a.details?` — ${a.details}`:""]})]},N)):e.jsx("div",{className:s.logEmpty,children:t("sync.log.unsafe","This Place has no confirmed storage location for log access.")})})]}),H&&e.jsx(he,{title:t("sync.upgrade.title","Explore Full Sync with Pro"),description:t("tier.banner.save","Save AI tokens with Pro!"),benefits:[t("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),t("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),t("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:t("sync.upgrade.buy","View Pro"),upgradeHref:ge.sync})]}),e.jsx(ae,{open:j!==null,title:t("sync.clear.title","Clear sync log?"),message:t("sync.clear.selectedMessage","This permanently removes the shared Sync log for {place}.").replace("{place}",(j==null?void 0:j.label)??""),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:A,onCancel:()=>!A&&L(null),onConfirm:U})]})}export{as as Component};
@@ -1 +0,0 @@
1
- ._page_1ldr9_2{display:flex;flex-direction:column;gap:var(--content-gap);max-width:var(--content-max)}._grid_1ldr9_9{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-top:16px}._card_1ldr9_16{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--bg-card);padding:0;text-align:left;position:relative;color:inherit}._card_1ldr9_16:hover{border-color:var(--accent)}._cardBodyButton_1ldr9_31{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;text-align:left}._cardBodyButton_1ldr9_31:focus-visible{outline:none;box-shadow:inset var(--focus-ring)}._thumb_1ldr9_48{width:100%;aspect-ratio:16 / 9;object-fit:contain;object-position:center;display:block;background:var(--bg-secondary)}._runtimeObservationPlaceholder_1ldr9_57{display:flex;align-items:center;justify-content:center;padding:12px;color:var(--text-secondary);font-size:11px;font-weight:600;line-height:1.35;text-align:center}._badges_1ldr9_69{position:absolute;top:8px;right:8px;display:flex;gap:4px}._priorityHighBadge_1ldr9_77,._priorityMediumBadge_1ldr9_78,._priorityLowBadge_1ldr9_79{display:inline-flex;align-items:center;min-height:22px;padding:2px 6px;border:1px solid var(--border);border-radius:var(--radius-control);font-size:12px;font-weight:600;cursor:default}._priorityHighBadge_1ldr9_77{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}._priorityMediumBadge_1ldr9_78{background:var(--pro-bg-soft);border-color:var(--pro-border);color:var(--pro-text)}._priorityLowBadge_1ldr9_79{background:var(--bg-secondary);border-color:var(--border);color:var(--text-secondary)}._cardMeta_1ldr9_109{padding:8px 12px;font-size:12px;color:var(--text-primary)}._target_1ldr9_115{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._time_1ldr9_122{color:var(--text-muted);margin-top:4px}._drawer_1ldr9_127{width:100%;flex:1 1 auto;min-height:0;max-height:none;display:flex;flex-direction:column;background:var(--bg-card);border:0;border-radius:0;overflow:hidden;padding:0;box-shadow:none;color:var(--text-primary);box-sizing:border-box}._drawerToolbar_1ldr9_144{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))}._drawerTitleBlock_1ldr9_155{min-width:0;display:flex;flex-direction:column;gap:3px}._drawerEyebrow_1ldr9_162{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._drawerTarget_1ldr9_171{overflow:hidden;color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._drawerToolbarActions_1ldr9_181{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._closeBtn_1ldr9_189{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;cursor:pointer;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--text-secondary);transition:border-color var(--transition),background var(--transition),color var(--transition)}._closeBtn_1ldr9_189:hover{border-color:var(--accent);background:var(--accent-dim);color:var(--text-primary)}._detailBody_1ldr9_210{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 24px 24px}._screenshotPreviewFrame_1ldr9_217{display:flex;align-items:center;justify-content:center;width:100%;height:clamp(180px,32vh,320px);margin-top:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);overflow:hidden}._fullImg_1ldr9_230{display:block;width:100%;height:100%;object-fit:contain}._metaDl_1ldr9_237{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:16px 0;font-size:13px}._metaDl_1ldr9_237 dt{color:var(--text-muted)}._errorMsg_1ldr9_249{color:var(--error-text);padding:12px}._suggestionsWrap_1ldr9_254{margin-top:16px}._suggestionsWrap_1ldr9_254 h3{margin:0 0 12px;font-size:16px}._prioritySection_1ldr9_261{margin-bottom:16px}._sectionHighHeader_1ldr9_265{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--error)}._sectionLowHeader_1ldr9_271{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--warning-text)}._sectionMediumHeader_1ldr9_277{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--warning)}._groupCard_1ldr9_283{border:1px solid var(--border);border-radius:8px;margin-bottom:8px;background:var(--bg-secondary);overflow:hidden}._groupHeader_1ldr9_290{width:100%;display:flex;align-items:center;gap:8px;padding:10px 12px;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--text-primary);font:inherit}._groupHeader_1ldr9_290:hover{background:var(--bg-card)}._groupLabel_1ldr9_306{font-weight:600;font-size:13px;flex:1}._groupCount_1ldr9_311{font-size:12px;color:var(--text-muted);padding:2px 8px;background:var(--bg-card);border-radius:10px}._groupChevron_1ldr9_318{color:var(--text-muted);font-size:12px}._groupBody_1ldr9_322{padding:0 12px 12px}._groupDescription_1ldr9_325{font-size:12px;color:var(--text-muted);margin:8px 0 4px}._groupFix_1ldr9_330{font-size:12px;color:var(--text-primary);margin:4px 0 8px;padding:6px 10px;background:var(--bg-card);border-left:3px solid var(--accent);border-radius:4px}._falsePositive_1ldr9_339{font-size:12px;color:var(--warning-text);margin:4px 0 8px;padding:6px 10px;background:var(--warning-bg);border-radius:4px}._itemList_1ldr9_347{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}._suggestionItem_1ldr9_355{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:var(--bg-card);border-radius:6px;font-size:12px}._suggestionInfo_1ldr9_365{display:flex;flex-direction:column;gap:2px;min-width:0}._pathBreadcrumb_1ldr9_371{font-family:monospace;font-size:11px;color:var(--text-primary);background:transparent;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._currentValue_1ldr9_380{font-size:11px;color:var(--text-muted)}._copyFixBtn_1ldr9_384{padding:4px 10px;background:var(--accent);color:var(--bg-card);border:none;border-radius:4px;cursor:pointer;font-size:11px;font-weight:600;flex-shrink:0}._copyFixBtn_1ldr9_384:hover{opacity:.9}._emptySuggestions_1ldr9_398{text-align:center;padding:24px;color:var(--text-muted);font-size:13px}._sampleBanner_1ldr9_406{display:flex;flex-direction:column;gap:12px;padding:18px 20px;border:1px solid var(--pro-border);border-radius:var(--radius);background:linear-gradient(135deg,#f0bd5829,#f0bd5808 55%),var(--bg-card);margin-bottom:16px}._sampleBannerRow_1ldr9_419{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}._sampleBannerMain_1ldr9_427{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}._sampleBadge_1ldr9_435{width:fit-content;color:var(--pro-text);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.02em;opacity:.92}._sampleTitle_1ldr9_445{font-family:var(--font-label);font-size:16px;font-weight:600;color:var(--text-primary)}._sampleMessage_1ldr9_452{max-width:560px;color:var(--text-secondary);font-size:13px;line-height:1.5}._sampleActions_1ldr9_459{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._primaryAction_1ldr9_467,._secondaryAction_1ldr9_468{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 14px;border-radius:8px;font-family:var(--font-label);font-size:12px;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._secondaryAction_1ldr9_468{border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer}._secondaryAction_1ldr9_468:hover{border-color:var(--accent);background:var(--accent-dim)}._primaryAction_1ldr9_467{border:1px solid var(--pro-badge);background:var(--pro-badge);color:var(--pro-text-on-badge)}._primaryAction_1ldr9_467:hover{opacity:.9}._emptyState_1ldr9_503{text-align:center;padding:48px 20px;color:var(--text-muted);font-size:14px}._pluginGuideCard_1ldr9_511{display:flex;align-items:flex-start;gap:14px;padding:18px 20px;border:1px solid var(--warning);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary)}._pluginGuideMarker_1ldr9_522{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;border:1px solid var(--warning);color:var(--warning);font-family:var(--font-label);font-size:15px;font-weight:700}._pluginGuideBody_1ldr9_537{min-width:0}._pluginGuideTitle_1ldr9_541{margin:0 0 8px;color:var(--text-primary);font-family:var(--font-label);font-size:15px;font-weight:600}._pluginGuideMessage_1ldr9_549{margin:0 0 12px;color:var(--text-secondary);font-size:13px;line-height:1.5}._pluginGuideChecklist_1ldr9_556{display:flex;flex-direction:column;gap:7px;margin:0 0 14px;padding:0;list-style:none}._pluginGuideChecklist_1ldr9_556 li{position:relative;padding-left:20px;color:var(--text-secondary);font-size:13px}._pluginGuideChecklist_1ldr9_556 li:before{content:"○";position:absolute;left:2px;color:var(--text-muted)}._pluginGuideWaiting_1ldr9_579{display:inline-flex;align-items:center;gap:8px;color:var(--text-muted);font-family:var(--font-label);font-size:12px}._pluginGuideDot_1ldr9_588{width:7px;height:7px;border-radius:50%;background:var(--warning)}._analysisWorkspace_1ldr9_596{width:100%;position:relative}._analysisMainColumn_1ldr9_601{min-width:0}._analysisSummaryPanel_1ldr9_606{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:16px;padding:16px 18px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._analysisSummaryPanel_1ldr9_606 h2,._recentCapturesHeader_1ldr9_619 h2{margin:0;font-size:16px;font-family:var(--font-label);color:var(--text-primary)}._analysisSummaryText_1ldr9_626,._recentCapturesMeta_1ldr9_627{margin:6px 0 0;color:var(--text-secondary);font-size:13px}._analysisReportGrid_1ldr9_633{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-top:14px}._analysisReportGroup_1ldr9_640{min-width:0}._analysisReportCard_1ldr9_644{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;width:100%;min-height:128px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);cursor:pointer;text-align:left;font:inherit;transition:border-color var(--transition),background var(--transition)}._analysisReportCard_1ldr9_644:hover{border-color:var(--accent);background:var(--bg-secondary)}._analysisReportThumb_1ldr9_666{width:112px;aspect-ratio:16 / 10;object-fit:contain;object-position:center;border-radius:6px;background:var(--bg-secondary)}._analysisReportBody_1ldr9_675{min-width:0;display:flex;flex-direction:column;gap:7px}._analysisReportTopline_1ldr9_682{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._analysisVerdict_1ldr9_689{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-family:var(--font-label);font-size:12px;font-weight:600}._analysisVerdict_needsFix_1ldr9_700,._analysisVerdict_review_1ldr9_701{color:var(--accent);background:var(--accent-dim)}._analysisVerdict_incomplete_1ldr9_706{color:var(--warning-text);background:var(--warning-bg)}._analysisVerdict_passed_1ldr9_711{color:var(--text-secondary);background:var(--bg-secondary)}._analysisReportCounts_1ldr9_716{color:var(--text-secondary);font-size:12px}._readinessSummary_1ldr9_721{display:flex;flex-wrap:wrap;gap:5px}._readinessChip_1ldr9_727{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;font-weight:600;line-height:1.3}._readinessChipReady_1ldr9_742{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}._readinessChipPending_1ldr9_748{border-color:var(--warning-border);background:var(--warning-bg);color:var(--warning-text)}._primaryReadinessBlock_1ldr9_754{display:flex;flex-direction:column;gap:8px;width:100%}._criticSummary_1ldr9_761{display:flex;flex-direction:column;gap:3px;margin:0;padding:8px 10px;border-left:2px solid var(--accent);background:var(--accent-dim);color:var(--text-secondary);font-size:12px;line-height:1.45}._criticSummary_1ldr9_761>span{color:var(--text-primary);font-size:11px;font-weight:600}._analysisReportTarget_1ldr9_780{overflow:hidden;color:var(--text-primary);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._analysisReportIssue_1ldr9_789{color:var(--text-secondary);font-size:12px;line-height:1.35}._analysisReportCoverage_1ldr9_795{color:var(--text-muted);font-size:12px;line-height:1.4}._coverageChips_1ldr9_801{display:flex;flex-wrap:wrap;gap:5px}._coverageChip_1ldr9_801{display:inline-flex;align-items:center;min-height:20px;padding:1px 6px;border:1px solid var(--border);border-radius:5px;background:var(--bg-card);color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:500;cursor:default}._coverageChip_completed_1ldr9_822{border-color:var(--success-border);color:var(--success-text)}._coverageChip_failed_1ldr9_827{border-color:var(--error-border);color:var(--error-text)}._coverageChip_skipped_1ldr9_832,._coverageChip_not_requested_1ldr9_833{border-color:var(--warning-border);color:var(--warning-text)}._analysisReportMeta_1ldr9_838{margin-top:auto;color:var(--text-muted);font-size:11px;line-height:1.35}._analysisChildList_1ldr9_845{display:flex;flex-direction:column;gap:6px;margin-top:8px;padding:8px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._analysisChildRow_1ldr9_856{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:6px;background:var(--bg-card);color:var(--text-primary);cursor:pointer;text-align:left;font:inherit;transition:border-color var(--transition),background var(--transition)}._analysisChildRow_1ldr9_856:hover{border-color:var(--accent);background:var(--accent-dim)}._analysisChildPath_1ldr9_877{overflow:hidden;color:var(--text-primary);font-family:var(--font-code);font-size:11px;text-overflow:ellipsis;white-space:nowrap}._analysisChildSummary_1ldr9_886,._analysisChildDetailHint_1ldr9_887{color:var(--text-secondary);font-size:11px}._analysisChildDetailHint_1ldr9_887{color:var(--text-muted)}._drawerAnalysisSummary_1ldr9_896{display:flex;flex-direction:column;gap:10px;margin-top:14px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._drawerAnalysisSummaryItem_1ldr9_907{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._drawerAnalysisLabel_1ldr9_914{min-width:64px;color:var(--text-muted);font-size:12px}._drawerAnalysisCounts_1ldr9_920,._drawerAnalysisValue_1ldr9_921{color:var(--text-secondary);font-size:12px}._recentCapturesSection_1ldr9_926{margin-top:28px}._recentCapturesHeader_1ldr9_619{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._drawerPrimaryActions_1ldr9_938{display:flex;align-items:center;gap:8px;min-width:0}._drawerActionBtn_1ldr9_945{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 14px;border-radius:7px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:12px;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._drawerActionBtn_1ldr9_945:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._drawerActionBtn_1ldr9_945:disabled{opacity:.45;cursor:not-allowed}._drawerMoreMenu_1ldr9_974{position:relative;flex:0 0 auto}._drawerMoreButton_1ldr9_979{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:7px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);cursor:pointer;list-style:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._drawerMoreButton_1ldr9_979:hover{border-color:var(--accent);background:var(--accent-dim);color:var(--text-primary)}._drawerMoreButton_1ldr9_979::-webkit-details-marker{display:none}._drawerMoreMenuBody_1ldr9_1004{position:absolute;top:calc(100% + 6px);right:0;z-index:2;min-width:180px;padding:6px;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);box-shadow:0 8px 24px #0000002e}._drawerMenuItem_1ldr9_1017{display:block;width:100%;padding:8px 10px;border:0;border-radius:5px;background:transparent;color:var(--text-primary);text-align:left;font-family:var(--font-label);font-size:12px;cursor:pointer}._drawerMenuItem_1ldr9_1017:hover:not(:disabled){background:var(--bg-secondary)}._drawerMenuItem_1ldr9_1017:disabled{opacity:.45;cursor:not-allowed}._drawerMenuItemDanger_1ldr9_1040{color:var(--danger-text)}._drawerMenuItemDanger_1ldr9_1040:hover:not(:disabled){background:var(--danger-hover-bg)}._actionErrMsg_1ldr9_1049{font-size:12px;color:var(--error-text);padding:6px 10px;background:#e0555514;border-radius:4px;margin-top:10px}._actionStatusMsg_1ldr9_1058{display:inline-flex;flex-direction:column;align-items:flex-start;max-width:100%;font-size:12px;padding:7px 10px;border:1px solid transparent;border-radius:7px;margin-top:0;margin-bottom:10px;line-height:1.45}._actionStatus_info_1ldr9_1072{color:var(--text-secondary);background:var(--bg-secondary);border-color:var(--border)}._actionStatus_success_1ldr9_1078{color:var(--success-text);background:var(--success-bg);border-color:var(--success-border)}._actionStatus_warning_1ldr9_1084{color:var(--warning-text);background:var(--warning-bg);border-color:var(--warning-border)}._actionStatusDetail_1ldr9_1090{margin-top:2px;color:var(--text-muted)}._galleryHeader_1ldr9_1096{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._galleryHeader_1ldr9_1096 h2{margin:0;color:var(--text-primary);font-size:var(--type-surface-title-size);font-weight:600;line-height:var(--leading-title)}._cardChecked_1ldr9_1113{border-color:var(--accent)!important;box-shadow:0 0 0 2px var(--accent);background:var(--accent-dim)}._cardCheckbox_1ldr9_1120{position:absolute;top:8px;left:8px;opacity:0;z-index:2;transition:opacity var(--transition),background var(--transition),border-color var(--transition)}._card_1ldr9_16:hover ._cardCheckbox_1ldr9_1120,._card_1ldr9_16:focus-within ._cardCheckbox_1ldr9_1120,._cardChecked_1ldr9_1113 ._cardCheckbox_1ldr9_1120{opacity:1}._captureSelectionActions_1ldr9_1135{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}._selectionToolbar_1ldr9_1144,._selectionBar_1ldr9_1145{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 12px;padding:12px 16px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius)}._selectionToolbar_1ldr9_1144{position:sticky;top:0;z-index:8;justify-content:space-between}._selectionToolbarCount_1ldr9_1164{color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._selectionToolbarActions_1ldr9_1171{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._selectionBarBtn_1ldr9_1178{padding:6px 14px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),opacity var(--transition)}._selectionBarBtn_1ldr9_1178:hover:not(:disabled){border-color:var(--accent)}._selectionBarBtn_1ldr9_1178:focus-visible{outline:none;box-shadow:var(--focus-ring)}._selectionBarBtn_1ldr9_1178:disabled{opacity:.45;cursor:not-allowed}._selectionBarBtnDanger_1ldr9_1204{border-color:var(--danger-border);background:var(--danger-bg);color:var(--danger-text)}._selectionBarBtnDanger_1ldr9_1204:hover:not(:disabled){border-color:var(--danger);background:var(--danger-hover-bg)}@media(max-width:768px){._drawer_1ldr9_127{padding:0}._drawerToolbar_1ldr9_144{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._drawerToolbarActions_1ldr9_181{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._drawerActionBtn_1ldr9_945{padding:7px 10px}._detailBody_1ldr9_210{padding:14px}}._emptyState_13gyl_1{display:flex;flex-direction:column;gap:var(--space-section);padding:20px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._header_13gyl_11,._method_13gyl_12{display:flex;flex-direction:column;gap:var(--space-related)}._header_13gyl_11 h3,._header_13gyl_11 p,._method_13gyl_12 h4{margin:0}._header_13gyl_11 h3{color:var(--text-primary);font-family:var(--font-label);font-size:var(--type-section-title-size);font-weight:600}._header_13gyl_11 p{color:var(--text-secondary);font-size:var(--type-body-size);line-height:var(--leading-body)}._method_13gyl_12{padding:14px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary)}._methodTitle_13gyl_44{display:flex;align-items:center;gap:var(--space-related);color:var(--text-primary)}._methodTitle_13gyl_44 h4{font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600}._moreExamples_13gyl_57{color:var(--text-secondary);font-size:var(--type-body-size)}._moreExamples_13gyl_57 summary{width:fit-content;min-height:34px;color:var(--accent-hover);font-weight:600;line-height:34px;cursor:pointer}._moreExamples_13gyl_57[open] summary{margin-bottom:var(--space-related)}._moreExamples_13gyl_57 summary:focus-visible{outline:none;box-shadow:var(--focus-ring)}._filterBar_1203k_4{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 0;margin-bottom:8px;border-bottom:1px solid var(--border)}._filterGroup_1203k_14{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._filterLabel_1203k_21{font-size:12px;color:var(--text-muted);font-weight:500;white-space:nowrap}._filterCheckbox_1203k_28{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none}._filterCheckbox_1203k_28 input[type=checkbox]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent)}._segmentGroup_1203k_45{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--border);border-radius:7px;background:var(--bg-secondary)}._segmentBtn_1203k_55{min-height:26px;padding:0 10px;border:0;border-radius:5px;background:transparent;color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;white-space:nowrap;transition:background var(--transition),color var(--transition)}._segmentBtn_1203k_55:hover{color:var(--text-primary)}._segmentBtnActive_1203k_73{background:var(--bg-card);color:var(--text-primary);box-shadow:0 0 0 1px var(--border)}._filterInput_1203k_79{font-size:12px;padding:4px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);font-family:inherit;width:130px}._filterInput_1203k_79:focus{outline:none;border-color:var(--accent)}._filterResetBtn_1203k_95{min-height:30px;padding:0 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition)}._filterResetBtn_1203k_95:hover{border-color:var(--accent);color:var(--text-primary)}._requestRow_1203k_114{border:1px solid var(--border);border-radius:var(--radius);margin-bottom:8px;background:var(--bg-card);overflow:hidden;transition:border-color var(--transition)}._requestRow_1203k_114:hover{border-color:var(--accent)}._requestRowMain_1203k_127{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}._requestDetailToggle_1203k_134{flex:1;min-width:0;display:flex;align-items:flex-start;gap:12px;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}._requestDetailToggle_1203k_134:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}._thumbPair_1203k_156{display:flex;align-items:center;gap:4px;flex-shrink:0;position:relative}._thumbPairButton_1203k_164{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;border-radius:6px}._thumbPairButton_1203k_164:focus-visible{outline:2px solid var(--accent);outline-offset:3px}._thumbPairButton_1203k_164:hover ._thumbSlot_1203k_179{border-color:var(--accent)}._thumbPairButton_1203k_164:disabled{cursor:not-allowed;opacity:.72}._thumbPairButton_1203k_164:disabled:hover ._thumbSlot_1203k_179{border-color:var(--border)}._thumbSlot_1203k_179{width:72px;height:48px;border:1px solid var(--border);border-radius:4px;overflow:hidden;background:var(--bg-secondary);display:flex;align-items:center;justify-content:center}._thumbImg_1203k_204{width:100%;height:100%;object-fit:cover;display:block}._thumbPlaceholder_1203k_211{font-size:10px;color:var(--text-muted);text-align:center;padding:4px;line-height:1.3}._thumbArrow_1203k_219{font-size:12px;color:var(--text-muted);flex-shrink:0}._extraPathsBadge_1203k_225{position:absolute;bottom:0;right:0;background:var(--accent);color:#fff;font-size:10px;font-weight:700;padding:1px 4px;border-radius:3px;line-height:1.4}._requestMeta_1203k_239{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}._requestLabel_1203k_247{font-size:13px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._requestTime_1203k_256{font-size:11px;color:var(--text-muted)}._requestStats_1203k_261{font-size:12px;color:var(--text-secondary);display:flex;gap:4px;flex-wrap:wrap}._statDot_1203k_269{color:var(--text-muted)}._summaryPill_1203k_273{color:var(--text-secondary)}._requestReadiness_1203k_277{display:flex;flex-wrap:wrap;gap:5px}._requestReadinessPill_1203k_283{display:inline-flex;align-items:center;min-height:20px;padding:1px 6px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-size:11px;font-weight:600;line-height:1.35}._requestReadinessReady_1203k_297{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}._requestReadinessPending_1203k_303{border-color:var(--warning-border);background:var(--warning-bg);color:var(--warning-text)}._requestActions_1203k_310{display:flex;flex-direction:column;gap:6px;flex-shrink:0}._expandHint_1203k_317{padding:5px 10px;border-radius:5px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;white-space:nowrap;-webkit-user-select:none;user-select:none}._mutationsArea_1203k_330{border-top:1px solid var(--border);background:var(--bg-secondary);padding:8px 14px;display:flex;flex-direction:column;gap:4px}._mutLoading_1203k_339,._mutEmpty_1203k_340{font-size:12px;color:var(--text-muted);padding:4px 0}._mutError_1203k_346{font-size:12px;color:var(--error-text);padding:4px 0}._mutationRow_1203k_352{font-size:12px;padding:6px 0;border-bottom:1px solid var(--border)}._mutationRow_1203k_352:last-child{border-bottom:none}._mutationLine_1203k_362{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}._mutTs_1203k_369{color:var(--text-muted);flex-shrink:0;font-size:11px}._mutCommand_1203k_375{color:var(--accent);font-weight:500;flex-shrink:0}._mutPath_1203k_381{font-family:monospace;font-size:11px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}._mutDiff_1203k_391{color:var(--text-muted);font-size:11px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._mutErr_1203k_346{color:var(--error-text);font-size:11px}._changeDetails_1203k_406{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding-left:88px}._changeDetailRow_1203k_414{display:grid;grid-template-columns:72px minmax(96px,180px) minmax(0,1fr) 14px minmax(0,1fr);align-items:start;gap:8px;min-height:24px;font-size:11px}._changeDetailRowNoBefore_1203k_423{grid-template-columns:72px minmax(96px,180px) 14px minmax(0,1fr)}._changeDetailBadge_1203k_427{justify-self:start;padding:2px 6px;border-radius:4px;border:1px solid var(--border);background:var(--bg-card);color:var(--text-secondary);font-weight:600;line-height:1.4;white-space:nowrap}._changeDetail_text_1203k_444{color:#2563eb;border-color:#2563eb47}._changeDetail_color_1203k_449{color:#b45309;border-color:#b4530947}._changeDetail_size_1203k_454{color:#047857;border-color:#04785747}._changeDetail_layout_1203k_459{color:#7c3aed;border-color:#7c3aed47}._changeDetail_state_1203k_464{color:#be123c;border-color:#be123c47}._changeDetail_asset_1203k_469{color:#0369a1;border-color:#0369a147}._changeDetail_property_1203k_474{color:var(--text-secondary)}._changeDetailProperty_1203k_478{font-family:var(--font-code);color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._changeDetailArrow_1203k_486{color:var(--text-muted);text-align:center;line-height:1.6}._changeDetailOldValue_1203k_492,._changeDetailNewValue_1203k_493{font-family:var(--font-code);overflow-wrap:anywhere;word-break:break-word;line-height:1.6}._changeDetailOldValue_1203k_492{color:var(--error-text);text-decoration:line-through;text-decoration-thickness:1px}._changeDetailNewValue_1203k_493{color:var(--success-text)}._compareDialogLayer_1203k_511{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;overflow:auto}._compareDialog_1203k_511{width:100%;height:100%;min-height:0;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column;box-shadow:0 24px 60px #0000006b;outline:none;overflow:hidden}._beforeAfterDrawer_1203k_542{width:100%;height:100%;min-height:0;background:var(--bg-card);display:flex;flex-direction:column;overflow:hidden}._drawerHeader_1203k_552{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);flex-shrink:0}._drawerTitle_1203k_561{margin:0;font-size:var(--type-section-title-size);font-weight:600;line-height:var(--leading-title);color:var(--text-primary)}._drawerCloseBtn_1203k_569{padding:5px 12px;border-radius:5px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);font-size:12px;cursor:pointer;transition:border-color var(--transition)}._drawerCloseBtn_1203k_569:hover{border-color:var(--accent);color:var(--text-primary)}._drawerBody_1203k_585{padding:20px;color:var(--text-muted);font-size:13px}._pathTabs_1203k_592{display:flex;gap:2px;border-bottom:1px solid var(--border);padding:0 20px;flex-shrink:0;overflow-x:auto}._pathTab_1203k_592{font-family:var(--font-label);font-size:12px;padding:8px 14px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;transition:color var(--transition),border-color var(--transition)}._pathTab_1203k_592:hover{color:var(--text-primary)}._pathTabActive_1203k_621{color:var(--accent);border-bottom-color:var(--accent)}._comparePanel_1203k_627{display:grid;grid-template-columns:1fr 1fr;gap:1px;flex:1;min-height:0;background:var(--border);overflow:auto}._compareHalf_1203k_637{background:var(--bg-card);display:flex;flex-direction:column;min-height:0}._compareLabel_1203k_644{font-size:11px;font-weight:600;color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase;padding:8px 12px;border-bottom:1px solid var(--border);flex-shrink:0}._compareImg_1203k_655{width:100%;flex:1;object-fit:contain;background:var(--bg-secondary);display:block}._comparePlaceholder_1203k_663{flex:1;display:flex;align-items:center;justify-content:center;font-size:13px;color:var(--text-muted);background:var(--bg-secondary);padding:24px;text-align:center}._compareDetailsPanel_1203k_675{flex-shrink:0;max-height:min(34%,260px);overflow:auto;padding:12px 20px 14px;border-top:1px solid var(--border);background:var(--bg-secondary)}._compareDetailsHeader_1203k_684{margin-bottom:8px;color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._compareDetailsPanel_1203k_675 ._changeDetails_1203k_406{padding-left:0}._compareDetailsPanel_1203k_675 ._mutPath_1203k_381,._compareDetailsPanel_1203k_675 ._mutDiff_1203k_391{max-width:none}._drawerFooter_1203k_702{display:flex;justify-content:flex-end;padding:12px 20px;border-top:1px solid var(--border);flex-shrink:0}._drawerActionBtn_1203k_710{padding:7px 16px;border-radius:6px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),background var(--transition)}._drawerActionBtn_1203k_710:hover{border-color:var(--accent);background:var(--accent-dim)}._historyTabWrap_1203k_728{display:flex;flex-direction:column;gap:0}._historyWorkspace_1203k_734{width:100%;position:relative}._historyMainColumn_1203k_739{min-width:0}._requestList_1203k_743{display:flex;flex-direction:column}._emptyHistory_1203k_748{display:flex;flex-direction:column;gap:var(--space-related);text-align:center;padding:48px 20px;color:var(--text-muted);font-size:14px}._historyError_1203k_758{padding:16px 0;color:var(--error-text);font-size:13px}._historyLoading_1203k_764{padding:48px 20px;text-align:center;color:var(--text-muted);font-size:13px}._listHeader_1203k_772{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px}._listHeaderTitle_1203k_781{font-size:14px;font-weight:600;color:var(--text-primary);margin:0}._clearBtn_1203k_788{padding:6px 12px;border:1px solid var(--danger-border);border-radius:var(--radius-control);background:var(--danger-bg);color:var(--danger-text);font-family:var(--font-label);font-size:12px;font-weight:500;cursor:pointer;transition:background var(--transition),border-color var(--transition)}._clearBtn_1203k_788:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._clearBtn_1203k_788:focus-visible{outline:none;box-shadow:var(--focus-ring)}._deleteErrBanner_1203k_812{padding:8px 12px;margin-bottom:8px;border-radius:var(--radius);background:var(--error-bg, rgba(224, 85, 85, .12));border:1px solid var(--error-border, rgba(224, 85, 85, .4));color:var(--error-text);font-size:13px}@media(max-width:1120px){._compareDialogLayer_1203k_511{left:calc(var(--sidebar-width) + 16px);right:16px;bottom:16px;padding:12px}}@media(max-width:768px){._compareDialogLayer_1203k_511{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}}
@@ -1,11 +0,0 @@
1
- import{f as ke,l as W,h as Fe,r as m,u as j,j as t,a as q,R as ze,X as Ve,T as je,e as We,z as Ke}from"./index-uP4eoQi-.js";import{I as B}from"./InfoLabel-DAd1I756.js";import{T as y}from"./TooltipText-NA7u0bu6.js";import{C as Ye,P as Qe}from"./PageHeader-_z4Dtkbg.js";import{D as le,c as ce,e as Je,g as Xe,h as Ze,i as de,j as Ie,k as et,l as ue,d as tt}from"./sample-requests-CQy_WSFJ.js";import{C as it,a as st,T as at}from"./Tabs-BoD1I6c5.js";import{A as pe}from"./AiPromptExamples-BSFrFYar.js";import{B as rt}from"./bot-D89pfHg8.js";import"./PlaceSelectOptions-Dd_m61bQ.js";import"./copy-DVGVC27v.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 nt=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],ot=ke("camera",nt);/**
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 lt=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],ct=ke("ellipsis",lt);async function Ne(e){const i=await fetch(`${W}${e}`);if(!i.ok){let s=null;try{s=await i.json()}catch{}throw new Fe(i.status,(s==null?void 0:s.message)??i.statusText,(s==null?void 0:s.error)??null,s)}return await i.json()}function U(e){return typeof e=="number"&&Number.isFinite(e)?e:0}const dt=["structure","visual","interaction","primary_view_context","responsive_viewport"];function he(e){const i=e.coverage_dimensions,s={structure:{status:e.deterministic_status==="failed"?"failed":"completed",reasons:[]},visual:{status:e.visual_status??"not_requested",reasons:[]},interaction:{status:"skipped",reasons:[]},primary_view_context:{status:"skipped",reasons:[]},responsive_viewport:{status:"skipped",reasons:[]}};if(!i)return s;for(const n of dt){const l=i[n];l&&["completed","not_requested","skipped","failed"].includes(l.status)&&(s[n]={status:l.status,reasons:Array.isArray(l.reasons)?l.reasons.filter(a=>typeof a=="string"):[]})}return s}function ut(e,i){return e.readiness==="ready"||e.readiness==="review_required"||e.readiness==="insufficient_evidence"?e.readiness:"insufficient_evidence"}function pt(e){return e==="recompose"||e==="refine"||e==="approved"?e:void 0}function ht(e){return e==="recommended"||e==="required"?e:void 0}function _t(e){if(Array.isArray(e))return e.filter(i=>i==="primary_visual"||i==="functional_safe"||i==="responsive_ready")}function mt(e){if(e.design_check_summary){const n={priority_high:U(e.design_check_summary.priority_high),priority_medium:U(e.design_check_summary.priority_medium),priority_low:U(e.design_check_summary.priority_low),deterministic_status:e.design_check_summary.deterministic_status==="failed"?"failed":"completed",visual_status:e.design_check_summary.visual_status??"not_requested",coverage:e.design_check_summary.coverage==="structural_and_visual"?"structural_and_visual":"structural_only",skipped_reasons:Array.isArray(e.design_check_summary.skipped_reasons)?e.design_check_summary.skipped_reasons.filter(a=>typeof a=="string"):[],primary_visual_status:e.design_check_summary.primary_visual_status,primary_visual_verdict:pt(e.design_check_summary.primary_visual_verdict),critic_summary:typeof e.design_check_summary.critic_summary=="string"?e.design_check_summary.critic_summary:void 0,functional_safe:typeof e.design_check_summary.functional_safe=="boolean"?e.design_check_summary.functional_safe:void 0,responsive_requirement:ht(e.design_check_summary.responsive_requirement),responsive_ready:typeof e.design_check_summary.responsive_ready=="boolean"?e.design_check_summary.responsive_ready:void 0,required_dimensions:_t(e.design_check_summary.required_dimensions),observation_source:e.design_check_summary.observation_source==="play_client"?"play_client":e.design_check_summary.observation_source==="edit"?"edit":void 0,runtime_status:e.design_check_summary.runtime_status==="completed"||e.design_check_summary.runtime_status==="skipped"?e.design_check_summary.runtime_status:void 0,limitations:Array.isArray(e.design_check_summary.limitations)?e.design_check_summary.limitations.filter(a=>typeof a=="string"):[],state_coverage:Array.isArray(e.design_check_summary.state_coverage)?e.design_check_summary.state_coverage:[]},l=he({...n,coverage_dimensions:e.design_check_summary.coverage_dimensions});return{...n,coverage_dimensions:l,viewport_profiles_tested:Array.isArray(e.design_check_summary.viewport_profiles_tested)?e.design_check_summary.viewport_profiles_tested.filter(a=>typeof a=="string"):[],readiness:ut(e.design_check_summary)}}if(!e.lint_summary)return null;const i={priority_high:U(e.lint_summary.errors),priority_medium:U(e.lint_summary.warnings),priority_low:0,deterministic_status:"completed",visual_status:"not_requested",coverage:"structural_only",skipped_reasons:[]},s=he(i);return{...i,coverage_dimensions:s,viewport_profiles_tested:[],readiness:"insufficient_evidence"}}function gt(e){return{rule:e.rule,path:e.path,displayPriority:e.displayPriority??(e.severity==="error"?"priority_high":"priority_medium"),actual:e.actual,expected:e.expected,hint:e.hint}}function Pe(e){return{snapshot_id:e.snapshot_id,captured_at:e.captured_at,brief_id:e.brief_id,thresholds_source:e.thresholds_source,scope:e.scope,target:e.target,design_check_summary:mt(e),primary_view_context:e.primary_view_context,image:e.image}}function yt(e){const i=e.check_results??e.lint_results??[];return{...Pe(e),check_results:i.map(gt),image_url:e.image_url,meta:e.meta,layout_metadata:e.layout_metadata,target_profiles:e.target_profiles,profile_simulations:e.profile_simulations,design_check_context:e.design_check_context}}async function _e(e,i){const s=new URLSearchParams;i!==void 0&&s.set("limit",String(i));const n=s.toString()?`?${s.toString()}`:"",l=await Ne(`/api/ui-studio/snapshots${n}`);return{...l,snapshots:l.snapshots.map(Pe)}}async function ft(e,i){const s=i!==void 0?`?placeId=${i}`:"",n=await Ne(`/api/ui-studio/snapshots/${encodeURIComponent(e)}${s}`);return yt(n)}function Te(e,i){const s=i!==void 0?`?placeId=${i}`:"";return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image${s}`}const St=1e4;function Re(e=50){const[i,s]=m.useState(null),[n,l]=m.useState(!0),[a,o]=m.useState(null),d=m.useCallback(async()=>{try{const p=await _e(void 0,e);s(p),o(null)}catch(p){o(p instanceof Error?p.message:String(p))}finally{l(!1)}},[e]);return m.useEffect(()=>{let p=!1;const u=async()=>{try{const h=await _e(void 0,e);p||(s(h),o(null))}catch(h){p||o(h instanceof Error?h.message:String(h))}finally{p||l(!1)}};u();const g=setInterval(()=>{u()},St);return()=>{p=!0,clearInterval(g)}},[e]),{data:i,loading:n,error:a,refresh:d}}const xt="_page_1ldr9_2",vt="_grid_1ldr9_9",Ct="_card_1ldr9_16",bt="_cardBodyButton_1ldr9_31",wt="_thumb_1ldr9_48",kt="_runtimeObservationPlaceholder_1ldr9_57",jt="_badges_1ldr9_69",It="_priorityHighBadge_1ldr9_77",Nt="_priorityMediumBadge_1ldr9_78",Pt="_priorityLowBadge_1ldr9_79",Tt="_cardMeta_1ldr9_109",Rt="_target_1ldr9_115",Bt="_time_1ldr9_122",Gt="_drawer_1ldr9_127",Dt="_drawerToolbar_1ldr9_144",Mt="_drawerTitleBlock_1ldr9_155",At="_drawerEyebrow_1ldr9_162",$t="_drawerTarget_1ldr9_171",Lt="_drawerToolbarActions_1ldr9_181",Et="_closeBtn_1ldr9_189",qt="_detailBody_1ldr9_210",Ut="_screenshotPreviewFrame_1ldr9_217",Ot="_fullImg_1ldr9_230",Ht="_metaDl_1ldr9_237",Ft="_errorMsg_1ldr9_249",zt="_suggestionsWrap_1ldr9_254",Vt="_prioritySection_1ldr9_261",Wt="_sectionHighHeader_1ldr9_265",Kt="_sectionLowHeader_1ldr9_271",Yt="_sectionMediumHeader_1ldr9_277",Qt="_groupCard_1ldr9_283",Jt="_groupHeader_1ldr9_290",Xt="_groupLabel_1ldr9_306",Zt="_groupCount_1ldr9_311",ei="_groupChevron_1ldr9_318",ti="_groupBody_1ldr9_322",ii="_groupDescription_1ldr9_325",si="_groupFix_1ldr9_330",ai="_falsePositive_1ldr9_339",ri="_itemList_1ldr9_347",ni="_suggestionItem_1ldr9_355",oi="_suggestionInfo_1ldr9_365",li="_pathBreadcrumb_1ldr9_371",ci="_currentValue_1ldr9_380",di="_copyFixBtn_1ldr9_384",ui="_emptySuggestions_1ldr9_398",pi="_sampleBanner_1ldr9_406",hi="_sampleBannerRow_1ldr9_419",_i="_sampleBannerMain_1ldr9_427",mi="_sampleBadge_1ldr9_435",gi="_sampleTitle_1ldr9_445",yi="_sampleMessage_1ldr9_452",fi="_sampleActions_1ldr9_459",Si="_primaryAction_1ldr9_467",xi="_secondaryAction_1ldr9_468",vi="_emptyState_1ldr9_503",Ci="_pluginGuideCard_1ldr9_511",bi="_pluginGuideMarker_1ldr9_522",wi="_pluginGuideBody_1ldr9_537",ki="_pluginGuideTitle_1ldr9_541",ji="_pluginGuideMessage_1ldr9_549",Ii="_pluginGuideChecklist_1ldr9_556",Ni="_pluginGuideWaiting_1ldr9_579",Pi="_pluginGuideDot_1ldr9_588",Ti="_analysisWorkspace_1ldr9_596",Ri="_analysisMainColumn_1ldr9_601",Bi="_analysisSummaryPanel_1ldr9_606",Gi="_recentCapturesHeader_1ldr9_619",Di="_analysisSummaryText_1ldr9_626",Mi="_recentCapturesMeta_1ldr9_627",Ai="_analysisReportGrid_1ldr9_633",$i="_analysisReportGroup_1ldr9_640",Li="_analysisReportCard_1ldr9_644",Ei="_analysisReportThumb_1ldr9_666",qi="_analysisReportBody_1ldr9_675",Ui="_analysisReportTopline_1ldr9_682",Oi="_analysisVerdict_1ldr9_689",Hi="_analysisVerdict_needsFix_1ldr9_700",Fi="_analysisVerdict_review_1ldr9_701",zi="_analysisVerdict_incomplete_1ldr9_706",Vi="_analysisVerdict_passed_1ldr9_711",Wi="_analysisReportCounts_1ldr9_716",Ki="_readinessSummary_1ldr9_721",Yi="_readinessChip_1ldr9_727",Qi="_readinessChipReady_1ldr9_742",Ji="_readinessChipPending_1ldr9_748",Xi="_primaryReadinessBlock_1ldr9_754",Zi="_criticSummary_1ldr9_761",es="_analysisReportTarget_1ldr9_780",ts="_analysisReportIssue_1ldr9_789",is="_analysisReportCoverage_1ldr9_795",ss="_coverageChips_1ldr9_801",as="_coverageChip_1ldr9_801",rs="_coverageChip_completed_1ldr9_822",ns="_coverageChip_failed_1ldr9_827",os="_coverageChip_skipped_1ldr9_832",ls="_coverageChip_not_requested_1ldr9_833",cs="_analysisReportMeta_1ldr9_838",ds="_analysisChildList_1ldr9_845",us="_analysisChildRow_1ldr9_856",ps="_analysisChildPath_1ldr9_877",hs="_analysisChildSummary_1ldr9_886",_s="_analysisChildDetailHint_1ldr9_887",ms="_drawerAnalysisSummary_1ldr9_896",gs="_drawerAnalysisSummaryItem_1ldr9_907",ys="_drawerAnalysisLabel_1ldr9_914",fs="_drawerAnalysisCounts_1ldr9_920",Ss="_drawerAnalysisValue_1ldr9_921",xs="_recentCapturesSection_1ldr9_926",vs="_drawerPrimaryActions_1ldr9_938",Cs="_drawerActionBtn_1ldr9_945",bs="_drawerMoreMenu_1ldr9_974",ws="_drawerMoreButton_1ldr9_979",ks="_drawerMoreMenuBody_1ldr9_1004",js="_drawerMenuItem_1ldr9_1017",Is="_drawerMenuItemDanger_1ldr9_1040",Ns="_actionErrMsg_1ldr9_1049",Ps="_actionStatusMsg_1ldr9_1058",Ts="_actionStatus_info_1ldr9_1072",Rs="_actionStatus_success_1ldr9_1078",Bs="_actionStatus_warning_1ldr9_1084",Gs="_actionStatusDetail_1ldr9_1090",Ds="_galleryHeader_1ldr9_1096",Ms="_cardChecked_1ldr9_1113",As="_cardCheckbox_1ldr9_1120",$s="_captureSelectionActions_1ldr9_1135",Ls="_selectionToolbar_1ldr9_1144",Es="_selectionBar_1ldr9_1145",qs="_selectionToolbarCount_1ldr9_1164",Us="_selectionToolbarActions_1ldr9_1171",Os="_selectionBarBtn_1ldr9_1178",Hs="_selectionBarBtnDanger_1ldr9_1204",r={page:xt,grid:vt,card:Ct,cardBodyButton:bt,thumb:wt,runtimeObservationPlaceholder:kt,badges:jt,priorityHighBadge:It,priorityMediumBadge:Nt,priorityLowBadge:Pt,cardMeta:Tt,target:Rt,time:Bt,drawer:Gt,drawerToolbar:Dt,drawerTitleBlock:Mt,drawerEyebrow:At,drawerTarget:$t,drawerToolbarActions:Lt,closeBtn:Et,detailBody:qt,screenshotPreviewFrame:Ut,fullImg:Ot,metaDl:Ht,errorMsg:Ft,suggestionsWrap:zt,prioritySection:Vt,sectionHighHeader:Wt,sectionLowHeader:Kt,sectionMediumHeader:Yt,groupCard:Qt,groupHeader:Jt,groupLabel:Xt,groupCount:Zt,groupChevron:ei,groupBody:ti,groupDescription:ii,groupFix:si,falsePositive:ai,itemList:ri,suggestionItem:ni,suggestionInfo:oi,pathBreadcrumb:li,currentValue:ci,copyFixBtn:di,emptySuggestions:ui,sampleBanner:pi,sampleBannerRow:hi,sampleBannerMain:_i,sampleBadge:mi,sampleTitle:gi,sampleMessage:yi,sampleActions:fi,primaryAction:Si,secondaryAction:xi,emptyState:vi,pluginGuideCard:Ci,pluginGuideMarker:bi,pluginGuideBody:wi,pluginGuideTitle:ki,pluginGuideMessage:ji,pluginGuideChecklist:Ii,pluginGuideWaiting:Ni,pluginGuideDot:Pi,analysisWorkspace:Ti,analysisMainColumn:Ri,analysisSummaryPanel:Bi,recentCapturesHeader:Gi,analysisSummaryText:Di,recentCapturesMeta:Mi,analysisReportGrid:Ai,analysisReportGroup:$i,analysisReportCard:Li,analysisReportThumb:Ei,analysisReportBody:qi,analysisReportTopline:Ui,analysisVerdict:Oi,analysisVerdict_needsFix:Hi,analysisVerdict_review:Fi,analysisVerdict_incomplete:zi,analysisVerdict_passed:Vi,analysisReportCounts:Wi,readinessSummary:Ki,readinessChip:Yi,readinessChipReady:Qi,readinessChipPending:Ji,primaryReadinessBlock:Xi,criticSummary:Zi,analysisReportTarget:es,analysisReportIssue:ts,analysisReportCoverage:is,coverageChips:ss,coverageChip:as,coverageChip_completed:rs,coverageChip_failed:ns,coverageChip_skipped:os,coverageChip_not_requested:ls,analysisReportMeta:cs,analysisChildList:ds,analysisChildRow:us,analysisChildPath:ps,analysisChildSummary:hs,analysisChildDetailHint:_s,drawerAnalysisSummary:ms,drawerAnalysisSummaryItem:gs,drawerAnalysisLabel:ys,drawerAnalysisCounts:fs,drawerAnalysisValue:Ss,recentCapturesSection:xs,drawerPrimaryActions:vs,drawerActionBtn:Cs,drawerMoreMenu:bs,drawerMoreButton:ws,drawerMoreMenuBody:ks,drawerMenuItem:js,drawerMenuItemDanger:Is,actionErrMsg:Ns,actionStatusMsg:Ps,actionStatus_info:Ts,actionStatus_success:Rs,actionStatus_warning:Bs,actionStatusDetail:Gs,galleryHeader:Ds,cardChecked:Ms,cardCheckbox:As,captureSelectionActions:$s,selectionToolbar:Ls,selectionBar:Es,selectionToolbarCount:qs,selectionToolbarActions:Us,selectionBarBtn:Os,selectionBarBtnDanger:Hs};function Fs({snapshot:e,placeId:i,onClick:s,imageUrlOverride:n,selectable:l,selected:a,onToggleSelect:o}){var v,I,G;const{t:d}=j(),p=((v=e.design_check_summary)==null?void 0:v.priority_high)??0,u=((I=e.design_check_summary)==null?void 0:I.priority_medium)??0,g=((G=e.design_check_summary)==null?void 0:G.priority_low)??0,h=new Date(e.captured_at*1e3).toLocaleString(),S=n??Te(e.snapshot_id,i),f=()=>{o==null||o(e.snapshot_id)};return t.jsxs("div",{className:`${r.card} ${a?r.cardChecked:""}`,children:[l&&t.jsx(y,{text:d("uiStudio.gallery.cardCheckbox.tooltip","Select this capture. Pick multiple to delete them together."),children:t.jsx(Ye,{className:r.cardCheckbox,"aria-label":d("uiStudio.gallery.cardCheckbox","Select screenshot"),checked:!!a,onChange:f})}),t.jsxs("button",{className:r.cardBodyButton,onClick:k=>s(k.currentTarget),type:"button",children:[e.image?t.jsx("img",{className:r.thumb,src:S,alt:e.snapshot_id,loading:"lazy"}):t.jsx("div",{className:`${r.thumb} ${r.runtimeObservationPlaceholder}`,role:"img","aria-label":d("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:d("uiStudio.runtimeStructureObservation","Runtime structure observation")}),t.jsxs("div",{className:r.badges,children:[p>0&&t.jsx(y,{text:d("uiStudio.gallery.priorityHighBadge.tooltip","Number of suggestions to review first. Click for details."),children:t.jsx("span",{className:r.priorityHighBadge,children:p})}),u>0&&t.jsx(y,{text:d("uiStudio.gallery.priorityMediumBadge.tooltip","Number of recommended suggestions."),children:t.jsx("span",{className:r.priorityMediumBadge,children:u})}),g>0&&t.jsx(y,{text:d("uiStudio.gallery.priorityLowBadge.tooltip","Number of optional improvements."),children:t.jsx("span",{className:r.priorityLowBadge,children:g})})]}),t.jsxs("div",{className:r.cardMeta,children:[t.jsx("div",{className:r.target,children:e.target??e.scope}),t.jsx("div",{className:r.time,children:h})]})]})]})}const zs={touch_target:"touchTarget",contrast:"contrast",text_scaled:"textScaled",safezone:"safezone",min_text_size:"minTextSize"};function Vs(e){return e.rule==="contrast"&&/\.(Icon|Avatar|EmptyIcon|GoldIcon|[A-Za-z]*Icon)$/.test(e.path)}const Ws={touch_target:{checkLabel:"터치 타겟 크기",description:"모바일에서 손가락으로 누르기 편한 최소 크기를 만족하는지 확인합니다.",howToFix:"버튼 Size 를 44x44 px 이상으로 키우거나 UIPadding 으로 터치 영역을 확장하세요.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{Size:{xScale:0,xOffset:44,yScale:0,yOffset:44}}}},null,2)},contrast:{checkLabel:"텍스트 대비",description:"텍스트와 배경의 명암 비율이 WCAG 접근성 기준을 만족하는지 확인합니다.",howToFix:"TextColor3 를 더 밝은 색(예: #FFFFFF) 으로 바꾸거나, 배경(BackgroundColor3)을 어둡게 조정하세요.",falsePositiveNote:"이모지 아이콘의 경우 색이 고정되어 대비 규칙이 오탐하는 경우가 많습니다. 실제 가독성에 문제 없으면 무시해도 됩니다.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{TextColor3:{r:255,g:255,b:255}}}},null,2)},text_scaled:{checkLabel:"TextScaled 사용",description:"TextScaled 가 켜져 있으나 UITextSizeConstraint 가 없으면 언어 확장 시 레이아웃이 깨질 수 있습니다.",howToFix:"해당 TextLabel 에 UITextSizeConstraint 자식을 추가하고 MaxTextSize 를 지정하세요.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{addChildren:[{className:"UITextSizeConstraint",name:"SizeConstraint",properties:{MaxTextSize:24,MinTextSize:10}}]}},null,2)},safezone:{checkLabel:"세이프존 배치",description:"버튼이 플랫폼별 세이프존(노치·홈 인디케이터·TV safe margin) 안에 있는지 확인합니다.",howToFix:"Position 을 세이프존 안쪽으로 이동하거나, 부모 Frame 을 축소하세요.",buildUpdateCommand:()=>null},min_text_size:{checkLabel:"최소 폰트 크기",description:"텍스트가 너무 작아 가독성이 떨어지는지 확인합니다. 브리프 기준 하한을 사용합니다.",howToFix:"TextSize 를 14 이상(본문 기준)으로 올리세요.",buildUpdateCommand:e=>{const i=typeof e.expected=="string"?parseInt(e.expected.replace(/[^\d]/g,""),10):14;return JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{TextSize:Number.isFinite(i)?i:14}}},null,2)}}};function Ks(e,i,s){const n=zs[e];return n?{...i,checkLabel:s(`uiStudio.fix.${n}.label`,i.checkLabel),description:s(`uiStudio.fix.${n}.description`,i.description),howToFix:s(`uiStudio.fix.${n}.howToFix`,i.howToFix),falsePositiveNote:i.falsePositiveNote?s(`uiStudio.fix.${n}.falsePositive`,i.falsePositiveNote):void 0}:i}function Ys(e,i){const s=Ws[e]??null;return s?i?Ks(e,s,i):s:null}function Qs(e){return Vs(e)}function Js(e,i){const s=new Map;for(const l of e){const a=`${l.displayPriority}::${l.rule}`,o=s.get(a)??[];o.push(l),s.set(a,o)}const n=[];for(const[l,a]of s){const[o,d]=l.split("::"),p=a.filter(Qs).length;n.push({rule:d??"unknown",priority:o,items:a,fixTemplate:Ys(d??"",i),falsePositiveRatio:a.length>0?p/a.length:0})}return n.sort((l,a)=>{const o={priority_high:0,priority_medium:1,priority_low:2};return l.priority!==a.priority?o[l.priority]-o[a.priority]:a.items.length-l.items.length}),{high:n.filter(l=>l.priority==="priority_high"),medium:n.filter(l=>l.priority==="priority_medium"),low:n.filter(l=>l.priority==="priority_low")}}function Be(e){const i=e.split("."),s=i[i.length-1]??e,n=i[i.length-2],l=n?`${n} > ${s}`:s;return{full:e,breadcrumb:l,leaf:s}}function Ge(e){return typeof e=="object"&&e!==null}function me(e){return Ge(e.data)?e.data:{}}function se(e,i){const s=e[i];return Ge(s)?s:{}}function Q(e,i){const s=e[i];return typeof s=="string"?s:null}function J(e,i){const s=e[i];return typeof s=="number"&&Number.isFinite(s)?s:0}function Xs(e){const i=se(e,"design_check_summary");return{priority_high:J(i,"priority_high"),priority_medium:J(i,"priority_medium"),priority_low:J(i,"priority_low")}}function ge(e){if(!(e.success??e.ok??!e.error))throw new Error(e.error??"UI Studio action failed")}function ye(e,i){return De(e,Xs(i))}function O(e,i,s,n,l){const a=e(i,s);return l?`${a}: ${l} · ${n}`:`${a}: ${n}`}function Zs(e){const i=e.design_check_summary;return((i==null?void 0:i.priority_high)??0)>0?"needsFix":(i==null?void 0:i.readiness)==="insufficient_evidence"?"incomplete":((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0?"review":"passed"}function ea(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):i==="incomplete"?e("uiStudio.analysis.verdict.incomplete","검토 증거 부족"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function X(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function De(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${X(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${X(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${X(e,(i==null?void 0:i.priority_low)??0)}`}function ta(e,i){return De(e,i.design_check_summary)}function ia(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function sa(e,i){return i==="ready"?e("uiStudio.readiness.ready","Ready"):i==="review_required"?e("uiStudio.readiness.reviewRequired","Review required"):i==="insufficient_evidence"?e("uiStudio.readiness.insufficient","Evidence incomplete"):e("uiStudio.readiness.unknown","Readiness unknown")}function aa({snapshotId:e,placeId:i,onClose:s,sampleDetail:n,tier:l,onActionDone:a}){const[o,d]=m.useState(n??null),[p,u]=m.useState(null),[g,h]=m.useState(null),[S,f]=m.useState(null),[v,I]=m.useState(null),[G,k]=m.useState(null),{t:_}=j(),{trackEvent:R}=q(),N=l==="pro";m.useEffect(()=>{if(n){d(n),u(null);return}let b=!1;return ft(e,i).then(A=>{b||d(A)}).catch(A=>{b||u(A instanceof Error?A.message:String(A))}),()=>{b=!0}},[e,i,n]);const C=async()=>{if(o!=null&&o.target){R("dashboard_click_event",{click_target:"ui_studio_capture_current",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),I("preview"),f({tone:"info",message:_("uiStudio.actions.previewRunning","캡처 중..."),detail:_("uiStudio.actions.previewRunningDetail","완료되면 새 화면 캡처 파일 ID를 표시합니다.")});try{const b=await ce("preview",{targetPath:o.target,placeId:i});ge(b);const A=me(b),L=Q(A,"snapshot_id"),Y=se(A,"screenshot"),x=se(A,"meta"),$=Q(Y,"saved_path"),T=Q(x,"persist_warning"),F=ye(_,A);f(T?{tone:"warning",message:O(_,"uiStudio.actions.previewNeedsSaveCheck","캡처 완료, 저장 확인 필요",F,L),detail:T}:L&&$?{tone:"success",message:O(_,"uiStudio.actions.previewSaved","새 화면 캡처 저장 완료",F,L),detail:_("uiStudio.actions.previewSavedDetail","기존 화면 캡처는 변경하지 않고 새 파일로 저장했습니다.")}:L?{tone:"warning",message:O(_,"uiStudio.actions.previewComplete","캡처 완료",F,L),detail:_("uiStudio.actions.previewSavedPathMissing","새 화면 캡처 ID는 받았지만 저장 경로를 확인하지 못했습니다.")}:{tone:"warning",message:O(_,"uiStudio.actions.previewComplete","캡처 완료",F),detail:_("uiStudio.actions.previewSnapshotIdMissing","새 화면 캡처 ID를 확인하지 못했습니다. 목록을 새로고침해 저장 여부를 확인해 주세요.")}),await(a==null?void 0:a())}catch(b){h(b instanceof Error?b.message:String(b))}finally{I(null)}}},P=async()=>{if(o!=null&&o.target){R("dashboard_click_event",{click_target:"ui_studio_check_again",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),I("check"),f({tone:"info",message:_("uiStudio.actions.designCheckRunning","개선 제안 확인 중..."),detail:_("uiStudio.actions.designCheckRunningDetail","완료되면 우선 검토/검토 권장/선택 개선 항목 수를 표시합니다.")});try{const b=await ce("check",{targetPath:o.target,placeId:i});ge(b);const A=me(b),L=ye(_,A);f({tone:"success",message:O(_,"uiStudio.actions.designCheckComplete","개선 제안 확인 완료",L),detail:_("uiStudio.actions.designCheckNoSnapshotSaved","이 작업은 화면 캡처 파일을 새로 저장하지 않습니다.")}),await(a==null?void 0:a())}catch(b){h(b instanceof Error?b.message:String(b))}finally{I(null)}}},M=async()=>{h(null),f(null);try{await Je(i,e),await(a==null?void 0:a()),k(null),s()}catch(b){throw h(b instanceof Error?b.message:String(b)),b}},D=N?void 0:_("uiStudio.actions.proRequired","Pro에서 사용 가능"),w=o!=null&&o.target?Be(o.target):null;return t.jsxs("div",{className:r.drawer,children:[t.jsxs("div",{className:r.drawerToolbar,"data-testid":"snapshot-detail-toolbar",children:[t.jsxs("div",{className:r.drawerTitleBlock,children:[t.jsx("span",{className:r.drawerEyebrow,children:_("uiStudio.analysis.detailDialog","Analysis detail")}),t.jsx("span",{className:r.drawerTarget,title:(w==null?void 0:w.full)??e,children:(w==null?void 0:w.breadcrumb)??e})]}),t.jsxs("div",{className:r.drawerToolbarActions,children:[o&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:r.drawerPrimaryActions,children:[t.jsx(y,{text:D??_("uiStudio.actions.captureCurrentState.tooltip","Save the UI currently shown in Studio as a new capture. Existing captures are kept."),children:t.jsxs("button",{className:r.drawerActionBtn,onClick:()=>void C(),disabled:!N||!o.target||v!==null,type:"button",children:[t.jsx(ot,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:_("uiStudio.actions.captureCurrentState","현재 상태 캡처")})]})}),t.jsx(y,{text:D??_("uiStudio.actions.checkSuggestionsAgain.tooltip","Recompute suggestions for this capture without taking a new screenshot."),children:t.jsxs("button",{className:r.drawerActionBtn,onClick:()=>void P(),disabled:!N||!o.target||v!==null,type:"button",children:[t.jsx(ze,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:_("uiStudio.actions.checkSuggestionsAgain","개선 제안 다시 확인")})]})})]}),t.jsxs("details",{className:r.drawerMoreMenu,children:[t.jsx("summary",{className:r.drawerMoreButton,title:_("uiStudio.actions.more.tooltip","Open additional actions."),"aria-label":_("uiStudio.actions.more","More"),children:t.jsx(ct,{size:18,"aria-hidden":"true"})}),t.jsx("div",{className:r.drawerMoreMenuBody,children:t.jsx(y,{text:D??_("uiStudio.actions.deleteSnapshot.tooltip","Delete only this capture file. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${r.drawerMenuItem} ${r.drawerMenuItemDanger}`,onClick:()=>{R("dashboard_click_event",{click_target:"ui_studio_delete_snapshot",page:"ui-studio",tab:"ui_studio_analysis"}),k("deleteSnapshot")},disabled:!N,type:"button",children:_("uiStudio.actions.deleteSnapshot","이 화면 캡처 삭제")})})})]})]}),t.jsx(y,{text:_("uiStudio.detailClose.tooltip","Close this detail panel."),children:t.jsx("button",{className:r.closeBtn,onClick:s,type:"button","aria-label":_("uiStudio.detailClose","Close"),children:t.jsx(Ve,{size:18,"aria-hidden":"true"})})})]})]}),p&&t.jsx("div",{className:r.errorMsg,children:p}),o&&t.jsxs("div",{className:r.detailBody,children:[g&&t.jsx("div",{className:r.actionErrMsg,children:g}),S&&t.jsxs("div",{className:`${r.actionStatusMsg} ${r[`actionStatus_${S.tone}`]??""}`,children:[t.jsx("div",{children:S.message}),S.detail&&t.jsx("div",{className:r.actionStatusDetail,children:S.detail})]}),t.jsx(ra,{detail:o}),t.jsx("div",{className:r.screenshotPreviewFrame,"data-testid":"analysis-screenshot-preview",children:o.image?t.jsx("img",{className:r.fullImg,src:o.image_url,alt:o.snapshot_id}):t.jsx("div",{className:`${r.fullImg} ${r.runtimeObservationPlaceholder}`,role:"img","aria-label":_("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:_("uiStudio.runtimeStructureObservation","Runtime structure observation")})}),t.jsx(ca,{items:o.check_results,summary:o.design_check_summary}),t.jsxs("dl",{className:r.metaDl,children:[t.jsx("dt",{children:t.jsx(B,{label:_("uiStudio.capturedAt","Captured"),tooltip:_("uiStudio.capturedAt.tooltip","When this screen was captured.")})}),t.jsx("dd",{children:new Date(o.captured_at*1e3).toLocaleString()}),t.jsx("dt",{children:t.jsx(B,{label:_("uiStudio.scope","Scope"),tooltip:_("uiStudio.scope.tooltip","Capture scope (full screen or a specific UI).")})}),t.jsx("dd",{children:o.scope}),o.target&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:_("uiStudio.target","Target"),tooltip:_("uiStudio.target.tooltip","Exact path of the captured UI instance.")})}),t.jsx("dd",{children:o.target})]}),o.brief_id&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:_("uiStudio.briefId","Brief"),tooltip:_("uiStudio.briefId.tooltip","Identifier of the design brief that produced this UI.")})}),t.jsx("dd",{children:o.brief_id})]})]})]}),G==="deleteSnapshot"&&t.jsx(le,{title:_("uiStudio.confirm.deleteSnapshotTitle","화면 캡처 삭제"),message:_("uiStudio.confirm.deleteSnapshotMessage","이 화면 캡처 파일만 삭제됩니다 (Studio 인스턴스 보존)."),danger:!0,confirmLabel:_("common.delete","삭제"),onConfirm:M,onClose:()=>k(null)})]})}function ra({detail:e}){const{t:i}=j(),s=Zs(e);return t.jsxs("section",{className:r.drawerAnalysisSummary,children:[t.jsxs("div",{className:r.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:r.drawerAnalysisLabel,children:t.jsx(B,{label:i("uiStudio.analysis.verdictLabel","개선 요약"),tooltip:i("uiStudio.analysis.verdictLabel.tooltip","Overall improvement verdict for this capture.")})}),t.jsx("span",{className:`${r.analysisVerdict} ${r[`analysisVerdict_${s}`]??""}`,children:ea(i,s)}),t.jsx("span",{className:r.drawerAnalysisCounts,children:ta(i,e)})]}),t.jsxs("div",{className:r.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:r.drawerAnalysisLabel,children:t.jsx(B,{label:i("uiStudio.analysis.thresholds","검토 기준"),tooltip:i("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom).")})}),t.jsx("span",{className:r.drawerAnalysisValue,children:e.thresholds_source})]}),t.jsx(na,{summary:e.design_check_summary}),t.jsx(la,{summary:e.design_check_summary}),t.jsx(oa,{summary:e.design_check_summary})]})}function na({summary:e}){const{t:i}=j();if(!e)return null;const s=e.functional_safe===!0?i("uiStudio.functional.checkedScopeSafe","Checked scope safe"):e.functional_safe===!1?i("uiStudio.functional.risk","Risk found"):i("uiStudio.functional.unknown","Unknown"),n=e.responsive_requirement==="required"?i("uiStudio.responsive.required","Required"):e.responsive_requirement==="recommended"?i("uiStudio.responsive.recommended","Recommended"):i("uiStudio.responsive.unknown","Unknown");return t.jsxs("div",{className:r.primaryReadinessBlock,children:[t.jsxs("div",{className:r.readinessSummary,"aria-label":i("uiStudio.readiness.summary","UI readiness"),children:[t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.primaryVisual.label","Primary visual")," · ",ia(i,e.primary_visual_verdict)]}),t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.functional.label","Functional")," · ",s]}),t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.responsive.label","Responsive")," · ",n]}),e.observation_source&&t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.observationSource.label","검사 출처")," · ",e.observation_source==="play_client"?i("uiStudio.observationSource.playClient","Play client"):i("uiStudio.observationSource.edit","Edit")]}),t.jsx("span",{className:`${r.readinessChip} ${e.readiness==="ready"?r.readinessChipReady:r.readinessChipPending}`,children:sa(i,e.readiness)})]}),e.critic_summary&&t.jsxs("p",{className:r.criticSummary,children:[t.jsx("span",{children:i("uiStudio.criticSummary","Critic summary")}),e.critic_summary]})]})}function oa({summary:e}){var s,n;const{t:i}=j();return!e||!((s=e.state_coverage)!=null&&s.length)&&!((n=e.limitations)!=null&&n.length)?null:t.jsxs("div",{className:r.primaryReadinessBlock,children:[e.state_coverage&&e.state_coverage.length>0&&t.jsx("div",{className:r.coverageChips,"aria-label":i("uiStudio.stateCoverage.label","상태별 검토"),children:e.state_coverage.map(l=>t.jsxs("span",{className:r.coverageChip,title:l.reasons.join(", "),children:[l.stateId," · ",l.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):l.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},`${l.stateId}:${l.status}`))}),e.limitations&&e.limitations.length>0&&t.jsx("div",{className:r.coverageChips,"aria-label":i("uiStudio.limitations.label","검토 제한"),children:e.limitations.map(l=>t.jsx("span",{className:r.coverageChip,children:l},l))})]})}function la({summary:e}){const{t:i}=j(),s=e==null?void 0:e.coverage_dimensions;if(!s)return null;const n=[["Structure",s.structure],["Visual",s.visual],["Interaction",s.interaction],["Primary view",s.primary_view_context],["Responsive",s.responsive_viewport]];return t.jsx("div",{className:r.coverageChips,"aria-label":i("uiStudio.analysis.coverageDimensions","검토 범위"),children:n.map(([l,a])=>t.jsxs("span",{className:`${r.coverageChip} ${r[`coverageChip_${a.status}`]??""}`,title:a.reasons.join(", "),children:[l," · ",a.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):a.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},l))})}function ca({items:e,summary:i}){const{t:s}=j();if(e.length===0)return t.jsx("p",{className:r.emptySuggestions,children:(i==null?void 0:i.readiness)==="insufficient_evidence"?s("uiStudio.noSuggestionsIncomplete","제안은 없지만 검토되지 않은 범위가 남아 있습니다."):s("uiStudio.noSuggestions","현재 개선 제안 없음")});const{high:n,medium:l,low:a}=Js(e,s);return t.jsxs("div",{className:r.suggestionsWrap,children:[t.jsx("h3",{children:t.jsx(B,{label:s("uiStudio.designCheckResultsTitle","Design Check suggestions"),tooltip:s("uiStudio.designCheckResultsTitle.tooltip","All improvement suggestions found in this capture.")})}),n.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionHighHeader,children:s("uiStudio.highPrioritySection","우선 검토")}),n.map(o=>t.jsx(Z,{group:o},`h-${o.rule}`))]}),l.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionMediumHeader,children:s("uiStudio.mediumPrioritySection","검토 권장")}),l.map(o=>t.jsx(Z,{group:o},`m-${o.rule}`))]}),a.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionLowHeader,children:s("uiStudio.lowPrioritySection","선택 개선")}),a.map(o=>t.jsx(Z,{group:o},`l-${o.rule}`))]})]})}function Z({group:e}){var o,d,p;const{t:i}=j(),[s,n]=m.useState(e.priority==="priority_high"&&e.items.length<=5),l=e.falsePositiveRatio>=.5&&!!((o=e.fixTemplate)!=null&&o.falsePositiveNote),a=((d=e.fixTemplate)==null?void 0:d.checkLabel)??e.rule;return t.jsxs("div",{className:r.groupCard,children:[t.jsx(y,{text:i("uiStudio.suggestionGroup.tooltip","Suggestions of the same kind grouped together. Click to expand or collapse."),children:t.jsxs("button",{className:r.groupHeader,onClick:()=>n(u=>!u),type:"button",children:[t.jsx("span",{className:r.groupLabel,children:a}),t.jsx(y,{text:i("uiStudio.groupSummary.tooltip","Number of UI elements matching this group."),children:t.jsxs("span",{className:r.groupCount,children:[e.items.length," ",i("uiStudio.groupSummary","items")]})}),t.jsx("span",{className:r.groupChevron,children:s?"▾":"▸"})]})}),s&&t.jsxs("div",{className:r.groupBody,children:[e.fixTemplate&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:r.groupDescription,children:e.fixTemplate.description}),t.jsx("p",{className:r.groupFix,children:e.fixTemplate.howToFix})]}),l&&t.jsx(y,{text:i("uiStudio.falsePositiveWarning.tooltip","This check can produce false positives — verify before applying."),children:t.jsxs("p",{className:r.falsePositive,children:[i("uiStudio.falsePositiveWarning","May contain false positives"),":"," ",(p=e.fixTemplate)==null?void 0:p.falsePositiveNote]})}),t.jsx("ul",{className:r.itemList,children:e.items.map((u,g)=>t.jsx(da,{item:u,group:e},`${u.path}-${g}`))})]})]})}function da({item:e,group:i}){var u;const{t:s}=j(),{trackEvent:n}=q(),[l,a]=m.useState(!1),o=Be(e.path),d=((u=i.fixTemplate)==null?void 0:u.buildUpdateCommand(e))??null,p=async()=>{if(d)try{await navigator.clipboard.writeText(d),n("dashboard_click_event",{click_target:"ui_studio_copy_ai_instruction",page:"ui-studio",tab:"ui_studio_analysis"}),a(!0),setTimeout(()=>a(!1),2e3)}catch{}};return t.jsxs("li",{className:r.suggestionItem,children:[t.jsxs("div",{className:r.suggestionInfo,children:[t.jsx("code",{className:r.pathBreadcrumb,title:`${s("uiStudio.fullPath","Full path")}: ${o.full}`,children:o.breadcrumb}),t.jsxs("span",{className:r.currentValue,children:[t.jsx(y,{text:s("uiStudio.colCurrent.tooltip","The currently applied value."),children:t.jsx("span",{children:s("uiStudio.colCurrent","Current")})}),": ",t.jsx("strong",{children:String(e.actual)})," → ",t.jsx(y,{text:s("uiStudio.colRecommended.tooltip","The recommended value."),children:t.jsx("span",{children:s("uiStudio.colRecommended","Recommended")})}),": ",t.jsx("strong",{children:String(e.expected)})]})]}),d&&t.jsx(y,{text:s("uiStudio.copyFixCommand.tooltip","Copy a prompt that asks the AI to fix this issue."),children:t.jsx("button",{className:r.copyFixBtn,onClick:p,type:"button",children:l?s("uiStudio.copiedToClipboard","Copied"):s("uiStudio.copyFixCommand","Copy AI instruction")})})]})}function ee(e,i){return Object.entries(i).reduce((s,[n,l])=>s.split(`{${n}}`).join(String(l)),e)}function ua(e,i){return i.rule==="contrast"?ee(e("uiStudio.sample.designCheck.contrast","Text contrast is below {expected} (current {actual}). Adjust TextColor3 or BackgroundColor3."),{expected:String(i.expected),actual:String(i.actual)}):i.rule==="touch_target"?ee(e("uiStudio.sample.designCheck.touchTarget","Touch targets should be at least {expected} px (current {actual}). Increase Size or padding."),{expected:String(i.expected),actual:String(i.actual)}):i.rule==="min_text_size"?ee(e("uiStudio.sample.designCheck.minTextSize","TextSize is below {expected} (current {actual}). Increase it for readability."),{expected:String(i.expected),actual:String(i.actual)}):i.hint}const Me="sample_inventory_preview",ae=Xe,pa=[{path:"StarterGui.InventoryGame.Overlay.Modal.Header.GoldBox.Icon",hint:"텍스트 대비 4.5:1 미만 (현재 1.24). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥4.5:1",rule:"contrast",actual:"1.24"},{path:"StarterGui.InventoryGame.Overlay.Modal.Header.CloseBtn",hint:"텍스트 대비 4.5:1 미만 (현재 4.11). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥4.5:1",rule:"contrast",actual:"4.11"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.Portrait.Avatar",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot1.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot2.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot3.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot4.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot5.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot6.EmptyIcon",hint:"텍스트 대비 3.0:1 미만 (현재 2.53). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"2.53"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabAll",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabWeapon",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabArmor",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabConsume",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabMisc",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I1.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I1.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I2.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I3.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I4.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I5.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I6.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I7.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I8.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I9.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I10.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I11.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I12.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I13.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I13.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I14.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I14.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I15.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I15.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I16.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I16.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I17.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I17.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I18.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I19.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I19.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I20.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I20.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.ItemIconBox.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.Rarity",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.StatsBox.Passive",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12}];function ha(e){const n={snapshot_id:Me,captured_at:1776757908,brief_id:null,thresholds_source:"default",scope:"targetPath",target:"StarterGui.InventoryGame",design_check_summary:{priority_high:35,priority_medium:10,priority_low:0},image:{file:"ui-studio-sample.png",width:402,height:252}},l={...n,check_results:pa.map(o=>({...o,hint:ua(e,o)})),image_url:ae};return{list:{placeId:0,snapshots:[n],totalCount:1},detail:l}}const _a=/plugin not connected|sync not started/i;function re(e){return typeof e=="string"&&_a.test(e)}function Ae(){const{t:e}=j();return t.jsxs("section",{className:r.pluginGuideCard,role:"status","aria-live":"polite",children:[t.jsx("div",{className:r.pluginGuideMarker,"aria-hidden":"true",children:"!"}),t.jsxs("div",{className:r.pluginGuideBody,children:[t.jsx("h2",{className:r.pluginGuideTitle,children:e("uiStudio.pluginGuide.title","Roblox Studio 플러그인이 연결되지 않았습니다")}),t.jsx("p",{className:r.pluginGuideMessage,children:e("uiStudio.pluginGuide.message","UI Studio는 연결된 Studio place의 화면 캡처와 변경 이력을 표시합니다. Studio와 WEPPY Plugin을 연결하면 자동으로 갱신됩니다.")}),t.jsxs("ul",{className:r.pluginGuideChecklist,children:[t.jsx("li",{children:e("uiStudio.pluginGuide.check1","Roblox Studio가 실행 중인가요?")}),t.jsx("li",{children:e("uiStudio.pluginGuide.check2","WEPPY Plugin이 설치되어 실행 중인가요?")})]}),t.jsxs("div",{className:r.pluginGuideWaiting,children:[t.jsx("span",{className:r.pluginGuideDot,"aria-hidden":"true"}),e("uiStudio.pluginGuide.waiting","플러그인 연결을 기다리는 중...")]})]})]})}function ma(e){return{review:{id:"review-ui",title:e("uiStudio.emptyGuide.ai.reviewTitle","Review an existing UI"),request:e("uiStudio.emptyGuide.ai.reviewRequest","Inspect both Edit UI and UI created in the Play Client, then identify a screen to review. If there are several candidates, ask me which one to use first. Check text readability, overlapping elements, safe areas, and content outside the screen, then save the evidence in UI Studio. Do not modify the existing UI, and clearly separate semantic runtime observations, available screenshots, required states, and anything you could not verify.")},create:{id:"create-ui",title:e("uiStudio.emptyGuide.ai.createTitle","Create a new UI"),request:e("uiStudio.emptyGuide.ai.createRequest","Create an inventory UI for this game. Check the existing UI and data structure first, and ask me if the required features or visual direction are unclear. Do not overwrite existing UI. Capture and review the finished screen, then save the results in UI Studio.")}}}const ga="_emptyState_13gyl_1",ya="_header_13gyl_11",fa="_method_13gyl_12",Sa="_methodTitle_13gyl_44",xa="_moreExamples_13gyl_57",H={emptyState:ga,header:ya,method:fa,methodTitle:Sa,moreExamples:xa};function $e({kind:e}){const{locale:i,t:s}=j(),n=ma(s),l=e==="analysis",a={copy:s("guidance.ai.copy","Copy request"),copying:s("guidance.ai.copying","Copying…"),copied:s("guidance.ai.copied","Copied"),copyFailed:s("guidance.ai.copyFailed","Could not copy. Select the request text and copy it manually.")};return t.jsxs("section",{className:H.emptyState,children:[t.jsxs("header",{className:H.header,children:[t.jsx("h3",{children:l?s("uiStudio.emptyGuide.analysis.title","Create or review game UI"):s("uiStudio.emptyGuide.history.title","Start a UI task")}),t.jsx("p",{children:l?s("uiStudio.emptyGuide.analysis.description","Ask AI to create or review UI, then inspect the saved screens and findings here."):s("uiStudio.emptyGuide.history.description","When AI creates or changes UI, the change record will appear here.")})]}),t.jsxs("section",{className:H.method,children:[t.jsxs("div",{className:H.methodTitle,children:[t.jsx(rt,{size:16,"aria-hidden":"true"}),t.jsx("h4",{children:s("uiStudio.emptyGuide.ai.title","Ask AI")})]}),t.jsx(pe,{examples:[l?n.review:n.create],resetKey:`${i}|ui-studio-${e}`,labels:a,nextStep:s("guidance.ai.nextStep","Paste this request into an AI chat connected to WEPPY.")}),l&&t.jsxs("details",{className:H.moreExamples,children:[t.jsx("summary",{children:s("uiStudio.emptyGuide.ai.more","Other request examples")}),t.jsx(pe,{examples:[n.create],resetKey:`${i}|ui-studio-create`,labels:a})]})]})]})}function va(e){return((e==null?void 0:e.priority_high)??0)>0||((e==null?void 0:e.priority_medium)??0)>0||((e==null?void 0:e.priority_low)??0)>0}function K(e){return e===null||e.readiness==="insufficient_evidence"}function Le(e){return e.target??e.scope}function Ca(e){const i=Le(e),s=i.split(".").filter(l=>l.length>0),n=s.findIndex(l=>l==="StarterGui");return n>=0&&s[n+1]?["StarterGui",s[n+1]].join("."):i}function Ee(e){return((e==null?void 0:e.priority_high)??0)>0?"needsFix":((e==null?void 0:e.priority_medium)??0)>0||((e==null?void 0:e.priority_low)??0)>0?"review":K(e)?"incomplete":"passed"}function ba(e){return Ee(e.design_check_summary)}function fe(e){return ne(e.design_check_summary)}function ne(e){return((e==null?void 0:e.priority_high)??0)>0?0:((e==null?void 0:e.priority_medium)??0)>0?1:((e==null?void 0:e.priority_low)??0)>0?2:K(e)?3:4}function wa(e){var o;if(e.length===0)return null;if(e.length===1)return((o=e[0])==null?void 0:o.latest.design_check_summary)??null;const i=e.reduce((d,p)=>{const u=p.latest.design_check_summary;d.priority_high+=(u==null?void 0:u.priority_high)??0,d.priority_medium+=(u==null?void 0:u.priority_medium)??0,d.priority_low+=(u==null?void 0:u.priority_low)??0,(u==null?void 0:u.deterministic_status)==="failed"&&(d.deterministic_status="failed"),(u==null?void 0:u.visual_status)==="failed"?d.visual_status="failed":(u==null?void 0:u.visual_status)==="skipped"&&d.visual_status!=="failed"?d.visual_status="skipped":(u==null?void 0:u.visual_status)==="completed"&&d.visual_status==="completed"?d.visual_status="completed":(u==null?void 0:u.visual_status)!=="completed"&&d.visual_status==="completed"&&(d.visual_status="not_requested"),(u==null?void 0:u.coverage)!=="structural_and_visual"&&(d.coverage="structural_only");for(const g of(u==null?void 0:u.skipped_reasons)??[])d.skipped_reasons.add(g);(u==null?void 0:u.readiness)==="insufficient_evidence"?d.readiness="insufficient_evidence":(u==null?void 0:u.readiness)==="review_required"&&d.readiness==="ready"&&(d.readiness="review_required");for(const g of(u==null?void 0:u.viewport_profiles_tested)??[])d.viewport_profiles_tested.add(g);return d},{priority_high:0,priority_medium:0,priority_low:0,deterministic_status:"completed",visual_status:"completed",coverage:"structural_and_visual",skipped_reasons:new Set,readiness:"ready",viewport_profiles_tested:new Set}),s=e.flatMap(d=>d.latest.design_check_summary?[d.latest.design_check_summary]:[]),n=d=>{const p=s.flatMap(h=>{var S;return(S=h.coverage_dimensions)!=null&&S[d]?[h.coverage_dimensions[d]]:[]}),u=p.map(h=>h.status);return{status:u.includes("failed")?"failed":u.length===s.length&&u.every(h=>h==="completed")?"completed":u.length>0&&u.every(h=>h==="not_requested")?"not_requested":"skipped",reasons:Array.from(new Set(p.flatMap(h=>h.reasons)))}},l=s.some(d=>d.coverage_dimensions)?{structure:n("structure"),visual:n("visual"),interaction:n("interaction"),primary_view_context:n("primary_view_context"),responsive_viewport:n("responsive_viewport")}:void 0,a=Array.from(new Set(s.flatMap(d=>d.observation_source?[d.observation_source]:[])));return{priority_high:i.priority_high,priority_medium:i.priority_medium,priority_low:i.priority_low,deterministic_status:i.deterministic_status,visual_status:i.visual_status,coverage:i.coverage,skipped_reasons:[...i.skipped_reasons],readiness:i.readiness,viewport_profiles_tested:[...i.viewport_profiles_tested],coverage_dimensions:l,observation_source:a.length===1?a[0]:void 0,limitations:Array.from(new Set(s.flatMap(d=>d.limitations??[]))),state_coverage:s.flatMap(d=>d.state_coverage??[])}}function ka(e){const i=new Map;for(const l of e){const a=Le(l),o=i.get(a);if(!o){i.set(a,{latest:l,snapshotCount:1});continue}o.snapshotCount+=1,l.captured_at>o.latest.captured_at&&(o.latest=l)}const s=[...i.entries()].map(([l,a])=>({key:l,latest:a.latest,snapshotCount:a.snapshotCount,verdict:ba(a.latest)})),n=new Map;for(const l of s){const a=Ca(l.latest),o=n.get(a)??[];o.push(l),n.set(a,o)}return[...n.entries()].map(([l,a])=>{var u;const o=a.sort((g,h)=>{const S=fe(g.latest)-fe(h.latest);return S!==0?S:h.latest.captured_at-g.latest.captured_at}),d=o.reduce((g,h)=>h.latest.captured_at>g.captured_at?h.latest:g,((u=o[0])==null?void 0:u.latest)??a[0].latest),p=wa(o);return{key:l,latest:d,snapshotCount:o.reduce((g,h)=>g+h.snapshotCount,0),children:o,summary:p,verdict:Ee(p)}}).sort((l,a)=>{const o=ne(l.summary)-ne(a.summary);return o!==0?o:a.latest.captured_at-l.latest.captured_at})}function ja(e){return e.reduce((i,s)=>(va(s.summary)?i.hasSuggestions+=1:s.summary&&(i.noSuggestions+=1),K(s.summary)&&(i.evidenceIncomplete+=1),i),{hasSuggestions:0,evidenceIncomplete:0,noSuggestions:0})}function E(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function oe(e,i){const s=K(i)?` · ${e("uiStudio.analysis.verdict.incomplete","검토 증거 부족")}`:"";return`${e("uiStudio.priorityHigh","우선 검토")} ${E(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${E(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${E(e,(i==null?void 0:i.priority_low)??0)}${s}`}function Se(e){const i=e==null?void 0:e.coverage_dimensions;return i?[["Visual",i.visual],["Interaction",i.interaction],["Primary view",i.primary_view_context],["Responsive",i.responsive_viewport]].flatMap(([s,n])=>typeof n=="object"&&n.status!=="completed"?[s]:[]):[]}function Ia(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function Na(e,i){return i==="ready"?e("uiStudio.readiness.ready","Ready"):i==="review_required"?e("uiStudio.readiness.reviewRequired","Review required"):i==="insufficient_evidence"?e("uiStudio.readiness.insufficient","Evidence incomplete"):e("uiStudio.readiness.unknown","Readiness unknown")}function Pa(e,i,s){const n=s.evidenceIncomplete>0?` · ${V(e,"incomplete")} ${E(e,s.evidenceIncomplete)}`:"";return`${e("uiStudio.analysis.targetCountLabel","분석 대상")} ${E(e,i)} · ${V(e,"needsFix")} ${E(e,s.hasSuggestions)}${n} · ${V(e,"passed")} ${E(e,s.noSuggestions)}`}function xe(e,i){return(i==null?void 0:i.deterministic_status)==="failed"?e("uiStudio.analysis.coverage.deterministicFailed","구조 검사 실패"):(i==null?void 0:i.coverage)==="structural_and_visual"&&i.visual_status==="completed"?e("uiStudio.analysis.coverage.full","구조·시각 검사 완료"):(i==null?void 0:i.visual_status)==="skipped"?e("uiStudio.analysis.coverage.visualSkipped","구조 검사만 완료 · 시각 검사 생략"):(i==null?void 0:i.visual_status)==="failed"?e("uiStudio.analysis.coverage.visualFailed","구조 검사 완료 · 시각 검사 실패"):e("uiStudio.analysis.coverage.structuralOnly","구조 검사만 완료")}function Ta({tier:e}){const{t:i}=j(),{trackEvent:s}=q(),n=e==="basic",l=Re(50),a=m.useRef(null),[o,d]=m.useState(null),[p,u]=m.useState(new Set),[g,h]=m.useState(new Set),[S,f]=m.useState(!1),v=m.useCallback((x,$)=>{const T=o===x;T||(a.current=$??null),d(T?null:x)},[o]),I=m.useCallback(()=>{d(null)},[]),G=m.useCallback(x=>{u($=>{const T=new Set($);return T.has(x)?T.delete(x):T.add(x),T})},[]),k=n?ha(i):null,_=(k==null?void 0:k.list)??l.data,R=n?!1:l.loading,N=m.useCallback(x=>{h($=>{const T=new Set($);return T.has(x)?T.delete(x):T.add(x),T})},[]),C=x=>{h(new Set(x))},P=()=>{h(new Set)},M=async()=>{const x=(_==null?void 0:_.placeId)??0;s("dashboard_click_event",{click_target:"ui_studio_delete_selected_snapshots",page:"ui-studio",tab:"ui_studio_analysis"}),await Ze(x,{ids:[...g]}),await l.refresh(),f(!1),h(new Set)};if(R)return t.jsx("div",{className:r.page,children:i("uiStudio.loading","Loading...")});if(!n&&re(l.error))return t.jsx(Ae,{});if(!n&&l.error)return t.jsxs("div",{className:r.page,children:[i("uiStudio.error","Error"),": ",l.error]});const D=(_==null?void 0:_.snapshots)??[],w=_!==null,b=(_==null?void 0:_.placeId)??0,A=D.map(x=>x.snapshot_id),L=ka(D),Y=ja(L);return t.jsxs("div",{children:[t.jsx("div",{className:r.analysisWorkspace,"data-detail-open":o?"true":"false",children:t.jsxs("div",{className:r.analysisMainColumn,"data-testid":"analysis-main-column",children:[n&&t.jsx("div",{className:r.sampleBanner,children:t.jsxs("div",{className:r.sampleBannerRow,children:[t.jsxs("div",{className:r.sampleBannerMain,children:[t.jsx("div",{className:r.sampleBadge,children:i("uiStudio.sample.badge","Preview of the Pro UI gallery")}),t.jsx("div",{className:r.sampleTitle,children:i("uiStudio.sample.title","You are previewing the UI screenshot gallery that unlocks after upgrading to Pro.")}),t.jsx("div",{className:r.sampleMessage,children:i("uiStudio.sample.message","This preview uses sample data from a demo inventory UI. Real screenshots, review history, and AI-driven fixes unlock with Pro.")})]}),t.jsx("div",{className:r.sampleActions,children:t.jsx("a",{className:r.primaryAction,href:je.uiStudioAnalysis,target:"_blank",rel:"noreferrer",onClick:()=>s("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_analysis_banner",page:"ui-studio",tab:"ui_studio_analysis"}),children:i("tier.upgrade","View Pro")})})]})}),t.jsx("div",{className:r.galleryHeader,children:t.jsx("h2",{children:t.jsx(B,{label:i("uiStudio.title","UI Studio"),tooltip:i("uiStudio.title.tooltip","A central place to review AI-generated UI screens and improvement suggestions.")})})}),D.length===0?w?t.jsx($e,{kind:"analysis"}):t.jsx("div",{className:r.emptyState,children:i("uiStudio.empty.unavailable","UI Studio data is not available yet.")}):t.jsxs(t.Fragment,{children:[t.jsx("section",{className:r.analysisSummaryPanel,children:t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(B,{label:i("uiStudio.analysis.reportsTitle","UI 루트별 최신 분석"),tooltip:i("uiStudio.analysis.reportsTitle.tooltip","Shows the latest capture and suggestion summary per UI (e.g., Inventory window, Main menu).")})}),t.jsx("p",{className:r.analysisSummaryText,children:Pa(i,L.length,Y)})]})}),t.jsx("div",{className:r.analysisReportGrid,"data-testid":"analysis-report-grid",children:L.map(x=>t.jsx(Ba,{report:x,placeId:b,imageUrlOverride:n?ae:void 0,expanded:p.has(x.key),onPrimaryClick:$=>{x.children.length>1?G(x.key):v(x.latest.snapshot_id,$)},onChildClick:($,T)=>v($,T)},x.key))}),t.jsxs("section",{className:r.recentCapturesSection,children:[t.jsxs("div",{className:r.recentCapturesHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(B,{label:i("uiStudio.analysis.recentCapturesTitle","최근 캡처"),tooltip:i("uiStudio.analysis.recentCapturesTitle.tooltip","All recently saved captures in chronological order.")})}),t.jsxs("p",{className:r.recentCapturesMeta,children:[i("uiStudio.storage.snapshotCount","화면 캡처")," ",E(i,D.length)]})]}),!n&&D.length>0&&t.jsxs("div",{className:r.captureSelectionActions,children:[t.jsx(y,{text:i("uiStudio.gallery.selectAll.tooltip","Select every visible capture at once."),children:t.jsx("button",{className:r.selectionBarBtn,onClick:()=>C(A),type:"button",children:i("uiStudio.gallery.selectAll","모두 선택")})}),g.size>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:r.selectionToolbarCount,children:[g.size,i("uiStudio.gallery.selection.selectedCount"," selected")]}),t.jsx(y,{text:i("uiStudio.gallery.clearSelection.tooltip","Clear the current selection."),children:t.jsx("button",{className:r.selectionBarBtn,onClick:P,type:"button",children:i("uiStudio.gallery.clearSelection","선택 해제")})}),t.jsx(y,{text:i("uiStudio.gallery.deleteSelected.tooltip","Delete only the selected capture files. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${r.selectionBarBtn} ${r.selectionBarBtnDanger}`,onClick:()=>f(!0),type:"button",children:i("common.delete","삭제")})})]})]})]}),t.jsx("div",{className:r.grid,children:D.map(x=>t.jsx(Fs,{snapshot:x,placeId:b,onClick:$=>v(x.snapshot_id,$),imageUrlOverride:n?ae:void 0,selectable:!n,selected:g.has(x.snapshot_id),onToggleSelect:N},x.snapshot_id))})]})]})]})}),t.jsx(it,{open:o!==null,ariaLabel:i("uiStudio.analysis.detailDialog","Analysis detail"),onClose:I,returnFocusTo:a.current,testId:"analysis-detail-popup-layer",children:o&&t.jsx(aa,{snapshotId:o,placeId:b,onClose:I,sampleDetail:n&&o===Me?(k==null?void 0:k.detail)??null:null,tier:e,onActionDone:n?void 0:l.refresh})}),S&&t.jsx(le,{title:i("uiStudio.confirm.deleteBatchTitle","화면 캡처 일괄 삭제"),message:i("uiStudio.confirm.deleteBatchMessage",`선택한 ${g.size}개의 화면 캡처를 삭제합니다. 이 작업은 되돌릴 수 없습니다.`),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:M,onClose:()=>f(!1)})]})}function V(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):i==="incomplete"?e("uiStudio.analysis.verdict.incomplete","검토 증거 부족"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function Ra(e,i){if(((i==null?void 0:i.priority_high)??0)>0||((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0){if((i==null?void 0:i.readiness)==="insufficient_evidence"){const s=Se(i);return s.length>0?`${e("uiStudio.analysis.remainingReview","남은 검토")}: ${s.join(", ")}`:e("uiStudio.analysis.issueSummary.incomplete","검토 증거가 더 필요합니다.")}return oe(e,i)}if((i==null?void 0:i.readiness)==="insufficient_evidence"){const s=Se(i);return s.length>0?`${e("uiStudio.analysis.remainingReview","남은 검토")}: ${s.join(", ")}`:e("uiStudio.analysis.issueSummary.incomplete","검토 증거가 더 필요합니다.")}return e("uiStudio.analysis.issueSummary.passed","현재 검토 기준에서 추가 개선 제안은 없습니다.")}function Ba({report:e,placeId:i,imageUrlOverride:s,expanded:n,onPrimaryClick:l,onChildClick:a}){var S;const{t:o}=j(),d=e.latest,p=s??Te(d.snapshot_id,i),u=new Date(d.captured_at*1e3).toLocaleString(),g=V(o,e.verdict),h=e.children.length>1;return t.jsxs("div",{className:r.analysisReportGroup,children:[t.jsxs("button",{className:r.analysisReportCard,"aria-expanded":h?n:void 0,"aria-label":`${e.key} ${h?o("uiStudio.analysis.expandChildren","하위 대상 보기"):o("uiStudio.analysis.openDetail","상세 보기")}`,onClick:f=>l(f.currentTarget),type:"button",children:[d.image?t.jsx("img",{className:r.analysisReportThumb,src:p,alt:d.snapshot_id,loading:"lazy"}):t.jsx("div",{className:`${r.analysisReportThumb} ${r.runtimeObservationPlaceholder}`,role:"img","aria-label":o("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:o("uiStudio.runtimeStructureObservation","Runtime structure observation")}),t.jsxs("div",{className:r.analysisReportBody,children:[t.jsxs("div",{className:r.analysisReportTopline,children:[t.jsx(y,{text:e.verdict==="passed"?o("uiStudio.analysis.verdict.passed.tooltip","No improvements suggested under the current review thresholds."):o("uiStudio.analysis.verdict.hasSuggestions.tooltip","Some improvements were found in this UI. Click the card for details."),children:t.jsx("span",{className:`${r.analysisVerdict} ${r[`analysisVerdict_${e.verdict}`]??""}`,children:g})}),t.jsx(y,{text:o("uiStudio.analysis.counts.tooltip","Shows how many suggestions are marked review first, recommended, or optional."),children:t.jsx("span",{className:r.analysisReportCounts,children:oe(o,e.summary)})})]}),t.jsx("div",{className:r.analysisReportTarget,children:e.key}),((S=e.summary)==null?void 0:S.readiness)==="insufficient_evidence"&&e.verdict!=="incomplete"&&t.jsx("div",{className:r.analysisReportIssue,children:o("uiStudio.analysis.verdict.incomplete","검토 증거 부족")}),t.jsx(Ga,{summary:e.summary}),t.jsx("div",{className:r.analysisReportIssue,children:Ra(o,e.summary)}),t.jsx("div",{className:r.analysisReportCoverage,children:xe(o,e.summary)}),t.jsx(Da,{summary:e.summary}),t.jsxs("div",{className:r.analysisReportMeta,children:[u," ·"," ",t.jsx(y,{text:o("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom)."),children:t.jsx("span",{children:o("uiStudio.analysis.thresholds","검토 기준")})}),": ",d.thresholds_source,e.snapshotCount>1?` · ${o("uiStudio.analysis.captureLabel","캡처")} ${E(o,e.snapshotCount)}`:"",h?` · ${o("uiStudio.analysis.childTargets","하위 대상")} ${E(o,e.children.length)}`:""]})]})]}),h&&n&&t.jsx("div",{className:r.analysisChildList,children:e.children.map(f=>t.jsxs("button",{className:r.analysisChildRow,onClick:v=>a(f.latest.snapshot_id,v.currentTarget),type:"button",children:[t.jsx("span",{className:r.analysisChildPath,children:f.key}),t.jsx("span",{className:r.analysisChildSummary,children:oe(o,f.latest.design_check_summary)}),t.jsx("span",{className:r.analysisChildSummary,children:xe(o,f.latest.design_check_summary)}),t.jsx("span",{className:r.analysisChildDetailHint,children:o("uiStudio.analysis.childDetailHint","하위 대상 상세 보기")})]},f.key))})]})}function Ga({summary:e}){const{t:i}=j();if(!e)return null;const s=e.functional_safe===!0?i("uiStudio.functional.checkedScopeSafe","Checked scope safe"):e.functional_safe===!1?i("uiStudio.functional.risk","Risk found"):i("uiStudio.functional.unknown","Unknown"),n=e.responsive_requirement==="required"?i("uiStudio.responsive.required","Required"):e.responsive_requirement==="recommended"?i("uiStudio.responsive.recommended","Recommended"):i("uiStudio.responsive.unknown","Unknown");return t.jsxs("div",{className:r.readinessSummary,"aria-label":i("uiStudio.readiness.summary","UI readiness"),children:[t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.primaryVisual.label","Primary visual")," · ",Ia(i,e.primary_visual_verdict)]}),t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.functional.label","Functional")," · ",s]}),t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.responsive.label","Responsive")," · ",n]}),e.observation_source&&t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.observationSource.label","검사 출처")," · ",e.observation_source==="play_client"?i("uiStudio.observationSource.playClient","Play client"):i("uiStudio.observationSource.edit","Edit")]}),t.jsx("span",{className:`${r.readinessChip} ${e.readiness==="ready"?r.readinessChipReady:r.readinessChipPending}`,children:Na(i,e.readiness)})]})}function Da({summary:e}){const{t:i}=j(),s=e==null?void 0:e.coverage_dimensions;if(!s)return null;const n=[["Structure",s.structure],["Visual",s.visual],["Interaction",s.interaction],["Primary view",s.primary_view_context],["Responsive",s.responsive_viewport]];return t.jsx("div",{className:r.coverageChips,"aria-label":i("uiStudio.analysis.coverageDimensions","검토 범위"),children:n.map(([l,a])=>t.jsxs("span",{className:`${r.coverageChip} ${r[`coverageChip_${a.status}`]??""}`,title:a.reasons.join(", "),children:[l," · ",a.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):a.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},l))})}function Ma(e,i,s=1e4){const[n,l]=m.useState(null),[a,o]=m.useState(!0),[d,p]=m.useState(null),u=JSON.stringify(i),g=m.useCallback(async()=>{if(e===null){l(null),p(null),o(!1);return}try{const h=await de(e,i);l(h),p(null)}catch(h){p(h.message)}finally{o(!1)}},[e,u]);return m.useEffect(()=>{let h=!0;if(e===null)return l(null),p(null),o(!1),()=>{h=!1};const S=async()=>{try{const v=await de(e,i);h&&(l(v),p(null))}catch(v){h&&p(v.message)}finally{h&&o(!1)}};S();const f=setInterval(()=>{S()},s);return()=>{h=!1,clearInterval(f)}},[e,u,s]),{data:n,loading:a,error:d,refresh:g}}const Aa="_filterBar_1203k_4",$a="_filterGroup_1203k_14",La="_filterLabel_1203k_21",Ea="_filterCheckbox_1203k_28",qa="_segmentGroup_1203k_45",Ua="_segmentBtn_1203k_55",Oa="_segmentBtnActive_1203k_73",Ha="_filterInput_1203k_79",Fa="_filterResetBtn_1203k_95",za="_requestRow_1203k_114",Va="_requestRowMain_1203k_127",Wa="_requestDetailToggle_1203k_134",Ka="_thumbPair_1203k_156",Ya="_thumbPairButton_1203k_164",Qa="_thumbSlot_1203k_179",Ja="_thumbImg_1203k_204",Xa="_thumbPlaceholder_1203k_211",Za="_thumbArrow_1203k_219",er="_extraPathsBadge_1203k_225",tr="_requestMeta_1203k_239",ir="_requestLabel_1203k_247",sr="_requestTime_1203k_256",ar="_requestStats_1203k_261",rr="_statDot_1203k_269",nr="_summaryPill_1203k_273",or="_requestReadiness_1203k_277",lr="_requestReadinessPill_1203k_283",cr="_requestReadinessReady_1203k_297",dr="_requestReadinessPending_1203k_303",ur="_requestActions_1203k_310",pr="_expandHint_1203k_317",hr="_mutationsArea_1203k_330",_r="_mutLoading_1203k_339",mr="_mutEmpty_1203k_340",gr="_mutError_1203k_346",yr="_mutationRow_1203k_352",fr="_mutationLine_1203k_362",Sr="_mutTs_1203k_369",xr="_mutCommand_1203k_375",vr="_mutPath_1203k_381",Cr="_mutDiff_1203k_391",br="_mutErr_1203k_346",wr="_changeDetails_1203k_406",kr="_changeDetailRow_1203k_414",jr="_changeDetailRowNoBefore_1203k_423",Ir="_changeDetailBadge_1203k_427",Nr="_changeDetail_text_1203k_444",Pr="_changeDetail_color_1203k_449",Tr="_changeDetail_size_1203k_454",Rr="_changeDetail_layout_1203k_459",Br="_changeDetail_state_1203k_464",Gr="_changeDetail_asset_1203k_469",Dr="_changeDetail_property_1203k_474",Mr="_changeDetailProperty_1203k_478",Ar="_changeDetailArrow_1203k_486",$r="_changeDetailOldValue_1203k_492",Lr="_changeDetailNewValue_1203k_493",Er="_compareDialogLayer_1203k_511",qr="_compareDialog_1203k_511",Ur="_beforeAfterDrawer_1203k_542",Or="_drawerHeader_1203k_552",Hr="_drawerTitle_1203k_561",Fr="_drawerCloseBtn_1203k_569",zr="_drawerBody_1203k_585",Vr="_pathTabs_1203k_592",Wr="_pathTab_1203k_592",Kr="_pathTabActive_1203k_621",Yr="_comparePanel_1203k_627",Qr="_compareHalf_1203k_637",Jr="_compareLabel_1203k_644",Xr="_compareImg_1203k_655",Zr="_comparePlaceholder_1203k_663",en="_compareDetailsPanel_1203k_675",tn="_compareDetailsHeader_1203k_684",sn="_drawerFooter_1203k_702",an="_drawerActionBtn_1203k_710",rn="_historyTabWrap_1203k_728",nn="_historyWorkspace_1203k_734",on="_historyMainColumn_1203k_739",ln="_requestList_1203k_743",cn="_emptyHistory_1203k_748",dn="_historyError_1203k_758",un="_historyLoading_1203k_764",pn="_listHeader_1203k_772",hn="_listHeaderTitle_1203k_781",_n="_clearBtn_1203k_788",mn="_deleteErrBanner_1203k_812",c={filterBar:Aa,filterGroup:$a,filterLabel:La,filterCheckbox:Ea,segmentGroup:qa,segmentBtn:Ua,segmentBtnActive:Oa,filterInput:Ha,filterResetBtn:Fa,requestRow:za,requestRowMain:Va,requestDetailToggle:Wa,thumbPair:Ka,thumbPairButton:Ya,thumbSlot:Qa,thumbImg:Ja,thumbPlaceholder:Xa,thumbArrow:Za,extraPathsBadge:er,requestMeta:tr,requestLabel:ir,requestTime:sr,requestStats:ar,statDot:rr,summaryPill:nr,requestReadiness:or,requestReadinessPill:lr,requestReadinessReady:cr,requestReadinessPending:dr,requestActions:ur,expandHint:pr,mutationsArea:hr,mutLoading:_r,mutEmpty:mr,mutError:gr,mutationRow:yr,mutationLine:fr,mutTs:Sr,mutCommand:xr,mutPath:vr,mutDiff:Cr,mutErr:br,changeDetails:wr,changeDetailRow:kr,changeDetailRowNoBefore:jr,changeDetailBadge:Ir,changeDetail_text:Nr,changeDetail_color:Pr,changeDetail_size:Tr,changeDetail_layout:Rr,changeDetail_state:Br,changeDetail_asset:Gr,changeDetail_property:Dr,changeDetailProperty:Mr,changeDetailArrow:Ar,changeDetailOldValue:$r,changeDetailNewValue:Lr,compareDialogLayer:Er,compareDialog:qr,beforeAfterDrawer:Ur,drawerHeader:Or,drawerTitle:Hr,drawerCloseBtn:Fr,drawerBody:zr,pathTabs:Vr,pathTab:Wr,pathTabActive:Kr,comparePanel:Yr,compareHalf:Qr,compareLabel:Jr,compareImg:Xr,comparePlaceholder:Zr,compareDetailsPanel:en,compareDetailsHeader:tn,drawerFooter:sn,drawerActionBtn:an,historyTabWrap:rn,historyWorkspace:nn,historyMainColumn:on,requestList:ln,emptyHistory:cn,historyError:dn,historyLoading:un,listHeader:pn,listHeaderTitle:hn,clearBtn:_n,deleteErrBanner:mn};function gn(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function ve(e){return e==null?"nil":typeof e=="string"?`"${e}"`:typeof e=="object"?JSON.stringify(e):String(e)}function qe({mutations:e,emptyLabel:i}){const{t:s}=j();return e.length===0?t.jsx("div",{className:c.mutEmpty,children:i??s("uiStudio.history.row.mutationsEmpty","No change details")}):t.jsx(t.Fragment,{children:e.map(n=>t.jsx(yn,{mutation:n},n.mutationId))})}function yn({mutation:e}){return t.jsxs("div",{className:c.mutationRow,children:[t.jsxs("div",{className:c.mutationLine,children:[t.jsx("span",{className:c.mutTs,children:gn(e.ts)}),t.jsx("span",{className:c.mutCommand,children:e.command}),e.targetPath&&t.jsx("span",{className:c.mutPath,children:e.targetPath}),e.diffSummary&&t.jsx("span",{className:c.mutDiff,children:e.diffSummary})]}),e.changeDetails&&e.changeDetails.length>0&&t.jsx("div",{className:c.changeDetails,children:e.changeDetails.map(i=>t.jsx(fn,{detail:i},`${i.property}:${i.category}`))}),!e.ok&&e.error&&t.jsx("span",{className:c.mutErr,children:e.error})]})}function fn({detail:e}){const i=Object.prototype.hasOwnProperty.call(e,"before");return t.jsxs("div",{className:`${c.changeDetailRow} ${i?"":c.changeDetailRowNoBefore}`,children:[t.jsx("span",{className:`${c.changeDetailBadge} ${c[`changeDetail_${e.category}`]??""}`,children:e.label}),t.jsx("span",{className:c.changeDetailProperty,children:e.property}),i&&t.jsx("span",{className:c.changeDetailOldValue,children:ve(e.before)}),t.jsx("span",{className:c.changeDetailArrow,children:"→"}),t.jsx("span",{className:c.changeDetailNewValue,children:ve(e.after)})]})}function Ce(e,i){return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function Sn(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function xn(e){if(!e)return null;const i=e.split(/[./]/).filter(n=>n.length>0);if(i.length===0)return null;const s=i.findIndex(n=>n==="StarterGui");return s>=0&&i[s+1]?i[s+1]:i[i.length-1]??null}function te(e,i){if(i.label)return i.label;const s=xn(i.affectedPaths[0]);if(s){const n=i.mutationCount===1?"uiStudio.history.row.pathLabelOne":"uiStudio.history.row.pathLabelMany",l=i.mutationCount===1?"{path} · {n} change detail":"{path} · {n} change details";return e(n,l).replace("{path}",s).replace("{n}",String(i.mutationCount))}return e("uiStudio.history.row.toolLabel","UI changes ({n})").replace("{n}",String(i.mutationCount))}function ie(e,i){return`${i}${e("uiStudio.storage.countSuffix","")}`}function vn(e,i){if(!i)return null;const s=[i.style_family,i.layout_family,i.device_policy,i.safe_area_policy].filter(n=>typeof n=="string"&&n.length>0);return s.length===0?null:`${e("uiStudio.history.row.qualityPlan","Design direction")}: ${s.join(" · ")}`}function Cn(e,i,s){if(!i)return null;if(i.source==="unavailable")return e("uiStudio.history.row.designCheckUnavailable","Suggestions: unavailable");if(s==="insufficient_evidence"||i.readiness==="insufficient_evidence")return e("uiStudio.history.row.readinessIncomplete","Readiness: evidence incomplete");if(i.total===0)return e("uiStudio.history.row.designCheckNone","Suggestions: none");const n=`${e("uiStudio.priorityHigh","Priority")} ${ie(e,i.priority_high)}`,l=`${e("uiStudio.priorityMedium","Recommended")} ${ie(e,i.priority_medium)}`,a=`${e("uiStudio.priorityLow","Optional")} ${ie(e,i.priority_low)}`;return`${e("uiStudio.history.row.designCheck","Suggestions")}: ${n} · ${l} · ${a}`}function bn(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function Ue({req:e,placeId:i,onOpenCompare:s,imageUrlOverride:n,sampleMutations:l}){const{t:a}=j(),[o,d]=m.useState(!1),[p,u]=m.useState(null),[g,h]=m.useState(!1),[S,f]=m.useState(null),v=n!=null,I=e.affectedPaths[0]??null,G=e.affectedPaths.length-1,k=I?e.beforeSnapshots[I]??null:null,_=I?e.afterSnapshots[I]??null:null,R=k?v?n:Ce(k,i):null,N=_?v?n:Ce(_,i):null,C=vn(a,e.qualityPlanSummary),P=Cn(a,e.postChangeDesignCheckSummary,e.readiness),M=e.postChangeDesignCheckSummary,D=async()=>{if(!o&&p===null)if(v&&l!=null)u(l);else{h(!0),f(null);try{const w=await Ie(i,e.requestId);u(w.mutations)}catch(w){f(w.message)}finally{h(!1)}}d(w=>!w)};return t.jsxs("div",{className:c.requestRow,children:[t.jsxs("div",{className:c.requestRowMain,children:[t.jsx(y,{text:a("uiStudio.history.row.compare.tooltip","Compare the before and after screens. Click to open the full comparison view."),children:t.jsxs("button",{className:`${c.thumbPair} ${c.thumbPairButton}`,onClick:w=>s(w.currentTarget),disabled:!I,"aria-label":`${te(a,e)} ${a("uiStudio.history.row.compare","Before / After")}`,type:"button",children:[t.jsx("div",{className:c.thumbSlot,children:R?t.jsx("img",{className:c.thumbImg,src:R,alt:a("uiStudio.compare.before","Before"),loading:"lazy"}):t.jsx(y,{text:a("uiStudio.history.row.noBeforeState.tooltip","No capture saved before this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:a("uiStudio.history.row.noBeforeState","이전 없음")})})}),t.jsx("span",{className:c.thumbArrow,children:"→"}),t.jsx("div",{className:c.thumbSlot,children:N?t.jsx("img",{className:c.thumbImg,src:N,alt:a("uiStudio.compare.after","After"),loading:"lazy"}):t.jsx(y,{text:a("uiStudio.history.row.noAfterState.tooltip","No capture saved after this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:a("uiStudio.history.row.noAfterState","이후 없음")})})}),G>0&&t.jsx(y,{text:a("uiStudio.history.row.extraPaths.tooltip","Number of additional UIs changed in this action."),children:t.jsxs("span",{className:c.extraPathsBadge,children:["+",G]})})]})}),t.jsxs("button",{className:c.requestDetailToggle,type:"button","aria-expanded":o,"aria-label":`${te(a,e)} ${a("uiStudio.history.row.toggleDetails","Toggle change details")}`,onClick:()=>void D(),children:[t.jsxs("span",{className:c.requestMeta,children:[t.jsx("span",{className:c.requestLabel,children:te(a,e)}),t.jsx("span",{className:c.requestTime,children:Sn(e.startedAt)}),t.jsxs("span",{className:c.requestStats,children:[t.jsx(y,{text:a("uiStudio.history.row.affectedPaths.tooltip","Number of UIs affected by this action."),children:t.jsxs("span",{children:[a("uiStudio.history.row.affectedPaths","Paths")," ",e.affectedPaths.length,a("uiStudio.storage.countSuffix","")]})}),t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:a("uiStudio.history.row.mutations.tooltip","Number of detailed changes (e.g., property edits)."),children:t.jsxs("span",{children:[a("uiStudio.history.row.mutations","Change details")," ",e.mutationCount,a("uiStudio.storage.countSuffix","")]})}),C&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:a("uiStudio.history.row.qualityPlan.tooltip","Brief design direction used for this change."),children:t.jsx("span",{className:c.summaryPill,children:C})})]}),P&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:a("uiStudio.history.row.designCheck.tooltip","Post-change Design Check suggestion summary."),children:t.jsx("span",{className:c.summaryPill,children:P})})]})]}),M&&t.jsxs("span",{className:c.requestReadiness,"aria-label":a("uiStudio.readiness.summary","UI readiness"),children:[t.jsx("span",{className:c.requestReadinessPill,children:bn(a,M.primary_visual_verdict)}),t.jsx("span",{className:c.requestReadinessPill,children:M.functional_safe===!0?a("uiStudio.functional.safeCompact","Functional safe"):M.functional_safe===!1?a("uiStudio.functional.riskCompact","Functional risk"):a("uiStudio.functional.unknownCompact","Functional unknown")}),t.jsx("span",{className:c.requestReadinessPill,children:M.responsive_requirement==="required"?a("uiStudio.responsive.requiredCompact","Responsive required"):M.responsive_requirement==="recommended"?a("uiStudio.responsive.recommendedCompact","Responsive recommended"):a("uiStudio.responsive.unknownCompact","Responsive unknown")}),M.readiness==="ready"&&t.jsx("span",{className:`${c.requestReadinessPill} ${c.requestReadinessReady}`,children:a("uiStudio.readiness.ready","Ready")}),M.readiness==="review_required"&&t.jsx("span",{className:`${c.requestReadinessPill} ${c.requestReadinessPending}`,children:a("uiStudio.readiness.reviewRequired","Review required")})]})]}),t.jsx("span",{className:c.requestActions,children:t.jsx(y,{text:a("uiStudio.history.row.toggleDetails.tooltip","Show or hide a per-line breakdown of what changed."),children:t.jsx("span",{className:c.expandHint,children:o?a("uiStudio.history.row.collapseDetails","Hide change details"):a("uiStudio.history.row.expandDetails","Show {n} change details").replace("{n}",String(e.mutationCount))})})})]})]}),o&&t.jsxs("div",{className:c.mutationsArea,children:[g&&t.jsx("div",{className:c.mutLoading,children:a("uiStudio.history.loading","로딩 중...")}),S&&t.jsx("div",{className:c.mutError,children:S}),p&&t.jsx(qe,{mutations:p,emptyLabel:a("uiStudio.history.row.mutationsEmpty","No change details")})]})]})}function be(e,i){return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function Oe({requestId:e,placeId:i,onClose:s,imageUrlOverride:n,sampleDetail:l}){const{t:a}=j(),o=m.useRef(null),d=l!=null,[p,u]=m.useState(d?l:null),[g,h]=m.useState(!d),[S,f]=m.useState(null),[v,I]=m.useState(d&&l.affectedPaths.length>0?l.affectedPaths[0]:null);m.useEffect(()=>{var C;(C=o.current)==null||C.focus()},[]),m.useEffect(()=>{const C=P=>{P.key==="Escape"&&(P.preventDefault(),s())};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[s]),m.useEffect(()=>{if(d)return;let C=!0;return h(!0),f(null),Ie(i,e).then(P=>{C&&(u(P),P.affectedPaths.length>0&&I(P.affectedPaths[0]))}).catch(P=>{C&&f(P.message)}).finally(()=>{C&&h(!1)}),()=>{C=!1}},[e,i,d]);const G=v&&p?p.beforeSnapshots[v]??null:null,k=v&&p?p.afterSnapshots[v]??null:null,_=G?n??be(G,i):null,R=k?n??be(k,i):null,N=a("uiStudio.history.row.compare","전후 비교");return t.jsx("div",{className:c.compareDialogLayer,"data-testid":"history-compare-dialog-layer",onClick:s,role:"presentation",children:t.jsx("section",{ref:o,className:c.compareDialog,role:"dialog","aria-modal":"true","aria-label":N,tabIndex:-1,onClick:C=>C.stopPropagation(),children:t.jsxs("div",{className:c.beforeAfterDrawer,children:[t.jsxs("div",{className:c.drawerHeader,children:[t.jsx("h2",{className:c.drawerTitle,children:N}),t.jsx("button",{className:c.drawerCloseBtn,onClick:s,type:"button",children:a("uiStudio.history.drawer.close","닫기")})]}),g&&t.jsx("div",{className:c.drawerBody,children:a("uiStudio.history.loading","로딩 중...")}),S&&t.jsx("div",{className:c.drawerBody,children:t.jsx("span",{className:c.mutErr,children:S})}),!g&&!S&&p&&t.jsxs(t.Fragment,{children:[p.affectedPaths.length>0&&t.jsx("div",{className:c.pathTabs,role:"tablist",children:p.affectedPaths.map(C=>t.jsx(y,{text:`${a("uiStudio.compare.path.tooltip","The UI instance path for this screen.")} ${C}`,children:t.jsx("button",{role:"tab","aria-selected":v===C,className:`${c.pathTab} ${v===C?c.pathTabActive:""}`,onClick:()=>I(C),type:"button",children:C.split("/").pop()??C})},C))}),t.jsxs("div",{className:c.comparePanel,children:[t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:a("uiStudio.compare.before.tooltip","The screen saved just before AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:a("uiStudio.compare.before","Before")})}),_?t.jsx("img",{className:c.compareImg,src:_,alt:a("uiStudio.compare.before","Before")}):t.jsx("div",{className:c.comparePlaceholder,children:a("uiStudio.history.row.noBeforeState","이전 상태 없음")})]}),t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:a("uiStudio.compare.after.tooltip","The screen saved just after AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:a("uiStudio.compare.after","After")})}),R?t.jsx("img",{className:c.compareImg,src:R,alt:a("uiStudio.compare.after","After")}):t.jsx("div",{className:c.comparePlaceholder,children:a("uiStudio.history.row.noAfterState","이후 상태 없음")})]})]}),t.jsxs("section",{className:c.compareDetailsPanel,children:[t.jsx("div",{className:c.compareDetailsHeader,children:a("uiStudio.history.drawer.changeDetails","Change details")}),t.jsx(qe,{mutations:p.mutations,emptyLabel:a("uiStudio.history.row.mutationsEmpty","No change details")})]})]}),t.jsx("div",{className:c.drawerFooter,children:t.jsx("button",{className:c.drawerActionBtn,onClick:s,type:"button",children:a("uiStudio.history.drawer.close","닫기")})})]})})})}function z(e){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999);return{start:i,end:s}}function we(e,i){const s=e.split("-").map(Number);if(s.length!==3||s.some(o=>Number.isNaN(o)))return;const[n,l,a]=s;return new Date(n,l-1,a,i?23:0,i?59:0,i?59:0,i?999:0).toISOString()}function wn(e){const i={limit:50};if(e.action!=="all"&&(i.action=e.action),e.datePreset==="custom"){const s=e.from?we(e.from,!1):void 0,n=e.to?we(e.to,!0):void 0;s&&(i.from=s),n&&(i.to=n)}else if(e.datePreset!=="all"){const s=new Date;if(e.datePreset==="today"){const{start:n,end:l}=z(s);i.from=n.toISOString(),i.to=l.toISOString()}else if(e.datePreset==="yesterday"){const n=new Date(s);n.setDate(n.getDate()-1);const{start:l,end:a}=z(n);i.from=l.toISOString(),i.to=a.toISOString()}else{const n=e.datePreset==="7d"?6:29,l=new Date(s);l.setDate(l.getDate()-n);const{start:a}=z(l),{end:o}=z(s);i.from=a.toISOString(),i.to=o.toISOString()}}return i}function He(){return{action:"all",datePreset:"all"}}function kn(e){return e.action==="all"&&e.datePreset==="all"&&e.from===void 0&&e.to===void 0}function jn(){const{t:e}=j(),{trackEvent:i}=q(),s=et(e),[n,l]=m.useState(null),a=n?s.requests.find(p=>p.requestId===n)??null:null,o=m.useCallback((p,u)=>{l(p)},[]),d=m.useCallback(()=>{l(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[t.jsx("div",{className:r.sampleBanner,children:t.jsxs("div",{className:r.sampleBannerRow,children:[t.jsxs("div",{className:r.sampleBannerMain,children:[t.jsx("div",{className:r.sampleBadge,children:e("uiStudio.history.sample.bannerBadge","Preview of the Pro change history")}),t.jsx("div",{className:r.sampleTitle,children:e("uiStudio.history.sample.bannerTitle","You are previewing the UI change history that unlocks after upgrading to Pro.")}),t.jsx("div",{className:r.sampleMessage,children:e("uiStudio.history.sample.bannerMessage","This preview uses sample data. Real change history, before/after comparison, and batch delete unlock with Pro.")})]}),t.jsx("div",{className:r.sampleActions,children:t.jsx("a",{className:r.primaryAction,href:je.uiStudioHistory,target:"_blank",rel:"noreferrer",title:e("uiStudio.history.sample.tooltip","Full history is available with Pro"),onClick:()=>i("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_history_banner",page:"ui-studio",tab:"ui_studio_history"}),children:e("tier.upgrade","View Pro")})})]})}),t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":n?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx("div",{className:c.listHeader,children:t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(B,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})})}),t.jsx("div",{className:c.requestList,children:s.requests.map(p=>t.jsx(Ue,{req:p,placeId:0,onOpenCompare:u=>o(p.requestId,u),imageUrlOverride:ue,sampleMutations:s.mutationsByRequest[p.requestId]},p.requestId))})]}),n&&a&&t.jsx(Oe,{requestId:n,placeId:0,onClose:d,imageUrlOverride:ue,sampleDetail:{...a,mutations:s.mutationsByRequest[a.requestId]??[]}})]})]})}function In({filter:e,onChange:i}){const{t:s}=j(),n=[{value:"all",label:s("uiStudio.history.filter.actionAll","All"),tooltip:s("uiStudio.history.filter.actionAll.tooltip","Show every kind of action.")},{value:"create_tree",label:s("uiStudio.history.filter.actionCreate","Create"),tooltip:s("uiStudio.history.filter.actionCreate.tooltip","Show only actions that created a new UI.")},{value:"update",label:s("uiStudio.history.filter.actionUpdate","Update"),tooltip:s("uiStudio.history.filter.actionUpdate.tooltip","Show only actions that updated an existing UI.")},{value:"delete",label:s("uiStudio.history.filter.actionDelete","Delete"),tooltip:s("uiStudio.history.filter.actionDelete.tooltip","Show only actions that deleted a UI.")}],l=[{value:"all",label:s("uiStudio.history.filter.dateAll","All"),tooltip:s("uiStudio.history.filter.dateAll.tooltip","Show the full history.")},{value:"today",label:s("uiStudio.history.filter.today","Today"),tooltip:s("uiStudio.history.filter.today.tooltip","Show only changes from today.")},{value:"yesterday",label:s("uiStudio.history.filter.yesterday","Yesterday"),tooltip:s("uiStudio.history.filter.yesterday.tooltip","Show only changes from yesterday.")},{value:"7d",label:s("uiStudio.history.filter.last7Days","Last 7 days"),tooltip:s("uiStudio.history.filter.last7Days.tooltip","Show changes from the last 7 days.")},{value:"30d",label:s("uiStudio.history.filter.last30Days","Last 30 days"),tooltip:s("uiStudio.history.filter.last30Days.tooltip","Show changes from the last 30 days.")},{value:"custom",label:s("uiStudio.history.filter.customRange","Custom range"),tooltip:s("uiStudio.history.filter.customRange.tooltip","Pick a custom start and end date.")}];return t.jsxs("div",{className:c.filterBar,children:[t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(B,{label:s("uiStudio.history.filter.actions","작업 유형"),tooltip:s("uiStudio.history.filter.actions.tooltip","Filter records by the kind of change AI made.")})}),t.jsx("div",{className:c.segmentGroup,children:n.map(a=>t.jsx(y,{text:a.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.action===a.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,action:a.value}),"aria-pressed":e.action===a.value,type:"button",children:a.label})},a.value))})]}),t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(B,{label:s("uiStudio.history.filter.period","Period"),tooltip:s("uiStudio.history.filter.period.tooltip","Filter records by time range.")})}),t.jsx("div",{className:c.segmentGroup,children:l.map(a=>t.jsx(y,{text:a.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.datePreset===a.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,datePreset:a.value,from:a.value==="custom"?e.from:void 0,to:a.value==="custom"?e.to:void 0}),"aria-pressed":e.datePreset===a.value,type:"button",children:a.label})},a.value))})]}),e.datePreset==="custom"&&t.jsxs("div",{className:c.filterGroup,children:[t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-from-date",children:t.jsx(B,{label:s("uiStudio.history.filter.from","시작일"),tooltip:s("uiStudio.history.filter.from.tooltip","Start date for the query.")})}),t.jsx("input",{id:"ui-history-from-date",type:"date",className:c.filterInput,value:e.from??"",onChange:a=>i({...e,from:a.target.value||void 0})}),t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-to-date",children:t.jsx(B,{label:s("uiStudio.history.filter.to","종료일"),tooltip:s("uiStudio.history.filter.to.tooltip","End date for the query.")})}),t.jsx("input",{id:"ui-history-to-date",type:"date",className:c.filterInput,value:e.to??"",onChange:a=>i({...e,to:a.target.value||void 0})})]}),t.jsx(y,{text:s("uiStudio.history.filter.reset.tooltip","Reset all filters to defaults."),children:t.jsx("button",{className:c.filterResetBtn,onClick:()=>i(He()),type:"button",children:s("uiStudio.history.filter.reset","Reset")})})]})}function Nn(){var D;const{t:e}=j(),{trackEvent:i}=q(),s=Re(1),n=((D=s.data)==null?void 0:D.placeId)??null,[l,a]=m.useState(He),{data:o,loading:d,error:p,refresh:u}=Ma(n,wn(l)),[g,h]=m.useState(null),[S,f]=m.useState(!1),[v,I]=m.useState(!1),[G,k]=m.useState(null),_=async()=>{if(k(null),n===null){k(e("uiStudio.history.noPlaceAction","Current place is not available yet."));return}try{await tt(n,{all:!0,alsoSnapshots:v}),await u(),f(!1)}catch(w){throw k(w.message),w}},R=(o==null?void 0:o.requests)??[],N=n===null&&s.loading,C=re(s.error)||re(p),P=m.useCallback((w,b)=>{i("dashboard_click_event",{click_target:"ui_studio_compare_before_after",page:"ui-studio",tab:"ui_studio_history"}),h(w)},[i]),M=m.useCallback(()=>{h(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[C?t.jsx(Ae,{}):t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":g?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx(In,{filter:l,onChange:a}),t.jsxs("div",{className:c.listHeader,children:[t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(B,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})}),R.length>0&&t.jsx(y,{text:e("uiStudio.history.clear.tooltip","Delete every change record for this project. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:c.clearBtn,onClick:()=>{i("dashboard_click_event",{click_target:"ui_studio_clear_history",page:"ui-studio",tab:"ui_studio_history"}),f(!0)},type:"button",children:e("uiStudio.history.clear","Clear")})})]}),N&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loadingPlace","Loading current place...")}),!N&&d&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loading","로딩 중...")}),!N&&!d&&p&&t.jsxs("div",{className:c.historyError,children:[e("uiStudio.history.error","오류"),": ",p]}),!N&&!d&&!p&&n===null&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.noPlace","No current place data is available yet. Connect WEPPY Plugin and sync a place to view UI change history.")}),!N&&!d&&!p&&n!==null&&R.length===0&&(kn(l)?t.jsx($e,{kind:"history"}):t.jsxs("div",{className:c.emptyHistory,children:[t.jsx("strong",{children:e("uiStudio.history.filteredEmpty.title","No change history matches these filters")}),t.jsx("span",{children:e("uiStudio.history.filteredEmpty.body","Change the filters or use Reset to show the full history.")})]})),!N&&!d&&n!==null&&R.length>0&&t.jsx("div",{className:c.requestList,children:R.map(w=>t.jsx(Ue,{req:w,placeId:n,onOpenCompare:b=>P(w.requestId,b)},w.requestId))}),G&&t.jsx("div",{className:c.deleteErrBanner,children:G})]}),g&&n!==null&&t.jsx(Oe,{requestId:g,placeId:n,onClose:M})]}),S&&t.jsx(le,{title:e("uiStudio.history.confirm.clearRequestsTitle","변경 이력 삭제"),message:e("uiStudio.history.confirm.clearRequestsMessage","현재 place의 변경 이력을 삭제합니다. Studio 인스턴스에는 영향을 주지 않습니다."),danger:!0,cascadeOption:{label:e("uiStudio.history.confirm.cascadeOption","연결된 화면 캡처도 함께 삭제"),checked:v,onChange:I},confirmLabel:e("common.delete","삭제"),onConfirm:_,onClose:()=>f(!1)})]})}function Pn({tier:e}){return e==="basic"?t.jsx(jn,{}):t.jsx(Nn,{})}const Tn=["analysis","history"];function Un(){const{t:e}=j(),{trackEvent:i}=q(),{tier:s,loading:n}=We(),[l,a]=Ke(),o=l.get("tab"),d=o&&Tn.includes(o)?o:"analysis",p=g=>{i("dashboard_click_event",{click_target:g==="analysis"?"ui_studio_tab_analysis":"ui_studio_tab_history",page:"ui-studio",tab:g==="analysis"?"ui_studio_analysis":"ui_studio_history"}),a(h=>{const S=new URLSearchParams(h);return S.set("tab",g),S})},u=[{key:"analysis",label:t.jsx(y,{text:e("uiStudio.tabs.analysis.tooltip","Browse AI-captured UI screens and quickly find which UIs need improvement."),children:e("uiStudio.tabs.analysis","Analysis")})},{key:"history",label:t.jsx(y,{text:e("uiStudio.tabs.history.tooltip","Every UI change AI made, in order. Compare before and after screens."),children:e("uiStudio.tabs.history","History")})}];return t.jsxs("div",{className:r.page,children:[t.jsx(Qe,{title:e("page.uiStudio.title","UI Studio"),description:e("page.uiStudio.description","Review UI captures, improvement suggestions, and before/after change history."),helpTopicId:"uiStudio",helpState:{tier:s}}),!n&&s==="pro"&&t.jsx(st,{surface:"uiStudio"}),t.jsx(at,{items:u,value:d,onChange:p}),n?t.jsx("div",{className:r.emptyState,children:e("uiStudio.loading","Loading...")}):d==="analysis"?t.jsx(Ta,{tier:s}):t.jsx(Pn,{tier:s})]})}export{Un as Component};