@weppy/roblox-mcp 2.7.3 → 2.7.5

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 (31) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +14 -0
  3. package/package.json +1 -1
  4. package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +1 -1
  5. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogDetailPage-BWM0bhGw.js → ChangelogDetailPage-DglsIYkW.js} +1 -1
  6. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogPage-DOXmMWDc.js → ChangelogPage-65B3_w0_.js} +1 -1
  7. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-Dak7jVJo.js → ConfirmModal-Cpk7SbKb.js} +1 -1
  8. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConnectionPage-Cds2YIvI.js → ConnectionPage-B-IN5LsC.js} +1 -1
  9. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{GameChangeDetail-MfVogSqQ.js → GameChangeDetail-DM3mWsFX.js} +1 -1
  10. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-BDieYXVe.js → InfoLabel-B_fEbHa7.js} +1 -1
  11. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-CTH7jUzQ.js → OverviewPage-B4O0bv4R.js} +1 -1
  12. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PlaytestPage-BHQoeC4V.js → PlaytestPage-BHLRKn8U.js} +1 -1
  13. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SettingsPage-BL3qgVfn.js → SettingsPage-DmIKC_O1.js} +1 -1
  14. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-MxsMOCZ3.js → StatusBadge-DRdnq30k.js} +1 -1
  15. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SyncPage-IZEcPmIw.js → SyncPage-CW_0kNpZ.js} +1 -1
  16. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{Tabs-CuTJuL80.js → Tabs-BsTVkBUh.js} +1 -1
  17. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierComparison-DvuMctLJ.js → TierComparison-poRtDe46.js} +1 -1
  18. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-Bt9vYA7u.css +1 -0
  19. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-D77yJ9jZ.js +1 -0
  20. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TooltipText-DgxJjq91.js → TooltipText-DX5jnyNF.js} +1 -1
  21. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/UiStudioPage-YtdlkQzT.js +16 -0
  22. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{WhatsNewPage-CcELayE3.js → WhatsNewPage--uCu0xCm.js} +1 -1
  23. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{index-CjBiayQg.js → index-BPIBy2lU.js} +29 -29
  24. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{sample-requests-BrVQkhcR.js → sample-requests-CwDMfktX.js} +1 -1
  25. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-s_CjVcUM.js → useLiveUptime-ElD9lDzh.js} +1 -1
  26. package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +1 -1
  27. package/plugins/weppy-roblox-mcp/dist/index.js +89 -88
  28. package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  29. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-ByA_a1TP.js +0 -1
  30. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-Dq7uIer6.css +0 -1
  31. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/UiStudioPage-DVFz_q9v.js +0 -16
@@ -0,0 +1,16 @@
1
+ import{q as ne,s as q,t as Ee,r as u,u as A,j as t,i as H,R as He,p as Se,l as Oe,v as Ue}from"./index-BPIBy2lU.js";import{D as je,T as we}from"./TierComparison-poRtDe46.js";import{I as M}from"./InfoLabel-B_fEbHa7.js";import{T as f}from"./TooltipText-DX5jnyNF.js";import{D as oe,c as le,e as Fe,g as ze,h as qe,i as ce,j as ve,k as Ve,l as de,d as We}from"./sample-requests-CwDMfktX.js";import{T as Ke}from"./Tabs-BsTVkBUh.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 Qe=[["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"}]],Ye=ne("camera",Qe);/**
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 Je=[["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"}]],Xe=ne("ellipsis",Je);/**
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 Ze=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],et=ne("x",Ze);async function be(e){const i=await fetch(`${q}${e}`);if(!i.ok){let a=null;try{a=await i.json()}catch{}throw new Ee(i.status,(a==null?void 0:a.message)??i.statusText,(a==null?void 0:a.error)??null,a)}return await i.json()}function U(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function tt(e){return e.design_check_summary?{priority_high:U(e.design_check_summary.priority_high),priority_medium:U(e.design_check_summary.priority_medium),priority_low:U(e.design_check_summary.priority_low)}:e.lint_summary?{priority_high:U(e.lint_summary.errors),priority_medium:U(e.lint_summary.warnings),priority_low:0}:null}function it(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 Ce(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:tt(e),image:e.image}}function at(e){const i=e.check_results??e.lint_results??[];return{...Ce(e),check_results:i.map(it),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 l=a.toString()?`?${a.toString()}`:"",o=await be(`/api/ui-studio/snapshots${l}`);return{...o,snapshots:o.snapshots.map(Ce)}}async function st(e,i){const a=i!==void 0?`?placeId=${i}`:"",l=await be(`/api/ui-studio/snapshots/${encodeURIComponent(e)}${a}`);return at(l)}function Ie(e,i){const a=i!==void 0?`?placeId=${i}`:"";return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image${a}`}const rt=1e4;function Ne(e=50){const[i,a]=u.useState(null),[l,o]=u.useState(!0),[s,n]=u.useState(null),h=u.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{o(!1)}},[e]);return u.useEffect(()=>{let d=!1;const _=async()=>{try{const p=await ue(void 0,e);d||(a(p),n(null))}catch(p){d||n(p instanceof Error?p.message:String(p))}finally{d||o(!1)}};_();const m=setInterval(()=>{_()},rt);return()=>{d=!0,clearInterval(m)}},[e]),{data:i,loading:l,error:s,refresh:h}}const nt="_page_1fjjw_2",ot="_grid_1fjjw_9",lt="_card_1fjjw_16",ct="_cardBodyButton_1fjjw_31",dt="_thumb_1fjjw_43",ut="_badges_1fjjw_52",ht="_priorityHighBadge_1fjjw_60",pt="_priorityMediumBadge_1fjjw_69",gt="_priorityLowBadge_1fjjw_78",mt="_cardMeta_1fjjw_87",_t="_target_1fjjw_93",yt="_time_1fjjw_100",ft="_drawer_1fjjw_105",xt="_drawerToolbar_1fjjw_122",St="_drawerTitleBlock_1fjjw_133",jt="_drawerEyebrow_1fjjw_140",wt="_drawerTarget_1fjjw_149",vt="_drawerToolbarActions_1fjjw_159",bt="_closeBtn_1fjjw_167",Ct="_detailBody_1fjjw_188",It="_screenshotPreviewFrame_1fjjw_195",Nt="_fullImg_1fjjw_208",Pt="_metaDl_1fjjw_215",kt="_errorMsg_1fjjw_227",Tt="_suggestionsWrap_1fjjw_232",Bt="_prioritySection_1fjjw_239",Dt="_sectionHighHeader_1fjjw_243",Gt="_sectionLowHeader_1fjjw_249",Mt="_sectionMediumHeader_1fjjw_255",At="_groupCard_1fjjw_261",Rt="_groupHeader_1fjjw_268",Lt="_groupLabel_1fjjw_284",$t="_groupCount_1fjjw_289",Et="_groupChevron_1fjjw_296",Ht="_groupBody_1fjjw_300",Ot="_groupDescription_1fjjw_303",Ut="_groupFix_1fjjw_308",Ft="_falsePositive_1fjjw_317",zt="_itemList_1fjjw_325",qt="_suggestionItem_1fjjw_333",Vt="_suggestionInfo_1fjjw_343",Wt="_pathBreadcrumb_1fjjw_349",Kt="_currentValue_1fjjw_358",Qt="_copyFixBtn_1fjjw_362",Yt="_emptySuggestions_1fjjw_376",Jt="_sampleBanner_1fjjw_384",Xt="_sampleBannerRow_1fjjw_397",Zt="_sampleBannerMain_1fjjw_405",ei="_sampleBadge_1fjjw_413",ti="_sampleTitle_1fjjw_423",ii="_sampleMessage_1fjjw_430",ai="_sampleActions_1fjjw_437",si="_primaryAction_1fjjw_445",ri="_secondaryAction_1fjjw_446",ni="_emptyState_1fjjw_481",oi="_pluginGuideCard_1fjjw_489",li="_pluginGuideMarker_1fjjw_500",ci="_pluginGuideBody_1fjjw_515",di="_pluginGuideTitle_1fjjw_519",ui="_pluginGuideMessage_1fjjw_527",hi="_pluginGuideChecklist_1fjjw_534",pi="_pluginGuideWaiting_1fjjw_557",gi="_pluginGuideDot_1fjjw_566",mi="_analysisWorkspace_1fjjw_574",_i="_analysisMainColumn_1fjjw_579",yi="_analysisDetailPopupLayer_1fjjw_583",fi="_analysisDetailDialog_1fjjw_600",xi="_analysisSummaryPanel_1fjjw_619",Si="_recentCapturesHeader_1fjjw_632",ji="_analysisSummaryText_1fjjw_639",wi="_recentCapturesMeta_1fjjw_640",vi="_analysisReportGrid_1fjjw_646",bi="_analysisReportGroup_1fjjw_653",Ci="_analysisReportCard_1fjjw_657",Ii="_analysisReportThumb_1fjjw_679",Ni="_analysisReportBody_1fjjw_688",Pi="_analysisReportTopline_1fjjw_695",ki="_analysisVerdict_1fjjw_702",Ti="_analysisVerdict_needsFix_1fjjw_713",Bi="_analysisVerdict_review_1fjjw_714",Di="_analysisVerdict_passed_1fjjw_719",Gi="_analysisReportCounts_1fjjw_724",Mi="_analysisReportTarget_1fjjw_729",Ai="_analysisReportIssue_1fjjw_738",Ri="_analysisReportMeta_1fjjw_744",Li="_analysisChildList_1fjjw_751",$i="_analysisChildRow_1fjjw_762",Ei="_analysisChildPath_1fjjw_783",Hi="_analysisChildSummary_1fjjw_792",Oi="_analysisChildDetailHint_1fjjw_793",Ui="_drawerAnalysisSummary_1fjjw_802",Fi="_drawerAnalysisSummaryItem_1fjjw_813",zi="_drawerAnalysisLabel_1fjjw_820",qi="_drawerAnalysisCounts_1fjjw_826",Vi="_drawerAnalysisValue_1fjjw_827",Wi="_recentCapturesSection_1fjjw_832",Ki="_drawerPrimaryActions_1fjjw_844",Qi="_drawerActionBtn_1fjjw_851",Yi="_drawerMoreMenu_1fjjw_880",Ji="_drawerMoreButton_1fjjw_885",Xi="_drawerMoreMenuBody_1fjjw_910",Zi="_drawerMenuItem_1fjjw_923",ea="_drawerMenuItemDanger_1fjjw_946",ta="_actionErrMsg_1fjjw_955",ia="_actionStatusMsg_1fjjw_964",aa="_actionStatus_info_1fjjw_978",sa="_actionStatus_success_1fjjw_984",ra="_actionStatus_warning_1fjjw_990",na="_actionStatusDetail_1fjjw_996",oa="_galleryHeader_1fjjw_1002",la="_cardChecked_1fjjw_1015",ca="_cardCheckbox_1fjjw_1022",da="_captureSelectionActions_1fjjw_1062",ua="_selectionToolbar_1fjjw_1071",ha="_selectionBar_1fjjw_1072",pa="_selectionToolbarCount_1fjjw_1091",ga="_selectionToolbarActions_1fjjw_1098",ma="_selectionBarBtn_1fjjw_1105",_a="_selectionBarBtnDanger_1fjjw_1126",r={page:nt,grid:ot,card:lt,cardBodyButton:ct,thumb:dt,badges:ut,priorityHighBadge:ht,priorityMediumBadge:pt,priorityLowBadge:gt,cardMeta:mt,target:_t,time:yt,drawer:ft,drawerToolbar:xt,drawerTitleBlock:St,drawerEyebrow:jt,drawerTarget:wt,drawerToolbarActions:vt,closeBtn:bt,detailBody:Ct,screenshotPreviewFrame:It,fullImg:Nt,metaDl:Pt,errorMsg:kt,suggestionsWrap:Tt,prioritySection:Bt,sectionHighHeader:Dt,sectionLowHeader:Gt,sectionMediumHeader:Mt,groupCard:At,groupHeader:Rt,groupLabel:Lt,groupCount:$t,groupChevron:Et,groupBody:Ht,groupDescription:Ot,groupFix:Ut,falsePositive:Ft,itemList:zt,suggestionItem:qt,suggestionInfo:Vt,pathBreadcrumb:Wt,currentValue:Kt,copyFixBtn:Qt,emptySuggestions:Yt,sampleBanner:Jt,sampleBannerRow:Xt,sampleBannerMain:Zt,sampleBadge:ei,sampleTitle:ti,sampleMessage:ii,sampleActions:ai,primaryAction:si,secondaryAction:ri,emptyState:ni,pluginGuideCard:oi,pluginGuideMarker:li,pluginGuideBody:ci,pluginGuideTitle:di,pluginGuideMessage:ui,pluginGuideChecklist:hi,pluginGuideWaiting:pi,pluginGuideDot:gi,analysisWorkspace:mi,analysisMainColumn:_i,analysisDetailPopupLayer:yi,analysisDetailDialog:fi,analysisSummaryPanel:xi,recentCapturesHeader:Si,analysisSummaryText:ji,recentCapturesMeta:wi,analysisReportGrid:vi,analysisReportGroup:bi,analysisReportCard:Ci,analysisReportThumb:Ii,analysisReportBody:Ni,analysisReportTopline:Pi,analysisVerdict:ki,analysisVerdict_needsFix:Ti,analysisVerdict_review:Bi,analysisVerdict_passed:Di,analysisReportCounts:Gi,analysisReportTarget:Mi,analysisReportIssue:Ai,analysisReportMeta:Ri,analysisChildList:Li,analysisChildRow:$i,analysisChildPath:Ei,analysisChildSummary:Hi,analysisChildDetailHint:Oi,drawerAnalysisSummary:Ui,drawerAnalysisSummaryItem:Fi,drawerAnalysisLabel:zi,drawerAnalysisCounts:qi,drawerAnalysisValue:Vi,recentCapturesSection:Wi,drawerPrimaryActions:Ki,drawerActionBtn:Qi,drawerMoreMenu:Yi,drawerMoreButton:Ji,drawerMoreMenuBody:Xi,drawerMenuItem:Zi,drawerMenuItemDanger:ea,actionErrMsg:ta,actionStatusMsg:ia,actionStatus_info:aa,actionStatus_success:sa,actionStatus_warning:ra,actionStatusDetail:na,galleryHeader:oa,cardChecked:la,cardCheckbox:ca,captureSelectionActions:da,selectionToolbar:ua,selectionBar:ha,selectionToolbarCount:pa,selectionToolbarActions:ga,selectionBarBtn:ma,selectionBarBtnDanger:_a};function ya({snapshot:e,placeId:i,onClick:a,imageUrlOverride:l,selectable:o,selected:s,onToggleSelect:n}){var v,b,T;const{t:h}=A(),d=((v=e.design_check_summary)==null?void 0:v.priority_high)??0,_=((b=e.design_check_summary)==null?void 0:b.priority_medium)??0,m=((T=e.design_check_summary)==null?void 0:T.priority_low)??0,p=new Date(e.captured_at*1e3).toLocaleString(),y=l??Ie(e.snapshot_id,i),S=()=>{n==null||n(e.snapshot_id)};return t.jsxs("div",{className:`${r.card} ${s?r.cardChecked:""}`,children:[o&&t.jsx(f,{text:h("uiStudio.gallery.cardCheckbox.tooltip","Select this capture. Pick multiple to delete them together."),children:t.jsx("input",{className:r.cardCheckbox,type:"checkbox","aria-label":h("uiStudio.gallery.cardCheckbox","Select screenshot"),checked:!!s,onChange:S})}),t.jsxs("button",{className:r.cardBodyButton,onClick:P=>a(P.currentTarget),type:"button",children:[t.jsx("img",{className:r.thumb,src:y,alt:e.snapshot_id,loading:"lazy"}),t.jsxs("div",{className:r.badges,children:[d>0&&t.jsx(f,{text:h("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(f,{text:h("uiStudio.gallery.priorityMediumBadge.tooltip","Number of recommended suggestions."),children:t.jsx("span",{className:r.priorityMediumBadge,children:_})}),m>0&&t.jsx(f,{text:h("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:p})]})]})]})}const fa={touch_target:"touchTarget",contrast:"contrast",text_scaled:"textScaled",safezone:"safezone",min_text_size:"minTextSize"};function xa(e){return e.rule==="contrast"&&/\.(Icon|Avatar|EmptyIcon|GoldIcon|[A-Za-z]*Icon)$/.test(e.path)}const Sa={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 ja(e,i,a){const l=fa[e];return l?{...i,checkLabel:a(`uiStudio.fix.${l}.label`,i.checkLabel),description:a(`uiStudio.fix.${l}.description`,i.description),howToFix:a(`uiStudio.fix.${l}.howToFix`,i.howToFix),falsePositiveNote:i.falsePositiveNote?a(`uiStudio.fix.${l}.falsePositive`,i.falsePositiveNote):void 0}:i}function wa(e,i){const a=Sa[e]??null;return a?i?ja(e,a,i):a:null}function va(e){return xa(e)}function ba(e,i){const a=new Map;for(const o of e){const s=`${o.displayPriority}::${o.rule}`,n=a.get(s)??[];n.push(o),a.set(s,n)}const l=[];for(const[o,s]of a){const[n,h]=o.split("::"),d=s.filter(va).length;l.push({rule:h??"unknown",priority:n,items:s,fixTemplate:wa(h??"",i),falsePositiveRatio:s.length>0?d/s.length:0})}return l.sort((o,s)=>{const n={priority_high:0,priority_medium:1,priority_low:2};return o.priority!==s.priority?n[o.priority]-n[s.priority]:s.items.length-o.items.length}),{high:l.filter(o=>o.priority==="priority_high"),medium:l.filter(o=>o.priority==="priority_medium"),low:l.filter(o=>o.priority==="priority_low")}}function Pe(e){const i=e.split("."),a=i[i.length-1]??e,l=i[i.length-2],o=l?`${l} > ${a}`:a;return{full:e,breadcrumb:o,leaf:a}}function ke(e){return typeof e=="object"&&e!==null}function he(e){return ke(e.data)?e.data:{}}function ee(e,i){const a=e[i];return ke(a)?a:{}}function W(e,i){const a=e[i];return typeof a=="string"?a:null}function K(e,i){const a=e[i];return typeof a=="number"&&Number.isFinite(a)?a:0}function Ca(e){const i=ee(e,"design_check_summary");return{priority_high:K(i,"priority_high"),priority_medium:K(i,"priority_medium"),priority_low:K(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 Te(e,Ca(i))}function F(e,i,a,l,o){const s=e(i,a);return o?`${s}: ${o} · ${l}`:`${s}: ${l}`}function Ia(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 Na(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function Q(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function Te(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${Q(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${Q(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${Q(e,(i==null?void 0:i.priority_low)??0)}`}function Pa(e,i){return Te(e,i.design_check_summary)}function ka({snapshotId:e,placeId:i,onClose:a,sampleDetail:l,tier:o,onActionDone:s}){const[n,h]=u.useState(l??null),[d,_]=u.useState(null),[m,p]=u.useState(null),[y,S]=u.useState(null),[v,b]=u.useState(null),[T,P]=u.useState(null),{t:g}=A(),{trackEvent:N}=H(),C=o==="pro";u.useEffect(()=>{if(l){h(l),_(null);return}let w=!1;return st(e,i).then(D=>{w||h(D)}).catch(D=>{w||_(D instanceof Error?D.message:String(D))}),()=>{w=!0}},[e,i,l]);const j=async()=>{if(n!=null&&n.target){N("dashboard_click_event",{click_target:"ui_studio_capture_current",page:"ui-studio",tab:"ui_studio_analysis"}),p(null),b("preview"),S({tone:"info",message:g("uiStudio.actions.previewRunning","캡처 중..."),detail:g("uiStudio.actions.previewRunningDetail","완료되면 새 화면 캡처 파일 ID를 표시합니다.")});try{const w=await le("preview",{targetPath:n.target});pe(w);const D=he(w),L=W(D,"snapshot_id"),O=ee(D,"screenshot"),V=ee(D,"meta"),x=W(O,"saved_path"),G=W(V,"persist_warning"),k=ge(g,D);S(G?{tone:"warning",message:F(g,"uiStudio.actions.previewNeedsSaveCheck","캡처 완료, 저장 확인 필요",k,L),detail:G}:L&&x?{tone:"success",message:F(g,"uiStudio.actions.previewSaved","새 화면 캡처 저장 완료",k,L),detail:g("uiStudio.actions.previewSavedDetail","기존 화면 캡처는 변경하지 않고 새 파일로 저장했습니다.")}:L?{tone:"warning",message:F(g,"uiStudio.actions.previewComplete","캡처 완료",k,L),detail:g("uiStudio.actions.previewSavedPathMissing","새 화면 캡처 ID는 받았지만 저장 경로를 확인하지 못했습니다.")}:{tone:"warning",message:F(g,"uiStudio.actions.previewComplete","캡처 완료",k),detail:g("uiStudio.actions.previewSnapshotIdMissing","새 화면 캡처 ID를 확인하지 못했습니다. 목록을 새로고침해 저장 여부를 확인해 주세요.")}),await(s==null?void 0:s())}catch(w){p(w instanceof Error?w.message:String(w))}finally{b(null)}}},B=async()=>{if(n!=null&&n.target){N("dashboard_click_event",{click_target:"ui_studio_check_again",page:"ui-studio",tab:"ui_studio_analysis"}),p(null),b("check"),S({tone:"info",message:g("uiStudio.actions.designCheckRunning","개선 제안 확인 중..."),detail:g("uiStudio.actions.designCheckRunningDetail","완료되면 우선 검토/검토 권장/선택 개선 항목 수를 표시합니다.")});try{const w=await le("check",{targetPath:n.target});pe(w);const D=he(w),L=ge(g,D);S({tone:"success",message:F(g,"uiStudio.actions.designCheckComplete","개선 제안 확인 완료",L),detail:g("uiStudio.actions.designCheckNoSnapshotSaved","이 작업은 화면 캡처 파일을 새로 저장하지 않습니다.")}),await(s==null?void 0:s())}catch(w){p(w instanceof Error?w.message:String(w))}finally{b(null)}}},E=async()=>{p(null),S(null);try{await Fe(i,e),await(s==null?void 0:s()),P(null),a()}catch(w){throw p(w instanceof Error?w.message:String(w)),w}},I=C?void 0:g("uiStudio.actions.proRequired","Pro 업그레이드 후 사용 가능"),R=n!=null&&n.target?Pe(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:g("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(f,{text:I??g("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 j(),disabled:!C||!n.target||v!==null,type:"button",children:[t.jsx(Ye,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:g("uiStudio.actions.captureCurrentState","현재 상태 캡처")})]})}),t.jsx(f,{text:I??g("uiStudio.actions.checkSuggestionsAgain.tooltip","Recompute suggestions for this capture without taking a new screenshot."),children:t.jsxs("button",{className:r.drawerActionBtn,onClick:()=>void B(),disabled:!C||!n.target||v!==null,type:"button",children:[t.jsx(He,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:g("uiStudio.actions.checkSuggestionsAgain","개선 제안 다시 확인")})]})})]}),t.jsxs("details",{className:r.drawerMoreMenu,children:[t.jsx("summary",{className:r.drawerMoreButton,title:g("uiStudio.actions.more.tooltip","Open additional actions."),"aria-label":g("uiStudio.actions.more","More"),children:t.jsx(Xe,{size:18,"aria-hidden":"true"})}),t.jsx("div",{className:r.drawerMoreMenuBody,children:t.jsx(f,{text:I??g("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:()=>{N("dashboard_click_event",{click_target:"ui_studio_delete_snapshot",page:"ui-studio",tab:"ui_studio_analysis"}),P("deleteSnapshot")},disabled:!C,type:"button",children:g("uiStudio.actions.deleteSnapshot","이 화면 캡처 삭제")})})})]})]}),t.jsx(f,{text:g("uiStudio.detailClose.tooltip","Close this detail panel."),children:t.jsx("button",{className:r.closeBtn,onClick:a,type:"button","aria-label":g("uiStudio.detailClose","Close"),children:t.jsx(et,{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}),y&&t.jsxs("div",{className:`${r.actionStatusMsg} ${r[`actionStatus_${y.tone}`]??""}`,children:[t.jsx("div",{children:y.message}),y.detail&&t.jsx("div",{className:r.actionStatusDetail,children:y.detail})]}),t.jsx(Ta,{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(Ba,{items:n.check_results}),t.jsxs("dl",{className:r.metaDl,children:[t.jsx("dt",{children:t.jsx(M,{label:g("uiStudio.capturedAt","Captured"),tooltip:g("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(M,{label:g("uiStudio.scope","Scope"),tooltip:g("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(M,{label:g("uiStudio.target","Target"),tooltip:g("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(M,{label:g("uiStudio.briefId","Brief"),tooltip:g("uiStudio.briefId.tooltip","Identifier of the design brief that produced this UI.")})}),t.jsx("dd",{children:n.brief_id})]})]})]}),T==="deleteSnapshot"&&t.jsx(oe,{title:g("uiStudio.confirm.deleteSnapshotTitle","화면 캡처 삭제"),message:g("uiStudio.confirm.deleteSnapshotMessage","이 화면 캡처 파일만 삭제됩니다 (Studio 인스턴스 보존)."),danger:!0,confirmLabel:g("common.delete","삭제"),onConfirm:E,onClose:()=>P(null)})]})}function Ta({detail:e}){const{t:i}=A(),a=Ia(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(M,{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:Na(i,a)}),t.jsx("span",{className:r.drawerAnalysisCounts,children:Pa(i,e)})]}),t.jsxs("div",{className:r.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:r.drawerAnalysisLabel,children:t.jsx(M,{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 Ba({items:e}){const{t:i}=A();if(e.length===0)return t.jsx("p",{className:r.emptySuggestions,children:i("uiStudio.noSuggestions","현재 개선 제안 없음")});const{high:a,medium:l,low:o}=ba(e,i);return t.jsxs("div",{className:r.suggestionsWrap,children:[t.jsx("h3",{children:t.jsx(M,{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(Y,{group:s},`h-${s.rule}`))]}),l.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionMediumHeader,children:i("uiStudio.mediumPrioritySection","검토 권장")}),l.map(s=>t.jsx(Y,{group:s},`m-${s.rule}`))]}),o.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionLowHeader,children:i("uiStudio.lowPrioritySection","선택 개선")}),o.map(s=>t.jsx(Y,{group:s},`l-${s.rule}`))]})]})}function Y({group:e}){var n,h,d;const{t:i}=A(),[a,l]=u.useState(e.priority==="priority_high"&&e.items.length<=5),o=e.falsePositiveRatio>=.5&&!!((n=e.fixTemplate)!=null&&n.falsePositiveNote),s=((h=e.fixTemplate)==null?void 0:h.checkLabel)??e.rule;return t.jsxs("div",{className:r.groupCard,children:[t.jsx(f,{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:()=>l(_=>!_),type:"button",children:[t.jsx("span",{className:r.groupLabel,children:s}),t.jsx(f,{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})]}),o&&t.jsx(f,{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(Da,{item:_,group:e},`${_.path}-${m}`))})]})]})}function Da({item:e,group:i}){var _;const{t:a}=A(),{trackEvent:l}=H(),[o,s]=u.useState(!1),n=Pe(e.path),h=((_=i.fixTemplate)==null?void 0:_.buildUpdateCommand(e))??null,d=async()=>{if(h)try{await navigator.clipboard.writeText(h),l("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(f,{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(f,{text:a("uiStudio.colRecommended.tooltip","The recommended value."),children:t.jsx("span",{children:a("uiStudio.colRecommended","Recommended")})}),": ",t.jsx("strong",{children:String(e.expected)})]})]}),h&&t.jsx(f,{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:o?a("uiStudio.copiedToClipboard","Copied"):a("uiStudio.copyFixCommand","Copy AI instruction")})})]})}function J(e,i){return Object.entries(i).reduce((a,[l,o])=>a.split(`{${l}}`).join(String(o)),e)}function Ga(e,i){return i.rule==="contrast"?J(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"?J(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"?J(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 Be="sample_inventory_preview",te=ze,Ma=[{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 Aa(e){const l={snapshot_id:Be,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}},o={...l,check_results:Ma.map(n=>({...n,hint:Ga(e,n)})),image_url:te};return{list:{placeId:0,snapshots:[l],totalCount:1},detail:o}}const Ra=/plugin not connected|sync not started/i;function ie(e){return typeof e=="string"&&Ra.test(e)}function De(){const{t:e}=A();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 Ge(e){return e.target??e.scope}function La(e){const i=Ge(e),a=i.split(".").filter(o=>o.length>0),l=a.findIndex(o=>o==="StarterGui");return l>=0&&a[l+1]?["StarterGui",a[l+1]].join("."):i}function Me(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 $a(e){return Me(e.design_check_summary)}function me(e){return ae(e.design_check_summary)}function ae(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 Ea(e){return e.length===0?null:{...e.reduce((a,l)=>{const o=l.latest.design_check_summary;return a.priority_high+=(o==null?void 0:o.priority_high)??0,a.priority_medium+=(o==null?void 0:o.priority_medium)??0,a.priority_low+=(o==null?void 0:o.priority_low)??0,a},{priority_high:0,priority_medium:0,priority_low:0})}}function Ha(e){const i=new Map;for(const o of e){const s=Ge(o),n=i.get(s);if(!n){i.set(s,{latest:o,snapshotCount:1});continue}n.snapshotCount+=1,o.captured_at>n.latest.captured_at&&(n.latest=o)}const a=[...i.entries()].map(([o,s])=>({key:o,latest:s.latest,snapshotCount:s.snapshotCount,verdict:$a(s.latest)})),l=new Map;for(const o of a){const s=La(o.latest),n=l.get(s)??[];n.push(o),l.set(s,n)}return[...l.entries()].map(([o,s])=>{var _;const n=s.sort((m,p)=>{const y=me(m.latest)-me(p.latest);return y!==0?y:p.latest.captured_at-m.latest.captured_at}),h=n.reduce((m,p)=>p.latest.captured_at>m.captured_at?p.latest:m,((_=n[0])==null?void 0:_.latest)??s[0].latest),d=Ea(n);return{key:o,latest:h,snapshotCount:n.reduce((m,p)=>m+p.snapshotCount,0),children:n,summary:d,verdict:Me(d)}}).sort((o,s)=>{const n=ae(o.summary)-ae(s.summary);return n!==0?n:s.latest.captured_at-o.latest.captured_at})}function Oa(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 se(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 Ua(e,i,a){return`${e("uiStudio.analysis.targetCountLabel","분석 대상")} ${$(e,i)} · ${re(e,"needsFix")} ${$(e,a.hasSuggestions)} · ${re(e,"passed")} ${$(e,a.noSuggestions)}`}function Fa({tier:e}){const{t:i}=A(),{trackEvent:a}=H(),l=e==="basic",o=Ne(50),s=u.useRef(null),[n,h]=u.useState(null),[d,_]=u.useState(!1),[m,p]=u.useState(new Set),[y,S]=u.useState(new Set),[v,b]=u.useState(!1),T=u.useCallback((x,G)=>{h(n===x?null:x)},[n]),P=u.useCallback(()=>{h(null)},[]),g=u.useCallback(x=>{p(G=>{const k=new Set(G);return k.has(x)?k.delete(x):k.add(x),k})},[]);u.useEffect(()=>{var G;if(!n)return;(G=s.current)==null||G.focus();const x=k=>{k.key==="Escape"&&!document.getElementById("delete-confirm-title")&&P()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[P,n]);const N=l?Aa(i):null,C=(N==null?void 0:N.list)??o.data,j=l?!1:o.loading,B=u.useCallback(x=>{S(G=>{const k=new Set(G);return k.has(x)?k.delete(x):k.add(x),k})},[]),E=x=>{S(new Set(x))},I=()=>{S(new Set)},R=async()=>{const x=(C==null?void 0:C.placeId)??0;a("dashboard_click_event",{click_target:"ui_studio_delete_selected_snapshots",page:"ui-studio",tab:"ui_studio_analysis"}),await qe(x,{ids:[...y]}),await o.refresh(),b(!1),S(new Set)};if(j)return t.jsx("div",{className:r.page,children:i("uiStudio.loading","Loading...")});if(!l&&ie(o.error))return t.jsx(De,{});if(!l&&o.error)return t.jsxs("div",{className:r.page,children:[i("uiStudio.error","Error"),": ",o.error]});const w=(C==null?void 0:C.snapshots)??[],D=(C==null?void 0:C.placeId)??0,L=w.map(x=>x.snapshot_id),O=Ha(w),V=Oa(O);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:[l&&t.jsxs("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.jsxs("div",{className:r.sampleActions,children:[t.jsx("button",{className:r.secondaryAction,onClick:()=>{a("dashboard_click_event",{click_target:"tier_compare",placement:"ui_studio_analysis_banner",page:"ui-studio",tab:"ui_studio_analysis"}),_(!0)},type:"button",children:i("tier.compare","Basic vs Pro")}),t.jsx("a",{className:r.primaryAction,href:Se.uiStudio,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","Upgrade to Pro")})]})]}),t.jsx(je,{variant:"centered"})]}),t.jsx("div",{className:r.galleryHeader,children:t.jsx("h1",{children:t.jsx(M,{label:i("uiStudio.title","UI Studio"),tooltip:i("uiStudio.title.tooltip","A central place to review AI-generated UI screens and improvement suggestions.")})})}),w.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(M,{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:Ua(i,O.length,V)})]})}),t.jsx("div",{className:r.analysisReportGrid,"data-testid":"analysis-report-grid",children:O.map(x=>t.jsx(qa,{report:x,placeId:D,imageUrlOverride:l?te:void 0,expanded:m.has(x.key),onPrimaryClick:G=>{x.children.length>1?g(x.key):T(x.latest.snapshot_id,G)},onChildClick:(G,k)=>T(G,k)},x.key))}),t.jsxs("section",{className:r.recentCapturesSection,children:[t.jsxs("div",{className:r.recentCapturesHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(M,{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,w.length)]})]}),!l&&w.length>0&&t.jsxs("div",{className:r.captureSelectionActions,children:[t.jsx(f,{text:i("uiStudio.gallery.selectAll.tooltip","Select every visible capture at once."),children:t.jsx("button",{className:r.selectionBarBtn,onClick:()=>E(L),type:"button",children:i("uiStudio.gallery.selectAll","모두 선택")})}),y.size>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:r.selectionToolbarCount,children:[y.size,i("uiStudio.gallery.selection.selectedCount"," selected")]}),t.jsx(f,{text:i("uiStudio.gallery.clearSelection.tooltip","Clear the current selection."),children:t.jsx("button",{className:r.selectionBarBtn,onClick:I,type:"button",children:i("uiStudio.gallery.clearSelection","선택 해제")})}),t.jsx(f,{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:()=>b(!0),type:"button",children:i("common.delete","삭제")})})]})]})]}),t.jsx("div",{className:r.grid,children:w.map(x=>t.jsx(ya,{snapshot:x,placeId:D,onClick:G=>T(x.snapshot_id,G),imageUrlOverride:l?te:void 0,selectable:!l,selected:y.has(x.snapshot_id),onToggleSelect:B},x.snapshot_id))})]})]})]}),n&&t.jsx("div",{className:r.analysisDetailPopupLayer,"data-testid":"analysis-detail-popup-layer",onClick:P,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:x=>x.stopPropagation(),children:t.jsx(ka,{snapshotId:n,placeId:D,onClose:P,sampleDetail:l&&n===Be?(N==null?void 0:N.detail)??null:null,tier:e,onActionDone:l?void 0:o.refresh})})})]}),v&&t.jsx(oe,{title:i("uiStudio.confirm.deleteBatchTitle","화면 캡처 일괄 삭제"),message:i("uiStudio.confirm.deleteBatchMessage",`선택한 ${y.size}개의 화면 캡처를 삭제합니다. 이 작업은 되돌릴 수 없습니다.`),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:R,onClose:()=>b(!1)}),d&&t.jsx(we,{onClose:()=>_(!1)})]})}function re(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function za(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?se(e,i):e("uiStudio.analysis.issueSummary.passed","현재 검토 기준에서 추가 개선 제안은 없습니다.")}function qa({report:e,placeId:i,imageUrlOverride:a,expanded:l,onPrimaryClick:o,onChildClick:s}){const{t:n}=A(),h=e.latest,d=a??Ie(h.snapshot_id,i),_=new Date(h.captured_at*1e3).toLocaleString(),m=re(n,e.verdict),p=e.children.length>1;return t.jsxs("div",{className:r.analysisReportGroup,children:[t.jsxs("button",{className:r.analysisReportCard,"aria-expanded":p?l:void 0,"aria-label":`${e.key} ${p?n("uiStudio.analysis.expandChildren","하위 대상 보기"):n("uiStudio.analysis.openDetail","상세 보기")}`,onClick:y=>o(y.currentTarget),type:"button",children:[t.jsx("img",{className:r.analysisReportThumb,src:d,alt:h.snapshot_id,loading:"lazy"}),t.jsxs("div",{className:r.analysisReportBody,children:[t.jsxs("div",{className:r.analysisReportTopline,children:[t.jsx(f,{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(f,{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:se(n,e.summary)})})]}),t.jsx("div",{className:r.analysisReportTarget,children:e.key}),t.jsx("div",{className:r.analysisReportIssue,children:za(n,e.summary)}),t.jsxs("div",{className:r.analysisReportMeta,children:[_," ·"," ",t.jsx(f,{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","검토 기준")})}),": ",h.thresholds_source,e.snapshotCount>1?` · ${n("uiStudio.analysis.captureLabel","캡처")} ${$(n,e.snapshotCount)}`:"",p?` · ${n("uiStudio.analysis.childTargets","하위 대상")} ${$(n,e.children.length)}`:""]})]})]}),p&&l&&t.jsx("div",{className:r.analysisChildList,children:e.children.map(y=>t.jsxs("button",{className:r.analysisChildRow,onClick:S=>s(y.latest.snapshot_id,S.currentTarget),type:"button",children:[t.jsx("span",{className:r.analysisChildPath,children:y.key}),t.jsx("span",{className:r.analysisChildSummary,children:se(n,y.latest.design_check_summary)}),t.jsx("span",{className:r.analysisChildDetailHint,children:n("uiStudio.analysis.childDetailHint","하위 대상 상세 보기")})]},y.key))})]})}function Va(e,i,a=1e4){const[l,o]=u.useState(null),[s,n]=u.useState(!0),[h,d]=u.useState(null),_=JSON.stringify(i),m=u.useCallback(async()=>{try{const p=await ce(e,i);o(p),d(null)}catch(p){d(p.message)}finally{n(!1)}},[e,_]);return u.useEffect(()=>{let p=!0;const y=async()=>{try{const v=await ce(e,i);p&&(o(v),d(null))}catch(v){p&&d(v.message)}finally{p&&n(!1)}};y();const S=setInterval(()=>{y()},a);return()=>{p=!1,clearInterval(S)}},[e,_,a]),{data:l,loading:s,error:h,refresh:m}}const Wa="_filterBar_1nnge_4",Ka="_filterGroup_1nnge_14",Qa="_filterLabel_1nnge_21",Ya="_filterCheckbox_1nnge_28",Ja="_segmentGroup_1nnge_45",Xa="_segmentBtn_1nnge_55",Za="_segmentBtnActive_1nnge_73",es="_filterInput_1nnge_79",ts="_filterResetBtn_1nnge_95",is="_requestRow_1nnge_114",as="_requestRowMain_1nnge_127",ss="_requestDetailToggle_1nnge_134",rs="_thumbPair_1nnge_156",ns="_thumbPairButton_1nnge_164",os="_thumbSlot_1nnge_179",ls="_thumbImg_1nnge_204",cs="_thumbPlaceholder_1nnge_211",ds="_thumbArrow_1nnge_219",us="_extraPathsBadge_1nnge_225",hs="_requestMeta_1nnge_239",ps="_requestLabel_1nnge_247",gs="_requestTime_1nnge_256",ms="_requestStats_1nnge_261",_s="_statDot_1nnge_269",ys="_summaryPill_1nnge_273",fs="_requestActions_1nnge_278",xs="_expandHint_1nnge_285",Ss="_mutationsArea_1nnge_298",js="_mutLoading_1nnge_307",ws="_mutEmpty_1nnge_308",vs="_mutError_1nnge_314",bs="_mutationRow_1nnge_320",Cs="_mutationLine_1nnge_330",Is="_mutTs_1nnge_337",Ns="_mutCommand_1nnge_343",Ps="_mutPath_1nnge_349",ks="_mutDiff_1nnge_359",Ts="_mutErr_1nnge_314",Bs="_changeDetails_1nnge_374",Ds="_changeDetailRow_1nnge_382",Gs="_changeDetailRowNoBefore_1nnge_391",Ms="_changeDetailBadge_1nnge_395",As="_changeDetail_text_1nnge_412",Rs="_changeDetail_color_1nnge_417",Ls="_changeDetail_size_1nnge_422",$s="_changeDetail_layout_1nnge_427",Es="_changeDetail_state_1nnge_432",Hs="_changeDetail_asset_1nnge_437",Os="_changeDetail_property_1nnge_442",Us="_changeDetailProperty_1nnge_446",Fs="_changeDetailArrow_1nnge_454",zs="_changeDetailOldValue_1nnge_460",qs="_changeDetailNewValue_1nnge_461",Vs="_compareDialogLayer_1nnge_479",Ws="_compareDialog_1nnge_479",Ks="_beforeAfterDrawer_1nnge_510",Qs="_drawerHeader_1nnge_520",Ys="_drawerTitle_1nnge_529",Js="_drawerCloseBtn_1nnge_536",Xs="_drawerBody_1nnge_552",Zs="_pathTabs_1nnge_559",er="_pathTab_1nnge_559",tr="_pathTabActive_1nnge_588",ir="_comparePanel_1nnge_594",ar="_compareHalf_1nnge_604",sr="_compareLabel_1nnge_611",rr="_compareImg_1nnge_622",nr="_comparePlaceholder_1nnge_630",or="_compareDetailsPanel_1nnge_642",lr="_compareDetailsHeader_1nnge_651",cr="_drawerFooter_1nnge_669",dr="_drawerActionBtn_1nnge_677",ur="_historyTabWrap_1nnge_695",hr="_historyWorkspace_1nnge_701",pr="_historyMainColumn_1nnge_706",gr="_requestList_1nnge_710",mr="_emptyHistory_1nnge_715",_r="_historyError_1nnge_722",yr="_historyLoading_1nnge_728",fr="_listHeader_1nnge_736",xr="_listHeaderTitle_1nnge_745",Sr="_clearBtn_1nnge_752",jr="_deleteErrBanner_1nnge_771",c={filterBar:Wa,filterGroup:Ka,filterLabel:Qa,filterCheckbox:Ya,segmentGroup:Ja,segmentBtn:Xa,segmentBtnActive:Za,filterInput:es,filterResetBtn:ts,requestRow:is,requestRowMain:as,requestDetailToggle:ss,thumbPair:rs,thumbPairButton:ns,thumbSlot:os,thumbImg:ls,thumbPlaceholder:cs,thumbArrow:ds,extraPathsBadge:us,requestMeta:hs,requestLabel:ps,requestTime:gs,requestStats:ms,statDot:_s,summaryPill:ys,requestActions:fs,expandHint:xs,mutationsArea:Ss,mutLoading:js,mutEmpty:ws,mutError:vs,mutationRow:bs,mutationLine:Cs,mutTs:Is,mutCommand:Ns,mutPath:Ps,mutDiff:ks,mutErr:Ts,changeDetails:Bs,changeDetailRow:Ds,changeDetailRowNoBefore:Gs,changeDetailBadge:Ms,changeDetail_text:As,changeDetail_color:Rs,changeDetail_size:Ls,changeDetail_layout:$s,changeDetail_state:Es,changeDetail_asset:Hs,changeDetail_property:Os,changeDetailProperty:Us,changeDetailArrow:Fs,changeDetailOldValue:zs,changeDetailNewValue:qs,compareDialogLayer:Vs,compareDialog:Ws,beforeAfterDrawer:Ks,drawerHeader:Qs,drawerTitle:Ys,drawerCloseBtn:Js,drawerBody:Xs,pathTabs:Zs,pathTab:er,pathTabActive:tr,comparePanel:ir,compareHalf:ar,compareLabel:sr,compareImg:rr,comparePlaceholder:nr,compareDetailsPanel:or,compareDetailsHeader:lr,drawerFooter:cr,drawerActionBtn:dr,historyTabWrap:ur,historyWorkspace:hr,historyMainColumn:pr,requestList:gr,emptyHistory:mr,historyError:_r,historyLoading:yr,listHeader:fr,listHeaderTitle:xr,clearBtn:Sr,deleteErrBanner:jr};function wr(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 Ae({mutations:e,emptyLabel:i}){const{t:a}=A();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(l=>t.jsx(vr,{mutation:l},l.mutationId))})}function vr({mutation:e}){return t.jsxs("div",{className:c.mutationRow,children:[t.jsxs("div",{className:c.mutationLine,children:[t.jsx("span",{className:c.mutTs,children:wr(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(br,{detail:i},`${i.property}:${i.category}`))}),!e.ok&&e.error&&t.jsx("span",{className:c.mutErr,children:e.error})]})}function br({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 Cr(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function Ir(e){if(!e)return null;const i=e.split(/[./]/).filter(l=>l.length>0);if(i.length===0)return null;const a=i.findIndex(l=>l==="StarterGui");return a>=0&&i[a+1]?i[a+1]:i[i.length-1]??null}function X(e,i){if(i.label)return i.label;const a=Ir(i.affectedPaths[0]);if(a){const l=i.mutationCount===1?"uiStudio.history.row.pathLabelOne":"uiStudio.history.row.pathLabelMany",o=i.mutationCount===1?"{path} · {n} change detail":"{path} · {n} change details";return e(l,o).replace("{path}",a).replace("{n}",String(i.mutationCount))}return e("uiStudio.history.row.toolLabel","UI changes ({n})").replace("{n}",String(i.mutationCount))}function Z(e,i){return`${i}${e("uiStudio.storage.countSuffix","")}`}function Nr(e,i){if(!i)return null;const a=[i.style_family,i.layout_family,i.device_policy,i.safe_area_policy].filter(l=>typeof l=="string"&&l.length>0);return a.length===0?null:`${e("uiStudio.history.row.qualityPlan","Design direction")}: ${a.join(" · ")}`}function Pr(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")} ${Z(e,i.priority_high)}`,l=`${e("uiStudio.priorityMedium","Recommended")} ${Z(e,i.priority_medium)}`,o=`${e("uiStudio.priorityLow","Optional")} ${Z(e,i.priority_low)}`;return`${e("uiStudio.history.row.designCheck","Suggestions")}: ${a} · ${l} · ${o}`}function Re({req:e,placeId:i,onOpenCompare:a,imageUrlOverride:l,sampleMutations:o}){const{t:s}=A(),[n,h]=u.useState(!1),[d,_]=u.useState(null),[m,p]=u.useState(!1),[y,S]=u.useState(null),v=l!=null,b=e.affectedPaths[0]??null,T=e.affectedPaths.length-1,P=b?e.beforeSnapshots[b]??null:null,g=b?e.afterSnapshots[b]??null:null,N=P?v?l:ye(P,i):null,C=g?v?l:ye(g,i):null,j=Nr(s,e.qualityPlanSummary),B=Pr(s,e.postChangeDesignCheckSummary),E=async()=>{if(!n&&d===null)if(v&&o!=null)_(o);else{p(!0),S(null);try{const I=await ve(i,e.requestId);_(I.mutations)}catch(I){S(I.message)}finally{p(!1)}}h(I=>!I)};return t.jsxs("div",{className:c.requestRow,children:[t.jsxs("div",{className:c.requestRowMain,children:[t.jsx(f,{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:I=>a(I.currentTarget),disabled:!b,"aria-label":`${X(s,e)} ${s("uiStudio.history.row.compare","Before / After")}`,type:"button",children:[t.jsx("div",{className:c.thumbSlot,children:N?t.jsx("img",{className:c.thumbImg,src:N,alt:s("uiStudio.compare.before","Before"),loading:"lazy"}):t.jsx(f,{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:C?t.jsx("img",{className:c.thumbImg,src:C,alt:s("uiStudio.compare.after","After"),loading:"lazy"}):t.jsx(f,{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","이후 없음")})})}),T>0&&t.jsx(f,{text:s("uiStudio.history.row.extraPaths.tooltip","Number of additional UIs changed in this action."),children:t.jsxs("span",{className:c.extraPathsBadge,children:["+",T]})})]})}),t.jsxs("button",{className:c.requestDetailToggle,type:"button","aria-expanded":n,"aria-label":`${X(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:X(s,e)}),t.jsx("span",{className:c.requestTime,children:Cr(e.startedAt)}),t.jsxs("span",{className:c.requestStats,children:[t.jsx(f,{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(f,{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","")]})}),j&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(f,{text:s("uiStudio.history.row.qualityPlan.tooltip","Brief design direction used for this change."),children:t.jsx("span",{className:c.summaryPill,children:j})})]}),B&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(f,{text:s("uiStudio.history.row.designCheck.tooltip","Post-change Design Check suggestion summary."),children:t.jsx("span",{className:c.summaryPill,children:B})})]})]})]}),t.jsx("span",{className:c.requestActions,children:t.jsx(f,{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","로딩 중...")}),y&&t.jsx("div",{className:c.mutError,children:y}),d&&t.jsx(Ae,{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 Le({requestId:e,placeId:i,onClose:a,imageUrlOverride:l,sampleDetail:o}){const{t:s}=A(),n=u.useRef(null),h=o!=null,[d,_]=u.useState(h?o:null),[m,p]=u.useState(!h),[y,S]=u.useState(null),[v,b]=u.useState(h&&o.affectedPaths.length>0?o.affectedPaths[0]:null);u.useEffect(()=>{var j;(j=n.current)==null||j.focus()},[]),u.useEffect(()=>{const j=B=>{B.key==="Escape"&&(B.preventDefault(),a())};return document.addEventListener("keydown",j),()=>{document.removeEventListener("keydown",j)}},[a]),u.useEffect(()=>{if(h)return;let j=!0;return p(!0),S(null),ve(i,e).then(B=>{j&&(_(B),B.affectedPaths.length>0&&b(B.affectedPaths[0]))}).catch(B=>{j&&S(B.message)}).finally(()=>{j&&p(!1)}),()=>{j=!1}},[e,i,h]);const T=v&&d?d.beforeSnapshots[v]??null:null,P=v&&d?d.afterSnapshots[v]??null:null,g=T?l??fe(T,i):null,N=P?l??fe(P,i):null,C=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":C,tabIndex:-1,onClick:j=>j.stopPropagation(),children:t.jsxs("div",{className:c.beforeAfterDrawer,children:[t.jsxs("div",{className:c.drawerHeader,children:[t.jsx("h2",{className:c.drawerTitle,children:C}),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","로딩 중...")}),y&&t.jsx("div",{className:c.drawerBody,children:t.jsx("span",{className:c.mutErr,children:y})}),!m&&!y&&d&&t.jsxs(t.Fragment,{children:[d.affectedPaths.length>0&&t.jsx("div",{className:c.pathTabs,role:"tablist",children:d.affectedPaths.map(j=>t.jsx(f,{text:`${s("uiStudio.compare.path.tooltip","The UI instance path for this screen.")} ${j}`,children:t.jsx("button",{role:"tab","aria-selected":v===j,className:`${c.pathTab} ${v===j?c.pathTabActive:""}`,onClick:()=>b(j),type:"button",children:j.split("/").pop()??j})},j))}),t.jsxs("div",{className:c.comparePanel,children:[t.jsxs("div",{className:c.compareHalf,children:[t.jsx(f,{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")})}),g?t.jsx("img",{className:c.compareImg,src:g,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(f,{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")})}),N?t.jsx("img",{className:c.compareImg,src:N,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(Ae,{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[l,o,s]=a;return new Date(l,o-1,s,i?23:0,i?59:0,i?59:0,i?999:0).toISOString()}function kr(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,l=e.to?xe(e.to,!0):void 0;a&&(i.from=a),l&&(i.to=l)}else if(e.datePreset!=="all"){const a=new Date;if(e.datePreset==="today"){const{start:l,end:o}=z(a);i.from=l.toISOString(),i.to=o.toISOString()}else if(e.datePreset==="yesterday"){const l=new Date(a);l.setDate(l.getDate()-1);const{start:o,end:s}=z(l);i.from=o.toISOString(),i.to=s.toISOString()}else{const l=e.datePreset==="7d"?6:29,o=new Date(a);o.setDate(o.getDate()-l);const{start:s}=z(o),{end:n}=z(a);i.from=s.toISOString(),i.to=n.toISOString()}}return i}function $e(){return{action:"all",datePreset:"all"}}function Tr(){const{t:e}=A(),{trackEvent:i}=H(),a=Ve(e),[l,o]=u.useState(!1),[s,n]=u.useState(null),h=s?a.requests.find(m=>m.requestId===s)??null:null,d=u.useCallback((m,p)=>{n(m)},[]),_=u.useCallback(()=>{n(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[t.jsxs("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.jsxs("div",{className:r.sampleActions,children:[t.jsx("button",{className:r.secondaryAction,onClick:()=>{i("dashboard_click_event",{click_target:"tier_compare",placement:"ui_studio_history_banner",page:"ui-studio",tab:"ui_studio_history"}),o(!0)},type:"button",children:e("tier.compare","Basic vs Pro")}),t.jsx("a",{className:r.primaryAction,href:Se.uiStudio,target:"_blank",rel:"noreferrer",title:e("uiStudio.history.sample.tooltip","Upgrade to Pro to unlock full history"),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","Upgrade to Pro")})]})]}),t.jsx(je,{variant:"centered"})]}),t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":s?"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(M,{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(m=>t.jsx(Re,{req:m,placeId:0,onOpenCompare:p=>d(m.requestId,p),imageUrlOverride:de,sampleMutations:a.mutationsByRequest[m.requestId]},m.requestId))})]}),s&&h&&t.jsx(Le,{requestId:s,placeId:0,onClose:_,imageUrlOverride:de,sampleDetail:{...h,mutations:a.mutationsByRequest[h.requestId]??[]}})]}),l&&t.jsx(we,{onClose:()=>o(!1)})]})}function Br({filter:e,onChange:i}){const{t:a}=A(),l=[{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.")}],o=[{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(M,{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:l.map(s=>t.jsx(f,{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(M,{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:o.map(s=>t.jsx(f,{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(M,{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(M,{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(f,{text:a("uiStudio.history.filter.reset.tooltip","Reset all filters to defaults."),children:t.jsx("button",{className:c.filterResetBtn,onClick:()=>i($e()),type:"button",children:a("uiStudio.history.filter.reset","Reset")})})]})}function Dr(){var E;const{t:e}=A(),{trackEvent:i}=H(),a=Ne(1),l=((E=a.data)==null?void 0:E.placeId)??0,[o,s]=u.useState($e),{data:n,loading:h,error:d,refresh:_}=Va(l,kr(o)),[m,p]=u.useState(null),[y,S]=u.useState(!1),[v,b]=u.useState(!1),[T,P]=u.useState(null),g=async()=>{P(null);try{await We(l,{all:!0,alsoSnapshots:v}),await _(),S(!1)}catch(I){throw P(I.message),I}},N=(n==null?void 0:n.requests)??[],C=ie(a.error)||ie(d),j=u.useCallback((I,R)=>{i("dashboard_click_event",{click_target:"ui_studio_compare_before_after",page:"ui-studio",tab:"ui_studio_history"}),p(I)},[i]),B=u.useCallback(()=>{p(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[C?t.jsx(De,{}):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(Br,{filter:o,onChange:s}),t.jsxs("div",{className:c.listHeader,children:[t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(M,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})}),N.length>0&&t.jsx(f,{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"}),S(!0)},type:"button",children:e("uiStudio.history.clear","Clear")})})]}),h&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loading","로딩 중...")}),!h&&d&&t.jsxs("div",{className:c.historyError,children:[e("uiStudio.history.error","오류"),": ",d]}),!h&&!d&&N.length===0&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.empty","아직 변경 이력이 없습니다. AI 에이전트가 manage_ui 로 UI 를 수정하면 자동으로 기록됩니다.")}),!h&&N.length>0&&t.jsx("div",{className:c.requestList,children:N.map(I=>t.jsx(Re,{req:I,placeId:l,onOpenCompare:R=>j(I.requestId,R)},I.requestId))}),T&&t.jsx("div",{className:c.deleteErrBanner,children:T})]}),m&&t.jsx(Le,{requestId:m,placeId:l,onClose:B})]}),y&&t.jsx(oe,{title:e("uiStudio.history.confirm.clearRequestsTitle","변경 이력 삭제"),message:e("uiStudio.history.confirm.clearRequestsMessage","현재 place의 변경 이력을 삭제합니다. Studio 인스턴스에는 영향을 주지 않습니다."),danger:!0,cascadeOption:{label:e("uiStudio.history.confirm.cascadeOption","연결된 화면 캡처도 함께 삭제"),checked:v,onChange:b},confirmLabel:e("common.delete","삭제"),onConfirm:g,onClose:()=>S(!1)})]})}function Gr({tier:e}){return e==="basic"?t.jsx(Tr,{}):t.jsx(Dr,{})}const Mr=["analysis","history"];function Or(){const{t:e}=A(),{trackEvent:i}=H(),{tier:a,loading:l}=Oe(),[o,s]=Ue(),n=o.get("tab"),h=n&&Mr.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(p=>{const y=new URLSearchParams(p);return y.set("tab",m),y})},_=[{key:"analysis",label:t.jsx(f,{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(f,{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(Ke,{items:_,value:h,onChange:d}),l?t.jsx("div",{className:r.emptyState,children:e("uiStudio.loading","Loading...")}):h==="analysis"?t.jsx(Fa,{tier:a}):t.jsx(Gr,{tier:a})]})}export{Or as Component};
@@ -1 +1 @@
1
- import{u as w,j as e,y as m,r as p,z as h,T as j,L as v}from"./index-CjBiayQg.js";const T="_card_1vaoq_2",b="_cardUnread_1vaoq_15",C="_cardRead_1vaoq_20",f="_topRow_1vaoq_25",S="_categoryChip_1vaoq_32",R="_versionChip_1vaoq_45",k="_date_1vaoq_57",q="_title_1vaoq_65",H="_body_1vaoq_74",E="_link_1vaoq_83",A="_newBadge_1vaoq_98",n={card:T,cardUnread:b,cardRead:C,topRow:f,categoryChip:S,versionChip:R,date:k,title:q,body:H,link:E,newBadge:A},U={release:"whatsNew.category.release",notice:"whatsNew.category.notice",deprecation:"whatsNew.category.deprecation",tip:"whatsNew.category.tip"};function x({announcement:s,isNew:d}){const{locale:i,t:c}=w(),o=d?n.cardUnread:n.cardRead,_=s.title[i]??s.title.en,l=s.body[i]??s.body.en,r=s.link?s.link.label[i]??s.link.label.en:null;return e.jsxs("div",{className:`${n.card} ${o}`,children:[e.jsxs("div",{className:n.topRow,children:[e.jsx("span",{className:n.categoryChip,children:c(U[s.category])}),s.version&&e.jsx("span",{className:n.versionChip,children:s.version}),d&&e.jsx("span",{className:n.newBadge,children:c("whatsNew.newBadge","NEW")}),e.jsx("span",{className:n.date,children:s.date})]}),e.jsx("h3",{className:n.title,children:_}),e.jsx("p",{className:n.body,children:l}),s.link&&r&&e.jsxs("a",{className:n.link,href:s.link.url,target:"_blank",rel:"noopener noreferrer",children:["↗"," ",r]})]})}const B="_page_19yl3_2",I="_pageHeader_19yl3_10",$="_pageHeaderText_19yl3_17",L="_pageTitle_19yl3_24",M="_pageSubtitle_19yl3_31",z="_settingsIcon_19yl3_38",W="_section_19yl3_67",O="_sectionTitle_19yl3_73",Y="_unreadCount_19yl3_85",G="_empty_19yl3_100",K="_divider_19yl3_108",t={page:B,pageHeader:I,pageHeaderText:$,pageTitle:L,pageSubtitle:M,settingsIcon:z,section:W,sectionTitle:O,unreadCount:Y,empty:G,divider:K};function D(){const{t:s}=w(),{readSet:d,markRead:i}=m(),c=p.useMemo(()=>{const a=[];for(const u of h)d.has(u.id)||a.push(u.id);return a},[]),o=p.useRef(c);o.current=c,p.useEffect(()=>()=>{o.current.length>0&&i(o.current)},[]);const _=p.useMemo(()=>new Set(c),[c]),l=h.filter(a=>_.has(a.id)),r=h.filter(a=>!_.has(a.id)),g=l.length>0,N=r.length>0,y=e.jsxs("div",{className:t.pageHeader,children:[e.jsxs("div",{className:t.pageHeaderText,children:[e.jsx("h1",{className:t.pageTitle,children:s("whatsNew.pageTitle","What's New")}),e.jsx("p",{className:t.pageSubtitle,children:s("whatsNew.pageSubtitle","Stay up to date with MCP changes")})]}),e.jsx(j,{text:s("sidebar.settings","Settings"),children:e.jsx(v,{to:"/settings","aria-label":s("sidebar.settings","Settings"),className:t.settingsIcon,children:"⚙️"})})]});return h.length===0?e.jsxs("div",{className:t.page,children:[y,e.jsx("p",{className:t.empty,children:s("whatsNew.empty","No announcements yet")})]}):e.jsxs("div",{className:t.page,children:[y,g&&e.jsxs("section",{className:t.section,children:[e.jsxs("h2",{className:t.sectionTitle,children:[s("whatsNew.unreadSection","Unread"),e.jsx("span",{className:t.unreadCount,children:l.length})]}),l.map(a=>e.jsx(x,{announcement:a,isNew:!0},`unread-${a.id}`))]}),g&&N&&e.jsx("hr",{className:t.divider}),N&&e.jsxs("section",{className:t.section,children:[e.jsx("h2",{className:t.sectionTitle,children:s("whatsNew.allSection","All Announcements")}),r.map(a=>e.jsx(x,{announcement:a,isNew:!1},`all-${a.id}`))]})]})}export{D as Component};
1
+ import{u as w,j as e,y as m,r as p,z as h,T as j,L as v}from"./index-BPIBy2lU.js";const T="_card_1vaoq_2",b="_cardUnread_1vaoq_15",C="_cardRead_1vaoq_20",f="_topRow_1vaoq_25",S="_categoryChip_1vaoq_32",R="_versionChip_1vaoq_45",k="_date_1vaoq_57",q="_title_1vaoq_65",H="_body_1vaoq_74",E="_link_1vaoq_83",A="_newBadge_1vaoq_98",n={card:T,cardUnread:b,cardRead:C,topRow:f,categoryChip:S,versionChip:R,date:k,title:q,body:H,link:E,newBadge:A},U={release:"whatsNew.category.release",notice:"whatsNew.category.notice",deprecation:"whatsNew.category.deprecation",tip:"whatsNew.category.tip"};function x({announcement:s,isNew:d}){const{locale:i,t:c}=w(),o=d?n.cardUnread:n.cardRead,_=s.title[i]??s.title.en,l=s.body[i]??s.body.en,r=s.link?s.link.label[i]??s.link.label.en:null;return e.jsxs("div",{className:`${n.card} ${o}`,children:[e.jsxs("div",{className:n.topRow,children:[e.jsx("span",{className:n.categoryChip,children:c(U[s.category])}),s.version&&e.jsx("span",{className:n.versionChip,children:s.version}),d&&e.jsx("span",{className:n.newBadge,children:c("whatsNew.newBadge","NEW")}),e.jsx("span",{className:n.date,children:s.date})]}),e.jsx("h3",{className:n.title,children:_}),e.jsx("p",{className:n.body,children:l}),s.link&&r&&e.jsxs("a",{className:n.link,href:s.link.url,target:"_blank",rel:"noopener noreferrer",children:["↗"," ",r]})]})}const B="_page_19yl3_2",I="_pageHeader_19yl3_10",$="_pageHeaderText_19yl3_17",L="_pageTitle_19yl3_24",M="_pageSubtitle_19yl3_31",z="_settingsIcon_19yl3_38",W="_section_19yl3_67",O="_sectionTitle_19yl3_73",Y="_unreadCount_19yl3_85",G="_empty_19yl3_100",K="_divider_19yl3_108",t={page:B,pageHeader:I,pageHeaderText:$,pageTitle:L,pageSubtitle:M,settingsIcon:z,section:W,sectionTitle:O,unreadCount:Y,empty:G,divider:K};function D(){const{t:s}=w(),{readSet:d,markRead:i}=m(),c=p.useMemo(()=>{const a=[];for(const u of h)d.has(u.id)||a.push(u.id);return a},[]),o=p.useRef(c);o.current=c,p.useEffect(()=>()=>{o.current.length>0&&i(o.current)},[]);const _=p.useMemo(()=>new Set(c),[c]),l=h.filter(a=>_.has(a.id)),r=h.filter(a=>!_.has(a.id)),g=l.length>0,N=r.length>0,y=e.jsxs("div",{className:t.pageHeader,children:[e.jsxs("div",{className:t.pageHeaderText,children:[e.jsx("h1",{className:t.pageTitle,children:s("whatsNew.pageTitle","What's New")}),e.jsx("p",{className:t.pageSubtitle,children:s("whatsNew.pageSubtitle","Stay up to date with MCP changes")})]}),e.jsx(j,{text:s("sidebar.settings","Settings"),children:e.jsx(v,{to:"/settings","aria-label":s("sidebar.settings","Settings"),className:t.settingsIcon,children:"⚙️"})})]});return h.length===0?e.jsxs("div",{className:t.page,children:[y,e.jsx("p",{className:t.empty,children:s("whatsNew.empty","No announcements yet")})]}):e.jsxs("div",{className:t.page,children:[y,g&&e.jsxs("section",{className:t.section,children:[e.jsxs("h2",{className:t.sectionTitle,children:[s("whatsNew.unreadSection","Unread"),e.jsx("span",{className:t.unreadCount,children:l.length})]}),l.map(a=>e.jsx(x,{announcement:a,isNew:!0},`unread-${a.id}`))]}),g&&N&&e.jsx("hr",{className:t.divider}),N&&e.jsxs("section",{className:t.section,children:[e.jsx("h2",{className:t.sectionTitle,children:s("whatsNew.allSection","All Announcements")}),r.map(a=>e.jsx(x,{announcement:a,isNew:!1},`all-${a.id}`))]})]})}export{D as Component};