@weppy/roblox-mcp 2.11.2 → 2.12.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 +25 -0
- package/README.md +17 -4
- package/dashboard/dist/assets/{AssetsPage-O4fuVc8N.js → AssetsPage-DnMPjYnI.js} +1 -1
- package/dashboard/dist/assets/{ChangelogDetailPage-rC1KFRqD.js → ChangelogDetailPage-wOW2p_bi.js} +1 -1
- package/dashboard/dist/assets/{ChangelogPage-CjVIKM_I.js → ChangelogPage-Bqesm1RS.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-DzzePbJa.js → ConfirmModal-Ca_Jx1Np.js} +1 -1
- package/dashboard/dist/assets/{ConnectionPage-DkAYL5lD.js → ConnectionPage-B3UgV_LY.js} +1 -1
- package/dashboard/dist/assets/ControlsPage-DafNZ79n.js +6 -0
- package/dashboard/dist/assets/{CurrentPlaceScope-ILgcdBgL.js → CurrentPlaceScope-B3Jcq1x_.js} +1 -1
- package/dashboard/dist/assets/{GameChangeDetail-D5DL-c5w.js → GameChangeDetail-yngTJA2H.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-DANjLZ88.js → InfoLabel-B7ZSx6u2.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-DHFQ-W9q.js → OverviewPage-XoLRIqct.js} +1 -1
- package/dashboard/dist/assets/PageHeader-0cqG2PEX.js +6 -0
- package/dashboard/dist/assets/{PlaytestPage-kN109lxu.js → PlaytestPage-CLr4FbdX.js} +1 -1
- package/dashboard/dist/assets/SettingsPage-BR71s-WH.css +1 -0
- package/dashboard/dist/assets/SettingsPage-D50mSMpC.js +1 -0
- package/dashboard/dist/assets/{StatusBadge-It13fqQV.js → StatusBadge-CenFXcbO.js} +1 -1
- package/dashboard/dist/assets/{SyncPage-BLb2y3a-.js → SyncPage-3VfsXSAB.js} +1 -1
- package/dashboard/dist/assets/{Tabs-B_vNTq0e.js → Tabs-C6KgB85r.js} +1 -1
- package/dashboard/dist/assets/{ToolsPage-CyrmKGlr.js → ToolsPage-Wya7O-1C.js} +1 -1
- package/dashboard/dist/assets/{TooltipText-WYIcU5Ix.js → TooltipText-YDig3E2P.js} +1 -1
- package/dashboard/dist/assets/{UiPrimitive-CoOY1M8-.js → UiPrimitive-_I4FkOJy.js} +1 -1
- package/dashboard/dist/assets/{UiStudioPage-BMIAX-ik.js → UiStudioPage-DntH7wMe.js} +1 -1
- package/dashboard/dist/assets/{WhatsNewPage-CGo7UGNR.js → WhatsNewPage-hjoGNMqF.js} +1 -1
- package/dashboard/dist/assets/{copy-DD_Ti5vm.js → copy-LteGG3Jy.js} +1 -1
- package/dashboard/dist/assets/index-CtLyZZKX.js +698 -0
- package/dashboard/dist/assets/index-jDDNKuJU.css +1 -0
- package/dashboard/dist/assets/{sample-requests-BxROai7H.js → sample-requests-_5Ss5L0Z.js} +1 -1
- package/dashboard/dist/assets/{useLiveUptime-C-QraLBj.js → useLiveUptime-sXHLge7C.js} +1 -1
- package/dashboard/dist/assets/useSettings-7vvqoIou.js +1 -0
- package/dashboard/dist/assets/useSettings-BNH9ENDy.css +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/index.js +214 -116
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/ControlsPage-iUVigyLq.js +0 -1
- package/dashboard/dist/assets/PageHeader-CIEYGd1d.js +0 -6
- package/dashboard/dist/assets/SettingsPage-BKk40N3D.js +0 -1
- package/dashboard/dist/assets/SettingsPage-ByHSUA7b.css +0 -1
- package/dashboard/dist/assets/index-DRw0NuYR.js +0 -682
- package/dashboard/dist/assets/index-DzkZyWCv.css +0 -1
- package/dashboard/dist/assets/useSettings-C7K0TrFY.js +0 -1
- package/dashboard/dist/assets/useSettings-uLUwCzcr.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weppy/roblox-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server for Roblox Studio integration - enables AI coding agents to interact with Roblox Studio in real-time",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as T,j as e,f as W,l as q,d as _,r,v as z,w as Q,x as X,a as H,s as K,y as Z,k as A,N as J}from"./index-DRw0NuYR.js";import{P as ee}from"./PageHeader-CIEYGd1d.js";import{I as N}from"./InfoLabel-DANjLZ88.js";import{s as g}from"./ConfirmModal.module-DJksQHBd.js";import{T as B}from"./TooltipText-WYIcU5Ix.js";import{s as o,u as te}from"./useSettings-C7K0TrFY.js";import{C as M}from"./copy-DD_Ti5vm.js";import"./UiPrimitive-CoOY1M8-.js";function k(n,a){return e.jsxs("div",{className:g.pathBlock,children:[e.jsx("span",{className:g.pathLabel,children:n}),e.jsx("code",{className:g.pathCode,children:a})]})}function oe(n){const t=/^[A-Z]:\\/i.test(n)||n.includes("\\")?"\\":"/";return`${n.replace(/[\\/]+$/,"")}${t}weppy-project-sync`}function ne({open:n,step:a,selectedProjectRoot:t,studioConnected:c,loading:d=!1,errorMessage:p=null,onClose:s,onPick:h,onApply:j}){const{t:l}=T();if(!n)return null;const S=t?oe(t):"";return e.jsx("div",{className:g.backdrop,onClick:d?void 0:s,role:"presentation",children:e.jsxs("div",{className:g.modal,onClick:y=>y.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"project-root-change-modal-title",children:[e.jsx("h2",{id:"project-root-change-modal-title",className:g.title,children:a==="initial"?l("header.projectRootModal.initial.title","Change project root"):l("header.projectRootModal.confirm.title","Confirm new project root")}),e.jsx("p",{className:g.message,children:a==="initial"?c?l("header.projectRootModal.initial.body.connected","MCP will switch to the new project root and resync current Studio contents into the new target."):l("header.projectRootModal.initial.body.disconnected","MCP will switch to the new project root and use the new folder as the next sync target."):l("header.projectRootModal.confirm.body","Review the selected project folder before applying.")}),e.jsxs("div",{className:g.bodyGrid,children:[a==="initial"?e.jsxs(e.Fragment,{children:[k(l("header.projectRootModal.initial.nextSyncRoot","New sync target after selection"),l("header.projectRootModal.initial.nextSyncRoot.placeholder","<selected project folder>/weppy-project-sync")),e.jsxs("ul",{className:g.warningList,children:[c?e.jsxs(e.Fragment,{children:[e.jsx("li",{children:l("header.projectRootModal.initial.warningStop","Current sync stops immediately.")}),e.jsx("li",{children:l("header.projectRootModal.initial.warningFreshSync","The current Studio contents will be used to build a fresh full sync in the new target.")})]}):e.jsx("li",{children:l("header.projectRootModal.initial.warningDeferredSync","If Studio is not connected, full resync starts the next time the plugin connects.")}),e.jsx("li",{children:l("header.projectRootModal.initial.warningNoMove","Old sync folders are not moved automatically.")})]})]}):e.jsxs(e.Fragment,{children:[k(l("header.projectRootModal.confirm.projectRoot","Selected project folder"),t??""),k(l("header.projectRootModal.confirm.syncRoot","New sync target"),S),e.jsx("p",{className:g.message,children:l("header.projectRootModal.confirm.warningNoMove","Existing sync folders are not moved automatically.")})]}),p?e.jsx("p",{className:`${g.message} ${g.errorMessage}`,children:p}):null]}),e.jsxs("div",{className:g.actions,children:[e.jsx("button",{className:g.cancelButton,onClick:s,disabled:d,children:l("header.projectRootModal.cancel","Cancel")}),a==="initial"?e.jsx("button",{className:g.confirmButton,onClick:h,disabled:d,children:d?"...":l("header.projectRootModal.pick","Choose folder")}):e.jsx("button",{className:g.confirmButton,onClick:j,disabled:d||!t,children:d?"...":l("header.projectRootModal.apply","Apply change")})]})]})})}function F(n,a){if(n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"){const t=n.message.trim();if(t.length>0)return t}return a}function se(){const{level:n,status:a}=W(),{t}=T(),{show:c}=q(),{search:d}=_(),p=r.useRef(null),[s,h]=r.useState(null),[j,l]=r.useState(!1),[S,y]=r.useState(null),[m,R]=r.useState(null),[f,v]=r.useState(!1),[w,L]=r.useState(!1),[I,x]=r.useState(null),i=r.useMemo(()=>new URLSearchParams(d).get("section")==="project-root",[d]),C=r.useCallback(async()=>{if(n==="disconnected"){h(null),l(!1);return}l(!1);try{const u=await z();h(u)}catch{h(null),l(!0)}},[n]);r.useEffect(()=>{C()},[C,a==null?void 0:a.connectedClients,a==null?void 0:a.sessionId]),r.useEffect(()=>{var u,P,O;i&&((P=(u=p.current)==null?void 0:u.scrollIntoView)==null||P.call(u,{block:"start",behavior:"smooth"}),(O=p.current)==null||O.focus())},[i]);const b=(u=!1)=>{!u&&(f||w)||(y(null),R(null),x(null))},E=()=>{n==="disconnected"||!s||(x(null),R(null),y("initial"))},Y=async()=>{v(!0),x(null);try{const u=await X();if(u.cancelled||!u.projectRoot){b(!0);return}R(u.projectRoot),y("confirm")}catch(u){x(F(u,t("header.projectRootModal.error","Failed to change project root")))}finally{v(!1)}},G=async()=>{if(m){L(!0),x(null);try{const u=await Q(m);h(u),l(!1),b(!0)}catch(u){const P=F(u,t("header.projectRootModal.error","Failed to change project root"));x(P),c(P,"error")}finally{L(!1)}}},$=j?t("controls.projectRoot.unavailable","Project root unavailable"):t("common.loading","Loading..."),V=n==="disconnected"||!s;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"controls-project-root",ref:p,tabIndex:-1,className:o.card,children:[e.jsxs("div",{className:o.cardHeader,children:[e.jsx(N,{label:t("controls.projectRoot.title","Project Root"),tooltip:t("controls.projectRoot.title.tooltip","Authoritative project root and sync target used by MCP.")}),e.jsx(B,{text:t("controls.projectRoot.live.tooltip","Changing this updates MCP runtime state immediately after confirmation."),children:e.jsx("span",{className:`${o.headerBadge} ${o.headerBadgeLive}`,children:t("settings.general.liveApply","Live Apply")})})]}),e.jsxs("dl",{className:o.controlGrid,children:[e.jsx("dt",{children:t("controls.projectRoot.projectRoot","Project Root")}),e.jsx("dd",{children:(s==null?void 0:s.projectRoot)??$}),e.jsx("dt",{children:t("controls.projectRoot.syncRoot","Sync Root")}),e.jsx("dd",{children:(s==null?void 0:s.projectSyncRoot)??$})]}),e.jsx("p",{className:o.controlHint,children:t("controls.projectRoot.hint","Use this only when MCP should write sync data under a different project folder. Existing sync folders are not moved automatically.")}),e.jsx("button",{type:"button",className:o.actionBtn,disabled:V,onClick:E,children:t("header.changeProjectRoot","Change Project Root")})]}),e.jsx(ne,{open:S!==null,step:S??"initial",selectedProjectRoot:m,studioConnected:n==="studioConnected",loading:f||w,errorMessage:I,onClose:b,onPick:Y,onApply:G})]})}function ie(n){if(!n)return null;const a=n.placeName?n.placeId!==void 0?`${n.placeName} · ${n.placeId}`:n.placeName:n.placeId!==void 0?String(n.placeId):null;return a?`${n.targetAlias} · ${a}`:n.targetAlias}function U(n,a){const t=Math.max(0,Math.floor((Date.now()-n)/1e3));return t<60?`${t}${a("connection.time.secondsAgo","s ago")}`:t<3600?`${Math.floor(t/60)}${a("connection.time.minutesAgo","m ago")}`:`${Math.floor(t/3600)}${a("connection.time.hoursAgo","h ago")}`}function ae(){const{status:n,level:a}=W(),{t}=T(),{show:c}=q(),{search:d}=_(),p=r.useRef(null),[s,h]=r.useState(null),[j,l]=r.useState(null),S=r.useMemo(()=>new URLSearchParams(d).get("section")==="studio-routing",[d]),y=r.useCallback(async()=>{if(a==="disconnected"){h(null);return}try{const i=await H.get("/api/dashboard/studio-routing");h(i)}catch{h(null)}},[a]);r.useEffect(()=>{y()},[y,n==null?void 0:n.connectedClients,n==null?void 0:n.sessionId]),r.useEffect(()=>{var i,C,b;S&&((C=(i=p.current)==null?void 0:i.scrollIntoView)==null||C.call(i,{block:"start",behavior:"smooth"}),(b=p.current)==null||b.focus())},[S]);const m=(s==null?void 0:s.studioRoutingMode)??(n==null?void 0:n.studioRoutingMode)??"recentPriority",R=(s==null?void 0:s.pinnedTargetClientId)??(n==null?void 0:n.pinnedTargetClientId)??null,f=K((s==null?void 0:s.targets)??(n==null?void 0:n.pluginClients)??[],m,R),v=(s==null?void 0:s.priorityTarget)??Z(f,m,R),w=ie(v),L=new Set(f.filter(i=>i.placeId!==void 0).map(i=>i.placeId).filter((i,C,b)=>b.filter(E=>E===i).length>1)),I=async i=>{l(i.studioRoutingMode==="pinned"?i.pinnedTargetClientId??"pinned":"recentPriority");try{const C=await H.patch("/api/dashboard/studio-routing",i);h(C)}catch{c(t("connection.routing.updateFailed","Failed to update routing target"),"error")}finally{l(null)}},x=async i=>{try{await navigator.clipboard.writeText(i),c(t("connection.targets.copied","Copied value"),"success")}catch{c(t("connection.targets.copyFailed","Failed to copy value"),"error")}};return e.jsxs("div",{id:"controls-studio-routing",ref:p,tabIndex:-1,className:o.card,children:[e.jsx("div",{className:o.cardHeader,children:e.jsx(N,{label:t("controls.studioRouting.title","Studio Routing"),tooltip:t("controls.studioRouting.title.tooltip","Routing priority for MCP requests that do not name a Studio target.")})}),e.jsxs("div",{className:o.routingOverview,children:[e.jsxs("div",{className:o.routingOverviewCopy,children:[e.jsx("span",{className:o.routingEyebrow,children:t("controls.studioRouting.priorityTitle","Priority for requests without a named Studio target")}),e.jsx("strong",{children:m==="pinned"?t("connection.routing.pinned","Manual: Pinned Studio"):t("connection.routing.recentPriority","Automatic: Recent priority")}),e.jsx("p",{children:t("controls.studioRouting.priorityDescription","Explicit Studio ID, Connection ID, or Place ID requests bypass this priority setting and route to the named Studio.")})]}),e.jsxs("div",{className:o.priorityTargetSummary,children:[e.jsx("span",{children:t("controls.studioRouting.currentPriorityTarget","Current priority target")}),e.jsx("strong",{children:w??t("controls.studioRouting.noPriorityTarget","No connected Studio target")})]})]}),e.jsxs("div",{className:o.studioRoutingChoiceControl,role:"group","aria-label":t("connection.routing.priorityControl","Priority mode for requests without a named Studio target"),children:[e.jsxs("button",{type:"button",className:m==="recentPriority"?o.segmentActive:o.segment,disabled:j!==null,"aria-pressed":m==="recentPriority",onClick:()=>I({studioRoutingMode:"recentPriority"}),children:[e.jsx("span",{children:t("connection.routing.recentPriority","Automatic: Recent priority")}),e.jsx("small",{children:t("controls.studioRouting.recentPriorityHelp","Requests the highest-priority active Studio, based on recent routed commands and connection order.")})]}),e.jsxs("button",{type:"button",className:m==="pinned"?o.segmentActive:o.segment,disabled:!f.length||j!==null,"aria-pressed":m==="pinned",onClick:()=>I({studioRoutingMode:"pinned"}),children:[e.jsx("span",{children:t("connection.routing.pinned","Manual: Pinned Studio")}),e.jsx("small",{children:t("controls.studioRouting.pinnedHelp","Requests the pinned Studio unless the agent names a Studio ID, Connection ID, or Place ID.")})]})]}),L.size>0?e.jsx("p",{className:o.routingWarning,children:t("controls.studioRouting.duplicatePlaceWarning","More than one connected Studio window has the same Place ID. Ask the AI agent to use Studio ID for that place.")}):null,e.jsx("div",{className:o.tableWrap,children:e.jsxs("table",{className:o.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:t("connection.targets.routing","Routing")}),e.jsx("th",{children:t("connection.targets.target","Studio ID")}),e.jsx("th",{children:t("connection.targets.place","Place")}),e.jsx("th",{children:t("connection.targets.placeId","Place ID")}),e.jsx("th",{children:t("connection.targets.lastUsed","Last Used")}),e.jsx("th",{children:t("connection.targets.lastSeen","Last Seen")}),e.jsx("th",{children:t("connection.targets.clientId","Connection ID")})]})}),e.jsx("tbody",{children:f.length>0?f.map(i=>e.jsxs("tr",{children:[e.jsx("td",{children:m==="pinned"&&R===i.clientId?e.jsx("span",{className:o.routingBadge,children:t("connection.routing.pinnedBadge","Pinned")}):m==="recentPriority"&&(v==null?void 0:v.clientId)===i.clientId?e.jsx("span",{className:o.routingBadge,children:t("connection.routing.priorityBadge","Priority")}):m==="pinned"?e.jsx("button",{type:"button",className:o.setPriorityTargetButton,disabled:j!==null,onClick:()=>I({studioRoutingMode:"pinned",pinnedTargetClientId:i.clientId}),children:t("connection.routing.setPriorityTarget","Set as priority target")}):null}),e.jsxs("td",{children:[e.jsx("span",{className:o.monoMuted,title:i.clientId,children:i.targetAlias}),e.jsx(A,{text:t("connection.targets.copyTargetAlias","Copy Studio ID"),children:e.jsx("button",{type:"button",className:o.copyIconButton,"aria-label":t("connection.targets.copyTargetAlias","Copy Studio ID"),onClick:()=>x(i.targetAlias),children:e.jsx(M,{size:13,"aria-hidden":"true"})})})]}),e.jsx("td",{children:i.placeName??"-"}),e.jsxs("td",{children:[i.placeId??"-",i.placeId!==void 0?e.jsx(A,{text:t("connection.targets.copyPlaceId","Copy Place ID"),children:e.jsx("button",{type:"button",className:o.copyIconButton,"aria-label":t("connection.targets.copyPlaceId","Copy Place ID"),onClick:()=>x(String(i.placeId)),children:e.jsx(M,{size:13,"aria-hidden":"true"})})}):null]}),e.jsx("td",{children:i.lastRoutedAt?U(i.lastRoutedAt,t):"-"}),e.jsx("td",{children:U(i.lastSeen,t)}),e.jsxs("td",{children:[e.jsx("span",{className:o.monoMuted,title:i.clientId,children:i.clientId.slice(0,10)}),e.jsx(A,{text:t("connection.targets.copyClientId","Copy Connection ID"),children:e.jsx("button",{type:"button",className:o.copyIconButton,"aria-label":t("connection.targets.copyClientId","Copy Connection ID"),onClick:()=>x(i.clientId),children:e.jsx(M,{size:13,"aria-hidden":"true"})})})]})]},i.clientId)):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:o.emptyRow,children:t("connection.targets.none","No Studio targets connected. Open Roblox Studio and connect WEPPY Plugin.")})})})]})})]})}const le=["debug","info","warn","error"];function D({checked:n,onChange:a,testId:t,ariaLabel:c}){return e.jsxs("label",{className:o.toggleSwitch,"data-testid":t,children:[e.jsx("input",{type:"checkbox",className:o.toggleInput,checked:n,"aria-label":c,onChange:d=>a(d.target.checked)}),e.jsx("span",{className:o.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:o.toggleThumb})})]})}function re({settings:n,updateHotSetting:a}){const{t}=T(),[c,d]=r.useState(null),p=r.useCallback(async(s,h)=>{await a(s,h),d(s),setTimeout(()=>d(j=>j===s?null:j),2e3)},[a]);return e.jsxs("div",{className:o.card,children:[e.jsxs("div",{className:o.cardHeader,children:[e.jsx(N,{label:t("settings.general.title","General Settings"),tooltip:t("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(B,{text:t("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${o.headerBadge} ${o.headerBadgeLive}`,children:t("settings.general.liveApply","Live Apply")})})]}),n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:o.settingRow,children:[e.jsx("span",{className:o.settingLabel,children:e.jsx(N,{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:o.settingControl,children:[e.jsx("select",{className:o.select,value:n.hot.LOG_LEVEL,onChange:s=>p("LOG_LEVEL",s.target.value),children:le.map(s=>e.jsx("option",{value:s,children:s},s))}),c==="LOG_LEVEL"&&e.jsx("span",{className:o.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:o.settingRow,children:[e.jsx("span",{className:o.settingLabel,children:e.jsx(N,{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:o.settingControl,children:[e.jsx("span",{className:`${o.savedIndicator} ${c==="ENABLE_LOCAL_HISTORY"?"":o.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(D,{checked:n.hot.ENABLE_LOCAL_HISTORY,ariaLabel:t("settings.general.localHistory","Tool History Recording"),testId:"settings-toggle-enable-local-history",onChange:s=>p("ENABLE_LOCAL_HISTORY",s)})]})]}),e.jsxs("div",{className:o.settingRow,children:[e.jsx("span",{className:o.settingLabel,children:e.jsx(N,{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:o.settingControl,children:[e.jsx("span",{className:`${o.savedIndicator} ${c==="ENABLE_LOCAL_STATISTICS"?"":o.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(D,{checked:n.hot.ENABLE_LOCAL_STATISTICS,ariaLabel:t("settings.general.localStatistics","Tool Statistics Collection"),testId:"settings-toggle-enable-local-statistics",onChange:s=>p("ENABLE_LOCAL_STATISTICS",s)})]})]}),e.jsxs("div",{className:o.settingRow,children:[e.jsx("span",{className:o.settingLabel,children:e.jsx(N,{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:o.settingControl,children:[e.jsx("span",{className:`${o.savedIndicator} ${c==="ENABLE_CONTEXT_CAPTURE"?"":o.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(D,{checked:n.hot.ENABLE_CONTEXT_CAPTURE,ariaLabel:t("settings.general.contextCapture","Context Capture"),testId:"settings-toggle-enable-context-capture",onChange:s=>p("ENABLE_CONTEXT_CAPTURE",s)})]})]}),e.jsxs("div",{className:o.settingRow,children:[e.jsx("span",{className:o.settingLabel,children:e.jsx(N,{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:o.settingControl,children:[e.jsx("input",{type:"number",className:o.numberInput,value:n.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:s=>{const h=parseInt(s.target.value,10);isNaN(h)||p("REQUEST_TIMEOUT",h)}}),e.jsx(B,{text:t("settings.general.requestTimeout.unit.tooltip","Action timeout is measured in milliseconds."),children:e.jsx("span",{className:o.unit,children:t("settings.general.requestTimeout.unit","ms")})}),c==="REQUEST_TIMEOUT"&&e.jsx("span",{className:o.savedIndicator,children:t("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:o.loading,children:t("settings.unavailable")})]})}function xe(){const{t:n}=T(),{search:a}=_(),{settings:t,updateHotSetting:c,loading:d}=te();return r.useMemo(()=>new URLSearchParams(a).get("section"),[a])==="license"?e.jsx(J,{to:"/settings?section=license",replace:!0}):d?e.jsx("div",{className:o.page,children:e.jsx("div",{className:o.loading,children:n("common.loading")})}):e.jsxs("div",{className:o.page,children:[e.jsx(ee,{title:n("page.controls.title","Controls"),description:n("page.controls.description","Manage project root, Studio routing, and MCP live settings."),helpTopicId:"controls"}),e.jsx(se,{}),e.jsx(ae,{}),e.jsx(re,{settings:t,updateHotSetting:c})]})}export{xe as Component};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{i as Z,u as ee,e as te,r as p,j as t,X as oe,E as ne,J as se}from"./index-DRw0NuYR.js";import{I as $,a as ae}from"./UiPrimitive-CoOY1M8-.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 re=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],X=Z("circle-question-mark",re),N={"studio.mesh_image_apis":{action:'In Studio, open File → Experience Settings → Security and enable "Allow Mesh / Image APIs".'},"open_cloud.api_key":{action:"In Roblox Creator Hub, create an API key, add Assets under Access Permissions, enable both Read and Write, then save and test the key in WEPPY Assets settings.",docsUrl:"https://create.roblox.com/docs/cloud/auth/api-keys"},"open_cloud.assets":{docsUrl:"https://create.roblox.com/docs/cloud/guides/usage-assets"}},a={canDo:{key:"dashboardHelp.section.canDo",fallback:"What you can do here"},needs:{key:"dashboardHelp.section.needs",fallback:"What you need to use it"},currentState:{key:"dashboardHelp.section.currentState",fallback:"Check based on current status"}},le=N["studio.mesh_image_apis"],z=N["open_cloud.api_key"],ie=N["open_cloud.assets"],ce=z.docsUrl,de=ie.docsUrl,ue="https://create.roblox.com/docs/cloud/reference/features/assets",pe="https://create.roblox.com/docs/reference/engine/classes/DataModel#CreatorId",he="https://create.roblox.com/docs/reference/engine/classes/Player#UserId",fe="https://create.roblox.com/docs/projects/groups",ge="https://create.roblox.com/docs/cloud/reference/features/groups";function g(e,s,n,h){return{id:e,title:{key:`dashboardHelp.${e}.title`,fallback:s},sections:n,links:h}}function l(e,s,n,h){return{heading:e,items:h.map((i,b)=>({key:`dashboardHelp.${s}.${n}.${b+1}`,fallback:i}))}}function r(e,s,n){return{heading:a.currentState,items:[{key:`dashboardHelp.${e}.currentState.${s}`,fallback:n}]}}function v(e,s,n,h,i,b){return g(e,s,[l(a.canDo,e,"canDo",n),l(a.needs,e,"needs",h),l(a.currentState,e,"currentState",i)],b)}function ye(e){return e.tier==="basic"?r("assets","basic","Activate Pro before uploading to Roblox."):e.uploadEnabled===!1?r("assets","uploadDisabled","Turn on API Key local upload in Assets settings."):e.hasOpenCloudCredential===!1?r("assets","noCredential","Save and test an Open Cloud API Key."):e.hasDefaultCreator===!1?r("assets","noCreator","Save a default Creator ID or enter Creator details during upload."):r("assets","default","Open an asset detail dialog to start upload or usage scan.")}function be(e){return e.connectionLevel!==void 0&&e.connectionLevel!=="studioConnected"?r("sync","pluginMissing","Connect WEPPY Plugin in Studio before using live sync details."):e.tier==="basic"?r("sync","basic","Activate Pro to use bidirectional or reverse sync."):r("sync","default","Use the sync log to diagnose stuck or failed sync activity.")}function me(e,s={}){return e==="openCloudApiKey"?g(e,"Open Cloud API Key help",[l(a.canDo,e,"canDo",["WEPPY uses this key only for Roblox Open Cloud requests."]),l(a.needs,e,"needs",[z.action,"Set the key target to the same User or Group that you use as the upload Creator.","The raw key is encrypted on this device. It is not sent to WEPPY servers, and it is not stored in any other external storage, browser storage, telemetry, logs, tool history, or Asset Library metadata."]),s.hasOpenCloudCredential?r(e,"saved","Use Test Connection to confirm the saved key still works."):r(e,"empty","Create an API key in Roblox Creator Hub, paste it here, then save and test it.")],[{label:{key:"dashboardHelp.openCloudApiKey.link.apiKeys",fallback:"Roblox API keys"},href:ce},{label:{key:"dashboardHelp.openCloudApiKey.link.assetsGuide",fallback:"Assets API usage guide"},href:de},{label:{key:"dashboardHelp.openCloudApiKey.link.assetsReference",fallback:"Assets API reference"},href:ue}]):e==="openCloudCreatorId"?g(e,"Creator ID help",[l(a.canDo,e,"canDo",["The default Creator decides which User or Group owns newly uploaded Roblox assets."]),l(a.needs,e,"needs",["For User, sign in to roblox.com, open your profile from your avatar or username, then copy only the number between /users/ and /profile in the browser URL.","For Group, open the Roblox group or community page, then copy only the number after /groups/ or /communities/ in the browser URL.","Paste only the numeric ID in Creator ID. Do not paste the full URL, rbxassetid://, User, or Group text."]),s.hasDefaultCreator?r(e,"saved","Keep this value if new assets should continue using the same owner."):r(e,"empty","Choose User or Group, paste the numeric ID, then save the default Creator.")],[{label:{key:"dashboardHelp.openCloudCreatorId.link.creatorId",fallback:"Creator ID reference"},href:pe},{label:{key:"dashboardHelp.openCloudCreatorId.link.userId",fallback:"User ID reference"},href:he},{label:{key:"dashboardHelp.openCloudCreatorId.link.groups",fallback:"Roblox groups"},href:fe},{label:{key:"dashboardHelp.openCloudCreatorId.link.groupsApi",fallback:"Groups Cloud API"},href:ge}]):{overview:g("overview","Overview help",[l(a.canDo,"overview","canDo",["Check MCP server, WEPPY Plugin, AI Agent, Sync, and recent game changes in one place."]),l(a.needs,"overview","needs",["Useful status requires the MCP server. Live Studio status also needs WEPPY Plugin connected to the active place."]),s.connectionLevel==="serverOnly"?r("overview","serverOnly","Open Roblox Studio and start WEPPY Plugin so live place data can appear."):r("overview","default","If the server disconnects, restart MCP or wait for the automatic reconnect.")]),connection:v("connection","Connection help",["Inspect server process details, connected AI agents, Studio plugin clients, and connection log events."],["The MCP server must be reachable. Plugin rows appear after Studio sends heartbeats."],["If Plugin is missing, open Roblox Studio and run WEPPY Plugin. If AI Agent is missing, reconnect the MCP server from your AI tool."]),sync:g("sync","Sync help",[l(a.canDo,"sync","canDo",["Review Studio to local sync status, direction, apply mode, and sync logs."]),l(a.needs,"sync","needs",["Sync needs an active place and connected WEPPY Plugin. Two-way and reverse workflows depend on Pro."]),be(s)]),assets:g("assets","Assets help",[l(a.canDo,"assets","canDo",["Browse local Asset Library files, switch place/shared scope, filter categories, scan usage, insert RBXM into Studio, and upload local assets to Roblox."]),l(a.needs,"assets","needs",["Upload needs Pro, the Open Cloud upload toggle, a valid API Key, and a Creator. Browse and preview work on Basic."]),ye(s)]),changelog:v("changelog","Changelog help",["Review real game-change sessions extracted from AI actions and sync events."],["Entries are scoped to the active place. Basic shows only the latest preview entries."],["If the list is empty, ask the AI Agent to make a game change. Clear only deletes saved history records, not Studio objects."]),playtest:g("playtest","Playtest help",[l(a.canDo,"playtest","canDo",["Review Playtest results and reports saved by the AI Agent."]),l(a.needs,"playtest","needs",["Pro shows real stored reports. Basic shows sample preview data. Live active-place confidence needs WEPPY Plugin connected."]),s.tier==="basic"?r("playtest","basic","Activate Pro to use real Playtest history."):r("playtest","default","Ask the AI Agent to run a Playtest when no report is available.")]),uiStudio:g("uiStudio","UI Studio help",[l(a.canDo,"uiStudio","canDo",["Review AI-created UI analysis, improvement suggestions, captures, and before/after history."]),l(a.needs,"uiStudio","needs",["Pro shows real UI Studio data. Basic shows a bundled sample. New capture/check actions need WEPPY Plugin connected."]),s.tier==="basic"?r("uiStudio","basic","Activate Pro to use live UI Studio previews."):r("uiStudio","default","Ask the AI Agent to capture the UI or recheck improvement suggestions, then copy follow-up requests back to the AI chat.")]),tools:v("tools","Tools help",["Inspect tool history, status classification, fallback/unsupported/warn/error details, and usage statistics."],["History and statistics depend on local recording settings and the active place bucket."],["If no records appear, check Controls > General Settings and confirm history/statistics are enabled. Expand failed rows to inspect input, permission, or connection causes."]),controls:v("controls","Controls help",["Manage Project Root, Studio routing, and MCP hot settings."],["Project Root and Studio Routing need MCP server connection. Hot settings need a server response. Asset upload controls live in Assets settings."],["Use Project Root only when MCP should write sync data under a different project folder. Use Studio Routing only for requests where the agent does not name Studio ID, Connection ID, or Place ID."]),settings:v("settings","Settings help",["Manage License, saved data cleanup, server environment display, and language."],["License actions need MCP server connection. Server environment values are read-only here. Asset upload controls live in Assets settings.",le.action],["Activate a license for Pro features. Change environment values outside WEPPY Dashboard, then restart MCP. Review delete confirmations before clearing saved data."]),whatsNew:v("whatsNew","What's New help",["Review WEPPY Dashboard, MCP, and Plugin announcements, releases, and change notes."],["Announcements are bundled locally. Unread state is stored in this browser."],["After you visit this page, unread announcements from this visit are marked read when you leave. The top header does not show a duplicate What's New button on this page."])}[e]}const _e="_root_15e9p_1",ve="_rootPage_15e9p_7",Pe="_rootField_15e9p_11",ke="_helpButton_15e9p_15",Ce="_panel_15e9p_19",we="_panelField_15e9p_34",Ee="_panelPage_15e9p_38",Ae="_panelHeader_15e9p_42",Ie="_closeButton_15e9p_60",Se="_sectionStack_15e9p_64",xe="_helpSection_15e9p_69",Re="_linkList_15e9p_70",d={root:_e,rootPage:ve,rootField:Pe,helpButton:ke,panel:Ce,panelField:we,panelPage:Ee,panelHeader:Ae,closeButton:Ie,sectionStack:Se,helpSection:xe,linkList:Re},y=12,I=8,Le=120,De=360,He=340,q=560;function Ue({topicId:e,state:s,variant:n="page",className:h}){const{t:i}=ee(),{trackEvent:b}=te(),[f,P]=p.useState(!1),[w,j]=p.useState(null),x=p.useId(),O=p.useRef(null),R=p.useRef(null),L=p.useRef(null),m=me(e,s),E=i(m.title.key,m.title.fallback),A=p.useCallback(()=>{const o=R.current,c=L.current;if(!o||!c||typeof window>"u")return;const u=o.getBoundingClientRect(),_=c.getBoundingClientRect(),k=window.innerWidth,C=window.innerHeight,Q=n==="field"?He:De,W=_.width||Math.min(Q,k-y*2),G=_.height||q;let D=n==="field"?u.left:u.right-W;D=Math.max(y,Math.min(D,k-W-y));const H=C-u.bottom-I-y,T=u.top-I-y,F=H<Math.min(G,220)&&T>H,V=Math.max(Le,F?T:H),Y=Math.min(q,V),K=Math.min(G,Y);let U=F?u.top-I-K:u.bottom+I;U=Math.max(y,Math.min(U,C-K-y)),j({top:Math.round(U),left:Math.round(D),maxHeight:Math.round(Y)})},[n]);p.useLayoutEffect(()=>{f?A():j(null)},[f,A]),p.useEffect(()=>{if(!f)return;const o=u=>{var k,C;const _=u.target;_&&!((k=O.current)!=null&&k.contains(_))&&!((C=L.current)!=null&&C.contains(_))&&P(!1)},c=u=>{u.key==="Escape"&&P(!1)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",c)}},[f]),p.useEffect(()=>{if(!f)return;const o=()=>A();return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[f,A]);const M=n==="field"?i("dashboardHelp.fieldButton.ariaLabel","Open field help"):i("dashboardHelp.pageButton.ariaLabel","Open page help"),J=w?{top:w.top,left:w.left,maxHeight:w.maxHeight}:{top:-9999,left:-9999,visibility:"hidden"},B=f?t.jsxs("section",{ref:L,id:x,className:[d.panel,n==="field"?d.panelField:d.panelPage].filter(Boolean).join(" "),style:J,role:"dialog","aria-label":E,"data-panel-placement":"help-portal",children:[t.jsxs("div",{className:d.panelHeader,children:[t.jsx("h2",{children:E}),t.jsx($,{type:"button",size:"sm",className:d.closeButton,"aria-label":i("common.close","Close"),onClick:()=>P(!1),children:t.jsx(oe,{size:15,"aria-hidden":"true"})})]}),t.jsx("div",{className:d.sectionStack,children:m.sections.map(o=>t.jsxs("section",{className:d.helpSection,children:[t.jsx("h3",{children:i(o.heading.key,o.heading.fallback)}),t.jsx("ul",{children:o.items.map(c=>t.jsx("li",{children:i(c.key,c.fallback)},c.key))})]},o.heading.key))}),m.links&&m.links.length>0&&t.jsxs("div",{className:d.linkList,children:[t.jsx("h3",{children:i("dashboardHelp.section.links","Related links")}),m.links.map(o=>t.jsxs("a",{href:o.href,target:"_blank",rel:"noreferrer",children:[i(o.label.key,o.label.fallback),t.jsx(ne,{size:12,"aria-hidden":"true"})]},o.href))]})]}):null;return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:O,className:[d.root,n==="field"?d.rootField:d.rootPage,h??""].filter(Boolean).join(" "),children:n==="field"?t.jsx($,{ref:R,type:"button",size:"sm",className:d.helpButton,"aria-label":`${M}: ${E}`,"aria-expanded":f,"aria-controls":x,onClick:()=>{P(o=>{const c=!o;return o||b("dashboard_click_event",{click_target:"dashboard_help_open",help_topic:e,placement:n}),c})},children:t.jsx(X,{size:14,"aria-hidden":"true"})}):t.jsxs(ae,{ref:R,type:"button",variant:"secondary",size:"sm",className:d.helpButton,"aria-label":`${M}: ${E}`,"aria-expanded":f,"aria-controls":x,onClick:()=>{P(o=>{const c=!o;return o||b("dashboard_click_event",{click_target:"dashboard_help_open",help_topic:e,placement:n}),c})},children:[t.jsx(X,{size:16,"aria-hidden":"true"}),t.jsx("span",{children:i("dashboardHelp.button","Help")})]})}),B&&typeof document<"u"?se.createPortal(B,document.body):null]})}const Ne="_pageHeader_qym7v_1",je="_copy_qym7v_9",Oe="_titleLine_qym7v_16",Me="_actions_qym7v_39",S={pageHeader:Ne,copy:je,titleLine:Oe,actions:Me};function Ge({title:e,description:s,badge:n,helpTopicId:h,helpState:i}){return t.jsxs("div",{className:S.pageHeader,children:[t.jsxs("div",{className:S.copy,children:[t.jsxs("div",{className:S.titleLine,children:[t.jsx("h1",{children:e}),n]}),t.jsx("p",{children:s})]}),t.jsx("div",{className:S.actions,children:t.jsx(Ue,{topicId:h,state:i})})]})}export{Ue as D,Ge as P,N as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as X,e as le,r,j as e,a as z,g as pe,d as ge,T as he,A as me,S as ye}from"./index-DRw0NuYR.js";import{P as je}from"./PageHeader-CIEYGd1d.js";import{I as N}from"./InfoLabel-DANjLZ88.js";import{T as p}from"./TooltipText-WYIcU5Ix.js";import{s as i,u as fe}from"./useSettings-C7K0TrFY.js";import{C as re}from"./ConfirmModal-DzzePbJa.js";import{D as ce,f as de,r as xe,s as ve,a as ue,d as ee,S as se,b as Se}from"./sample-requests-BxROai7H.js";import{C as be}from"./UiPrimitive-CoOY1M8-.js";import"./ConfirmModal.module-DJksQHBd.js";const Ce="_card_g3as3_4",Ne="_cardEmbedded_g3as3_14",_e="_cardTitle_g3as3_21",ke="_usageRow_g3as3_30",Re="_usageTotal_g3as3_36",Le="_usageBreakdown_g3as3_42",Pe="_usageCounts_g3as3_47",we="_divider_g3as3_53",Be="_lastRunRow_g3as3_60",He="_lastRunLabel_g3as3_69",Me="_errorIcon_g3as3_75",$e="_tooltip_g3as3_83",Ee="_cleanupRow_g3as3_106",De="_cleanupLabel_g3as3_113",Ae="_cleanupBtn_g3as3_120",Te="_cleanupBtnDanger_g3as3_143",ze="_retentionSection_g3as3_156",Ue="_retentionTitle_g3as3_162",Ie="_retentionFieldset_g3as3_171",Oe="_proOverlay_g3as3_186",Fe="_radioRow_g3as3_198",qe="_radioLabel_g3as3_205",Ge="_presetGroup_g3as3_225",We="_presetBtn_g3as3_233",Ye="_presetBtnActive_g3as3_250",Ke="_freeInput_g3as3_257",Ve="_inputError_g3as3_273",Je="_inputUnit_g3as3_277",Qe="_cascadeRow_g3as3_284",Ze="_retentionActions_g3as3_299",Xe="_saveBtn_g3as3_305",et="_runNowBtn_g3as3_327",tt="_errorMsg_g3as3_350",o={card:Ce,cardEmbedded:Ne,cardTitle:_e,usageRow:ke,usageTotal:Re,usageBreakdown:Le,usageCounts:Pe,divider:we,lastRunRow:Be,lastRunLabel:He,errorIcon:Me,tooltip:$e,cleanupRow:Ee,cleanupLabel:De,cleanupBtn:Ae,cleanupBtnDanger:Te,retentionSection:ze,retentionTitle:Ue,retentionFieldset:Ie,proOverlay:Oe,radioRow:Fe,radioLabel:qe,presetGroup:Ge,presetBtn:We,presetBtnActive:Ye,freeInput:Ke,inputError:Ve,inputUnit:Je,cascadeRow:Qe,retentionActions:Ze,saveBtn:Xe,runNowBtn:et,errorMsg:tt};function st(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 ae(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 at(t,s){return t.mode===s.mode&&t.ageDays===s.ageDays&&t.sizeMb===s.sizeMb&&t.cascadeSnapshots===s.cascadeSnapshots}function G(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 it({placeId:t,tier:s,currentPolicy:c,onSaved:d}){const{t:n}=X(),{trackEvent:L}=le(),[a,h]=r.useState(c),[g,w]=r.useState(()=>[7,14,30,90].includes(c.ageDays??-1)?"":String(c.ageDays??30)),[C,_]=r.useState(()=>[100,500,1e3].includes(c.sizeMb??-1)?"":String(c.sizeMb??500)),[k,E]=r.useState(null),[y,f]=r.useState(!1),[A,b]=r.useState(!1),[S,B]=r.useState(!1),[x,M]=r.useState(null);r.useEffect(()=>{h(c);const u=[7,14,30,90],H=[100,500,1e3];w(u.includes(c.ageDays??-1)?"":String(c.ageDays??30)),_(H.includes(c.sizeMb??-1)?"":String(c.sizeMb??500))},[c]);const D=s==="basic",R=ae(a),m=at(c,a),$=R&&!m&&!A,l=u=>{h(H=>{const q={...H,mode:u};return u==="age"&&(q.ageDays=parseInt(g,10)||30),u==="size"&&(q.sizeMb=parseInt(C,10)||500),q})},P=u=>{w(""),h(H=>({...H,ageDays:u}))},v=u=>{_(""),h(H=>({...H,sizeMb:u}))},T=u=>{w(u);const H=parseInt(u,10);Number.isNaN(H)||h(q=>({...q,ageDays:H}))},W=u=>{_(u);const H=parseInt(u,10);Number.isNaN(H)||h(q=>({...q,sizeMb:H}))},U=async()=>{if(M(null),L("dashboard_click_event",{click_target:"ui_studio_cleanup_save",page:"settings"}),st(c,a)){try{const u=await de(t,{mode:a.mode,ageDays:a.ageDays,sizeMb:a.sizeMb,cascadeSnapshots:a.cascadeSnapshots});E(u.dryRun),f(!0)}catch(u){M(u.message)}return}await Y()},Y=async()=>{b(!0);try{await ve(t,a),f(!1),d()}catch(u){throw M(u.message),u}finally{b(!1)}},j=async()=>{M(null),L("dashboard_click_event",{click_target:"ui_studio_cleanup_run_now",page:"settings"}),B(!0);try{await xe(t),d()}catch(u){M(u.message)}finally{B(!1)}},I=k?`${n("uiStudio.cleanup.policy.confirm.messageStrict","이 정책으로 즉시")} ${k.wouldRemoveRequests}${n("uiStudio.cleanup.policy.confirm.requests","건")} / ${k.wouldRemoveSnapshots}${n("uiStudio.cleanup.policy.confirm.snapshots","개 화면 캡처")} / ${G(k.wouldFreeBytes)} ${n("uiStudio.cleanup.policy.confirm.freed","가 삭제됩니다 — 적용?")}`:"",te=a.mode==="age"&&!ae(a),F=a.mode==="size"&&!ae(a);return e.jsxs("div",{className:o.retentionSection,children:[e.jsx("h3",{className:o.retentionTitle,children:e.jsx(N,{label:n("uiStudio.cleanup.policy.title","자동 삭제 정책"),tooltip:n("uiStudio.cleanup.policy.title.tooltip","Rules that automatically remove old or large captures.")})}),e.jsxs("div",{style:{position:"relative"},children:[D&&e.jsx("div",{className:o.proOverlay,title:n("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능"),children:e.jsx("div",{className:o.tooltip,children:n("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능")})}),e.jsxs("fieldset",{className:o.retentionFieldset,disabled:D,style:D?{opacity:.45,pointerEvents:"none"}:void 0,children:[e.jsx("div",{className:o.radioRow,children:e.jsx(p,{text:n("uiStudio.cleanup.policy.modeOff.tooltip","Turn off auto-cleanup. Data stays until you remove it manually."),children:e.jsxs("label",{className:o.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"off",checked:a.mode==="off",onChange:()=>l("off")}),n("uiStudio.cleanup.policy.modeOff","사용 안 함 (off)")]})})}),e.jsxs("div",{children:[e.jsx("div",{className:o.radioRow,children:e.jsx(p,{text:n("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:a.mode==="age",onChange:()=>l("age")}),n("uiStudio.cleanup.policy.modeAge","기간 기반 (age)")]})})}),a.mode==="age"&&e.jsxs("div",{className:o.presetGroup,children:[[7,14,30,90].map(u=>e.jsx(p,{text:n("uiStudio.cleanup.policy.agePreset.tooltip","Delete data older than this many days."),children:e.jsxs("button",{type:"button",className:`${o.presetBtn} ${a.ageDays===u&&g===""?o.presetBtnActive:""}`,onClick:()=>P(u),children:[u,n("uiStudio.cleanup.policy.daysUnit","일")]})},u)),e.jsx(p,{text:n("uiStudio.cleanup.policy.ageInput.tooltip","Enter any value between 1 and 365 days."),children:e.jsx("input",{type:"number",className:`${o.freeInput} ${te?o.inputError:""}`,value:g,min:1,max:365,onChange:u=>T(u.target.value)})}),e.jsxs("span",{className:o.inputUnit,children:["1–365",n("uiStudio.cleanup.policy.daysUnit","일")]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:o.radioRow,children:e.jsx(p,{text:n("uiStudio.cleanup.policy.modeSize.tooltip","When total usage exceeds the limit, the oldest data is removed first."),children:e.jsxs("label",{className:o.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"size",checked:a.mode==="size",onChange:()=>l("size")}),n("uiStudio.cleanup.policy.modeSize","용량 기반 (size)")]})})}),a.mode==="size"&&e.jsxs("div",{className:o.presetGroup,children:[[100,500,1e3].map(u=>e.jsx(p,{text:n("uiStudio.cleanup.policy.sizePreset.tooltip","Keep total usage under this size."),children:e.jsxs("button",{type:"button",className:`${o.presetBtn} ${a.sizeMb===u&&C===""?o.presetBtnActive:""}`,onClick:()=>v(u),children:[u,n("uiStudio.cleanup.policy.mbUnit","MB")]})},u)),e.jsx(p,{text:n("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} ${F?o.inputError:""}`,value:C,min:50,max:1e4,onChange:u=>W(u.target.value)})}),e.jsxs("span",{className:o.inputUnit,children:["50–10000",n("uiStudio.cleanup.policy.mbUnit","MB")]})]})]}),e.jsx(p,{text:n("uiStudio.cleanup.policy.cascade.tooltip","Also delete the capture images linked to those records. If off, the images stay."),children:e.jsxs("label",{className:o.cascadeRow,children:[e.jsx(be,{checked:a.cascadeSnapshots,onChange:u=>h(H=>({...H,cascadeSnapshots:u.target.checked}))}),n("uiStudio.cleanup.policy.cascade","연결된 화면 캡처도 함께 삭제")]})}),e.jsxs("div",{className:o.retentionActions,children:[e.jsx(p,{text:n("uiStudio.cleanup.policy.save.tooltip","Save the current cleanup rule. It runs in the background from then on."),children:e.jsx("button",{type:"button",className:o.saveBtn,onClick:()=>void U(),disabled:!$,children:n("uiStudio.cleanup.policy.save","정책 저장")})}),e.jsx(p,{text:n("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:S,children:n("uiStudio.cleanup.policy.runNow","지금 정리")})})]}),x&&e.jsx("div",{className:o.errorMsg,children:x})]})]}),y&&k&&e.jsx(ce,{title:n("uiStudio.cleanup.policy.confirm.title","정책 적용 확인"),message:I,danger:!0,confirmLabel:n("uiStudio.cleanup.policy.save","정책 저장"),busy:A,onConfirm:Y,onClose:()=>f(!1)})]})}function nt({placeId:t,tier:s,onChanged:c,sampleUsage:d,sampleRetention:n,embedded:L=!1}){const{t:a}=X(),h=s==="basic"&&d!=null&&n!=null,[g,w]=r.useState(h?d:null),[C,_]=r.useState(h?n:null),[k,E]=r.useState(null),[y,f]=r.useState(null),[A,b]=r.useState(null),S=r.useCallback(async()=>{if(!h&&t!=null){E(null);try{const[l,P]=await Promise.all([ue(t),de(t)]);w(l),_(P.policy)}catch(l){E(l.message)}}},[t,h]);r.useEffect(()=>{S()},[S]);const B=r.useCallback(()=>{S(),c==null||c()},[S,c]),x=r.useCallback(async()=>{if(y&&t!=null){b(null);try{y.kind==="keep7"?await ee(t,{olderThanDays:7,alsoSnapshots:!0}):y.kind==="keep30"?await ee(t,{olderThanDays:30,alsoSnapshots:!0}):await ee(t,{all:!0,alsoSnapshots:!0}),f(null),S(),c==null||c()}catch(l){throw b(l.message),l}}},[y,t,S,c]);function M(l){const P=a("uiStudio.cleanup.studioPreservedNote","This deletes saved change records and screenshots on disk only; Roblox Studio instances are not affected.");return l.kind==="keep7"?`${a("uiStudio.cleanup.cleanupConfirmMessage.keep7","7일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${P}`:l.kind==="keep30"?`${a("uiStudio.cleanup.cleanupConfirmMessage.keep30","30일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${P}`:`${((g==null?void 0:g.requestCount)??0)+((g==null?void 0:g.snapshotCount)??0)}${a("uiStudio.cleanup.cleanupConfirmMessage.all","개의 저장된 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${P}`}if(t==null&&!h)return null;if(k)return e.jsx("div",{className:`${o.card} ${L?o.cardEmbedded:""}`,children:e.jsx("p",{className:o.errorMsg,children:k})});if(!g||!C)return e.jsx("div",{className:`${o.card} ${L?o.cardEmbedded:""}`,children:e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",margin:0},children:a("uiStudio.storage.loading","로딩 중...")})});const D=C.lastRunAt,R=C.lastRunStats,m=D?new Date(D).toLocaleString():null,$=t??0;return e.jsxs("div",{className:`${o.card} ${L?o.cardEmbedded:""}`,children:[e.jsx("h3",{className:o.cardTitle,children:e.jsx(N,{label:a("uiStudio.storage.title","UI Studio 저장 데이터"),tooltip:a("uiStudio.storage.title.tooltip","Disk usage of UI Studio change records and screenshots.")})}),e.jsxs("div",{className:o.usageRow,children:[e.jsx(p,{text:a("uiStudio.storage.usageLabel.tooltip","Disk space currently used by UI Studio for this project."),children:e.jsxs("div",{className:o.usageTotal,children:[a("uiStudio.storage.usageLabel","사용 중")," ",G(g.totalBytes)]})}),e.jsxs("div",{className:o.usageBreakdown,children:[e.jsx(p,{text:a("uiStudio.storage.historyBytes.tooltip","Space taken by change record data (JSON)."),children:e.jsxs("span",{children:[a("uiStudio.storage.historyBytes","변경 이력")," ",G(g.historyBytes)]})})," · ",e.jsx(p,{text:a("uiStudio.storage.snapshotBytes.tooltip","Space taken by captured PNG image files."),children:e.jsxs("span",{children:[a("uiStudio.storage.snapshotBytes","화면 캡처")," ",G(g.snapshotBytes)]})})]}),e.jsxs("div",{className:o.usageCounts,children:[e.jsx(p,{text:a("uiStudio.storage.requestCount.tooltip","Number of actions where AI changed the UI."),children:e.jsxs("span",{children:[a("uiStudio.storage.requestCount","변경 기록")," ",g.requestCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(p,{text:a("uiStudio.storage.mutationCount.tooltip","Number of detail changes inside actions (one property edit = 1)."),children:e.jsxs("span",{children:[a("uiStudio.storage.mutationCount","변경 상세")," ",g.mutationCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(p,{text:a("uiStudio.storage.snapshotCount.tooltip","Number of saved capture image files."),children:e.jsxs("span",{children:[a("uiStudio.storage.snapshotCount","화면 캡처")," ",g.snapshotCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})]})]}),e.jsx("hr",{className:o.divider}),e.jsx(it,{placeId:$,tier:s,currentPolicy:C,onSaved:B}),e.jsx("hr",{className:o.divider}),e.jsxs("div",{className:o.lastRunRow,children:[e.jsx("span",{className:o.lastRunLabel,children:e.jsx(N,{label:a("uiStudio.storage.lastRun","마지막 자동 정리"),tooltip:a("uiStudio.storage.lastRun.tooltip","When the auto-cleanup policy last ran, and what it removed.")})}),m?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:m}),R&&e.jsxs("span",{children:["· ",a("uiStudio.storage.requestCount","변경 기록")," ",R.removedRequests,a("uiStudio.storage.countSuffix","개")," / ",a("uiStudio.storage.snapshotCount","화면 캡처")," ",R.removedSnapshots,a("uiStudio.storage.countSuffix","개")," / ",G(R.freedBytes)," ",a("uiStudio.storage.lastRunFreed","회수")]}),R&&R.errors>0&&e.jsxs("span",{className:o.errorIcon,title:`${a("uiStudio.storage.lastRunErrors","오류")} ${R.errors}건`,children:["⚠",e.jsxs("span",{className:o.tooltip,children:[a("uiStudio.storage.lastRunErrors","오류")," ",R.errors,a("uiStudio.storage.countSuffix","건")]})]})]}):e.jsx("span",{children:a("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(N,{label:a("uiStudio.cleanup.label","수동 정리"),tooltip:a("uiStudio.cleanup.label.tooltip","Manually clean up change records and captures whenever you want.")})}),e.jsx(p,{text:a("uiStudio.cleanup.keep7.tooltip","Delete change records and captures older than 7 days."),children:e.jsx("button",{type:"button",className:o.cleanupBtn,onClick:()=>f({kind:"keep7"}),disabled:s==="basic",children:a("uiStudio.cleanup.keepLastNDays","최근 7일만 남기기").replace("{n}","7")})}),e.jsx(p,{text:a("uiStudio.cleanup.keep30.tooltip","Delete change records and captures older than 30 days."),children:e.jsx("button",{type:"button",className:o.cleanupBtn,onClick:()=>f({kind:"keep30"}),disabled:s==="basic",children:a("uiStudio.cleanup.keepLastNDays","최근 30일만 남기기").replace("{n}","30")})}),e.jsx(p,{text:a("uiStudio.cleanup.deleteAll.tooltip","Delete every change record and capture for this project. The actual UI in Roblox Studio is not affected."),children:e.jsx("button",{type:"button",className:`${o.cleanupBtn} ${o.cleanupBtnDanger}`,onClick:()=>f({kind:"all"}),disabled:s==="basic",children:a("uiStudio.cleanup.deleteAll","전체 삭제…")})})]}),A&&e.jsx("div",{className:o.errorMsg,children:A}),y&&e.jsx(ce,{title:a("uiStudio.cleanup.cleanupConfirmTitle","정리 확인"),message:M(y),danger:!0,confirmLabel:a("common.delete","삭제"),onConfirm:x,onClose:()=>{f(null),b(null)}})]})}function ie(t,s){const c={placeId:String(t)};return s&&(c["preview.mode"]=s.mode,s.mode==="size"&&(c["preview.sizeMb"]=String(s.sizeMb))),z.get("/api/dashboard/changelog/cleanup",c)}function ne(t){return z.put("/api/dashboard/changelog/cleanup",t)}function ot(t){return z.post(`/api/dashboard/changelog/cleanup/run?placeId=${encodeURIComponent(t)}`)}const lt=[100,500,1e3];function oe(t,s){return t.mode!==s.mode?!1:t.mode==="off"||s.mode==="size"&&t.sizeMb===s.sizeMb}function rt(t,s){return t.mode==="off"?!1:s.mode==="off"||t.sizeMb<s.sizeMb}function K(t){return t<1e3?`${t} B`:t<1e6?`${(t/1e3).toFixed(1)} KB`:t<1e9?`${(t/1e6).toFixed(1)} MB`:`${(t/1e9).toFixed(2)} GB`}function ct({placeId:t,onChanged:s}){const{locale:c,t:d}=X(),[n,L]=r.useState(null),[a,h]=r.useState({mode:"size",sizeMb:500}),[g,w]=r.useState(t!==null),[C,_]=r.useState(!1),[k,E]=r.useState(!1),[y,f]=r.useState(!1),[A,b]=r.useState(!1),[S,B]=r.useState(null),x=r.useCallback(async()=>{if(t===null){L(null),w(!1);return}E(!1);try{const j=await ie(t);L(j),h(j.policy)}catch{E(!0)}finally{w(!1)}},[t]);r.useEffect(()=>{w(t!==null),x()},[x,t]);const M=r.useCallback(async j=>{_(!0),f(!1),b(!1);try{await ne(j),B(null),await x(),b(!0),s==null||s()}catch{f(!0)}finally{_(!1)}},[x,s]),D=r.useCallback(async()=>{if(!(!n||t===null||oe(a,n.policy))){_(!0),f(!1),b(!1);try{if(rt(a,n.policy)){const j=await ie(t,a);if(j.preview.affectedPlaceCount>0){B({policy:a,preview:j});return}}await ne(a),await x(),b(!0),s==null||s()}catch{f(!0)}finally{_(!1)}}},[n,a,x,s,t]),R=r.useCallback(async()=>{if(t!==null){_(!0),f(!1),b(!1);try{await ot(t),await x(),s==null||s()}catch{f(!0)}finally{_(!1)}}},[x,s,t]),m=n==null?void 0:n.selectedPlace.currentUsage,$=(n==null?void 0:n.policy.mode)==="size"?n.policy.sizeMb*1e6:null,l=$??Math.max((m==null?void 0:m.bytes)??0,1),P=Math.min(100,((m==null?void 0:m.sessionBytes)??0)/l*100),v=Math.min(Math.max(0,100-P),((m==null?void 0:m.contextBytes)??0)/l*100),T=n?!oe(a,n.policy):!1,W=j=>j.mode==="off"?d("settings.projectChanges.cleanup.unlimited","Unlimited"):`${j.sizeMb} MB`,U=r.useMemo(()=>{if(!S)return"";const j=S.preview.preview,I=d("settings.projectChanges.cleanup.confirm.message","{places} Places · {sessions} sessions · {bytes} expected to be freed.").replace("{places}",j.affectedPlaceCount.toLocaleString()).replace("{sessions}",j.deleteSessionCount.toLocaleString()).replace("{bytes}",K(j.estimatedFreedBytes));return j.wouldRemainOverLimitPlaceCount===0?I:`${I} ${d("settings.projectChanges.cleanup.confirm.protected","{places} Place may remain over the limit because active data is protected.").replace("{places}",j.wouldRemainOverLimitPlaceCount.toLocaleString())}`},[S,d]);if(t===null)return e.jsx("div",{className:i.projectChangesPanel,children:e.jsx("p",{className:i.projectChangesEmpty,children:d("settings.projectChanges.cleanup.noPlace","Select a Place to manage saved project changes.")})});if(g)return e.jsx("div",{className:i.projectChangesPanel,children:e.jsx("p",{className:i.projectChangesEmpty,children:d("settings.projectChanges.cleanup.loading","Loading storage settings…")})});if(k||!n||!m)return e.jsxs("div",{className:i.projectChangesPanel,children:[e.jsx("p",{className:i.projectChangesError,role:"alert",children:d("settings.projectChanges.cleanup.loadFailed","Could not load storage settings.")}),e.jsx("button",{className:i.projectChangesSecondaryButton,type:"button",onClick:()=>{w(!0),x()},children:d("common.retry","Retry")})]});const Y=$===null?d("settings.projectChanges.cleanup.usageUnlimited","{used} used · Unlimited").replace("{used}",K(m.bytes)):d("settings.projectChanges.cleanup.usageLimited","{used} used of {limit}").replace("{used}",K(m.bytes)).replace("{limit}",W(n.policy));return e.jsxs("div",{className:i.projectChangesPanel,children:[e.jsxs("div",{className:i.projectChangesPanelHeader,children:[e.jsxs("div",{children:[e.jsx("h3",{className:i.projectChangesPanelTitle,children:e.jsx(N,{label:d("settings.projectChanges.cleanup.title","Storage management"),tooltip:d("settings.projectChanges.cleanup.title.tooltip","Set how much Project Change Summary history each Place can keep.")})}),e.jsx("p",{className:i.projectChangesScope,children:d("settings.projectChanges.cleanup.scope","One setting applies the selected limit separately to every Place.")})]}),e.jsx("span",{className:i.projectChangesPolicyBadge,children:W(n.policy)})]}),e.jsxs("div",{className:i.projectChangesUsageBlock,children:[e.jsx("div",{className:i.projectChangesUsageSummary,children:Y}),e.jsxs("div",{className:i.projectChangesQuotaRail,role:"meter","aria-label":d("settings.projectChanges.cleanup.usageAria","Place storage usage"),"aria-valuemin":0,"aria-valuenow":m.bytes,"aria-valuemax":$??m.bytes,children:[e.jsx("span",{className:i.projectChangesSessionRail,style:{width:`${P}%`}}),e.jsx("span",{className:i.projectChangesContextRail,style:{width:`${v}%`}})]}),e.jsxs("div",{className:i.projectChangesUsageLegend,children:[e.jsxs("span",{children:[d("settings.projectChanges.cleanup.sessions","Sessions")," ",e.jsx("strong",{children:K(m.sessionBytes)})]}),e.jsxs("span",{children:[d("settings.projectChanges.cleanup.contexts","Contexts")," ",e.jsx("strong",{children:K(m.contextBytes)})]})]})]}),e.jsxs("fieldset",{className:i.projectChangesPolicyFieldset,disabled:C,children:[e.jsx("legend",{className:i.projectChangesPolicyLegend,children:d("settings.projectChanges.cleanup.limit","Limit per Place")}),e.jsxs("div",{className:i.projectChangesPresetGroup,children:[lt.map(j=>{const I=a.mode==="size"&&a.sizeMb===j;return e.jsx("button",{className:`${i.projectChangesPresetButton} ${I?i.projectChangesPresetButtonActive:""}`,type:"button","aria-pressed":I,onClick:()=>h({mode:"size",sizeMb:j}),children:d("settings.projectChanges.cleanup.preset","{sizeMb}MB").replace("{sizeMb}",String(j))},j)}),e.jsx("button",{className:`${i.projectChangesPresetButton} ${a.mode==="off"?i.projectChangesPresetButtonActive:""}`,type:"button","aria-pressed":a.mode==="off",onClick:()=>h({mode:"off"}),children:d("settings.projectChanges.cleanup.unlimited","Unlimited")})]})]}),e.jsxs("div",{className:i.projectChangesActions,children:[e.jsx("button",{className:i.projectChangesSaveButton,type:"button",disabled:!T||C,onClick:()=>void D(),children:d("common.save","Save")}),e.jsx("button",{className:i.projectChangesSecondaryButton,type:"button",disabled:C,onClick:()=>void R(),children:d("settings.projectChanges.cleanup.runNow","Run now")}),A&&e.jsx("span",{className:i.projectChangesSaved,role:"status",children:d("settings.projectChanges.cleanup.saved","Saved")})]}),n.selectedPlace.dryRun.wouldRemainOverLimit&&e.jsx("p",{className:i.projectChangesWarning,children:d("settings.projectChanges.cleanup.protectedWarning","Active changes are protected, so this Place may stay over the limit.")}),e.jsxs("div",{className:i.projectChangesLastRun,children:[e.jsx("span",{className:i.projectChangesLastRunLabel,children:d("settings.projectChanges.cleanup.lastRun","Last cleanup")}),n.selectedPlace.lastRun?e.jsxs("span",{children:[new Date(n.selectedPlace.lastRun.ranAt).toLocaleString(c)," · ",d("settings.projectChanges.cleanup.lastRunSummary","{sessions} sessions · {bytes} freed").replace("{sessions}",n.selectedPlace.lastRun.deletedSessionCount.toLocaleString()).replace("{bytes}",K(n.selectedPlace.lastRun.freedBytes))]}):e.jsx("span",{children:d("settings.projectChanges.cleanup.neverRun","Not run yet")})]}),y&&e.jsx("p",{className:i.projectChangesError,role:"alert",children:d("settings.projectChanges.cleanup.actionFailed","Could not update storage settings.")}),e.jsx(re,{open:S!==null,title:d("settings.projectChanges.cleanup.confirm.title","Apply this limit and clean saved changes?"),message:U,cancelLabel:d("common.cancel","Cancel"),confirmLabel:d("settings.projectChanges.cleanup.confirm.apply","Apply and clean"),loading:C,onCancel:()=>!C&&B(null),onConfirm:()=>{S&&M(S.policy)}})]})}const dt={toolsActivity:null,toolStats:null,toolSessions:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null},ut={toolsActivity:null,toolStats:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null};function pt(t){var s;return t?t.pluginConnected?t.activePlaceId:t.lastActivePlaceId??((s=t.places[0])==null?void 0:s.placeId)??null:null}async function O(t){try{return await t}catch{return null}}function Q(t){return t?typeof t.total=="number"?t.total:Array.isArray(t.entries)?t.entries.length:null:null}function Z(t,s,c,d){return s===null?t("settings.dataHistory.metric.unavailable","Unavailable"):`${s.toLocaleString()} ${t(c,d)}`}function V(t,s,c){const d=c===null?t("settings.dataHistory.metric.sizeUnavailable","size unavailable"):G(c);return`${s} · ${d}`}function J(t,s){var d;const c=(d=t==null?void 0:t[s])==null?void 0:d.bytes;return typeof c=="number"&&Number.isFinite(c)?c:null}function gt(t,s){return s?[`${s.requestCount.toLocaleString()} ${t("uiStudio.storage.requestCount","change records")}`,`${s.snapshotCount.toLocaleString()} ${t("uiStudio.storage.snapshotCount","screenshots")}`,G(s.totalBytes)].join(" · "):t("settings.dataHistory.metric.unavailable","Unavailable")}function ht({tier:t}){const{t:s}=X(),[c,d]=r.useState(dt),[n,L]=r.useState(ut),[a,h]=r.useState(t==="basic"?se:null),[g,w]=r.useState(null),[C,_]=r.useState(!0),[k,E]=r.useState(!0),[y,f]=r.useState(null),[A,b]=r.useState(!1),[S,B]=r.useState(null),x=r.useCallback(async()=>{_(!0);const v=await O(pe()),T=pt(v);w(T);const[W,U,Y,j,I,te,F]=await Promise.all([O(z.get("/api/dashboard/history",{limit:"1",offset:"0"})),O(z.get("/api/dashboard/tool-stats")),O(z.get("/sync/history",{limit:"1",offset:"0"})),O(z.get("/api/dashboard/playtest/history")),O(z.get("/api/dashboard/changelog",{limit:"1",offset:"0"})),O(z.get("/api/dashboard/connection-log")),O(z.get("/api/dashboard/storage-summary"))]),u=t==="basic"?se:T===null?null:await O(ue(T));d({toolsActivity:Q(W),toolStats:(U==null?void 0:U.totalCalls)??null,toolSessions:(U==null?void 0:U.totalSessions)??null,syncLog:Q(Y),playtestReports:Q(j),projectChanges:Q(I),connectionLog:Q(te)}),L({toolsActivity:J(F,"toolsActivity"),toolStats:J(F,"toolStats"),syncLog:J(F,"syncLog"),playtestReports:J(F,"playtestReports"),projectChanges:J(F,"projectChanges"),connectionLog:J(F,"connectionLog")}),h(u),_(!1)},[t]);r.useEffect(()=>{x()},[x]);const M=r.useMemo(()=>[{key:"toolsActivity",title:s("settings.dataHistory.toolsActivity.title","Tool activity"),description:s("settings.dataHistory.toolsActivity.description","Saved tool runs shown on the Tools page."),metric:V(s,Z(s,c.toolsActivity,"settings.dataHistory.metric.records","records"),n.toolsActivity),metricTooltip:s("settings.dataHistory.toolsActivity.metric.tooltip","Number of saved tool runs and the disk space they use."),route:"/tools",clearEndpoint:"/api/dashboard/tools/history/clear"},{key:"toolStats",title:s("settings.dataHistory.toolStats.title","Tool usage statistics"),description:s("settings.dataHistory.toolStats.description","Aggregated tool counts and status totals."),metric:V(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")}`,n.toolStats),metricTooltip:s("settings.dataHistory.toolStats.metric.tooltip","Aggregated total runs and session counts."),route:"/tools",clearEndpoint:"/api/dashboard/tools/statistics/clear"},{key:"syncLog",title:s("settings.dataHistory.syncLog.title","Sync log"),description:s("settings.dataHistory.syncLog.description","Saved file sync events for the active place."),metric:V(s,Z(s,c.syncLog,"settings.dataHistory.metric.records","records"),n.syncLog),metricTooltip:s("settings.dataHistory.syncLog.metric.tooltip","Number of saved sync events and the disk space they use."),route:"/sync",clearEndpoint:"/api/dashboard/sync/history/clear"},{key:"playtestReports",title:s("settings.dataHistory.playtest.title","Playtest reports"),description:s("settings.dataHistory.playtest.description","Saved automated playtest reports and logs."),metric:V(s,Z(s,c.playtestReports,"settings.dataHistory.metric.reports","reports"),n.playtestReports),metricTooltip:s("settings.dataHistory.playtestReports.metric.tooltip","Number of saved playtest reports and the disk space they use."),route:"/playtest",clearEndpoint:"/api/dashboard/playtest/history/clear"},{key:"projectChanges",title:s("settings.dataHistory.projectChanges.title","Project change summary"),description:s("settings.dataHistory.projectChanges.description","Saved summaries of project changes."),metric:V(s,Z(s,c.projectChanges,"settings.dataHistory.metric.records","records"),n.projectChanges),metricTooltip:s("settings.dataHistory.projectChanges.metric.tooltip","Number of saved project change summaries and the disk space they use."),route:"/changelog",clearEndpoint:"/api/dashboard/changelog/clear"},{key:"connectionLog",title:s("settings.dataHistory.connectionLog.title","Connection log"),description:s("settings.dataHistory.connectionLog.description","Saved MCP and Studio connection events."),metric:V(s,Z(s,c.connectionLog,"settings.dataHistory.metric.records","records"),n.connectionLog),metricTooltip:s("settings.dataHistory.connectionLog.metric.tooltip","Number of saved connection events and the disk space they use."),route:"/connection",clearEndpoint:"/api/dashboard/connection-log/clear"}],[c,n,s]),D=async()=>{if(y){b(!0),B(null);try{if(y.kind==="uiStudio"){if(t!=="pro"||g===null)throw new Error("UI Studio place is unavailable");await ee(g,{all:!0,alsoSnapshots:!0}),B(s("settings.dataHistory.uiStudio.clear.success","UI Studio saved data cleared."))}else{const v=y.row.key==="projectChanges";if(v&&g===null)throw new Error("Project changes place is unavailable");let T=y.row.clearEndpoint;v&&g!==null&&(T=`${T}?placeId=${encodeURIComponent(g)}`),await z.post(T),B(v?s("settings.dataHistory.projectChanges.clear.success","Project change summaries cleared."):s("settings.dataHistory.clear.success","Saved data cleared."))}f(null),await x()}catch{B(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{b(!1)}}},R=t==="pro"?g:0,m=t==="pro"&&g!==null,$=(y==null?void 0:y.kind)==="uiStudio",l=(y==null?void 0:y.kind)==="row"&&y.row.key==="projectChanges",P=s("settings.dataHistory.title","Data & History");return e.jsxs(e.Fragment,{children:[e.jsxs("section",{id:"data-history",className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(N,{label:s("settings.dataHistory.title","Data & History"),tooltip:s("settings.dataHistory.title.tooltip","Manage saved dashboard data in one place.")}),e.jsxs("div",{className:i.cardHeaderActions,children:[e.jsx(p,{text:s("settings.dataHistory.scope.tooltip","Clear actions apply to the current project and active place where applicable."),children:e.jsx("span",{className:i.headerBadge,children:C?s("common.loading","Loading"):s("settings.dataHistory.scope","Current project")})}),e.jsx(p,{text:s("settings.dataHistory.toggle.tooltip","Collapse or expand this section."),children:e.jsx("button",{className:i.collapseButton,type:"button","aria-expanded":k,"aria-controls":"settings-data-history-body","aria-label":k?s("settings.dataHistory.collapse","Collapse {title}").replace("{title}",P):s("settings.dataHistory.expand","Expand {title}").replace("{title}",P),onClick:()=>E(v=>!v),children:k?"▾":"▸"})})]})]}),k&&e.jsxs("div",{id:"settings-data-history-body",children:[e.jsx("p",{className:i.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:i.dataHistoryList,children:[M.map(v=>e.jsxs(r.Fragment,{children:[e.jsxs("div",{className:`${i.dataHistoryRow} ${v.key==="projectChanges"?i.projectChangesDataHistoryRow:""}`,children:[e.jsxs("div",{className:i.dataHistoryMain,children:[e.jsx("div",{className:i.dataHistoryTitle,children:v.title}),e.jsx("div",{className:i.dataHistoryDescription,children:v.description})]}),e.jsx(p,{text:v.metricTooltip,children:e.jsx("div",{className:i.dataHistoryMetric,children:v.metric})}),e.jsxs("div",{className:i.dataHistoryActions,children:[e.jsx(p,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:i.linkButton,href:`#${v.route}`,children:s("settings.dataHistory.open","Open")})}),e.jsx(p,{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:i.dangerButton,type:"button",disabled:v.key==="projectChanges"&&g===null,onClick:()=>f({kind:"row",row:v}),children:s("common.clear","Clear")})})]})]}),v.key==="projectChanges"&&e.jsx("div",{className:`${i.dataHistoryDetail} ${i.projectChangesDataHistoryDetail}`,children:e.jsx(ct,{placeId:g,onChanged:x})})]},v.key)),e.jsxs("div",{className:`${i.dataHistoryRow} ${i.uiStudioDataHistoryRow}`,children:[e.jsxs("div",{className:i.dataHistoryMain,children:[e.jsx("div",{className:i.dataHistoryTitle,children:s("settings.dataHistory.uiStudio.title","UI Studio history and screenshots")}),e.jsx("div",{className:i.dataHistoryDescription,children:s("settings.dataHistory.uiStudio.description","Saved UI Studio change records, screenshots, and cleanup policy.")})]}),e.jsx(p,{text:s("settings.dataHistory.uiStudio.metric.tooltip","UI Studio change record and capture counts, plus total disk usage."),children:e.jsx("div",{className:i.dataHistoryMetric,children:gt(s,a)})}),e.jsxs("div",{className:i.dataHistoryActions,children:[e.jsx(p,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:i.linkButton,href:"#/ui-studio?tab=history",children:s("settings.dataHistory.open","Open")})}),e.jsx(p,{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:i.dangerButton,type:"button",disabled:!m,onClick:()=>f({kind:"uiStudio"}),children:s("common.clear","Clear")})})]})]}),e.jsx("div",{className:`${i.dataHistoryDetail} ${i.uiStudioDataHistoryDetail}`,children:e.jsx(nt,{placeId:R,tier:t,onChanged:x,embedded:!0,...t==="basic"?{sampleUsage:se,sampleRetention:Se}:{}})})]}),S&&e.jsx("p",{className:i.inlineStatus,children:S})]})]}),e.jsx(re,{open:y!==null,title:$?s("settings.dataHistory.uiStudio.clear.title","Clear UI Studio saved data?"):l?s("settings.dataHistory.projectChanges.clear.title","Clear project change summaries?"):s("settings.dataHistory.clear.title","Clear saved data?"),message:$?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."):l?s("settings.dataHistory.projectChanges.clear.message","This deletes completed sessions and ended context history for the selected Place. Active work and Roblox Studio project data stay intact."):s("settings.dataHistory.clear.message","This deletes saved dashboard records only. Roblox Studio instances and project objects are not changed."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:A,onCancel:()=>!A&&f(null),onConfirm:()=>void D()})]})}const mt={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch","fr-fr":"Français"};function yt(t){return t==="active"?i.statusActive:t==="grace"?i.statusGrace:t==="invalid"||t==="revoked"?i.statusError:i.statusInactive}function jt(t){return t?t.refreshBlockedReason==="missing_session_token"?!0:t.status==="active"||t.status==="grace"||t.status==="invalid"||t.status==="revoked"||t.status==="unknown":!1}function ft(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:i.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:i.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:i.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:i.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:i.licenseNoticeMuted}}function Lt(){const{t,selectedLocale:s,setLocale:c}=X(),{trackEvent:d}=le(),{search:n}=ge(),{settings:L,license:a,licenseControlsDisabled:h,licenseSubmitting:g,licenseMessage:w,activateLicense:C,refreshLicense:_,resetLicense:k,loading:E}=fe(),[y,f]=r.useState(""),A=a?ft(a,t):null,b=jt(a),S=b&&(a==null?void 0:a.refreshBlockedReason)!=="missing_session_token",B=b,x=b?a==null?void 0:a.maskedKey:void 0,M=a!=null&&a.provider&&a.provider!=="auto"?a.provider:void 0,D=(a==null?void 0:a.tier)==="pro"?"pro":"basic",R=r.useRef(null),m=r.useRef(null),$=r.useMemo(()=>new URLSearchParams(n).get("section")==="license",[n]);return r.useEffect(()=>{var P;if(!$||E)return;const l=R.current;if((P=l==null?void 0:l.scrollIntoView)==null||P.call(l,{block:"start",behavior:"smooth"}),m.current&&!m.current.disabled){m.current.focus();return}l==null||l.focus()},[E,h,g,$]),E?e.jsx("div",{className:i.page,children:e.jsx("div",{className:i.loading,children:t("common.loading")})}):e.jsxs("div",{className:i.page,children:[e.jsx(je,{title:t("page.settings.title","Settings"),description:t("page.settings.description","Manage license, saved data, server environment, and language."),helpTopicId:"settings",helpState:{tier:D}}),e.jsxs("div",{id:"settings-license",ref:R,tabIndex:-1,"data-testid":"settings-license-card",className:[i.card,$?i.licenseCardTarget:"",(a==null?void 0:a.tier)==="pro"?i.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(N,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(p,{text:h?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:`${i.headerBadge} ${h?"":i.headerBadgeLive}`,children:h?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[a?e.jsxs(e.Fragment,{children:[(()=>{const l=A;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:i.licenseGrid,children:[e.jsx("dt",{children:e.jsx(N,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${i.statusDot} ${yt(a.status)}`}),e.jsx(p,{text:(l==null?void 0:l.tooltip)??t(`settings.license.${a.status}.tooltip`,"Current license activation state."),children:(l==null?void 0:l.label)??t(`settings.license.${a.status}`,a.status)})]}),e.jsx("dt",{children:e.jsx(N,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available WEPPY Dashboard features.")})}),e.jsx("dd",{className:a.tier==="pro"?i.proBadge:"",children:e.jsx(p,{text:t(`tier.${a.tier}.tooltip`,"Available feature set for the connected license."),children:a.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),x&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(N,{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(p,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:x})})]}),M&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(N,{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(p,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:M})})]})]}),(l==null?void 0:l.detail)&&e.jsx("p",{className:`${i.licenseNotice} ${l.detailTone}`,children:a.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):l.detail}),a.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${i.licenseNotice} ${i.licenseNoticeMuted}`,children:l==null?void 0:l.detail})]})})(),a.tier==="basic"&&e.jsx(p,{text:t("tier.upgrade.tooltip","View Pro features and purchase options."),children:e.jsx("a",{className:i.upgradeLink,href:he.settingsLicense,target:"_blank",rel:"noopener noreferrer",onClick:()=>d("dashboard_click_event",{click_target:"upgrade_cta",placement:"settings_license",page:"settings"}),children:t("tier.upgrade","View Pro")})})]}):e.jsx("div",{className:i.loading,children:t("settings.license.unavailable")}),e.jsxs("div",{className:i.licenseControls,children:[e.jsxs("div",{className:i.licenseControlRow,children:[e.jsx(p,{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:i.actionBtn,disabled:h||g||!S,onClick:()=>{_()},children:g?t("common.loading"):t("settings.license.refresh","Refresh License")})}),e.jsx(p,{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:i.actionBtn,disabled:h||g||!B,onClick:()=>{k()},children:g?t("common.loading"):t("settings.license.reset","Reset License")})})]}),e.jsxs("div",{className:i.licenseControlRow,children:[e.jsxs("label",{className:`${i.licenseField} ${i.licenseFieldGrow}`,children:[e.jsx("span",{className:i.controlLabel,children:e.jsx(N,{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:m,"aria-label":t("settings.license.keyInput","License Key"),className:i.textInput,type:"text",value:y,disabled:h||g,onChange:l=>f(l.target.value)})]}),e.jsx(p,{text:t("settings.license.activate.tooltip","Activate Pro features with the entered license key."),children:e.jsx("button",{type:"button",className:i.actionBtn,disabled:h||g,onClick:()=>{(async()=>await C(y)&&f(""))()},children:g?t("common.loading"):t("settings.license.activate","Activate License")})})]}),w&&e.jsx("p",{className:i.licenseMessage,children:w})]})]})]}),e.jsx(ht,{tier:D}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(N,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(p,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from WEPPY Dashboard."),children:e.jsx("span",{className:i.headerBadge,children:t("settings.readOnly","Read-only")})})]}),L?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:i.coldGrid,children:[e.jsx("dt",{children:e.jsx(N,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:L.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(N,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:L.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(N,{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(p,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WEPPY Dashboard in a browser."),children:String(L.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:i.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:i.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:i.card,children:[e.jsx("div",{className:i.cardHeader,children:e.jsx(N,{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:i.langRow,children:[e.jsx("label",{children:e.jsx(N,{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(p,{text:t("settings.language.auto.tooltip","Follow the operating system's language. Falls back to English when not supported."),children:e.jsxs("select",{className:i.select,value:s,onChange:l=>c(l.target.value),children:[e.jsx("option",{value:me,children:t("settings.language.auto","Auto")}),ye.map(l=>e.jsx("option",{value:l,children:mt[l]??l},l))]})})]})]})]})}export{Lt as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._card_g3as3_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_g3as3_14{border:none;border-radius:0;background:transparent;padding:14px 0 0}._cardTitle_g3as3_21{margin:0;font-size:13px;font-weight:600;color:var(--text-primary);letter-spacing:.02em}._usageRow_g3as3_30{display:flex;flex-direction:column;gap:4px}._usageTotal_g3as3_36{font-size:13px;font-weight:600;color:var(--text-primary)}._usageBreakdown_g3as3_42{font-size:12px;color:var(--text-muted)}._usageCounts_g3as3_47{font-size:12px;color:var(--text-secondary)}._divider_g3as3_53{border:none;border-top:1px solid var(--border);margin:0}._lastRunRow_g3as3_60{font-size:12px;color:var(--text-secondary);display:flex;align-items:center;gap:6px;flex-wrap:wrap}._lastRunLabel_g3as3_69{color:var(--text-muted);font-weight:500;white-space:nowrap}._errorIcon_g3as3_75{color:var(--error-text);cursor:help;font-size:13px;line-height:1;position:relative}._errorIcon_g3as3_75:hover ._tooltip_g3as3_83{display:block}._tooltip_g3as3_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_g3as3_106{display:flex;flex-wrap:wrap;gap:8px;align-items:center}._cleanupLabel_g3as3_113{font-size:12px;color:var(--text-muted);font-weight:500;white-space:nowrap}._cleanupBtn_g3as3_120{padding:5px 10px;border-radius:var(--radius-control);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_g3as3_120:hover:not(:disabled){border-color:var(--accent);color:var(--text-primary)}._cleanupBtn_g3as3_120:disabled{opacity:.45;cursor:not-allowed}._cleanupBtnDanger_g3as3_143{border-color:var(--danger-border);background:var(--danger-bg);color:var(--danger-text)}._cleanupBtnDanger_g3as3_143:hover:not(:disabled){border-color:var(--danger);background:var(--danger-hover-bg);color:var(--danger-text)}._retentionSection_g3as3_156{display:flex;flex-direction:column;gap:10px}._retentionTitle_g3as3_162{margin:0;font-size:12px;font-weight:600;color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase}._retentionFieldset_g3as3_171{display:flex;flex-direction:column;gap:10px;border:none;margin:0;padding:0;position:relative}._retentionFieldset_g3as3_171[disabled]{opacity:.5;pointer-events:none}._proOverlay_g3as3_186{position:absolute;top:0;right:0;bottom:0;left:0;cursor:not-allowed;z-index:1}._proOverlay_g3as3_186:hover ._tooltip_g3as3_83{display:block}._radioRow_g3as3_198{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._radioLabel_g3as3_205{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_g3as3_205 input[type=radio]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent);flex-shrink:0}._presetGroup_g3as3_225{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-left:20px}._presetBtn_g3as3_233{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_g3as3_233:hover{border-color:var(--accent);color:var(--text-primary)}._presetBtnActive_g3as3_250{border-color:var(--accent);background:var(--accent-dim);color:var(--accent);font-weight:600}._freeInput_g3as3_257{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_g3as3_257:focus{outline:none;border-color:var(--accent)}._freeInput_g3as3_257._inputError_g3as3_273{border-color:var(--error-text)}._inputUnit_g3as3_277{font-size:11px;color:var(--text-muted);white-space:nowrap}._cascadeRow_g3as3_284{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none}._cascadeRow_g3as3_284 input[type=checkbox]{flex-shrink:0}._retentionActions_g3as3_299{display:flex;gap:8px;flex-wrap:wrap}._saveBtn_g3as3_305{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_g3as3_305:hover:not(:disabled){opacity:.88}._saveBtn_g3as3_305:disabled{opacity:.45;cursor:not-allowed}._runNowBtn_g3as3_327{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_g3as3_327:hover:not(:disabled){border-color:var(--accent);color:var(--text-primary)}._runNowBtn_g3as3_327:disabled{opacity:.45;cursor:not-allowed}._errorMsg_g3as3_350{font-size:12px;color:var(--error-text);padding:4px 0}
|