@weppy/roblox-mcp 2.16.1 → 2.17.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 (88) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +9 -1
  3. package/dashboard/dist/assets/AssetsPage-BRZSoLQp.css +1 -0
  4. package/dashboard/dist/assets/{AssetsPage-y9ob34oQ.js → AssetsPage-FecplRby.js} +9 -14
  5. package/dashboard/dist/assets/ChangelogPage-B1CY41my.css +1 -0
  6. package/dashboard/dist/assets/ChangelogPage-DXZxXvJY.js +1 -0
  7. package/dashboard/dist/assets/ConfirmModal-CQhMb2gs.js +1 -0
  8. package/dashboard/dist/assets/ConnectionPage-B3fGIK2X.css +1 -0
  9. package/dashboard/dist/assets/ConnectionPage-Bk4HeU0-.js +11 -0
  10. package/dashboard/dist/assets/ControlsPage-jEHyFrVc.js +1 -0
  11. package/dashboard/dist/assets/CurrentPlaceScope-B60o8hpn.js +1 -0
  12. package/dashboard/dist/assets/CurrentPlaceScope-COd50R0N.css +1 -0
  13. package/dashboard/dist/assets/{GameChangeDetail-AUqSoK_K.js → GameChangeDetail-B5X_6M-R.js} +1 -1
  14. package/dashboard/dist/assets/{InfoLabel-CI6bHOeU.js → InfoLabel-csGVLmJ3.js} +1 -1
  15. package/dashboard/dist/assets/OverviewPage-B2_8B6fs.js +1 -0
  16. package/dashboard/dist/assets/OverviewPage-CviBL36S.css +1 -0
  17. package/dashboard/dist/assets/PageHeader-B42Je0MJ.js +6 -0
  18. package/dashboard/dist/assets/PageHeader-ip0Enk1k.css +1 -0
  19. package/dashboard/dist/assets/PlaytestPage-B89cLi76.css +1 -0
  20. package/dashboard/dist/assets/PlaytestPage-Cww1uTQ8.js +122 -0
  21. package/dashboard/dist/assets/SettingsPage-BO1WqaOl.css +1 -0
  22. package/dashboard/dist/assets/SettingsPage-eLuRrn1E.js +1 -0
  23. package/dashboard/dist/assets/{StatusBadge-PkthVJ8-.js → StatusBadge-Ct9C2L71.js} +1 -1
  24. package/dashboard/dist/assets/SyncPage-BgbrC3SP.css +1 -0
  25. package/dashboard/dist/assets/SyncPage-CKbsNp8O.js +1 -0
  26. package/dashboard/dist/assets/Tabs-CPTkUoYi.css +1 -0
  27. package/dashboard/dist/assets/Tabs-Dos9flTe.js +1 -0
  28. package/dashboard/dist/assets/TierPromoPanel-Ch583WAw.css +1 -0
  29. package/dashboard/dist/assets/TierPromoPanel-Ci_piK2n.js +1 -0
  30. package/dashboard/dist/assets/ToolsPage-ApMAWvg3.css +1 -0
  31. package/dashboard/dist/assets/ToolsPage-mfcba-cj.js +1 -0
  32. package/dashboard/dist/assets/{TooltipText-d7cAgyJE.js → TooltipText-EK4_jbu2.js} +1 -1
  33. package/dashboard/dist/assets/UiStudioPage-CSK5gQMN.css +1 -0
  34. package/dashboard/dist/assets/{UiStudioPage-DopaYXcf.js → UiStudioPage-Y2PR7h_q.js} +3 -3
  35. package/dashboard/dist/assets/WhatsNewPage-BsVZv6D8.css +1 -0
  36. package/dashboard/dist/assets/WhatsNewPage-uAPdDJaM.js +1 -0
  37. package/dashboard/dist/assets/check-BgcyMSc_.js +6 -0
  38. package/dashboard/dist/assets/{copy-DfHRl3VR.js → copy-BJc7IQHD.js} +1 -1
  39. package/dashboard/dist/assets/index-89-Xnii6.js +874 -0
  40. package/dashboard/dist/assets/index-VXvX8jPK.css +1 -0
  41. package/dashboard/dist/assets/sample-requests-BeoPIWbH.css +1 -0
  42. package/dashboard/dist/assets/sample-requests-DOteSh1j.js +1 -0
  43. package/dashboard/dist/assets/trash-2-CeZRGbl-.js +6 -0
  44. package/dashboard/dist/assets/{useLiveUptime-BH4xRx9-.js → useLiveUptime-BX-d0MHY.js} +1 -1
  45. package/dashboard/dist/assets/useSettings-B45j17ns.js +1 -0
  46. package/dashboard/dist/assets/useSettings-I6BaXsZq.css +1 -0
  47. package/dashboard/dist/index.html +2 -2
  48. package/dist/index.js +218 -126
  49. package/package.json +1 -1
  50. package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  51. package/dashboard/dist/assets/AssetsPage-BVUpssWN.css +0 -1
  52. package/dashboard/dist/assets/ChangelogDetailPage-B7dy6kfX.js +0 -1
  53. package/dashboard/dist/assets/ChangelogDetailPage-vGgnpq1q.css +0 -1
  54. package/dashboard/dist/assets/ChangelogPage-CTzv0TSI.js +0 -1
  55. package/dashboard/dist/assets/ChangelogPage-DsP0fTsc.css +0 -1
  56. package/dashboard/dist/assets/ConfirmModal-BCthkdVV.js +0 -1
  57. package/dashboard/dist/assets/ConnectionPage-C5kFQ8k3.js +0 -11
  58. package/dashboard/dist/assets/ConnectionPage-Ca5WLCm3.css +0 -1
  59. package/dashboard/dist/assets/ContentScopedDialog-Be71g2ql.js +0 -1
  60. package/dashboard/dist/assets/ContentScopedDialog-DCgVfmeB.css +0 -1
  61. package/dashboard/dist/assets/ControlsPage-CAQx3UR_.js +0 -6
  62. package/dashboard/dist/assets/CurrentPlaceScope-CMhgXKOx.js +0 -1
  63. package/dashboard/dist/assets/CurrentPlaceScope-D-0g0WrM.css +0 -1
  64. package/dashboard/dist/assets/OverviewPage-Dsfl-NRT.css +0 -1
  65. package/dashboard/dist/assets/OverviewPage-QU6C8Jn2.js +0 -1
  66. package/dashboard/dist/assets/PageHeader-CDCcXu8v.js +0 -6
  67. package/dashboard/dist/assets/PageHeader-CV_rjuG8.css +0 -1
  68. package/dashboard/dist/assets/PlaytestPage-C-WO2SsY.css +0 -1
  69. package/dashboard/dist/assets/PlaytestPage-Djj9Z4yq.js +0 -11
  70. package/dashboard/dist/assets/SettingsPage-BR71s-WH.css +0 -1
  71. package/dashboard/dist/assets/SettingsPage-u168hqTU.js +0 -1
  72. package/dashboard/dist/assets/SyncPage-DCSjeijW.js +0 -1
  73. package/dashboard/dist/assets/SyncPage-sHUpW30U.css +0 -1
  74. package/dashboard/dist/assets/Tabs-CIszXeoU.css +0 -1
  75. package/dashboard/dist/assets/Tabs-PO1vvwQv.js +0 -1
  76. package/dashboard/dist/assets/ToolsPage-Agg2KLl4.js +0 -1
  77. package/dashboard/dist/assets/ToolsPage-B4t6LvfV.css +0 -1
  78. package/dashboard/dist/assets/UiPrimitive-BMSNRGwI.css +0 -1
  79. package/dashboard/dist/assets/UiPrimitive-BTuxHpyB.js +0 -1
  80. package/dashboard/dist/assets/UiStudioPage-Ds-eaGvd.css +0 -1
  81. package/dashboard/dist/assets/WhatsNewPage-DZNySLP6.js +0 -1
  82. package/dashboard/dist/assets/WhatsNewPage-wF04BABp.css +0 -1
  83. package/dashboard/dist/assets/index-BDzb8NjS.css +0 -1
  84. package/dashboard/dist/assets/index-Dj2NvZgn.js +0 -778
  85. package/dashboard/dist/assets/sample-requests-CG4hsqBb.js +0 -1
  86. package/dashboard/dist/assets/sample-requests-DmUwqmFE.css +0 -1
  87. package/dashboard/dist/assets/useSettings-Ce19GEW2.css +0 -1
  88. package/dashboard/dist/assets/useSettings-Q2tOR4bH.js +0 -1
@@ -0,0 +1 @@
1
+ import{u as X,a as le,r,j as e,b as I,g as me,c as ye,T as je,A as xe,S as fe}from"./index-89-Xnii6.js";import{C as be,P as ve}from"./PageHeader-B42Je0MJ.js";import{I as R}from"./InfoLabel-csGVLmJ3.js";import{T as m}from"./TooltipText-EK4_jbu2.js";import{s as a,u as Se}from"./useSettings-B45j17ns.js";import{C as ce}from"./ConfirmModal-CQhMb2gs.js";import{D as de,f as ue,r as Ce,s as Ne,a as pe,d as se,S as ae,b as _e}from"./sample-requests-DOteSh1j.js";import"./ConfirmModal.module-DJksQHBd.js";const ke="_card_jz1ya_4",Pe="_cardEmbedded_jz1ya_14",Le="_cardTitle_jz1ya_21",Re="_storageConsoleGrid_jz1ya_31",we="_storageUsageColumn_jz1ya_38",He="_storagePolicyColumn_jz1ya_39",Be="_usageRow_jz1ya_44",Me="_usageTotal_jz1ya_50",Ae="_usageBreakdown_jz1ya_57",$e="_usageCounts_jz1ya_63",ze="_storageFooter_jz1ya_70",De="_lastRunRow_jz1ya_79",Ee="_lastRunLabel_jz1ya_89",Te="_errorIcon_jz1ya_95",Ie="_tooltip_jz1ya_103",Ue="_cleanupRow_jz1ya_126",Fe="_cleanupLabel_jz1ya_133",Oe="_cleanupBtn_jz1ya_140",Ge="_cleanupBtnDanger_jz1ya_169",qe="_retentionSection_jz1ya_182",We="_retentionTitle_jz1ya_188",Ye="_retentionFieldset_jz1ya_196",Ke="_proOverlay_jz1ya_211",Ve="_modeSegments_jz1ya_223",Je="_radioLabel_jz1ya_244",Qe="_radioLabelActive_jz1ya_265",Ze="_presetGroup_jz1ya_279",Xe="_presetBtn_jz1ya_287",et="_presetBtnActive_jz1ya_310",tt="_freeInput_jz1ya_317",st="_inputError_jz1ya_334",at="_inputUnit_jz1ya_338",it="_cascadeRow_jz1ya_345",nt="_retentionActions_jz1ya_361",ot="_saveBtn_jz1ya_367",rt="_runNowBtn_jz1ya_395",lt="_errorMsg_jz1ya_439",ct="_freeInputHitArea_jz1ya_501",o={card:ke,cardEmbedded:Pe,cardTitle:Le,storageConsoleGrid:Re,storageUsageColumn:we,storagePolicyColumn:He,usageRow:Be,usageTotal:Me,usageBreakdown:Ae,usageCounts:$e,storageFooter:ze,lastRunRow:De,lastRunLabel:Ee,errorIcon:Te,tooltip:Ie,cleanupRow:Ue,cleanupLabel:Fe,cleanupBtn:Oe,cleanupBtnDanger:Ge,retentionSection:qe,retentionTitle:We,retentionFieldset:Ye,proOverlay:Ke,modeSegments:Ve,radioLabel:Je,radioLabelActive:Qe,presetGroup:Ze,presetBtn:Xe,presetBtnActive:et,freeInput:tt,inputError:st,inputUnit:at,cascadeRow:it,retentionActions:nt,saveBtn:ot,runNowBtn:rt,errorMsg:lt,freeInputHitArea:ct};function dt(t,s){return!!(t.mode==="off"&&s.mode!=="off"||t.mode==="age"&&s.mode==="age"&&(s.ageDays??0)<(t.ageDays??0)||t.mode==="size"&&s.mode==="size"&&(s.sizeMb??0)<(t.sizeMb??0)||!t.cascadeSnapshots&&s.cascadeSnapshots)}function ie(t){return t.mode==="age"?Number.isInteger(t.ageDays)&&t.ageDays>=1&&t.ageDays<=365:t.mode==="size"?Number.isInteger(t.sizeMb)&&t.sizeMb>=50&&t.sizeMb<=1e4:!0}function ut(t,s){return t.mode===s.mode&&t.ageDays===s.ageDays&&t.sizeMb===s.sizeMb&&t.cascadeSnapshots===s.cascadeSnapshots}function Y(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(2)} GB`}function pt({placeId:t,tier:s,currentPolicy:l,onSaved:d}){const{t:n}=X(),{trackEvent:b}=le(),[i,g]=r.useState(l),[p,_]=r.useState(()=>[7,14,30,90].includes(l.ageDays??-1)?"":String(l.ageDays??30)),[v,k]=r.useState(()=>[100,500,1e3].includes(l.sizeMb??-1)?"":String(l.sizeMb??500)),[P,z]=r.useState(null),[x,f]=r.useState(!1),[D,w]=r.useState(!1),[y,H]=r.useState(!1),[L,A]=r.useState(null);r.useEffect(()=>{g(l);const h=[7,14,30,90],M=[100,500,1e3];_(h.includes(l.ageDays??-1)?"":String(l.ageDays??30)),k(M.includes(l.sizeMb??-1)?"":String(l.sizeMb??500))},[l]);const $=s==="basic",N=ie(i),j=ut(l,i),E=N&&!j&&!D,S=h=>{g(M=>{const O={...M,mode:h};return h==="age"&&(O.ageDays=parseInt(p,10)||30),h==="size"&&(O.sizeMb=parseInt(v,10)||500),O})},B=h=>{_(""),g(M=>({...M,ageDays:h}))},U=h=>{k(""),g(M=>({...M,sizeMb:h}))},F=h=>{_(h);const M=parseInt(h,10);Number.isNaN(M)||g(O=>({...O,ageDays:M}))},c=h=>{k(h);const M=parseInt(h,10);Number.isNaN(M)||g(O=>({...O,sizeMb:M}))},T=async()=>{if(A(null),b("dashboard_click_event",{click_target:"ui_studio_cleanup_save",page:"settings"}),dt(l,i)){try{const h=await ue(t,{mode:i.mode,ageDays:i.ageDays,sizeMb:i.sizeMb,cascadeSnapshots:i.cascadeSnapshots});z(h.dryRun),f(!0)}catch(h){A(h.message)}return}await W()},W=async()=>{w(!0);try{await Ne(t,i),f(!1),d()}catch(h){throw A(h.message),h}finally{w(!1)}},u=async()=>{A(null),b("dashboard_click_event",{click_target:"ui_studio_cleanup_run_now",page:"settings"}),H(!0);try{await Ce(t),d()}catch(h){A(h.message)}finally{H(!1)}},C=P?`${n("uiStudio.cleanup.policy.confirm.messageStrict","이 정책으로 즉시")} ${P.wouldRemoveRequests}${n("uiStudio.cleanup.policy.confirm.requests","건")} / ${P.wouldRemoveSnapshots}${n("uiStudio.cleanup.policy.confirm.snapshots","개 화면 캡처")} / ${Y(P.wouldFreeBytes)} ${n("uiStudio.cleanup.policy.confirm.freed","가 삭제됩니다 — 적용?")}`:"",K=i.mode==="age"&&!ie(i),q=i.mode==="size"&&!ie(i);return e.jsxs("div",{className:o.retentionSection,children:[e.jsx("h3",{className:o.retentionTitle,children:e.jsx(R,{label:n("uiStudio.cleanup.policy.title","자동 삭제 정책"),tooltip:n("uiStudio.cleanup.policy.title.tooltip","Rules that automatically remove old or large captures.")})}),e.jsxs("div",{style:{position:"relative"},children:[$&&e.jsx("div",{className:o.proOverlay,title:n("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능"),children:e.jsx("div",{className:o.tooltip,children:n("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능")})}),e.jsxs("fieldset",{className:o.retentionFieldset,disabled:$,"aria-label":n("uiStudio.cleanup.policy.title","자동 삭제 정책"),style:$?{opacity:.45,pointerEvents:"none"}:void 0,children:[e.jsxs("div",{className:o.modeSegments,"data-testid":"cleanup-mode-segments",children:[e.jsx(m,{text:n("uiStudio.cleanup.policy.modeOff.tooltip","Turn off auto-cleanup. Data stays until you remove it manually."),children:e.jsxs("label",{className:`${o.radioLabel} ${i.mode==="off"?o.radioLabelActive:""}`,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"off",checked:i.mode==="off",onChange:()=>S("off")}),n("uiStudio.cleanup.policy.modeOff","사용 안 함 (off)")]})}),e.jsx(m,{text:n("uiStudio.cleanup.policy.modeAge.tooltip","Automatically delete data older than the configured number of days."),children:e.jsxs("label",{className:`${o.radioLabel} ${i.mode==="age"?o.radioLabelActive:""}`,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"age",checked:i.mode==="age",onChange:()=>S("age")}),n("uiStudio.cleanup.policy.modeAge","기간 기반 (age)")]})}),e.jsx(m,{text:n("uiStudio.cleanup.policy.modeSize.tooltip","When total usage exceeds the limit, the oldest data is removed first."),children:e.jsxs("label",{className:`${o.radioLabel} ${i.mode==="size"?o.radioLabelActive:""}`,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"size",checked:i.mode==="size",onChange:()=>S("size")}),n("uiStudio.cleanup.policy.modeSize","용량 기반 (size)")]})})]}),i.mode==="age"&&e.jsxs("div",{className:o.presetGroup,children:[[7,14,30,90].map(h=>e.jsx(m,{text:n("uiStudio.cleanup.policy.agePreset.tooltip","Delete data older than this many days."),children:e.jsxs("button",{type:"button",className:`${o.presetBtn} ${i.ageDays===h&&p===""?o.presetBtnActive:""}`,onClick:()=>B(h),children:[h,n("uiStudio.cleanup.policy.daysUnit","일")]})},h)),e.jsx(m,{text:n("uiStudio.cleanup.policy.ageInput.tooltip","Enter any value between 1 and 365 days."),children:e.jsx("label",{className:o.freeInputHitArea,children:e.jsx("input",{type:"number",className:`${o.freeInput} ${K?o.inputError:""}`,value:p,min:1,max:365,onChange:h=>F(h.target.value)})})}),e.jsxs("span",{className:o.inputUnit,children:["1–365",n("uiStudio.cleanup.policy.daysUnit","일")]})]}),i.mode==="size"&&e.jsxs("div",{className:o.presetGroup,children:[[100,500,1e3].map(h=>e.jsx(m,{text:n("uiStudio.cleanup.policy.sizePreset.tooltip","Keep total usage under this size."),children:e.jsxs("button",{type:"button",className:`${o.presetBtn} ${i.sizeMb===h&&v===""?o.presetBtnActive:""}`,onClick:()=>U(h),children:[h,n("uiStudio.cleanup.policy.mbUnit","MB")]})},h)),e.jsx(m,{text:n("uiStudio.cleanup.policy.sizeInput.tooltip","Enter any value between 50 MB and 10000 MB (10 GB)."),children:e.jsx("label",{className:o.freeInputHitArea,children:e.jsx("input",{type:"number",className:`${o.freeInput} ${q?o.inputError:""}`,value:v,min:50,max:1e4,onChange:h=>c(h.target.value)})})}),e.jsxs("span",{className:o.inputUnit,children:["50–10000",n("uiStudio.cleanup.policy.mbUnit","MB")]})]}),e.jsx(m,{text:n("uiStudio.cleanup.policy.cascade.tooltip","Also delete the capture images linked to those records. If off, the images stay."),children:e.jsxs("label",{className:o.cascadeRow,children:[e.jsx(be,{checked:i.cascadeSnapshots,onChange:h=>g(M=>({...M,cascadeSnapshots:h.target.checked}))}),n("uiStudio.cleanup.policy.cascade","연결된 화면 캡처도 함께 삭제")]})}),e.jsxs("div",{className:o.retentionActions,children:[e.jsx(m,{text:n("uiStudio.cleanup.policy.save.tooltip","Save the current cleanup rule. It runs in the background from then on."),children:e.jsx("button",{type:"button",className:o.saveBtn,onClick:()=>void T(),disabled:!E,children:n("uiStudio.cleanup.policy.save","정책 저장")})}),e.jsx(m,{text:n("uiStudio.cleanup.policy.runNow.tooltip","저장된 정리 정책을 다음 자동 실행까지 기다리지 않고 지금 한 번 실행합니다."),children:e.jsx("button",{type:"button",className:o.runNowBtn,onClick:()=>void u(),disabled:y,children:n("uiStudio.cleanup.policy.runNow","저장된 정책으로 정리")})})]}),L&&e.jsx("div",{className:o.errorMsg,children:L})]})]}),x&&P&&e.jsx(de,{title:n("uiStudio.cleanup.policy.confirm.title","정책 적용 확인"),message:C,danger:!0,confirmLabel:n("uiStudio.cleanup.policy.save","정책 저장"),busy:D,onConfirm:W,onClose:()=>f(!1)})]})}function gt({placeId:t,tier:s,onChanged:l,sampleUsage:d,sampleRetention:n,embedded:b=!1}){const{t:i}=X(),g=s==="basic"&&d!=null&&n!=null,[p,_]=r.useState(g?d:null),[v,k]=r.useState(g?n:null),[P,z]=r.useState(null),[x,f]=r.useState(null),[D,w]=r.useState(null),y=r.useCallback(async()=>{if(!g&&t!=null){z(null);try{const[S,B]=await Promise.all([pe(t),ue(t)]);_(S),k(B.policy)}catch(S){z(S.message)}}},[t,g]);r.useEffect(()=>{y()},[y]);const H=r.useCallback(()=>{y(),l==null||l()},[y,l]),L=r.useCallback(async()=>{if(x&&t!=null){w(null);try{x.kind==="keep7"?await se(t,{olderThanDays:7,alsoSnapshots:!0}):x.kind==="keep30"?await se(t,{olderThanDays:30,alsoSnapshots:!0}):await se(t,{all:!0,alsoSnapshots:!0}),f(null),y(),l==null||l()}catch(S){throw w(S.message),S}}},[x,t,y,l]);function A(S){const B=i("uiStudio.cleanup.studioPreservedNote","This deletes saved change records and screenshots on disk only; Roblox Studio instances are not affected.");return S.kind==="keep7"?`${i("uiStudio.cleanup.cleanupConfirmMessage.keep7","7일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${B}`:S.kind==="keep30"?`${i("uiStudio.cleanup.cleanupConfirmMessage.keep30","30일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${B}`:`${((p==null?void 0:p.requestCount)??0)+((p==null?void 0:p.snapshotCount)??0)}${i("uiStudio.cleanup.cleanupConfirmMessage.all","개의 저장된 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${B}`}if(t==null&&!g)return null;if(P)return e.jsx("div",{className:`${o.card} ${b?o.cardEmbedded:""}`,children:e.jsx("p",{className:o.errorMsg,children:P})});if(!p||!v)return e.jsx("div",{className:`${o.card} ${b?o.cardEmbedded:""}`,children:e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",margin:0},children:i("uiStudio.storage.loading","로딩 중...")})});const $=v.lastRunAt,N=v.lastRunStats,j=$?new Date($).toLocaleString():null,E=t??0;return e.jsxs("div",{className:`${o.card} ${b?o.cardEmbedded:""}`,children:[!b&&e.jsx("h3",{className:o.cardTitle,children:e.jsx(R,{label:i("uiStudio.storage.title","UI Studio 저장 데이터"),tooltip:i("uiStudio.storage.title.tooltip","Disk usage of UI Studio change records and screenshots.")})}),e.jsxs("div",{className:o.storageConsoleGrid,"data-testid":"ui-studio-storage-console-grid",children:[e.jsx("section",{className:o.storageUsageColumn,children:e.jsxs("div",{className:o.usageRow,children:[e.jsx(m,{text:i("uiStudio.storage.usageLabel.tooltip","Disk space currently used by UI Studio for this project."),children:e.jsxs("div",{className:o.usageTotal,children:[i("uiStudio.storage.usageLabel","사용 중")," ",Y(p.totalBytes)]})}),e.jsxs("div",{className:o.usageBreakdown,children:[e.jsx(m,{text:i("uiStudio.storage.historyBytes.tooltip","Space taken by change record data (JSON)."),children:e.jsxs("span",{children:[i("uiStudio.storage.historyBytes","변경 이력")," ",Y(p.historyBytes)]})})," · ",e.jsx(m,{text:i("uiStudio.storage.snapshotBytes.tooltip","Space taken by captured PNG image files."),children:e.jsxs("span",{children:[i("uiStudio.storage.snapshotBytes","화면 캡처")," ",Y(p.snapshotBytes)]})})]}),e.jsxs("div",{className:o.usageCounts,children:[e.jsx(m,{text:i("uiStudio.storage.requestCount.tooltip","Number of actions where AI changed the UI."),children:e.jsxs("span",{children:[i("uiStudio.storage.requestCount","변경 기록")," ",p.requestCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(m,{text:i("uiStudio.storage.mutationCount.tooltip","Number of detail changes inside actions (one property edit = 1)."),children:e.jsxs("span",{children:[i("uiStudio.storage.mutationCount","변경 상세")," ",p.mutationCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(m,{text:i("uiStudio.storage.snapshotCount.tooltip","Number of saved capture image files."),children:e.jsxs("span",{children:[i("uiStudio.storage.snapshotCount","화면 캡처")," ",p.snapshotCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})]})]})}),e.jsx("section",{className:o.storagePolicyColumn,children:e.jsx(pt,{placeId:E,tier:s,currentPolicy:v,onSaved:H})})]}),e.jsxs("div",{className:o.storageFooter,"data-testid":"ui-studio-storage-footer",children:[e.jsxs("div",{className:o.lastRunRow,children:[e.jsx("span",{className:o.lastRunLabel,children:e.jsx(R,{label:i("uiStudio.storage.lastRun","마지막 자동 정리"),tooltip:i("uiStudio.storage.lastRun.tooltip","When the auto-cleanup policy last ran, and what it removed.")})}),j?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:j}),N&&e.jsxs("span",{children:["· ",i("uiStudio.storage.requestCount","변경 기록")," ",N.removedRequests,i("uiStudio.storage.countSuffix","개")," / ",i("uiStudio.storage.snapshotCount","화면 캡처")," ",N.removedSnapshots,i("uiStudio.storage.countSuffix","개")," / ",Y(N.freedBytes)," ",i("uiStudio.storage.lastRunFreed","회수")]}),N&&N.errors>0&&e.jsxs("span",{className:o.errorIcon,title:`${i("uiStudio.storage.lastRunErrors","오류")} ${N.errors}건`,children:["⚠",e.jsxs("span",{className:o.tooltip,children:[i("uiStudio.storage.lastRunErrors","오류")," ",N.errors,i("uiStudio.storage.countSuffix","건")]})]})]}):e.jsx("span",{children:i("uiStudio.storage.lastRunNever","—")})]}),e.jsxs("div",{className:o.cleanupRow,children:[e.jsx("span",{className:o.cleanupLabel,children:e.jsx(R,{label:i("uiStudio.cleanup.label","수동 정리"),tooltip:i("uiStudio.cleanup.label.tooltip","Manually clean up change records and captures whenever you want.")})}),e.jsx(m,{text:i("uiStudio.cleanup.keep7.tooltip","Delete change records and captures older than 7 days."),children:e.jsx("button",{type:"button",className:o.cleanupBtn,onClick:()=>f({kind:"keep7"}),disabled:s==="basic",children:i("uiStudio.cleanup.keepLastNDays","최근 7일만 남기기").replace("{n}","7")})}),e.jsx(m,{text:i("uiStudio.cleanup.keep30.tooltip","Delete change records and captures older than 30 days."),children:e.jsx("button",{type:"button",className:o.cleanupBtn,onClick:()=>f({kind:"keep30"}),disabled:s==="basic",children:i("uiStudio.cleanup.keepLastNDays","최근 30일만 남기기").replace("{n}","30")})}),!b&&e.jsx(m,{text:i("uiStudio.cleanup.deleteAll.tooltip","Delete every change record and capture for this project. The actual UI in Roblox Studio is not affected."),children:e.jsx("button",{type:"button",className:`${o.cleanupBtn} ${o.cleanupBtnDanger}`,onClick:()=>f({kind:"all"}),disabled:s==="basic",children:i("uiStudio.cleanup.deleteAll","전체 삭제…")})})]})]}),D&&e.jsx("div",{className:o.errorMsg,children:D}),x&&e.jsx(de,{title:i("uiStudio.cleanup.cleanupConfirmTitle","정리 확인"),message:A(x),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:L,onClose:()=>{f(null),w(null)}})]})}function ne(t,s){const l={placeId:String(t)};return s&&(l["preview.mode"]=s.mode,s.mode==="size"&&(l["preview.sizeMb"]=String(s.sizeMb))),I.get("/api/dashboard/changelog/cleanup",l)}function oe(t){return I.put("/api/dashboard/changelog/cleanup",t)}function ht(t){return I.post(`/api/dashboard/changelog/cleanup/run?placeId=${encodeURIComponent(t)}`)}const mt=[100,500,1e3];function re(t,s){return t.mode!==s.mode?!1:t.mode==="off"||s.mode==="size"&&t.sizeMb===s.sizeMb}function yt(t,s){return t.mode==="off"?!1:s.mode==="off"||t.sizeMb<s.sizeMb}function J(t){return t<1e3?`${t} B`:t<1e6?`${(t/1e3).toFixed(1)} KB`:t<1e9?`${(t/1e6).toFixed(1)} MB`:`${(t/1e9).toFixed(2)} GB`}function jt({placeId:t,onChanged:s}){const{locale:l,t:d}=X(),[n,b]=r.useState(null),[i,g]=r.useState({mode:"size",sizeMb:500}),[p,_]=r.useState(t!==null),[v,k]=r.useState(!1),[P,z]=r.useState(!1),[x,f]=r.useState(!1),[D,w]=r.useState(!1),[y,H]=r.useState(null),L=r.useCallback(async()=>{if(t===null){b(null),_(!1);return}z(!1);try{const u=await ne(t);b(u),g(u.policy)}catch{z(!0)}finally{_(!1)}},[t]);r.useEffect(()=>{_(t!==null),L()},[L,t]);const A=r.useCallback(async u=>{k(!0),f(!1),w(!1);try{await oe(u),H(null),await L(),w(!0),s==null||s()}catch{f(!0)}finally{k(!1)}},[L,s]),$=r.useCallback(async()=>{if(!(!n||t===null||re(i,n.policy))){k(!0),f(!1),w(!1);try{if(yt(i,n.policy)){const u=await ne(t,i);if(u.preview.affectedPlaceCount>0){H({policy:i,preview:u});return}}await oe(i),await L(),w(!0),s==null||s()}catch{f(!0)}finally{k(!1)}}},[n,i,L,s,t]),N=r.useCallback(async()=>{if(t!==null){k(!0),f(!1),w(!1);try{await ht(t),await L(),s==null||s()}catch{f(!0)}finally{k(!1)}}},[L,s,t]),j=n==null?void 0:n.selectedPlace.currentUsage,E=(n==null?void 0:n.policy.mode)==="size"?n.policy.sizeMb*1e6:null,S=E??Math.max((j==null?void 0:j.bytes)??0,1),B=Math.min(100,((j==null?void 0:j.sessionBytes)??0)/S*100),U=Math.min(Math.max(0,100-B),((j==null?void 0:j.contextBytes)??0)/S*100),F=n?!re(i,n.policy):!1,c=u=>u.mode==="off"?d("settings.projectChanges.cleanup.unlimited","Unlimited"):`${u.sizeMb} MB`,T=r.useMemo(()=>{if(!y)return"";const u=y.preview.preview,C=d("settings.projectChanges.cleanup.confirm.message","{places} Places · {sessions} sessions · {bytes} expected to be freed.").replace("{places}",u.affectedPlaceCount.toLocaleString()).replace("{sessions}",u.deleteSessionCount.toLocaleString()).replace("{bytes}",J(u.estimatedFreedBytes));return u.wouldRemainOverLimitPlaceCount===0?C:`${C} ${d("settings.projectChanges.cleanup.confirm.protected","{places} Place may remain over the limit because active data is protected.").replace("{places}",u.wouldRemainOverLimitPlaceCount.toLocaleString())}`},[y,d]);if(t===null)return e.jsx("div",{className:a.projectChangesPanel,children:e.jsx("p",{className:a.projectChangesEmpty,children:d("settings.projectChanges.cleanup.noPlace","Select a Place to manage saved project changes.")})});if(p)return e.jsx("div",{className:a.projectChangesPanel,children:e.jsx("p",{className:a.projectChangesEmpty,children:d("settings.projectChanges.cleanup.loading","Loading storage settings…")})});if(P||!n||!j)return e.jsxs("div",{className:a.projectChangesPanel,children:[e.jsx("p",{className:a.projectChangesError,role:"alert",children:d("settings.projectChanges.cleanup.loadFailed","Could not load storage settings.")}),e.jsx("button",{className:a.projectChangesSecondaryButton,type:"button",onClick:()=>{_(!0),L()},children:d("common.retry","Retry")})]});const W=E===null?d("settings.projectChanges.cleanup.usageUnlimited","{used} used · Unlimited").replace("{used}",J(j.bytes)):d("settings.projectChanges.cleanup.usageLimited","{used} used of {limit}").replace("{used}",J(j.bytes)).replace("{limit}",c(n.policy));return e.jsxs("div",{className:a.projectChangesPanel,children:[e.jsxs("div",{className:a.projectChangesConsoleGrid,"data-testid":"project-storage-console-grid",children:[e.jsxs("section",{className:a.projectChangesUsageColumn,children:[e.jsx("h3",{className:a.projectChangesPanelTitle,children:e.jsx(R,{label:d("settings.projectChanges.cleanup.title","Storage management"),tooltip:d("settings.projectChanges.cleanup.title.tooltip","Set how much Project Change Summary history each Place can keep.")})}),e.jsxs("div",{className:a.projectChangesUsageBlock,children:[e.jsx("div",{className:a.projectChangesUsageSummary,children:W}),e.jsxs("div",{className:a.projectChangesQuotaRail,role:"meter","aria-label":d("settings.projectChanges.cleanup.usageAria","Place storage usage"),"aria-valuemin":0,"aria-valuenow":j.bytes,"aria-valuemax":E??j.bytes,children:[e.jsx("span",{className:a.projectChangesSessionRail,style:{width:`${B}%`}}),e.jsx("span",{className:a.projectChangesContextRail,style:{width:`${U}%`}})]}),e.jsxs("div",{className:a.projectChangesUsageLegend,children:[e.jsxs("span",{children:[d("settings.projectChanges.cleanup.sessions","Sessions")," ",e.jsx("strong",{children:J(j.sessionBytes)})]}),e.jsxs("span",{children:[d("settings.projectChanges.cleanup.contexts","Contexts")," ",e.jsx("strong",{children:J(j.contextBytes)})]})]})]})]}),e.jsxs("section",{className:a.projectChangesPolicyColumn,children:[e.jsx("p",{className:a.projectChangesScope,children:d("settings.projectChanges.cleanup.scope","One setting applies the selected limit separately to every Place.")}),e.jsxs("fieldset",{className:a.projectChangesPolicyFieldset,disabled:v,children:[e.jsx("legend",{className:a.projectChangesPolicyLegend,children:d("settings.projectChanges.cleanup.limit","Limit per Place")}),e.jsxs("div",{className:a.projectChangesPresetGroup,children:[mt.map(u=>{const C=i.mode==="size"&&i.sizeMb===u;return e.jsx("button",{className:`${a.projectChangesPresetButton} ${C?a.projectChangesPresetButtonActive:""}`,type:"button","aria-pressed":C,onClick:()=>g({mode:"size",sizeMb:u}),children:d("settings.projectChanges.cleanup.preset","{sizeMb}MB").replace("{sizeMb}",String(u))},u)}),e.jsx("button",{className:`${a.projectChangesPresetButton} ${i.mode==="off"?a.projectChangesPresetButtonActive:""}`,type:"button","aria-pressed":i.mode==="off",onClick:()=>g({mode:"off"}),children:d("settings.projectChanges.cleanup.unlimited","Unlimited")})]})]}),e.jsxs("div",{className:a.projectChangesActions,children:[e.jsx("button",{className:a.projectChangesSaveButton,type:"button",disabled:!F||v,onClick:()=>void $(),children:d("common.save","Save")}),e.jsx("button",{className:a.projectChangesSecondaryButton,type:"button",disabled:v,onClick:()=>void N(),children:d("settings.projectChanges.cleanup.runNow","Run saved policy")}),D&&e.jsx("span",{className:a.projectChangesSaved,role:"status",children:d("settings.projectChanges.cleanup.saved","Saved")})]})]})]}),n.selectedPlace.dryRun.wouldRemainOverLimit&&e.jsx("p",{className:a.projectChangesWarning,children:d("settings.projectChanges.cleanup.protectedWarning","Active changes are protected, so this Place may stay over the limit.")}),e.jsxs("div",{className:a.projectChangesLastRun,"data-testid":"project-storage-footer",children:[e.jsx("span",{className:a.projectChangesLastRunLabel,children:d("settings.projectChanges.cleanup.lastRun","Last cleanup")}),n.selectedPlace.lastRun?e.jsxs("span",{children:[new Date(n.selectedPlace.lastRun.ranAt).toLocaleString(l)," · ",d("settings.projectChanges.cleanup.lastRunSummary","{sessions} sessions · {bytes} freed").replace("{sessions}",n.selectedPlace.lastRun.deletedSessionCount.toLocaleString()).replace("{bytes}",J(n.selectedPlace.lastRun.freedBytes))]}):e.jsx("span",{children:d("settings.projectChanges.cleanup.neverRun","Not run yet")})]}),x&&e.jsx("p",{className:a.projectChangesError,role:"alert",children:d("settings.projectChanges.cleanup.actionFailed","Could not update storage settings.")}),e.jsx(ce,{open:y!==null,title:d("settings.projectChanges.cleanup.confirm.title","Apply this limit and clean saved changes?"),message:T,cancelLabel:d("common.cancel","Cancel"),confirmLabel:d("settings.projectChanges.cleanup.confirm.apply","Apply and clean"),loading:v,onCancel:()=>!v&&H(null),onConfirm:()=>{y&&A(y.policy)}})]})}const xt={toolsActivity:null,toolStats:null,toolSessions:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null},ft={toolsActivity:null,toolStats:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null};function bt(t){var s;return t?t.pluginConnected?t.activePlaceId:t.lastActivePlaceId??((s=t.places[0])==null?void 0:s.placeId)??null:null}async function G(t){try{return await t}catch{return null}}function ee(t){return t?typeof t.total=="number"?t.total:Array.isArray(t.entries)?t.entries.length:null:null}function te(t,s,l,d){return s===null?t("settings.dataHistory.metric.unavailable","Unavailable"):`${s.toLocaleString()} ${t(l,d)}`}function Q(t,s,l){const d=l===null?t("settings.dataHistory.metric.sizeUnavailable","size unavailable"):Y(l);return`${s} · ${d}`}function Z(t,s){var d;const l=(d=t==null?void 0:t[s])==null?void 0:d.bytes;return typeof l=="number"&&Number.isFinite(l)?l:null}function vt(t,s){return s?[`${s.requestCount.toLocaleString()} ${t("uiStudio.storage.requestCount","change records")}`,`${s.snapshotCount.toLocaleString()} ${t("uiStudio.storage.snapshotCount","screenshots")}`,Y(s.totalBytes)].join(" · "):t("settings.dataHistory.metric.unavailable","Unavailable")}function St({tier:t}){const{t:s}=X(),[l,d]=r.useState(xt),[n,b]=r.useState(ft),[i,g]=r.useState(t==="basic"?ae:null),[p,_]=r.useState(null),[v,k]=r.useState(!0),[P,z]=r.useState(!0),[x,f]=r.useState(null),[D,w]=r.useState(()=>new Set),[y,H]=r.useState(null),[L,A]=r.useState(!1),[$,N]=r.useState(null),j=r.useCallback(async()=>{k(!0);const u=await G(me()),C=bt(u);_(C);const[K,q,h,M,O,ge,V]=await Promise.all([G(I.get("/api/dashboard/history",{limit:"1",offset:"0"})),G(I.get("/api/dashboard/tool-stats")),G(I.get("/sync/history",{limit:"1",offset:"0"})),G(I.get("/api/dashboard/playtest/history")),G(I.get("/api/dashboard/changelog",{limit:"1",offset:"0"})),G(I.get("/api/dashboard/connection-log")),G(I.get("/api/dashboard/storage-summary"))]),he=t==="basic"?ae:C===null?null:await G(pe(C));d({toolsActivity:ee(K),toolStats:(q==null?void 0:q.totalCalls)??null,toolSessions:(q==null?void 0:q.totalSessions)??null,syncLog:ee(h),playtestReports:ee(M),projectChanges:ee(O),connectionLog:ee(ge)}),b({toolsActivity:Z(V,"toolsActivity"),toolStats:Z(V,"toolStats"),syncLog:Z(V,"syncLog"),playtestReports:Z(V,"playtestReports"),projectChanges:Z(V,"projectChanges"),connectionLog:Z(V,"connectionLog")}),g(he),k(!1)},[t]);r.useEffect(()=>{j()},[j]);const E=r.useCallback(u=>{w(C=>{if(C.has(u))return C;const K=new Set(C);return K.add(u),K}),f(C=>C===u?null:u)},[]),S=r.useMemo(()=>[{key:"toolsActivity",title:s("settings.dataHistory.toolsActivity.title","Tool activity"),description:s("settings.dataHistory.toolsActivity.description","Saved tool runs shown on the Tools page."),metric:Q(s,te(s,l.toolsActivity,"settings.dataHistory.metric.records","records"),n.toolsActivity),metricTooltip:s("settings.dataHistory.toolsActivity.metric.tooltip","Number of saved tool runs and the disk space they use."),route:"/tools",clearEndpoint:"/api/dashboard/tools/history/clear"},{key:"toolStats",title:s("settings.dataHistory.toolStats.title","Tool usage statistics"),description:s("settings.dataHistory.toolStats.description","Aggregated tool counts and status totals."),metric:Q(s,l.toolStats===null?s("settings.dataHistory.metric.unavailable","Unavailable"):`${l.toolStats.toLocaleString()} ${s("settings.dataHistory.metric.runs","runs")} · ${(l.toolSessions??0).toLocaleString()} ${s("settings.dataHistory.metric.sessions","sessions")}`,n.toolStats),metricTooltip:s("settings.dataHistory.toolStats.metric.tooltip","Aggregated total runs and session counts."),route:"/tools",clearEndpoint:"/api/dashboard/tools/statistics/clear"},{key:"syncLog",title:s("settings.dataHistory.syncLog.title","Sync log"),description:s("settings.dataHistory.syncLog.description","Saved file sync events for the active place."),metric:Q(s,te(s,l.syncLog,"settings.dataHistory.metric.records","records"),n.syncLog),metricTooltip:s("settings.dataHistory.syncLog.metric.tooltip","Number of saved sync events and the disk space they use."),route:"/sync",clearEndpoint:"/api/dashboard/sync/history/clear"},{key:"playtestReports",title:s("settings.dataHistory.playtest.title","Playtest reports"),description:s("settings.dataHistory.playtest.description","Saved automated playtest reports and logs."),metric:Q(s,te(s,l.playtestReports,"settings.dataHistory.metric.reports","reports"),n.playtestReports),metricTooltip:s("settings.dataHistory.playtestReports.metric.tooltip","Number of saved playtest reports and the disk space they use."),route:"/playtest",clearEndpoint:"/api/dashboard/playtest/history/clear"},{key:"projectChanges",title:s("settings.dataHistory.projectChanges.title","Project change summary"),description:s("settings.dataHistory.projectChanges.description","Saved summaries of project changes."),metric:Q(s,te(s,l.projectChanges,"settings.dataHistory.metric.records","records"),n.projectChanges),metricTooltip:s("settings.dataHistory.projectChanges.metric.tooltip","Number of saved project change summaries and the disk space they use."),route:"/changelog",clearEndpoint:"/api/dashboard/changelog/clear"},{key:"connectionLog",title:s("settings.dataHistory.connectionLog.title","Connection log"),description:s("settings.dataHistory.connectionLog.description","Saved MCP and Studio connection events."),metric:Q(s,te(s,l.connectionLog,"settings.dataHistory.metric.records","records"),n.connectionLog),metricTooltip:s("settings.dataHistory.connectionLog.metric.tooltip","Number of saved connection events and the disk space they use."),route:"/connection",clearEndpoint:"/api/dashboard/connection-log/clear"}],[l,n,s]),B=async()=>{if(y){A(!0),N(null);try{if(y.kind==="uiStudio"){if(t!=="pro"||p===null)throw new Error("UI Studio place is unavailable");await se(p,{all:!0,alsoSnapshots:!0}),N(s("settings.dataHistory.uiStudio.clear.success","UI Studio saved data cleared."))}else{const u=y.row.key==="projectChanges";if(u&&p===null)throw new Error("Project changes place is unavailable");let C=y.row.clearEndpoint;u&&p!==null&&(C=`${C}?placeId=${encodeURIComponent(p)}`),await I.post(C),N(u?s("settings.dataHistory.projectChanges.clear.success","Project change summaries cleared."):s("settings.dataHistory.clear.success","Saved data cleared."))}H(null),await j()}catch{N(y.kind==="uiStudio"?s("settings.dataHistory.uiStudio.clear.failed","Failed to clear UI Studio saved data."):s("settings.dataHistory.clear.failed","Failed to clear saved data."))}finally{A(!1)}}},U=t==="pro"?p:0,F=t==="pro"&&p!==null,c=(y==null?void 0:y.kind)==="uiStudio",T=(y==null?void 0:y.kind)==="row"&&y.row.key==="projectChanges",W=s("settings.dataHistory.title","Data & History");return e.jsxs(e.Fragment,{children:[e.jsxs("section",{id:"data-history",className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(R,{label:s("settings.dataHistory.title","Data & History"),tooltip:s("settings.dataHistory.title.tooltip","Manage saved dashboard data in one place.")}),e.jsxs("div",{className:a.cardHeaderActions,children:[e.jsx(m,{text:s("settings.dataHistory.scope.tooltip","Clear actions apply to the current project and active place where applicable."),children:e.jsx("span",{className:a.headerBadge,children:v?s("common.loading","Loading"):s("settings.dataHistory.scope","Current project")})}),e.jsx(m,{text:s("settings.dataHistory.toggle.tooltip","Collapse or expand this section."),children:e.jsx("button",{className:a.collapseButton,type:"button","aria-expanded":P,"aria-controls":"settings-data-history-body","aria-label":P?s("settings.dataHistory.collapse","Collapse {title}").replace("{title}",W):s("settings.dataHistory.expand","Expand {title}").replace("{title}",W),onClick:()=>z(u=>!u),children:P?"▾":"▸"})})]})]}),P&&e.jsxs("div",{id:"settings-data-history-body",children:[e.jsx("p",{className:a.dataHistoryIntro,children:s("settings.dataHistory.intro","Review saved dashboard data, open the related page, or clear stored records from one place.")}),e.jsxs("div",{className:a.dataHistoryList,children:[S.map(u=>e.jsxs(r.Fragment,{children:[e.jsxs("div",{className:`${a.dataHistoryRow} ${u.key==="projectChanges"&&x==="projectChanges"?a.dataHistoryRowExpanded:""}`,children:[e.jsxs("div",{className:a.dataHistoryMain,children:[e.jsx("div",{className:a.dataHistoryTitle,children:u.title}),e.jsx("div",{className:a.dataHistoryDescription,children:u.description})]}),e.jsx(m,{text:u.metricTooltip,children:e.jsx("div",{className:a.dataHistoryMetric,children:u.metric})}),e.jsxs("div",{className:a.dataHistoryActions,children:[e.jsx(m,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:a.linkButton,href:`#${u.route}`,children:s("settings.dataHistory.open","Open")})}),u.key==="projectChanges"&&e.jsx(m,{text:s("settings.dataHistory.manageStorage.tooltip","Show or hide storage policy and cleanup controls."),children:e.jsxs("button",{className:a.manageStorageButton,type:"button","aria-expanded":x==="projectChanges","aria-controls":"settings-project-changes-storage","aria-label":s("settings.dataHistory.manageStorage.projectChanges.aria","Manage Project change summary storage"),onClick:()=>E("projectChanges"),children:[s("settings.dataHistory.manageStorage","Manage storage"),e.jsx("span",{"aria-hidden":"true",children:x==="projectChanges"?"▴":"▾"})]})}),e.jsx(m,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:a.dangerButton,type:"button",disabled:u.key==="projectChanges"&&p===null,onClick:()=>H({kind:"row",row:u}),children:u.key==="projectChanges"?s("settings.dataHistory.clearAll","Clear all"):s("common.clear","Clear")})})]})]}),u.key==="projectChanges"&&D.has("projectChanges")&&e.jsx("div",{id:"settings-project-changes-storage",className:`${a.dataHistoryDetail} ${a.projectChangesDataHistoryDetail}`,hidden:x!=="projectChanges",children:e.jsx(jt,{placeId:p,onChanged:j})})]},u.key)),e.jsxs("div",{className:`${a.dataHistoryRow} ${x==="uiStudio"?a.dataHistoryRowExpanded:""}`,children:[e.jsxs("div",{className:a.dataHistoryMain,children:[e.jsx("div",{className:a.dataHistoryTitle,children:s("settings.dataHistory.uiStudio.title","UI Studio history and screenshots")}),e.jsx("div",{className:a.dataHistoryDescription,children:s("settings.dataHistory.uiStudio.description","Saved UI Studio change records, screenshots, and cleanup policy.")})]}),e.jsx(m,{text:s("settings.dataHistory.uiStudio.metric.tooltip","UI Studio change record and capture counts, plus total disk usage."),children:e.jsx("div",{className:a.dataHistoryMetric,children:vt(s,i)})}),e.jsxs("div",{className:a.dataHistoryActions,children:[e.jsx(m,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:a.linkButton,href:"#/ui-studio?tab=history",children:s("settings.dataHistory.open","Open")})}),e.jsx(m,{text:s("settings.dataHistory.manageStorage.tooltip","Show or hide storage policy and cleanup controls."),children:e.jsxs("button",{className:a.manageStorageButton,type:"button","aria-expanded":x==="uiStudio","aria-controls":"settings-ui-studio-storage","aria-label":s("settings.dataHistory.manageStorage.uiStudio.aria","Manage UI Studio history and screenshots storage"),onClick:()=>E("uiStudio"),children:[s("settings.dataHistory.manageStorage","Manage storage"),e.jsx("span",{"aria-hidden":"true",children:x==="uiStudio"?"▴":"▾"})]})}),e.jsx(m,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:a.dangerButton,type:"button",disabled:!F,onClick:()=>H({kind:"uiStudio"}),children:s("settings.dataHistory.clearAll","Clear all")})})]})]}),D.has("uiStudio")&&e.jsx("div",{id:"settings-ui-studio-storage",className:`${a.dataHistoryDetail} ${a.uiStudioDataHistoryDetail}`,hidden:x!=="uiStudio",children:e.jsx(gt,{placeId:U,tier:t,onChanged:j,embedded:!0,...t==="basic"?{sampleUsage:ae,sampleRetention:_e}:{}})})]}),$&&e.jsx("p",{className:a.inlineStatus,children:$})]})]}),e.jsx(ce,{open:y!==null,title:c?s("settings.dataHistory.uiStudio.clear.title","Clear UI Studio saved data?"):T?s("settings.dataHistory.projectChanges.clear.title","Clear project change summaries?"):s("settings.dataHistory.clear.title","Clear saved data?"),message:c?s("settings.dataHistory.uiStudio.clear.message","This deletes saved UI Studio change records and screenshots only. Roblox Studio instances and project objects are not changed."):T?s("settings.dataHistory.projectChanges.clear.message","This deletes completed sessions and ended context history for the selected Place. Active work and Roblox Studio project data stay intact."):s("settings.dataHistory.clear.message","This deletes saved dashboard records only. Roblox Studio instances and project objects are not changed."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:T||c?s("settings.dataHistory.clearAll","Clear all"):s("common.clear","Clear"),loading:L,onCancel:()=>!L&&H(null),onConfirm:()=>void B()})]})}const Ct=r.forwardRef(function({autoOpen:s,settingsFilePath:l,saving:d,targeted:n,updateDashboardPreferences:b},i){const{t:g}=X(),[p,_]=r.useState("idle"),v="settings-dashboard-auto-open-label",k=d||p==="saving",P=async x=>{_("saving");try{await b({autoOpen:x}),_("saved")}catch{_("error")}},z=p==="saving"?g("settings.dashboard.autoOpen.saving","Saving…"):p==="saved"?g("settings.dashboard.autoOpen.saved","Saved for the next server start."):p==="error"?g("settings.dashboard.autoOpen.error","Could not save. The previous setting was restored."):" ";return e.jsxs("div",{id:"settings-dashboard",ref:i,tabIndex:-1,"data-testid":"settings-dashboard-card",className:[a.card,a.dashboardCard,n?a.dashboardCardTarget:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(R,{label:g("settings.dashboard.title","Dashboard"),tooltip:g("settings.dashboard.title.tooltip","Choose how WEPPY Dashboard behaves when the MCP Server starts.")}),e.jsx(m,{text:g("settings.dashboard.autoOpen.nextStart","Applies the next time the MCP Server starts."),children:e.jsx("span",{className:a.headerBadge,children:g("settings.dashboard.nextStartBadge","Next Start")})})]}),e.jsxs("div",{className:a.dashboardSettingRow,children:[e.jsxs("div",{className:a.dashboardSettingCopy,children:[e.jsx("span",{id:v,className:a.dashboardSettingLabel,children:g("settings.dashboard.autoOpen.label","Open Dashboard when WEPPY starts")}),e.jsx("span",{className:a.dashboardSettingDescription,children:g("settings.dashboard.autoOpen.description","Automatically opens this Dashboard after the MCP Server starts.")}),e.jsx("span",{className:a.dashboardSettingMeta,children:g("settings.dashboard.autoOpen.nextStart","Applies the next time the MCP Server starts.")})]}),e.jsxs("label",{className:`${a.toggleSwitch} ${a.dashboardToggleTarget}`,children:[e.jsx("input",{className:a.toggleInput,type:"checkbox",role:"switch","aria-labelledby":v,checked:s,disabled:k,onChange:x=>{P(x.target.checked)}}),e.jsx("span",{className:a.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:a.toggleThumb})})]})]}),e.jsxs("dl",{className:a.dashboardDetails,children:[e.jsxs("div",{className:a.dashboardDetailRow,children:[e.jsx("dt",{children:g("settings.dashboard.settingsFile.label","Settings file")}),e.jsx("dd",{children:e.jsx("code",{className:a.dashboardSettingsFilePath,children:l})})]}),e.jsxs("div",{className:a.dashboardDetailRow,children:[e.jsx("dt",{children:g("settings.dashboard.agentExample.label","Ask your Agent")}),e.jsx("dd",{className:a.dashboardAgentPrompt,children:g("settings.dashboard.agentExample.prompt","“Turn off Dashboard auto-open.”")})]})]}),e.jsx("p",{className:`${a.dashboardSaveFeedback} ${p==="error"?a.dashboardSaveFeedbackError:""}`,"aria-live":"polite",children:z})]})}),Nt={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch","fr-fr":"Français"};function _t(t){return t==="active"?a.statusActive:t==="grace"?a.statusGrace:t==="invalid"||t==="revoked"?a.statusError:a.statusInactive}function kt(t){return t?t.refreshBlockedReason==="missing_session_token"?!0:t.status==="active"||t.status==="grace"||t.status==="invalid"||t.status==="revoked"||t.status==="unknown":!1}function Pt(t,s){return t.refreshBlockedReason==="missing_session_token"?{label:s("settings.license.status.activationRequired","Activation Required"),tooltip:s("settings.license.status.activationRequired.tooltip","Manual license activation is required before WEPPY Dashboard can refresh this status."),detail:s("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:a.licenseNoticeWarning}:t.statusDetail==="active_cancel_pending"?{label:s("settings.license.active","Active"),tooltip:s("settings.license.status.activeCancelPending.tooltip","Cancellation is pending, but Pro access remains active until the current billing period ends."),detail:s("settings.license.detail.cancelPending","Cancellation is scheduled. Pro access remains active until the current billing period ends."),detailTone:a.licenseNoticeInfo}:t.statusDetail==="grace_provider_unavailable"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:s("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:a.licenseNoticeInfo}:t.statusDetail==="grace_expired"||t.statusDetail==="grace_payment_failed"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:s("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:a.licenseNoticeInfo}:{label:s(`settings.license.${t.status}`,t.status),tooltip:s(`settings.license.${t.status}.tooltip`,"Current license activation state."),detail:t.refreshRequired?s("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:a.licenseNoticeMuted}}function zt(){const{t,selectedLocale:s,setLocale:l}=X(),{trackEvent:d}=le(),{search:n}=ye(),{settings:b,license:i,licenseControlsDisabled:g,licenseSubmitting:p,licenseMessage:_,activateLicense:v,refreshLicense:k,resetLicense:P,saving:z,updateDashboardPreferences:x,loading:f}=Se(),[D,w]=r.useState(""),y=i?Pt(i,t):null,H=kt(i),L=H&&(i==null?void 0:i.refreshBlockedReason)!=="missing_session_token",A=H,$=H?i==null?void 0:i.maskedKey:void 0,N=i!=null&&i.provider&&i.provider!=="auto"?i.provider:void 0,j=(i==null?void 0:i.tier)==="pro"?"pro":"basic",E=r.useRef(null),S=r.useRef(null),B=r.useRef(null),U=r.useMemo(()=>new URLSearchParams(n).get("section")==="license",[n]),F=r.useMemo(()=>new URLSearchParams(n).get("section")==="dashboard",[n]);return r.useEffect(()=>{var T;if(!U||f)return;const c=E.current;if((T=c==null?void 0:c.scrollIntoView)==null||T.call(c,{block:"start",behavior:"smooth"}),B.current&&!B.current.disabled){B.current.focus();return}c==null||c.focus()},[f,g,p,U]),r.useEffect(()=>{var T;if(!F||f)return;const c=S.current;(T=c==null?void 0:c.scrollIntoView)==null||T.call(c,{block:"start",behavior:"smooth"}),c==null||c.focus()},[f,F]),f?e.jsx("div",{className:a.page,children:e.jsx("div",{className:a.loading,children:t("common.loading")})}):e.jsxs("div",{className:a.page,children:[e.jsx(ve,{title:t("page.settings.title","Settings"),description:t("page.settings.description","Manage license, saved data, server environment, and language."),helpTopicId:"settings",helpState:{tier:j}}),e.jsxs("div",{id:"settings-license",ref:E,tabIndex:-1,"data-testid":"settings-license-card",className:[a.card,U?a.licenseCardTarget:"",(i==null?void 0:i.tier)==="pro"?a.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(R,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(m,{text:g?t("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WEPPY Dashboard."):t("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${a.headerBadge} ${g?"":a.headerBadgeLive}`,children:g?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[i?e.jsxs(e.Fragment,{children:[(()=>{const c=y;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:a.licenseGrid,children:[e.jsx("dt",{children:e.jsx(R,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${a.statusDot} ${_t(i.status)}`}),e.jsx(m,{text:(c==null?void 0:c.tooltip)??t(`settings.license.${i.status}.tooltip`,"Current license activation state."),children:(c==null?void 0:c.label)??t(`settings.license.${i.status}`,i.status)})]}),e.jsx("dt",{children:e.jsx(R,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available WEPPY Dashboard features.")})}),e.jsx("dd",{className:i.tier==="pro"?a.proBadge:"",children:e.jsx(m,{text:t(`tier.${i.tier}.tooltip`,"Available feature set for the connected license."),children:i.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),$&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(R,{label:t("settings.license.key","Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(m,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:$})})]}),N&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(R,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(m,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:N})})]})]}),(c==null?void 0:c.detail)&&e.jsx("p",{className:`${a.licenseNotice} ${c.detailTone}`,children:i.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):c.detail}),i.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${a.licenseNotice} ${a.licenseNoticeMuted}`,children:c==null?void 0:c.detail})]})})(),i.tier==="basic"&&e.jsx(m,{text:t("tier.upgrade.tooltip","View Pro features and purchase options."),children:e.jsx("a",{className:a.upgradeLink,href:je.settingsLicense,target:"_blank",rel:"noopener noreferrer",onClick:()=>d("dashboard_click_event",{click_target:"upgrade_cta",placement:"settings_license",page:"settings"}),children:t("tier.upgrade","View Pro")})})]}):e.jsx("div",{className:a.loading,children:t("settings.license.unavailable")}),e.jsxs("div",{className:a.licenseControls,children:[e.jsxs("div",{className:a.licenseControlRow,children:[e.jsx(m,{text:t("settings.license.refresh.tooltip","Re-fetch the current state from the license server. Useful when a billing change hasn't appeared yet."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:g||p||!L,onClick:()=>{k()},children:p?t("common.loading"):t("settings.license.refresh","Refresh License")})}),e.jsx(m,{text:t("settings.license.reset.tooltip","Remove the currently registered license key. Use this before activating with a different key."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:g||p||!A,onClick:()=>{P()},children:p?t("common.loading"):t("settings.license.reset","Reset License")})})]}),e.jsxs("div",{className:a.licenseControlRow,children:[e.jsxs("label",{className:`${a.licenseField} ${a.licenseFieldGrow}`,children:[e.jsx("span",{className:a.controlLabel,children:e.jsx(R,{label:t("settings.license.keyInput","License Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{ref:B,"aria-label":t("settings.license.keyInput","License Key"),className:a.textInput,type:"text",value:D,disabled:g||p,onChange:c=>w(c.target.value)})]}),e.jsx(m,{text:t("settings.license.activate.tooltip","Activate Pro features with the entered license key."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:g||p,onClick:()=>{(async()=>await v(D)&&w(""))()},children:p?t("common.loading"):t("settings.license.activate","Activate License")})})]}),_&&e.jsx("p",{className:a.licenseMessage,children:_})]})]})]}),e.jsx(St,{tier:j}),b&&e.jsx(Ct,{ref:S,autoOpen:b.dashboard.autoOpen,settingsFilePath:b.dashboard.settingsFilePath,saving:z,targeted:F,updateDashboardPreferences:x}),e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(R,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(m,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from WEPPY Dashboard."),children:e.jsx("span",{className:a.headerBadge,children:t("settings.readOnly","Read-only")})})]}),b?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:a.coldGrid,children:[e.jsx("dt",{children:e.jsx(R,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:b.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(R,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:b.cold.HTTP_HOST})]}),e.jsx("p",{className:a.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:a.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:a.card,children:[e.jsx("div",{className:a.cardHeader,children:e.jsx(R,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the WEPPY Dashboard interface text is localized.")})}),e.jsxs("div",{className:a.langRow,children:[e.jsx("label",{children:e.jsx(R,{label:t("settings.language.dashboard","WEPPY Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the WEPPY Dashboard language or follows the system language when set to Auto.")})}),e.jsx(m,{text:t("settings.language.auto.tooltip","Follow the operating system's language. Falls back to English when not supported."),children:e.jsxs("select",{className:a.select,value:s,onChange:c=>l(c.target.value),children:[e.jsx("option",{value:xe,children:t("settings.language.auto","Auto")}),fe.map(c=>e.jsx("option",{value:c,children:Nt[c]??c},c))]})})]})]})]})}export{zt as Component};
@@ -1 +1 @@
1
- import{u as o,j as s}from"./index-Dj2NvZgn.js";const e="_badge_1ucqq_2",c="_dot_1ucqq_12",a="_online_1ucqq_20",l="_offline_1ucqq_25",_="_idle_1ucqq_30",u="_syncing_1ucqq_34",d="_initializing_1ucqq_35",n={badge:e,dot:c,online:a,offline:l,idle:_,syncing:u,initializing:d},g={online:"status.online",offline:"status.offline",idle:"status.idle",syncing:"status.syncing",initializing:"status.initializing"};function f({status:i}){const{t}=o();return s.jsxs("span",{className:n.badge,children:[s.jsx("span",{className:`${n.dot} ${n[i]}`}),t(g[i])]})}export{f as S};
1
+ import{u as o,j as s}from"./index-89-Xnii6.js";const e="_badge_1ucqq_2",c="_dot_1ucqq_12",a="_online_1ucqq_20",l="_offline_1ucqq_25",_="_idle_1ucqq_30",u="_syncing_1ucqq_34",d="_initializing_1ucqq_35",n={badge:e,dot:c,online:a,offline:l,idle:_,syncing:u,initializing:d},g={online:"status.online",offline:"status.offline",idle:"status.idle",syncing:"status.syncing",initializing:"status.initializing"};function f({status:i}){const{t}=o();return s.jsxs("span",{className:n.badge,children:[s.jsx("span",{className:`${n.dot} ${n[i]}`}),t(g[i])]})}export{f as S};
@@ -0,0 +1 @@
1
+ ._page_1rrgy_2{display:flex;flex-direction:column;gap:var(--space-page);max-width:900px}._card_1rrgy_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:var(--card-padding-block) var(--card-padding-inline)}._cardHeader_1rrgy_17{font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600;color:var(--text-primary);margin-bottom:var(--space-section);display:flex;align-items:center;justify-content:space-between;gap:var(--space-related)}._clearButton_1rrgy_29{border:1px solid var(--danger-border);background:var(--danger-bg);color:var(--danger-text);border-radius:var(--radius-control);padding:6px 12px;font-family:var(--font-label);font-size:12px;font-weight:600;cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._clearButton_1rrgy_29:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._clearButton_1rrgy_29:focus-visible{outline:none;box-shadow:var(--focus-ring)}._statusRow_1rrgy_53{display:flex;align-items:center;gap:12px;margin-bottom:8px}._metaItem_1rrgy_60{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._statusGrid_1rrgy_66{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:12px}._statusGrid_1rrgy_66 dt{color:var(--text-secondary);font-family:var(--font-label)}._statusGrid_1rrgy_66 dd{margin:0;font-family:var(--font-code);color:var(--text-primary)}._migrationPanel_1rrgy_85{display:flex;flex-direction:column;gap:16px;font-size:16px}._migrationHeader_1rrgy_92{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}._migrationTitle_1rrgy_99{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:20px;line-height:1.25;font-weight:600}._migrationDescription_1rrgy_108{max-width:640px;margin:8px 0 0;color:var(--text-secondary);font-size:16px;line-height:1.5}._migrationLedger_1rrgy_116{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--border);background:var(--bg-secondary)}._migrationLedgerItem_1rrgy_123{display:flex;min-width:0;min-height:64px;flex-direction:column;justify-content:center;gap:4px;padding:8px 12px;border-right:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-label);font-size:14px}._migrationLedgerItem_1rrgy_123:last-child{border-right:0}._migrationLedgerItem_1rrgy_123 strong{color:var(--text-primary);font-family:var(--font-code);font-size:20px;font-variant-numeric:tabular-nums}._migrationLedgerBlocked_1rrgy_148 strong{color:var(--warning-text)}._migrationSection_1rrgy_152{display:flex;flex-direction:column;gap:8px}._migrationSection_1rrgy_152 h3{margin:0;color:var(--text-secondary);font-family:var(--font-label);font-size:14px;font-weight:600}._migrationList_1rrgy_166{display:flex;flex-direction:column;gap:0;margin:0;padding:0;border:1px solid var(--border);list-style:none}._migrationRow_1rrgy_176{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:start;gap:12px;padding:12px;border-bottom:1px solid var(--border)}._migrationRow_1rrgy_176:last-child{border-bottom:0}._migrationOperation_1rrgy_189{min-width:76px;text-transform:uppercase}._migrationRowBody_1rrgy_194{display:flex;min-width:0;flex-direction:column;gap:4px}._migrationRowBody_1rrgy_194 code{overflow-wrap:anywhere;color:var(--text-primary);font-family:var(--font-code);font-size:14px;line-height:1.4}._migrationRowBody_1rrgy_194 span{color:var(--text-secondary);font-size:14px;line-height:1.4}._migrationNotice_1rrgy_215{min-height:24px;color:var(--warning-text);font-size:16px;line-height:1.5}._migrationActions_1rrgy_222{display:flex;justify-content:flex-end;gap:8px}._migrationButton_1rrgy_228{min-height:44px;padding:0 16px;font-size:16px}@media(max-width:640px){._migrationHeader_1rrgy_92{flex-direction:column}._migrationLedger_1rrgy_116{grid-template-columns:repeat(2,minmax(0,1fr))}._migrationLedgerItem_1rrgy_123:nth-child(2){border-right:0}._migrationLedgerItem_1rrgy_123:nth-child(-n+2){border-bottom:1px solid var(--border)}._migrationRow_1rrgy_176{grid-template-columns:1fr}._migrationActions_1rrgy_222{flex-direction:column-reverse}._migrationButton_1rrgy_228{width:100%}}._policySummary_1rrgy_265{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--border)}._policySummaryItem_1rrgy_276{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.2fr);align-items:center;min-height:48px;gap:12px;padding:10px 12px;background:var(--bg-secondary)}._policySummaryItem_1rrgy_276 dt{color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._policySummaryItem_1rrgy_276 dd{min-width:0;margin:0;color:var(--text-primary);font-family:var(--font-code);font-size:13px;overflow-wrap:anywhere}._policyPrimaryValue_1rrgy_301{font-family:var(--font-label)!important;font-size:16px!important;font-weight:600}._policyReviewNotice_1rrgy_307{margin-top:12px;padding:10px 12px;border:1px solid var(--warning-border);border-radius:var(--radius-control);background:var(--warning-bg);color:var(--warning-text);font-size:14px;line-height:1.45}._policyApplySection_1rrgy_318{margin-top:12px}._policyApplyHeader_1rrgy_322{margin-bottom:10px}._policyApplyTitle_1rrgy_326{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;font-weight:600}._policyApplyDescription_1rrgy_334{margin:4px 0 0;color:var(--text-secondary);font-family:var(--font-label);font-size:13px;line-height:1.45}._policyInfoLabel_1rrgy_342{border-bottom:1px dotted var(--text-muted);cursor:help}._policyInfoLabel_1rrgy_342:focus-visible{outline:none;border-radius:2px;box-shadow:var(--focus-ring)}._policySafetyRow_1rrgy_353{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:48px;margin-top:8px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-control)}._policySafetyLabel_1rrgy_365{color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._policySafetyBadge_1rrgy_371{min-height:22px}._policyDisclosure_1rrgy_375{display:flex;width:100%;min-height:42px;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600;text-align:left;cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._policyDisclosure_1rrgy_375:hover{border-color:var(--border-highlight);background:var(--bg-secondary);color:var(--accent)}._policyDisclosure_1rrgy_375:focus-visible{outline:none;box-shadow:var(--focus-ring)}._policyDisclosureIcon_1rrgy_407{flex:0 0 auto;color:var(--text-muted);font-family:var(--font-code);transition:transform var(--transition)}._policyDisclosureIconOpen_1rrgy_414{transform:rotate(180deg)}._policyScopeList_1rrgy_418{margin-top:8px;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control)}._policyScopeRow_1rrgy_425{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(0,1.1fr);align-items:center;min-height:44px;gap:16px;padding:8px 12px;border-bottom:1px solid var(--border)}._policyScopeRow_1rrgy_425:last-child{border-bottom:0}._policyScopeName_1rrgy_439{min-width:0;color:var(--text-secondary);font-family:var(--font-label);font-size:13px;overflow-wrap:anywhere}._policyScopeRow_1rrgy_425>[data-tooltip-text]{width:100%}._policyDirectionRail_1rrgy_451{display:grid;width:100%;min-width:0;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);align-items:center;color:var(--text-secondary);font-family:var(--font-code)}._policyDirectionRail_1rrgy_451:focus-visible{outline:none;border-radius:2px;box-shadow:var(--focus-ring)}._policyDirectionEndpoint_1rrgy_467{min-width:0;font-size:11px;font-weight:500;overflow-wrap:anywhere}._policyDirectionEndpointStudio_1rrgy_474{text-align:right}._policyDirectionArrow_1rrgy_478{color:var(--accent);font-size:15px;font-weight:600;text-align:center}@media(max-width:640px){._policySummary_1rrgy_265{grid-template-columns:1fr}._policySummaryItem_1rrgy_276{grid-template-columns:minmax(112px,.8fr) minmax(0,1.2fr)}._policyScopeRow_1rrgy_425{grid-template-columns:1fr;gap:6px}._policySafetyRow_1rrgy_353{grid-template-columns:1fr;align-items:start;gap:8px;padding:10px 12px}._policySafetyRow_1rrgy_353>[data-tooltip-text]{max-width:100%;justify-self:start}._policySafetyBadge_1rrgy_371{height:auto;min-height:22px;white-space:normal;line-height:1.25;text-align:left}}._forwardBadge_1rrgy_521{display:inline-flex;align-items:center;min-height:20px;padding:2px 8px;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-control)}._logContainer_1rrgy_536{max-height:240px;overflow-y:auto;font-family:var(--font-code);font-size:11px}._logEntry_1rrgy_543{display:flex;gap:10px;padding:3px 0;border-bottom:1px solid var(--border);color:var(--text-primary)}._logEntry_1rrgy_543:last-child{border-bottom:none}._logTime_1rrgy_555{color:var(--text-muted);flex-shrink:0;width:44px}._logType_1rrgy_561{font-weight:500;flex-shrink:0;width:90px;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._logTypeWrite_1rrgy_570{color:var(--success)}._logTypeUpdate_1rrgy_574{color:var(--accent)}._logTypeDelete_1rrgy_578{color:var(--error)}._logTypeIdle_1rrgy_582{color:var(--text-muted)}._logPath_1rrgy_586{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logEmpty_1rrgy_593{color:var(--text-muted);font-style:italic;padding:8px 0}._overlay_1rrgy_600{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;gap:16px}._overlayTitle_1rrgy_610{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary)}._overlayMessage_1rrgy_617{font-size:13px;color:var(--text-secondary);max-width:400px}._checklist_1rrgy_623{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;text-align:left}._checkItem_1rrgy_633{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);padding-left:20px;position:relative}._checkItem_1rrgy_633:before{content:"○";position:absolute;left:0;color:var(--text-muted)}._upgradePanel_1rrgy_649{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._upgradePanelHeader_1rrgy_656{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--accent);margin-bottom:8px}._benefitList_1rrgy_664{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}._benefitItem_1rrgy_673{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_1rrgy_673:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_1rrgy_688{display:flex;gap:8px}._btn_1rrgy_693{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_1rrgy_693:hover{border-color:var(--accent);background:var(--accent-dim)}._btnPrimary_1rrgy_710{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_1rrgy_710:hover{opacity:.9}._disabled_1rrgy_721{opacity:.4;pointer-events:none}
@@ -0,0 +1 @@
1
+ import{r as c,b,k as C,D as F,u as O,j as e,a as U,d as V,e as W,i as q,T as G}from"./index-89-Xnii6.js";import{B as R,a as P,P as z}from"./PageHeader-B42Je0MJ.js";import{I}from"./InfoLabel-csGVLmJ3.js";import{T as j}from"./TooltipText-EK4_jbu2.js";import{C as H}from"./ConfirmModal-CQhMb2gs.js";import{C as E}from"./CurrentPlaceScope-B60o8hpn.js";import{S as Y}from"./StatusBadge-Ct9C2L71.js";import{T as K}from"./TierPromoPanel-Ci_piK2n.js";import"./ConfirmModal.module-DJksQHBd.js";const J=5e3;function Q(){const[t,s]=c.useState(null),[l,a]=c.useState([]),[v,g]=c.useState(!0),[y,f]=c.useState(null),[_,w]=c.useState(null),[r,u]=c.useState({report:null,loading:!1,applying:!1,error:null}),D=c.useRef(null),N=c.useRef(null),x=c.useCallback(async()=>{var p;try{const[n,m]=await Promise.all([b.get("/sync/status"),b.get("/api/dashboard/place-summary")]);s(n);const T=(p=m.places)==null?void 0:p.find(M=>M.isActive);return f((T==null?void 0:T.placeDirName)??null),w(m.activePlaceId),m.activePlaceId}catch{return null}},[]),L=c.useCallback(async()=>{try{const p=await b.get("/sync/history",{limit:"30"});a(p.entries??[])}catch{a([])}},[]),o=c.useCallback(async p=>{if(p===null){u({report:null,loading:!1,applying:!1,error:null});return}u(n=>({...n,loading:!0,error:null}));try{const n=await b.get("/api/sync/migration",{placeId:String(p)});u(m=>({...m,report:n,loading:!1,error:n.status==="blocked"?"migration_blocked":null}))}catch(n){if(n instanceof C&&(n.status===404||n.status===503)){u(m=>({...m,report:null,loading:!1,error:null}));return}u(m=>({...m,loading:!1,error:"unknown"}))}},[]),h=c.useCallback(async()=>{const[p]=await Promise.all([x(),L()]);await o(p),g(!1)},[x,L,o]),k=c.useCallback(()=>{h()},[h]),A=c.useCallback(async()=>{await o(_)},[_,o]),d=c.useCallback(async()=>{const p=r.report;if(!(!p||p.status!=="ready"||r.applying)){u(n=>({...n,applying:!0,error:null}));try{const n=await b.post("/api/sync/migration",{placeId:p.placeId,fromVersion:2,previewFingerprint:p.previewFingerprint,apply:!0});u({report:n,loading:!1,applying:!1,error:null}),await x()}catch(n){if(n instanceof C&&n.status===409&&(n.error==="preview_stale"||n.error==="migration_blocked")){const m=n.error;await o(p.placeId),u(T=>({...T,applying:!1,error:m}));return}u(m=>({...m,applying:!1,error:"unknown"}))}}},[o,x,r.applying,r.report]),S=c.useCallback(async()=>{await b.post("/api/dashboard/sync/history/clear"),a([]),x()},[x]);return c.useEffect(()=>(h(),N.current=setInterval(h,J),()=>{N.current&&clearInterval(N.current)}),[h]),c.useEffect(()=>{const p=new F;D.current=p,p.connect();const n=p.on("sync",()=>{h()});return()=>{n(),p.disconnect(),D.current=null}},[h]),{status:t,history:l,loading:v,activePlaceDirName:y,migration:r,refresh:k,refreshMigration:A,applyMigration:d,clearHistory:S}}const X="_page_1rrgy_2",Z="_card_1rrgy_10",ee="_cardHeader_1rrgy_17",te="_clearButton_1rrgy_29",ie="_statusRow_1rrgy_53",oe="_metaItem_1rrgy_60",ae="_statusGrid_1rrgy_66",se="_migrationPanel_1rrgy_85",re="_migrationHeader_1rrgy_92",ne="_migrationTitle_1rrgy_99",ce="_migrationDescription_1rrgy_108",le="_migrationLedger_1rrgy_116",pe="_migrationLedgerItem_1rrgy_123",ye="_migrationLedgerBlocked_1rrgy_148",de="_migrationSection_1rrgy_152",ue="_migrationList_1rrgy_166",ge="_migrationRow_1rrgy_176",me="_migrationOperation_1rrgy_189",he="_migrationRowBody_1rrgy_194",fe="_migrationNotice_1rrgy_215",_e="_migrationActions_1rrgy_222",xe="_migrationButton_1rrgy_228",je="_policySummary_1rrgy_265",ve="_policySummaryItem_1rrgy_276",Se="_policyPrimaryValue_1rrgy_301",we="_policyReviewNotice_1rrgy_307",Ne="_policyApplySection_1rrgy_318",be="_policyApplyHeader_1rrgy_322",Ie="_policyApplyTitle_1rrgy_326",Le="_policyApplyDescription_1rrgy_334",Te="_policyInfoLabel_1rrgy_342",Re="_policySafetyRow_1rrgy_353",De="_policySafetyLabel_1rrgy_365",ke="_policySafetyBadge_1rrgy_371",Ae="_policyDisclosure_1rrgy_375",Ce="_policyDisclosureIcon_1rrgy_407",Pe="_policyDisclosureIconOpen_1rrgy_414",Ee="_policyScopeList_1rrgy_418",Be="_policyScopeRow_1rrgy_425",$e="_policyScopeName_1rrgy_439",Oe="_policyDirectionRail_1rrgy_451",He="_policyDirectionEndpoint_1rrgy_467",Me="_policyDirectionEndpointStudio_1rrgy_474",Fe="_policyDirectionArrow_1rrgy_478",Ue="_forwardBadge_1rrgy_521",Ve="_logContainer_1rrgy_536",We="_logEntry_1rrgy_543",qe="_logTime_1rrgy_555",Ge="_logType_1rrgy_561",ze="_logTypeWrite_1rrgy_570",Ye="_logTypeUpdate_1rrgy_574",Ke="_logTypeDelete_1rrgy_578",Je="_logTypeIdle_1rrgy_582",Qe="_logPath_1rrgy_586",Xe="_logEmpty_1rrgy_593",Ze="_overlay_1rrgy_600",et="_overlayTitle_1rrgy_610",tt="_overlayMessage_1rrgy_617",it="_checklist_1rrgy_623",ot="_checkItem_1rrgy_633",i={page:X,card:Z,cardHeader:ee,clearButton:te,statusRow:ie,metaItem:oe,statusGrid:ae,migrationPanel:se,migrationHeader:re,migrationTitle:ne,migrationDescription:ce,migrationLedger:le,migrationLedgerItem:pe,migrationLedgerBlocked:ye,migrationSection:de,migrationList:ue,migrationRow:ge,migrationOperation:me,migrationRowBody:he,migrationNotice:fe,migrationActions:_e,migrationButton:xe,policySummary:je,policySummaryItem:ve,policyPrimaryValue:Se,policyReviewNotice:we,policyApplySection:Ne,policyApplyHeader:be,policyApplyTitle:Ie,policyApplyDescription:Le,policyInfoLabel:Te,policySafetyRow:Re,policySafetyLabel:De,policySafetyBadge:ke,policyDisclosure:Ae,policyDisclosureIcon:Ce,policyDisclosureIconOpen:Pe,policyScopeList:Ee,policyScopeRow:Be,policyScopeName:$e,policyDirectionRail:Oe,policyDirectionEndpoint:He,policyDirectionEndpointStudio:Me,policyDirectionArrow:Fe,forwardBadge:Ue,logContainer:Ve,logEntry:We,logTime:qe,logType:Ge,logTypeWrite:ze,logTypeUpdate:Ye,logTypeDelete:Ke,logTypeIdle:Je,logPath:Qe,logEmpty:Xe,overlay:Ze,overlayTitle:et,overlayMessage:tt,checklist:it,checkItem:ot};function at(t){return t==="add"?"success":t==="delete"?"danger":"accent"}function st(t){return`sync.migration.reason.${t}`}function rt(t){return`sync.migration.reason.${t}`}function nt({migration:t,onRefresh:s,onApply:l}){const{t:a}=O(),[v,g]=c.useState(!1),y=t==null?void 0:t.report;if(!t||!y||y.status==="not_required")return null;const f=y.status==="blocked",_=y.status==="ready"&&!t.loading&&!t.applying,w=async()=>{await l(),g(!1)};return e.jsxs("section",{className:`${i.card} ${i.migrationPanel}`,"aria-labelledby":"sync-migration-title",children:[e.jsxs("div",{className:i.migrationHeader,children:[e.jsxs("div",{children:[e.jsx("h2",{id:"sync-migration-title",className:i.migrationTitle,children:a("sync.migration.title","Sync format update available")}),e.jsx("p",{className:i.migrationDescription,children:a("sync.migration.description","Review the metadata changes before updating this place from sync format v2 to v3.")})]}),e.jsx(R,{variant:f?"warning":"accent",children:f?a("sync.migration.status.blocked","Blocked"):a("sync.migration.status.ready","Ready to review")})]}),e.jsxs("div",{className:i.migrationLedger,"aria-label":a("sync.migration.preview","Review changes"),children:[e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.add","Add")}),e.jsx("strong",{children:y.summary.add})]}),e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.modify","Modify")}),e.jsx("strong",{children:y.summary.modify})]}),e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.delete","Delete")}),e.jsx("strong",{children:y.summary.delete})]}),e.jsxs("div",{className:`${i.migrationLedgerItem} ${f?i.migrationLedgerBlocked:""}`,children:[e.jsx("span",{children:a("sync.migration.summary.blocked","Blocked")}),e.jsx("strong",{children:y.summary.blocked})]})]}),y.changes.length>0&&e.jsxs("div",{className:i.migrationSection,children:[e.jsx("h3",{children:a("sync.migration.changes","Metadata changes")}),e.jsx("ul",{className:i.migrationList,children:y.changes.map(r=>e.jsxs("li",{className:i.migrationRow,children:[e.jsx(R,{variant:at(r.operation),className:i.migrationOperation,children:a(`sync.migration.operation.${r.operation}`,r.operation)}),e.jsxs("div",{className:i.migrationRowBody,children:[e.jsx("code",{children:r.path}),e.jsx("span",{children:a(st(r.reason),r.reason.replace(/_/g," "))})]})]},`${r.operation}:${r.path}`))})]}),y.blockers.length>0&&e.jsxs("div",{className:i.migrationSection,children:[e.jsx("h3",{children:a("sync.migration.blockers","Items to resolve")}),e.jsx("ul",{className:i.migrationList,children:y.blockers.map((r,u)=>e.jsxs("li",{className:i.migrationRow,children:[e.jsx(R,{variant:"warning",className:i.migrationOperation,children:a("sync.migration.summary.blocked","Blocked")}),e.jsxs("div",{className:i.migrationRowBody,children:[r.path&&e.jsx("code",{children:r.path}),e.jsx("span",{children:a(rt(r.reason),r.reason.replace(/_/g," "))})]})]},`${r.reason}:${r.path??u}`))})]}),e.jsxs("div",{className:i.migrationNotice,"aria-live":"polite",children:[(f||t.error==="migration_blocked")&&e.jsx("span",{children:a("sync.migration.blocked","Resolve sync conflicts before updating")}),t.error==="preview_stale"&&e.jsx("span",{children:a("sync.migration.stale","Preview changed. Review the latest diff.")}),t.error==="unknown"&&e.jsx("span",{children:a("sync.migration.error","Could not update the sync format. Try again.")})]}),e.jsxs("div",{className:i.migrationActions,children:[e.jsx(P,{variant:"secondary",className:i.migrationButton,disabled:t.loading||t.applying,onClick:()=>void s(),children:t.loading?a("sync.migration.refreshing","Refreshing…"):a("sync.migration.refresh","Refresh preview")}),e.jsx(P,{variant:"primary",className:i.migrationButton,disabled:!_,onClick:()=>g(!0),children:t.applying?a("sync.migration.applying","Applying…"):a("sync.migration.apply","Apply update")})]}),e.jsx(H,{open:v,title:a("sync.migration.confirm.title","Apply sync format update?"),message:a("sync.migration.confirm.message","Back up and update the listed sync metadata. Your Luau source files will not change."),cancelLabel:a("common.cancel","Cancel"),confirmLabel:a("sync.migration.apply","Apply update"),loading:t.applying,onCancel:()=>!t.applying&&g(!1),onConfirm:()=>void w()})]})}const ct=["scriptSource","properties","structure","serviceProperties"];function lt(t){const s=new Date(t);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function pt(t){switch(t){case"write":return i.logTypeWrite;case"update":return i.logTypeUpdate;case"delete":return i.logTypeDelete;default:return i.logTypeIdle}}function yt(t){switch(t){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function dt(t,s){const l={studio_first:"Studio First",bidirectional_review:"Bidirectional",local_code_studio_world:"Local Code, Studio World",custom:"Custom"};return t(`sync.policy.preset.${s}`,l[s])}function B(t,s){return s==="auto"?t("sync.policy.apply.auto","Auto apply"):t("sync.policy.apply.manual","Review first")}function ut(t,s){const l={forward:"Studio → Local",reverse:"Local → Studio",bidirectional:"Both ways"};return t(`sync.policy.direction.${s}`,l[s])}function gt(t){return{forward:"←",reverse:"→",bidirectional:"⇄"}[t]}function mt(t,s){const l={forward:"Studio changes are written to local files.",reverse:"Local file changes are applied to Studio.",bidirectional:"Changes can move from Studio to local files and from local files to Studio."};return t(`sync.policy.direction.${s}.tooltip`,l[s])}function $(...t){const s=t[0]??"",l=s.includes("\\")&&!s.includes("/")?"\\":"/";return t.filter(a=>a.length>0).map((a,v)=>v===0?a.replace(/[\\/]+$/g,""):a.replace(/^[\\/]+|[\\/]+$/g,"")).join(l)}function ht(t){const s=t.replace(/[\\/]+$/g,""),l=s.split(/[\\/]+/);return l[l.length-1]??s}function ft(t,s){const l=ht(t);return l==="explorer"?t:l===s?$(t,"explorer"):$(t,s,"explorer")}function _t(t,s){return s?t("sync.policy.safety.auto","Auto delete to Studio"):t("sync.policy.safety.review","Review before delete")}function xt(t,s){return s?t("sync.policy.safety.auto.tooltip","Deleting local files may automatically remove matching Studio instances. This is separate from UI Studio automatic cleanup."):t("sync.policy.safety.review.tooltip","Local file deletions wait for review before matching Studio instances are removed. This is separate from UI Studio automatic cleanup.")}function jt(t,s){switch(s){case"write":return t("sync.log.type.write","WRITE");case"update":return t("sync.log.type.update","UPDATE");case"delete":return t("sync.log.type.delete","DELETE");default:return t("sync.log.type.idle","IDLE")}}function vt(t,s){switch(s){case"write":return t("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return t("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return t("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return t("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function kt(){const{t}=O(),{trackEvent:s}=U(),{level:l}=V(),{tier:a,loading:v}=W(),g=Q(),{show:y}=q(),[f,_]=c.useState(!1),[w,r]=c.useState(!1),[u,D]=c.useState(!1),N=!v&&a==="basic",x=l==="disconnected"||l==="serverOnly",L=e.jsx(z,{title:t("page.sync.title","Sync"),description:t("page.sync.description","Monitor Studio to local sync status, direction, apply mode, and recent sync logs."),helpTopicId:"sync",helpState:{connectionLevel:l,tier:a}});if(x)return e.jsxs("div",{className:i.page,children:[L,e.jsx(E,{surface:"sync"}),e.jsx("div",{className:i.card,children:e.jsxs("div",{className:i.overlay,children:[e.jsx("div",{className:i.overlayTitle,children:t("sync.overlay.title","Roblox Studio plugin required")}),e.jsx("div",{className:i.overlayMessage,children:t("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),e.jsxs("ul",{className:i.checklist,children:[e.jsx("li",{className:i.checkItem,children:t("sync.overlay.check1","Is Roblox Studio running?")}),e.jsx("li",{className:i.checkItem,children:t("sync.overlay.check2","Is the WEPPY Plugin installed?")})]})]})})]});const o=g.status,h=g.history,k=yt(o==null?void 0:o.state),A=async()=>{r(!0);try{await g.clearHistory(),y(t("toast.clearSuccess","Cleared successfully"),"success"),_(!1)}catch{y(t("toast.clearFailed","Failed to clear data"),"error")}finally{r(!1)}};return e.jsxs("div",{className:i.page,children:[L,e.jsx(E,{surface:"sync"}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(j,{text:t("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:t("sync.status.title","Sync Status")}),N&&e.jsx(j,{text:t("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:e.jsx("span",{className:i.forwardBadge,children:t("sync.status.forwardOnly","Forward Only")})})]}),e.jsxs("div",{className:i.statusRow,children:[e.jsx(Y,{status:k}),(o==null?void 0:o.placeName)&&e.jsxs("span",{className:i.metaItem,children:[e.jsx(I,{label:t("sync.status.place","Place"),tooltip:t("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",o.placeName,o.placeId?` (${o.placeId})`:""]})]}),e.jsxs("dl",{className:i.statusGrid,children:[(o==null?void 0:o.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.path","Place Root"),tooltip:t("sync.status.path.tooltip","Local filesystem root currently used for this place sync output.")})}),e.jsx("dd",{children:o.syncRoot})]}),g.activePlaceDirName&&(o==null?void 0:o.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.placePath","Explorer Path"),tooltip:t("sync.status.placePath.tooltip","Explorer files path for the active place.")})}),e.jsx("dd",{children:ft(o.syncRoot,g.activePlaceDirName)})]}),(o==null?void 0:o.instanceCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.instances","Instances"),tooltip:t("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),e.jsx("dd",{children:o.instanceCount})]}),(o==null?void 0:o.scriptCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.scripts","Scripts"),tooltip:t("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),e.jsx("dd",{children:o.scriptCount})]}),(o==null?void 0:o.state)==="syncing"&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.state","State"),tooltip:t("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),e.jsx("dd",{children:t("status.syncing","Syncing")})]})]})]}),e.jsx(nt,{migration:g.migration,onRefresh:g.refreshMigration,onApply:g.applyMigration}),(o==null?void 0:o.policy)&&e.jsxs("div",{className:i.card,children:[e.jsx("div",{className:i.cardHeader,children:e.jsx(j,{text:t("sync.policy.title.tooltip","Effective Sync policy reported by the connected Studio plugin."),children:t("sync.policy.title","Sync Policy")})}),e.jsxs("dl",{className:i.policySummary,children:[e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:t("sync.policy.activation","Activation")}),e.jsx("dd",{children:e.jsx(R,{variant:o.syncEnabled?"success":"neutral",children:o.syncEnabled?t("sync.policy.activation.on","Sync ON"):t("sync.policy.activation.off","Sync OFF")})})]}),e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:t("sync.policy.preset","Workflow")}),e.jsx("dd",{className:i.policyPrimaryValue,children:dt(t,o.policy.preset)})]})]}),o.policyReviewRequired&&e.jsx("div",{className:i.policyReviewNotice,role:"status",children:t("sync.policy.reviewRequired","Review this policy in the Studio plugin before starting Sync.")}),e.jsxs("section",{className:i.policyApplySection,"aria-labelledby":"sync-policy-apply-title",children:[e.jsxs("div",{className:i.policyApplyHeader,children:[e.jsx("h3",{id:"sync-policy-apply-title",className:i.policyApplyTitle,children:t("sync.policy.apply.title","How local changes apply to Studio")}),e.jsx("p",{className:i.policyApplyDescription,children:t("sync.policy.apply.description","Shows whether changes made locally are reviewed first or applied to Studio automatically.")})]}),e.jsxs("dl",{className:i.policySummary,children:[e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:e.jsx(j,{text:t("sync.policy.apply.content.tooltip","Script Source, property, and Service property changes made locally. Instance creation, deletion, renaming, and moves are Structure changes."),children:e.jsx("span",{className:i.policyInfoLabel,tabIndex:0,children:t("sync.policy.apply.content","Content changes")})})}),e.jsx("dd",{children:B(t,o.policy.apply.contentChanges)})]}),e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:e.jsx(j,{text:t("sync.policy.apply.structure.tooltip","Instance creation, deletion, renaming, and moves made locally. Automatic local deletion additionally requires the separate delete option below."),children:e.jsx("span",{className:i.policyInfoLabel,tabIndex:0,children:t("sync.policy.apply.structure","Structure changes")})})}),e.jsx("dd",{children:B(t,o.policy.apply.structureChanges)})]})]}),e.jsxs("div",{className:i.policySafetyRow,children:[e.jsx("span",{className:i.policySafetyLabel,children:t("sync.policy.safety.localDeletes","Local delete → Studio instance removal")}),e.jsx(j,{text:xt(t,o.policy.autoApplyLocalDeletesToStudio),children:e.jsx(R,{variant:o.policy.autoApplyLocalDeletesToStudio?"warning":"neutral",className:i.policySafetyBadge,tabIndex:0,children:_t(t,o.policy.autoApplyLocalDeletesToStudio)})})]})]}),e.jsxs("button",{type:"button",className:i.policyDisclosure,"aria-expanded":u,"aria-controls":"sync-policy-scope-panel",onClick:()=>D(d=>!d),children:[e.jsx("span",{children:t("sync.policy.scope.disclosure","Scope directions")}),e.jsx("span",{"aria-hidden":"true",className:`${i.policyDisclosureIcon} ${u?i.policyDisclosureIconOpen:""}`,children:"⌄"})]}),u&&e.jsx("div",{id:"sync-policy-scope-panel",className:i.policyScopeList,children:ct.map(d=>{const S=o.policy.directions[d];return e.jsxs("div",{className:i.policyScopeRow,"data-testid":"sync-policy-scope-row",children:[e.jsx("span",{className:i.policyScopeName,children:t(`sync.policy.scope.${d}`,d)}),e.jsx(j,{text:mt(t,S),children:e.jsxs("span",{className:i.policyDirectionRail,"data-testid":"sync-policy-direction-rail",role:"img","aria-label":ut(t,S),tabIndex:0,children:[e.jsx("span",{className:i.policyDirectionEndpoint,children:t("sync.policy.endpoint.local","Local")}),e.jsx("span",{className:i.policyDirectionArrow,"aria-hidden":"true",children:gt(S)}),e.jsx("span",{className:`${i.policyDirectionEndpoint} ${i.policyDirectionEndpointStudio}`,children:t("sync.policy.endpoint.studio","Studio")})]})})]},d)})})]}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx("span",{children:t("sync.log.title","Sync Log")}),e.jsx("button",{className:i.clearButton,onClick:()=>{s("dashboard_click_event",{click_target:"sync_clear_log",page:"sync"}),_(!0)},children:t("common.clear","Clear")})]}),e.jsx("div",{className:i.logContainer,children:h.length===0?e.jsx("div",{className:i.logEmpty,children:t("sync.log.empty","No sync events yet")}):h.map((d,S)=>e.jsxs("div",{className:i.logEntry,children:[e.jsx("span",{className:i.logTime,children:lt(d.timestamp)}),e.jsx(j,{text:vt(t,d.type),children:e.jsx("span",{className:`${i.logType} ${pt(d.type)}`,children:jt(t,d.type)})}),e.jsxs("span",{className:i.logPath,children:[d.path,d.details?` — ${d.details}`:""]})]},S))})]}),N&&e.jsx(K,{title:t("sync.upgrade.title","Explore Full Sync with Pro"),description:t("tier.banner.save","Save AI tokens with Pro!"),benefits:[t("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),t("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),t("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:t("sync.upgrade.buy","View Pro"),upgradeHref:G.sync}),e.jsx(H,{open:f,title:t("sync.clear.title","Clear sync log?"),message:t("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:w,onCancel:()=>!w&&_(!1),onConfirm:A})]})}export{kt as Component};
@@ -0,0 +1 @@
1
+ ._backdrop_1sgib_1{position:fixed;top:calc(var(--header-height) + 16px);right:24px;bottom:24px;left:calc(var(--sidebar-width) + 24px);z-index:900;display:flex;align-items:stretch;justify-content:center;min-width:0;padding:clamp(12px,2vw,24px);overflow:hidden;box-sizing:border-box;background:#03071294;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}._dialog_1sgib_19{display:flex;flex:1;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);box-shadow:0 24px 60px #0000006b}._dialog_1sgib_19>*{min-width:0;min-height:0;max-height:100%}@media(max-width:1120px){._backdrop_1sgib_1{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}}@media(max-width:768px){._backdrop_1sgib_1{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}}._tabBar_jefog_2{display:flex;align-items:stretch;gap:2px;border-bottom:1px solid var(--border)}._tabs_jefog_9{display:flex;gap:2px}._actions_jefog_14{margin-left:auto;display:flex;align-items:center;gap:8px;padding-bottom:4px}._tab_jefog_2{font-family:var(--font-label);font-size:12px;font-weight:500;min-height:34px;padding:0 14px;background:transparent;border:1px solid transparent;border-bottom:2px solid transparent;border-radius:var(--radius-control) var(--radius-control) 0 0;color:var(--text-secondary);cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._tab_jefog_2:hover{background:var(--bg-secondary);border-color:var(--border);border-bottom-color:transparent;color:var(--text-primary)}._tab_jefog_2:focus-visible{outline:none;box-shadow:var(--focus-ring)}._tabActive_jefog_52{background:var(--accent-dim);color:var(--accent);border-bottom-color:var(--accent)}
@@ -0,0 +1 @@
1
+ import{r,p as k,j as d}from"./index-89-Xnii6.js";const w="_backdrop_1sgib_1",T="_dialog_1sgib_19",j={backdrop:w,dialog:T},B=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contenteditable="true"]','[tabindex]:not([tabindex="-1"])'].join(", ");function L(a){return Array.from(a.querySelectorAll(B))}function R(a){const s=document.activeElement;if(!(s instanceof HTMLElement))return!1;const c=s.closest('[role="dialog"][aria-modal="true"]');return c!==null&&c!==a}function M({open:a,ariaLabel:s,onClose:c,returnFocusTo:f=null,initialFocusRef:l,dismissDisabled:i=!1,children:m,testId:v}){const e=r.useRef(null),t=r.useRef(c),u=r.useRef(i),E=r.useRef(null);return t.current=c,u.current=i,r.useEffect(()=>{if(!a)return;const o=e.current;if(!o)return;const x=document.body.style.overflow;E.current=f??(document.activeElement instanceof HTMLElement?document.activeElement:null),document.body.style.overflow="hidden",((l==null?void 0:l.current)??o).focus();const _=n=>{if(R(o))return;if(n.key==="Escape"){n.preventDefault(),u.current||t.current();return}if(n.key!=="Tab")return;const g=L(o);if(g.length===0){n.preventDefault(),o.focus();return}const p=g[0],h=g[g.length-1],y=document.activeElement;n.shiftKey&&(y===p||!o.contains(y))?(n.preventDefault(),h.focus()):!n.shiftKey&&(y===h||!o.contains(y))&&(n.preventDefault(),p.focus())};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_),document.body.style.overflow=x;const n=f??E.current;n&&document.contains(n)&&n.focus()}},[l,a,f]),a?k.createPortal(d.jsx("div",{className:j.backdrop,"data-testid":v,role:"presentation",onClick:o=>{o.target===o.currentTarget&&!i&&t.current()},children:d.jsx("section",{ref:e,className:j.dialog,role:"dialog","aria-modal":"true","aria-label":s,tabIndex:-1,children:m})}),document.body):null}const A="_tabBar_jefog_2",D="_tabs_jefog_9",N="_actions_jefog_14",C="_tab_jefog_2",S="_tabActive_jefog_52",b={tabBar:A,tabs:D,actions:N,tab:C,tabActive:S};function O({items:a,value:s,onChange:c,ariaLabel:f,className:l,rightActions:i}){const m=r.useRef(null),v=r.useRef(null);return r.useEffect(()=>{const e=()=>{const t=m.current,u=v.current;!t||!u||typeof t.scrollTo!="function"||t.scrollTo({left:Math.max(0,u.offsetLeft+u.offsetWidth/2-t.clientWidth/2),behavior:"auto"})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[s]),d.jsxs("div",{ref:m,className:[b.tabBar,l].filter(Boolean).join(" "),role:"tablist","aria-label":f,children:[d.jsx("div",{className:b.tabs,children:a.map(e=>{const t=e.key===s;return d.jsx("button",{ref:t?v:void 0,type:"button",role:"tab","aria-selected":t,"data-testid":e.testId,className:[b.tab,t?b.tabActive:""].filter(Boolean).join(" "),onClick:()=>c(e.key),children:e.label},e.key)})}),i?d.jsx("div",{className:b.actions,children:i}):null]})}export{M as C,O as T};
@@ -0,0 +1 @@
1
+ ._progressPromoWrap_z7b39_1{display:flex;flex-direction:column;gap:8px}._progressPromo_z7b39_1{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 20px;display:flex;align-items:center;gap:16px}._progressMain_z7b39_17{flex:1;min-width:0}._progressLabel_z7b39_22{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);margin-bottom:6px;display:flex;justify-content:space-between;gap:12px}._progressBar_z7b39_32{height:6px;background:var(--bg-secondary);border-radius:3px;overflow:hidden}._progressFill_z7b39_39{height:100%;background:var(--pro-badge);border-radius:3px;transition:width var(--transition)}._progressTextGroup_z7b39_46{display:flex;flex-direction:column;gap:3px}._progressText_z7b39_46{font-family:var(--font-label);font-size:13px;color:var(--pro-badge);white-space:nowrap;font-weight:500}._actions_z7b39_60{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._btn_z7b39_68{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._btn_z7b39_68:hover{border-color:var(--accent);background:var(--accent-dim)}._btnOutline_z7b39_89{border-color:var(--pro-badge);color:var(--pro-badge)}._btnOutline_z7b39_89:hover{background:var(--pro-bg-soft);border-color:var(--pro-badge)}._btnPrimary_z7b39_99{background:var(--pro-badge);color:var(--pro-text-on-badge);border-color:var(--pro-badge)}._btnPrimary_z7b39_99:hover{opacity:.9}._panel_z7b39_109{background:linear-gradient(180deg,var(--pro-bg-soft),transparent 60%),var(--bg-secondary);border:1px solid var(--pro-border);border-radius:var(--radius);padding:24px 20px}._panelIcon_z7b39_116{font-size:32px;margin-bottom:12px;text-align:center}._panelTitle_z7b39_122{font-family:var(--font-label);font-size:var(--type-section-title-size);font-weight:600;line-height:var(--leading-title);color:var(--pro-text);margin-bottom:8px;text-align:center}._panelDesc_z7b39_132{font-size:var(--type-body-size);color:var(--text-secondary);margin-bottom:16px;line-height:var(--leading-body);text-align:center}._benefitList_z7b39_140{list-style:none;padding:0;margin:0 0 16px;display:flex;flex-direction:column;gap:4px}._benefitItem_z7b39_149{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_z7b39_149:before{content:"+";position:absolute;left:0;color:var(--pro-badge);font-weight:600}@media(max-width:720px){._progressPromo_z7b39_1{flex-direction:column;align-items:stretch}._progressText_z7b39_46{white-space:normal}._actions_z7b39_60{justify-content:stretch}._btn_z7b39_68{width:100%}}
@@ -0,0 +1 @@
1
+ import{a as m,c as d,q as h,j as n}from"./index-89-Xnii6.js";const x="_actions_z7b39_60",f="_btn_z7b39_68",j="_btnPrimary_z7b39_99",z="_panel_z7b39_109",I="_panelIcon_z7b39_116",N="_panelTitle_z7b39_122",u="_panelDesc_z7b39_132",v="_benefitList_z7b39_140",y="_benefitItem_z7b39_149",e={actions:x,btn:f,btnPrimary:j,panel:z,panelIcon:I,panelTitle:N,panelDesc:u,benefitList:v,benefitItem:y};function g({icon:a,title:s,description:c,benefits:l,upgradeLabel:i,upgradeHref:r}){const{trackEvent:o}=m(),{pathname:_,search:b}=d(),p=h(_,b);return n.jsxs("div",{className:e.panel,children:[a&&n.jsx("div",{className:e.panelIcon,children:a}),n.jsx("div",{className:e.panelTitle,children:s}),n.jsx("div",{className:e.panelDesc,children:c}),n.jsx("ul",{className:e.benefitList,children:l.map(t=>n.jsx("li",{className:e.benefitItem,children:t},t))}),n.jsx("div",{className:e.actions,children:n.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:r,target:"_blank",rel:"noreferrer",onClick:()=>o("dashboard_click_event",{click_target:"upgrade_cta",placement:"tier_panel",...p}),children:i})})]})}export{g as T};
@@ -0,0 +1 @@
1
+ ._wrapper_1s3lp_2{overflow-x:auto}._table_1s3lp_7{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_1s3lp_7 th{text-align:left;color:var(--text-muted);font-weight:500;padding:6px 8px;border-bottom:1px solid var(--border);background:var(--bg-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none}._table_1s3lp_7 td{padding:6px 8px;color:var(--text-primary);border-bottom:1px solid var(--border-dim, rgba(255, 255, 255, .04))}._sortable_1s3lp_32{cursor:pointer;transition:color var(--transition)}._sortable_1s3lp_32:hover{color:var(--accent)}._sortArrow_1s3lp_41{margin-left:4px;font-size:10px}._table_1s3lp_7 tbody tr:hover td{background:var(--accent-dim)}._clickable_1s3lp_52{cursor:pointer}._empty_1s3lp_57{text-align:center;color:var(--text-muted);font-style:italic;padding:24px 8px}._page_1rtjt_2{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--content-gap);max-width:var(--content-max)}._card_1rtjt_14{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:var(--card-padding-block) var(--card-padding-inline)}._cardToolbar_1rtjt_21{display:flex;align-items:center;justify-content:space-between;gap:var(--space-section);margin-bottom:var(--space-section)}._sectionTitle_1rtjt_29{font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600;color:var(--text-primary)}._dangerButton_1rtjt_36{border:1px solid var(--danger-border);background:var(--danger-bg);color:var(--danger-text);border-radius:var(--radius-control);padding:6px 12px;font-family:var(--font-label);font-size:12px;font-weight:500;cursor:pointer;transition:background var(--transition),border-color var(--transition)}._dangerButton_1rtjt_36:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._proBadge_1rtjt_55{display:inline-block;margin-left:6px;padding:1px 5px;font-size:9px;font-weight:600;letter-spacing:.05em;color:var(--pro-text-on-badge);background:var(--pro-badge);border-radius:3px;vertical-align:middle}._statusOk_1rtjt_70{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border:1px solid var(--success-border);border-radius:var(--radius-control);background:var(--success-bg);color:var(--success-text);font-weight:500;cursor:default}._statusFallback_1rtjt_83{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border:1px solid var(--info-border);border-radius:var(--radius-control);background:var(--info-bg);color:var(--info-text);font-weight:600;cursor:default}._statusUnsupported_1rtjt_96,._statusWarning_1rtjt_109{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border:1px solid var(--warning-border);border-radius:var(--radius-control);background:var(--warning-bg);color:var(--warning-text);font-weight:600;cursor:default}._statusError_1rtjt_122{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border:1px solid var(--error-border);border-radius:var(--radius-control);background:var(--error-bg);color:var(--error-text);font-weight:600;cursor:default}._tierBasic_1rtjt_136{color:var(--text-secondary)}._tierPro_1rtjt_140{color:var(--pro-badge);font-weight:500}._tierMixed_1rtjt_145{color:var(--text-primary);font-weight:500}._errorText_1rtjt_151{color:var(--error)}._filterRow_1rtjt_156{display:flex;align-items:center;gap:12px;margin-bottom:12px}._filterLabel_1rtjt_163{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);display:flex;align-items:center;gap:6px}._filterSelect_1rtjt_172{font-family:var(--font-code);font-size:12px;padding:3px 8px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-primary)}._filterSelect_1rtjt_172:focus-visible{outline:none;box-shadow:var(--focus-ring)}._detailsButton_1rtjt_187{min-height:28px;padding:3px 8px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:11px;cursor:pointer}._detailsButton_1rtjt_187:hover{border-color:var(--accent);background:var(--accent-dim)}._detailsButton_1rtjt_187:focus-visible{outline:none;box-shadow:var(--focus-ring)}._detailShell_1rtjt_210{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column}._detailHeader_1rtjt_218{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:16px;min-width:0;padding:16px 20px;border-bottom:1px solid var(--border)}._detailHeading_1rtjt_229{display:flex;min-width:0;flex-direction:column;gap:4px}._detailTitle_1rtjt_236{color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600}._detailRecordName_1rtjt_243{overflow:hidden;color:var(--text-secondary);font-family:var(--font-code);font-size:11px;text-overflow:ellipsis;white-space:nowrap}._detailHeaderActions_1rtjt_252{display:flex;flex:0 0 auto;align-items:center;gap:10px}._detailCloseButton_1rtjt_259{display:inline-grid;width:34px;height:34px;place-items:center;padding:0;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer}._detailCloseButton_1rtjt_259:hover{border-color:var(--accent);color:var(--text-primary)}._detailCloseButton_1rtjt_259:focus-visible{outline:none;box-shadow:var(--focus-ring)}._detailBody_1rtjt_282{display:flex;flex:1;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;flex-direction:column;gap:12px;padding:20px}._detailSection_1rtjt_294{min-width:0;padding:14px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);color:var(--text-secondary);font-size:12px}._detailSection_1rtjt_294>strong{display:block;margin-bottom:8px;color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._detailList_1rtjt_313{display:flex;flex-direction:column;gap:6px}._detailItem_1rtjt_319{display:flex;flex-wrap:wrap;gap:6px;min-width:0}._detailLabel_1rtjt_326{font-family:var(--font-label);color:var(--text-muted)}._detailValue_1rtjt_331{min-width:0;color:var(--text-primary);overflow-wrap:anywhere}._pre_1rtjt_337{max-width:100%;font-family:var(--font-code);font-size:11px;color:var(--text-primary);background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-control);padding:8px;margin-top:4px;overflow-x:auto;max-height:200px;overflow-y:auto;white-space:pre-wrap;word-break:break-all}._pagination_1rtjt_355{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px}._pageInfo_1rtjt_363{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._btn_1rtjt_369{font-family:var(--font-label);font-size:12px;padding:4px 12px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_1rtjt_369:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._btn_1rtjt_369:disabled{opacity:.4;cursor:default}._btn_1rtjt_369:focus-visible{outline:none;box-shadow:var(--focus-ring)}._tierDistribution_1rtjt_397{margin-bottom:16px}._tierBarWrap_1rtjt_401{display:flex;height:12px;border-radius:6px;overflow:hidden;background:var(--bg-secondary)}._tierBarBasic_1rtjt_409{background:var(--text-secondary);transition:width .3s ease}._tierBarPro_1rtjt_414{background:var(--accent);transition:width .3s ease}._tierLabels_1rtjt_419{display:flex;justify-content:space-between;margin-top:4px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary)}._statsTableWrap_1rtjt_428{border:1px solid var(--border);border-radius:var(--radius);overflow-x:auto;overflow-y:hidden}._statsTable_1rtjt_428{width:100%;border-collapse:collapse}._statsTable_1rtjt_428 th,._statsTable_1rtjt_428 td{padding:10px 12px;font-size:12px;text-align:left;border-bottom:1px solid var(--border)}._statsTable_1rtjt_428 th{font-family:var(--font-label);font-size:11px;font-weight:500;color:var(--text-secondary);background:var(--bg-secondary)}._statsTable_1rtjt_428 tbody tr:last-child td{border-bottom:none}._sortableHeader_1rtjt_460{cursor:pointer;-webkit-user-select:none;user-select:none}._sortArrow_1rtjt_465{margin-left:4px}._statsToolRow_1rtjt_469{cursor:pointer}._statsToolRow_1rtjt_469:hover td{background:var(--bg-secondary)}._statsActionRow_1rtjt_477 td{background:color-mix(in srgb,var(--bg-secondary) 72%,transparent)}._expandButton_1rtjt_481{display:inline-flex;align-items:center;gap:8px;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}._expandIcon_1rtjt_493{width:10px;color:var(--text-secondary)}._actionLabel_1rtjt_498{display:inline-block;padding-left:18px;font-family:var(--font-code);color:var(--text-secondary)}._emptyStats_1rtjt_505{text-align:center;color:var(--text-muted)}._summaryLine_1rtjt_511{margin-top:12px;font-family:var(--font-code);font-size:12px;color:var(--text-muted);text-align:right}@media(max-width:720px){._card_1rtjt_14,._detailHeader_1rtjt_218{padding:14px 16px}._detailBody_1rtjt_282{padding:16px}}
@@ -0,0 +1 @@
1
+ import{j as e,r as i,b as I,D as ht,u as at,X as mt,a as bt,i as xt}from"./index-89-Xnii6.js";import{P as ft}from"./PageHeader-B42Je0MJ.js";import{T as M}from"./TooltipText-EK4_jbu2.js";import{C as _t}from"./ConfirmModal-CQhMb2gs.js";import{T as gt,C as jt}from"./Tabs-Dos9flTe.js";import{C as yt}from"./CurrentPlaceScope-B60o8hpn.js";import"./ConfirmModal.module-DJksQHBd.js";const Ct="_wrapper_1s3lp_2",Tt="_table_1s3lp_7",kt="_sortable_1s3lp_32",Nt="_sortArrow_1s3lp_41",St="_clickable_1s3lp_52",wt="_empty_1s3lp_57",A={wrapper:Ct,table:Tt,sortable:kt,sortArrow:Nt,clickable:St,empty:wt};function vt({columns:t,data:o,sortBy:c,sortDir:T="asc",onSort:b,onRowClick:l,rowKey:N,emptyMessage:S}){return e.jsx("div",{className:A.wrapper,children:e.jsxs("table",{className:A.table,children:[e.jsx("thead",{children:e.jsx("tr",{children:t.map(h=>e.jsxs("th",{style:h.width?{width:h.width}:void 0,className:h.sortable?A.sortable:void 0,onClick:h.sortable&&b?()=>b(h.key):void 0,children:[e.jsx("span",{children:h.label}),h.sortable&&c===h.key&&e.jsx("span",{className:A.sortArrow,children:T==="asc"?"▴":"▾"})]},h.key))})}),e.jsx("tbody",{children:o.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:A.empty,children:S||"No data"})}):o.map((h,w)=>{const C=N?N(h):String(w);return e.jsx("tr",{className:l?A.clickable:void 0,tabIndex:l?-1:void 0,onClick:l?_=>l(h,_.currentTarget):void 0,children:t.map(_=>e.jsx("td",{children:_.render?_.render(h):String(h[_.key]??"")},_.key))},C)})})]})})}function Mt(t){return{...t,sequenceNumber:typeof t.sequenceNumber=="number"?t.sequenceNumber:void 0,executionTimeMs:typeof t.executionTimeMs=="number"?t.executionTimeMs:void 0}}const Bt=50;function Pt(t){if(typeof t=="number")return{placeId:String(t)}}function Y(t,o){return typeof o!="number"?t:`${t}?placeId=${encodeURIComponent(String(o))}`}function Lt(t){const o=(t==null?void 0:t.placeId)??null,[c,T]=i.useState(null),[b,l]=i.useState(!0),[N,S]=i.useState([]),[h,w]=i.useState(0),[C,_]=i.useState(!1),[U,O]=i.useState(!0),[m,E]=i.useState(0),[g,F]=i.useState(""),B=i.useRef(null),k=i.useCallback(async()=>{l(!0);try{const j=Pt(o),u=j?await I.get("/api/dashboard/tool-stats",j):await I.get("/api/dashboard/tool-stats");T(u)}catch{}finally{l(!1)}},[o]),x=i.useCallback(async(j,u)=>{O(!0);try{const P={limit:String(Bt),offset:String(j)};u&&(P.tool=u),typeof o=="number"&&(P.placeId=String(o));const H=await I.get("/api/dashboard/history",P);S(H.entries.map(Mt)),w(H.total),_(H.hasMore)}catch{S([]),w(0),_(!1)}finally{O(!1)}},[o]),D=i.useCallback(()=>{k(),x(m,g)},[x,k,m,g]),V=i.useCallback(async()=>{await I.post(Y("/api/dashboard/tools/history/clear",o)),x(m,g)},[x,m,g,o]),K=i.useCallback(async()=>{await I.post(Y("/api/dashboard/tools/statistics/clear",o)),k()},[k,o]);return i.useEffect(()=>{k()},[k]),i.useEffect(()=>{x(m,g)},[x,m,g]),i.useEffect(()=>{const j=new ht;B.current=j,j.connect();const u=j.on("command",()=>{k(),x(m,g)});return()=>{u(),j.disconnect(),B.current=null}},[x,k,m,g]),{statistics:c,statsLoading:b,history:N,historyTotal:h,historyHasMore:C,historyLoading:U,historyOffset:m,historyToolFilter:g,setHistoryOffset:E,setHistoryToolFilter:F,refresh:D,clearHistory:V,clearStatistics:K}}const Et="_page_1rtjt_2",Ht="_card_1rtjt_14",At="_cardToolbar_1rtjt_21",Rt="_sectionTitle_1rtjt_29",It="_dangerButton_1rtjt_36",Ot="_proBadge_1rtjt_55",Ft="_statusOk_1rtjt_70",Dt="_statusFallback_1rtjt_83",$t="_statusUnsupported_1rtjt_96",qt="_statusWarning_1rtjt_109",Wt="_statusError_1rtjt_122",Ut="_tierBasic_1rtjt_136",Vt="_tierPro_1rtjt_140",Kt="_tierMixed_1rtjt_145",Gt="_filterRow_1rtjt_156",zt="_filterLabel_1rtjt_163",Jt="_filterSelect_1rtjt_172",Qt="_detailsButton_1rtjt_187",Zt="_detailShell_1rtjt_210",Xt="_detailHeader_1rtjt_218",Yt="_detailHeading_1rtjt_229",te="_detailTitle_1rtjt_236",ee="_detailRecordName_1rtjt_243",se="_detailHeaderActions_1rtjt_252",ae="_detailCloseButton_1rtjt_259",oe="_detailBody_1rtjt_282",le="_detailSection_1rtjt_294",re="_detailList_1rtjt_313",ie="_detailItem_1rtjt_319",ne="_detailLabel_1rtjt_326",ce="_detailValue_1rtjt_331",de="_pre_1rtjt_337",ue="_pagination_1rtjt_355",pe="_pageInfo_1rtjt_363",he="_btn_1rtjt_369",me="_tierDistribution_1rtjt_397",be="_tierBarWrap_1rtjt_401",xe="_tierBarBasic_1rtjt_409",fe="_tierBarPro_1rtjt_414",_e="_tierLabels_1rtjt_419",ge="_statsTableWrap_1rtjt_428",je="_statsTable_1rtjt_428",ye="_sortableHeader_1rtjt_460",Ce="_sortArrow_1rtjt_465",Te="_statsToolRow_1rtjt_469",ke="_statsActionRow_1rtjt_477",Ne="_expandButton_1rtjt_481",Se="_expandIcon_1rtjt_493",we="_actionLabel_1rtjt_498",ve="_emptyStats_1rtjt_505",Me="_summaryLine_1rtjt_511",a={page:Et,card:Ht,cardToolbar:At,sectionTitle:Rt,dangerButton:It,proBadge:Ot,statusOk:Ft,statusFallback:Dt,statusUnsupported:$t,statusWarning:qt,statusError:Wt,tierBasic:Ut,tierPro:Vt,tierMixed:Kt,filterRow:Gt,filterLabel:zt,filterSelect:Jt,detailsButton:Qt,detailShell:Zt,detailHeader:Xt,detailHeading:Yt,detailTitle:te,detailRecordName:ee,detailHeaderActions:se,detailCloseButton:ae,detailBody:oe,detailSection:le,detailList:re,detailItem:ie,detailLabel:ne,detailValue:ce,pre:de,pagination:ue,pageInfo:pe,btn:he,tierDistribution:me,tierBarWrap:be,tierBarBasic:xe,tierBarPro:fe,tierLabels:_e,statsTableWrap:ge,statsTable:je,sortableHeader:ye,sortArrow:Ce,statsToolRow:Te,statsActionRow:ke,expandButton:Ne,expandIcon:Se,actionLabel:we,emptyStats:ve,summaryLine:Me},Be=new Set(["clientId","placeId","pinnedTarget","recentPriority","globalQueue"]);function tt(t){return typeof t=="string"&&t.length>0?t:void 0}function Pe(t){if(!Array.isArray(t))return;const o=t.filter(c=>typeof c=="string"&&c.length>0);return o.length>0?o:void 0}function Le(t){const o=t.result??{};return{requestedCommand:t.requestedCommand??tt(o.requestedCommand),executedCommand:t.executedCommand??tt(o.executedCommand),alternatives:t.alternatives??Pe(o.alternatives)}}function ot(t,o){switch(t.status){case"fallback":return{label:o("tools.badge.fallback","FALLBACK"),tooltip:o("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:a.statusFallback};case"unsupported":return{label:o("tools.badge.unsupported","UNSUPPORTED"),tooltip:o("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:a.statusUnsupported};case"warning":return{label:o("tools.badge.warn","WARN"),tooltip:o("tools.badge.warn.tooltip","The tool call failed as an expected caller, project, policy, or user-code issue."),className:a.statusWarning};case"error":return{label:o("tools.badge.err","FAILED"),tooltip:o("tools.badge.err.tooltip","The tool run failed."),className:a.statusError};default:return{label:o("tools.status.ok","OK"),tooltip:o("tools.status.ok.tooltip","The tool run completed successfully."),className:a.statusOk}}}function y(t,o){return e.jsxs("div",{className:a.detailItem,children:[e.jsx("span",{className:a.detailLabel,children:t}),e.jsx("span",{className:a.detailValue,children:o})]})}function Ee(t){if(!t||typeof t!="object")return;const o=t;if(typeof o.selectionMode=="string"&&Be.has(o.selectionMode))return o}function et(t){if(!(!t||typeof t!="object"||!("routing"in t)))return Ee(t.routing)}function He(t){return t.routing??et(t.result)??et(t.data)}function Ae(t,o){return t.requestedClientId?t.requestedClientId:t.requestedPlaceId!==void 0?t.requestedPlaceId:o("tools.history.routing.none","No Studio target named")}function Re(t){return t.actualPlaceName?`${t.actualPlaceName} · ${t.actualPlaceId??"-"}`:t.actualClientId??"-"}function Ie({entry:t,onClose:o}){const{t:c}=at(),T=ot(t,c),b=Le(t),l=He(t);return e.jsxs("div",{className:a.detailShell,children:[e.jsxs("header",{className:a.detailHeader,children:[e.jsxs("div",{className:a.detailHeading,children:[e.jsx("span",{className:a.detailTitle,children:c("tools.detail.title","Tool execution")}),e.jsx("span",{className:a.detailRecordName,children:t.command})]}),e.jsxs("div",{className:a.detailHeaderActions,children:[e.jsx(M,{text:T.tooltip,children:e.jsx("span",{className:T.className,children:T.label})}),e.jsx("button",{type:"button",className:a.detailCloseButton,onClick:o,"aria-label":c("common.close","Close"),children:e.jsx(mt,{size:18,"aria-hidden":"true"})})]})]}),e.jsxs("div",{className:a.detailBody,children:[e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:e.jsx(M,{text:c("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:c("tools.detail.params","Parameters")})}),e.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:e.jsx(M,{text:c("tools.detail.result.tooltip","Returned result payload for this tool run."),children:c("tools.detail.result","Result")})}),e.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]}),l&&e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:c("tools.history.routing","Routing")}),e.jsxs("div",{className:a.detailList,children:[y(c("tools.history.routing.mode","Mode"),l.selectionMode),y(c("tools.history.routing.requested","Requested"),Ae(l,c)),y(c("tools.history.routing.actual","Actual"),Re(l))]})]}),(t.status==="fallback"||t.status==="unsupported"||t.status==="warning"||t.status==="error")&&e.jsx("section",{className:a.detailSection,children:e.jsxs("div",{className:a.detailList,children:[t.status==="fallback"&&b.requestedCommand?y(c("tools.detail.requestedCommand","Requested Command"),b.requestedCommand):null,t.status==="fallback"&&b.executedCommand?y(c("tools.detail.executedCommand","Executed Command"),b.executedCommand):null,t.status==="fallback"&&b.alternatives?y(c("tools.detail.alternatives","Alternatives"),b.alternatives.join(", ")):null,t.status==="unsupported"&&t.blockedMessage?y(c("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage):null,t.status==="unsupported"?y(c("tools.detail.noFallback","No Fallback"),c("tools.detail.noFallback.value","No fallback ran.")):null,t.status==="warning"&&t.warningMessage?y(c("tools.detail.warningMessage","Warning Message"),t.warningMessage):null,t.status==="error"&&t.errorMessage?y(c("tools.detail.errorMessage","Error Message"),t.errorMessage):null,t.status==="error"&&t.blockedMessage?y(c("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage):null,t.status==="error"&&t.fallbackCommand?y(c("tools.detail.executedCommand","Executed Command"),t.fallbackCommand):null]})})]})]})}const G=50;function Oe(t){const o=new Date(t);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function W(t){return typeof t!="number"||!Number.isFinite(t)?"-":t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function R(t,o){return o==="pro"?t("tier.pro","Pro"):o==="mixed"?t("tier.mixed","Mixed"):t("tier.basic","Basic")}function lt(t,o){return o!==t&&o.startsWith(`${t}_`)?o.slice(t.length+1):""}function st(t,o){const c=lt(t,o);return c?`${t}.${c}`:t}function Ge(){const{t}=at(),{trackEvent:o,trackPageView:c}=bt(),[T,b]=i.useState(null),l=Lt({placeId:T}),{show:N}=xt(),[S,h]=i.useState("history"),[w,C]=i.useState(null),_=i.useRef(null),[U,O]=i.useState(null),[m,E]=i.useState(null),[g,F]=i.useState(!1),[B,k]=i.useState("totalCalls"),[x,D]=i.useState("desc"),V=i.useCallback(s=>{k(n=>n===s?(D(r=>r==="asc"?"desc":"asc"),s):(D("desc"),s))},[]),K=i.useMemo(()=>{var n;const s=new Set;return Object.keys(((n=l.statistics)==null?void 0:n.tools)??{}).forEach(r=>s.add(r)),l.history.forEach(r=>{r.tool&&s.add(r.tool)}),l.historyToolFilter&&s.add(l.historyToolFilter),Array.from(s).sort()},[l.history,l.historyToolFilter,l.statistics]),j=i.useMemo(()=>{var s;return(s=l.statistics)!=null&&s.tools?Object.values(l.statistics.tools).map(n=>{var X;const r=Object.entries(n.commands??{}).map(([p,d])=>({toolName:n.tool,commandName:d.command??p,label:lt(n.tool,d.command??p)||(d.command??p),tier:d.tier,totalCalls:d.totalCalls,successCount:d.successCount,fallbackCount:d.fallbackCount,unsupportedCount:d.unsupportedCount,warningCount:d.warningCount??0,failureCount:d.failureCount,totalExecutionTimeMs:d.totalExecutionTimeMs,avgExecutionTimeMs:d.avgExecutionTimeMs})),f=r.reduce((p,d)=>p+d.totalCalls,0),v=r.reduce((p,d)=>p+d.successCount,0),$=r.reduce((p,d)=>p+d.fallbackCount,0),q=r.reduce((p,d)=>p+d.unsupportedCount,0),dt=r.reduce((p,d)=>p+d.warningCount,0),ut=r.reduce((p,d)=>p+d.failureCount,0),Z=r.reduce((p,d)=>p+d.totalExecutionTimeMs,0),pt=new Set(r.map(p=>p.tier)).size>1?"mixed":((X=r[0])==null?void 0:X.tier)??n.tier;return{toolName:n.tool,tier:pt,commands:r,totalCalls:f,successCount:v,fallbackCount:$,unsupportedCount:q,warningCount:dt,failureCount:ut,totalExecutionTimeMs:Z,avgExecutionTimeMs:f>0?Math.round(Z/f):0}}):[]},[l.statistics]),u=i.useCallback((s,n,r,f)=>e.jsx(M,{text:t(r,f),children:t(s,n)}),[t]),P=i.useCallback((s,n)=>{_.current=n,C(s)},[]),H=i.useCallback(()=>{C(null)},[]),z=i.useMemo(()=>[...j].sort((n,r)=>{const f=n[B],v=r[B];if(typeof f=="number"&&typeof v=="number")return x==="asc"?f-v:v-f;const $=String(f??""),q=String(v??"");return x==="asc"?$.localeCompare(q):q.localeCompare($)}),[j,B,x]),rt=i.useMemo(()=>[{key:"timestamp",label:u("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:s=>Oe(s.timestamp)},{key:"toolName",label:u("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:s=>e.jsxs("span",{children:[st(s.tool,s.command),s.tier==="pro"&&e.jsx(M,{text:t("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:e.jsx("span",{className:a.proBadge,children:t("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:u("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:s=>W(s.executionTimeMs)},{key:"status",label:u("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:s=>{const n=ot(s,t);return e.jsx(M,{text:n.tooltip,children:e.jsx("span",{className:n.className,children:n.label})})}},{key:"tier",label:u("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:s=>e.jsx("span",{className:s.tier==="pro"?a.tierPro:a.tierBasic,children:R(t,s.tier)})},{key:"details",label:t("tools.detail.open","Details"),width:"84px",render:s=>{const n=st(s.tool,s.command);return e.jsx("button",{type:"button",className:a.detailsButton,"aria-haspopup":"dialog","aria-label":t("tools.detail.openLabel","View details for {command}").replace("{command}",n),onClick:r=>{r.stopPropagation(),P(s,r.currentTarget)},children:t("tools.detail.open","Details")})}}],[P,t,u]),J=i.useMemo(()=>[{key:"toolName",label:u("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:u("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:u("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:u("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:u("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"warningCount",label:u("tools.col.warn","WARN","tools.col.warn.tooltip","Number of expected failures caused by caller input, project state, Roblox policy, or user code."),sortable:!0,width:"80px"},{key:"failureCount",label:u("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:u("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:s=>W(s.avgExecutionTimeMs)},{key:"tier",label:u("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:s=>e.jsx(M,{text:s.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:s.tier==="pro"?a.tierPro:s.tier==="mixed"?a.tierMixed:a.tierBasic,children:R(t,s.tier)})})}],[t,u]),L=i.useMemo(()=>{if(!l.statistics)return null;const s=l.statistics.tierSummary.basic.totalCalls,n=l.statistics.tierSummary.pro.totalCalls,r=s+n;if(r===0)return null;const f=Math.round(s/r*100),v=100-f;return{basic:s,pro:n,basicPct:f,proPct:v}},[l.statistics]),Q=i.useCallback(s=>{O(n=>n===s?null:s)},[]),it=i.useCallback(async()=>{if(m){F(!0);try{m==="history"?await l.clearHistory():await l.clearStatistics(),N(t("toast.clearSuccess","Cleared successfully"),"success"),E(null)}catch{N(t("toast.clearFailed","Failed to clear data"),"error")}finally{F(!1)}}},[m,N,t,l]),nt=i.useCallback(s=>{const n=s==="history"?"tools_history":"tools_statistics";o("dashboard_click_event",{click_target:s==="history"?"tools_tab_history":"tools_tab_statistics",page:"tools",tab:n}),c({page:"tools",tab:n}),C(null),h(s)},[o,c]),ct=["history","statistics"].map(s=>({key:s,label:t(`tools.tab.${s}`,s.charAt(0).toUpperCase()+s.slice(1))}));return e.jsxs("div",{className:a.page,children:[e.jsx(ft,{title:t("page.tools.title","Tools"),description:t("page.tools.description","Inspect tool history, outcomes, fallback details, and usage statistics."),helpTopicId:"tools"}),e.jsx(yt,{surface:"tools",selectable:!0,selectedPlaceId:T,onSelectedPlaceIdChange:s=>{C(null),b(s),l.setHistoryOffset(0)}}),e.jsx(gt,{items:ct,value:S,onChange:nt}),S==="history"&&e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardToolbar,children:[e.jsx("div",{className:a.sectionTitle,children:t("tools.tab.history","History")}),e.jsx("button",{className:a.dangerButton,onClick:()=>{o("dashboard_click_event",{click_target:"tools_clear_history",page:"tools",tab:"tools_history"}),E("history")},children:t("common.clear","Clear")})]}),e.jsx("div",{className:a.filterRow,children:e.jsxs("label",{className:a.filterLabel,children:[t("tools.filter.tool","Tool"),":",e.jsxs("select",{className:a.filterSelect,value:l.historyToolFilter,onChange:s=>{C(null),l.setHistoryToolFilter(s.target.value),l.setHistoryOffset(0)},children:[e.jsx("option",{value:"",children:t("tools.filter.all","All")}),K.map(s=>e.jsx("option",{value:s,children:s},s))]})]})}),e.jsx(vt,{columns:rt,data:l.history,rowKey:s=>s.id,onRowClick:(s,n)=>P(s,n),emptyMessage:t("tools.empty.history","No tool history entries for this place")}),e.jsxs("div",{className:a.pagination,children:[e.jsx("button",{className:a.btn,disabled:l.historyOffset===0,title:t("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>{C(null),l.setHistoryOffset(Math.max(0,l.historyOffset-G))},children:t("tools.page.prev","Prev")}),e.jsxs("span",{className:a.pageInfo,children:[l.historyOffset+1,"–",Math.min(l.historyOffset+G,l.historyTotal)," / ",l.historyTotal]}),e.jsx("button",{className:a.btn,disabled:!l.historyHasMore,title:t("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>{C(null),l.setHistoryOffset(l.historyOffset+G)},children:t("tools.page.next","Next")})]})]}),S==="statistics"&&e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardToolbar,children:[e.jsx("div",{className:a.sectionTitle,children:t("tools.tab.statistics","Statistics")}),e.jsx("button",{className:a.dangerButton,onClick:()=>{o("dashboard_click_event",{click_target:"tools_clear_statistics",page:"tools",tab:"tools_statistics"}),E("statistics")},children:t("common.clear","Clear")})]}),L&&e.jsxs("div",{className:a.tierDistribution,children:[e.jsxs("div",{className:a.tierBarWrap,children:[e.jsx("div",{className:a.tierBarBasic,style:{width:`${L.basicPct}%`}}),e.jsx("div",{className:a.tierBarPro,style:{width:`${L.proPct}%`}})]}),e.jsxs("div",{className:a.tierLabels,children:[e.jsxs("span",{children:[R(t,"basic")," ",L.basicPct,"% (",L.basic,")"]}),e.jsxs("span",{children:[R(t,"pro")," ",L.proPct,"% (",L.pro,")"]})]})]}),e.jsx("div",{className:a.statsTableWrap,children:e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsx("tr",{children:J.map(s=>e.jsxs("th",{style:s.width?{width:s.width}:void 0,className:s.sortable?a.sortableHeader:void 0,onClick:s.sortable?()=>V(s.key):void 0,children:[e.jsx("span",{children:s.label}),s.sortable&&B===s.key&&e.jsx("span",{className:a.sortArrow,children:x==="asc"?"▴":"▾"})]},s.key))})}),e.jsx("tbody",{children:z.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:J.length,className:a.emptyStats,children:t("tools.empty.stats","No tool statistics for this place")})}):z.map(s=>{const n=U===s.toolName;return e.jsxs(i.Fragment,{children:[e.jsxs("tr",{className:a.statsToolRow,onClick:()=>Q(s.toolName),children:[e.jsx("td",{children:e.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":n,"aria-label":`${s.toolName} ${n?t("common.collapse","Collapse"):t("common.expand","Expand")}`,onClick:r=>{r.stopPropagation(),Q(s.toolName)},children:[e.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:n?"▾":"▸"}),e.jsx("span",{children:s.toolName})]})}),e.jsx("td",{children:s.totalCalls}),e.jsx("td",{children:s.successCount}),e.jsx("td",{children:s.fallbackCount}),e.jsx("td",{children:s.unsupportedCount}),e.jsx("td",{children:s.warningCount}),e.jsx("td",{children:s.failureCount}),e.jsx("td",{children:W(s.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx(M,{text:s.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:s.tier==="pro"?a.tierPro:s.tier==="mixed"?a.tierMixed:a.tierBasic,children:R(t,s.tier)})})})]}),n&&s.commands.map(r=>e.jsxs("tr",{className:a.statsActionRow,children:[e.jsx("td",{children:e.jsx("span",{className:a.actionLabel,children:r.label})}),e.jsx("td",{children:r.totalCalls}),e.jsx("td",{children:r.successCount}),e.jsx("td",{children:r.fallbackCount}),e.jsx("td",{children:r.unsupportedCount}),e.jsx("td",{children:r.warningCount}),e.jsx("td",{children:r.failureCount}),e.jsx("td",{children:W(r.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx("span",{className:r.tier==="pro"?a.tierPro:a.tierBasic,children:R(t,r.tier)})})]},`${s.toolName}:${r.commandName}`))]},s.toolName)})})]})}),l.statistics&&e.jsxs("div",{className:a.summaryLine,children:[t("tools.summary.total","Total"),": ",l.statistics.totalCalls," ",t("tools.summary.calls","calls")," | ",t("tools.summary.sessions","Sessions"),": ",l.statistics.totalSessions]})]}),e.jsx(jt,{open:w!==null,ariaLabel:t("tools.detail.dialogLabel","Tool execution detail"),onClose:H,returnFocusTo:_.current,testId:"tools-history-detail-popup-layer",children:w&&e.jsx(Ie,{entry:w,onClose:H})}),e.jsx(_t,{open:m!==null,title:m==="history"?t("tools.clear.history.title","Clear history?"):t("tools.clear.statistics.title","Clear statistics?"),message:m==="history"?t("tools.clear.history.message","This permanently removes the current place tools history."):t("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:g,onCancel:()=>!g&&E(null),onConfirm:it})]})}export{Ge as Component};
@@ -1 +1 @@
1
- import{j as r,k as s}from"./index-Dj2NvZgn.js";function p({text:o,children:t}){return r.jsx(s,{text:o,children:t})}export{p as T};
1
+ import{j as r,h as s}from"./index-89-Xnii6.js";function p({text:o,children:t}){return r.jsx(s,{text:o,children:t})}export{p as T};
@@ -0,0 +1 @@
1
+ ._page_vrx8j_2{display:flex;flex-direction:column;gap:var(--content-gap);max-width:var(--content-max)}._grid_vrx8j_9{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-top:16px}._card_vrx8j_16{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--bg-card);padding:0;text-align:left;position:relative;color:inherit}._card_vrx8j_16:hover{border-color:var(--accent)}._cardBodyButton_vrx8j_31{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;text-align:left}._cardBodyButton_vrx8j_31:focus-visible{outline:none;box-shadow:inset var(--focus-ring)}._thumb_vrx8j_48{width:100%;aspect-ratio:16 / 9;object-fit:contain;object-position:center;display:block;background:var(--bg-secondary)}._badges_vrx8j_57{position:absolute;top:8px;right:8px;display:flex;gap:4px}._priorityHighBadge_vrx8j_65,._priorityMediumBadge_vrx8j_66,._priorityLowBadge_vrx8j_67{display:inline-flex;align-items:center;min-height:22px;padding:2px 6px;border:1px solid var(--border);border-radius:var(--radius-control);font-size:12px;font-weight:600;cursor:default}._priorityHighBadge_vrx8j_65{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}._priorityMediumBadge_vrx8j_66{background:var(--pro-bg-soft);border-color:var(--pro-border);color:var(--pro-text)}._priorityLowBadge_vrx8j_67{background:var(--bg-secondary);border-color:var(--border);color:var(--text-secondary)}._cardMeta_vrx8j_97{padding:8px 12px;font-size:12px;color:var(--text-primary)}._target_vrx8j_103{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._time_vrx8j_110{color:var(--text-muted);margin-top:4px}._drawer_vrx8j_115{width:100%;flex:1 1 auto;min-height:0;max-height:none;display:flex;flex-direction:column;background:var(--bg-card);border:0;border-radius:0;overflow:hidden;padding:0;box-shadow:none;color:var(--text-primary);box-sizing:border-box}._drawerToolbar_vrx8j_132{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px 16px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--bg-card) 92%,var(--bg-secondary))}._drawerTitleBlock_vrx8j_143{min-width:0;display:flex;flex-direction:column;gap:3px}._drawerEyebrow_vrx8j_150{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._drawerTarget_vrx8j_159{overflow:hidden;color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._drawerToolbarActions_vrx8j_169{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._closeBtn_vrx8j_177{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;cursor:pointer;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--text-secondary);transition:border-color var(--transition),background var(--transition),color var(--transition)}._closeBtn_vrx8j_177:hover{border-color:var(--accent);background:var(--accent-dim);color:var(--text-primary)}._detailBody_vrx8j_198{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 24px 24px}._screenshotPreviewFrame_vrx8j_205{display:flex;align-items:center;justify-content:center;width:100%;height:clamp(180px,32vh,320px);margin-top:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);overflow:hidden}._fullImg_vrx8j_218{display:block;width:100%;height:100%;object-fit:contain}._metaDl_vrx8j_225{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:16px 0;font-size:13px}._metaDl_vrx8j_225 dt{color:var(--text-muted)}._errorMsg_vrx8j_237{color:var(--error-text);padding:12px}._suggestionsWrap_vrx8j_242{margin-top:16px}._suggestionsWrap_vrx8j_242 h3{margin:0 0 12px;font-size:16px}._prioritySection_vrx8j_249{margin-bottom:16px}._sectionHighHeader_vrx8j_253{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--error)}._sectionLowHeader_vrx8j_259{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--warning-text)}._sectionMediumHeader_vrx8j_265{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--warning)}._groupCard_vrx8j_271{border:1px solid var(--border);border-radius:8px;margin-bottom:8px;background:var(--bg-secondary);overflow:hidden}._groupHeader_vrx8j_278{width:100%;display:flex;align-items:center;gap:8px;padding:10px 12px;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--text-primary);font:inherit}._groupHeader_vrx8j_278:hover{background:var(--bg-card)}._groupLabel_vrx8j_294{font-weight:600;font-size:13px;flex:1}._groupCount_vrx8j_299{font-size:12px;color:var(--text-muted);padding:2px 8px;background:var(--bg-card);border-radius:10px}._groupChevron_vrx8j_306{color:var(--text-muted);font-size:12px}._groupBody_vrx8j_310{padding:0 12px 12px}._groupDescription_vrx8j_313{font-size:12px;color:var(--text-muted);margin:8px 0 4px}._groupFix_vrx8j_318{font-size:12px;color:var(--text-primary);margin:4px 0 8px;padding:6px 10px;background:var(--bg-card);border-left:3px solid var(--accent);border-radius:4px}._falsePositive_vrx8j_327{font-size:12px;color:var(--warning-text);margin:4px 0 8px;padding:6px 10px;background:var(--warning-bg);border-radius:4px}._itemList_vrx8j_335{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}._suggestionItem_vrx8j_343{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:var(--bg-card);border-radius:6px;font-size:12px}._suggestionInfo_vrx8j_353{display:flex;flex-direction:column;gap:2px;min-width:0}._pathBreadcrumb_vrx8j_359{font-family:monospace;font-size:11px;color:var(--text-primary);background:transparent;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._currentValue_vrx8j_368{font-size:11px;color:var(--text-muted)}._copyFixBtn_vrx8j_372{padding:4px 10px;background:var(--accent);color:var(--bg-card);border:none;border-radius:4px;cursor:pointer;font-size:11px;font-weight:600;flex-shrink:0}._copyFixBtn_vrx8j_372:hover{opacity:.9}._emptySuggestions_vrx8j_386{text-align:center;padding:24px;color:var(--text-muted);font-size:13px}._sampleBanner_vrx8j_394{display:flex;flex-direction:column;gap:12px;padding:18px 20px;border:1px solid var(--pro-border);border-radius:var(--radius);background:linear-gradient(135deg,#f0bd5829,#f0bd5808 55%),var(--bg-card);margin-bottom:16px}._sampleBannerRow_vrx8j_407{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}._sampleBannerMain_vrx8j_415{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}._sampleBadge_vrx8j_423{width:fit-content;color:var(--pro-text);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.02em;opacity:.92}._sampleTitle_vrx8j_433{font-family:var(--font-label);font-size:16px;font-weight:600;color:var(--text-primary)}._sampleMessage_vrx8j_440{max-width:560px;color:var(--text-secondary);font-size:13px;line-height:1.5}._sampleActions_vrx8j_447{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._primaryAction_vrx8j_455,._secondaryAction_vrx8j_456{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 14px;border-radius:8px;font-family:var(--font-label);font-size:12px;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._secondaryAction_vrx8j_456{border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer}._secondaryAction_vrx8j_456:hover{border-color:var(--accent);background:var(--accent-dim)}._primaryAction_vrx8j_455{border:1px solid var(--pro-badge);background:var(--pro-badge);color:var(--pro-text-on-badge)}._primaryAction_vrx8j_455:hover{opacity:.9}._emptyState_vrx8j_491{text-align:center;padding:48px 20px;color:var(--text-muted);font-size:14px}._pluginGuideCard_vrx8j_499{display:flex;align-items:flex-start;gap:14px;padding:18px 20px;border:1px solid var(--warning);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary)}._pluginGuideMarker_vrx8j_510{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;border:1px solid var(--warning);color:var(--warning);font-family:var(--font-label);font-size:15px;font-weight:700}._pluginGuideBody_vrx8j_525{min-width:0}._pluginGuideTitle_vrx8j_529{margin:0 0 8px;color:var(--text-primary);font-family:var(--font-label);font-size:15px;font-weight:600}._pluginGuideMessage_vrx8j_537{margin:0 0 12px;color:var(--text-secondary);font-size:13px;line-height:1.5}._pluginGuideChecklist_vrx8j_544{display:flex;flex-direction:column;gap:7px;margin:0 0 14px;padding:0;list-style:none}._pluginGuideChecklist_vrx8j_544 li{position:relative;padding-left:20px;color:var(--text-secondary);font-size:13px}._pluginGuideChecklist_vrx8j_544 li:before{content:"○";position:absolute;left:2px;color:var(--text-muted)}._pluginGuideWaiting_vrx8j_567{display:inline-flex;align-items:center;gap:8px;color:var(--text-muted);font-family:var(--font-label);font-size:12px}._pluginGuideDot_vrx8j_576{width:7px;height:7px;border-radius:50%;background:var(--warning)}._analysisWorkspace_vrx8j_584{width:100%;position:relative}._analysisMainColumn_vrx8j_589{min-width:0}._analysisSummaryPanel_vrx8j_594{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:16px;padding:16px 18px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._analysisSummaryPanel_vrx8j_594 h2,._recentCapturesHeader_vrx8j_607 h2{margin:0;font-size:16px;font-family:var(--font-label);color:var(--text-primary)}._analysisSummaryText_vrx8j_614,._recentCapturesMeta_vrx8j_615{margin:6px 0 0;color:var(--text-secondary);font-size:13px}._analysisReportGrid_vrx8j_621{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-top:14px}._analysisReportGroup_vrx8j_628{min-width:0}._analysisReportCard_vrx8j_632{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;width:100%;min-height:128px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);cursor:pointer;text-align:left;font:inherit;transition:border-color var(--transition),background var(--transition)}._analysisReportCard_vrx8j_632:hover{border-color:var(--accent);background:var(--bg-secondary)}._analysisReportThumb_vrx8j_654{width:112px;aspect-ratio:16 / 10;object-fit:contain;object-position:center;border-radius:6px;background:var(--bg-secondary)}._analysisReportBody_vrx8j_663{min-width:0;display:flex;flex-direction:column;gap:7px}._analysisReportTopline_vrx8j_670{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._analysisVerdict_vrx8j_677{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-family:var(--font-label);font-size:12px;font-weight:600}._analysisVerdict_needsFix_vrx8j_688,._analysisVerdict_review_vrx8j_689{color:var(--accent);background:var(--accent-dim)}._analysisVerdict_incomplete_vrx8j_694{color:var(--warning-text);background:var(--warning-bg)}._analysisVerdict_passed_vrx8j_699{color:var(--text-secondary);background:var(--bg-secondary)}._analysisReportCounts_vrx8j_704{color:var(--text-secondary);font-size:12px}._readinessSummary_vrx8j_709{display:flex;flex-wrap:wrap;gap:5px}._readinessChip_vrx8j_715{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;font-weight:600;line-height:1.3}._readinessChipReady_vrx8j_730{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}._readinessChipPending_vrx8j_736{border-color:var(--warning-border);background:var(--warning-bg);color:var(--warning-text)}._primaryReadinessBlock_vrx8j_742{display:flex;flex-direction:column;gap:8px;width:100%}._criticSummary_vrx8j_749{display:flex;flex-direction:column;gap:3px;margin:0;padding:8px 10px;border-left:2px solid var(--accent);background:var(--accent-dim);color:var(--text-secondary);font-size:12px;line-height:1.45}._criticSummary_vrx8j_749>span{color:var(--text-primary);font-size:11px;font-weight:600}._analysisReportTarget_vrx8j_768{overflow:hidden;color:var(--text-primary);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._analysisReportIssue_vrx8j_777{color:var(--text-secondary);font-size:12px;line-height:1.35}._analysisReportCoverage_vrx8j_783{color:var(--text-muted);font-size:12px;line-height:1.4}._coverageChips_vrx8j_789{display:flex;flex-wrap:wrap;gap:5px}._coverageChip_vrx8j_789{display:inline-flex;align-items:center;min-height:20px;padding:1px 6px;border:1px solid var(--border);border-radius:5px;background:var(--bg-card);color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:500;cursor:default}._coverageChip_completed_vrx8j_810{border-color:var(--success-border);color:var(--success-text)}._coverageChip_failed_vrx8j_815{border-color:var(--error-border);color:var(--error-text)}._coverageChip_skipped_vrx8j_820,._coverageChip_not_requested_vrx8j_821{border-color:var(--warning-border);color:var(--warning-text)}._analysisReportMeta_vrx8j_826{margin-top:auto;color:var(--text-muted);font-size:11px;line-height:1.35}._analysisChildList_vrx8j_833{display:flex;flex-direction:column;gap:6px;margin-top:8px;padding:8px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._analysisChildRow_vrx8j_844{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:6px;background:var(--bg-card);color:var(--text-primary);cursor:pointer;text-align:left;font:inherit;transition:border-color var(--transition),background var(--transition)}._analysisChildRow_vrx8j_844:hover{border-color:var(--accent);background:var(--accent-dim)}._analysisChildPath_vrx8j_865{overflow:hidden;color:var(--text-primary);font-family:var(--font-code);font-size:11px;text-overflow:ellipsis;white-space:nowrap}._analysisChildSummary_vrx8j_874,._analysisChildDetailHint_vrx8j_875{color:var(--text-secondary);font-size:11px}._analysisChildDetailHint_vrx8j_875{color:var(--text-muted)}._drawerAnalysisSummary_vrx8j_884{display:flex;flex-direction:column;gap:10px;margin-top:14px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._drawerAnalysisSummaryItem_vrx8j_895{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._drawerAnalysisLabel_vrx8j_902{min-width:64px;color:var(--text-muted);font-size:12px}._drawerAnalysisCounts_vrx8j_908,._drawerAnalysisValue_vrx8j_909{color:var(--text-secondary);font-size:12px}._recentCapturesSection_vrx8j_914{margin-top:28px}._recentCapturesHeader_vrx8j_607{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._drawerPrimaryActions_vrx8j_926{display:flex;align-items:center;gap:8px;min-width:0}._drawerActionBtn_vrx8j_933{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 14px;border-radius:7px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:12px;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._drawerActionBtn_vrx8j_933:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._drawerActionBtn_vrx8j_933:disabled{opacity:.45;cursor:not-allowed}._drawerMoreMenu_vrx8j_962{position:relative;flex:0 0 auto}._drawerMoreButton_vrx8j_967{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:7px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);cursor:pointer;list-style:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._drawerMoreButton_vrx8j_967:hover{border-color:var(--accent);background:var(--accent-dim);color:var(--text-primary)}._drawerMoreButton_vrx8j_967::-webkit-details-marker{display:none}._drawerMoreMenuBody_vrx8j_992{position:absolute;top:calc(100% + 6px);right:0;z-index:2;min-width:180px;padding:6px;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);box-shadow:0 8px 24px #0000002e}._drawerMenuItem_vrx8j_1005{display:block;width:100%;padding:8px 10px;border:0;border-radius:5px;background:transparent;color:var(--text-primary);text-align:left;font-family:var(--font-label);font-size:12px;cursor:pointer}._drawerMenuItem_vrx8j_1005:hover:not(:disabled){background:var(--bg-secondary)}._drawerMenuItem_vrx8j_1005:disabled{opacity:.45;cursor:not-allowed}._drawerMenuItemDanger_vrx8j_1028{color:var(--danger-text)}._drawerMenuItemDanger_vrx8j_1028:hover:not(:disabled){background:var(--danger-hover-bg)}._actionErrMsg_vrx8j_1037{font-size:12px;color:var(--error-text);padding:6px 10px;background:#e0555514;border-radius:4px;margin-top:10px}._actionStatusMsg_vrx8j_1046{display:inline-flex;flex-direction:column;align-items:flex-start;max-width:100%;font-size:12px;padding:7px 10px;border:1px solid transparent;border-radius:7px;margin-top:0;margin-bottom:10px;line-height:1.45}._actionStatus_info_vrx8j_1060{color:var(--text-secondary);background:var(--bg-secondary);border-color:var(--border)}._actionStatus_success_vrx8j_1066{color:var(--success-text);background:var(--success-bg);border-color:var(--success-border)}._actionStatus_warning_vrx8j_1072{color:var(--warning-text);background:var(--warning-bg);border-color:var(--warning-border)}._actionStatusDetail_vrx8j_1078{margin-top:2px;color:var(--text-muted)}._galleryHeader_vrx8j_1084{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._galleryHeader_vrx8j_1084 h2{margin:0;color:var(--text-primary);font-size:var(--type-surface-title-size);font-weight:600;line-height:var(--leading-title)}._cardChecked_vrx8j_1101{border-color:var(--accent)!important;box-shadow:0 0 0 2px var(--accent);background:var(--accent-dim)}._cardCheckbox_vrx8j_1108{position:absolute;top:8px;left:8px;opacity:0;z-index:2;transition:opacity var(--transition),background var(--transition),border-color var(--transition)}._card_vrx8j_16:hover ._cardCheckbox_vrx8j_1108,._card_vrx8j_16:focus-within ._cardCheckbox_vrx8j_1108,._cardChecked_vrx8j_1101 ._cardCheckbox_vrx8j_1108{opacity:1}._captureSelectionActions_vrx8j_1123{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}._selectionToolbar_vrx8j_1132,._selectionBar_vrx8j_1133{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 12px;padding:12px 16px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius)}._selectionToolbar_vrx8j_1132{position:sticky;top:0;z-index:8;justify-content:space-between}._selectionToolbarCount_vrx8j_1152{color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._selectionToolbarActions_vrx8j_1159{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._selectionBarBtn_vrx8j_1166{padding:6px 14px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),opacity var(--transition)}._selectionBarBtn_vrx8j_1166:hover:not(:disabled){border-color:var(--accent)}._selectionBarBtn_vrx8j_1166:focus-visible{outline:none;box-shadow:var(--focus-ring)}._selectionBarBtn_vrx8j_1166:disabled{opacity:.45;cursor:not-allowed}._selectionBarBtnDanger_vrx8j_1192{border-color:var(--danger-border);background:var(--danger-bg);color:var(--danger-text)}._selectionBarBtnDanger_vrx8j_1192:hover:not(:disabled){border-color:var(--danger);background:var(--danger-hover-bg)}@media(max-width:768px){._drawer_vrx8j_115{padding:0}._drawerToolbar_vrx8j_132{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._drawerToolbarActions_vrx8j_169{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._drawerActionBtn_vrx8j_933{padding:7px 10px}._detailBody_vrx8j_198{padding:14px}}._filterBar_2mh91_4{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 0;margin-bottom:8px;border-bottom:1px solid var(--border)}._filterGroup_2mh91_14{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._filterLabel_2mh91_21{font-size:12px;color:var(--text-muted);font-weight:500;white-space:nowrap}._filterCheckbox_2mh91_28{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none}._filterCheckbox_2mh91_28 input[type=checkbox]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent)}._segmentGroup_2mh91_45{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--border);border-radius:7px;background:var(--bg-secondary)}._segmentBtn_2mh91_55{min-height:26px;padding:0 10px;border:0;border-radius:5px;background:transparent;color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;white-space:nowrap;transition:background var(--transition),color var(--transition)}._segmentBtn_2mh91_55:hover{color:var(--text-primary)}._segmentBtnActive_2mh91_73{background:var(--bg-card);color:var(--text-primary);box-shadow:0 0 0 1px var(--border)}._filterInput_2mh91_79{font-size:12px;padding:4px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);font-family:inherit;width:130px}._filterInput_2mh91_79:focus{outline:none;border-color:var(--accent)}._filterResetBtn_2mh91_95{min-height:30px;padding:0 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition)}._filterResetBtn_2mh91_95:hover{border-color:var(--accent);color:var(--text-primary)}._requestRow_2mh91_114{border:1px solid var(--border);border-radius:var(--radius);margin-bottom:8px;background:var(--bg-card);overflow:hidden;transition:border-color var(--transition)}._requestRow_2mh91_114:hover{border-color:var(--accent)}._requestRowMain_2mh91_127{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}._requestDetailToggle_2mh91_134{flex:1;min-width:0;display:flex;align-items:flex-start;gap:12px;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}._requestDetailToggle_2mh91_134:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}._thumbPair_2mh91_156{display:flex;align-items:center;gap:4px;flex-shrink:0;position:relative}._thumbPairButton_2mh91_164{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;border-radius:6px}._thumbPairButton_2mh91_164:focus-visible{outline:2px solid var(--accent);outline-offset:3px}._thumbPairButton_2mh91_164:hover ._thumbSlot_2mh91_179{border-color:var(--accent)}._thumbPairButton_2mh91_164:disabled{cursor:not-allowed;opacity:.72}._thumbPairButton_2mh91_164:disabled:hover ._thumbSlot_2mh91_179{border-color:var(--border)}._thumbSlot_2mh91_179{width:72px;height:48px;border:1px solid var(--border);border-radius:4px;overflow:hidden;background:var(--bg-secondary);display:flex;align-items:center;justify-content:center}._thumbImg_2mh91_204{width:100%;height:100%;object-fit:cover;display:block}._thumbPlaceholder_2mh91_211{font-size:10px;color:var(--text-muted);text-align:center;padding:4px;line-height:1.3}._thumbArrow_2mh91_219{font-size:12px;color:var(--text-muted);flex-shrink:0}._extraPathsBadge_2mh91_225{position:absolute;bottom:0;right:0;background:var(--accent);color:#fff;font-size:10px;font-weight:700;padding:1px 4px;border-radius:3px;line-height:1.4}._requestMeta_2mh91_239{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}._requestLabel_2mh91_247{font-size:13px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._requestTime_2mh91_256{font-size:11px;color:var(--text-muted)}._requestStats_2mh91_261{font-size:12px;color:var(--text-secondary);display:flex;gap:4px;flex-wrap:wrap}._statDot_2mh91_269{color:var(--text-muted)}._summaryPill_2mh91_273{color:var(--text-secondary)}._requestReadiness_2mh91_277{display:flex;flex-wrap:wrap;gap:5px}._requestReadinessPill_2mh91_283{display:inline-flex;align-items:center;min-height:20px;padding:1px 6px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-size:11px;font-weight:600;line-height:1.35}._requestReadinessReady_2mh91_297{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}._requestReadinessPending_2mh91_303{border-color:var(--warning-border);background:var(--warning-bg);color:var(--warning-text)}._requestActions_2mh91_310{display:flex;flex-direction:column;gap:6px;flex-shrink:0}._expandHint_2mh91_317{padding:5px 10px;border-radius:5px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;white-space:nowrap;-webkit-user-select:none;user-select:none}._mutationsArea_2mh91_330{border-top:1px solid var(--border);background:var(--bg-secondary);padding:8px 14px;display:flex;flex-direction:column;gap:4px}._mutLoading_2mh91_339,._mutEmpty_2mh91_340{font-size:12px;color:var(--text-muted);padding:4px 0}._mutError_2mh91_346{font-size:12px;color:var(--error-text);padding:4px 0}._mutationRow_2mh91_352{font-size:12px;padding:6px 0;border-bottom:1px solid var(--border)}._mutationRow_2mh91_352:last-child{border-bottom:none}._mutationLine_2mh91_362{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}._mutTs_2mh91_369{color:var(--text-muted);flex-shrink:0;font-size:11px}._mutCommand_2mh91_375{color:var(--accent);font-weight:500;flex-shrink:0}._mutPath_2mh91_381{font-family:monospace;font-size:11px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}._mutDiff_2mh91_391{color:var(--text-muted);font-size:11px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._mutErr_2mh91_346{color:var(--error-text);font-size:11px}._changeDetails_2mh91_406{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding-left:88px}._changeDetailRow_2mh91_414{display:grid;grid-template-columns:72px minmax(96px,180px) minmax(0,1fr) 14px minmax(0,1fr);align-items:start;gap:8px;min-height:24px;font-size:11px}._changeDetailRowNoBefore_2mh91_423{grid-template-columns:72px minmax(96px,180px) 14px minmax(0,1fr)}._changeDetailBadge_2mh91_427{justify-self:start;padding:2px 6px;border-radius:4px;border:1px solid var(--border);background:var(--bg-card);color:var(--text-secondary);font-weight:600;line-height:1.4;white-space:nowrap}._changeDetail_text_2mh91_444{color:#2563eb;border-color:#2563eb47}._changeDetail_color_2mh91_449{color:#b45309;border-color:#b4530947}._changeDetail_size_2mh91_454{color:#047857;border-color:#04785747}._changeDetail_layout_2mh91_459{color:#7c3aed;border-color:#7c3aed47}._changeDetail_state_2mh91_464{color:#be123c;border-color:#be123c47}._changeDetail_asset_2mh91_469{color:#0369a1;border-color:#0369a147}._changeDetail_property_2mh91_474{color:var(--text-secondary)}._changeDetailProperty_2mh91_478{font-family:var(--font-code);color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._changeDetailArrow_2mh91_486{color:var(--text-muted);text-align:center;line-height:1.6}._changeDetailOldValue_2mh91_492,._changeDetailNewValue_2mh91_493{font-family:var(--font-code);overflow-wrap:anywhere;word-break:break-word;line-height:1.6}._changeDetailOldValue_2mh91_492{color:var(--error-text);text-decoration:line-through;text-decoration-thickness:1px}._changeDetailNewValue_2mh91_493{color:var(--success-text)}._compareDialogLayer_2mh91_511{position:fixed;top:calc(var(--header-height) + 16px);right:24px;bottom:24px;left:calc(var(--sidebar-width) + 24px);z-index:900;display:flex;align-items:stretch;justify-content:center;padding:clamp(12px,2vw,24px);background:#03071294;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-sizing:border-box;overflow:auto}._compareDialog_2mh91_511{width:100%;height:100%;min-height:0;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column;box-shadow:0 24px 60px #0000006b;outline:none;overflow:hidden}._beforeAfterDrawer_2mh91_542{width:100%;height:100%;min-height:0;background:var(--bg-card);display:flex;flex-direction:column;overflow:hidden}._drawerHeader_2mh91_552{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);flex-shrink:0}._drawerTitle_2mh91_561{margin:0;font-size:var(--type-section-title-size);font-weight:600;line-height:var(--leading-title);color:var(--text-primary)}._drawerCloseBtn_2mh91_569{padding:5px 12px;border-radius:5px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);font-size:12px;cursor:pointer;transition:border-color var(--transition)}._drawerCloseBtn_2mh91_569:hover{border-color:var(--accent);color:var(--text-primary)}._drawerBody_2mh91_585{padding:20px;color:var(--text-muted);font-size:13px}._pathTabs_2mh91_592{display:flex;gap:2px;border-bottom:1px solid var(--border);padding:0 20px;flex-shrink:0;overflow-x:auto}._pathTab_2mh91_592{font-family:var(--font-label);font-size:12px;padding:8px 14px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;transition:color var(--transition),border-color var(--transition)}._pathTab_2mh91_592:hover{color:var(--text-primary)}._pathTabActive_2mh91_621{color:var(--accent);border-bottom-color:var(--accent)}._comparePanel_2mh91_627{display:grid;grid-template-columns:1fr 1fr;gap:1px;flex:1;min-height:0;background:var(--border);overflow:auto}._compareHalf_2mh91_637{background:var(--bg-card);display:flex;flex-direction:column;min-height:0}._compareLabel_2mh91_644{font-size:11px;font-weight:600;color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase;padding:8px 12px;border-bottom:1px solid var(--border);flex-shrink:0}._compareImg_2mh91_655{width:100%;flex:1;object-fit:contain;background:var(--bg-secondary);display:block}._comparePlaceholder_2mh91_663{flex:1;display:flex;align-items:center;justify-content:center;font-size:13px;color:var(--text-muted);background:var(--bg-secondary);padding:24px;text-align:center}._compareDetailsPanel_2mh91_675{flex-shrink:0;max-height:min(34%,260px);overflow:auto;padding:12px 20px 14px;border-top:1px solid var(--border);background:var(--bg-secondary)}._compareDetailsHeader_2mh91_684{margin-bottom:8px;color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._compareDetailsPanel_2mh91_675 ._changeDetails_2mh91_406{padding-left:0}._compareDetailsPanel_2mh91_675 ._mutPath_2mh91_381,._compareDetailsPanel_2mh91_675 ._mutDiff_2mh91_391{max-width:none}._drawerFooter_2mh91_702{display:flex;justify-content:flex-end;padding:12px 20px;border-top:1px solid var(--border);flex-shrink:0}._drawerActionBtn_2mh91_710{padding:7px 16px;border-radius:6px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),background var(--transition)}._drawerActionBtn_2mh91_710:hover{border-color:var(--accent);background:var(--accent-dim)}._historyTabWrap_2mh91_728{display:flex;flex-direction:column;gap:0}._historyWorkspace_2mh91_734{width:100%;position:relative}._historyMainColumn_2mh91_739{min-width:0}._requestList_2mh91_743{display:flex;flex-direction:column}._emptyHistory_2mh91_748{text-align:center;padding:48px 20px;color:var(--text-muted);font-size:14px}._historyError_2mh91_755{padding:16px 0;color:var(--error-text);font-size:13px}._historyLoading_2mh91_761{padding:48px 20px;text-align:center;color:var(--text-muted);font-size:13px}._listHeader_2mh91_769{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px}._listHeaderTitle_2mh91_778{font-size:14px;font-weight:600;color:var(--text-primary);margin:0}._clearBtn_2mh91_785{padding:6px 12px;border:1px solid var(--danger-border);border-radius:var(--radius-control);background:var(--danger-bg);color:var(--danger-text);font-family:var(--font-label);font-size:12px;font-weight:500;cursor:pointer;transition:background var(--transition),border-color var(--transition)}._clearBtn_2mh91_785:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._clearBtn_2mh91_785:focus-visible{outline:none;box-shadow:var(--focus-ring)}._deleteErrBanner_2mh91_809{padding:8px 12px;margin-bottom:8px;border-radius:var(--radius);background:var(--error-bg, rgba(224, 85, 85, .12));border:1px solid var(--error-border, rgba(224, 85, 85, .4));color:var(--error-text);font-size:13px}@media(max-width:1120px){._compareDialogLayer_2mh91_511{left:calc(var(--sidebar-width) + 16px);right:16px;bottom:16px;padding:12px}}@media(max-width:768px){._compareDialogLayer_2mh91_511{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}}