@weppy/roblox-mcp 2.7.17 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dashboard/dist/assets/AssetsPage-B1-IkNLs.js +56 -0
  3. package/dashboard/dist/assets/AssetsPage-BQGliX7Q.css +1 -0
  4. package/dashboard/dist/assets/{ChangelogDetailPage-Cado4LDZ.js → ChangelogDetailPage-BQu8E3gB.js} +1 -1
  5. package/dashboard/dist/assets/ChangelogPage-BYIOvsqN.js +1 -0
  6. package/dashboard/dist/assets/ConfirmModal-DSKr5eS9.js +1 -0
  7. package/dashboard/dist/assets/ConnectionPage-OvC9gL_W.js +1 -0
  8. package/dashboard/dist/assets/{GameChangeDetail-BvLY7yg8.js → GameChangeDetail-BmXlRT3i.js} +1 -1
  9. package/dashboard/dist/assets/{InfoLabel-LyMkHb1i.js → InfoLabel-CldY9uOT.js} +1 -1
  10. package/dashboard/dist/assets/OverviewPage-Cdw1CYe4.js +1 -0
  11. package/dashboard/dist/assets/PageHeader-2-fusgsY.css +1 -0
  12. package/dashboard/dist/assets/PageHeader-ueZvp6K9.js +11 -0
  13. package/dashboard/dist/assets/PlaytestPage-azdyKqSE.js +11 -0
  14. package/dashboard/dist/assets/SettingsPage-BLPo-MfN.js +1 -0
  15. package/dashboard/dist/assets/SettingsPage-d0wOFs8U.css +1 -0
  16. package/dashboard/dist/assets/{StatusBadge-CLJmMG0w.js → StatusBadge-DxlagIzF.js} +1 -1
  17. package/dashboard/dist/assets/SyncPage-DtqIcJ5z.js +4 -0
  18. package/dashboard/dist/assets/{Tabs-C9KNjyNX.js → Tabs-BgJY0tsU.js} +1 -1
  19. package/dashboard/dist/assets/ToolsPage-BEq7XLqc.js +1 -0
  20. package/dashboard/dist/assets/{TooltipText-BPEldl3x.js → TooltipText-DazmfUnr.js} +1 -1
  21. package/dashboard/dist/assets/UiStudioPage-BR3NgjBs.js +11 -0
  22. package/dashboard/dist/assets/WhatsNewPage-BGAIXqWd.js +1 -0
  23. package/dashboard/dist/assets/WhatsNewPage-BIYOEZg3.css +1 -0
  24. package/dashboard/dist/assets/index-1ZlHj3-1.js +523 -0
  25. package/dashboard/dist/assets/index-BdS5zBaA.css +1 -0
  26. package/dashboard/dist/assets/{sample-requests-Bttgc133.js → sample-requests-Cq6wCxhD.js} +1 -1
  27. package/dashboard/dist/assets/{useLiveUptime-CksXMBr9.js → useLiveUptime-Dg607eVr.js} +1 -1
  28. package/dashboard/dist/index.html +2 -2
  29. package/dist/index.js +76 -75
  30. package/package.json +1 -1
  31. package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  32. package/dashboard/dist/assets/ChangelogPage-DyS8_4IL.js +0 -1
  33. package/dashboard/dist/assets/ConfirmModal-C66ZwIur.js +0 -1
  34. package/dashboard/dist/assets/ConnectionPage-DsGgzpmn.js +0 -1
  35. package/dashboard/dist/assets/OverviewPage-BDkw5pqk.js +0 -1
  36. package/dashboard/dist/assets/PlaytestPage-Chwh5KSd.js +0 -11
  37. package/dashboard/dist/assets/SettingsPage-7nNA3k5H.js +0 -1
  38. package/dashboard/dist/assets/SettingsPage-Du8-FZAO.css +0 -1
  39. package/dashboard/dist/assets/SyncPage-CUP2s1T6.js +0 -4
  40. package/dashboard/dist/assets/ToolsPage-QacrKG2A.js +0 -1
  41. package/dashboard/dist/assets/UiStudioPage-RUjTAi4h.js +0 -16
  42. package/dashboard/dist/assets/WhatsNewPage-CKNhbHAQ.js +0 -1
  43. package/dashboard/dist/assets/WhatsNewPage-D5OncQnl.css +0 -1
  44. package/dashboard/dist/assets/index-CZ4Jn6CC.css +0 -1
  45. package/dashboard/dist/assets/index-VNIYQxwF.js +0 -481
@@ -1,16 +0,0 @@
1
- import{q as re,s as q,t as Le,r as p,u as D,j as t,i as H,R as $e,T as Se,l as Ee,v as He}from"./index-VNIYQxwF.js";import{I as B}from"./InfoLabel-LyMkHb1i.js";import{T as y}from"./TooltipText-BPEldl3x.js";import{D as ne,c as le,e as Oe,g as Fe,h as Ue,i as ce,j as je,k as ze,l as de,d as qe}from"./sample-requests-Bttgc133.js";import{T as Ve}from"./Tabs-C9KNjyNX.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 We=[["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"}]],Ke=re("camera",We);/**
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 Qe=[["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"}]],Ye=re("ellipsis",Qe);/**
12
- * @license lucide-react v1.8.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const Je=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xe=re("x",Je);async function we(e){const i=await fetch(`${q}${e}`);if(!i.ok){let a=null;try{a=await i.json()}catch{}throw new Le(i.status,(a==null?void 0:a.message)??i.statusText,(a==null?void 0:a.error)??null,a)}return await i.json()}function O(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function Ze(e){return e.design_check_summary?{priority_high:O(e.design_check_summary.priority_high),priority_medium:O(e.design_check_summary.priority_medium),priority_low:O(e.design_check_summary.priority_low)}:e.lint_summary?{priority_high:O(e.lint_summary.errors),priority_medium:O(e.lint_summary.warnings),priority_low:0}:null}function et(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 ve(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:Ze(e),image:e.image}}function tt(e){const i=e.check_results??e.lint_results??[];return{...ve(e),check_results:i.map(et),image_url:e.image_url,meta:e.meta}}async function ue(e,i){const a=new URLSearchParams;i!==void 0&&a.set("limit",String(i));const o=a.toString()?`?${a.toString()}`:"",l=await we(`/api/ui-studio/snapshots${o}`);return{...l,snapshots:l.snapshots.map(ve)}}async function it(e,i){const a=i!==void 0?`?placeId=${i}`:"",o=await we(`/api/ui-studio/snapshots/${encodeURIComponent(e)}${a}`);return tt(o)}function be(e,i){const a=i!==void 0?`?placeId=${i}`:"";return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image${a}`}const at=1e4;function Ce(e=50){const[i,a]=p.useState(null),[o,l]=p.useState(!0),[s,n]=p.useState(null),g=p.useCallback(async()=>{try{const d=await ue(void 0,e);a(d),n(null)}catch(d){n(d instanceof Error?d.message:String(d))}finally{l(!1)}},[e]);return p.useEffect(()=>{let d=!1;const _=async()=>{try{const h=await ue(void 0,e);d||(a(h),n(null))}catch(h){d||n(h instanceof Error?h.message:String(h))}finally{d||l(!1)}};_();const m=setInterval(()=>{_()},at);return()=>{d=!0,clearInterval(m)}},[e]),{data:i,loading:o,error:s,refresh:g}}const st="_page_1fjjw_2",rt="_grid_1fjjw_9",nt="_card_1fjjw_16",ot="_cardBodyButton_1fjjw_31",lt="_thumb_1fjjw_43",ct="_badges_1fjjw_52",dt="_priorityHighBadge_1fjjw_60",ut="_priorityMediumBadge_1fjjw_69",ht="_priorityLowBadge_1fjjw_78",pt="_cardMeta_1fjjw_87",gt="_target_1fjjw_93",mt="_time_1fjjw_100",_t="_drawer_1fjjw_105",yt="_drawerToolbar_1fjjw_122",ft="_drawerTitleBlock_1fjjw_133",xt="_drawerEyebrow_1fjjw_140",St="_drawerTarget_1fjjw_149",jt="_drawerToolbarActions_1fjjw_159",wt="_closeBtn_1fjjw_167",vt="_detailBody_1fjjw_188",bt="_screenshotPreviewFrame_1fjjw_195",Ct="_fullImg_1fjjw_208",It="_metaDl_1fjjw_215",Nt="_errorMsg_1fjjw_227",Pt="_suggestionsWrap_1fjjw_232",kt="_prioritySection_1fjjw_239",Tt="_sectionHighHeader_1fjjw_243",Bt="_sectionLowHeader_1fjjw_249",Dt="_sectionMediumHeader_1fjjw_255",Gt="_groupCard_1fjjw_261",Mt="_groupHeader_1fjjw_268",At="_groupLabel_1fjjw_284",Rt="_groupCount_1fjjw_289",Lt="_groupChevron_1fjjw_296",$t="_groupBody_1fjjw_300",Et="_groupDescription_1fjjw_303",Ht="_groupFix_1fjjw_308",Ot="_falsePositive_1fjjw_317",Ft="_itemList_1fjjw_325",Ut="_suggestionItem_1fjjw_333",zt="_suggestionInfo_1fjjw_343",qt="_pathBreadcrumb_1fjjw_349",Vt="_currentValue_1fjjw_358",Wt="_copyFixBtn_1fjjw_362",Kt="_emptySuggestions_1fjjw_376",Qt="_sampleBanner_1fjjw_384",Yt="_sampleBannerRow_1fjjw_397",Jt="_sampleBannerMain_1fjjw_405",Xt="_sampleBadge_1fjjw_413",Zt="_sampleTitle_1fjjw_423",ei="_sampleMessage_1fjjw_430",ti="_sampleActions_1fjjw_437",ii="_primaryAction_1fjjw_445",ai="_secondaryAction_1fjjw_446",si="_emptyState_1fjjw_481",ri="_pluginGuideCard_1fjjw_489",ni="_pluginGuideMarker_1fjjw_500",oi="_pluginGuideBody_1fjjw_515",li="_pluginGuideTitle_1fjjw_519",ci="_pluginGuideMessage_1fjjw_527",di="_pluginGuideChecklist_1fjjw_534",ui="_pluginGuideWaiting_1fjjw_557",hi="_pluginGuideDot_1fjjw_566",pi="_analysisWorkspace_1fjjw_574",gi="_analysisMainColumn_1fjjw_579",mi="_analysisDetailPopupLayer_1fjjw_583",_i="_analysisDetailDialog_1fjjw_600",yi="_analysisSummaryPanel_1fjjw_619",fi="_recentCapturesHeader_1fjjw_632",xi="_analysisSummaryText_1fjjw_639",Si="_recentCapturesMeta_1fjjw_640",ji="_analysisReportGrid_1fjjw_646",wi="_analysisReportGroup_1fjjw_653",vi="_analysisReportCard_1fjjw_657",bi="_analysisReportThumb_1fjjw_679",Ci="_analysisReportBody_1fjjw_688",Ii="_analysisReportTopline_1fjjw_695",Ni="_analysisVerdict_1fjjw_702",Pi="_analysisVerdict_needsFix_1fjjw_713",ki="_analysisVerdict_review_1fjjw_714",Ti="_analysisVerdict_passed_1fjjw_719",Bi="_analysisReportCounts_1fjjw_724",Di="_analysisReportTarget_1fjjw_729",Gi="_analysisReportIssue_1fjjw_738",Mi="_analysisReportMeta_1fjjw_744",Ai="_analysisChildList_1fjjw_751",Ri="_analysisChildRow_1fjjw_762",Li="_analysisChildPath_1fjjw_783",$i="_analysisChildSummary_1fjjw_792",Ei="_analysisChildDetailHint_1fjjw_793",Hi="_drawerAnalysisSummary_1fjjw_802",Oi="_drawerAnalysisSummaryItem_1fjjw_813",Fi="_drawerAnalysisLabel_1fjjw_820",Ui="_drawerAnalysisCounts_1fjjw_826",zi="_drawerAnalysisValue_1fjjw_827",qi="_recentCapturesSection_1fjjw_832",Vi="_drawerPrimaryActions_1fjjw_844",Wi="_drawerActionBtn_1fjjw_851",Ki="_drawerMoreMenu_1fjjw_880",Qi="_drawerMoreButton_1fjjw_885",Yi="_drawerMoreMenuBody_1fjjw_910",Ji="_drawerMenuItem_1fjjw_923",Xi="_drawerMenuItemDanger_1fjjw_946",Zi="_actionErrMsg_1fjjw_955",ea="_actionStatusMsg_1fjjw_964",ta="_actionStatus_info_1fjjw_978",ia="_actionStatus_success_1fjjw_984",aa="_actionStatus_warning_1fjjw_990",sa="_actionStatusDetail_1fjjw_996",ra="_galleryHeader_1fjjw_1002",na="_cardChecked_1fjjw_1015",oa="_cardCheckbox_1fjjw_1022",la="_captureSelectionActions_1fjjw_1062",ca="_selectionToolbar_1fjjw_1071",da="_selectionBar_1fjjw_1072",ua="_selectionToolbarCount_1fjjw_1091",ha="_selectionToolbarActions_1fjjw_1098",pa="_selectionBarBtn_1fjjw_1105",ga="_selectionBarBtnDanger_1fjjw_1126",r={page:st,grid:rt,card:nt,cardBodyButton:ot,thumb:lt,badges:ct,priorityHighBadge:dt,priorityMediumBadge:ut,priorityLowBadge:ht,cardMeta:pt,target:gt,time:mt,drawer:_t,drawerToolbar:yt,drawerTitleBlock:ft,drawerEyebrow:xt,drawerTarget:St,drawerToolbarActions:jt,closeBtn:wt,detailBody:vt,screenshotPreviewFrame:bt,fullImg:Ct,metaDl:It,errorMsg:Nt,suggestionsWrap:Pt,prioritySection:kt,sectionHighHeader:Tt,sectionLowHeader:Bt,sectionMediumHeader:Dt,groupCard:Gt,groupHeader:Mt,groupLabel:At,groupCount:Rt,groupChevron:Lt,groupBody:$t,groupDescription:Et,groupFix:Ht,falsePositive:Ot,itemList:Ft,suggestionItem:Ut,suggestionInfo:zt,pathBreadcrumb:qt,currentValue:Vt,copyFixBtn:Wt,emptySuggestions:Kt,sampleBanner:Qt,sampleBannerRow:Yt,sampleBannerMain:Jt,sampleBadge:Xt,sampleTitle:Zt,sampleMessage:ei,sampleActions:ti,primaryAction:ii,secondaryAction:ai,emptyState:si,pluginGuideCard:ri,pluginGuideMarker:ni,pluginGuideBody:oi,pluginGuideTitle:li,pluginGuideMessage:ci,pluginGuideChecklist:di,pluginGuideWaiting:ui,pluginGuideDot:hi,analysisWorkspace:pi,analysisMainColumn:gi,analysisDetailPopupLayer:mi,analysisDetailDialog:_i,analysisSummaryPanel:yi,recentCapturesHeader:fi,analysisSummaryText:xi,recentCapturesMeta:Si,analysisReportGrid:ji,analysisReportGroup:wi,analysisReportCard:vi,analysisReportThumb:bi,analysisReportBody:Ci,analysisReportTopline:Ii,analysisVerdict:Ni,analysisVerdict_needsFix:Pi,analysisVerdict_review:ki,analysisVerdict_passed:Ti,analysisReportCounts:Bi,analysisReportTarget:Di,analysisReportIssue:Gi,analysisReportMeta:Mi,analysisChildList:Ai,analysisChildRow:Ri,analysisChildPath:Li,analysisChildSummary:$i,analysisChildDetailHint:Ei,drawerAnalysisSummary:Hi,drawerAnalysisSummaryItem:Oi,drawerAnalysisLabel:Fi,drawerAnalysisCounts:Ui,drawerAnalysisValue:zi,recentCapturesSection:qi,drawerPrimaryActions:Vi,drawerActionBtn:Wi,drawerMoreMenu:Ki,drawerMoreButton:Qi,drawerMoreMenuBody:Yi,drawerMenuItem:Ji,drawerMenuItemDanger:Xi,actionErrMsg:Zi,actionStatusMsg:ea,actionStatus_info:ta,actionStatus_success:ia,actionStatus_warning:aa,actionStatusDetail:sa,galleryHeader:ra,cardChecked:na,cardCheckbox:oa,captureSelectionActions:la,selectionToolbar:ca,selectionBar:da,selectionToolbarCount:ua,selectionToolbarActions:ha,selectionBarBtn:pa,selectionBarBtnDanger:ga};function ma({snapshot:e,placeId:i,onClick:a,imageUrlOverride:o,selectable:l,selected:s,onToggleSelect:n}){var w,C,G;const{t:g}=D(),d=((w=e.design_check_summary)==null?void 0:w.priority_high)??0,_=((C=e.design_check_summary)==null?void 0:C.priority_medium)??0,m=((G=e.design_check_summary)==null?void 0:G.priority_low)??0,h=new Date(e.captured_at*1e3).toLocaleString(),x=o??be(e.snapshot_id,i),j=()=>{n==null||n(e.snapshot_id)};return t.jsxs("div",{className:`${r.card} ${s?r.cardChecked:""}`,children:[l&&t.jsx(y,{text:g("uiStudio.gallery.cardCheckbox.tooltip","Select this capture. Pick multiple to delete them together."),children:t.jsx("input",{className:r.cardCheckbox,type:"checkbox","aria-label":g("uiStudio.gallery.cardCheckbox","Select screenshot"),checked:!!s,onChange:j})}),t.jsxs("button",{className:r.cardBodyButton,onClick:I=>a(I.currentTarget),type:"button",children:[t.jsx("img",{className:r.thumb,src:x,alt:e.snapshot_id,loading:"lazy"}),t.jsxs("div",{className:r.badges,children:[d>0&&t.jsx(y,{text:g("uiStudio.gallery.priorityHighBadge.tooltip","Number of suggestions to review first. Click for details."),children:t.jsx("span",{className:r.priorityHighBadge,children:d})}),_>0&&t.jsx(y,{text:g("uiStudio.gallery.priorityMediumBadge.tooltip","Number of recommended suggestions."),children:t.jsx("span",{className:r.priorityMediumBadge,children:_})}),m>0&&t.jsx(y,{text:g("uiStudio.gallery.priorityLowBadge.tooltip","Number of optional improvements."),children:t.jsx("span",{className:r.priorityLowBadge,children:m})})]}),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 _a={touch_target:"touchTarget",contrast:"contrast",text_scaled:"textScaled",safezone:"safezone",min_text_size:"minTextSize"};function ya(e){return e.rule==="contrast"&&/\.(Icon|Avatar|EmptyIcon|GoldIcon|[A-Za-z]*Icon)$/.test(e.path)}const fa={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 xa(e,i,a){const o=_a[e];return o?{...i,checkLabel:a(`uiStudio.fix.${o}.label`,i.checkLabel),description:a(`uiStudio.fix.${o}.description`,i.description),howToFix:a(`uiStudio.fix.${o}.howToFix`,i.howToFix),falsePositiveNote:i.falsePositiveNote?a(`uiStudio.fix.${o}.falsePositive`,i.falsePositiveNote):void 0}:i}function Sa(e,i){const a=fa[e]??null;return a?i?xa(e,a,i):a:null}function ja(e){return ya(e)}function wa(e,i){const a=new Map;for(const l of e){const s=`${l.displayPriority}::${l.rule}`,n=a.get(s)??[];n.push(l),a.set(s,n)}const o=[];for(const[l,s]of a){const[n,g]=l.split("::"),d=s.filter(ja).length;o.push({rule:g??"unknown",priority:n,items:s,fixTemplate:Sa(g??"",i),falsePositiveRatio:s.length>0?d/s.length:0})}return o.sort((l,s)=>{const n={priority_high:0,priority_medium:1,priority_low:2};return l.priority!==s.priority?n[l.priority]-n[s.priority]:s.items.length-l.items.length}),{high:o.filter(l=>l.priority==="priority_high"),medium:o.filter(l=>l.priority==="priority_medium"),low:o.filter(l=>l.priority==="priority_low")}}function Ie(e){const i=e.split("."),a=i[i.length-1]??e,o=i[i.length-2],l=o?`${o} > ${a}`:a;return{full:e,breadcrumb:l,leaf:a}}function Ne(e){return typeof e=="object"&&e!==null}function he(e){return Ne(e.data)?e.data:{}}function Z(e,i){const a=e[i];return Ne(a)?a:{}}function V(e,i){const a=e[i];return typeof a=="string"?a:null}function W(e,i){const a=e[i];return typeof a=="number"&&Number.isFinite(a)?a:0}function va(e){const i=Z(e,"design_check_summary");return{priority_high:W(i,"priority_high"),priority_medium:W(i,"priority_medium"),priority_low:W(i,"priority_low")}}function pe(e){if(!(e.success??e.ok??!e.error))throw new Error(e.error??"UI Studio action failed")}function ge(e,i){return Pe(e,va(i))}function F(e,i,a,o,l){const s=e(i,a);return l?`${s}: ${l} · ${o}`:`${s}: ${o}`}function ba(e){const i=e.design_check_summary;return((i==null?void 0:i.priority_high)??0)>0?"needsFix":((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0?"review":"passed"}function Ca(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function K(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function Pe(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${K(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${K(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${K(e,(i==null?void 0:i.priority_low)??0)}`}function Ia(e,i){return Pe(e,i.design_check_summary)}function Na({snapshotId:e,placeId:i,onClose:a,sampleDetail:o,tier:l,onActionDone:s}){const[n,g]=p.useState(o??null),[d,_]=p.useState(null),[m,h]=p.useState(null),[x,j]=p.useState(null),[w,C]=p.useState(null),[G,I]=p.useState(null),{t:u}=D(),{trackEvent:P}=H(),A=l==="pro";p.useEffect(()=>{if(o){g(o),_(null);return}let b=!1;return it(e,i).then(k=>{b||g(k)}).catch(k=>{b||_(k instanceof Error?k.message:String(k))}),()=>{b=!0}},[e,i,o]);const S=async()=>{if(n!=null&&n.target){P("dashboard_click_event",{click_target:"ui_studio_capture_current",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),C("preview"),j({tone:"info",message:u("uiStudio.actions.previewRunning","캡처 중..."),detail:u("uiStudio.actions.previewRunningDetail","완료되면 새 화면 캡처 파일 ID를 표시합니다.")});try{const b=await le("preview",{targetPath:n.target});pe(b);const k=he(b),L=V(k,"snapshot_id"),f=Z(k,"screenshot"),M=Z(k,"meta"),T=V(f,"saved_path"),oe=V(M,"persist_warning"),U=ge(u,k);j(oe?{tone:"warning",message:F(u,"uiStudio.actions.previewNeedsSaveCheck","캡처 완료, 저장 확인 필요",U,L),detail:oe}:L&&T?{tone:"success",message:F(u,"uiStudio.actions.previewSaved","새 화면 캡처 저장 완료",U,L),detail:u("uiStudio.actions.previewSavedDetail","기존 화면 캡처는 변경하지 않고 새 파일로 저장했습니다.")}:L?{tone:"warning",message:F(u,"uiStudio.actions.previewComplete","캡처 완료",U,L),detail:u("uiStudio.actions.previewSavedPathMissing","새 화면 캡처 ID는 받았지만 저장 경로를 확인하지 못했습니다.")}:{tone:"warning",message:F(u,"uiStudio.actions.previewComplete","캡처 완료",U),detail:u("uiStudio.actions.previewSnapshotIdMissing","새 화면 캡처 ID를 확인하지 못했습니다. 목록을 새로고침해 저장 여부를 확인해 주세요.")}),await(s==null?void 0:s())}catch(b){h(b instanceof Error?b.message:String(b))}finally{C(null)}}},N=async()=>{if(n!=null&&n.target){P("dashboard_click_event",{click_target:"ui_studio_check_again",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),C("check"),j({tone:"info",message:u("uiStudio.actions.designCheckRunning","개선 제안 확인 중..."),detail:u("uiStudio.actions.designCheckRunningDetail","완료되면 우선 검토/검토 권장/선택 개선 항목 수를 표시합니다.")});try{const b=await le("check",{targetPath:n.target});pe(b);const k=he(b),L=ge(u,k);j({tone:"success",message:F(u,"uiStudio.actions.designCheckComplete","개선 제안 확인 완료",L),detail:u("uiStudio.actions.designCheckNoSnapshotSaved","이 작업은 화면 캡처 파일을 새로 저장하지 않습니다.")}),await(s==null?void 0:s())}catch(b){h(b instanceof Error?b.message:String(b))}finally{C(null)}}},E=async()=>{h(null),j(null);try{await Oe(i,e),await(s==null?void 0:s()),I(null),a()}catch(b){throw h(b instanceof Error?b.message:String(b)),b}},v=A?void 0:u("uiStudio.actions.proRequired","Pro에서 사용 가능"),R=n!=null&&n.target?Ie(n.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:u("uiStudio.analysis.detailDialog","Analysis detail")}),t.jsx("span",{className:r.drawerTarget,title:(R==null?void 0:R.full)??e,children:(R==null?void 0:R.breadcrumb)??e})]}),t.jsxs("div",{className:r.drawerToolbarActions,children:[n&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:r.drawerPrimaryActions,children:[t.jsx(y,{text:v??u("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 S(),disabled:!A||!n.target||w!==null,type:"button",children:[t.jsx(Ke,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:u("uiStudio.actions.captureCurrentState","현재 상태 캡처")})]})}),t.jsx(y,{text:v??u("uiStudio.actions.checkSuggestionsAgain.tooltip","Recompute suggestions for this capture without taking a new screenshot."),children:t.jsxs("button",{className:r.drawerActionBtn,onClick:()=>void N(),disabled:!A||!n.target||w!==null,type:"button",children:[t.jsx($e,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:u("uiStudio.actions.checkSuggestionsAgain","개선 제안 다시 확인")})]})})]}),t.jsxs("details",{className:r.drawerMoreMenu,children:[t.jsx("summary",{className:r.drawerMoreButton,title:u("uiStudio.actions.more.tooltip","Open additional actions."),"aria-label":u("uiStudio.actions.more","More"),children:t.jsx(Ye,{size:18,"aria-hidden":"true"})}),t.jsx("div",{className:r.drawerMoreMenuBody,children:t.jsx(y,{text:v??u("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:()=>{P("dashboard_click_event",{click_target:"ui_studio_delete_snapshot",page:"ui-studio",tab:"ui_studio_analysis"}),I("deleteSnapshot")},disabled:!A,type:"button",children:u("uiStudio.actions.deleteSnapshot","이 화면 캡처 삭제")})})})]})]}),t.jsx(y,{text:u("uiStudio.detailClose.tooltip","Close this detail panel."),children:t.jsx("button",{className:r.closeBtn,onClick:a,type:"button","aria-label":u("uiStudio.detailClose","Close"),children:t.jsx(Xe,{size:18,"aria-hidden":"true"})})})]})]}),d&&t.jsx("div",{className:r.errorMsg,children:d}),n&&t.jsxs("div",{className:r.detailBody,children:[m&&t.jsx("div",{className:r.actionErrMsg,children:m}),x&&t.jsxs("div",{className:`${r.actionStatusMsg} ${r[`actionStatus_${x.tone}`]??""}`,children:[t.jsx("div",{children:x.message}),x.detail&&t.jsx("div",{className:r.actionStatusDetail,children:x.detail})]}),t.jsx(Pa,{detail:n}),t.jsx("div",{className:r.screenshotPreviewFrame,"data-testid":"analysis-screenshot-preview",children:t.jsx("img",{className:r.fullImg,src:n.image_url,alt:n.snapshot_id})}),t.jsx(ka,{items:n.check_results}),t.jsxs("dl",{className:r.metaDl,children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.capturedAt","Captured"),tooltip:u("uiStudio.capturedAt.tooltip","When this screen was captured.")})}),t.jsx("dd",{children:new Date(n.captured_at*1e3).toLocaleString()}),t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.scope","Scope"),tooltip:u("uiStudio.scope.tooltip","Capture scope (full screen or a specific UI).")})}),t.jsx("dd",{children:n.scope}),n.target&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.target","Target"),tooltip:u("uiStudio.target.tooltip","Exact path of the captured UI instance.")})}),t.jsx("dd",{children:n.target})]}),n.brief_id&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.briefId","Brief"),tooltip:u("uiStudio.briefId.tooltip","Identifier of the design brief that produced this UI.")})}),t.jsx("dd",{children:n.brief_id})]})]})]}),G==="deleteSnapshot"&&t.jsx(ne,{title:u("uiStudio.confirm.deleteSnapshotTitle","화면 캡처 삭제"),message:u("uiStudio.confirm.deleteSnapshotMessage","이 화면 캡처 파일만 삭제됩니다 (Studio 인스턴스 보존)."),danger:!0,confirmLabel:u("common.delete","삭제"),onConfirm:E,onClose:()=>I(null)})]})}function Pa({detail:e}){const{t:i}=D(),a=ba(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_${a}`]??""}`,children:Ca(i,a)}),t.jsx("span",{className:r.drawerAnalysisCounts,children:Ia(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})]})]})}function ka({items:e}){const{t:i}=D();if(e.length===0)return t.jsx("p",{className:r.emptySuggestions,children:i("uiStudio.noSuggestions","현재 개선 제안 없음")});const{high:a,medium:o,low:l}=wa(e,i);return t.jsxs("div",{className:r.suggestionsWrap,children:[t.jsx("h3",{children:t.jsx(B,{label:i("uiStudio.designCheckResultsTitle","Design Check suggestions"),tooltip:i("uiStudio.designCheckResultsTitle.tooltip","All improvement suggestions found in this capture.")})}),a.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionHighHeader,children:i("uiStudio.highPrioritySection","우선 검토")}),a.map(s=>t.jsx(Q,{group:s},`h-${s.rule}`))]}),o.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionMediumHeader,children:i("uiStudio.mediumPrioritySection","검토 권장")}),o.map(s=>t.jsx(Q,{group:s},`m-${s.rule}`))]}),l.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionLowHeader,children:i("uiStudio.lowPrioritySection","선택 개선")}),l.map(s=>t.jsx(Q,{group:s},`l-${s.rule}`))]})]})}function Q({group:e}){var n,g,d;const{t:i}=D(),[a,o]=p.useState(e.priority==="priority_high"&&e.items.length<=5),l=e.falsePositiveRatio>=.5&&!!((n=e.fixTemplate)!=null&&n.falsePositiveNote),s=((g=e.fixTemplate)==null?void 0:g.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:()=>o(_=>!_),type:"button",children:[t.jsx("span",{className:r.groupLabel,children:s}),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:a?"▾":"▸"})]})}),a&&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"),":"," ",(d=e.fixTemplate)==null?void 0:d.falsePositiveNote]})}),t.jsx("ul",{className:r.itemList,children:e.items.map((_,m)=>t.jsx(Ta,{item:_,group:e},`${_.path}-${m}`))})]})]})}function Ta({item:e,group:i}){var _;const{t:a}=D(),{trackEvent:o}=H(),[l,s]=p.useState(!1),n=Ie(e.path),g=((_=i.fixTemplate)==null?void 0:_.buildUpdateCommand(e))??null,d=async()=>{if(g)try{await navigator.clipboard.writeText(g),o("dashboard_click_event",{click_target:"ui_studio_copy_ai_instruction",page:"ui-studio",tab:"ui_studio_analysis"}),s(!0),setTimeout(()=>s(!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:`${a("uiStudio.fullPath","Full path")}: ${n.full}`,children:n.breadcrumb}),t.jsxs("span",{className:r.currentValue,children:[t.jsx(y,{text:a("uiStudio.colCurrent.tooltip","The currently applied value."),children:t.jsx("span",{children:a("uiStudio.colCurrent","Current")})}),": ",t.jsx("strong",{children:String(e.actual)})," → ",t.jsx(y,{text:a("uiStudio.colRecommended.tooltip","The recommended value."),children:t.jsx("span",{children:a("uiStudio.colRecommended","Recommended")})}),": ",t.jsx("strong",{children:String(e.expected)})]})]}),g&&t.jsx(y,{text:a("uiStudio.copyFixCommand.tooltip","Copy a prompt that asks the AI to fix this issue."),children:t.jsx("button",{className:r.copyFixBtn,onClick:d,type:"button",children:l?a("uiStudio.copiedToClipboard","Copied"):a("uiStudio.copyFixCommand","Copy AI instruction")})})]})}function Y(e,i){return Object.entries(i).reduce((a,[o,l])=>a.split(`{${o}}`).join(String(l)),e)}function Ba(e,i){return i.rule==="contrast"?Y(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"?Y(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"?Y(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 ke="sample_inventory_preview",ee=Fe,Da=[{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 Ga(e){const o={snapshot_id:ke,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={...o,check_results:Da.map(n=>({...n,hint:Ba(e,n)})),image_url:ee};return{list:{placeId:0,snapshots:[o],totalCount:1},detail:l}}const Ma=/plugin not connected|sync not started/i;function te(e){return typeof e=="string"&&Ma.test(e)}function Te(){const{t:e}=D();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 Be(e){return e.target??e.scope}function Aa(e){const i=Be(e),a=i.split(".").filter(l=>l.length>0),o=a.findIndex(l=>l==="StarterGui");return o>=0&&a[o+1]?["StarterGui",a[o+1]].join("."):i}function De(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":"passed"}function Ra(e){return De(e.design_check_summary)}function me(e){return ie(e.design_check_summary)}function ie(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:3}function La(e){return e.length===0?null:{...e.reduce((a,o)=>{const l=o.latest.design_check_summary;return a.priority_high+=(l==null?void 0:l.priority_high)??0,a.priority_medium+=(l==null?void 0:l.priority_medium)??0,a.priority_low+=(l==null?void 0:l.priority_low)??0,a},{priority_high:0,priority_medium:0,priority_low:0})}}function $a(e){const i=new Map;for(const l of e){const s=Be(l),n=i.get(s);if(!n){i.set(s,{latest:l,snapshotCount:1});continue}n.snapshotCount+=1,l.captured_at>n.latest.captured_at&&(n.latest=l)}const a=[...i.entries()].map(([l,s])=>({key:l,latest:s.latest,snapshotCount:s.snapshotCount,verdict:Ra(s.latest)})),o=new Map;for(const l of a){const s=Aa(l.latest),n=o.get(s)??[];n.push(l),o.set(s,n)}return[...o.entries()].map(([l,s])=>{var _;const n=s.sort((m,h)=>{const x=me(m.latest)-me(h.latest);return x!==0?x:h.latest.captured_at-m.latest.captured_at}),g=n.reduce((m,h)=>h.latest.captured_at>m.captured_at?h.latest:m,((_=n[0])==null?void 0:_.latest)??s[0].latest),d=La(n);return{key:l,latest:g,snapshotCount:n.reduce((m,h)=>m+h.snapshotCount,0),children:n,summary:d,verdict:De(d)}}).sort((l,s)=>{const n=ie(l.summary)-ie(s.summary);return n!==0?n:s.latest.captured_at-l.latest.captured_at})}function Ea(e){return e.reduce((i,a)=>(a.verdict==="passed"?i.noSuggestions+=1:i.hasSuggestions+=1,i),{hasSuggestions:0,noSuggestions:0})}function $(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function ae(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${$(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${$(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${$(e,(i==null?void 0:i.priority_low)??0)}`}function Ha(e,i,a){return`${e("uiStudio.analysis.targetCountLabel","분석 대상")} ${$(e,i)} · ${se(e,"needsFix")} ${$(e,a.hasSuggestions)} · ${se(e,"passed")} ${$(e,a.noSuggestions)}`}function Oa({tier:e}){const{t:i}=D(),{trackEvent:a}=H(),o=e==="basic",l=Ce(50),s=p.useRef(null),[n,g]=p.useState(null),[d,_]=p.useState(new Set),[m,h]=p.useState(new Set),[x,j]=p.useState(!1),w=p.useCallback((f,M)=>{g(n===f?null:f)},[n]),C=p.useCallback(()=>{g(null)},[]),G=p.useCallback(f=>{_(M=>{const T=new Set(M);return T.has(f)?T.delete(f):T.add(f),T})},[]);p.useEffect(()=>{var M;if(!n)return;(M=s.current)==null||M.focus();const f=T=>{T.key==="Escape"&&!document.getElementById("delete-confirm-title")&&C()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[C,n]);const I=o?Ga(i):null,u=(I==null?void 0:I.list)??l.data,P=o?!1:l.loading,A=p.useCallback(f=>{h(M=>{const T=new Set(M);return T.has(f)?T.delete(f):T.add(f),T})},[]),S=f=>{h(new Set(f))},N=()=>{h(new Set)},E=async()=>{const f=(u==null?void 0:u.placeId)??0;a("dashboard_click_event",{click_target:"ui_studio_delete_selected_snapshots",page:"ui-studio",tab:"ui_studio_analysis"}),await Ue(f,{ids:[...m]}),await l.refresh(),j(!1),h(new Set)};if(P)return t.jsx("div",{className:r.page,children:i("uiStudio.loading","Loading...")});if(!o&&te(l.error))return t.jsx(Te,{});if(!o&&l.error)return t.jsxs("div",{className:r.page,children:[i("uiStudio.error","Error"),": ",l.error]});const v=(u==null?void 0:u.snapshots)??[],R=(u==null?void 0:u.placeId)??0,b=v.map(f=>f.snapshot_id),k=$a(v),L=Ea(k);return t.jsxs("div",{children:[t.jsxs("div",{className:r.analysisWorkspace,"data-detail-open":n?"true":"false",children:[t.jsxs("div",{className:r.analysisMainColumn,"data-testid":"analysis-main-column",children:[o&&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:Se.uiStudioAnalysis,target:"_blank",rel:"noreferrer",onClick:()=>a("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("h1",{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.")})})}),v.length===0?t.jsx("div",{className:r.emptyState,children:i("uiStudio.empty","No screenshots saved yet. They are created automatically when an AI agent captures the current UI state.")}):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:Ha(i,k.length,L)})]})}),t.jsx("div",{className:r.analysisReportGrid,"data-testid":"analysis-report-grid",children:k.map(f=>t.jsx(Ua,{report:f,placeId:R,imageUrlOverride:o?ee:void 0,expanded:d.has(f.key),onPrimaryClick:M=>{f.children.length>1?G(f.key):w(f.latest.snapshot_id,M)},onChildClick:(M,T)=>w(M,T)},f.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","화면 캡처")," ",$(i,v.length)]})]}),!o&&v.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:()=>S(b),type:"button",children:i("uiStudio.gallery.selectAll","모두 선택")})}),m.size>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:r.selectionToolbarCount,children:[m.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:N,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:()=>j(!0),type:"button",children:i("common.delete","삭제")})})]})]})]}),t.jsx("div",{className:r.grid,children:v.map(f=>t.jsx(ma,{snapshot:f,placeId:R,onClick:M=>w(f.snapshot_id,M),imageUrlOverride:o?ee:void 0,selectable:!o,selected:m.has(f.snapshot_id),onToggleSelect:A},f.snapshot_id))})]})]})]}),n&&t.jsx("div",{className:r.analysisDetailPopupLayer,"data-testid":"analysis-detail-popup-layer",onClick:C,role:"presentation",children:t.jsx("section",{ref:s,className:r.analysisDetailDialog,role:"dialog","aria-modal":"true","aria-label":i("uiStudio.analysis.detailDialog","Analysis detail"),tabIndex:-1,onClick:f=>f.stopPropagation(),children:t.jsx(Na,{snapshotId:n,placeId:R,onClose:C,sampleDetail:o&&n===ke?(I==null?void 0:I.detail)??null:null,tier:e,onActionDone:o?void 0:l.refresh})})})]}),x&&t.jsx(ne,{title:i("uiStudio.confirm.deleteBatchTitle","화면 캡처 일괄 삭제"),message:i("uiStudio.confirm.deleteBatchMessage",`선택한 ${m.size}개의 화면 캡처를 삭제합니다. 이 작업은 되돌릴 수 없습니다.`),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:E,onClose:()=>j(!1)})]})}function se(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function Fa(e,i){return((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?ae(e,i):e("uiStudio.analysis.issueSummary.passed","현재 검토 기준에서 추가 개선 제안은 없습니다.")}function Ua({report:e,placeId:i,imageUrlOverride:a,expanded:o,onPrimaryClick:l,onChildClick:s}){const{t:n}=D(),g=e.latest,d=a??be(g.snapshot_id,i),_=new Date(g.captured_at*1e3).toLocaleString(),m=se(n,e.verdict),h=e.children.length>1;return t.jsxs("div",{className:r.analysisReportGroup,children:[t.jsxs("button",{className:r.analysisReportCard,"aria-expanded":h?o:void 0,"aria-label":`${e.key} ${h?n("uiStudio.analysis.expandChildren","하위 대상 보기"):n("uiStudio.analysis.openDetail","상세 보기")}`,onClick:x=>l(x.currentTarget),type:"button",children:[t.jsx("img",{className:r.analysisReportThumb,src:d,alt:g.snapshot_id,loading:"lazy"}),t.jsxs("div",{className:r.analysisReportBody,children:[t.jsxs("div",{className:r.analysisReportTopline,children:[t.jsx(y,{text:e.verdict==="passed"?n("uiStudio.analysis.verdict.passed.tooltip","No improvements suggested under the current review thresholds."):n("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:m})}),t.jsx(y,{text:n("uiStudio.analysis.counts.tooltip","Shows how many suggestions are marked review first, recommended, or optional."),children:t.jsx("span",{className:r.analysisReportCounts,children:ae(n,e.summary)})})]}),t.jsx("div",{className:r.analysisReportTarget,children:e.key}),t.jsx("div",{className:r.analysisReportIssue,children:Fa(n,e.summary)}),t.jsxs("div",{className:r.analysisReportMeta,children:[_," ·"," ",t.jsx(y,{text:n("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom)."),children:t.jsx("span",{children:n("uiStudio.analysis.thresholds","검토 기준")})}),": ",g.thresholds_source,e.snapshotCount>1?` · ${n("uiStudio.analysis.captureLabel","캡처")} ${$(n,e.snapshotCount)}`:"",h?` · ${n("uiStudio.analysis.childTargets","하위 대상")} ${$(n,e.children.length)}`:""]})]})]}),h&&o&&t.jsx("div",{className:r.analysisChildList,children:e.children.map(x=>t.jsxs("button",{className:r.analysisChildRow,onClick:j=>s(x.latest.snapshot_id,j.currentTarget),type:"button",children:[t.jsx("span",{className:r.analysisChildPath,children:x.key}),t.jsx("span",{className:r.analysisChildSummary,children:ae(n,x.latest.design_check_summary)}),t.jsx("span",{className:r.analysisChildDetailHint,children:n("uiStudio.analysis.childDetailHint","하위 대상 상세 보기")})]},x.key))})]})}function za(e,i,a=1e4){const[o,l]=p.useState(null),[s,n]=p.useState(!0),[g,d]=p.useState(null),_=JSON.stringify(i),m=p.useCallback(async()=>{try{const h=await ce(e,i);l(h),d(null)}catch(h){d(h.message)}finally{n(!1)}},[e,_]);return p.useEffect(()=>{let h=!0;const x=async()=>{try{const w=await ce(e,i);h&&(l(w),d(null))}catch(w){h&&d(w.message)}finally{h&&n(!1)}};x();const j=setInterval(()=>{x()},a);return()=>{h=!1,clearInterval(j)}},[e,_,a]),{data:o,loading:s,error:g,refresh:m}}const qa="_filterBar_1nnge_4",Va="_filterGroup_1nnge_14",Wa="_filterLabel_1nnge_21",Ka="_filterCheckbox_1nnge_28",Qa="_segmentGroup_1nnge_45",Ya="_segmentBtn_1nnge_55",Ja="_segmentBtnActive_1nnge_73",Xa="_filterInput_1nnge_79",Za="_filterResetBtn_1nnge_95",es="_requestRow_1nnge_114",ts="_requestRowMain_1nnge_127",is="_requestDetailToggle_1nnge_134",as="_thumbPair_1nnge_156",ss="_thumbPairButton_1nnge_164",rs="_thumbSlot_1nnge_179",ns="_thumbImg_1nnge_204",os="_thumbPlaceholder_1nnge_211",ls="_thumbArrow_1nnge_219",cs="_extraPathsBadge_1nnge_225",ds="_requestMeta_1nnge_239",us="_requestLabel_1nnge_247",hs="_requestTime_1nnge_256",ps="_requestStats_1nnge_261",gs="_statDot_1nnge_269",ms="_summaryPill_1nnge_273",_s="_requestActions_1nnge_278",ys="_expandHint_1nnge_285",fs="_mutationsArea_1nnge_298",xs="_mutLoading_1nnge_307",Ss="_mutEmpty_1nnge_308",js="_mutError_1nnge_314",ws="_mutationRow_1nnge_320",vs="_mutationLine_1nnge_330",bs="_mutTs_1nnge_337",Cs="_mutCommand_1nnge_343",Is="_mutPath_1nnge_349",Ns="_mutDiff_1nnge_359",Ps="_mutErr_1nnge_314",ks="_changeDetails_1nnge_374",Ts="_changeDetailRow_1nnge_382",Bs="_changeDetailRowNoBefore_1nnge_391",Ds="_changeDetailBadge_1nnge_395",Gs="_changeDetail_text_1nnge_412",Ms="_changeDetail_color_1nnge_417",As="_changeDetail_size_1nnge_422",Rs="_changeDetail_layout_1nnge_427",Ls="_changeDetail_state_1nnge_432",$s="_changeDetail_asset_1nnge_437",Es="_changeDetail_property_1nnge_442",Hs="_changeDetailProperty_1nnge_446",Os="_changeDetailArrow_1nnge_454",Fs="_changeDetailOldValue_1nnge_460",Us="_changeDetailNewValue_1nnge_461",zs="_compareDialogLayer_1nnge_479",qs="_compareDialog_1nnge_479",Vs="_beforeAfterDrawer_1nnge_510",Ws="_drawerHeader_1nnge_520",Ks="_drawerTitle_1nnge_529",Qs="_drawerCloseBtn_1nnge_536",Ys="_drawerBody_1nnge_552",Js="_pathTabs_1nnge_559",Xs="_pathTab_1nnge_559",Zs="_pathTabActive_1nnge_588",er="_comparePanel_1nnge_594",tr="_compareHalf_1nnge_604",ir="_compareLabel_1nnge_611",ar="_compareImg_1nnge_622",sr="_comparePlaceholder_1nnge_630",rr="_compareDetailsPanel_1nnge_642",nr="_compareDetailsHeader_1nnge_651",or="_drawerFooter_1nnge_669",lr="_drawerActionBtn_1nnge_677",cr="_historyTabWrap_1nnge_695",dr="_historyWorkspace_1nnge_701",ur="_historyMainColumn_1nnge_706",hr="_requestList_1nnge_710",pr="_emptyHistory_1nnge_715",gr="_historyError_1nnge_722",mr="_historyLoading_1nnge_728",_r="_listHeader_1nnge_736",yr="_listHeaderTitle_1nnge_745",fr="_clearBtn_1nnge_752",xr="_deleteErrBanner_1nnge_771",c={filterBar:qa,filterGroup:Va,filterLabel:Wa,filterCheckbox:Ka,segmentGroup:Qa,segmentBtn:Ya,segmentBtnActive:Ja,filterInput:Xa,filterResetBtn:Za,requestRow:es,requestRowMain:ts,requestDetailToggle:is,thumbPair:as,thumbPairButton:ss,thumbSlot:rs,thumbImg:ns,thumbPlaceholder:os,thumbArrow:ls,extraPathsBadge:cs,requestMeta:ds,requestLabel:us,requestTime:hs,requestStats:ps,statDot:gs,summaryPill:ms,requestActions:_s,expandHint:ys,mutationsArea:fs,mutLoading:xs,mutEmpty:Ss,mutError:js,mutationRow:ws,mutationLine:vs,mutTs:bs,mutCommand:Cs,mutPath:Is,mutDiff:Ns,mutErr:Ps,changeDetails:ks,changeDetailRow:Ts,changeDetailRowNoBefore:Bs,changeDetailBadge:Ds,changeDetail_text:Gs,changeDetail_color:Ms,changeDetail_size:As,changeDetail_layout:Rs,changeDetail_state:Ls,changeDetail_asset:$s,changeDetail_property:Es,changeDetailProperty:Hs,changeDetailArrow:Os,changeDetailOldValue:Fs,changeDetailNewValue:Us,compareDialogLayer:zs,compareDialog:qs,beforeAfterDrawer:Vs,drawerHeader:Ws,drawerTitle:Ks,drawerCloseBtn:Qs,drawerBody:Ys,pathTabs:Js,pathTab:Xs,pathTabActive:Zs,comparePanel:er,compareHalf:tr,compareLabel:ir,compareImg:ar,comparePlaceholder:sr,compareDetailsPanel:rr,compareDetailsHeader:nr,drawerFooter:or,drawerActionBtn:lr,historyTabWrap:cr,historyWorkspace:dr,historyMainColumn:ur,requestList:hr,emptyHistory:pr,historyError:gr,historyLoading:mr,listHeader:_r,listHeaderTitle:yr,clearBtn:fr,deleteErrBanner:xr};function Sr(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function _e(e){return e==null?"nil":typeof e=="string"?`"${e}"`:typeof e=="object"?JSON.stringify(e):String(e)}function Ge({mutations:e,emptyLabel:i}){const{t:a}=D();return e.length===0?t.jsx("div",{className:c.mutEmpty,children:i??a("uiStudio.history.row.mutationsEmpty","No change details")}):t.jsx(t.Fragment,{children:e.map(o=>t.jsx(jr,{mutation:o},o.mutationId))})}function jr({mutation:e}){return t.jsxs("div",{className:c.mutationRow,children:[t.jsxs("div",{className:c.mutationLine,children:[t.jsx("span",{className:c.mutTs,children:Sr(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(wr,{detail:i},`${i.property}:${i.category}`))}),!e.ok&&e.error&&t.jsx("span",{className:c.mutErr,children:e.error})]})}function wr({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:_e(e.before)}),t.jsx("span",{className:c.changeDetailArrow,children:"→"}),t.jsx("span",{className:c.changeDetailNewValue,children:_e(e.after)})]})}function ye(e,i){return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function vr(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function br(e){if(!e)return null;const i=e.split(/[./]/).filter(o=>o.length>0);if(i.length===0)return null;const a=i.findIndex(o=>o==="StarterGui");return a>=0&&i[a+1]?i[a+1]:i[i.length-1]??null}function J(e,i){if(i.label)return i.label;const a=br(i.affectedPaths[0]);if(a){const o=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(o,l).replace("{path}",a).replace("{n}",String(i.mutationCount))}return e("uiStudio.history.row.toolLabel","UI changes ({n})").replace("{n}",String(i.mutationCount))}function X(e,i){return`${i}${e("uiStudio.storage.countSuffix","")}`}function Cr(e,i){if(!i)return null;const a=[i.style_family,i.layout_family,i.device_policy,i.safe_area_policy].filter(o=>typeof o=="string"&&o.length>0);return a.length===0?null:`${e("uiStudio.history.row.qualityPlan","Design direction")}: ${a.join(" · ")}`}function Ir(e,i){if(!i)return null;if(i.source==="unavailable")return e("uiStudio.history.row.designCheckUnavailable","Suggestions: unavailable");if(i.total===0)return e("uiStudio.history.row.designCheckNone","Suggestions: none");const a=`${e("uiStudio.priorityHigh","Priority")} ${X(e,i.priority_high)}`,o=`${e("uiStudio.priorityMedium","Recommended")} ${X(e,i.priority_medium)}`,l=`${e("uiStudio.priorityLow","Optional")} ${X(e,i.priority_low)}`;return`${e("uiStudio.history.row.designCheck","Suggestions")}: ${a} · ${o} · ${l}`}function Me({req:e,placeId:i,onOpenCompare:a,imageUrlOverride:o,sampleMutations:l}){const{t:s}=D(),[n,g]=p.useState(!1),[d,_]=p.useState(null),[m,h]=p.useState(!1),[x,j]=p.useState(null),w=o!=null,C=e.affectedPaths[0]??null,G=e.affectedPaths.length-1,I=C?e.beforeSnapshots[C]??null:null,u=C?e.afterSnapshots[C]??null:null,P=I?w?o:ye(I,i):null,A=u?w?o:ye(u,i):null,S=Cr(s,e.qualityPlanSummary),N=Ir(s,e.postChangeDesignCheckSummary),E=async()=>{if(!n&&d===null)if(w&&l!=null)_(l);else{h(!0),j(null);try{const v=await je(i,e.requestId);_(v.mutations)}catch(v){j(v.message)}finally{h(!1)}}g(v=>!v)};return t.jsxs("div",{className:c.requestRow,children:[t.jsxs("div",{className:c.requestRowMain,children:[t.jsx(y,{text:s("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:v=>a(v.currentTarget),disabled:!C,"aria-label":`${J(s,e)} ${s("uiStudio.history.row.compare","Before / After")}`,type:"button",children:[t.jsx("div",{className:c.thumbSlot,children:P?t.jsx("img",{className:c.thumbImg,src:P,alt:s("uiStudio.compare.before","Before"),loading:"lazy"}):t.jsx(y,{text:s("uiStudio.history.row.noBeforeState.tooltip","No capture saved before this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:s("uiStudio.history.row.noBeforeState","이전 없음")})})}),t.jsx("span",{className:c.thumbArrow,children:"→"}),t.jsx("div",{className:c.thumbSlot,children:A?t.jsx("img",{className:c.thumbImg,src:A,alt:s("uiStudio.compare.after","After"),loading:"lazy"}):t.jsx(y,{text:s("uiStudio.history.row.noAfterState.tooltip","No capture saved after this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:s("uiStudio.history.row.noAfterState","이후 없음")})})}),G>0&&t.jsx(y,{text:s("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":n,"aria-label":`${J(s,e)} ${s("uiStudio.history.row.toggleDetails","Toggle change details")}`,onClick:()=>void E(),children:[t.jsxs("span",{className:c.requestMeta,children:[t.jsx("span",{className:c.requestLabel,children:J(s,e)}),t.jsx("span",{className:c.requestTime,children:vr(e.startedAt)}),t.jsxs("span",{className:c.requestStats,children:[t.jsx(y,{text:s("uiStudio.history.row.affectedPaths.tooltip","Number of UIs affected by this action."),children:t.jsxs("span",{children:[s("uiStudio.history.row.affectedPaths","Paths")," ",e.affectedPaths.length,s("uiStudio.storage.countSuffix","")]})}),t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:s("uiStudio.history.row.mutations.tooltip","Number of detailed changes (e.g., property edits)."),children:t.jsxs("span",{children:[s("uiStudio.history.row.mutations","Change details")," ",e.mutationCount,s("uiStudio.storage.countSuffix","")]})}),S&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:s("uiStudio.history.row.qualityPlan.tooltip","Brief design direction used for this change."),children:t.jsx("span",{className:c.summaryPill,children:S})})]}),N&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:s("uiStudio.history.row.designCheck.tooltip","Post-change Design Check suggestion summary."),children:t.jsx("span",{className:c.summaryPill,children:N})})]})]})]}),t.jsx("span",{className:c.requestActions,children:t.jsx(y,{text:s("uiStudio.history.row.toggleDetails.tooltip","Show or hide a per-line breakdown of what changed."),children:t.jsx("span",{className:c.expandHint,children:n?s("uiStudio.history.row.collapseDetails","Hide change details"):s("uiStudio.history.row.expandDetails","Show {n} change details").replace("{n}",String(e.mutationCount))})})})]})]}),n&&t.jsxs("div",{className:c.mutationsArea,children:[m&&t.jsx("div",{className:c.mutLoading,children:s("uiStudio.history.loading","로딩 중...")}),x&&t.jsx("div",{className:c.mutError,children:x}),d&&t.jsx(Ge,{mutations:d,emptyLabel:s("uiStudio.history.row.mutationsEmpty","No change details")})]})]})}function fe(e,i){return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function Ae({requestId:e,placeId:i,onClose:a,imageUrlOverride:o,sampleDetail:l}){const{t:s}=D(),n=p.useRef(null),g=l!=null,[d,_]=p.useState(g?l:null),[m,h]=p.useState(!g),[x,j]=p.useState(null),[w,C]=p.useState(g&&l.affectedPaths.length>0?l.affectedPaths[0]:null);p.useEffect(()=>{var S;(S=n.current)==null||S.focus()},[]),p.useEffect(()=>{const S=N=>{N.key==="Escape"&&(N.preventDefault(),a())};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[a]),p.useEffect(()=>{if(g)return;let S=!0;return h(!0),j(null),je(i,e).then(N=>{S&&(_(N),N.affectedPaths.length>0&&C(N.affectedPaths[0]))}).catch(N=>{S&&j(N.message)}).finally(()=>{S&&h(!1)}),()=>{S=!1}},[e,i,g]);const G=w&&d?d.beforeSnapshots[w]??null:null,I=w&&d?d.afterSnapshots[w]??null:null,u=G?o??fe(G,i):null,P=I?o??fe(I,i):null,A=s("uiStudio.history.row.compare","전후 비교");return t.jsx("div",{className:c.compareDialogLayer,"data-testid":"history-compare-dialog-layer",onClick:a,role:"presentation",children:t.jsx("section",{ref:n,className:c.compareDialog,role:"dialog","aria-modal":"true","aria-label":A,tabIndex:-1,onClick:S=>S.stopPropagation(),children:t.jsxs("div",{className:c.beforeAfterDrawer,children:[t.jsxs("div",{className:c.drawerHeader,children:[t.jsx("h2",{className:c.drawerTitle,children:A}),t.jsx("button",{className:c.drawerCloseBtn,onClick:a,type:"button",children:s("uiStudio.history.drawer.close","닫기")})]}),m&&t.jsx("div",{className:c.drawerBody,children:s("uiStudio.history.loading","로딩 중...")}),x&&t.jsx("div",{className:c.drawerBody,children:t.jsx("span",{className:c.mutErr,children:x})}),!m&&!x&&d&&t.jsxs(t.Fragment,{children:[d.affectedPaths.length>0&&t.jsx("div",{className:c.pathTabs,role:"tablist",children:d.affectedPaths.map(S=>t.jsx(y,{text:`${s("uiStudio.compare.path.tooltip","The UI instance path for this screen.")} ${S}`,children:t.jsx("button",{role:"tab","aria-selected":w===S,className:`${c.pathTab} ${w===S?c.pathTabActive:""}`,onClick:()=>C(S),type:"button",children:S.split("/").pop()??S})},S))}),t.jsxs("div",{className:c.comparePanel,children:[t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:s("uiStudio.compare.before.tooltip","The screen saved just before AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:s("uiStudio.compare.before","Before")})}),u?t.jsx("img",{className:c.compareImg,src:u,alt:s("uiStudio.compare.before","Before")}):t.jsx("div",{className:c.comparePlaceholder,children:s("uiStudio.history.row.noBeforeState","이전 상태 없음")})]}),t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:s("uiStudio.compare.after.tooltip","The screen saved just after AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:s("uiStudio.compare.after","After")})}),P?t.jsx("img",{className:c.compareImg,src:P,alt:s("uiStudio.compare.after","After")}):t.jsx("div",{className:c.comparePlaceholder,children:s("uiStudio.history.row.noAfterState","이후 상태 없음")})]})]}),t.jsxs("section",{className:c.compareDetailsPanel,children:[t.jsx("div",{className:c.compareDetailsHeader,children:s("uiStudio.history.drawer.changeDetails","Change details")}),t.jsx(Ge,{mutations:d.mutations,emptyLabel:s("uiStudio.history.row.mutationsEmpty","No change details")})]})]}),t.jsx("div",{className:c.drawerFooter,children:t.jsx("button",{className:c.drawerActionBtn,onClick:a,type:"button",children:s("uiStudio.history.drawer.close","닫기")})})]})})})}function z(e){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),a=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999);return{start:i,end:a}}function xe(e,i){const a=e.split("-").map(Number);if(a.length!==3||a.some(n=>Number.isNaN(n)))return;const[o,l,s]=a;return new Date(o,l-1,s,i?23:0,i?59:0,i?59:0,i?999:0).toISOString()}function Nr(e){const i={limit:50};if(e.action!=="all"&&(i.action=e.action),e.datePreset==="custom"){const a=e.from?xe(e.from,!1):void 0,o=e.to?xe(e.to,!0):void 0;a&&(i.from=a),o&&(i.to=o)}else if(e.datePreset!=="all"){const a=new Date;if(e.datePreset==="today"){const{start:o,end:l}=z(a);i.from=o.toISOString(),i.to=l.toISOString()}else if(e.datePreset==="yesterday"){const o=new Date(a);o.setDate(o.getDate()-1);const{start:l,end:s}=z(o);i.from=l.toISOString(),i.to=s.toISOString()}else{const o=e.datePreset==="7d"?6:29,l=new Date(a);l.setDate(l.getDate()-o);const{start:s}=z(l),{end:n}=z(a);i.from=s.toISOString(),i.to=n.toISOString()}}return i}function Re(){return{action:"all",datePreset:"all"}}function Pr(){const{t:e}=D(),{trackEvent:i}=H(),a=ze(e),[o,l]=p.useState(null),s=o?a.requests.find(d=>d.requestId===o)??null:null,n=p.useCallback((d,_)=>{l(d)},[]),g=p.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:Se.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":o?"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:a.requests.map(d=>t.jsx(Me,{req:d,placeId:0,onOpenCompare:_=>n(d.requestId,_),imageUrlOverride:de,sampleMutations:a.mutationsByRequest[d.requestId]},d.requestId))})]}),o&&s&&t.jsx(Ae,{requestId:o,placeId:0,onClose:g,imageUrlOverride:de,sampleDetail:{...s,mutations:a.mutationsByRequest[s.requestId]??[]}})]})]})}function kr({filter:e,onChange:i}){const{t:a}=D(),o=[{value:"all",label:a("uiStudio.history.filter.actionAll","All"),tooltip:a("uiStudio.history.filter.actionAll.tooltip","Show every kind of action.")},{value:"create_tree",label:a("uiStudio.history.filter.actionCreate","Create"),tooltip:a("uiStudio.history.filter.actionCreate.tooltip","Show only actions that created a new UI.")},{value:"update",label:a("uiStudio.history.filter.actionUpdate","Update"),tooltip:a("uiStudio.history.filter.actionUpdate.tooltip","Show only actions that updated an existing UI.")},{value:"delete",label:a("uiStudio.history.filter.actionDelete","Delete"),tooltip:a("uiStudio.history.filter.actionDelete.tooltip","Show only actions that deleted a UI.")}],l=[{value:"all",label:a("uiStudio.history.filter.dateAll","All"),tooltip:a("uiStudio.history.filter.dateAll.tooltip","Show the full history.")},{value:"today",label:a("uiStudio.history.filter.today","Today"),tooltip:a("uiStudio.history.filter.today.tooltip","Show only changes from today.")},{value:"yesterday",label:a("uiStudio.history.filter.yesterday","Yesterday"),tooltip:a("uiStudio.history.filter.yesterday.tooltip","Show only changes from yesterday.")},{value:"7d",label:a("uiStudio.history.filter.last7Days","Last 7 days"),tooltip:a("uiStudio.history.filter.last7Days.tooltip","Show changes from the last 7 days.")},{value:"30d",label:a("uiStudio.history.filter.last30Days","Last 30 days"),tooltip:a("uiStudio.history.filter.last30Days.tooltip","Show changes from the last 30 days.")},{value:"custom",label:a("uiStudio.history.filter.customRange","Custom range"),tooltip:a("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:a("uiStudio.history.filter.actions","작업 유형"),tooltip:a("uiStudio.history.filter.actions.tooltip","Filter records by the kind of change AI made.")})}),t.jsx("div",{className:c.segmentGroup,children:o.map(s=>t.jsx(y,{text:s.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.action===s.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,action:s.value}),"aria-pressed":e.action===s.value,type:"button",children:s.label})},s.value))})]}),t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(B,{label:a("uiStudio.history.filter.period","Period"),tooltip:a("uiStudio.history.filter.period.tooltip","Filter records by time range.")})}),t.jsx("div",{className:c.segmentGroup,children:l.map(s=>t.jsx(y,{text:s.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.datePreset===s.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,datePreset:s.value,from:s.value==="custom"?e.from:void 0,to:s.value==="custom"?e.to:void 0}),"aria-pressed":e.datePreset===s.value,type:"button",children:s.label})},s.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:a("uiStudio.history.filter.from","시작일"),tooltip:a("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:s=>i({...e,from:s.target.value||void 0})}),t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-to-date",children:t.jsx(B,{label:a("uiStudio.history.filter.to","종료일"),tooltip:a("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:s=>i({...e,to:s.target.value||void 0})})]}),t.jsx(y,{text:a("uiStudio.history.filter.reset.tooltip","Reset all filters to defaults."),children:t.jsx("button",{className:c.filterResetBtn,onClick:()=>i(Re()),type:"button",children:a("uiStudio.history.filter.reset","Reset")})})]})}function Tr(){var E;const{t:e}=D(),{trackEvent:i}=H(),a=Ce(1),o=((E=a.data)==null?void 0:E.placeId)??0,[l,s]=p.useState(Re),{data:n,loading:g,error:d,refresh:_}=za(o,Nr(l)),[m,h]=p.useState(null),[x,j]=p.useState(!1),[w,C]=p.useState(!1),[G,I]=p.useState(null),u=async()=>{I(null);try{await qe(o,{all:!0,alsoSnapshots:w}),await _(),j(!1)}catch(v){throw I(v.message),v}},P=(n==null?void 0:n.requests)??[],A=te(a.error)||te(d),S=p.useCallback((v,R)=>{i("dashboard_click_event",{click_target:"ui_studio_compare_before_after",page:"ui-studio",tab:"ui_studio_history"}),h(v)},[i]),N=p.useCallback(()=>{h(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[A?t.jsx(Te,{}):t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":m?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx(kr,{filter:l,onChange:s}),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.")})}),P.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"}),j(!0)},type:"button",children:e("uiStudio.history.clear","Clear")})})]}),g&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loading","로딩 중...")}),!g&&d&&t.jsxs("div",{className:c.historyError,children:[e("uiStudio.history.error","오류"),": ",d]}),!g&&!d&&P.length===0&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.empty","아직 변경 이력이 없습니다. AI 에이전트가 manage_ui 로 UI 를 수정하면 자동으로 기록됩니다.")}),!g&&P.length>0&&t.jsx("div",{className:c.requestList,children:P.map(v=>t.jsx(Me,{req:v,placeId:o,onOpenCompare:R=>S(v.requestId,R)},v.requestId))}),G&&t.jsx("div",{className:c.deleteErrBanner,children:G})]}),m&&t.jsx(Ae,{requestId:m,placeId:o,onClose:N})]}),x&&t.jsx(ne,{title:e("uiStudio.history.confirm.clearRequestsTitle","변경 이력 삭제"),message:e("uiStudio.history.confirm.clearRequestsMessage","현재 place의 변경 이력을 삭제합니다. Studio 인스턴스에는 영향을 주지 않습니다."),danger:!0,cascadeOption:{label:e("uiStudio.history.confirm.cascadeOption","연결된 화면 캡처도 함께 삭제"),checked:w,onChange:C},confirmLabel:e("common.delete","삭제"),onConfirm:u,onClose:()=>j(!1)})]})}function Br({tier:e}){return e==="basic"?t.jsx(Pr,{}):t.jsx(Tr,{})}const Dr=["analysis","history"];function $r(){const{t:e}=D(),{trackEvent:i}=H(),{tier:a,loading:o}=Ee(),[l,s]=He(),n=l.get("tab"),g=n&&Dr.includes(n)?n:"analysis",d=m=>{i("dashboard_click_event",{click_target:m==="analysis"?"ui_studio_tab_analysis":"ui_studio_tab_history",page:"ui-studio",tab:m==="analysis"?"ui_studio_analysis":"ui_studio_history"}),s(h=>{const x=new URLSearchParams(h);return x.set("tab",m),x})},_=[{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(Ve,{items:_,value:g,onChange:d}),o?t.jsx("div",{className:r.emptyState,children:e("uiStudio.loading","Loading...")}):g==="analysis"?t.jsx(Oa,{tier:a}):t.jsx(Br,{tier:a})]})}export{$r as Component};
@@ -1 +0,0 @@
1
- import{u,j as e,x as w,r as N,y,p as f,L as j}from"./index-VNIYQxwF.js";const C="_card_f20gt_2",T="_cardUnread_f20gt_15",b="_cardRead_f20gt_20",S="_topRow_f20gt_25",v="_categoryChip_f20gt_32",k="_versionChip_f20gt_45",R="_date_f20gt_57",H="_title_f20gt_65",E="_body_f20gt_74",L="_linkList_f20gt_82",A="_link_f20gt_82",U="_newBadge_f20gt_104",n={card:C,cardUnread:T,cardRead:b,topRow:S,categoryChip:v,versionChip:k,date:R,title:H,body:E,linkList:L,link:A,newBadge:U},B={release:"whatsNew.category.release",notice:"whatsNew.category.notice",deprecation:"whatsNew.category.deprecation",tip:"whatsNew.category.tip"};function m({announcement:s,isNew:g}){const{locale:r,t:i}=u(),o=g?n.cardUnread:n.cardRead,h=s.title[r]??s.title.en,l=s.body[r]??s.body.en,d=s.links??(s.link?[s.link]:[]),_=c=>typeof c=="string"?c:c[r]??c.en;return e.jsxs("div",{className:`${n.card} ${o}`,children:[e.jsxs("div",{className:n.topRow,children:[e.jsx("span",{className:n.categoryChip,children:i(B[s.category])}),s.version&&e.jsx("span",{className:n.versionChip,children:s.version}),g&&e.jsx("span",{className:n.newBadge,children:i("whatsNew.newBadge","NEW")}),e.jsx("span",{className:n.date,children:s.date})]}),e.jsx("h3",{className:n.title,children:h}),e.jsx("p",{className:n.body,children:l}),d.length>0&&e.jsx("div",{className:n.linkList,children:d.map(c=>{const p=_(c.url),t=_(c.label);return e.jsxs("a",{className:n.link,href:p,target:"_blank",rel:"noopener noreferrer",children:["↗"," ",t]},p)})})]})}const I="_page_19yl3_2",$="_pageHeader_19yl3_10",M="_pageHeaderText_19yl3_17",z="_pageTitle_19yl3_24",W="_pageSubtitle_19yl3_31",O="_settingsIcon_19yl3_38",Y="_section_19yl3_67",G="_sectionTitle_19yl3_73",K="_unreadCount_19yl3_85",P="_empty_19yl3_100",q="_divider_19yl3_108",a={page:I,pageHeader:$,pageHeaderText:M,pageTitle:z,pageSubtitle:W,settingsIcon:O,section:Y,sectionTitle:G,unreadCount:K,empty:P,divider:q};function F(){const{t:s}=u(),{readSet:g,markRead:r}=w(),i=N.useMemo(()=>{const t=[];for(const x of y)g.has(x.id)||t.push(x.id);return t},[]),o=N.useRef(i);o.current=i,N.useEffect(()=>()=>{o.current.length>0&&r(o.current)},[]);const h=N.useMemo(()=>new Set(i),[i]),l=y.filter(t=>h.has(t.id)),d=y.filter(t=>!h.has(t.id)),_=l.length>0,c=d.length>0,p=e.jsxs("div",{className:a.pageHeader,children:[e.jsxs("div",{className:a.pageHeaderText,children:[e.jsx("h1",{className:a.pageTitle,children:s("whatsNew.pageTitle","What's New")}),e.jsx("p",{className:a.pageSubtitle,children:s("whatsNew.pageSubtitle","Stay up to date with MCP changes")})]}),e.jsx(f,{text:s("sidebar.settings","Settings"),children:e.jsx(j,{to:"/settings","aria-label":s("sidebar.settings","Settings"),className:a.settingsIcon,children:"⚙️"})})]});return y.length===0?e.jsxs("div",{className:a.page,children:[p,e.jsx("p",{className:a.empty,children:s("whatsNew.empty","No announcements yet")})]}):e.jsxs("div",{className:a.page,children:[p,_&&e.jsxs("section",{className:a.section,children:[e.jsxs("h2",{className:a.sectionTitle,children:[s("whatsNew.unreadSection","Unread"),e.jsx("span",{className:a.unreadCount,children:l.length})]}),l.map(t=>e.jsx(m,{announcement:t,isNew:!0},`unread-${t.id}`))]}),_&&c&&e.jsx("hr",{className:a.divider}),c&&e.jsxs("section",{className:a.section,children:[e.jsx("h2",{className:a.sectionTitle,children:s("whatsNew.allSection","All Announcements")}),d.map(t=>e.jsx(m,{announcement:t,isNew:!1},`all-${t.id}`))]})]})}export{F as Component};
@@ -1 +0,0 @@
1
- ._card_f20gt_2{position:relative;display:flex;flex-direction:column;gap:8px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius);border-left-width:3px;background:var(--bg-card)}._cardUnread_f20gt_15{border-left-color:var(--accent)}._cardRead_f20gt_20{border-left-color:var(--text-muted)}._topRow_f20gt_25{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._categoryChip_f20gt_32{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:var(--accent-dim);color:var(--accent)}._versionChip_f20gt_45{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:600;background:#7f8daa24;color:var(--text-secondary);font-family:var(--font-code)}._date_f20gt_57{margin-left:auto;font-size:12px;color:var(--text-muted);white-space:nowrap}._title_f20gt_65{margin:0;font-size:15px;font-weight:700;color:var(--text-primary);line-height:1.3}._body_f20gt_74{font-size:13px;color:var(--text-secondary);line-height:1.5;white-space:pre-wrap;word-break:break-word}._linkList_f20gt_82{display:flex;flex-wrap:wrap;gap:8px}._link_f20gt_82{display:inline-flex;align-items:center;gap:4px;font-size:13px;color:var(--accent);text-decoration:none;font-weight:600}._link_f20gt_82:hover{text-decoration:underline}._newBadge_f20gt_104{display:inline-flex;align-items:center;padding:1px 6px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.06em;background:var(--error);color:#fff}._page_19yl3_2{display:flex;flex-direction:column;gap:24px;max-width:720px}._pageHeader_19yl3_10{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}._pageHeaderText_19yl3_17{display:flex;flex-direction:column;gap:4px;min-width:0}._pageTitle_19yl3_24{margin:0;font-size:22px;font-weight:700;color:var(--text-primary)}._pageSubtitle_19yl3_31{margin:0;font-size:13px;color:var(--text-secondary)}._settingsIcon_19yl3_38{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex-shrink:0;border:1px solid var(--border);border-radius:12px;background:var(--bg-card);color:var(--text-primary);font-size:18px;text-decoration:none;transition:border-color var(--transition),background var(--transition),color var(--transition),transform var(--transition)}._settingsIcon_19yl3_38:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent);text-decoration:none;transform:translateY(-1px)}._section_19yl3_67{display:flex;flex-direction:column;gap:12px}._sectionTitle_19yl3_73{display:flex;align-items:center;gap:8px;margin:0;font-size:14px;font-weight:700;color:var(--text-primary);text-transform:uppercase;letter-spacing:.06em}._unreadCount_19yl3_85{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;font-size:11px;font-weight:700;background:var(--error);color:#fff}._empty_19yl3_100{padding:32px 0;text-align:center;font-size:14px;color:var(--text-muted)}._divider_19yl3_108{height:1px;background:var(--border);border:none;margin:0}
@@ -1 +0,0 @@
1
- @import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap";._container_6jg7e_2{position:fixed;bottom:16px;right:16px;z-index:2000;display:flex;flex-direction:column-reverse;gap:8px;pointer-events:none}._toast_6jg7e_14{pointer-events:auto;padding:10px 16px;border-radius:var(--radius-sm);font-family:var(--font-label);font-size:13px;color:var(--text-primary);box-shadow:0 4px 12px #0000004d;animation:_slideIn_6jg7e_1 .25s ease-out;max-width:320px}@keyframes _slideIn_6jg7e_1{0%{opacity:0;transform:translate(40px)}to{opacity:1;transform:translate(0)}}._success_6jg7e_39{background:color-mix(in srgb,var(--success) 22%,transparent);border-left:3px solid var(--success)}._info_6jg7e_44{background:color-mix(in srgb,var(--accent) 22%,transparent);border-left:3px solid var(--accent)}._warning_6jg7e_49{background:color-mix(in srgb,var(--warning) 22%,transparent);border-left:3px solid var(--warning)}._error_6jg7e_54{background:var(--error-bg);border-left:3px solid var(--error-border)}._wrapper_x0nim_2{display:inline-flex}._tooltip_x0nim_11{position:fixed;background:var(--bg-card);border:1px solid var(--border);color:var(--text-primary);font-size:12px;padding:4px 8px;border-radius:4px;width:max-content;max-width:min(320px,calc(100vw - 32px));white-space:normal;overflow-wrap:anywhere;text-align:left;pointer-events:none;opacity:0;transition:opacity var(--transition);z-index:1000}._tooltipVisible_x0nim_30{opacity:1}._widget_birep_1{margin:8px 12px 4px;padding:12px;border:1px solid var(--pro-border);border-radius:var(--radius);background:var(--pro-bg-soft);display:flex;flex-direction:column;gap:10px}._header_birep_12{display:flex;align-items:center;gap:8px}._sparkle_birep_18{color:var(--pro-text);flex-shrink:0}._title_birep_23{font-family:var(--font-label);font-size:12px;font-weight:600;color:var(--pro-text);line-height:1.3}._cta_birep_31{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:var(--radius-sm);background:var(--pro-badge);color:var(--pro-text-on-badge);font-family:var(--font-label);font-size:12px;font-weight:700;text-decoration:none;transition:filter var(--transition),transform var(--transition)}._cta_birep_31:hover{filter:brightness(1.08);transform:translateY(-1px);text-decoration:none}._collapsed_birep_52{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;margin:8px auto;border-radius:var(--radius-sm);background:var(--pro-bg-soft);color:var(--pro-text);text-decoration:none;transition:filter var(--transition)}._collapsed_birep_52:hover{filter:brightness(1.15);text-decoration:none}._sidebar_1ei54_2{width:var(--sidebar-width);min-width:var(--sidebar-width);height:100%;display:flex;flex-direction:column;background:var(--bg-sidebar);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-right:1px solid var(--border);padding:0 0 16px;overflow:visible;transition:width var(--transition),min-width var(--transition)}._brand_1ei54_17{display:flex;align-items:center;gap:10px;min-height:var(--header-height);padding:0 16px;border-bottom:1px solid var(--border);margin-bottom:8px;flex-shrink:0}._brandIcon_1ei54_28{color:var(--accent);flex-shrink:0}._brandText_1ei54_33{font-family:var(--font-label);font-size:14px;font-weight:700;color:var(--text-primary);letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._brandTextPro_1ei54_44{color:var(--pro-text);text-shadow:0 0 18px rgba(212,167,44,.18)}._nav_1ei54_50{display:flex;flex-direction:column;gap:2px}._spacer_1ei54_57{flex:1;min-height:16px}._navLink_1ei54_63{display:flex;align-items:center;gap:12px;padding:10px 16px;color:var(--text-secondary);text-decoration:none;font-size:14px;font-weight:500;border-left:4px solid transparent;transition:color var(--transition),background var(--transition),border-color var(--transition)}._navLink_1ei54_63:hover{color:var(--text-primary);background:var(--accent-dim);text-decoration:none}._navLink_1ei54_63._active_1ei54_84{color:var(--accent);border-left-color:var(--accent);background:var(--accent-dim)}._navLink_1ei54_63._disabled_1ei54_91{color:var(--text-muted);pointer-events:none;cursor:default}._navLink_1ei54_63._disabled_1ei54_91:hover{background:transparent}._icon_1ei54_102{width:20px;height:20px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:currentColor}._label_1ei54_113{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._secondaryDivider_1ei54_120{height:1px;margin:4px 16px;background:var(--border)}._secondaryNav_1ei54_127{display:flex;flex-direction:column;gap:2px}._helpDivider_1ei54_134{height:1px;margin:8px 16px 4px;background:var(--border)}._helpGroupTitle_1ei54_141{padding:4px 16px 6px;font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)}._helpNav_1ei54_152{display:flex;flex-direction:column;gap:2px}._externalIcon_1ei54_159{margin-left:auto;display:inline-flex;align-items:center;color:var(--text-muted)}@media(max-width:768px){._sidebar_1ei54_2{width:var(--sidebar-collapsed);min-width:var(--sidebar-collapsed)}._brand_1ei54_17{justify-content:center;padding:0}._brandText_1ei54_33{display:none}._navLink_1ei54_63{justify-content:center;padding:10px 0;gap:0}._label_1ei54_113,._helpGroupTitle_1ei54_141,._externalIcon_1ei54_159{display:none}}._header_4psrj_2{display:flex;flex-direction:column;justify-content:center;gap:4px;height:var(--header-height);padding:8px 24px;border-bottom:1px solid var(--border);background:var(--bg-card);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);flex-shrink:0;overflow:hidden}._row1_4psrj_17{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}._projectIdentity_4psrj_25{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0;flex:1}._folderIcon_4psrj_34{color:var(--accent);flex-shrink:0}._projectName_4psrj_39{margin:0;font-size:15px;font-weight:700;color:var(--text-primary);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:clamp(120px,30vw,360px)}._placeChips_4psrj_51{display:flex;gap:6px;flex-wrap:wrap;min-width:0}._metaActions_4psrj_58{display:flex;align-items:center;gap:8px;flex-shrink:0}._placeChip_4psrj_51{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border:1px solid var(--border);border-radius:var(--radius-pill);background:var(--bg-overlay);color:var(--text-secondary);font-size:12px;font-weight:600;line-height:1.4;cursor:default}._placeChipStatic_4psrj_81,._placeChipMuted_4psrj_82{cursor:default}._placeChipActive_4psrj_86{border-color:var(--border-highlight);color:var(--text-primary);background:var(--accent-dim);box-shadow:0 0 0 1px var(--accent-glow) inset}._placeChipInactive_4psrj_93{border-color:var(--border);color:var(--text-muted);opacity:.85}._placeChipMuted_4psrj_82{border-color:var(--border);color:var(--text-muted)}._placeChipId_4psrj_104{font-family:var(--font-code);font-weight:500;font-size:11px;color:var(--text-muted);padding-left:6px;margin-left:2px;border-left:1px solid var(--border)}._placeChipActive_4psrj_86 ._placeChipId_4psrj_104{color:var(--text-secondary);border-left-color:var(--border-highlight)}._placeDot_4psrj_119{width:7px;height:7px;border-radius:var(--radius-pill);background:var(--success);box-shadow:0 0 6px var(--success)}._placeChipName_4psrj_127{white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis}._row2_4psrj_135{display:flex;align-items:center;gap:16px;min-width:0}._pathGroup_4psrj_142{display:flex;align-items:center;gap:10px;min-width:0;flex:1}._projectPath_4psrj_150{font-family:var(--font-code);font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}._changeButton_4psrj_160{display:inline-flex;align-items:center;justify-content:center;height:26px;padding:0 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-overlay);color:var(--text-primary);font:inherit;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._changeButton_4psrj_160:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent)}._changeButton_4psrj_160:disabled{cursor:not-allowed;opacity:.52}._iconButton_4psrj_193{position:relative;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-overlay);color:var(--text-primary);text-decoration:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._iconButton_4psrj_193:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent);text-decoration:none}._notificationDot_4psrj_218{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:var(--radius-pill);background:var(--error);box-shadow:0 0 0 2px var(--bg-overlay)}@media(max-width:768px){._header_4psrj_2{padding:10px 16px}._row1_4psrj_17,._projectIdentity_4psrj_25{gap:8px}._row2_4psrj_135{flex-direction:column;align-items:flex-start;gap:8px}._pathGroup_4psrj_142{width:100%}}._bellWrapper_tae21_2{position:relative;display:inline-flex}._unreadDot_tae21_8{position:absolute;top:4px;right:4px;width:8px;height:8px;border-radius:50%;background:var(--error);border:2px solid var(--bg-card);pointer-events:none}._backdrop_1ozbv_1{position:fixed;top:0;right:0;bottom:0;left:0;background:#0c1018b8;display:grid;place-items:center;z-index:1000;padding:24px}._modal_1ozbv_12{width:min(420px,100%);background:var(--bg-overlay);border:1px solid var(--border);border-radius:18px;box-shadow:0 24px 48px #0307126b;padding:24px}._title_1ozbv_23{margin:0 0 12px;color:var(--text-primary);font-size:20px}._message_1ozbv_30{margin:0;color:var(--text-secondary);line-height:1.6}._actions_1ozbv_37{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}._cancelButton_1ozbv_44,._confirmButton_1ozbv_45{border:0;border-radius:var(--radius);padding:10px 14px;font:inherit;cursor:pointer}._cancelButton_1ozbv_44{background:var(--border);border:1px solid transparent;color:var(--text-primary)}._confirmButton_1ozbv_45{background:var(--error-bg);border:1px solid var(--error-border);color:var(--error-text)}._cancelButton_1ozbv_44:disabled,._confirmButton_1ozbv_45:disabled{cursor:not-allowed;opacity:.6}._pathBlock_1ozbv_75{display:grid;gap:6px}._pathLabel_1ozbv_80{font-size:12px;font-weight:700;color:var(--text-secondary)}._pathCode_1ozbv_86{display:block;overflow-wrap:anywhere;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-size:12px;line-height:1.5}._bodyGrid_1ozbv_98{display:grid;gap:14px;margin-top:18px}._warningList_1ozbv_104{margin:0;padding-left:18px;color:var(--text-secondary);line-height:1.6}._errorMessage_1ozbv_111{margin-top:0;color:var(--error-text)}._layout_ya8ln_2{display:flex;height:100%;overflow:hidden}._mainShell_ya8ln_8{flex:1;min-width:0;display:flex;flex-direction:column;overflow:visible}._content_ya8ln_17{flex:1 1 auto;min-height:0;overflow-y:auto;padding:24px}._loading_ya8ln_25{display:flex;align-items:center;justify-content:center;height:100%;color:var(--text-muted);font-size:14px}:root{--bg-primary: #0b0e1a;--bg-secondary: #0f1525;--bg-card: #111827;--bg-sidebar: rgba(11, 14, 26, .95);--bg-overlay: rgba(15, 21, 37, .88);--text-primary: #e2e8f0;--text-secondary: #94a3b8;--text-muted: #475569;--border: #1e293b;--border-highlight: #2563eb;--accent: #3b82f6;--accent-dim: rgba(59, 130, 246, .12);--accent-glow: rgba(59, 130, 246, .25);--pro-badge: #d4a72c;--pro-text: #f3d46b;--pro-text-on-badge: #1a1407;--pro-bg: #3a2d12;--pro-bg-soft: rgba(212, 167, 44, .12);--pro-border: #8f6f1f;--success: #22c55e;--success-bg: rgba(34, 197, 94, .14);--success-border: rgba(34, 197, 94, .5);--success-text: #86efac;--warning: #f59e0b;--warning-bg: rgba(245, 158, 11, .14);--warning-border: rgba(245, 158, 11, .5);--warning-text: #fcd34d;--info: #60a5fa;--info-bg: rgba(96, 165, 250, .14);--info-border: rgba(96, 165, 250, .5);--info-text: #93c5fd;--error: #ef4444;--error-bg: rgba(239, 68, 68, .12);--error-border: rgba(239, 68, 68, .5);--error-text: #f4c1c1;--danger: #d15454;--danger-bg: rgba(209, 84, 84, .12);--danger-border: rgba(209, 84, 84, .5);--danger-text: #f4c1c1;--danger-hover-bg: rgba(209, 84, 84, .2);--diff-add: var(--success);--diff-add-bg: var(--success-bg);--diff-add-text: var(--success-text);--diff-remove: var(--error);--diff-remove-bg: var(--error-bg);--diff-remove-text: var(--error-text);--diff-update: var(--warning);--diff-update-bg: var(--warning-bg);--diff-update-text: var(--warning-text);--diff-rename: var(--info);--diff-rename-bg: var(--info-bg);--diff-rename-text: var(--info-text);--font-code: "JetBrains Mono", "Fira Code", monospace;--font-label: "Inter", "DM Sans", -apple-system, sans-serif;--sidebar-width: 220px;--sidebar-collapsed: 56px;--header-height: 72px;--content-max: 1080px;--content-gap: 16px;--radius: 10px;--radius-sm: 6px;--radius-pill: 999px;--transition: .2s ease}@media(prefers-color-scheme:light){:root{--bg-primary: #f1f5f9;--bg-secondary: #ffffff;--bg-card: #ffffff;--bg-sidebar: rgba(255, 255, 255, .95);--bg-overlay: rgba(255, 255, 255, .95);--text-primary: #0f172a;--text-secondary: #475569;--text-muted: #94a3b8;--border: #e2e8f0;--border-highlight: #3b82f6;--accent: #2563eb;--accent-dim: rgba(37, 99, 235, .08);--accent-glow: rgba(37, 99, 235, .15);--pro-badge: #b07c00;--pro-text: #8a5f00;--pro-text-on-badge: #1a1407;--pro-bg: #fff4d6;--pro-bg-soft: rgba(176, 124, 0, .12);--pro-border: #d9b14d;--success: #16a34a;--success-bg: rgba(22, 163, 74, .1);--success-border: rgba(22, 163, 74, .4);--success-text: #166534;--warning: #d97706;--warning-bg: rgba(217, 119, 6, .1);--warning-border: rgba(217, 119, 6, .4);--warning-text: #92400e;--info: #2563eb;--info-bg: rgba(37, 99, 235, .1);--info-border: rgba(37, 99, 235, .4);--info-text: #1d4ed8;--error: #dc2626;--error-bg: rgba(220, 38, 38, .08);--error-border: rgba(220, 38, 38, .3);--error-text: #b91c1c;--danger: #dc2626;--danger-bg: rgba(220, 38, 38, .08);--danger-border: rgba(220, 38, 38, .4);--danger-text: #b91c1c;--danger-hover-bg: rgba(220, 38, 38, .16)}}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;font-family:var(--font-label);background:var(--bg-primary);color:var(--text-primary);line-height:1.5;-webkit-font-smoothing:antialiased}#root{height:100%}code,pre,.mono{font-family:var(--font-code)}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{font-family:inherit;cursor:pointer}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}