@weppy/roblox-mcp 2.8.2 → 2.9.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.
- package/CHANGELOG.md +15 -0
- package/README.md +46 -14
- package/dashboard/dist/assets/AssetsPage-Be5aZDhj.css +1 -0
- package/dashboard/dist/assets/AssetsPage-Bg2-L4ZA.js +46 -0
- package/dashboard/dist/assets/ChangelogDetailPage-BfKpoGXf.js +1 -0
- package/dashboard/dist/assets/ChangelogPage-CJgsI7aS.js +1 -0
- package/dashboard/dist/assets/ConfirmModal-C9EhZCHZ.js +1 -0
- package/dashboard/dist/assets/ConfirmModal-D1kfK31C.css +1 -0
- package/dashboard/dist/assets/ConfirmModal.module-NrFlfTWy.js +1 -0
- package/dashboard/dist/assets/ConnectionPage-D1GWlHZP.css +1 -0
- package/dashboard/dist/assets/ConnectionPage-DGUYptQR.js +11 -0
- package/dashboard/dist/assets/ControlsPage-rqArYVq2.js +1 -0
- package/dashboard/dist/assets/CurrentPlaceScope-BMyP2w7Z.js +1 -0
- package/dashboard/dist/assets/CurrentPlaceScope-v3pl1mLI.css +1 -0
- package/dashboard/dist/assets/{GameChangeDetail-CghOvUm8.js → GameChangeDetail-DKAKmyGF.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-Cyz7d4Kc.js → InfoLabel-ZfsTcz5c.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-B6ZL_JXU.js → OverviewPage-C9OL33DV.js} +1 -1
- package/dashboard/dist/assets/PageHeader-Cqg4GMtU.js +6 -0
- package/dashboard/dist/assets/PlaytestPage-CczAQ-A8.js +11 -0
- package/dashboard/dist/assets/SettingsPage-DNp4oJDT.js +1 -0
- package/dashboard/dist/assets/SettingsPage-DSipzuEo.css +1 -0
- package/dashboard/dist/assets/{StatusBadge-CkLieULy.js → StatusBadge-BSFzbkXM.js} +1 -1
- package/dashboard/dist/assets/SyncPage-DzOONMOM.js +4 -0
- package/dashboard/dist/assets/{Tabs-BhkhdCvF.js → Tabs-B8mbzhmZ.js} +1 -1
- package/dashboard/dist/assets/ToolsPage-DFh7yyab.js +1 -0
- package/dashboard/dist/assets/TooltipText-ZamrETeK.js +1 -0
- package/dashboard/dist/assets/UiStudioPage-D7awEU2z.js +11 -0
- package/dashboard/dist/assets/{WhatsNewPage-CBUk7WTn.js → WhatsNewPage-CTZEuf65.js} +1 -1
- package/dashboard/dist/assets/copy-Cey6jv67.js +6 -0
- package/dashboard/dist/assets/index-B9LVK3-K.js +606 -0
- package/dashboard/dist/assets/index-Dd1aCYFM.css +1 -0
- package/dashboard/dist/assets/{sample-requests-D1b5Z8FU.js → sample-requests-CS0o0F7H.js} +1 -1
- package/dashboard/dist/assets/{useLiveUptime-BHqJirBV.js → useLiveUptime-BGlwL1Q-.js} +1 -1
- package/dashboard/dist/assets/useSettings-Bsfu70PT.css +1 -0
- package/dashboard/dist/assets/useSettings-mbARvRgI.js +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/index.js +93 -93
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/AssetsPage-BQGliX7Q.css +0 -1
- package/dashboard/dist/assets/AssetsPage-yddSUaZg.js +0 -51
- package/dashboard/dist/assets/ChangelogDetailPage-BiiG5ZpO.js +0 -1
- package/dashboard/dist/assets/ChangelogPage-oIxW8_VE.js +0 -1
- package/dashboard/dist/assets/ConfirmModal-CpImpY9c.js +0 -1
- package/dashboard/dist/assets/ConnectionPage-CNtjimlm.css +0 -1
- package/dashboard/dist/assets/ConnectionPage-zGBwRnwi.js +0 -1
- package/dashboard/dist/assets/PageHeader-CThGgsAt.js +0 -6
- package/dashboard/dist/assets/PlaytestPage-CQqE8m04.js +0 -11
- package/dashboard/dist/assets/SettingsPage-DX6vgUTw.js +0 -1
- package/dashboard/dist/assets/SettingsPage-d0wOFs8U.css +0 -1
- package/dashboard/dist/assets/SyncPage-cfQ-4IDk.js +0 -4
- package/dashboard/dist/assets/ToolsPage-B004HHzX.js +0 -1
- package/dashboard/dist/assets/TooltipText-H3YSCbob.js +0 -1
- package/dashboard/dist/assets/UiStudioPage-CwURRVO9.js +0 -11
- package/dashboard/dist/assets/index-CjzKb5lS.css +0 -1
- package/dashboard/dist/assets/index-DG2RrKOl.js +0 -532
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as re,r as l,f as ce,D as de,e as ue,g as ge,h as pe,a as $,u as Q,i as ie,j as e,k as he,l as ye,T as me,A as ve,S as _e}from"./index-DG2RrKOl.js";import{P as xe}from"./PageHeader-CThGgsAt.js";import{I as f}from"./InfoLabel-Cyz7d4Kc.js";import{T as u}from"./TooltipText-H3YSCbob.js";import{C as fe}from"./ConfirmModal-CpImpY9c.js";import{D as ne,f as oe,r as je,s as be,a as le,d as V,S as te,b as Se}from"./sample-requests-D1b5Z8FU.js";function Ne(){const{level:t}=re(),[s,c]=l.useState(null),[S,r]=l.useState(null),[j,i]=l.useState(!1),[m,h]=l.useState(!0),[B,L]=l.useState(!1),[D,b]=l.useState(null),k=t==="disconnected",y=l.useCallback(d=>{d&&r(p=>({...p,...d,maskedKey:d.maskedKey??(p==null?void 0:p.maskedKey),provider:d.provider??(p==null?void 0:p.provider)??"auto"}))},[]),_=l.useCallback(d=>{if(!d){r(null);return}r({...d,provider:d.provider??"auto"})},[]),R=l.useCallback(async()=>{try{return await ce()}catch{return null}},[]);l.useEffect(()=>{let d=!1;async function p(){try{const[v,H]=await Promise.all([$.get("/api/dashboard/settings").catch(()=>null),R()]);if(d)return;v&&c(v),H&&y(H)}catch{}finally{d||h(!1)}}return p(),()=>{d=!0}},[R,y]),l.useEffect(()=>{const d=new de;d.connect();const p=d.on("license",v=>{R().then(H=>{if(H){if((v==null?void 0:v.cleared)===!0){_(H);return}y(H)}})});return()=>{p(),d.disconnect()}},[R,y,_]);const C=l.useCallback((d,p)=>{b(d??p)},[]),w=l.useCallback(async d=>{if(k)return!1;if(!d.trim())return b("License key is required."),!1;L(!0);try{const p=await ue({licenseKey:d.trim()});return y(p.license),C(p.message,p.ok?"License updated.":"License activation failed."),p.ok}catch{return b("License activation failed."),!1}finally{L(!1)}},[C,k,y]),I=l.useCallback(async()=>{if(!k){L(!0);try{const d=await ge();y(d.license),C(d.message,d.ok?"License updated.":"License refresh failed.")}catch{b("License refresh failed.")}finally{L(!1)}}},[C,k,y]),E=l.useCallback(async()=>{if(!k){L(!0);try{const d=await pe();_(d.license),C(d.message,d.ok?"License reset.":"License reset failed.")}catch{b("License reset failed.")}finally{L(!1)}}},[C,k,_]),A=l.useCallback(async(d,p)=>{if(s){c(v=>v&&{...v,hot:{...v.hot,[d]:p}}),i(!0);try{await $.patch("/api/dashboard/settings",{[d]:p})}catch{c(v=>v&&{...v,hot:{...v.hot,[d]:s.hot[d]}})}finally{i(!1)}}},[s]);return{settings:s,license:S,saving:j,licenseControlsDisabled:k,licenseSubmitting:B,licenseMessage:D,activateLicense:w,refreshLicense:I,resetLicense:E,updateHotSetting:A,loading:m}}const Le="_card_1jlvt_4",Ce="_cardEmbedded_1jlvt_14",He="_cardTitle_1jlvt_21",ke="_usageRow_1jlvt_30",Re="_usageTotal_1jlvt_36",we="_usageBreakdown_1jlvt_42",Te="_usageCounts_1jlvt_47",Ee="_divider_1jlvt_53",Ae="_lastRunRow_1jlvt_60",Ie="_lastRunLabel_1jlvt_69",Be="_errorIcon_1jlvt_75",De="_tooltip_1jlvt_83",Pe="_cleanupRow_1jlvt_106",Me="_cleanupLabel_1jlvt_113",$e="_cleanupBtn_1jlvt_120",Ue="_cleanupBtnDanger_1jlvt_143",Oe="_retentionSection_1jlvt_155",ze="_retentionTitle_1jlvt_161",Fe="_retentionFieldset_1jlvt_170",Ge="_proOverlay_1jlvt_185",qe="_radioRow_1jlvt_197",We="_radioLabel_1jlvt_204",Ye="_presetGroup_1jlvt_224",Ke="_presetBtn_1jlvt_232",Ve="_presetBtnActive_1jlvt_249",Qe="_freeInput_1jlvt_256",Xe="_inputError_1jlvt_272",Je="_inputUnit_1jlvt_276",Ze="_cascadeRow_1jlvt_283",et="_retentionActions_1jlvt_302",tt="_saveBtn_1jlvt_308",st="_runNowBtn_1jlvt_330",at="_errorMsg_1jlvt_353",o={card:Le,cardEmbedded:Ce,cardTitle:He,usageRow:ke,usageTotal:Re,usageBreakdown:we,usageCounts:Te,divider:Ee,lastRunRow:Ae,lastRunLabel:Ie,errorIcon:Be,tooltip:De,cleanupRow:Pe,cleanupLabel:Me,cleanupBtn:$e,cleanupBtnDanger:Ue,retentionSection:Oe,retentionTitle:ze,retentionFieldset:Fe,proOverlay:Ge,radioRow:qe,radioLabel:We,presetGroup:Ye,presetBtn:Ke,presetBtnActive:Ve,freeInput:Qe,inputError:Xe,inputUnit:Je,cascadeRow:Ze,retentionActions:et,saveBtn:tt,runNowBtn:st,errorMsg:at};function it(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 se(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 nt(t,s){return t.mode===s.mode&&t.ageDays===s.ageDays&&t.sizeMb===s.sizeMb&&t.cascadeSnapshots===s.cascadeSnapshots}function F(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 ot({placeId:t,tier:s,currentPolicy:c,onSaved:S}){const{t:r}=Q(),{trackEvent:j}=ie(),[i,m]=l.useState(c),[h,B]=l.useState(()=>[7,14,30,90].includes(c.ageDays??-1)?"":String(c.ageDays??30)),[L,D]=l.useState(()=>[100,500,1e3].includes(c.sizeMb??-1)?"":String(c.sizeMb??500)),[b,k]=l.useState(null),[y,_]=l.useState(!1),[R,C]=l.useState(!1),[w,I]=l.useState(!1),[E,A]=l.useState(null);l.useEffect(()=>{m(c);const g=[7,14,30,90],T=[100,500,1e3];B(g.includes(c.ageDays??-1)?"":String(c.ageDays??30)),D(T.includes(c.sizeMb??-1)?"":String(c.sizeMb??500))},[c]);const d=s==="basic",p=se(i),v=nt(c,i),H=p&&!v&&!R,N=g=>{m(T=>{const z={...T,mode:g};return g==="age"&&(z.ageDays=parseInt(h,10)||30),g==="size"&&(z.sizeMb=parseInt(L,10)||500),z})},x=g=>{B(""),m(T=>({...T,ageDays:g}))},n=g=>{D(""),m(T=>({...T,sizeMb:g}))},P=g=>{B(g);const T=parseInt(g,10);Number.isNaN(T)||m(z=>({...z,ageDays:T}))},M=g=>{D(g);const T=parseInt(g,10);Number.isNaN(T)||m(z=>({...z,sizeMb:T}))},X=async()=>{if(A(null),j("dashboard_click_event",{click_target:"ui_studio_cleanup_save",page:"settings"}),it(c,i)){try{const g=await oe(t,{mode:i.mode,ageDays:i.ageDays,sizeMb:i.sizeMb,cascadeSnapshots:i.cascadeSnapshots});k(g.dryRun),_(!0)}catch(g){A(g.message)}return}await K()},K=async()=>{C(!0);try{await be(t,i),_(!1),S()}catch(g){throw A(g.message),g}finally{C(!1)}},J=async()=>{A(null),j("dashboard_click_event",{click_target:"ui_studio_cleanup_run_now",page:"settings"}),I(!0);try{await je(t),S()}catch(g){A(g.message)}finally{I(!1)}},Z=b?`${r("uiStudio.cleanup.policy.confirm.messageStrict","이 정책으로 즉시")} ${b.wouldRemoveRequests}${r("uiStudio.cleanup.policy.confirm.requests","건")} / ${b.wouldRemoveSnapshots}${r("uiStudio.cleanup.policy.confirm.snapshots","개 화면 캡처")} / ${F(b.wouldFreeBytes)} ${r("uiStudio.cleanup.policy.confirm.freed","가 삭제됩니다 — 적용?")}`:"",O=i.mode==="age"&&!se(i),ee=i.mode==="size"&&!se(i);return e.jsxs("div",{className:o.retentionSection,children:[e.jsx("h3",{className:o.retentionTitle,children:e.jsx(f,{label:r("uiStudio.cleanup.policy.title","자동 삭제 정책"),tooltip:r("uiStudio.cleanup.policy.title.tooltip","Rules that automatically remove old or large captures.")})}),e.jsxs("div",{style:{position:"relative"},children:[d&&e.jsx("div",{className:o.proOverlay,title:r("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능"),children:e.jsx("div",{className:o.tooltip,children:r("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능")})}),e.jsxs("fieldset",{className:o.retentionFieldset,disabled:d,style:d?{opacity:.45,pointerEvents:"none"}:void 0,children:[e.jsx("div",{className:o.radioRow,children:e.jsx(u,{text:r("uiStudio.cleanup.policy.modeOff.tooltip","Turn off auto-cleanup. Data stays until you remove it manually."),children:e.jsxs("label",{className:o.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"off",checked:i.mode==="off",onChange:()=>N("off")}),r("uiStudio.cleanup.policy.modeOff","사용 안 함 (off)")]})})}),e.jsxs("div",{children:[e.jsx("div",{className:o.radioRow,children:e.jsx(u,{text:r("uiStudio.cleanup.policy.modeAge.tooltip","Automatically delete data older than the configured number of days."),children:e.jsxs("label",{className:o.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"age",checked:i.mode==="age",onChange:()=>N("age")}),r("uiStudio.cleanup.policy.modeAge","기간 기반 (age)")]})})}),i.mode==="age"&&e.jsxs("div",{className:o.presetGroup,children:[[7,14,30,90].map(g=>e.jsx(u,{text:r("uiStudio.cleanup.policy.agePreset.tooltip","Delete data older than this many days."),children:e.jsxs("button",{type:"button",className:`${o.presetBtn} ${i.ageDays===g&&h===""?o.presetBtnActive:""}`,onClick:()=>x(g),children:[g,r("uiStudio.cleanup.policy.daysUnit","일")]})},g)),e.jsx(u,{text:r("uiStudio.cleanup.policy.ageInput.tooltip","Enter any value between 1 and 365 days."),children:e.jsx("input",{type:"number",className:`${o.freeInput} ${O?o.inputError:""}`,value:h,min:1,max:365,onChange:g=>P(g.target.value)})}),e.jsxs("span",{className:o.inputUnit,children:["1–365",r("uiStudio.cleanup.policy.daysUnit","일")]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:o.radioRow,children:e.jsx(u,{text:r("uiStudio.cleanup.policy.modeSize.tooltip","When total usage exceeds the limit, the oldest data is removed first."),children:e.jsxs("label",{className:o.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"size",checked:i.mode==="size",onChange:()=>N("size")}),r("uiStudio.cleanup.policy.modeSize","용량 기반 (size)")]})})}),i.mode==="size"&&e.jsxs("div",{className:o.presetGroup,children:[[100,500,1e3].map(g=>e.jsx(u,{text:r("uiStudio.cleanup.policy.sizePreset.tooltip","Keep total usage under this size."),children:e.jsxs("button",{type:"button",className:`${o.presetBtn} ${i.sizeMb===g&&L===""?o.presetBtnActive:""}`,onClick:()=>n(g),children:[g,r("uiStudio.cleanup.policy.mbUnit","MB")]})},g)),e.jsx(u,{text:r("uiStudio.cleanup.policy.sizeInput.tooltip","Enter any value between 50 MB and 10000 MB (10 GB)."),children:e.jsx("input",{type:"number",className:`${o.freeInput} ${ee?o.inputError:""}`,value:L,min:50,max:1e4,onChange:g=>M(g.target.value)})}),e.jsxs("span",{className:o.inputUnit,children:["50–10000",r("uiStudio.cleanup.policy.mbUnit","MB")]})]})]}),e.jsx(u,{text:r("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("input",{type:"checkbox",checked:i.cascadeSnapshots,onChange:g=>m(T=>({...T,cascadeSnapshots:g.target.checked}))}),r("uiStudio.cleanup.policy.cascade","연결된 화면 캡처도 함께 삭제")]})}),e.jsxs("div",{className:o.retentionActions,children:[e.jsx(u,{text:r("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 X(),disabled:!H,children:r("uiStudio.cleanup.policy.save","정책 저장")})}),e.jsx(u,{text:r("uiStudio.cleanup.policy.runNow.tooltip","Run the current rule once now, without waiting for the next scheduled run."),children:e.jsx("button",{type:"button",className:o.runNowBtn,onClick:()=>void J(),disabled:w,children:r("uiStudio.cleanup.policy.runNow","지금 정리")})})]}),E&&e.jsx("div",{className:o.errorMsg,children:E})]})]}),y&&b&&e.jsx(ne,{title:r("uiStudio.cleanup.policy.confirm.title","정책 적용 확인"),message:Z,danger:!0,confirmLabel:r("uiStudio.cleanup.policy.save","정책 저장"),busy:R,onConfirm:K,onClose:()=>_(!1)})]})}function lt({placeId:t,tier:s,onChanged:c,sampleUsage:S,sampleRetention:r,embedded:j=!1}){const{t:i}=Q(),m=s==="basic"&&S!=null&&r!=null,[h,B]=l.useState(m?S:null),[L,D]=l.useState(m?r:null),[b,k]=l.useState(null),[y,_]=l.useState(null),[R,C]=l.useState(null),w=l.useCallback(async()=>{if(!m&&t!=null){k(null);try{const[N,x]=await Promise.all([le(t),oe(t)]);B(N),D(x.policy)}catch(N){k(N.message)}}},[t,m]);l.useEffect(()=>{w()},[w]);const I=l.useCallback(()=>{w(),c==null||c()},[w,c]),E=l.useCallback(async()=>{if(y&&t!=null){C(null);try{y.kind==="keep7"?await V(t,{olderThanDays:7,alsoSnapshots:!0}):y.kind==="keep30"?await V(t,{olderThanDays:30,alsoSnapshots:!0}):await V(t,{all:!0,alsoSnapshots:!0}),_(null),w(),c==null||c()}catch(N){throw C(N.message),N}}},[y,t,w,c]);function A(N){const x=i("uiStudio.cleanup.studioPreservedNote","This deletes saved change records and screenshots on disk only; Roblox Studio instances are not affected.");return N.kind==="keep7"?`${i("uiStudio.cleanup.cleanupConfirmMessage.keep7","7일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${x}`:N.kind==="keep30"?`${i("uiStudio.cleanup.cleanupConfirmMessage.keep30","30일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${x}`:`${((h==null?void 0:h.requestCount)??0)+((h==null?void 0:h.snapshotCount)??0)}${i("uiStudio.cleanup.cleanupConfirmMessage.all","개의 저장된 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${x}`}if(t==null&&!m)return null;if(b)return e.jsx("div",{className:`${o.card} ${j?o.cardEmbedded:""}`,children:e.jsx("p",{className:o.errorMsg,children:b})});if(!h||!L)return e.jsx("div",{className:`${o.card} ${j?o.cardEmbedded:""}`,children:e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",margin:0},children:i("uiStudio.storage.loading","로딩 중...")})});const d=L.lastRunAt,p=L.lastRunStats,v=d?new Date(d).toLocaleString():null,H=t??0;return e.jsxs("div",{className:`${o.card} ${j?o.cardEmbedded:""}`,children:[e.jsx("h3",{className:o.cardTitle,children:e.jsx(f,{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.usageRow,children:[e.jsx(u,{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","사용 중")," ",F(h.totalBytes)]})}),e.jsxs("div",{className:o.usageBreakdown,children:[e.jsx(u,{text:i("uiStudio.storage.historyBytes.tooltip","Space taken by change record data (JSON)."),children:e.jsxs("span",{children:[i("uiStudio.storage.historyBytes","변경 이력")," ",F(h.historyBytes)]})})," · ",e.jsx(u,{text:i("uiStudio.storage.snapshotBytes.tooltip","Space taken by captured PNG image files."),children:e.jsxs("span",{children:[i("uiStudio.storage.snapshotBytes","화면 캡처")," ",F(h.snapshotBytes)]})})]}),e.jsxs("div",{className:o.usageCounts,children:[e.jsx(u,{text:i("uiStudio.storage.requestCount.tooltip","Number of actions where AI changed the UI."),children:e.jsxs("span",{children:[i("uiStudio.storage.requestCount","변경 기록")," ",h.requestCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(u,{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","변경 상세")," ",h.mutationCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(u,{text:i("uiStudio.storage.snapshotCount.tooltip","Number of saved capture image files."),children:e.jsxs("span",{children:[i("uiStudio.storage.snapshotCount","화면 캡처")," ",h.snapshotCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})]})]}),e.jsx("hr",{className:o.divider}),e.jsx(ot,{placeId:H,tier:s,currentPolicy:L,onSaved:I}),e.jsx("hr",{className:o.divider}),e.jsxs("div",{className:o.lastRunRow,children:[e.jsx("span",{className:o.lastRunLabel,children:e.jsx(f,{label:i("uiStudio.storage.lastRun","마지막 자동 정리"),tooltip:i("uiStudio.storage.lastRun.tooltip","When the auto-cleanup policy last ran, and what it removed.")})}),v?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:v}),p&&e.jsxs("span",{children:["· ",i("uiStudio.storage.requestCount","변경 기록")," ",p.removedRequests,i("uiStudio.storage.countSuffix","개")," / ",i("uiStudio.storage.snapshotCount","화면 캡처")," ",p.removedSnapshots,i("uiStudio.storage.countSuffix","개")," / ",F(p.freedBytes)," ",i("uiStudio.storage.lastRunFreed","회수")]}),p&&p.errors>0&&e.jsxs("span",{className:o.errorIcon,title:`${i("uiStudio.storage.lastRunErrors","오류")} ${p.errors}건`,children:["⚠",e.jsxs("span",{className:o.tooltip,children:[i("uiStudio.storage.lastRunErrors","오류")," ",p.errors,i("uiStudio.storage.countSuffix","건")]})]})]}):e.jsx("span",{children:i("uiStudio.storage.lastRunNever","—")})]}),e.jsx("hr",{className:o.divider}),e.jsxs("div",{className:o.cleanupRow,children:[e.jsx("span",{className:o.cleanupLabel,children:e.jsx(f,{label:i("uiStudio.cleanup.label","수동 정리"),tooltip:i("uiStudio.cleanup.label.tooltip","Manually clean up change records and captures whenever you want.")})}),e.jsx(u,{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:()=>_({kind:"keep7"}),disabled:s==="basic",children:i("uiStudio.cleanup.keepLastNDays","최근 7일만 남기기").replace("{n}","7")})}),e.jsx(u,{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:()=>_({kind:"keep30"}),disabled:s==="basic",children:i("uiStudio.cleanup.keepLastNDays","최근 30일만 남기기").replace("{n}","30")})}),e.jsx(u,{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:()=>_({kind:"all"}),disabled:s==="basic",children:i("uiStudio.cleanup.deleteAll","전체 삭제…")})})]}),R&&e.jsx("div",{className:o.errorMsg,children:R}),y&&e.jsx(ne,{title:i("uiStudio.cleanup.cleanupConfirmTitle","정리 확인"),message:A(y),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:E,onClose:()=>{_(null),C(null)}})]})}const rt="_page_199y1_2",ct="_card_199y1_10",dt="_licenseCardTarget_199y1_26",ut="_licenseCardPro_199y1_31",gt="_cardHeader_199y1_42",pt="_cardHeaderActions_199y1_55",ht="_collapseButton_199y1_61",yt="_headerBadge_199y1_83",mt="_headerBadgeLive_199y1_94",vt="_licenseGrid_199y1_100",_t="_statusDot_199y1_118",xt="_statusActive_199y1_127",ft="_statusGrace_199y1_132",jt="_statusInactive_199y1_137",bt="_statusError_199y1_141",St="_proBadge_199y1_146",Nt="_upgradeLink_199y1_160",Lt="_licenseControls_199y1_174",Ct="_licenseControlRow_199y1_183",Ht="_licenseField_199y1_190",kt="_licenseFieldGrow_199y1_196",Rt="_controlLabel_199y1_201",wt="_textInput_199y1_207",Tt="_actionBtn_199y1_223",Et="_licenseMessage_199y1_245",At="_licenseNotice_199y1_252",It="_licenseNoticeInfo_199y1_262",Bt="_licenseNoticeWarning_199y1_268",Dt="_licenseNoticeMuted_199y1_274",Pt="_settingRow_199y1_280",Mt="_settingLabel_199y1_294",$t="_settingControl_199y1_301",Ut="_select_199y1_310",Ot="_numberInput_199y1_328",zt="_toggleSwitch_199y1_346",Ft="_toggleInput_199y1_353",Gt="_toggleTrack_199y1_361",qt="_toggleThumb_199y1_383",Wt="_savedIndicator_199y1_432",Yt="_savedIndicatorHidden_199y1_443",Kt="_dataHistoryIntro_199y1_448",Vt="_dataHistoryList_199y1_456",Qt="_dataHistoryRow_199y1_462",Xt="_dataHistoryDetail_199y1_471",Jt="_uiStudioDataHistoryRow_199y1_476",Zt="_uiStudioDataHistoryDetail_199y1_481",es="_dataHistoryMain_199y1_488",ts="_dataHistoryTitle_199y1_492",ss="_dataHistoryDescription_199y1_498",as="_dataHistoryMetric_199y1_506",is="_dataHistoryActions_199y1_513",ns="_linkButton_199y1_519",os="_dangerButton_199y1_520",ls="_inlineStatus_199y1_556",rs="_coldGrid_199y1_564",cs="_coldHint_199y1_582",ds="_langRow_199y1_591",us="_loading_199y1_604",gs="_unit_199y1_613",a={page:rt,card:ct,licenseCardTarget:dt,licenseCardPro:ut,cardHeader:gt,cardHeaderActions:pt,collapseButton:ht,headerBadge:yt,headerBadgeLive:mt,licenseGrid:vt,statusDot:_t,statusActive:xt,statusGrace:ft,statusInactive:jt,statusError:bt,proBadge:St,upgradeLink:Nt,licenseControls:Lt,licenseControlRow:Ct,licenseField:Ht,licenseFieldGrow:kt,controlLabel:Rt,textInput:wt,actionBtn:Tt,licenseMessage:Et,licenseNotice:At,licenseNoticeInfo:It,licenseNoticeWarning:Bt,licenseNoticeMuted:Dt,settingRow:Pt,settingLabel:Mt,settingControl:$t,select:Ut,numberInput:Ot,toggleSwitch:zt,toggleInput:Ft,toggleTrack:Gt,toggleThumb:qt,savedIndicator:Wt,savedIndicatorHidden:Yt,dataHistoryIntro:Kt,dataHistoryList:Vt,dataHistoryRow:Qt,dataHistoryDetail:Xt,uiStudioDataHistoryRow:Jt,uiStudioDataHistoryDetail:Zt,dataHistoryMain:es,dataHistoryTitle:ts,dataHistoryDescription:ss,dataHistoryMetric:as,dataHistoryActions:is,linkButton:ns,dangerButton:os,inlineStatus:ls,coldGrid:rs,coldHint:cs,langRow:ds,loading:us,unit:gs},ps={toolsActivity:null,toolStats:null,toolSessions:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null},hs={toolsActivity:null,toolStats:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null};function ys(t){var s;return t?t.pluginConnected?t.activePlaceId:t.lastActivePlaceId??((s=t.places[0])==null?void 0:s.placeId)??null:null}async function U(t){try{return await t}catch{return null}}function W(t){return t?typeof t.total=="number"?t.total:Array.isArray(t.entries)?t.entries.length:null:null}function Y(t,s,c,S){return s===null?t("settings.dataHistory.metric.unavailable","Unavailable"):`${s.toLocaleString()} ${t(c,S)}`}function G(t,s,c){const S=c===null?t("settings.dataHistory.metric.sizeUnavailable","size unavailable"):F(c);return`${s} · ${S}`}function q(t,s){var S;const c=(S=t==null?void 0:t[s])==null?void 0:S.bytes;return typeof c=="number"&&Number.isFinite(c)?c:null}function ms(t,s){return s?[`${s.requestCount.toLocaleString()} ${t("uiStudio.storage.requestCount","change records")}`,`${s.snapshotCount.toLocaleString()} ${t("uiStudio.storage.snapshotCount","screenshots")}`,F(s.totalBytes)].join(" · "):t("settings.dataHistory.metric.unavailable","Unavailable")}function vs({tier:t}){const{t:s}=Q(),[c,S]=l.useState(ps),[r,j]=l.useState(hs),[i,m]=l.useState(t==="basic"?te:null),[h,B]=l.useState(null),[L,D]=l.useState(!0),[b,k]=l.useState(!0),[y,_]=l.useState(null),[R,C]=l.useState(!1),[w,I]=l.useState(null),E=l.useCallback(async()=>{D(!0);const x=await U(he()),n=ys(x);B(n);const[P,M,X,K,J,Z,O]=await Promise.all([U($.get("/api/dashboard/history",{limit:"1",offset:"0"})),U($.get("/api/dashboard/tool-stats")),U($.get("/sync/history",{limit:"1",offset:"0"})),U($.get("/api/dashboard/playtest/history")),U($.get("/api/dashboard/changelog",{limit:"1",offset:"0"})),U($.get("/api/dashboard/connection-log")),U($.get("/api/dashboard/storage-summary"))]),ee=t==="basic"?te:n===null?null:await U(le(n));S({toolsActivity:W(P),toolStats:(M==null?void 0:M.totalCalls)??null,toolSessions:(M==null?void 0:M.totalSessions)??null,syncLog:W(X),playtestReports:W(K),projectChanges:W(J),connectionLog:W(Z)}),j({toolsActivity:q(O,"toolsActivity"),toolStats:q(O,"toolStats"),syncLog:q(O,"syncLog"),playtestReports:q(O,"playtestReports"),projectChanges:q(O,"projectChanges"),connectionLog:q(O,"connectionLog")}),m(ee),D(!1)},[t]);l.useEffect(()=>{E()},[E]);const A=l.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:G(s,Y(s,c.toolsActivity,"settings.dataHistory.metric.records","records"),r.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:G(s,c.toolStats===null?s("settings.dataHistory.metric.unavailable","Unavailable"):`${c.toolStats.toLocaleString()} ${s("settings.dataHistory.metric.runs","runs")} · ${(c.toolSessions??0).toLocaleString()} ${s("settings.dataHistory.metric.sessions","sessions")}`,r.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:G(s,Y(s,c.syncLog,"settings.dataHistory.metric.records","records"),r.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:G(s,Y(s,c.playtestReports,"settings.dataHistory.metric.reports","reports"),r.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:G(s,Y(s,c.projectChanges,"settings.dataHistory.metric.records","records"),r.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:G(s,Y(s,c.connectionLog,"settings.dataHistory.metric.records","records"),r.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"}],[c,r,s]),d=async()=>{if(y){C(!0),I(null);try{if(y.kind==="uiStudio"){if(t!=="pro"||h===null)throw new Error("UI Studio place is unavailable");await V(h,{all:!0,alsoSnapshots:!0}),I(s("settings.dataHistory.uiStudio.clear.success","UI Studio saved data cleared."))}else await $.post(y.row.clearEndpoint),I(s("settings.dataHistory.clear.success","Saved data cleared."));_(null),await E()}catch{I(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{C(!1)}}},p=t==="pro"?h:0,v=t==="pro"&&h!==null,H=(y==null?void 0:y.kind)==="uiStudio",N=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(f,{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(u,{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:L?s("common.loading","Loading"):s("settings.dataHistory.scope","Current project")})}),e.jsx(u,{text:s("settings.dataHistory.toggle.tooltip","Collapse or expand this section."),children:e.jsx("button",{className:a.collapseButton,type:"button","aria-expanded":b,"aria-controls":"settings-data-history-body","aria-label":b?s("settings.dataHistory.collapse","Collapse {title}").replace("{title}",N):s("settings.dataHistory.expand","Expand {title}").replace("{title}",N),onClick:()=>k(x=>!x),children:b?"▾":"▸"})})]})]}),b&&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:[A.map(x=>e.jsxs("div",{className:a.dataHistoryRow,children:[e.jsxs("div",{className:a.dataHistoryMain,children:[e.jsx("div",{className:a.dataHistoryTitle,children:x.title}),e.jsx("div",{className:a.dataHistoryDescription,children:x.description})]}),e.jsx(u,{text:x.metricTooltip,children:e.jsx("div",{className:a.dataHistoryMetric,children:x.metric})}),e.jsxs("div",{className:a.dataHistoryActions,children:[e.jsx(u,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:a.linkButton,href:`#${x.route}`,children:s("settings.dataHistory.open","Open")})}),e.jsx(u,{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",onClick:()=>_({kind:"row",row:x}),children:s("common.clear","Clear")})})]})]},x.key)),e.jsxs("div",{className:`${a.dataHistoryRow} ${a.uiStudioDataHistoryRow}`,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(u,{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:ms(s,i)})}),e.jsxs("div",{className:a.dataHistoryActions,children:[e.jsx(u,{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(u,{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:!v,onClick:()=>_({kind:"uiStudio"}),children:s("common.clear","Clear")})})]})]}),e.jsx("div",{className:`${a.dataHistoryDetail} ${a.uiStudioDataHistoryDetail}`,children:e.jsx(lt,{placeId:p,tier:t,onChanged:E,embedded:!0,...t==="basic"?{sampleUsage:te,sampleRetention:Se}:{}})})]}),w&&e.jsx("p",{className:a.inlineStatus,children:w})]})]}),e.jsx(fe,{open:y!==null,title:H?s("settings.dataHistory.uiStudio.clear.title","Clear UI Studio saved data?"):s("settings.dataHistory.clear.title","Clear saved data?"),message:H?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."):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:s("common.clear","Clear"),loading:R,onCancel:()=>!R&&_(null),onConfirm:()=>void d()})]})}const _s={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch","fr-fr":"Français"},xs=["debug","info","warn","error"];function fs(t){return t==="active"?a.statusActive:t==="grace"?a.statusGrace:t==="invalid"||t==="revoked"?a.statusError:a.statusInactive}function js(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 ae({checked:t,onChange:s,testId:c,ariaLabel:S}){return e.jsxs("label",{className:a.toggleSwitch,"data-testid":c,children:[e.jsx("input",{type:"checkbox",className:a.toggleInput,checked:t,"aria-label":S,onChange:r=>s(r.target.checked)}),e.jsx("span",{className:a.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:a.toggleThumb})})]})}function ks(){const{t,selectedLocale:s,setLocale:c}=Q(),{trackEvent:S}=ie(),{search:r}=ye(),{settings:j,license:i,licenseControlsDisabled:m,licenseSubmitting:h,licenseMessage:B,activateLicense:L,refreshLicense:D,resetLicense:b,updateHotSetting:k,loading:y}=Ne(),[_,R]=l.useState(null),[C,w]=l.useState(""),I=i?js(i,t):null,E=(i==null?void 0:i.tier)==="pro",A=(i==null?void 0:i.tier)==="pro"?i.maskedKey:void 0,d=i!=null&&i.provider&&i.provider!=="auto"?i.provider:void 0,p=(i==null?void 0:i.tier)==="pro"?"pro":"basic",v=l.useRef(null),H=l.useRef(null),N=l.useMemo(()=>new URLSearchParams(r).get("section")==="license",[r]),x=l.useCallback(async(n,P)=>{await k(n,P),R(n),setTimeout(()=>R(M=>M===n?null:M),2e3)},[k]);return l.useEffect(()=>{var P;if(!N||y)return;const n=v.current;if((P=n==null?void 0:n.scrollIntoView)==null||P.call(n,{block:"start",behavior:"smooth"}),H.current&&!H.current.disabled){H.current.focus();return}n==null||n.focus()},[y,m,h,N]),y?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(xe,{title:t("page.settings.title","Settings"),description:t("page.settings.description","Manage license, live settings, saved data, server environment, and language."),helpTopicId:"settings",helpState:{tier:p}}),e.jsxs("div",{id:"settings-license",ref:v,tabIndex:-1,"data-testid":"settings-license-card",className:[a.card,N?a.licenseCardTarget:"",(i==null?void 0:i.tier)==="pro"?a.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(f,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(u,{text:m?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} ${m?"":a.headerBadgeLive}`,children:m?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[i?e.jsxs(e.Fragment,{children:[(()=>{const n=I;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:a.licenseGrid,children:[e.jsx("dt",{children:e.jsx(f,{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} ${fs(i.status)}`}),e.jsx(u,{text:(n==null?void 0:n.tooltip)??t(`settings.license.${i.status}.tooltip`,"Current license activation state."),children:(n==null?void 0:n.label)??t(`settings.license.${i.status}`,i.status)})]}),e.jsx("dt",{children:e.jsx(f,{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(u,{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")})}),A&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(f,{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(u,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:A})})]}),d&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(f,{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(u,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:d})})]})]}),(n==null?void 0:n.detail)&&e.jsx("p",{className:`${a.licenseNotice} ${n.detailTone}`,children:i.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):n.detail}),i.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${a.licenseNotice} ${a.licenseNoticeMuted}`,children:n==null?void 0:n.detail})]})})(),i.tier==="basic"&&e.jsx(u,{text:t("tier.upgrade.tooltip","View Pro features and purchase options."),children:e.jsx("a",{className:a.upgradeLink,href:me.settingsLicense,target:"_blank",rel:"noopener noreferrer",onClick:()=>S("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(u,{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:m||h||!E,onClick:()=>{D()},children:h?t("common.loading"):t("settings.license.refresh","Refresh License")})}),e.jsx(u,{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:m||h||!E,onClick:()=>{b()},children:h?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(f,{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:H,"aria-label":t("settings.license.keyInput","License Key"),className:a.textInput,type:"text",value:C,disabled:m||h,onChange:n=>w(n.target.value)})]}),e.jsx(u,{text:t("settings.license.activate.tooltip","Activate Pro features with the entered license key."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:m||h,onClick:()=>{(async()=>await L(C)&&w(""))()},children:h?t("common.loading"):t("settings.license.activate","Activate License")})})]}),B&&e.jsx("p",{className:a.licenseMessage,children:B})]})]})]}),e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(f,{label:t("settings.general.title","General Settings"),tooltip:t("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(u,{text:t("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${a.headerBadge} ${a.headerBadgeLive}`,children:t("settings.general.liveApply","Live Apply")})})]}),j?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(f,{label:t("settings.general.logLevel","Log Level"),tooltip:t("settings.general.logLevel.tooltip","Sets how much detail WEPPY Dashboard writes to its logs.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("select",{className:a.select,value:j.hot.LOG_LEVEL,onChange:n=>x("LOG_LEVEL",n.target.value),children:xs.map(n=>e.jsx("option",{value:n,children:n},n))}),_==="LOG_LEVEL"&&e.jsx("span",{className:a.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(f,{label:t("settings.general.localHistory","Tool History Recording"),tooltip:t("settings.general.localHistory.tooltip","Stores local tool execution history for the WEPPY Dashboard history views.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("span",{className:`${a.savedIndicator} ${_==="ENABLE_LOCAL_HISTORY"?"":a.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(ae,{checked:j.hot.ENABLE_LOCAL_HISTORY,ariaLabel:t("settings.general.localHistory","Tool History Recording"),testId:"settings-toggle-enable-local-history",onChange:n=>x("ENABLE_LOCAL_HISTORY",n)})]})]}),e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(f,{label:t("settings.general.localStatistics","Tool Statistics Collection"),tooltip:t("settings.general.localStatistics.tooltip","Aggregates local usage statistics for WEPPY Dashboard reporting.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("span",{className:`${a.savedIndicator} ${_==="ENABLE_LOCAL_STATISTICS"?"":a.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(ae,{checked:j.hot.ENABLE_LOCAL_STATISTICS,ariaLabel:t("settings.general.localStatistics","Tool Statistics Collection"),testId:"settings-toggle-enable-local-statistics",onChange:n=>x("ENABLE_LOCAL_STATISTICS",n)})]})]}),e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(f,{label:t("settings.general.contextCapture","Context Capture"),tooltip:t("settings.general.contextCapture.tooltip","When enabled, WEPPY Dashboard records structured execution context for changelog and playtest views.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("span",{className:`${a.savedIndicator} ${_==="ENABLE_CONTEXT_CAPTURE"?"":a.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(ae,{checked:j.hot.ENABLE_CONTEXT_CAPTURE,ariaLabel:t("settings.general.contextCapture","Context Capture"),testId:"settings-toggle-enable-context-capture",onChange:n=>x("ENABLE_CONTEXT_CAPTURE",n)})]})]}),e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(f,{label:t("settings.general.requestTimeout","Action Timeout"),tooltip:t("settings.general.requestTimeout.tooltip","Maximum time WEPPY Dashboard waits for an action before it fails.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("input",{type:"number",className:a.numberInput,value:j.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:n=>{const P=parseInt(n.target.value,10);isNaN(P)||x("REQUEST_TIMEOUT",P)}}),e.jsx(u,{text:t("settings.general.requestTimeout.unit.tooltip","Action timeout is measured in milliseconds."),children:e.jsx("span",{className:a.unit,children:t("settings.general.requestTimeout.unit","ms")})}),_==="REQUEST_TIMEOUT"&&e.jsx("span",{className:a.savedIndicator,children:t("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:a.loading,children:t("settings.unavailable")})]}),e.jsx(vs,{tier:p}),e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(f,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(u,{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")})})]}),j?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:a.coldGrid,children:[e.jsx("dt",{children:e.jsx(f,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:j.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(f,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:j.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(f,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether WEPPY Dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WEPPY Dashboard in a browser."),children:String(j.cold.DASHBOARD_AUTO_OPEN)})})]}),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(f,{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(f,{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(u,{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:n=>c(n.target.value),children:[e.jsx("option",{value:ve,children:t("settings.language.auto","Auto")}),_e.map(n=>e.jsx("option",{value:n,children:_s[n]??n},n))]})})]})]})]})}export{ks as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._card_1jlvt_4{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:16px 20px;display:flex;flex-direction:column;gap:14px}._cardEmbedded_1jlvt_14{border:none;border-radius:0;background:transparent;padding:14px 0 0}._cardTitle_1jlvt_21{margin:0;font-size:13px;font-weight:600;color:var(--text-primary);letter-spacing:.02em}._usageRow_1jlvt_30{display:flex;flex-direction:column;gap:4px}._usageTotal_1jlvt_36{font-size:13px;font-weight:600;color:var(--text-primary)}._usageBreakdown_1jlvt_42{font-size:12px;color:var(--text-muted)}._usageCounts_1jlvt_47{font-size:12px;color:var(--text-secondary)}._divider_1jlvt_53{border:none;border-top:1px solid var(--border);margin:0}._lastRunRow_1jlvt_60{font-size:12px;color:var(--text-secondary);display:flex;align-items:center;gap:6px;flex-wrap:wrap}._lastRunLabel_1jlvt_69{color:var(--text-muted);font-weight:500;white-space:nowrap}._errorIcon_1jlvt_75{color:var(--error-text);cursor:help;font-size:13px;line-height:1;position:relative}._errorIcon_1jlvt_75:hover ._tooltip_1jlvt_83{display:block}._tooltip_1jlvt_83{display:none;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--bg-secondary);border:1px solid var(--border);border-radius:4px;padding:4px 8px;font-size:11px;color:var(--error-text);white-space:nowrap;z-index:10;pointer-events:none;box-shadow:0 2px 8px #0003}._cleanupRow_1jlvt_106{display:flex;flex-wrap:wrap;gap:8px;align-items:center}._cleanupLabel_1jlvt_113{font-size:12px;color:var(--text-muted);font-weight:500;white-space:nowrap}._cleanupBtn_1jlvt_120{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;cursor:pointer;white-space:nowrap;transition:border-color var(--transition),color var(--transition)}._cleanupBtn_1jlvt_120:hover:not(:disabled){border-color:var(--accent);color:var(--text-primary)}._cleanupBtn_1jlvt_120:disabled{opacity:.45;cursor:not-allowed}._cleanupBtnDanger_1jlvt_143{border-color:var(--error-border, rgba(224, 85, 85, .4));color:var(--error-text)}._cleanupBtnDanger_1jlvt_143:hover:not(:disabled){border-color:var(--error-text);background:var(--error-bg, rgba(224, 85, 85, .08));color:var(--error-text)}._retentionSection_1jlvt_155{display:flex;flex-direction:column;gap:10px}._retentionTitle_1jlvt_161{margin:0;font-size:12px;font-weight:600;color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase}._retentionFieldset_1jlvt_170{display:flex;flex-direction:column;gap:10px;border:none;margin:0;padding:0;position:relative}._retentionFieldset_1jlvt_170[disabled]{opacity:.5;pointer-events:none}._proOverlay_1jlvt_185{position:absolute;top:0;right:0;bottom:0;left:0;cursor:not-allowed;z-index:1}._proOverlay_1jlvt_185:hover ._tooltip_1jlvt_83{display:block}._radioRow_1jlvt_197{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._radioLabel_1jlvt_204{display:flex;align-items:center;gap:5px;font-size:13px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}._radioLabel_1jlvt_204 input[type=radio]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent);flex-shrink:0}._presetGroup_1jlvt_224{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-left:20px}._presetBtn_1jlvt_232{padding:3px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;cursor:pointer;transition:border-color var(--transition),background var(--transition)}._presetBtn_1jlvt_232:hover{border-color:var(--accent);color:var(--text-primary)}._presetBtnActive_1jlvt_249{border-color:var(--accent);background:var(--accent-dim);color:var(--accent);font-weight:600}._freeInput_1jlvt_256{width:72px;font-size:12px;padding:3px 7px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);font-family:inherit}._freeInput_1jlvt_256:focus{outline:none;border-color:var(--accent)}._freeInput_1jlvt_256._inputError_1jlvt_272{border-color:var(--error-text)}._inputUnit_1jlvt_276{font-size:11px;color:var(--text-muted);white-space:nowrap}._cascadeRow_1jlvt_283{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none}._cascadeRow_1jlvt_283 input[type=checkbox]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent);flex-shrink:0}._retentionActions_1jlvt_302{display:flex;gap:8px;flex-wrap:wrap}._saveBtn_1jlvt_308{padding:6px 14px;border-radius:5px;border:1px solid transparent;background:var(--accent);color:var(--bg-card);font-family:var(--font-label);font-size:12px;font-weight:600;cursor:pointer;transition:opacity var(--transition)}._saveBtn_1jlvt_308:hover:not(:disabled){opacity:.88}._saveBtn_1jlvt_308:disabled{opacity:.45;cursor:not-allowed}._runNowBtn_1jlvt_330{padding:6px 14px;border-radius:5px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition)}._runNowBtn_1jlvt_330:hover:not(:disabled){border-color:var(--accent);color:var(--text-primary)}._runNowBtn_1jlvt_330:disabled{opacity:.45;cursor:not-allowed}._errorMsg_1jlvt_353{font-size:12px;color:var(--error-text);padding:4px 0}._page_199y1_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_199y1_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._card_199y1_10:focus{outline:none}._card_199y1_10:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 68%,white 8%);outline-offset:3px}._licenseCardTarget_199y1_26{scroll-margin-top:18px;box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 24%,transparent)}._licenseCardPro_199y1_31{border-color:var(--pro-border);background:linear-gradient(180deg,var(--pro-bg-soft),transparent 28%),var(--bg-card);box-shadow:inset 0 1px #f3d46b2e,0 0 0 1px #8f6f1f24}._cardHeader_199y1_42{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}._cardHeaderActions_199y1_55{display:flex;align-items:center;gap:8px}._collapseButton_199y1_61{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-secondary);font-size:12px;line-height:1;cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition)}._collapseButton_199y1_61:hover{border-color:var(--accent);color:var(--text-primary)}._headerBadge_199y1_83{font-size:10px;font-weight:400;padding:2px 8px;border-radius:4px;border:1px solid var(--border);color:var(--text-muted);text-transform:none;letter-spacing:0}._headerBadgeLive_199y1_94{color:var(--success);border-color:var(--success)}._licenseGrid_199y1_100{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-family:var(--font-code);font-size:13px}._licenseGrid_199y1_100 dt{color:var(--text-muted)}._licenseGrid_199y1_100 dd{color:var(--text-primary);margin:0}._statusDot_199y1_118{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:middle}._statusActive_199y1_127{background:var(--success);box-shadow:0 0 4px var(--success)}._statusGrace_199y1_132{background:var(--warning);box-shadow:0 0 4px color-mix(in srgb,var(--warning) 70%,transparent)}._statusInactive_199y1_137{background:var(--text-muted)}._statusError_199y1_141{background:var(--error)}._proBadge_199y1_146{color:var(--pro-badge);font-weight:500}._licenseCardPro_199y1_31 ._cardHeader_199y1_42 span:first-child{color:var(--pro-text)}._licenseCardPro_199y1_31 ._licenseGrid_199y1_100 dt{color:var(--pro-badge)}._upgradeLink_199y1_160{display:inline-block;margin-top:8px;font-family:var(--font-label);font-size:12px;color:var(--accent);cursor:pointer;text-decoration:underline}._upgradeLink_199y1_160:hover{opacity:.8}._licenseControls_199y1_174{display:flex;flex-direction:column;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}._licenseControlRow_199y1_183{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}._licenseField_199y1_190{display:flex;flex-direction:column;gap:6px}._licenseFieldGrow_199y1_196{flex:1;min-width:220px}._controlLabel_199y1_201{font-family:var(--font-label);font-size:12px;color:var(--text-primary)}._textInput_199y1_207{font-family:var(--font-code);font-size:12px;padding:6px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);outline:none;transition:border-color var(--transition)}._textInput_199y1_207:focus{border-color:var(--accent)}._actionBtn_199y1_223{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--accent);background:transparent;color:var(--accent);cursor:pointer;transition:background var(--transition),color var(--transition),opacity var(--transition)}._actionBtn_199y1_223:hover{background:var(--accent);color:var(--bg-primary)}._actionBtn_199y1_223:disabled{opacity:.5;cursor:not-allowed}._licenseMessage_199y1_245{margin:0;font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._licenseNotice_199y1_252{margin:12px 0 0;padding:10px 12px;border-radius:8px;border:1px solid var(--border);font-family:var(--font-label);font-size:12px;line-height:1.5}._licenseNoticeInfo_199y1_262{color:var(--text-primary);background:color-mix(in srgb,var(--accent) 8%,transparent);border-color:color-mix(in srgb,var(--accent) 28%,var(--border))}._licenseNoticeWarning_199y1_268{color:var(--text-primary);background:color-mix(in srgb,var(--warning) 12%,transparent);border-color:color-mix(in srgb,var(--warning) 34%,var(--border))}._licenseNoticeMuted_199y1_274{color:var(--text-secondary);background:var(--bg-secondary)}._settingRow_199y1_280{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}._settingRow_199y1_280:last-child{border-bottom:none}._settingLabel_199y1_294{font-family:var(--font-label);color:var(--text-primary);flex:1}._settingControl_199y1_301{display:flex;align-items:center;gap:8px;justify-content:flex-end;min-width:112px}._select_199y1_310{font-family:var(--font-code);font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;outline:none;transition:border-color var(--transition)}._select_199y1_310:focus{border-color:var(--accent)}._numberInput_199y1_328{font-family:var(--font-code);font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);width:80px;outline:none;transition:border-color var(--transition)}._numberInput_199y1_328:focus{border-color:var(--accent)}._toggleSwitch_199y1_346{position:relative;display:inline-flex;align-items:center;cursor:pointer}._toggleInput_199y1_353{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}._toggleTrack_199y1_361{position:relative;display:inline-flex;align-items:center;width:46px;height:28px;padding:3px;border-radius:999px;border:1px solid color-mix(in srgb,var(--border) 82%,transparent);background:linear-gradient(180deg,#ffffff08,#fff0),color-mix(in srgb,var(--bg-secondary) 88%,#0b1220 12%);box-shadow:inset 0 1px #ffffff0d,inset 0 0 0 1px #070a122e;transition:background var(--transition),border-color var(--transition),box-shadow var(--transition),transform var(--transition)}._toggleThumb_199y1_383{width:20px;height:20px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#ffffffd1,#ffffff14 45%),linear-gradient(180deg,#f7fbff,#c8d4ea);box-shadow:0 4px 10px #00000047,inset 0 1px #ffffffa6;transform:translate(0);transition:transform var(--transition),background var(--transition),box-shadow var(--transition)}._toggleInput_199y1_353:focus-visible+._toggleTrack_199y1_361{border-color:color-mix(in srgb,var(--accent) 70%,white 8%);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 24%,transparent),inset 0 1px #ffffff0d}._toggleInput_199y1_353:checked+._toggleTrack_199y1_361{border-color:color-mix(in srgb,var(--accent) 62%,white 6%);background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 36%,white 4%),color-mix(in srgb,var(--accent) 78%,#1b2640 22%)),var(--accent);box-shadow:inset 0 1px #ffffff29,0 0 16px color-mix(in srgb,var(--accent) 22%,transparent)}._toggleInput_199y1_353:checked+._toggleTrack_199y1_361 ._toggleThumb_199y1_383{transform:translate(18px);background:radial-gradient(circle at 30% 30%,#ffffffeb,#ffffff1f 42%),linear-gradient(180deg,#fff,#d8e5ff)}._toggleSwitch_199y1_346:hover ._toggleTrack_199y1_361{border-color:color-mix(in srgb,var(--accent) 38%,var(--border))}._toggleSwitch_199y1_346:hover ._toggleInput_199y1_353:checked+._toggleTrack_199y1_361{box-shadow:inset 0 1px #ffffff29,0 0 20px color-mix(in srgb,var(--accent) 28%,transparent)}._savedIndicator_199y1_432{font-family:var(--font-code);font-size:11px;color:var(--success);opacity:1;min-width:56px;text-align:right;white-space:nowrap;transition:opacity .3s ease}._savedIndicatorHidden_199y1_443{opacity:0}._dataHistoryIntro_199y1_448{margin:0 0 12px;font-family:var(--font-label);font-size:12px;line-height:1.5;color:var(--text-secondary)}._dataHistoryList_199y1_456{display:flex;flex-direction:column;border-top:1px solid var(--border)}._dataHistoryRow_199y1_462{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--border)}._dataHistoryDetail_199y1_471{padding:0 0 14px;border-bottom:1px solid var(--border)}._uiStudioDataHistoryRow_199y1_476{border-bottom:none;padding-bottom:10px}._uiStudioDataHistoryDetail_199y1_481{margin-left:16px;padding:12px 0 16px 16px;border-left:2px solid var(--border);background:linear-gradient(90deg,color-mix(in srgb,var(--bg-secondary) 42%,transparent),transparent 58%)}._dataHistoryMain_199y1_488{min-width:0}._dataHistoryTitle_199y1_492{font-family:var(--font-label);font-size:13px;color:var(--text-primary)}._dataHistoryDescription_199y1_498{margin-top:3px;font-family:var(--font-label);font-size:12px;line-height:1.45;color:var(--text-muted)}._dataHistoryMetric_199y1_506{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);white-space:nowrap}._dataHistoryActions_199y1_513{display:flex;align-items:center;gap:8px}._linkButton_199y1_519,._dangerButton_199y1_520{font-family:var(--font-label);font-size:12px;line-height:1;padding:7px 10px;border-radius:4px;text-decoration:none;cursor:pointer;transition:background var(--transition),color var(--transition),border-color var(--transition),opacity var(--transition)}._linkButton_199y1_519{color:var(--accent);border:1px solid var(--border);background:transparent}._linkButton_199y1_519:hover{border-color:var(--accent)}._dangerButton_199y1_520{color:var(--error-text);border:1px solid var(--error-border);background:var(--error-bg)}._dangerButton_199y1_520:hover{opacity:.86}._dangerButton_199y1_520:disabled{opacity:.45;cursor:not-allowed}._inlineStatus_199y1_556{margin:12px 0 0;font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._coldGrid_199y1_564{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-family:var(--font-code);font-size:13px}._coldGrid_199y1_564 dt{color:var(--text-muted)}._coldGrid_199y1_564 dd{color:var(--text-primary);margin:0}._coldHint_199y1_582{margin-top:10px;font-family:var(--font-label);font-size:12px;color:var(--text-muted);font-style:italic}._langRow_199y1_591{display:flex;align-items:center;gap:12px;font-size:13px}._langRow_199y1_591 label{font-family:var(--font-label);color:var(--text-primary)}._loading_199y1_604{color:var(--text-muted);font-family:var(--font-code);font-size:13px;padding:32px 0;text-align:center}._unit_199y1_613{font-family:var(--font-code);font-size:11px;color:var(--text-muted)}@media(max-width:720px){._dataHistoryRow_199y1_462{grid-template-columns:minmax(0,1fr);align-items:stretch}._dataHistoryMetric_199y1_506{white-space:normal}._dataHistoryActions_199y1_513{justify-content:flex-start}._uiStudioDataHistoryDetail_199y1_481{margin-left:0}}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as c,a as I,D as R,i as S,l as k,o as $,j as t,u as E,d as A,m as D,n as O,p as B,T as H}from"./index-DG2RrKOl.js";import{P as M}from"./PageHeader-CThGgsAt.js";import{I as _}from"./InfoLabel-Cyz7d4Kc.js";import{T as b}from"./TooltipText-H3YSCbob.js";import{C as F}from"./ConfirmModal-CpImpY9c.js";import{S as U}from"./StatusBadge-CkLieULy.js";const W=5e3;function q(){const[e,i]=c.useState(null),[u,d]=c.useState([]),[p,o]=c.useState(!0),[y,w]=c.useState(null),m=c.useRef(null),g=c.useRef(null),l=c.useCallback(async()=>{var r;try{const[T,P]=await Promise.all([I.get("/sync/status"),I.get("/api/dashboard/place-summary")]);i(T);const a=(r=P.places)==null?void 0:r.find(j=>j.isActive);w((a==null?void 0:a.placeDirName)??null)}catch{}},[]),f=c.useCallback(async()=>{try{const r=await I.get("/sync/history",{limit:"30"});d(r.entries??[])}catch{d([])}},[]),x=c.useCallback(async()=>{await Promise.all([l(),f()]),o(!1)},[l,f]),N=c.useCallback(()=>{x()},[x]),n=c.useCallback(async()=>{await I.post("/api/dashboard/sync/history/clear"),d([]),l()},[l]);return c.useEffect(()=>(x(),g.current=setInterval(x,W),()=>{g.current&&clearInterval(g.current)}),[x]),c.useEffect(()=>{const r=new R;m.current=r,r.connect();const T=r.on("sync",()=>{l(),f()});return()=>{T(),r.disconnect(),m.current=null}},[l,f]),{status:e,history:u,loading:p,activePlaceDirName:y,refresh:N,clearHistory:n}}const G="_actions_1j3p3_60",z="_btn_1j3p3_68",V="_btnPrimary_1j3p3_99",Y="_panel_1j3p3_109",J="_panelIcon_1j3p3_116",Q="_panelTitle_1j3p3_122",X="_panelDesc_1j3p3_131",Z="_benefitList_1j3p3_139",K="_benefitItem_1j3p3_148",h={actions:G,btn:z,btnPrimary:V,panel:Y,panelIcon:J,panelTitle:Q,panelDesc:X,benefitList:Z,benefitItem:K};function ee({icon:e,title:i,description:u,benefits:d,upgradeLabel:p,upgradeHref:o}){const{trackEvent:y}=S(),{pathname:w,search:m}=k(),g=$(w,m);return t.jsxs("div",{className:h.panel,children:[e&&t.jsx("div",{className:h.panelIcon,children:e}),t.jsx("div",{className:h.panelTitle,children:i}),t.jsx("div",{className:h.panelDesc,children:u}),t.jsx("ul",{className:h.benefitList,children:d.map(l=>t.jsx("li",{className:h.benefitItem,children:l},l))}),t.jsx("div",{className:h.actions,children:t.jsx("a",{className:`${h.btn} ${h.btnPrimary}`,href:o,target:"_blank",rel:"noreferrer",onClick:()=>y("dashboard_click_event",{click_target:"upgrade_cta",placement:"tier_panel",...g}),children:p})})]})}const te="_page_siyu4_2",se="_card_siyu4_10",ne="_cardHeader_siyu4_17",ie="_clearButton_siyu4_29",ae="_statusRow_siyu4_39",ce="_metaItem_siyu4_46",oe="_statusGrid_siyu4_52",le="_table_siyu4_71",re="_directionRail_siyu4_99",de="_endpointLabel_siyu4_105",pe="_optionRail_siyu4_109",ye="_directionOption_siyu4_115",ue="_directionOptionActive_siyu4_129",_e="_directionOptionInactive_siyu4_133",he="_direction_forward_siyu4_139",me="_direction_bidirectional_siyu4_143",ge="_direction_reverse_siyu4_147",fe="_lockBadge_siyu4_152",xe="_proBadge_siyu4_160",be="_forwardBadge_siyu4_174",je="_logContainer_siyu4_187",ve="_logEntry_siyu4_194",we="_logTime_siyu4_206",Te="_logType_siyu4_212",Ne="_logTypeWrite_siyu4_221",Ie="_logTypeUpdate_siyu4_225",Pe="_logTypeDelete_siyu4_229",Ce="_logTypeIdle_siyu4_233",Le="_logPath_siyu4_237",Se="_logEmpty_siyu4_244",Re="_overlay_siyu4_251",ke="_overlayTitle_siyu4_261",$e="_overlayMessage_siyu4_268",Ee="_checklist_siyu4_274",Ae="_checkItem_siyu4_284",De="_upgradePanel_siyu4_300",Oe="_upgradePanelHeader_siyu4_307",Be="_benefitList_siyu4_315",He="_benefitItem_siyu4_324",Me="_upgradeActions_siyu4_339",Fe="_btn_siyu4_344",Ue="_btnPrimary_siyu4_361",We="_disabled_siyu4_372",s={page:te,card:se,cardHeader:ne,clearButton:ie,statusRow:ae,metaItem:ce,statusGrid:oe,table:le,directionRail:re,endpointLabel:de,optionRail:pe,directionOption:ye,directionOptionActive:ue,directionOptionInactive:_e,direction_forward:he,direction_bidirectional:me,direction_reverse:ge,lockBadge:fe,proBadge:xe,forwardBadge:be,logContainer:je,logEntry:ve,logTime:we,logType:Te,logTypeWrite:Ne,logTypeUpdate:Ie,logTypeDelete:Pe,logTypeIdle:Ce,logPath:Le,logEmpty:Se,overlay:Re,overlayTitle:ke,overlayMessage:$e,checklist:Ee,checkItem:Ae,upgradePanel:De,upgradePanelHeader:Oe,benefitList:Be,benefitItem:He,upgradeActions:Me,btn:Fe,btnPrimary:Ue,disabled:We},qe=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function Ge(e){const i=new Date(e);return`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function ze(e){switch(e){case"write":return s.logTypeWrite;case"update":return s.logTypeUpdate;case"delete":return s.logTypeDelete;default:return s.logTypeIdle}}function Ve(e){switch(e){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function Ye(e,i,u,d){const p=e(`sync.directions.cat.${i}`,i.charAt(0).toUpperCase()+i.slice(1)),o=e("sync.directions.endpoint.local","Local"),y=e("sync.directions.endpoint.studio","Studio");switch(u){case"forward":return[`${p}: ${o} <- ${y}`,e("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
|
|
2
|
-
`);case"bidirectional":return[`${p}: ${o} <-> ${y}`,e("sync.directions.tooltip.bidirectional.body","Two-way sync between Local and Studio"),d?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
3
|
-
`);case"reverse":return[`${p}: ${o} -> ${y}`,e("sync.directions.tooltip.reverse.body","Push local file changes to Studio"),d?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
4
|
-
`);default:return p}}const Je=["scripts","values","containers","data","services"];function Qe(e,i){return i==="manual"?e("sync.directions.mode.manual","Manual"):i==="auto"?e("sync.directions.mode.auto","Auto"):"-"}function Xe(e,i){return i==="manual"?e("sync.directions.mode.manual.tooltip","Applies sync changes only when you trigger them manually."):i==="auto"?e("sync.directions.mode.auto.tooltip","Applies sync changes automatically when updates arrive."):""}function Ze(e,i){switch(i){case"write":return e("sync.log.type.write","WRITE");case"update":return e("sync.log.type.update","UPDATE");case"delete":return e("sync.log.type.delete","DELETE");default:return e("sync.log.type.idle","IDLE")}}function Ke(e,i){switch(i){case"write":return e("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return e("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return e("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return e("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function ct(){const{t:e}=E(),{trackEvent:i}=S(),{level:u}=A(),{tier:d,loading:p}=D(),o=q(),{show:y}=O(),[w,m]=c.useState(!1),[g,l]=c.useState(!1),f=!p&&d==="basic",x=u==="disconnected"||u==="serverOnly",N=t.jsx(M,{title:e("page.sync.title","Sync"),description:e("page.sync.description","Monitor Studio to local sync status, direction, apply mode, and recent sync logs."),helpTopicId:"sync",helpState:{connectionLevel:u,tier:d}});if(x)return t.jsxs("div",{className:s.page,children:[N,t.jsx("div",{className:s.card,children:t.jsxs("div",{className:s.overlay,children:[t.jsx("div",{className:s.overlayTitle,children:e("sync.overlay.title","Roblox Studio plugin required")}),t.jsx("div",{className:s.overlayMessage,children:e("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check1","Is Roblox Studio running?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check2","Is the WEPPY Plugin installed?")})]})]})})]});const n=o.status,r=o.history,T=Ve(n==null?void 0:n.state),P=async()=>{l(!0);try{await o.clearHistory(),y(e("toast.clearSuccess","Cleared successfully"),"success"),m(!1)}catch{y(e("toast.clearFailed","Failed to clear data"),"error")}finally{l(!1)}};return t.jsxs("div",{className:s.page,children:[N,t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx(b,{text:e("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:e("sync.status.title","Sync Status")}),f&&t.jsx(b,{text:e("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:t.jsx("span",{className:s.forwardBadge,children:e("sync.status.forwardOnly","Forward Only")})})]}),t.jsxs("div",{className:s.statusRow,children:[t.jsx(U,{status:T}),(n==null?void 0:n.placeName)&&t.jsxs("span",{className:s.metaItem,children:[t.jsx(_,{label:e("sync.status.place","Place"),tooltip:e("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",n.placeName,n.placeId?` (${n.placeId})`:""]})]}),t.jsxs("dl",{className:s.statusGrid,children:[(n==null?void 0:n.syncRoot)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.path","Path"),tooltip:e("sync.status.path.tooltip","Local filesystem root currently used for sync output.")})}),t.jsx("dd",{children:n.syncRoot})]}),o.activePlaceDirName&&(n==null?void 0:n.syncRoot)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.placePath","Place Path"),tooltip:e("sync.status.placePath.tooltip","Active place directory where explorer files are synced.")})}),t.jsx("dd",{children:`${n.syncRoot}/${o.activePlaceDirName}/explorer`})]}),(n==null?void 0:n.instanceCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.instances","Instances"),tooltip:e("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),t.jsx("dd",{children:n.instanceCount})]}),(n==null?void 0:n.scriptCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.scripts","Scripts"),tooltip:e("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),t.jsx("dd",{children:n.scriptCount})]}),(n==null?void 0:n.state)==="syncing"&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.state","State"),tooltip:e("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),t.jsx("dd",{children:e("status.syncing","Syncing")})]})]})]}),(n==null?void 0:n.directions)&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:t.jsx(b,{text:e("sync.directions.title.tooltip","Per-category sync direction and apply behavior between Local and Studio."),children:e("sync.directions.title","Sync Directions")})}),t.jsxs("table",{className:s.table,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:t.jsx(_,{label:e("sync.directions.type","Type"),tooltip:e("sync.directions.type.tooltip","Sync category affected by this rule.")})}),t.jsx("th",{children:t.jsx(_,{label:e("sync.directions.direction","Direction"),tooltip:e("sync.directions.direction.tooltip","Whether each category syncs from Studio, to Studio, or both ways.")})}),t.jsx("th",{children:t.jsx(_,{label:e("sync.directions.applyMode","Apply Mode"),tooltip:e("sync.directions.applyMode.tooltip","How incoming sync changes are applied for this category.")})})]})}),t.jsx("tbody",{children:Je.map(a=>{var L;const j=n.directions[a],C=(L=n.applyModes)==null?void 0:L[a];return t.jsxs("tr",{children:[t.jsx("td",{children:e(`sync.directions.cat.${a}`,a.charAt(0).toUpperCase()+a.slice(1))}),t.jsx("td",{children:t.jsxs("div",{className:s.directionRail,"aria-label":`${a}-direction-rail`,children:[t.jsx(b,{text:e("sync.directions.endpoint.local.tooltip","Local files on disk are always shown on the left side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.local","Local")})}),t.jsx("span",{className:s.optionRail,children:qe.map(v=>t.jsx(B,{text:Ye(e,a,v.key,f),children:t.jsx("span",{className:`${s.directionOption} ${j===v.key?s.directionOptionActive:s.directionOptionInactive} ${s[`direction_${v.key}`]??""}`,"data-active":j===v.key?"true":"false",children:v.symbol})},v.key))}),t.jsx(b,{text:e("sync.directions.endpoint.studio.tooltip","Roblox Studio is always shown on the right side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.studio","Studio")})})]})}),t.jsx("td",{children:t.jsx(b,{text:Xe(e,C),children:Qe(e,C)})})]},a)})})]})]}),t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx("span",{children:e("sync.log.title","Sync Log")}),t.jsx("button",{className:s.clearButton,onClick:()=>{i("dashboard_click_event",{click_target:"sync_clear_log",page:"sync"}),m(!0)},children:e("common.clear","Clear")})]}),t.jsx("div",{className:s.logContainer,children:r.length===0?t.jsx("div",{className:s.logEmpty,children:e("sync.log.empty","No sync events yet")}):r.map((a,j)=>t.jsxs("div",{className:s.logEntry,children:[t.jsx("span",{className:s.logTime,children:Ge(a.timestamp)}),t.jsx(b,{text:Ke(e,a.type),children:t.jsx("span",{className:`${s.logType} ${ze(a.type)}`,children:Ze(e,a.type)})}),t.jsxs("span",{className:s.logPath,children:[a.path,a.details?` — ${a.details}`:""]})]},j))})]}),f&&t.jsx(ee,{title:e("sync.upgrade.title","Explore Full Sync with Pro"),description:e("tier.banner.save","Save AI tokens with Pro!"),benefits:[e("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),e("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),e("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:e("sync.upgrade.buy","View Pro"),upgradeHref:H.sync}),t.jsx(F,{open:w,title:e("sync.clear.title","Clear sync log?"),message:e("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:g,onCancel:()=>!g&&m(!1),onConfirm:P})]})}export{ct as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as n,a as D,D as at,u as lt,i as rt,n as it}from"./index-DG2RrKOl.js";import{P as nt}from"./PageHeader-CThGgsAt.js";import{T as M}from"./TooltipText-H3YSCbob.js";import{C as ct}from"./ConfirmModal-CpImpY9c.js";import{T as dt}from"./Tabs-BhkhdCvF.js";const ut="_wrapper_hzgda_2",pt="_table_hzgda_7",xt="_sortable_hzgda_32",ht="_sortArrow_hzgda_41",mt="_clickable_hzgda_52",bt="_empty_hzgda_57",_t="_expandedRow_hzgda_65",ft="_expandedCell_hzgda_74",T={wrapper:ut,table:pt,sortable:xt,sortArrow:ht,clickable:mt,empty:bt,expandedRow:_t,expandedCell:ft};function gt({columns:s,data:l,sortBy:_,sortDir:r="asc",onSort:v,onRowClick:y,rowKey:B,emptyMessage:E,expandedKey:L,renderExpandedRow:w}){return e.jsx("div",{className:T.wrapper,children:e.jsxs("table",{className:T.table,children:[e.jsx("thead",{children:e.jsx("tr",{children:s.map(u=>e.jsxs("th",{style:u.width?{width:u.width}:void 0,className:u.sortable?T.sortable:void 0,onClick:u.sortable&&v?()=>v(u.key):void 0,children:[e.jsx("span",{children:u.label}),u.sortable&&_===u.key&&e.jsx("span",{className:T.sortArrow,children:r==="asc"?"▴":"▾"})]},u.key))})}),e.jsx("tbody",{children:l.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:s.length,className:T.empty,children:E||"No data"})}):l.map((u,f)=>{const x=B?B(u):String(f),h=L!=null&&x===L&&w?w(u):null;return e.jsxs(n.Fragment,{children:[e.jsx("tr",{className:y?T.clickable:void 0,onClick:y?()=>y(u):void 0,children:s.map(g=>e.jsx("td",{children:g.render?g.render(u):String(u[g.key]??"")},g.key))}),h&&e.jsx("tr",{className:T.expandedRow,children:e.jsx("td",{colSpan:s.length,className:T.expandedCell,children:h})})]},x)})})]})})}function Ct(s){return{...s,sequenceNumber:typeof s.sequenceNumber=="number"?s.sequenceNumber:void 0,executionTimeMs:typeof s.executionTimeMs=="number"?s.executionTimeMs:void 0}}const yt=50;function jt(){const[s,l]=n.useState(null),[_,r]=n.useState(!0),[v,y]=n.useState([]),[B,E]=n.useState(0),[L,w]=n.useState(!1),[u,f]=n.useState(!0),[x,R]=n.useState(0),[h,g]=n.useState(""),H=n.useRef(null),m=n.useCallback(async()=>{r(!0);try{const d=await D.get("/api/dashboard/tool-stats");l(d)}catch{}finally{r(!1)}},[]),C=n.useCallback(async(d,N)=>{f(!0);try{const O={limit:String(yt),offset:String(d)};N&&(O.tool=N);const A=await D.get("/api/dashboard/history",O);y(A.entries.map(Ct)),E(A.total),w(A.hasMore)}catch{y([]),E(0),w(!1)}finally{f(!1)}},[]),q=n.useCallback(()=>{m(),C(x,h)},[C,m,x,h]),z=n.useCallback(async()=>{await D.post("/api/dashboard/tools/history/clear"),C(x,h)},[C,x,h]),F=n.useCallback(async()=>{await D.post("/api/dashboard/tools/statistics/clear"),m()},[m]);return n.useEffect(()=>{m()},[m]),n.useEffect(()=>{C(x,h)},[C,x,h]),n.useEffect(()=>{const d=new at;H.current=d,d.connect();const N=d.on("command",()=>{m(),C(x,h)});return()=>{N(),d.disconnect(),H.current=null}},[C,m,x,h]),{statistics:s,statsLoading:_,history:v,historyTotal:B,historyHasMore:L,historyLoading:u,historyOffset:x,historyToolFilter:h,setHistoryOffset:R,setHistoryToolFilter:g,refresh:q,clearHistory:z,clearStatistics:F}}const vt="_page_16x6v_2",kt="_card_16x6v_12",Tt="_cardToolbar_16x6v_19",wt="_sectionTitle_16x6v_27",Nt="_dangerButton_16x6v_33",St="_proBadge_16x6v_52",Mt="_statusOk_16x6v_67",Bt="_statusFallback_16x6v_76",Et="_statusUnsupported_16x6v_85",Lt="_statusWarning_16x6v_94",At="_statusError_16x6v_103",Pt="_tierBasic_16x6v_113",Rt="_tierPro_16x6v_117",Ht="_tierMixed_16x6v_122",Ft="_filterRow_16x6v_133",Ot="_filterLabel_16x6v_140",It="_filterSelect_16x6v_149",$t="_expandedRow_16x6v_160",Dt="_expandedSection_16x6v_165",Wt="_detailList_16x6v_175",qt="_detailItem_16x6v_181",zt="_detailLabel_16x6v_187",Ut="_detailValue_16x6v_192",Vt="_pre_16x6v_197",Kt="_pagination_16x6v_214",Gt="_pageInfo_16x6v_222",Jt="_btn_16x6v_228",Zt="_tierDistribution_16x6v_251",Qt="_tierBarWrap_16x6v_255",Xt="_tierBarBasic_16x6v_263",Yt="_tierBarPro_16x6v_268",ts="_tierLabels_16x6v_273",ss="_statsTableWrap_16x6v_282",es="_statsTable_16x6v_282",os="_sortableHeader_16x6v_313",as="_sortArrow_16x6v_318",ls="_statsToolRow_16x6v_322",rs="_statsActionRow_16x6v_330",is="_expandButton_16x6v_334",ns="_expandIcon_16x6v_346",cs="_actionLabel_16x6v_351",ds="_emptyStats_16x6v_358",us="_summaryLine_16x6v_364",o={page:vt,card:kt,cardToolbar:Tt,sectionTitle:wt,dangerButton:Nt,proBadge:St,statusOk:Mt,statusFallback:Bt,statusUnsupported:Et,statusWarning:Lt,statusError:At,tierBasic:Pt,tierPro:Rt,tierMixed:Ht,filterRow:Ft,filterLabel:Ot,filterSelect:It,expandedRow:$t,expandedSection:Dt,detailList:Wt,detailItem:qt,detailLabel:zt,detailValue:Ut,pre:Vt,pagination:Kt,pageInfo:Gt,btn:Jt,tierDistribution:Zt,tierBarWrap:Qt,tierBarBasic:Xt,tierBarPro:Yt,tierLabels:ts,statsTableWrap:ss,statsTable:es,sortableHeader:os,sortArrow:as,statsToolRow:ls,statsActionRow:rs,expandButton:is,expandIcon:ns,actionLabel:cs,emptyStats:ds,summaryLine:us},U=50;function ps(s){const l=new Date(s);return`${String(l.getHours()).padStart(2,"0")}:${String(l.getMinutes()).padStart(2,"0")}:${String(l.getSeconds()).padStart(2,"0")}`}function W(s){return typeof s!="number"||!Number.isFinite(s)?"-":s<1e3?`${s}ms`:`${(s/1e3).toFixed(1)}s`}function P(s,l){return l==="pro"?s("tier.pro","Pro"):l==="mixed"?s("tier.mixed","Mixed"):s("tier.basic","Basic")}function Z(s,l){return l!==s&&l.startsWith(`${s}_`)?l.slice(s.length+1):""}function xs(s,l){const _=Z(s,l);return _?`${s}.${_}`:s}function J(s){return typeof s=="string"&&s.length>0?s:void 0}function hs(s){if(!Array.isArray(s))return;const l=s.filter(_=>typeof _=="string"&&_.length>0);return l.length>0?l:void 0}function ms(s){const l=s.result??{};return{requestedCommand:s.requestedCommand??J(l.requestedCommand),executedCommand:s.executedCommand??J(l.executedCommand),alternatives:s.alternatives??hs(l.alternatives)}}function bs(s,l){switch(s.status){case"fallback":return{label:l("tools.badge.fallback","FALLBACK"),tooltip:l("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:o.statusFallback};case"unsupported":return{label:l("tools.badge.unsupported","UNSUPPORTED"),tooltip:l("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:o.statusUnsupported};case"warning":return{label:l("tools.badge.warn","WARN"),tooltip:l("tools.badge.warn.tooltip","The tool call failed as an expected caller, project, policy, or user-code issue."),className:o.statusWarning};case"error":return{label:l("tools.badge.err","FAILED"),tooltip:l("tools.badge.err.tooltip","The tool run failed."),className:o.statusError};default:return{label:l("tools.status.ok","OK"),tooltip:l("tools.status.ok.tooltip","The tool run completed successfully."),className:o.statusOk}}}function j(s,l){return e.jsxs("div",{className:o.detailItem,children:[e.jsx("span",{className:o.detailLabel,children:s}),e.jsx("span",{className:o.detailValue,children:l})]})}function vs(){const{t:s}=lt(),{trackEvent:l,trackPageView:_}=rt(),r=jt(),{show:v}=it(),[y,B]=n.useState("history"),[E,L]=n.useState(null),[w,u]=n.useState(null),[f,x]=n.useState(null),[R,h]=n.useState(!1),[g,H]=n.useState("totalCalls"),[m,C]=n.useState("desc"),q=n.useCallback(t=>{H(a=>a===t?(C(i=>i==="asc"?"desc":"asc"),t):(C("desc"),t))},[]),z=n.useMemo(()=>{var a;const t=new Set;return Object.keys(((a=r.statistics)==null?void 0:a.tools)??{}).forEach(i=>t.add(i)),r.history.forEach(i=>{i.tool&&t.add(i.tool)}),r.historyToolFilter&&t.add(r.historyToolFilter),Array.from(t).sort()},[r.history,r.historyToolFilter,r.statistics]),F=n.useMemo(()=>{var t;return(t=r.statistics)!=null&&t.tools?Object.values(r.statistics.tools).map(a=>{var G;const i=Object.entries(a.commands??{}).map(([p,c])=>({toolName:a.tool,commandName:c.command??p,label:Z(a.tool,c.command??p)||(c.command??p),tier:c.tier,totalCalls:c.totalCalls,successCount:c.successCount,fallbackCount:c.fallbackCount,unsupportedCount:c.unsupportedCount,warningCount:c.warningCount??0,failureCount:c.failureCount,totalExecutionTimeMs:c.totalExecutionTimeMs,avgExecutionTimeMs:c.avgExecutionTimeMs})),b=i.reduce((p,c)=>p+c.totalCalls,0),k=i.reduce((p,c)=>p+c.successCount,0),I=i.reduce((p,c)=>p+c.fallbackCount,0),$=i.reduce((p,c)=>p+c.unsupportedCount,0),st=i.reduce((p,c)=>p+c.warningCount,0),et=i.reduce((p,c)=>p+c.failureCount,0),K=i.reduce((p,c)=>p+c.totalExecutionTimeMs,0),ot=new Set(i.map(p=>p.tier)).size>1?"mixed":((G=i[0])==null?void 0:G.tier)??a.tier;return{toolName:a.tool,tier:ot,commands:i,totalCalls:b,successCount:k,fallbackCount:I,unsupportedCount:$,warningCount:st,failureCount:et,totalExecutionTimeMs:K,avgExecutionTimeMs:b>0?Math.round(K/b):0}}):[]},[r.statistics]),d=n.useCallback((t,a,i,b)=>e.jsx(M,{text:s(i,b),children:s(t,a)}),[s]),N=n.useMemo(()=>[...F].sort((a,i)=>{const b=a[g],k=i[g];if(typeof b=="number"&&typeof k=="number")return m==="asc"?b-k:k-b;const I=String(b??""),$=String(k??"");return m==="asc"?I.localeCompare($):$.localeCompare(I)}),[F,g,m]),O=n.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>ps(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>e.jsxs("span",{children:[xs(t.tool,t.command),t.tier==="pro"&&e.jsx(M,{text:s("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:e.jsx("span",{className:o.proBadge,children:s("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>W(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:t=>{const a=bs(t,s);return e.jsx(M,{text:a.tooltip,children:e.jsx("span",{className:a.className,children:a.label})})}},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>e.jsx("span",{className:t.tier==="pro"?o.tierPro:o.tierBasic,children:P(s,t.tier)})}],[s,d]),A=n.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:d("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:d("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:d("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"warningCount",label:d("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:d("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:t=>W(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:t=>e.jsx(M,{text:t.tier==="mixed"?s("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:t.tier==="pro"?o.tierPro:t.tier==="mixed"?o.tierMixed:o.tierBasic,children:P(s,t.tier)})})}],[s,d]),S=n.useMemo(()=>{if(!r.statistics)return null;const t=r.statistics.tierSummary.basic.totalCalls,a=r.statistics.tierSummary.pro.totalCalls,i=t+a;if(i===0)return null;const b=Math.round(t/i*100),k=100-b;return{basic:t,pro:a,basicPct:b,proPct:k}},[r.statistics]),V=n.useCallback(t=>{u(a=>a===t?null:t)},[]),Q=n.useCallback(async()=>{if(f){h(!0);try{f==="history"?await r.clearHistory():await r.clearStatistics(),v(s("toast.clearSuccess","Cleared successfully"),"success"),x(null)}catch{v(s("toast.clearFailed","Failed to clear data"),"error")}finally{h(!1)}}},[f,v,s,r]),X=n.useCallback(t=>{const a=t==="history"?"tools_history":"tools_statistics";l("dashboard_click_event",{click_target:t==="history"?"tools_tab_history":"tools_tab_statistics",page:"tools",tab:a}),_({page:"tools",tab:a}),B(t)},[l,_]),Y=n.useCallback(t=>{const a=ms(t);return e.jsxs("div",{className:o.expandedRow,children:[e.jsxs("div",{className:o.expandedSection,children:[e.jsxs("strong",{children:[e.jsx(M,{text:s("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:s("tools.detail.params","Parameters")}),":"]}),e.jsx("pre",{className:o.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&e.jsxs("div",{className:o.expandedSection,children:[e.jsxs("strong",{children:[e.jsx(M,{text:s("tools.detail.result.tooltip","Returned result payload for this tool run."),children:s("tools.detail.result","Result")}),":"]}),e.jsx("pre",{className:o.pre,children:JSON.stringify(t.result,null,2)})]}),(t.status==="fallback"||t.status==="unsupported"||t.status==="warning"||t.status==="error")&&e.jsx("div",{className:o.expandedSection,children:e.jsxs("div",{className:o.detailList,children:[t.status==="fallback"&&(a==null?void 0:a.requestedCommand)&&j(s("tools.detail.requestedCommand","Requested Command"),a.requestedCommand),t.status==="fallback"&&(a==null?void 0:a.executedCommand)&&j(s("tools.detail.executedCommand","Executed Command"),a.executedCommand),t.status==="fallback"&&(a==null?void 0:a.alternatives)&&j(s("tools.detail.alternatives","Alternatives"),a.alternatives.join(", ")),t.status==="unsupported"&&t.blockedMessage&&j(s("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage),t.status==="unsupported"&&j(s("tools.detail.noFallback","No Fallback"),s("tools.detail.noFallback.value","No fallback ran.")),t.status==="warning"&&t.warningMessage&&j(s("tools.detail.warningMessage","Warning Message"),t.warningMessage),t.status==="error"&&t.errorMessage&&j(s("tools.detail.errorMessage","Error Message"),t.errorMessage),t.status==="error"&&t.blockedMessage&&j(s("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage),t.status==="error"&&t.fallbackCommand&&j(s("tools.detail.executedCommand","Executed Command"),t.fallbackCommand)]})})]})},[s]),tt=["history","statistics"].map(t=>({key:t,label:s(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))}));return e.jsxs("div",{className:o.page,children:[e.jsx(nt,{title:s("page.tools.title","Tools"),description:s("page.tools.description","Inspect tool history, outcomes, fallback details, and usage statistics."),helpTopicId:"tools"}),e.jsx(dt,{items:tt,value:y,onChange:X}),y==="history"&&e.jsxs("div",{className:o.card,children:[e.jsxs("div",{className:o.cardToolbar,children:[e.jsx("div",{className:o.sectionTitle,children:s("tools.tab.history","History")}),e.jsx("button",{className:o.dangerButton,onClick:()=>{l("dashboard_click_event",{click_target:"tools_clear_history",page:"tools",tab:"tools_history"}),x("history")},children:s("common.clear","Clear")})]}),e.jsx("div",{className:o.filterRow,children:e.jsxs("label",{className:o.filterLabel,children:[s("tools.filter.tool","Tool"),":",e.jsxs("select",{className:o.filterSelect,value:r.historyToolFilter,onChange:t=>{r.setHistoryToolFilter(t.target.value),r.setHistoryOffset(0)},children:[e.jsx("option",{value:"",children:s("tools.filter.all","All")}),z.map(t=>e.jsx("option",{value:t,children:t},t))]})]})}),e.jsx(gt,{columns:O,data:r.history,rowKey:t=>t.id,onRowClick:t=>L(a=>a===t.id?null:t.id),emptyMessage:s("tools.empty.history","No history entries"),expandedKey:E,renderExpandedRow:Y}),e.jsxs("div",{className:o.pagination,children:[e.jsx("button",{className:o.btn,disabled:r.historyOffset===0,title:s("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>r.setHistoryOffset(Math.max(0,r.historyOffset-U)),children:s("tools.page.prev","Prev")}),e.jsxs("span",{className:o.pageInfo,children:[r.historyOffset+1,"–",Math.min(r.historyOffset+U,r.historyTotal)," / ",r.historyTotal]}),e.jsx("button",{className:o.btn,disabled:!r.historyHasMore,title:s("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>r.setHistoryOffset(r.historyOffset+U),children:s("tools.page.next","Next")})]})]}),y==="statistics"&&e.jsxs("div",{className:o.card,children:[e.jsxs("div",{className:o.cardToolbar,children:[e.jsx("div",{className:o.sectionTitle,children:s("tools.tab.statistics","Statistics")}),e.jsx("button",{className:o.dangerButton,onClick:()=>{l("dashboard_click_event",{click_target:"tools_clear_statistics",page:"tools",tab:"tools_statistics"}),x("statistics")},children:s("common.clear","Clear")})]}),S&&e.jsxs("div",{className:o.tierDistribution,children:[e.jsxs("div",{className:o.tierBarWrap,children:[e.jsx("div",{className:o.tierBarBasic,style:{width:`${S.basicPct}%`}}),e.jsx("div",{className:o.tierBarPro,style:{width:`${S.proPct}%`}})]}),e.jsxs("div",{className:o.tierLabels,children:[e.jsxs("span",{children:[P(s,"basic")," ",S.basicPct,"% (",S.basic,")"]}),e.jsxs("span",{children:[P(s,"pro")," ",S.proPct,"% (",S.pro,")"]})]})]}),e.jsx("div",{className:o.statsTableWrap,children:e.jsxs("table",{className:o.statsTable,children:[e.jsx("thead",{children:e.jsx("tr",{children:A.map(t=>e.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?o.sortableHeader:void 0,onClick:t.sortable?()=>q(t.key):void 0,children:[e.jsx("span",{children:t.label}),t.sortable&&g===t.key&&e.jsx("span",{className:o.sortArrow,children:m==="asc"?"▴":"▾"})]},t.key))})}),e.jsx("tbody",{children:N.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:A.length,className:o.emptyStats,children:s("tools.empty.stats","No tool statistics")})}):N.map(t=>{const a=w===t.toolName;return e.jsxs(n.Fragment,{children:[e.jsxs("tr",{className:o.statsToolRow,onClick:()=>V(t.toolName),children:[e.jsx("td",{children:e.jsxs("button",{type:"button",className:o.expandButton,"aria-expanded":a,"aria-label":`${t.toolName} ${a?s("common.collapse","Collapse"):s("common.expand","Expand")}`,onClick:i=>{i.stopPropagation(),V(t.toolName)},children:[e.jsx("span",{className:o.expandIcon,"aria-hidden":"true",children:a?"▾":"▸"}),e.jsx("span",{children:t.toolName})]})}),e.jsx("td",{children:t.totalCalls}),e.jsx("td",{children:t.successCount}),e.jsx("td",{children:t.fallbackCount}),e.jsx("td",{children:t.unsupportedCount}),e.jsx("td",{children:t.warningCount}),e.jsx("td",{children:t.failureCount}),e.jsx("td",{children:W(t.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx(M,{text:t.tier==="mixed"?s("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:t.tier==="pro"?o.tierPro:t.tier==="mixed"?o.tierMixed:o.tierBasic,children:P(s,t.tier)})})})]}),a&&t.commands.map(i=>e.jsxs("tr",{className:o.statsActionRow,children:[e.jsx("td",{children:e.jsx("span",{className:o.actionLabel,children:i.label})}),e.jsx("td",{children:i.totalCalls}),e.jsx("td",{children:i.successCount}),e.jsx("td",{children:i.fallbackCount}),e.jsx("td",{children:i.unsupportedCount}),e.jsx("td",{children:i.warningCount}),e.jsx("td",{children:i.failureCount}),e.jsx("td",{children:W(i.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx("span",{className:i.tier==="pro"?o.tierPro:o.tierBasic,children:P(s,i.tier)})})]},`${t.toolName}:${i.commandName}`))]},t.toolName)})})]})}),r.statistics&&e.jsxs("div",{className:o.summaryLine,children:[s("tools.summary.total","Total"),": ",r.statistics.totalCalls," ",s("tools.summary.calls","calls")," | ",s("tools.summary.sessions","Sessions"),": ",r.statistics.totalSessions]})]}),e.jsx(ct,{open:f!==null,title:f==="history"?s("tools.clear.history.title","Clear history?"):s("tools.clear.statistics.title","Clear statistics?"),message:f==="history"?s("tools.clear.history.message","This permanently removes the current place tools history."):s("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:R,onCancel:()=>!R&&x(null),onConfirm:Q})]})}export{vs as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p,p as r}from"./index-DG2RrKOl.js";function i({text:o,children:t}){return p.jsx(r,{text:o,children:t})}export{i as T};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{q as xe,s as q,w as Le,r as p,u as D,j as t,i as H,R as $e,X as Ee,T as Se,m as He,x as Oe}from"./index-DG2RrKOl.js";import{I as B}from"./InfoLabel-Cyz7d4Kc.js";import{T as y}from"./TooltipText-H3YSCbob.js";import{D as se,c as oe,e as Fe,g as Ue,h as ze,i as le,j as je,k as qe,l as ce,d as Ve}from"./sample-requests-D1b5Z8FU.js";import{T as We}from"./Tabs-BhkhdCvF.js";import{P as Ke}from"./PageHeader-CThGgsAt.js";/**
|
|
2
|
-
* @license lucide-react v1.8.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Qe=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Ye=xe("camera",Qe);/**
|
|
7
|
-
* @license lucide-react v1.8.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Je=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Xe=xe("ellipsis",Je);async function we(e){const i=await fetch(`${q}${e}`);if(!i.ok){let a=null;try{a=await i.json()}catch{}throw new Le(i.status,(a==null?void 0:a.message)??i.statusText,(a==null?void 0:a.error)??null,a)}return await i.json()}function O(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function Ze(e){return e.design_check_summary?{priority_high:O(e.design_check_summary.priority_high),priority_medium:O(e.design_check_summary.priority_medium),priority_low:O(e.design_check_summary.priority_low)}:e.lint_summary?{priority_high:O(e.lint_summary.errors),priority_medium:O(e.lint_summary.warnings),priority_low:0}:null}function et(e){return{rule:e.rule,path:e.path,displayPriority:e.displayPriority??(e.severity==="error"?"priority_high":"priority_medium"),actual:e.actual,expected:e.expected,hint:e.hint}}function ve(e){return{snapshot_id:e.snapshot_id,captured_at:e.captured_at,brief_id:e.brief_id,thresholds_source:e.thresholds_source,scope:e.scope,target:e.target,design_check_summary:Ze(e),image:e.image}}function tt(e){const i=e.check_results??e.lint_results??[];return{...ve(e),check_results:i.map(et),image_url:e.image_url,meta:e.meta}}async function de(e,i){const a=new URLSearchParams;i!==void 0&&a.set("limit",String(i));const o=a.toString()?`?${a.toString()}`:"",l=await we(`/api/ui-studio/snapshots${o}`);return{...l,snapshots:l.snapshots.map(ve)}}async function it(e,i){const a=i!==void 0?`?placeId=${i}`:"",o=await we(`/api/ui-studio/snapshots/${encodeURIComponent(e)}${a}`);return tt(o)}function be(e,i){const a=i!==void 0?`?placeId=${i}`:"";return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image${a}`}const at=1e4;function Ce(e=50){const[i,a]=p.useState(null),[o,l]=p.useState(!0),[r,n]=p.useState(null),g=p.useCallback(async()=>{try{const d=await de(void 0,e);a(d),n(null)}catch(d){n(d instanceof Error?d.message:String(d))}finally{l(!1)}},[e]);return p.useEffect(()=>{let d=!1;const _=async()=>{try{const h=await de(void 0,e);d||(a(h),n(null))}catch(h){d||n(h instanceof Error?h.message:String(h))}finally{d||l(!1)}};_();const m=setInterval(()=>{_()},at);return()=>{d=!0,clearInterval(m)}},[e]),{data:i,loading:o,error:r,refresh:g}}const rt="_page_1fjjw_2",st="_grid_1fjjw_9",nt="_card_1fjjw_16",ot="_cardBodyButton_1fjjw_31",lt="_thumb_1fjjw_43",ct="_badges_1fjjw_52",dt="_priorityHighBadge_1fjjw_60",ut="_priorityMediumBadge_1fjjw_69",ht="_priorityLowBadge_1fjjw_78",pt="_cardMeta_1fjjw_87",gt="_target_1fjjw_93",mt="_time_1fjjw_100",_t="_drawer_1fjjw_105",yt="_drawerToolbar_1fjjw_122",ft="_drawerTitleBlock_1fjjw_133",xt="_drawerEyebrow_1fjjw_140",St="_drawerTarget_1fjjw_149",jt="_drawerToolbarActions_1fjjw_159",wt="_closeBtn_1fjjw_167",vt="_detailBody_1fjjw_188",bt="_screenshotPreviewFrame_1fjjw_195",Ct="_fullImg_1fjjw_208",It="_metaDl_1fjjw_215",Nt="_errorMsg_1fjjw_227",Pt="_suggestionsWrap_1fjjw_232",kt="_prioritySection_1fjjw_239",Tt="_sectionHighHeader_1fjjw_243",Bt="_sectionLowHeader_1fjjw_249",Dt="_sectionMediumHeader_1fjjw_255",Gt="_groupCard_1fjjw_261",Mt="_groupHeader_1fjjw_268",At="_groupLabel_1fjjw_284",Rt="_groupCount_1fjjw_289",Lt="_groupChevron_1fjjw_296",$t="_groupBody_1fjjw_300",Et="_groupDescription_1fjjw_303",Ht="_groupFix_1fjjw_308",Ot="_falsePositive_1fjjw_317",Ft="_itemList_1fjjw_325",Ut="_suggestionItem_1fjjw_333",zt="_suggestionInfo_1fjjw_343",qt="_pathBreadcrumb_1fjjw_349",Vt="_currentValue_1fjjw_358",Wt="_copyFixBtn_1fjjw_362",Kt="_emptySuggestions_1fjjw_376",Qt="_sampleBanner_1fjjw_384",Yt="_sampleBannerRow_1fjjw_397",Jt="_sampleBannerMain_1fjjw_405",Xt="_sampleBadge_1fjjw_413",Zt="_sampleTitle_1fjjw_423",ei="_sampleMessage_1fjjw_430",ti="_sampleActions_1fjjw_437",ii="_primaryAction_1fjjw_445",ai="_secondaryAction_1fjjw_446",ri="_emptyState_1fjjw_481",si="_pluginGuideCard_1fjjw_489",ni="_pluginGuideMarker_1fjjw_500",oi="_pluginGuideBody_1fjjw_515",li="_pluginGuideTitle_1fjjw_519",ci="_pluginGuideMessage_1fjjw_527",di="_pluginGuideChecklist_1fjjw_534",ui="_pluginGuideWaiting_1fjjw_557",hi="_pluginGuideDot_1fjjw_566",pi="_analysisWorkspace_1fjjw_574",gi="_analysisMainColumn_1fjjw_579",mi="_analysisDetailPopupLayer_1fjjw_583",_i="_analysisDetailDialog_1fjjw_600",yi="_analysisSummaryPanel_1fjjw_619",fi="_recentCapturesHeader_1fjjw_632",xi="_analysisSummaryText_1fjjw_639",Si="_recentCapturesMeta_1fjjw_640",ji="_analysisReportGrid_1fjjw_646",wi="_analysisReportGroup_1fjjw_653",vi="_analysisReportCard_1fjjw_657",bi="_analysisReportThumb_1fjjw_679",Ci="_analysisReportBody_1fjjw_688",Ii="_analysisReportTopline_1fjjw_695",Ni="_analysisVerdict_1fjjw_702",Pi="_analysisVerdict_needsFix_1fjjw_713",ki="_analysisVerdict_review_1fjjw_714",Ti="_analysisVerdict_passed_1fjjw_719",Bi="_analysisReportCounts_1fjjw_724",Di="_analysisReportTarget_1fjjw_729",Gi="_analysisReportIssue_1fjjw_738",Mi="_analysisReportMeta_1fjjw_744",Ai="_analysisChildList_1fjjw_751",Ri="_analysisChildRow_1fjjw_762",Li="_analysisChildPath_1fjjw_783",$i="_analysisChildSummary_1fjjw_792",Ei="_analysisChildDetailHint_1fjjw_793",Hi="_drawerAnalysisSummary_1fjjw_802",Oi="_drawerAnalysisSummaryItem_1fjjw_813",Fi="_drawerAnalysisLabel_1fjjw_820",Ui="_drawerAnalysisCounts_1fjjw_826",zi="_drawerAnalysisValue_1fjjw_827",qi="_recentCapturesSection_1fjjw_832",Vi="_drawerPrimaryActions_1fjjw_844",Wi="_drawerActionBtn_1fjjw_851",Ki="_drawerMoreMenu_1fjjw_880",Qi="_drawerMoreButton_1fjjw_885",Yi="_drawerMoreMenuBody_1fjjw_910",Ji="_drawerMenuItem_1fjjw_923",Xi="_drawerMenuItemDanger_1fjjw_946",Zi="_actionErrMsg_1fjjw_955",ea="_actionStatusMsg_1fjjw_964",ta="_actionStatus_info_1fjjw_978",ia="_actionStatus_success_1fjjw_984",aa="_actionStatus_warning_1fjjw_990",ra="_actionStatusDetail_1fjjw_996",sa="_galleryHeader_1fjjw_1002",na="_cardChecked_1fjjw_1015",oa="_cardCheckbox_1fjjw_1022",la="_captureSelectionActions_1fjjw_1062",ca="_selectionToolbar_1fjjw_1071",da="_selectionBar_1fjjw_1072",ua="_selectionToolbarCount_1fjjw_1091",ha="_selectionToolbarActions_1fjjw_1098",pa="_selectionBarBtn_1fjjw_1105",ga="_selectionBarBtnDanger_1fjjw_1126",s={page:rt,grid:st,card:nt,cardBodyButton:ot,thumb:lt,badges:ct,priorityHighBadge:dt,priorityMediumBadge:ut,priorityLowBadge:ht,cardMeta:pt,target:gt,time:mt,drawer:_t,drawerToolbar:yt,drawerTitleBlock:ft,drawerEyebrow:xt,drawerTarget:St,drawerToolbarActions:jt,closeBtn:wt,detailBody:vt,screenshotPreviewFrame:bt,fullImg:Ct,metaDl:It,errorMsg:Nt,suggestionsWrap:Pt,prioritySection:kt,sectionHighHeader:Tt,sectionLowHeader:Bt,sectionMediumHeader:Dt,groupCard:Gt,groupHeader:Mt,groupLabel:At,groupCount:Rt,groupChevron:Lt,groupBody:$t,groupDescription:Et,groupFix:Ht,falsePositive:Ot,itemList:Ft,suggestionItem:Ut,suggestionInfo:zt,pathBreadcrumb:qt,currentValue:Vt,copyFixBtn:Wt,emptySuggestions:Kt,sampleBanner:Qt,sampleBannerRow:Yt,sampleBannerMain:Jt,sampleBadge:Xt,sampleTitle:Zt,sampleMessage:ei,sampleActions:ti,primaryAction:ii,secondaryAction:ai,emptyState:ri,pluginGuideCard:si,pluginGuideMarker:ni,pluginGuideBody:oi,pluginGuideTitle:li,pluginGuideMessage:ci,pluginGuideChecklist:di,pluginGuideWaiting:ui,pluginGuideDot:hi,analysisWorkspace:pi,analysisMainColumn:gi,analysisDetailPopupLayer:mi,analysisDetailDialog:_i,analysisSummaryPanel:yi,recentCapturesHeader:fi,analysisSummaryText:xi,recentCapturesMeta:Si,analysisReportGrid:ji,analysisReportGroup:wi,analysisReportCard:vi,analysisReportThumb:bi,analysisReportBody:Ci,analysisReportTopline:Ii,analysisVerdict:Ni,analysisVerdict_needsFix:Pi,analysisVerdict_review:ki,analysisVerdict_passed:Ti,analysisReportCounts:Bi,analysisReportTarget:Di,analysisReportIssue:Gi,analysisReportMeta:Mi,analysisChildList:Ai,analysisChildRow:Ri,analysisChildPath:Li,analysisChildSummary:$i,analysisChildDetailHint:Ei,drawerAnalysisSummary:Hi,drawerAnalysisSummaryItem:Oi,drawerAnalysisLabel:Fi,drawerAnalysisCounts:Ui,drawerAnalysisValue:zi,recentCapturesSection:qi,drawerPrimaryActions:Vi,drawerActionBtn:Wi,drawerMoreMenu:Ki,drawerMoreButton:Qi,drawerMoreMenuBody:Yi,drawerMenuItem:Ji,drawerMenuItemDanger:Xi,actionErrMsg:Zi,actionStatusMsg:ea,actionStatus_info:ta,actionStatus_success:ia,actionStatus_warning:aa,actionStatusDetail:ra,galleryHeader:sa,cardChecked:na,cardCheckbox:oa,captureSelectionActions:la,selectionToolbar:ca,selectionBar:da,selectionToolbarCount:ua,selectionToolbarActions:ha,selectionBarBtn:pa,selectionBarBtnDanger:ga};function ma({snapshot:e,placeId:i,onClick:a,imageUrlOverride:o,selectable:l,selected:r,onToggleSelect:n}){var w,C,G;const{t:g}=D(),d=((w=e.design_check_summary)==null?void 0:w.priority_high)??0,_=((C=e.design_check_summary)==null?void 0:C.priority_medium)??0,m=((G=e.design_check_summary)==null?void 0:G.priority_low)??0,h=new Date(e.captured_at*1e3).toLocaleString(),x=o??be(e.snapshot_id,i),j=()=>{n==null||n(e.snapshot_id)};return t.jsxs("div",{className:`${s.card} ${r?s.cardChecked:""}`,children:[l&&t.jsx(y,{text:g("uiStudio.gallery.cardCheckbox.tooltip","Select this capture. Pick multiple to delete them together."),children:t.jsx("input",{className:s.cardCheckbox,type:"checkbox","aria-label":g("uiStudio.gallery.cardCheckbox","Select screenshot"),checked:!!r,onChange:j})}),t.jsxs("button",{className:s.cardBodyButton,onClick:I=>a(I.currentTarget),type:"button",children:[t.jsx("img",{className:s.thumb,src:x,alt:e.snapshot_id,loading:"lazy"}),t.jsxs("div",{className:s.badges,children:[d>0&&t.jsx(y,{text:g("uiStudio.gallery.priorityHighBadge.tooltip","Number of suggestions to review first. Click for details."),children:t.jsx("span",{className:s.priorityHighBadge,children:d})}),_>0&&t.jsx(y,{text:g("uiStudio.gallery.priorityMediumBadge.tooltip","Number of recommended suggestions."),children:t.jsx("span",{className:s.priorityMediumBadge,children:_})}),m>0&&t.jsx(y,{text:g("uiStudio.gallery.priorityLowBadge.tooltip","Number of optional improvements."),children:t.jsx("span",{className:s.priorityLowBadge,children:m})})]}),t.jsxs("div",{className:s.cardMeta,children:[t.jsx("div",{className:s.target,children:e.target??e.scope}),t.jsx("div",{className:s.time,children:h})]})]})]})}const _a={touch_target:"touchTarget",contrast:"contrast",text_scaled:"textScaled",safezone:"safezone",min_text_size:"minTextSize"};function ya(e){return e.rule==="contrast"&&/\.(Icon|Avatar|EmptyIcon|GoldIcon|[A-Za-z]*Icon)$/.test(e.path)}const fa={touch_target:{checkLabel:"터치 타겟 크기",description:"모바일에서 손가락으로 누르기 편한 최소 크기를 만족하는지 확인합니다.",howToFix:"버튼 Size 를 44x44 px 이상으로 키우거나 UIPadding 으로 터치 영역을 확장하세요.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{Size:{xScale:0,xOffset:44,yScale:0,yOffset:44}}}},null,2)},contrast:{checkLabel:"텍스트 대비",description:"텍스트와 배경의 명암 비율이 WCAG 접근성 기준을 만족하는지 확인합니다.",howToFix:"TextColor3 를 더 밝은 색(예: #FFFFFF) 으로 바꾸거나, 배경(BackgroundColor3)을 어둡게 조정하세요.",falsePositiveNote:"이모지 아이콘의 경우 색이 고정되어 대비 규칙이 오탐하는 경우가 많습니다. 실제 가독성에 문제 없으면 무시해도 됩니다.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{TextColor3:{r:255,g:255,b:255}}}},null,2)},text_scaled:{checkLabel:"TextScaled 사용",description:"TextScaled 가 켜져 있으나 UITextSizeConstraint 가 없으면 언어 확장 시 레이아웃이 깨질 수 있습니다.",howToFix:"해당 TextLabel 에 UITextSizeConstraint 자식을 추가하고 MaxTextSize 를 지정하세요.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{addChildren:[{className:"UITextSizeConstraint",name:"SizeConstraint",properties:{MaxTextSize:24,MinTextSize:10}}]}},null,2)},safezone:{checkLabel:"세이프존 배치",description:"버튼이 플랫폼별 세이프존(노치·홈 인디케이터·TV safe margin) 안에 있는지 확인합니다.",howToFix:"Position 을 세이프존 안쪽으로 이동하거나, 부모 Frame 을 축소하세요.",buildUpdateCommand:()=>null},min_text_size:{checkLabel:"최소 폰트 크기",description:"텍스트가 너무 작아 가독성이 떨어지는지 확인합니다. 브리프 기준 하한을 사용합니다.",howToFix:"TextSize 를 14 이상(본문 기준)으로 올리세요.",buildUpdateCommand:e=>{const i=typeof e.expected=="string"?parseInt(e.expected.replace(/[^\d]/g,""),10):14;return JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{TextSize:Number.isFinite(i)?i:14}}},null,2)}}};function xa(e,i,a){const o=_a[e];return o?{...i,checkLabel:a(`uiStudio.fix.${o}.label`,i.checkLabel),description:a(`uiStudio.fix.${o}.description`,i.description),howToFix:a(`uiStudio.fix.${o}.howToFix`,i.howToFix),falsePositiveNote:i.falsePositiveNote?a(`uiStudio.fix.${o}.falsePositive`,i.falsePositiveNote):void 0}:i}function Sa(e,i){const a=fa[e]??null;return a?i?xa(e,a,i):a:null}function ja(e){return ya(e)}function wa(e,i){const a=new Map;for(const l of e){const r=`${l.displayPriority}::${l.rule}`,n=a.get(r)??[];n.push(l),a.set(r,n)}const o=[];for(const[l,r]of a){const[n,g]=l.split("::"),d=r.filter(ja).length;o.push({rule:g??"unknown",priority:n,items:r,fixTemplate:Sa(g??"",i),falsePositiveRatio:r.length>0?d/r.length:0})}return o.sort((l,r)=>{const n={priority_high:0,priority_medium:1,priority_low:2};return l.priority!==r.priority?n[l.priority]-n[r.priority]:r.items.length-l.items.length}),{high:o.filter(l=>l.priority==="priority_high"),medium:o.filter(l=>l.priority==="priority_medium"),low:o.filter(l=>l.priority==="priority_low")}}function Ie(e){const i=e.split("."),a=i[i.length-1]??e,o=i[i.length-2],l=o?`${o} > ${a}`:a;return{full:e,breadcrumb:l,leaf:a}}function Ne(e){return typeof e=="object"&&e!==null}function ue(e){return Ne(e.data)?e.data:{}}function Z(e,i){const a=e[i];return Ne(a)?a:{}}function V(e,i){const a=e[i];return typeof a=="string"?a:null}function W(e,i){const a=e[i];return typeof a=="number"&&Number.isFinite(a)?a:0}function va(e){const i=Z(e,"design_check_summary");return{priority_high:W(i,"priority_high"),priority_medium:W(i,"priority_medium"),priority_low:W(i,"priority_low")}}function he(e){if(!(e.success??e.ok??!e.error))throw new Error(e.error??"UI Studio action failed")}function pe(e,i){return Pe(e,va(i))}function F(e,i,a,o,l){const r=e(i,a);return l?`${r}: ${l} · ${o}`:`${r}: ${o}`}function ba(e){const i=e.design_check_summary;return((i==null?void 0:i.priority_high)??0)>0?"needsFix":((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0?"review":"passed"}function Ca(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function K(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function Pe(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${K(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${K(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${K(e,(i==null?void 0:i.priority_low)??0)}`}function Ia(e,i){return Pe(e,i.design_check_summary)}function Na({snapshotId:e,placeId:i,onClose:a,sampleDetail:o,tier:l,onActionDone:r}){const[n,g]=p.useState(o??null),[d,_]=p.useState(null),[m,h]=p.useState(null),[x,j]=p.useState(null),[w,C]=p.useState(null),[G,I]=p.useState(null),{t:u}=D(),{trackEvent:P}=H(),A=l==="pro";p.useEffect(()=>{if(o){g(o),_(null);return}let b=!1;return it(e,i).then(k=>{b||g(k)}).catch(k=>{b||_(k instanceof Error?k.message:String(k))}),()=>{b=!0}},[e,i,o]);const S=async()=>{if(n!=null&&n.target){P("dashboard_click_event",{click_target:"ui_studio_capture_current",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),C("preview"),j({tone:"info",message:u("uiStudio.actions.previewRunning","캡처 중..."),detail:u("uiStudio.actions.previewRunningDetail","완료되면 새 화면 캡처 파일 ID를 표시합니다.")});try{const b=await oe("preview",{targetPath:n.target});he(b);const k=ue(b),L=V(k,"snapshot_id"),f=Z(k,"screenshot"),M=Z(k,"meta"),T=V(f,"saved_path"),ne=V(M,"persist_warning"),U=pe(u,k);j(ne?{tone:"warning",message:F(u,"uiStudio.actions.previewNeedsSaveCheck","캡처 완료, 저장 확인 필요",U,L),detail:ne}:L&&T?{tone:"success",message:F(u,"uiStudio.actions.previewSaved","새 화면 캡처 저장 완료",U,L),detail:u("uiStudio.actions.previewSavedDetail","기존 화면 캡처는 변경하지 않고 새 파일로 저장했습니다.")}:L?{tone:"warning",message:F(u,"uiStudio.actions.previewComplete","캡처 완료",U,L),detail:u("uiStudio.actions.previewSavedPathMissing","새 화면 캡처 ID는 받았지만 저장 경로를 확인하지 못했습니다.")}:{tone:"warning",message:F(u,"uiStudio.actions.previewComplete","캡처 완료",U),detail:u("uiStudio.actions.previewSnapshotIdMissing","새 화면 캡처 ID를 확인하지 못했습니다. 목록을 새로고침해 저장 여부를 확인해 주세요.")}),await(r==null?void 0:r())}catch(b){h(b instanceof Error?b.message:String(b))}finally{C(null)}}},N=async()=>{if(n!=null&&n.target){P("dashboard_click_event",{click_target:"ui_studio_check_again",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),C("check"),j({tone:"info",message:u("uiStudio.actions.designCheckRunning","개선 제안 확인 중..."),detail:u("uiStudio.actions.designCheckRunningDetail","완료되면 우선 검토/검토 권장/선택 개선 항목 수를 표시합니다.")});try{const b=await oe("check",{targetPath:n.target});he(b);const k=ue(b),L=pe(u,k);j({tone:"success",message:F(u,"uiStudio.actions.designCheckComplete","개선 제안 확인 완료",L),detail:u("uiStudio.actions.designCheckNoSnapshotSaved","이 작업은 화면 캡처 파일을 새로 저장하지 않습니다.")}),await(r==null?void 0:r())}catch(b){h(b instanceof Error?b.message:String(b))}finally{C(null)}}},E=async()=>{h(null),j(null);try{await Fe(i,e),await(r==null?void 0:r()),I(null),a()}catch(b){throw h(b instanceof Error?b.message:String(b)),b}},v=A?void 0:u("uiStudio.actions.proRequired","Pro에서 사용 가능"),R=n!=null&&n.target?Ie(n.target):null;return t.jsxs("div",{className:s.drawer,children:[t.jsxs("div",{className:s.drawerToolbar,"data-testid":"snapshot-detail-toolbar",children:[t.jsxs("div",{className:s.drawerTitleBlock,children:[t.jsx("span",{className:s.drawerEyebrow,children:u("uiStudio.analysis.detailDialog","Analysis detail")}),t.jsx("span",{className:s.drawerTarget,title:(R==null?void 0:R.full)??e,children:(R==null?void 0:R.breadcrumb)??e})]}),t.jsxs("div",{className:s.drawerToolbarActions,children:[n&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:s.drawerPrimaryActions,children:[t.jsx(y,{text:v??u("uiStudio.actions.captureCurrentState.tooltip","Save the UI currently shown in Studio as a new capture. Existing captures are kept."),children:t.jsxs("button",{className:s.drawerActionBtn,onClick:()=>void S(),disabled:!A||!n.target||w!==null,type:"button",children:[t.jsx(Ye,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:u("uiStudio.actions.captureCurrentState","현재 상태 캡처")})]})}),t.jsx(y,{text:v??u("uiStudio.actions.checkSuggestionsAgain.tooltip","Recompute suggestions for this capture without taking a new screenshot."),children:t.jsxs("button",{className:s.drawerActionBtn,onClick:()=>void N(),disabled:!A||!n.target||w!==null,type:"button",children:[t.jsx($e,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:u("uiStudio.actions.checkSuggestionsAgain","개선 제안 다시 확인")})]})})]}),t.jsxs("details",{className:s.drawerMoreMenu,children:[t.jsx("summary",{className:s.drawerMoreButton,title:u("uiStudio.actions.more.tooltip","Open additional actions."),"aria-label":u("uiStudio.actions.more","More"),children:t.jsx(Xe,{size:18,"aria-hidden":"true"})}),t.jsx("div",{className:s.drawerMoreMenuBody,children:t.jsx(y,{text:v??u("uiStudio.actions.deleteSnapshot.tooltip","Delete only this capture file. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${s.drawerMenuItem} ${s.drawerMenuItemDanger}`,onClick:()=>{P("dashboard_click_event",{click_target:"ui_studio_delete_snapshot",page:"ui-studio",tab:"ui_studio_analysis"}),I("deleteSnapshot")},disabled:!A,type:"button",children:u("uiStudio.actions.deleteSnapshot","이 화면 캡처 삭제")})})})]})]}),t.jsx(y,{text:u("uiStudio.detailClose.tooltip","Close this detail panel."),children:t.jsx("button",{className:s.closeBtn,onClick:a,type:"button","aria-label":u("uiStudio.detailClose","Close"),children:t.jsx(Ee,{size:18,"aria-hidden":"true"})})})]})]}),d&&t.jsx("div",{className:s.errorMsg,children:d}),n&&t.jsxs("div",{className:s.detailBody,children:[m&&t.jsx("div",{className:s.actionErrMsg,children:m}),x&&t.jsxs("div",{className:`${s.actionStatusMsg} ${s[`actionStatus_${x.tone}`]??""}`,children:[t.jsx("div",{children:x.message}),x.detail&&t.jsx("div",{className:s.actionStatusDetail,children:x.detail})]}),t.jsx(Pa,{detail:n}),t.jsx("div",{className:s.screenshotPreviewFrame,"data-testid":"analysis-screenshot-preview",children:t.jsx("img",{className:s.fullImg,src:n.image_url,alt:n.snapshot_id})}),t.jsx(ka,{items:n.check_results}),t.jsxs("dl",{className:s.metaDl,children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.capturedAt","Captured"),tooltip:u("uiStudio.capturedAt.tooltip","When this screen was captured.")})}),t.jsx("dd",{children:new Date(n.captured_at*1e3).toLocaleString()}),t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.scope","Scope"),tooltip:u("uiStudio.scope.tooltip","Capture scope (full screen or a specific UI).")})}),t.jsx("dd",{children:n.scope}),n.target&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.target","Target"),tooltip:u("uiStudio.target.tooltip","Exact path of the captured UI instance.")})}),t.jsx("dd",{children:n.target})]}),n.brief_id&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.briefId","Brief"),tooltip:u("uiStudio.briefId.tooltip","Identifier of the design brief that produced this UI.")})}),t.jsx("dd",{children:n.brief_id})]})]})]}),G==="deleteSnapshot"&&t.jsx(se,{title:u("uiStudio.confirm.deleteSnapshotTitle","화면 캡처 삭제"),message:u("uiStudio.confirm.deleteSnapshotMessage","이 화면 캡처 파일만 삭제됩니다 (Studio 인스턴스 보존)."),danger:!0,confirmLabel:u("common.delete","삭제"),onConfirm:E,onClose:()=>I(null)})]})}function Pa({detail:e}){const{t:i}=D(),a=ba(e);return t.jsxs("section",{className:s.drawerAnalysisSummary,children:[t.jsxs("div",{className:s.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:s.drawerAnalysisLabel,children:t.jsx(B,{label:i("uiStudio.analysis.verdictLabel","개선 요약"),tooltip:i("uiStudio.analysis.verdictLabel.tooltip","Overall improvement verdict for this capture.")})}),t.jsx("span",{className:`${s.analysisVerdict} ${s[`analysisVerdict_${a}`]??""}`,children:Ca(i,a)}),t.jsx("span",{className:s.drawerAnalysisCounts,children:Ia(i,e)})]}),t.jsxs("div",{className:s.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:s.drawerAnalysisLabel,children:t.jsx(B,{label:i("uiStudio.analysis.thresholds","검토 기준"),tooltip:i("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom).")})}),t.jsx("span",{className:s.drawerAnalysisValue,children:e.thresholds_source})]})]})}function ka({items:e}){const{t:i}=D();if(e.length===0)return t.jsx("p",{className:s.emptySuggestions,children:i("uiStudio.noSuggestions","현재 개선 제안 없음")});const{high:a,medium:o,low:l}=wa(e,i);return t.jsxs("div",{className:s.suggestionsWrap,children:[t.jsx("h3",{children:t.jsx(B,{label:i("uiStudio.designCheckResultsTitle","Design Check suggestions"),tooltip:i("uiStudio.designCheckResultsTitle.tooltip","All improvement suggestions found in this capture.")})}),a.length>0&&t.jsxs("section",{className:s.prioritySection,children:[t.jsx("h4",{className:s.sectionHighHeader,children:i("uiStudio.highPrioritySection","우선 검토")}),a.map(r=>t.jsx(Q,{group:r},`h-${r.rule}`))]}),o.length>0&&t.jsxs("section",{className:s.prioritySection,children:[t.jsx("h4",{className:s.sectionMediumHeader,children:i("uiStudio.mediumPrioritySection","검토 권장")}),o.map(r=>t.jsx(Q,{group:r},`m-${r.rule}`))]}),l.length>0&&t.jsxs("section",{className:s.prioritySection,children:[t.jsx("h4",{className:s.sectionLowHeader,children:i("uiStudio.lowPrioritySection","선택 개선")}),l.map(r=>t.jsx(Q,{group:r},`l-${r.rule}`))]})]})}function Q({group:e}){var n,g,d;const{t:i}=D(),[a,o]=p.useState(e.priority==="priority_high"&&e.items.length<=5),l=e.falsePositiveRatio>=.5&&!!((n=e.fixTemplate)!=null&&n.falsePositiveNote),r=((g=e.fixTemplate)==null?void 0:g.checkLabel)??e.rule;return t.jsxs("div",{className:s.groupCard,children:[t.jsx(y,{text:i("uiStudio.suggestionGroup.tooltip","Suggestions of the same kind grouped together. Click to expand or collapse."),children:t.jsxs("button",{className:s.groupHeader,onClick:()=>o(_=>!_),type:"button",children:[t.jsx("span",{className:s.groupLabel,children:r}),t.jsx(y,{text:i("uiStudio.groupSummary.tooltip","Number of UI elements matching this group."),children:t.jsxs("span",{className:s.groupCount,children:[e.items.length," ",i("uiStudio.groupSummary","items")]})}),t.jsx("span",{className:s.groupChevron,children:a?"▾":"▸"})]})}),a&&t.jsxs("div",{className:s.groupBody,children:[e.fixTemplate&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:s.groupDescription,children:e.fixTemplate.description}),t.jsx("p",{className:s.groupFix,children:e.fixTemplate.howToFix})]}),l&&t.jsx(y,{text:i("uiStudio.falsePositiveWarning.tooltip","This check can produce false positives — verify before applying."),children:t.jsxs("p",{className:s.falsePositive,children:[i("uiStudio.falsePositiveWarning","May contain false positives"),":"," ",(d=e.fixTemplate)==null?void 0:d.falsePositiveNote]})}),t.jsx("ul",{className:s.itemList,children:e.items.map((_,m)=>t.jsx(Ta,{item:_,group:e},`${_.path}-${m}`))})]})]})}function Ta({item:e,group:i}){var _;const{t:a}=D(),{trackEvent:o}=H(),[l,r]=p.useState(!1),n=Ie(e.path),g=((_=i.fixTemplate)==null?void 0:_.buildUpdateCommand(e))??null,d=async()=>{if(g)try{await navigator.clipboard.writeText(g),o("dashboard_click_event",{click_target:"ui_studio_copy_ai_instruction",page:"ui-studio",tab:"ui_studio_analysis"}),r(!0),setTimeout(()=>r(!1),2e3)}catch{}};return t.jsxs("li",{className:s.suggestionItem,children:[t.jsxs("div",{className:s.suggestionInfo,children:[t.jsx("code",{className:s.pathBreadcrumb,title:`${a("uiStudio.fullPath","Full path")}: ${n.full}`,children:n.breadcrumb}),t.jsxs("span",{className:s.currentValue,children:[t.jsx(y,{text:a("uiStudio.colCurrent.tooltip","The currently applied value."),children:t.jsx("span",{children:a("uiStudio.colCurrent","Current")})}),": ",t.jsx("strong",{children:String(e.actual)})," → ",t.jsx(y,{text:a("uiStudio.colRecommended.tooltip","The recommended value."),children:t.jsx("span",{children:a("uiStudio.colRecommended","Recommended")})}),": ",t.jsx("strong",{children:String(e.expected)})]})]}),g&&t.jsx(y,{text:a("uiStudio.copyFixCommand.tooltip","Copy a prompt that asks the AI to fix this issue."),children:t.jsx("button",{className:s.copyFixBtn,onClick:d,type:"button",children:l?a("uiStudio.copiedToClipboard","Copied"):a("uiStudio.copyFixCommand","Copy AI instruction")})})]})}function Y(e,i){return Object.entries(i).reduce((a,[o,l])=>a.split(`{${o}}`).join(String(l)),e)}function Ba(e,i){return i.rule==="contrast"?Y(e("uiStudio.sample.designCheck.contrast","Text contrast is below {expected} (current {actual}). Adjust TextColor3 or BackgroundColor3."),{expected:String(i.expected),actual:String(i.actual)}):i.rule==="touch_target"?Y(e("uiStudio.sample.designCheck.touchTarget","Touch targets should be at least {expected} px (current {actual}). Increase Size or padding."),{expected:String(i.expected),actual:String(i.actual)}):i.rule==="min_text_size"?Y(e("uiStudio.sample.designCheck.minTextSize","TextSize is below {expected} (current {actual}). Increase it for readability."),{expected:String(i.expected),actual:String(i.actual)}):i.hint}const ke="sample_inventory_preview",ee=Ue,Da=[{path:"StarterGui.InventoryGame.Overlay.Modal.Header.GoldBox.Icon",hint:"텍스트 대비 4.5:1 미만 (현재 1.24). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥4.5:1",rule:"contrast",actual:"1.24"},{path:"StarterGui.InventoryGame.Overlay.Modal.Header.CloseBtn",hint:"텍스트 대비 4.5:1 미만 (현재 4.11). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥4.5:1",rule:"contrast",actual:"4.11"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.Portrait.Avatar",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot1.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot2.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot3.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot4.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot5.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot6.EmptyIcon",hint:"텍스트 대비 3.0:1 미만 (현재 2.53). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"2.53"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabAll",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabWeapon",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabArmor",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabConsume",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabMisc",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I1.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I1.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I2.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I3.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I4.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I5.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I6.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I7.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I8.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I9.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I10.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I11.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I12.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I13.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I13.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I14.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I14.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I15.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I15.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I16.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I16.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I17.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I17.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I18.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I19.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I19.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I20.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I20.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.ItemIconBox.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.Rarity",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.StatsBox.Passive",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12}];function Ga(e){const o={snapshot_id:ke,captured_at:1776757908,brief_id:null,thresholds_source:"default",scope:"targetPath",target:"StarterGui.InventoryGame",design_check_summary:{priority_high:35,priority_medium:10,priority_low:0},image:{file:"ui-studio-sample.png",width:402,height:252}},l={...o,check_results:Da.map(n=>({...n,hint:Ba(e,n)})),image_url:ee};return{list:{placeId:0,snapshots:[o],totalCount:1},detail:l}}const Ma=/plugin not connected|sync not started/i;function te(e){return typeof e=="string"&&Ma.test(e)}function Te(){const{t:e}=D();return t.jsxs("section",{className:s.pluginGuideCard,role:"status","aria-live":"polite",children:[t.jsx("div",{className:s.pluginGuideMarker,"aria-hidden":"true",children:"!"}),t.jsxs("div",{className:s.pluginGuideBody,children:[t.jsx("h2",{className:s.pluginGuideTitle,children:e("uiStudio.pluginGuide.title","Roblox Studio 플러그인이 연결되지 않았습니다")}),t.jsx("p",{className:s.pluginGuideMessage,children:e("uiStudio.pluginGuide.message","UI Studio는 연결된 Studio place의 화면 캡처와 변경 이력을 표시합니다. Studio와 WEPPY Plugin을 연결하면 자동으로 갱신됩니다.")}),t.jsxs("ul",{className:s.pluginGuideChecklist,children:[t.jsx("li",{children:e("uiStudio.pluginGuide.check1","Roblox Studio가 실행 중인가요?")}),t.jsx("li",{children:e("uiStudio.pluginGuide.check2","WEPPY Plugin이 설치되어 실행 중인가요?")})]}),t.jsxs("div",{className:s.pluginGuideWaiting,children:[t.jsx("span",{className:s.pluginGuideDot,"aria-hidden":"true"}),e("uiStudio.pluginGuide.waiting","플러그인 연결을 기다리는 중...")]})]})]})}function Be(e){return e.target??e.scope}function Aa(e){const i=Be(e),a=i.split(".").filter(l=>l.length>0),o=a.findIndex(l=>l==="StarterGui");return o>=0&&a[o+1]?["StarterGui",a[o+1]].join("."):i}function De(e){return((e==null?void 0:e.priority_high)??0)>0?"needsFix":((e==null?void 0:e.priority_medium)??0)>0||((e==null?void 0:e.priority_low)??0)>0?"review":"passed"}function Ra(e){return De(e.design_check_summary)}function ge(e){return ie(e.design_check_summary)}function ie(e){return((e==null?void 0:e.priority_high)??0)>0?0:((e==null?void 0:e.priority_medium)??0)>0?1:((e==null?void 0:e.priority_low)??0)>0?2:3}function La(e){return e.length===0?null:{...e.reduce((a,o)=>{const l=o.latest.design_check_summary;return a.priority_high+=(l==null?void 0:l.priority_high)??0,a.priority_medium+=(l==null?void 0:l.priority_medium)??0,a.priority_low+=(l==null?void 0:l.priority_low)??0,a},{priority_high:0,priority_medium:0,priority_low:0})}}function $a(e){const i=new Map;for(const l of e){const r=Be(l),n=i.get(r);if(!n){i.set(r,{latest:l,snapshotCount:1});continue}n.snapshotCount+=1,l.captured_at>n.latest.captured_at&&(n.latest=l)}const a=[...i.entries()].map(([l,r])=>({key:l,latest:r.latest,snapshotCount:r.snapshotCount,verdict:Ra(r.latest)})),o=new Map;for(const l of a){const r=Aa(l.latest),n=o.get(r)??[];n.push(l),o.set(r,n)}return[...o.entries()].map(([l,r])=>{var _;const n=r.sort((m,h)=>{const x=ge(m.latest)-ge(h.latest);return x!==0?x:h.latest.captured_at-m.latest.captured_at}),g=n.reduce((m,h)=>h.latest.captured_at>m.captured_at?h.latest:m,((_=n[0])==null?void 0:_.latest)??r[0].latest),d=La(n);return{key:l,latest:g,snapshotCount:n.reduce((m,h)=>m+h.snapshotCount,0),children:n,summary:d,verdict:De(d)}}).sort((l,r)=>{const n=ie(l.summary)-ie(r.summary);return n!==0?n:r.latest.captured_at-l.latest.captured_at})}function Ea(e){return e.reduce((i,a)=>(a.verdict==="passed"?i.noSuggestions+=1:i.hasSuggestions+=1,i),{hasSuggestions:0,noSuggestions:0})}function $(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function ae(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${$(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${$(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${$(e,(i==null?void 0:i.priority_low)??0)}`}function Ha(e,i,a){return`${e("uiStudio.analysis.targetCountLabel","분석 대상")} ${$(e,i)} · ${re(e,"needsFix")} ${$(e,a.hasSuggestions)} · ${re(e,"passed")} ${$(e,a.noSuggestions)}`}function Oa({tier:e}){const{t:i}=D(),{trackEvent:a}=H(),o=e==="basic",l=Ce(50),r=p.useRef(null),[n,g]=p.useState(null),[d,_]=p.useState(new Set),[m,h]=p.useState(new Set),[x,j]=p.useState(!1),w=p.useCallback((f,M)=>{g(n===f?null:f)},[n]),C=p.useCallback(()=>{g(null)},[]),G=p.useCallback(f=>{_(M=>{const T=new Set(M);return T.has(f)?T.delete(f):T.add(f),T})},[]);p.useEffect(()=>{var M;if(!n)return;(M=r.current)==null||M.focus();const f=T=>{T.key==="Escape"&&!document.getElementById("delete-confirm-title")&&C()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[C,n]);const I=o?Ga(i):null,u=(I==null?void 0:I.list)??l.data,P=o?!1:l.loading,A=p.useCallback(f=>{h(M=>{const T=new Set(M);return T.has(f)?T.delete(f):T.add(f),T})},[]),S=f=>{h(new Set(f))},N=()=>{h(new Set)},E=async()=>{const f=(u==null?void 0:u.placeId)??0;a("dashboard_click_event",{click_target:"ui_studio_delete_selected_snapshots",page:"ui-studio",tab:"ui_studio_analysis"}),await ze(f,{ids:[...m]}),await l.refresh(),j(!1),h(new Set)};if(P)return t.jsx("div",{className:s.page,children:i("uiStudio.loading","Loading...")});if(!o&&te(l.error))return t.jsx(Te,{});if(!o&&l.error)return t.jsxs("div",{className:s.page,children:[i("uiStudio.error","Error"),": ",l.error]});const v=(u==null?void 0:u.snapshots)??[],R=(u==null?void 0:u.placeId)??0,b=v.map(f=>f.snapshot_id),k=$a(v),L=Ea(k);return t.jsxs("div",{children:[t.jsxs("div",{className:s.analysisWorkspace,"data-detail-open":n?"true":"false",children:[t.jsxs("div",{className:s.analysisMainColumn,"data-testid":"analysis-main-column",children:[o&&t.jsx("div",{className:s.sampleBanner,children:t.jsxs("div",{className:s.sampleBannerRow,children:[t.jsxs("div",{className:s.sampleBannerMain,children:[t.jsx("div",{className:s.sampleBadge,children:i("uiStudio.sample.badge","Preview of the Pro UI gallery")}),t.jsx("div",{className:s.sampleTitle,children:i("uiStudio.sample.title","You are previewing the UI screenshot gallery that unlocks after upgrading to Pro.")}),t.jsx("div",{className:s.sampleMessage,children:i("uiStudio.sample.message","This preview uses sample data from a demo inventory UI. Real screenshots, review history, and AI-driven fixes unlock with Pro.")})]}),t.jsx("div",{className:s.sampleActions,children:t.jsx("a",{className:s.primaryAction,href:Se.uiStudioAnalysis,target:"_blank",rel:"noreferrer",onClick:()=>a("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_analysis_banner",page:"ui-studio",tab:"ui_studio_analysis"}),children:i("tier.upgrade","View Pro")})})]})}),t.jsx("div",{className:s.galleryHeader,children:t.jsx("h1",{children:t.jsx(B,{label:i("uiStudio.title","UI Studio"),tooltip:i("uiStudio.title.tooltip","A central place to review AI-generated UI screens and improvement suggestions.")})})}),v.length===0?t.jsx("div",{className:s.emptyState,children:i("uiStudio.empty","No screenshots saved yet. They are created automatically when an AI agent captures the current UI state.")}):t.jsxs(t.Fragment,{children:[t.jsx("section",{className:s.analysisSummaryPanel,children:t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(B,{label:i("uiStudio.analysis.reportsTitle","UI 루트별 최신 분석"),tooltip:i("uiStudio.analysis.reportsTitle.tooltip","Shows the latest capture and suggestion summary per UI (e.g., Inventory window, Main menu).")})}),t.jsx("p",{className:s.analysisSummaryText,children:Ha(i,k.length,L)})]})}),t.jsx("div",{className:s.analysisReportGrid,"data-testid":"analysis-report-grid",children:k.map(f=>t.jsx(Ua,{report:f,placeId:R,imageUrlOverride:o?ee:void 0,expanded:d.has(f.key),onPrimaryClick:M=>{f.children.length>1?G(f.key):w(f.latest.snapshot_id,M)},onChildClick:(M,T)=>w(M,T)},f.key))}),t.jsxs("section",{className:s.recentCapturesSection,children:[t.jsxs("div",{className:s.recentCapturesHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(B,{label:i("uiStudio.analysis.recentCapturesTitle","최근 캡처"),tooltip:i("uiStudio.analysis.recentCapturesTitle.tooltip","All recently saved captures in chronological order.")})}),t.jsxs("p",{className:s.recentCapturesMeta,children:[i("uiStudio.storage.snapshotCount","화면 캡처")," ",$(i,v.length)]})]}),!o&&v.length>0&&t.jsxs("div",{className:s.captureSelectionActions,children:[t.jsx(y,{text:i("uiStudio.gallery.selectAll.tooltip","Select every visible capture at once."),children:t.jsx("button",{className:s.selectionBarBtn,onClick:()=>S(b),type:"button",children:i("uiStudio.gallery.selectAll","모두 선택")})}),m.size>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:s.selectionToolbarCount,children:[m.size,i("uiStudio.gallery.selection.selectedCount"," selected")]}),t.jsx(y,{text:i("uiStudio.gallery.clearSelection.tooltip","Clear the current selection."),children:t.jsx("button",{className:s.selectionBarBtn,onClick:N,type:"button",children:i("uiStudio.gallery.clearSelection","선택 해제")})}),t.jsx(y,{text:i("uiStudio.gallery.deleteSelected.tooltip","Delete only the selected capture files. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${s.selectionBarBtn} ${s.selectionBarBtnDanger}`,onClick:()=>j(!0),type:"button",children:i("common.delete","삭제")})})]})]})]}),t.jsx("div",{className:s.grid,children:v.map(f=>t.jsx(ma,{snapshot:f,placeId:R,onClick:M=>w(f.snapshot_id,M),imageUrlOverride:o?ee:void 0,selectable:!o,selected:m.has(f.snapshot_id),onToggleSelect:A},f.snapshot_id))})]})]})]}),n&&t.jsx("div",{className:s.analysisDetailPopupLayer,"data-testid":"analysis-detail-popup-layer",onClick:C,role:"presentation",children:t.jsx("section",{ref:r,className:s.analysisDetailDialog,role:"dialog","aria-modal":"true","aria-label":i("uiStudio.analysis.detailDialog","Analysis detail"),tabIndex:-1,onClick:f=>f.stopPropagation(),children:t.jsx(Na,{snapshotId:n,placeId:R,onClose:C,sampleDetail:o&&n===ke?(I==null?void 0:I.detail)??null:null,tier:e,onActionDone:o?void 0:l.refresh})})})]}),x&&t.jsx(se,{title:i("uiStudio.confirm.deleteBatchTitle","화면 캡처 일괄 삭제"),message:i("uiStudio.confirm.deleteBatchMessage",`선택한 ${m.size}개의 화면 캡처를 삭제합니다. 이 작업은 되돌릴 수 없습니다.`),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:E,onClose:()=>j(!1)})]})}function re(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function Fa(e,i){return((i==null?void 0:i.priority_high)??0)>0||((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0?ae(e,i):e("uiStudio.analysis.issueSummary.passed","현재 검토 기준에서 추가 개선 제안은 없습니다.")}function Ua({report:e,placeId:i,imageUrlOverride:a,expanded:o,onPrimaryClick:l,onChildClick:r}){const{t:n}=D(),g=e.latest,d=a??be(g.snapshot_id,i),_=new Date(g.captured_at*1e3).toLocaleString(),m=re(n,e.verdict),h=e.children.length>1;return t.jsxs("div",{className:s.analysisReportGroup,children:[t.jsxs("button",{className:s.analysisReportCard,"aria-expanded":h?o:void 0,"aria-label":`${e.key} ${h?n("uiStudio.analysis.expandChildren","하위 대상 보기"):n("uiStudio.analysis.openDetail","상세 보기")}`,onClick:x=>l(x.currentTarget),type:"button",children:[t.jsx("img",{className:s.analysisReportThumb,src:d,alt:g.snapshot_id,loading:"lazy"}),t.jsxs("div",{className:s.analysisReportBody,children:[t.jsxs("div",{className:s.analysisReportTopline,children:[t.jsx(y,{text:e.verdict==="passed"?n("uiStudio.analysis.verdict.passed.tooltip","No improvements suggested under the current review thresholds."):n("uiStudio.analysis.verdict.hasSuggestions.tooltip","Some improvements were found in this UI. Click the card for details."),children:t.jsx("span",{className:`${s.analysisVerdict} ${s[`analysisVerdict_${e.verdict}`]??""}`,children:m})}),t.jsx(y,{text:n("uiStudio.analysis.counts.tooltip","Shows how many suggestions are marked review first, recommended, or optional."),children:t.jsx("span",{className:s.analysisReportCounts,children:ae(n,e.summary)})})]}),t.jsx("div",{className:s.analysisReportTarget,children:e.key}),t.jsx("div",{className:s.analysisReportIssue,children:Fa(n,e.summary)}),t.jsxs("div",{className:s.analysisReportMeta,children:[_," ·"," ",t.jsx(y,{text:n("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom)."),children:t.jsx("span",{children:n("uiStudio.analysis.thresholds","검토 기준")})}),": ",g.thresholds_source,e.snapshotCount>1?` · ${n("uiStudio.analysis.captureLabel","캡처")} ${$(n,e.snapshotCount)}`:"",h?` · ${n("uiStudio.analysis.childTargets","하위 대상")} ${$(n,e.children.length)}`:""]})]})]}),h&&o&&t.jsx("div",{className:s.analysisChildList,children:e.children.map(x=>t.jsxs("button",{className:s.analysisChildRow,onClick:j=>r(x.latest.snapshot_id,j.currentTarget),type:"button",children:[t.jsx("span",{className:s.analysisChildPath,children:x.key}),t.jsx("span",{className:s.analysisChildSummary,children:ae(n,x.latest.design_check_summary)}),t.jsx("span",{className:s.analysisChildDetailHint,children:n("uiStudio.analysis.childDetailHint","하위 대상 상세 보기")})]},x.key))})]})}function za(e,i,a=1e4){const[o,l]=p.useState(null),[r,n]=p.useState(!0),[g,d]=p.useState(null),_=JSON.stringify(i),m=p.useCallback(async()=>{try{const h=await le(e,i);l(h),d(null)}catch(h){d(h.message)}finally{n(!1)}},[e,_]);return p.useEffect(()=>{let h=!0;const x=async()=>{try{const w=await le(e,i);h&&(l(w),d(null))}catch(w){h&&d(w.message)}finally{h&&n(!1)}};x();const j=setInterval(()=>{x()},a);return()=>{h=!1,clearInterval(j)}},[e,_,a]),{data:o,loading:r,error:g,refresh:m}}const qa="_filterBar_1nnge_4",Va="_filterGroup_1nnge_14",Wa="_filterLabel_1nnge_21",Ka="_filterCheckbox_1nnge_28",Qa="_segmentGroup_1nnge_45",Ya="_segmentBtn_1nnge_55",Ja="_segmentBtnActive_1nnge_73",Xa="_filterInput_1nnge_79",Za="_filterResetBtn_1nnge_95",er="_requestRow_1nnge_114",tr="_requestRowMain_1nnge_127",ir="_requestDetailToggle_1nnge_134",ar="_thumbPair_1nnge_156",rr="_thumbPairButton_1nnge_164",sr="_thumbSlot_1nnge_179",nr="_thumbImg_1nnge_204",or="_thumbPlaceholder_1nnge_211",lr="_thumbArrow_1nnge_219",cr="_extraPathsBadge_1nnge_225",dr="_requestMeta_1nnge_239",ur="_requestLabel_1nnge_247",hr="_requestTime_1nnge_256",pr="_requestStats_1nnge_261",gr="_statDot_1nnge_269",mr="_summaryPill_1nnge_273",_r="_requestActions_1nnge_278",yr="_expandHint_1nnge_285",fr="_mutationsArea_1nnge_298",xr="_mutLoading_1nnge_307",Sr="_mutEmpty_1nnge_308",jr="_mutError_1nnge_314",wr="_mutationRow_1nnge_320",vr="_mutationLine_1nnge_330",br="_mutTs_1nnge_337",Cr="_mutCommand_1nnge_343",Ir="_mutPath_1nnge_349",Nr="_mutDiff_1nnge_359",Pr="_mutErr_1nnge_314",kr="_changeDetails_1nnge_374",Tr="_changeDetailRow_1nnge_382",Br="_changeDetailRowNoBefore_1nnge_391",Dr="_changeDetailBadge_1nnge_395",Gr="_changeDetail_text_1nnge_412",Mr="_changeDetail_color_1nnge_417",Ar="_changeDetail_size_1nnge_422",Rr="_changeDetail_layout_1nnge_427",Lr="_changeDetail_state_1nnge_432",$r="_changeDetail_asset_1nnge_437",Er="_changeDetail_property_1nnge_442",Hr="_changeDetailProperty_1nnge_446",Or="_changeDetailArrow_1nnge_454",Fr="_changeDetailOldValue_1nnge_460",Ur="_changeDetailNewValue_1nnge_461",zr="_compareDialogLayer_1nnge_479",qr="_compareDialog_1nnge_479",Vr="_beforeAfterDrawer_1nnge_510",Wr="_drawerHeader_1nnge_520",Kr="_drawerTitle_1nnge_529",Qr="_drawerCloseBtn_1nnge_536",Yr="_drawerBody_1nnge_552",Jr="_pathTabs_1nnge_559",Xr="_pathTab_1nnge_559",Zr="_pathTabActive_1nnge_588",es="_comparePanel_1nnge_594",ts="_compareHalf_1nnge_604",is="_compareLabel_1nnge_611",as="_compareImg_1nnge_622",rs="_comparePlaceholder_1nnge_630",ss="_compareDetailsPanel_1nnge_642",ns="_compareDetailsHeader_1nnge_651",os="_drawerFooter_1nnge_669",ls="_drawerActionBtn_1nnge_677",cs="_historyTabWrap_1nnge_695",ds="_historyWorkspace_1nnge_701",us="_historyMainColumn_1nnge_706",hs="_requestList_1nnge_710",ps="_emptyHistory_1nnge_715",gs="_historyError_1nnge_722",ms="_historyLoading_1nnge_728",_s="_listHeader_1nnge_736",ys="_listHeaderTitle_1nnge_745",fs="_clearBtn_1nnge_752",xs="_deleteErrBanner_1nnge_771",c={filterBar:qa,filterGroup:Va,filterLabel:Wa,filterCheckbox:Ka,segmentGroup:Qa,segmentBtn:Ya,segmentBtnActive:Ja,filterInput:Xa,filterResetBtn:Za,requestRow:er,requestRowMain:tr,requestDetailToggle:ir,thumbPair:ar,thumbPairButton:rr,thumbSlot:sr,thumbImg:nr,thumbPlaceholder:or,thumbArrow:lr,extraPathsBadge:cr,requestMeta:dr,requestLabel:ur,requestTime:hr,requestStats:pr,statDot:gr,summaryPill:mr,requestActions:_r,expandHint:yr,mutationsArea:fr,mutLoading:xr,mutEmpty:Sr,mutError:jr,mutationRow:wr,mutationLine:vr,mutTs:br,mutCommand:Cr,mutPath:Ir,mutDiff:Nr,mutErr:Pr,changeDetails:kr,changeDetailRow:Tr,changeDetailRowNoBefore:Br,changeDetailBadge:Dr,changeDetail_text:Gr,changeDetail_color:Mr,changeDetail_size:Ar,changeDetail_layout:Rr,changeDetail_state:Lr,changeDetail_asset:$r,changeDetail_property:Er,changeDetailProperty:Hr,changeDetailArrow:Or,changeDetailOldValue:Fr,changeDetailNewValue:Ur,compareDialogLayer:zr,compareDialog:qr,beforeAfterDrawer:Vr,drawerHeader:Wr,drawerTitle:Kr,drawerCloseBtn:Qr,drawerBody:Yr,pathTabs:Jr,pathTab:Xr,pathTabActive:Zr,comparePanel:es,compareHalf:ts,compareLabel:is,compareImg:as,comparePlaceholder:rs,compareDetailsPanel:ss,compareDetailsHeader:ns,drawerFooter:os,drawerActionBtn:ls,historyTabWrap:cs,historyWorkspace:ds,historyMainColumn:us,requestList:hs,emptyHistory:ps,historyError:gs,historyLoading:ms,listHeader:_s,listHeaderTitle:ys,clearBtn:fs,deleteErrBanner:xs};function Ss(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function me(e){return e==null?"nil":typeof e=="string"?`"${e}"`:typeof e=="object"?JSON.stringify(e):String(e)}function Ge({mutations:e,emptyLabel:i}){const{t:a}=D();return e.length===0?t.jsx("div",{className:c.mutEmpty,children:i??a("uiStudio.history.row.mutationsEmpty","No change details")}):t.jsx(t.Fragment,{children:e.map(o=>t.jsx(js,{mutation:o},o.mutationId))})}function js({mutation:e}){return t.jsxs("div",{className:c.mutationRow,children:[t.jsxs("div",{className:c.mutationLine,children:[t.jsx("span",{className:c.mutTs,children:Ss(e.ts)}),t.jsx("span",{className:c.mutCommand,children:e.command}),e.targetPath&&t.jsx("span",{className:c.mutPath,children:e.targetPath}),e.diffSummary&&t.jsx("span",{className:c.mutDiff,children:e.diffSummary})]}),e.changeDetails&&e.changeDetails.length>0&&t.jsx("div",{className:c.changeDetails,children:e.changeDetails.map(i=>t.jsx(ws,{detail:i},`${i.property}:${i.category}`))}),!e.ok&&e.error&&t.jsx("span",{className:c.mutErr,children:e.error})]})}function ws({detail:e}){const i=Object.prototype.hasOwnProperty.call(e,"before");return t.jsxs("div",{className:`${c.changeDetailRow} ${i?"":c.changeDetailRowNoBefore}`,children:[t.jsx("span",{className:`${c.changeDetailBadge} ${c[`changeDetail_${e.category}`]??""}`,children:e.label}),t.jsx("span",{className:c.changeDetailProperty,children:e.property}),i&&t.jsx("span",{className:c.changeDetailOldValue,children:me(e.before)}),t.jsx("span",{className:c.changeDetailArrow,children:"→"}),t.jsx("span",{className:c.changeDetailNewValue,children:me(e.after)})]})}function _e(e,i){return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function vs(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function bs(e){if(!e)return null;const i=e.split(/[./]/).filter(o=>o.length>0);if(i.length===0)return null;const a=i.findIndex(o=>o==="StarterGui");return a>=0&&i[a+1]?i[a+1]:i[i.length-1]??null}function J(e,i){if(i.label)return i.label;const a=bs(i.affectedPaths[0]);if(a){const o=i.mutationCount===1?"uiStudio.history.row.pathLabelOne":"uiStudio.history.row.pathLabelMany",l=i.mutationCount===1?"{path} · {n} change detail":"{path} · {n} change details";return e(o,l).replace("{path}",a).replace("{n}",String(i.mutationCount))}return e("uiStudio.history.row.toolLabel","UI changes ({n})").replace("{n}",String(i.mutationCount))}function X(e,i){return`${i}${e("uiStudio.storage.countSuffix","")}`}function Cs(e,i){if(!i)return null;const a=[i.style_family,i.layout_family,i.device_policy,i.safe_area_policy].filter(o=>typeof o=="string"&&o.length>0);return a.length===0?null:`${e("uiStudio.history.row.qualityPlan","Design direction")}: ${a.join(" · ")}`}function Is(e,i){if(!i)return null;if(i.source==="unavailable")return e("uiStudio.history.row.designCheckUnavailable","Suggestions: unavailable");if(i.total===0)return e("uiStudio.history.row.designCheckNone","Suggestions: none");const a=`${e("uiStudio.priorityHigh","Priority")} ${X(e,i.priority_high)}`,o=`${e("uiStudio.priorityMedium","Recommended")} ${X(e,i.priority_medium)}`,l=`${e("uiStudio.priorityLow","Optional")} ${X(e,i.priority_low)}`;return`${e("uiStudio.history.row.designCheck","Suggestions")}: ${a} · ${o} · ${l}`}function Me({req:e,placeId:i,onOpenCompare:a,imageUrlOverride:o,sampleMutations:l}){const{t:r}=D(),[n,g]=p.useState(!1),[d,_]=p.useState(null),[m,h]=p.useState(!1),[x,j]=p.useState(null),w=o!=null,C=e.affectedPaths[0]??null,G=e.affectedPaths.length-1,I=C?e.beforeSnapshots[C]??null:null,u=C?e.afterSnapshots[C]??null:null,P=I?w?o:_e(I,i):null,A=u?w?o:_e(u,i):null,S=Cs(r,e.qualityPlanSummary),N=Is(r,e.postChangeDesignCheckSummary),E=async()=>{if(!n&&d===null)if(w&&l!=null)_(l);else{h(!0),j(null);try{const v=await je(i,e.requestId);_(v.mutations)}catch(v){j(v.message)}finally{h(!1)}}g(v=>!v)};return t.jsxs("div",{className:c.requestRow,children:[t.jsxs("div",{className:c.requestRowMain,children:[t.jsx(y,{text:r("uiStudio.history.row.compare.tooltip","Compare the before and after screens. Click to open the full comparison view."),children:t.jsxs("button",{className:`${c.thumbPair} ${c.thumbPairButton}`,onClick:v=>a(v.currentTarget),disabled:!C,"aria-label":`${J(r,e)} ${r("uiStudio.history.row.compare","Before / After")}`,type:"button",children:[t.jsx("div",{className:c.thumbSlot,children:P?t.jsx("img",{className:c.thumbImg,src:P,alt:r("uiStudio.compare.before","Before"),loading:"lazy"}):t.jsx(y,{text:r("uiStudio.history.row.noBeforeState.tooltip","No capture saved before this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:r("uiStudio.history.row.noBeforeState","이전 없음")})})}),t.jsx("span",{className:c.thumbArrow,children:"→"}),t.jsx("div",{className:c.thumbSlot,children:A?t.jsx("img",{className:c.thumbImg,src:A,alt:r("uiStudio.compare.after","After"),loading:"lazy"}):t.jsx(y,{text:r("uiStudio.history.row.noAfterState.tooltip","No capture saved after this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:r("uiStudio.history.row.noAfterState","이후 없음")})})}),G>0&&t.jsx(y,{text:r("uiStudio.history.row.extraPaths.tooltip","Number of additional UIs changed in this action."),children:t.jsxs("span",{className:c.extraPathsBadge,children:["+",G]})})]})}),t.jsxs("button",{className:c.requestDetailToggle,type:"button","aria-expanded":n,"aria-label":`${J(r,e)} ${r("uiStudio.history.row.toggleDetails","Toggle change details")}`,onClick:()=>void E(),children:[t.jsxs("span",{className:c.requestMeta,children:[t.jsx("span",{className:c.requestLabel,children:J(r,e)}),t.jsx("span",{className:c.requestTime,children:vs(e.startedAt)}),t.jsxs("span",{className:c.requestStats,children:[t.jsx(y,{text:r("uiStudio.history.row.affectedPaths.tooltip","Number of UIs affected by this action."),children:t.jsxs("span",{children:[r("uiStudio.history.row.affectedPaths","Paths")," ",e.affectedPaths.length,r("uiStudio.storage.countSuffix","")]})}),t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.mutations.tooltip","Number of detailed changes (e.g., property edits)."),children:t.jsxs("span",{children:[r("uiStudio.history.row.mutations","Change details")," ",e.mutationCount,r("uiStudio.storage.countSuffix","")]})}),S&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.qualityPlan.tooltip","Brief design direction used for this change."),children:t.jsx("span",{className:c.summaryPill,children:S})})]}),N&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.designCheck.tooltip","Post-change Design Check suggestion summary."),children:t.jsx("span",{className:c.summaryPill,children:N})})]})]})]}),t.jsx("span",{className:c.requestActions,children:t.jsx(y,{text:r("uiStudio.history.row.toggleDetails.tooltip","Show or hide a per-line breakdown of what changed."),children:t.jsx("span",{className:c.expandHint,children:n?r("uiStudio.history.row.collapseDetails","Hide change details"):r("uiStudio.history.row.expandDetails","Show {n} change details").replace("{n}",String(e.mutationCount))})})})]})]}),n&&t.jsxs("div",{className:c.mutationsArea,children:[m&&t.jsx("div",{className:c.mutLoading,children:r("uiStudio.history.loading","로딩 중...")}),x&&t.jsx("div",{className:c.mutError,children:x}),d&&t.jsx(Ge,{mutations:d,emptyLabel:r("uiStudio.history.row.mutationsEmpty","No change details")})]})]})}function ye(e,i){return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function Ae({requestId:e,placeId:i,onClose:a,imageUrlOverride:o,sampleDetail:l}){const{t:r}=D(),n=p.useRef(null),g=l!=null,[d,_]=p.useState(g?l:null),[m,h]=p.useState(!g),[x,j]=p.useState(null),[w,C]=p.useState(g&&l.affectedPaths.length>0?l.affectedPaths[0]:null);p.useEffect(()=>{var S;(S=n.current)==null||S.focus()},[]),p.useEffect(()=>{const S=N=>{N.key==="Escape"&&(N.preventDefault(),a())};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[a]),p.useEffect(()=>{if(g)return;let S=!0;return h(!0),j(null),je(i,e).then(N=>{S&&(_(N),N.affectedPaths.length>0&&C(N.affectedPaths[0]))}).catch(N=>{S&&j(N.message)}).finally(()=>{S&&h(!1)}),()=>{S=!1}},[e,i,g]);const G=w&&d?d.beforeSnapshots[w]??null:null,I=w&&d?d.afterSnapshots[w]??null:null,u=G?o??ye(G,i):null,P=I?o??ye(I,i):null,A=r("uiStudio.history.row.compare","전후 비교");return t.jsx("div",{className:c.compareDialogLayer,"data-testid":"history-compare-dialog-layer",onClick:a,role:"presentation",children:t.jsx("section",{ref:n,className:c.compareDialog,role:"dialog","aria-modal":"true","aria-label":A,tabIndex:-1,onClick:S=>S.stopPropagation(),children:t.jsxs("div",{className:c.beforeAfterDrawer,children:[t.jsxs("div",{className:c.drawerHeader,children:[t.jsx("h2",{className:c.drawerTitle,children:A}),t.jsx("button",{className:c.drawerCloseBtn,onClick:a,type:"button",children:r("uiStudio.history.drawer.close","닫기")})]}),m&&t.jsx("div",{className:c.drawerBody,children:r("uiStudio.history.loading","로딩 중...")}),x&&t.jsx("div",{className:c.drawerBody,children:t.jsx("span",{className:c.mutErr,children:x})}),!m&&!x&&d&&t.jsxs(t.Fragment,{children:[d.affectedPaths.length>0&&t.jsx("div",{className:c.pathTabs,role:"tablist",children:d.affectedPaths.map(S=>t.jsx(y,{text:`${r("uiStudio.compare.path.tooltip","The UI instance path for this screen.")} ${S}`,children:t.jsx("button",{role:"tab","aria-selected":w===S,className:`${c.pathTab} ${w===S?c.pathTabActive:""}`,onClick:()=>C(S),type:"button",children:S.split("/").pop()??S})},S))}),t.jsxs("div",{className:c.comparePanel,children:[t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:r("uiStudio.compare.before.tooltip","The screen saved just before AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:r("uiStudio.compare.before","Before")})}),u?t.jsx("img",{className:c.compareImg,src:u,alt:r("uiStudio.compare.before","Before")}):t.jsx("div",{className:c.comparePlaceholder,children:r("uiStudio.history.row.noBeforeState","이전 상태 없음")})]}),t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:r("uiStudio.compare.after.tooltip","The screen saved just after AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:r("uiStudio.compare.after","After")})}),P?t.jsx("img",{className:c.compareImg,src:P,alt:r("uiStudio.compare.after","After")}):t.jsx("div",{className:c.comparePlaceholder,children:r("uiStudio.history.row.noAfterState","이후 상태 없음")})]})]}),t.jsxs("section",{className:c.compareDetailsPanel,children:[t.jsx("div",{className:c.compareDetailsHeader,children:r("uiStudio.history.drawer.changeDetails","Change details")}),t.jsx(Ge,{mutations:d.mutations,emptyLabel:r("uiStudio.history.row.mutationsEmpty","No change details")})]})]}),t.jsx("div",{className:c.drawerFooter,children:t.jsx("button",{className:c.drawerActionBtn,onClick:a,type:"button",children:r("uiStudio.history.drawer.close","닫기")})})]})})})}function z(e){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),a=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999);return{start:i,end:a}}function fe(e,i){const a=e.split("-").map(Number);if(a.length!==3||a.some(n=>Number.isNaN(n)))return;const[o,l,r]=a;return new Date(o,l-1,r,i?23:0,i?59:0,i?59:0,i?999:0).toISOString()}function Ns(e){const i={limit:50};if(e.action!=="all"&&(i.action=e.action),e.datePreset==="custom"){const a=e.from?fe(e.from,!1):void 0,o=e.to?fe(e.to,!0):void 0;a&&(i.from=a),o&&(i.to=o)}else if(e.datePreset!=="all"){const a=new Date;if(e.datePreset==="today"){const{start:o,end:l}=z(a);i.from=o.toISOString(),i.to=l.toISOString()}else if(e.datePreset==="yesterday"){const o=new Date(a);o.setDate(o.getDate()-1);const{start:l,end:r}=z(o);i.from=l.toISOString(),i.to=r.toISOString()}else{const o=e.datePreset==="7d"?6:29,l=new Date(a);l.setDate(l.getDate()-o);const{start:r}=z(l),{end:n}=z(a);i.from=r.toISOString(),i.to=n.toISOString()}}return i}function Re(){return{action:"all",datePreset:"all"}}function Ps(){const{t:e}=D(),{trackEvent:i}=H(),a=qe(e),[o,l]=p.useState(null),r=o?a.requests.find(d=>d.requestId===o)??null:null,n=p.useCallback((d,_)=>{l(d)},[]),g=p.useCallback(()=>{l(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[t.jsx("div",{className:s.sampleBanner,children:t.jsxs("div",{className:s.sampleBannerRow,children:[t.jsxs("div",{className:s.sampleBannerMain,children:[t.jsx("div",{className:s.sampleBadge,children:e("uiStudio.history.sample.bannerBadge","Preview of the Pro change history")}),t.jsx("div",{className:s.sampleTitle,children:e("uiStudio.history.sample.bannerTitle","You are previewing the UI change history that unlocks after upgrading to Pro.")}),t.jsx("div",{className:s.sampleMessage,children:e("uiStudio.history.sample.bannerMessage","This preview uses sample data. Real change history, before/after comparison, and batch delete unlock with Pro.")})]}),t.jsx("div",{className:s.sampleActions,children:t.jsx("a",{className:s.primaryAction,href:Se.uiStudioHistory,target:"_blank",rel:"noreferrer",title:e("uiStudio.history.sample.tooltip","Full history is available with Pro"),onClick:()=>i("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_history_banner",page:"ui-studio",tab:"ui_studio_history"}),children:e("tier.upgrade","View Pro")})})]})}),t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":o?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx("div",{className:c.listHeader,children:t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(B,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})})}),t.jsx("div",{className:c.requestList,children:a.requests.map(d=>t.jsx(Me,{req:d,placeId:0,onOpenCompare:_=>n(d.requestId,_),imageUrlOverride:ce,sampleMutations:a.mutationsByRequest[d.requestId]},d.requestId))})]}),o&&r&&t.jsx(Ae,{requestId:o,placeId:0,onClose:g,imageUrlOverride:ce,sampleDetail:{...r,mutations:a.mutationsByRequest[r.requestId]??[]}})]})]})}function ks({filter:e,onChange:i}){const{t:a}=D(),o=[{value:"all",label:a("uiStudio.history.filter.actionAll","All"),tooltip:a("uiStudio.history.filter.actionAll.tooltip","Show every kind of action.")},{value:"create_tree",label:a("uiStudio.history.filter.actionCreate","Create"),tooltip:a("uiStudio.history.filter.actionCreate.tooltip","Show only actions that created a new UI.")},{value:"update",label:a("uiStudio.history.filter.actionUpdate","Update"),tooltip:a("uiStudio.history.filter.actionUpdate.tooltip","Show only actions that updated an existing UI.")},{value:"delete",label:a("uiStudio.history.filter.actionDelete","Delete"),tooltip:a("uiStudio.history.filter.actionDelete.tooltip","Show only actions that deleted a UI.")}],l=[{value:"all",label:a("uiStudio.history.filter.dateAll","All"),tooltip:a("uiStudio.history.filter.dateAll.tooltip","Show the full history.")},{value:"today",label:a("uiStudio.history.filter.today","Today"),tooltip:a("uiStudio.history.filter.today.tooltip","Show only changes from today.")},{value:"yesterday",label:a("uiStudio.history.filter.yesterday","Yesterday"),tooltip:a("uiStudio.history.filter.yesterday.tooltip","Show only changes from yesterday.")},{value:"7d",label:a("uiStudio.history.filter.last7Days","Last 7 days"),tooltip:a("uiStudio.history.filter.last7Days.tooltip","Show changes from the last 7 days.")},{value:"30d",label:a("uiStudio.history.filter.last30Days","Last 30 days"),tooltip:a("uiStudio.history.filter.last30Days.tooltip","Show changes from the last 30 days.")},{value:"custom",label:a("uiStudio.history.filter.customRange","Custom range"),tooltip:a("uiStudio.history.filter.customRange.tooltip","Pick a custom start and end date.")}];return t.jsxs("div",{className:c.filterBar,children:[t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(B,{label:a("uiStudio.history.filter.actions","작업 유형"),tooltip:a("uiStudio.history.filter.actions.tooltip","Filter records by the kind of change AI made.")})}),t.jsx("div",{className:c.segmentGroup,children:o.map(r=>t.jsx(y,{text:r.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.action===r.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,action:r.value}),"aria-pressed":e.action===r.value,type:"button",children:r.label})},r.value))})]}),t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(B,{label:a("uiStudio.history.filter.period","Period"),tooltip:a("uiStudio.history.filter.period.tooltip","Filter records by time range.")})}),t.jsx("div",{className:c.segmentGroup,children:l.map(r=>t.jsx(y,{text:r.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.datePreset===r.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,datePreset:r.value,from:r.value==="custom"?e.from:void 0,to:r.value==="custom"?e.to:void 0}),"aria-pressed":e.datePreset===r.value,type:"button",children:r.label})},r.value))})]}),e.datePreset==="custom"&&t.jsxs("div",{className:c.filterGroup,children:[t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-from-date",children:t.jsx(B,{label:a("uiStudio.history.filter.from","시작일"),tooltip:a("uiStudio.history.filter.from.tooltip","Start date for the query.")})}),t.jsx("input",{id:"ui-history-from-date",type:"date",className:c.filterInput,value:e.from??"",onChange:r=>i({...e,from:r.target.value||void 0})}),t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-to-date",children:t.jsx(B,{label:a("uiStudio.history.filter.to","종료일"),tooltip:a("uiStudio.history.filter.to.tooltip","End date for the query.")})}),t.jsx("input",{id:"ui-history-to-date",type:"date",className:c.filterInput,value:e.to??"",onChange:r=>i({...e,to:r.target.value||void 0})})]}),t.jsx(y,{text:a("uiStudio.history.filter.reset.tooltip","Reset all filters to defaults."),children:t.jsx("button",{className:c.filterResetBtn,onClick:()=>i(Re()),type:"button",children:a("uiStudio.history.filter.reset","Reset")})})]})}function Ts(){var E;const{t:e}=D(),{trackEvent:i}=H(),a=Ce(1),o=((E=a.data)==null?void 0:E.placeId)??0,[l,r]=p.useState(Re),{data:n,loading:g,error:d,refresh:_}=za(o,Ns(l)),[m,h]=p.useState(null),[x,j]=p.useState(!1),[w,C]=p.useState(!1),[G,I]=p.useState(null),u=async()=>{I(null);try{await Ve(o,{all:!0,alsoSnapshots:w}),await _(),j(!1)}catch(v){throw I(v.message),v}},P=(n==null?void 0:n.requests)??[],A=te(a.error)||te(d),S=p.useCallback((v,R)=>{i("dashboard_click_event",{click_target:"ui_studio_compare_before_after",page:"ui-studio",tab:"ui_studio_history"}),h(v)},[i]),N=p.useCallback(()=>{h(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[A?t.jsx(Te,{}):t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":m?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx(ks,{filter:l,onChange:r}),t.jsxs("div",{className:c.listHeader,children:[t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(B,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})}),P.length>0&&t.jsx(y,{text:e("uiStudio.history.clear.tooltip","Delete every change record for this project. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:c.clearBtn,onClick:()=>{i("dashboard_click_event",{click_target:"ui_studio_clear_history",page:"ui-studio",tab:"ui_studio_history"}),j(!0)},type:"button",children:e("uiStudio.history.clear","Clear")})})]}),g&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loading","로딩 중...")}),!g&&d&&t.jsxs("div",{className:c.historyError,children:[e("uiStudio.history.error","오류"),": ",d]}),!g&&!d&&P.length===0&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.empty","아직 변경 이력이 없습니다. AI 에이전트가 manage_ui 로 UI 를 수정하면 자동으로 기록됩니다.")}),!g&&P.length>0&&t.jsx("div",{className:c.requestList,children:P.map(v=>t.jsx(Me,{req:v,placeId:o,onOpenCompare:R=>S(v.requestId,R)},v.requestId))}),G&&t.jsx("div",{className:c.deleteErrBanner,children:G})]}),m&&t.jsx(Ae,{requestId:m,placeId:o,onClose:N})]}),x&&t.jsx(se,{title:e("uiStudio.history.confirm.clearRequestsTitle","변경 이력 삭제"),message:e("uiStudio.history.confirm.clearRequestsMessage","현재 place의 변경 이력을 삭제합니다. Studio 인스턴스에는 영향을 주지 않습니다."),danger:!0,cascadeOption:{label:e("uiStudio.history.confirm.cascadeOption","연결된 화면 캡처도 함께 삭제"),checked:w,onChange:C},confirmLabel:e("common.delete","삭제"),onConfirm:u,onClose:()=>j(!1)})]})}function Bs({tier:e}){return e==="basic"?t.jsx(Ps,{}):t.jsx(Ts,{})}const Ds=["analysis","history"];function Es(){const{t:e}=D(),{trackEvent:i}=H(),{tier:a,loading:o}=He(),[l,r]=Oe(),n=l.get("tab"),g=n&&Ds.includes(n)?n:"analysis",d=m=>{i("dashboard_click_event",{click_target:m==="analysis"?"ui_studio_tab_analysis":"ui_studio_tab_history",page:"ui-studio",tab:m==="analysis"?"ui_studio_analysis":"ui_studio_history"}),r(h=>{const x=new URLSearchParams(h);return x.set("tab",m),x})},_=[{key:"analysis",label:t.jsx(y,{text:e("uiStudio.tabs.analysis.tooltip","Browse AI-captured UI screens and quickly find which UIs need improvement."),children:e("uiStudio.tabs.analysis","Analysis")})},{key:"history",label:t.jsx(y,{text:e("uiStudio.tabs.history.tooltip","Every UI change AI made, in order. Compare before and after screens."),children:e("uiStudio.tabs.history","History")})}];return t.jsxs("div",{className:s.page,children:[t.jsx(Ke,{title:e("page.uiStudio.title","UI Studio"),description:e("page.uiStudio.description","Review UI captures, improvement suggestions, and before/after change history."),helpTopicId:"uiStudio",helpState:{tier:a}}),t.jsx(We,{items:_,value:g,onChange:d}),o?t.jsx("div",{className:s.emptyState,children:e("uiStudio.loading","Loading...")}):g==="analysis"?t.jsx(Oa,{tier:a}):t.jsx(Bs,{tier:a})]})}export{Es as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap";._container_6jg7e_2{position:fixed;bottom:16px;right:16px;z-index:2000;display:flex;flex-direction:column-reverse;gap:8px;pointer-events:none}._toast_6jg7e_14{pointer-events:auto;padding:10px 16px;border-radius:var(--radius-sm);font-family:var(--font-label);font-size:13px;color:var(--text-primary);box-shadow:0 4px 12px #0000004d;animation:_slideIn_6jg7e_1 .25s ease-out;max-width:320px}@keyframes _slideIn_6jg7e_1{0%{opacity:0;transform:translate(40px)}to{opacity:1;transform:translate(0)}}._success_6jg7e_39{background:color-mix(in srgb,var(--success) 22%,transparent);border-left:3px solid var(--success)}._info_6jg7e_44{background:color-mix(in srgb,var(--accent) 22%,transparent);border-left:3px solid var(--accent)}._warning_6jg7e_49{background:color-mix(in srgb,var(--warning) 22%,transparent);border-left:3px solid var(--warning)}._error_6jg7e_54{background:var(--error-bg);border-left:3px solid var(--error-border)}._wrapper_x0nim_2{display:inline-flex}._tooltip_x0nim_11{position:fixed;background:var(--bg-card);border:1px solid var(--border);color:var(--text-primary);font-size:12px;padding:4px 8px;border-radius:4px;width:max-content;max-width:min(320px,calc(100vw - 32px));white-space:normal;overflow-wrap:anywhere;text-align:left;pointer-events:none;opacity:0;transition:opacity var(--transition);z-index:1000}._tooltipVisible_x0nim_30{opacity:1}._widget_1q1ab_1{margin:8px 12px 4px;padding:12px;border:1px solid var(--pro-border);border-radius:var(--radius);background:var(--pro-bg-soft);display:flex;flex-direction:column;gap:10px}._header_1q1ab_12{display:flex;align-items:center;gap:8px}._sparkle_1q1ab_18{color:var(--pro-text);flex-shrink:0}._title_1q1ab_23{font-family:var(--font-label);font-size:12px;font-weight:600;color:var(--pro-text);line-height:1.3}._actions_1q1ab_31{display:flex;flex-direction:column;gap:8px}._cta_1q1ab_37,._licenseCta_1q1ab_38{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border-radius:var(--radius-sm);font-family:var(--font-label);font-size:12px;font-weight:700;text-decoration:none;transition:filter var(--transition),transform var(--transition)}._cta_1q1ab_37{background:var(--pro-badge);color:var(--pro-text-on-badge)}._licenseCta_1q1ab_38{border:1px solid var(--pro-border);background:color-mix(in srgb,var(--bg-card) 84%,var(--pro-bg-soft));color:var(--pro-text)}._cta_1q1ab_37:hover,._licenseCta_1q1ab_38:hover{filter:brightness(1.08);transform:translateY(-1px);text-decoration:none}._collapsedGroup_1q1ab_70{display:flex;flex-direction:column;gap:8px;margin:8px 0}._collapsed_1q1ab_70{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;margin:0 auto;border-radius:var(--radius-sm);background:var(--pro-bg-soft);color:var(--pro-text);text-decoration:none;transition:filter var(--transition)}._collapsedSecondary_1q1ab_91{border:1px solid var(--pro-border);background:transparent}._collapsed_1q1ab_70:hover{filter:brightness(1.15);text-decoration:none}._backdrop_1r5ey_1{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;display:grid;place-items:center;padding:24px;background:#0c1018b8}._dialog_1r5ey_11{width:min(560px,100%);max-height:min(720px,calc(100vh - 48px));overflow:auto;border:1px solid var(--border);border-radius:12px;background:var(--bg-overlay);box-shadow:0 24px 48px #0307126b}._header_1r5ey_21{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 20px 12px;border-bottom:1px solid var(--border)}._titleBlock_1r5ey_30{display:grid;gap:6px}._title_1r5ey_30{margin:0;color:var(--text-primary);font-size:18px;line-height:1.3}._subtitle_1r5ey_42{margin:0;color:var(--text-secondary);font-size:13px;line-height:1.5}._closeButton_1r5ey_49{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer}._closeButton_1r5ey_49:hover{color:var(--text-primary)}._body_1r5ey_67{display:grid;gap:16px;padding:18px 20px 20px}._statusBox_1r5ey_73,._errorBox_1r5ey_74{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--bg-secondary);color:var(--text-secondary);line-height:1.5}._errorBox_1r5ey_74{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text)}._spin_1r5ey_92{animation:_spin_1r5ey_92 1s linear infinite}@keyframes _spin_1r5ey_92{to{transform:rotate(360deg)}}._bundleBlock_1r5ey_102{display:grid;gap:8px}._label_1r5ey_107{color:var(--text-secondary);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}._bundleName_1r5ey_115{display:block;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-primary);font-size:13px;line-height:1.5;overflow-wrap:anywhere}._guidanceBox_1r5ey_127{display:grid;gap:8px;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-secondary);font-size:13px;line-height:1.5}._guidanceBox_1r5ey_127 p{margin:0}._includedList_1r5ey_143{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}._includedItem_1r5ey_152{max-width:100%;padding:5px 8px;border:1px solid var(--border);border-radius:999px;color:var(--text-secondary);background:var(--bg-secondary);font-size:12px;overflow-wrap:anywhere}._actions_1r5ey_163{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}._button_1r5ey_169,._primaryLink_1r5ey_170{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:8px;padding:9px 12px;font:inherit;font-size:13px;font-weight:600;text-align:center;text-decoration:none;color:var(--text-primary);background:var(--bg-secondary);cursor:pointer}._primaryLink_1r5ey_170{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}._button_1r5ey_169:hover,._primaryLink_1r5ey_170:hover{color:var(--text-primary);text-decoration:none}._button_1r5ey_169:disabled{cursor:not-allowed;opacity:.6}._hint_1r5ey_206{margin:0;color:var(--text-secondary);font-size:12px;line-height:1.5}@media(max-width:560px){._backdrop_1r5ey_1{padding:12px}._actions_1r5ey_163{grid-template-columns:1fr}}._sidebar_1ei54_2{width:var(--sidebar-width);min-width:var(--sidebar-width);height:100%;display:flex;flex-direction:column;background:var(--bg-sidebar);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-right:1px solid var(--border);padding:0 0 16px;overflow:visible;transition:width var(--transition),min-width var(--transition)}._brand_1ei54_17{display:flex;align-items:center;gap:10px;min-height:var(--header-height);padding:0 16px;border-bottom:1px solid var(--border);margin-bottom:8px;flex-shrink:0}._brandIcon_1ei54_28{color:var(--accent);flex-shrink:0}._brandText_1ei54_33{font-family:var(--font-label);font-size:14px;font-weight:700;color:var(--text-primary);letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._brandTextPro_1ei54_44{color:var(--pro-text);text-shadow:0 0 18px rgba(212,167,44,.18)}._nav_1ei54_50{display:flex;flex-direction:column;gap:2px}._spacer_1ei54_57{flex:1;min-height:16px}._navLink_1ei54_63{display:flex;align-items:center;gap:12px;padding:10px 16px;color:var(--text-secondary);text-decoration:none;font-size:14px;font-weight:500;border-left:4px solid transparent;transition:color var(--transition),background var(--transition),border-color var(--transition)}._navLink_1ei54_63:hover{color:var(--text-primary);background:var(--accent-dim);text-decoration:none}._navLink_1ei54_63._active_1ei54_84{color:var(--accent);border-left-color:var(--accent);background:var(--accent-dim)}._navLink_1ei54_63._disabled_1ei54_91{color:var(--text-muted);pointer-events:none;cursor:default}._navLink_1ei54_63._disabled_1ei54_91:hover{background:transparent}._icon_1ei54_102{width:20px;height:20px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:currentColor}._label_1ei54_113{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._secondaryDivider_1ei54_120{height:1px;margin:4px 16px;background:var(--border)}._secondaryNav_1ei54_127{display:flex;flex-direction:column;gap:2px}._helpDivider_1ei54_134{height:1px;margin:8px 16px 4px;background:var(--border)}._helpGroupTitle_1ei54_141{padding:4px 16px 6px;font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)}._helpNav_1ei54_152{display:flex;flex-direction:column;gap:2px}._externalIcon_1ei54_159{margin-left:auto;display:inline-flex;align-items:center;color:var(--text-muted)}@media(max-width:768px){._sidebar_1ei54_2{width:var(--sidebar-collapsed);min-width:var(--sidebar-collapsed)}._brand_1ei54_17{justify-content:center;padding:0}._brandText_1ei54_33{display:none}._navLink_1ei54_63{justify-content:center;padding:10px 0;gap:0}._label_1ei54_113,._helpGroupTitle_1ei54_141,._externalIcon_1ei54_159{display:none}}._header_4psrj_2{display:flex;flex-direction:column;justify-content:center;gap:4px;height:var(--header-height);padding:8px 24px;border-bottom:1px solid var(--border);background:var(--bg-card);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);flex-shrink:0;overflow:hidden}._row1_4psrj_17{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}._projectIdentity_4psrj_25{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0;flex:1}._folderIcon_4psrj_34{color:var(--accent);flex-shrink:0}._projectName_4psrj_39{margin:0;font-size:15px;font-weight:700;color:var(--text-primary);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:clamp(120px,30vw,360px)}._placeChips_4psrj_51{display:flex;gap:6px;flex-wrap:wrap;min-width:0}._metaActions_4psrj_58{display:flex;align-items:center;gap:8px;flex-shrink:0}._placeChip_4psrj_51{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border:1px solid var(--border);border-radius:var(--radius-pill);background:var(--bg-overlay);color:var(--text-secondary);font-size:12px;font-weight:600;line-height:1.4;cursor:default}._placeChipStatic_4psrj_81,._placeChipMuted_4psrj_82{cursor:default}._placeChipActive_4psrj_86{border-color:var(--border-highlight);color:var(--text-primary);background:var(--accent-dim);box-shadow:0 0 0 1px var(--accent-glow) inset}._placeChipInactive_4psrj_93{border-color:var(--border);color:var(--text-muted);opacity:.85}._placeChipMuted_4psrj_82{border-color:var(--border);color:var(--text-muted)}._placeChipId_4psrj_104{font-family:var(--font-code);font-weight:500;font-size:11px;color:var(--text-muted);padding-left:6px;margin-left:2px;border-left:1px solid var(--border)}._placeChipActive_4psrj_86 ._placeChipId_4psrj_104{color:var(--text-secondary);border-left-color:var(--border-highlight)}._placeDot_4psrj_119{width:7px;height:7px;border-radius:var(--radius-pill);background:var(--success);box-shadow:0 0 6px var(--success)}._placeChipName_4psrj_127{white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis}._row2_4psrj_135{display:flex;align-items:center;gap:16px;min-width:0}._pathGroup_4psrj_142{display:flex;align-items:center;gap:10px;min-width:0;flex:1}._projectPath_4psrj_150{font-family:var(--font-code);font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}._changeButton_4psrj_160{display:inline-flex;align-items:center;justify-content:center;height:26px;padding:0 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-overlay);color:var(--text-primary);font:inherit;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._changeButton_4psrj_160:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent)}._changeButton_4psrj_160:disabled{cursor:not-allowed;opacity:.52}._iconButton_4psrj_193{position:relative;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-overlay);color:var(--text-primary);text-decoration:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._iconButton_4psrj_193:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent);text-decoration:none}._notificationDot_4psrj_218{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:var(--radius-pill);background:var(--error);box-shadow:0 0 0 2px var(--bg-overlay)}@media(max-width:768px){._header_4psrj_2{padding:10px 16px}._row1_4psrj_17,._projectIdentity_4psrj_25{gap:8px}._row2_4psrj_135{flex-direction:column;align-items:flex-start;gap:8px}._pathGroup_4psrj_142{width:100%}}._bellWrapper_tae21_2{position:relative;display:inline-flex}._unreadDot_tae21_8{position:absolute;top:4px;right:4px;width:8px;height:8px;border-radius:50%;background:var(--error);border:2px solid var(--bg-card);pointer-events:none}._backdrop_1ozbv_1{position:fixed;top:0;right:0;bottom:0;left:0;background:#0c1018b8;display:grid;place-items:center;z-index:1000;padding:24px}._modal_1ozbv_12{width:min(420px,100%);background:var(--bg-overlay);border:1px solid var(--border);border-radius:18px;box-shadow:0 24px 48px #0307126b;padding:24px}._title_1ozbv_23{margin:0 0 12px;color:var(--text-primary);font-size:20px}._message_1ozbv_30{margin:0;color:var(--text-secondary);line-height:1.6}._actions_1ozbv_37{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}._cancelButton_1ozbv_44,._confirmButton_1ozbv_45{border:0;border-radius:var(--radius);padding:10px 14px;font:inherit;cursor:pointer}._cancelButton_1ozbv_44{background:var(--border);border:1px solid transparent;color:var(--text-primary)}._confirmButton_1ozbv_45{background:var(--error-bg);border:1px solid var(--error-border);color:var(--error-text)}._cancelButton_1ozbv_44:disabled,._confirmButton_1ozbv_45:disabled{cursor:not-allowed;opacity:.6}._pathBlock_1ozbv_75{display:grid;gap:6px}._pathLabel_1ozbv_80{font-size:12px;font-weight:700;color:var(--text-secondary)}._pathCode_1ozbv_86{display:block;overflow-wrap:anywhere;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-size:12px;line-height:1.5}._bodyGrid_1ozbv_98{display:grid;gap:14px;margin-top:18px}._warningList_1ozbv_104{margin:0;padding-left:18px;color:var(--text-secondary);line-height:1.6}._errorMessage_1ozbv_111{margin-top:0;color:var(--error-text)}._layout_ya8ln_2{display:flex;height:100%;overflow:hidden}._mainShell_ya8ln_8{flex:1;min-width:0;display:flex;flex-direction:column;overflow:visible}._content_ya8ln_17{flex:1 1 auto;min-height:0;overflow-y:auto;padding:24px}._loading_ya8ln_25{display:flex;align-items:center;justify-content:center;height:100%;color:var(--text-muted);font-size:14px}:root{--bg-primary: #0b0e1a;--bg-secondary: #0f1525;--bg-card: #111827;--bg-sidebar: rgba(11, 14, 26, .95);--bg-overlay: rgba(15, 21, 37, .88);--text-primary: #e2e8f0;--text-secondary: #94a3b8;--text-muted: #475569;--border: #1e293b;--border-highlight: #2563eb;--accent: #3b82f6;--accent-dim: rgba(59, 130, 246, .12);--accent-glow: rgba(59, 130, 246, .25);--pro-badge: #d4a72c;--pro-text: #f3d46b;--pro-text-on-badge: #1a1407;--pro-bg: #3a2d12;--pro-bg-soft: rgba(212, 167, 44, .12);--pro-border: #8f6f1f;--success: #22c55e;--success-bg: rgba(34, 197, 94, .14);--success-border: rgba(34, 197, 94, .5);--success-text: #86efac;--warning: #f59e0b;--warning-bg: rgba(245, 158, 11, .14);--warning-border: rgba(245, 158, 11, .5);--warning-text: #fcd34d;--info: #60a5fa;--info-bg: rgba(96, 165, 250, .14);--info-border: rgba(96, 165, 250, .5);--info-text: #93c5fd;--error: #ef4444;--error-bg: rgba(239, 68, 68, .12);--error-border: rgba(239, 68, 68, .5);--error-text: #f4c1c1;--danger: #d15454;--danger-bg: rgba(209, 84, 84, .12);--danger-border: rgba(209, 84, 84, .5);--danger-text: #f4c1c1;--danger-hover-bg: rgba(209, 84, 84, .2);--diff-add: var(--success);--diff-add-bg: var(--success-bg);--diff-add-text: var(--success-text);--diff-remove: var(--error);--diff-remove-bg: var(--error-bg);--diff-remove-text: var(--error-text);--diff-update: var(--warning);--diff-update-bg: var(--warning-bg);--diff-update-text: var(--warning-text);--diff-rename: var(--info);--diff-rename-bg: var(--info-bg);--diff-rename-text: var(--info-text);--font-code: "JetBrains Mono", "Fira Code", monospace;--font-label: "Inter", "DM Sans", -apple-system, sans-serif;--sidebar-width: 220px;--sidebar-collapsed: 56px;--header-height: 72px;--content-max: 1080px;--content-gap: 16px;--radius: 10px;--radius-sm: 6px;--radius-pill: 999px;--transition: .2s ease}@media(prefers-color-scheme:light){:root{--bg-primary: #f1f5f9;--bg-secondary: #ffffff;--bg-card: #ffffff;--bg-sidebar: rgba(255, 255, 255, .95);--bg-overlay: rgba(255, 255, 255, .95);--text-primary: #0f172a;--text-secondary: #475569;--text-muted: #94a3b8;--border: #e2e8f0;--border-highlight: #3b82f6;--accent: #2563eb;--accent-dim: rgba(37, 99, 235, .08);--accent-glow: rgba(37, 99, 235, .15);--pro-badge: #b07c00;--pro-text: #8a5f00;--pro-text-on-badge: #1a1407;--pro-bg: #fff4d6;--pro-bg-soft: rgba(176, 124, 0, .12);--pro-border: #d9b14d;--success: #16a34a;--success-bg: rgba(22, 163, 74, .1);--success-border: rgba(22, 163, 74, .4);--success-text: #166534;--warning: #d97706;--warning-bg: rgba(217, 119, 6, .1);--warning-border: rgba(217, 119, 6, .4);--warning-text: #92400e;--info: #2563eb;--info-bg: rgba(37, 99, 235, .1);--info-border: rgba(37, 99, 235, .4);--info-text: #1d4ed8;--error: #dc2626;--error-bg: rgba(220, 38, 38, .08);--error-border: rgba(220, 38, 38, .3);--error-text: #b91c1c;--danger: #dc2626;--danger-bg: rgba(220, 38, 38, .08);--danger-border: rgba(220, 38, 38, .4);--danger-text: #b91c1c;--danger-hover-bg: rgba(220, 38, 38, .16)}}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;font-family:var(--font-label);background:var(--bg-primary);color:var(--text-primary);line-height:1.5;-webkit-font-smoothing:antialiased}#root{height:100%}code,pre,.mono{font-family:var(--font-code)}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{font-family:inherit;cursor:pointer}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
|