@camstack/addon-admin-ui 1.2.710 → 1.2.711
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 +8 -0
- package/dist/assets/{AccessSection-Cgv04lJf.js → AccessSection-AIpZlwxO.js} +1 -1
- package/dist/assets/{Addons-BJL6WRKD.js → Addons-hU_fWopb.js} +1 -1
- package/dist/assets/{AdminPage-CFltVUtJ.js → AdminPage-CEHWflgd.js} +1 -1
- package/dist/assets/{AdminSectionedPage-DfZeI0TS.js → AdminSectionedPage-dotwaj8o.js} +1 -1
- package/dist/assets/{AiProfiles-DW29u0zA.js → AiProfiles-C0U_Edl7.js} +1 -1
- package/dist/assets/{Archive-DJk2nZPq.js → Archive-Dco2WJrr.js} +1 -1
- package/dist/assets/{BootstrapSettingsForm-DKjedbyR.js → BootstrapSettingsForm-BBeQw3lq.js} +1 -1
- package/dist/assets/Build-D-Naokiz.js +40 -0
- package/dist/assets/{Calendars-Bfl32yKa.js → Calendars-D8KLSblw.js} +1 -1
- package/dist/assets/{Cluster-BT8yE3Jd.js → Cluster-zF_gXM_9.js} +1 -1
- package/dist/assets/{CompositionBlockEditor-DmYv5ln7.js → CompositionBlockEditor-DCbO8CrA.js} +1 -1
- package/dist/assets/{CompositionEditorPage-DAZ2EbrI.js → CompositionEditorPage-DtI14l9N.js} +1 -1
- package/dist/assets/{Data-CCLq4I9_.js → Data-xJLAfERW.js} +1 -1
- package/dist/assets/DeviceDetail-DuJyhGDF.js +1 -0
- package/dist/assets/{Devices-BbWkqyWN.js → Devices-D5MT_v0Z.js} +1 -1
- package/dist/assets/{EmbedDevicePage-C3hraaEM.js → EmbedDevicePage-Ugq5wlK_.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-RHniI2xA.js → EmbedPlayerPage-OuqicvX2.js} +1 -1
- package/dist/assets/{History-B5SE1vph.js → History-Bts05Ze9.js} +1 -1
- package/dist/assets/{Identity-COMelIL5.js → Identity-ByCLSEvY.js} +1 -1
- package/dist/assets/{InstancesTable-Gi6mvKws.js → InstancesTable-DnlFxw5B.js} +1 -1
- package/dist/assets/{IntegrationDetail-BJgK3HQZ.js → IntegrationDetail-B_bLy2pT.js} +1 -1
- package/dist/assets/{Integrations-BAxIjtmf.js → Integrations-D1RoIeBe.js} +1 -1
- package/dist/assets/{Integrations-DBIDhCAF.js → Integrations-DaVrDDJ0.js} +1 -1
- package/dist/assets/{Library-j-P8SKgP.js → Library-CZAHEUDs.js} +1 -1
- package/dist/assets/{Locations-BPRZSbLT.js → Locations-B7nkcRUX.js} +1 -1
- package/dist/assets/Logs-DI0KlEbj.js +1 -0
- package/dist/assets/{MaskShapeCanvas-BN6ufTmt.js → MaskShapeCanvas-BmW3cBvx.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DsM7FPZE.js → MotionZonesSettings-E1JiKqu9.js} +1 -1
- package/dist/assets/{MyAccess-B3gTfVDq.js → MyAccess-C4lodqcX.js} +1 -1
- package/dist/assets/{Network-CBAabM0h.js → Network-Ct2wpBcf.js} +1 -1
- package/dist/assets/{NewExportModal-DGq6CWpy.js → NewExportModal-B7PD25jZ.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-DCa3tgOb.js → NodeAddonsSettingsPanel-YwplZhej.js} +1 -1
- package/dist/assets/{Notifications-DccqInu6.js → Notifications-Dz97CCgI.js} +1 -1
- package/dist/assets/{PanelContent-CVkHXftN.js → PanelContent-BeFcR75x.js} +1 -1
- package/dist/assets/{Pipeline-CdKKet5N.js → Pipeline-BffUx3BA.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-m809AVSj.js → PrivacyMaskSettings-D-MffrSL.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-BRoTpS7V.js → SceneMonitorEditor-CY_3hsvd.js} +1 -1
- package/dist/assets/{SessionsList-Dqh1pfhl.js → SessionsList-BiwWycIZ.js} +1 -1
- package/dist/assets/{Showroom-DO5dhVVy.js → Showroom-0s5B_CeO.js} +1 -1
- package/dist/assets/{StorageLocationsTable-DjJKdT5E.js → StorageLocationsTable-C1DVGBNx.js} +1 -1
- package/dist/assets/System-BwuY4roI.js +2 -0
- package/dist/assets/{TemplateEditorDialog-eOBMrmCP.js → TemplateEditorDialog-DJH053yf.js} +1 -1
- package/dist/assets/{Terminal-AxKgimJQ.js → Terminal-05LvIPmb.js} +1 -1
- package/dist/assets/{TrainingProviders-DqSWU0Ff.js → TrainingProviders-Bn3XcU87.js} +1 -1
- package/dist/assets/{Viewer-BBtW52-D.js → Viewer-CEGgQL3O.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CnAAoU-a.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DDhXAQLs.js} +1 -1
- package/dist/assets/{action-draft-xWZeLJBc.js → action-draft-DZRCzvUT.js} +1 -1
- package/dist/assets/{ai-page.helpers-DutvjEb-.js → ai-page.helpers-BqFZuECV.js} +1 -1
- package/dist/assets/{assignment-candidates-BJPEmgFZ.js → assignment-candidates-HrM1L9T_.js} +1 -1
- package/dist/assets/{authed-media-BTPD9Rqy.js → authed-media-1CgRYZwt.js} +1 -1
- package/dist/assets/{board-model-p3qXSelJ.js → board-model-BOzVRklS.js} +1 -1
- package/dist/assets/{camera-block-model-BmK3dL9c.js → camera-block-model-BhMWHCN1.js} +1 -1
- package/dist/assets/{client-D93RkunP.js → client-BsVqhZVt.js} +12 -12
- package/dist/assets/{command-vocab-DGcpiUvY.js → command-vocab-CtYEjFuy.js} +1 -1
- package/dist/assets/{device-integration-icon-Cfi7eokn.js → device-integration-icon-ZlePL-_n.js} +1 -1
- package/dist/assets/device-picker-model-DmUpoaWG.js +1 -0
- package/dist/assets/dist-0V6xn4uA.js +1125 -0
- package/dist/assets/{dist-SwLD2DK1.js → dist-DbcyxH5L.js} +1 -1
- package/dist/assets/{format-Dzip80Uj.js → format-CcYZ7maC.js} +1 -1
- package/dist/assets/{hostInit-C3sYu6u4.js → hostInit-D-lwg3-d.js} +1 -1
- package/dist/assets/i18n-C-O-HI_i.js +1 -0
- package/dist/assets/{icons-C4C8iPI_.js → icons-B2CVt1RT.js} +1 -1
- package/dist/assets/{index-BZLBXpx-.js → index-BoIO5dDB.js} +3 -3
- package/dist/assets/{index-BFuQYqWe.css → index-CK-kENqn.css} +1 -1
- package/dist/assets/{linked-devices-model-ChJFxnJQ.js → linked-devices-model-fPUtRPaP.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-31325a3f.js → mf-entry-bootstrap-0-92a26d32.js} +2 -2
- package/dist/assets/mount-DmUpoaWG.js +1 -0
- package/dist/assets/{notification-rule-status-BWxeQ-_D.js → notification-rule-status-hMaW4ja5.js} +1 -1
- package/dist/assets/{player-overlays-hLBmOC8C.js → player-overlays-u4qsAGYn.js} +1 -1
- package/dist/assets/remoteEntry-By4S20tm.js +1 -0
- package/dist/assets/{src-CR4MjS0h.js → src-D8P6H9lv.js} +3 -3
- package/dist/assets/{sso-popup-D5c1Dbz3.js → sso-popup-TOufVS-B.js} +1 -1
- package/dist/assets/{step-inspector-model-kpUIIlrE.js → step-inspector-model-CdKo7nrB.js} +1 -1
- package/dist/assets/{use-scenes-feed-D60vwQnn.js → use-scenes-feed-MgmG62bq.js} +1 -1
- package/dist/assets/{useAdminDeviceRemoval-DHZF8Bhc.js → useAdminDeviceRemoval-B-tQ7WmY.js} +1 -1
- package/dist/assets/useEventInvalidation-DmUpoaWG.js +1 -0
- package/dist/assets/{useNodeUrlSelection-CxldmcjV.js → useNodeUrlSelection-BZYxtInW.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DgZGj8av.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DnfMKM8x.js} +2 -2
- package/dist/index.html +9 -9
- package/dist/server/addon.js +22 -1
- package/package.json +2 -2
- package/dist/assets/Build-CaXtQUh_.js +0 -40
- package/dist/assets/DeviceDetail-DNKg72IG.js +0 -1
- package/dist/assets/Logs-RCKlFer4.js +0 -1
- package/dist/assets/System-nfPLxCLF.js +0 -2
- package/dist/assets/device-picker-model-Bbj8t_iL.js +0 -1
- package/dist/assets/dist-ClyHN0ce.js +0 -1125
- package/dist/assets/i18n-ILINfI4k.js +0 -1
- package/dist/assets/mount-Bbj8t_iL.js +0 -1
- package/dist/assets/remoteEntry-9sIn-FFM.js +0 -1
- package/dist/assets/useEventInvalidation-Bbj8t_iL.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C as e,J as t,K as n,R as r,S as i,V as a,Y as o,a as s,et as c,o as l,t as u}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{$a as d,$i as f,In as p,Jn as m,Nr as h,Yn as g,Z as _,Zi as v,ar as y,ct as b,ft as x,va as S,wn as C,xr as w,yt as T,zr as E}from"./player-overlays-hLBmOC8C.js";import{Uc as D}from"./client-D93RkunP.js";import{n as O,t as ee}from"./ruler-Buxogset.js";import{r as te}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-8kv6pj9W.js";import{Aa as k,Bp as ne,Br as re,Dp as A,Er as ie,Hp as ae,If as oe,Lr as j,Nf as se,Oa as M,Or as ce,Qp as le,Rr as N,Vp as ue,Vr as de,aa as fe,gi as pe,ja as me,jr as P,kn as he,kr as ge,p as _e,rm as F,ua as I,yp as L,zf as ve,zr as R}from"./src-CR4MjS0h.js";import{t as ye}from"./i18n-ILINfI4k.js";import{t as z}from"./useTranslation-BJr-n0es.js";import"./mount-Bbj8t_iL.js";import{Ci as be,S as xe,b as Se,bi as Ce,yi as we}from"./index-BZLBXpx-.js";import{t as Te}from"./AdminSectionedPage-DfZeI0TS.js";import{t as B}from"./AdminPage-CFltVUtJ.js";import{t as Ee}from"./BootstrapSettingsForm-DKjedbyR.js";c();var V=`method`,H=8;function U(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function W(e){return Array.isArray(e)?e.filter(U):[]}function G(e,t){let n=e.$ref;if(typeof n!=`string`||!n.startsWith(`#/`))return e;let r=t;for(let e of n.slice(2).split(`/`))r=U(r)?r[e]:void 0;return U(r)?r:e}function K(e){let t=e.type;return typeof t==`string`?[t]:Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}function q(e){let t=e.required;return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}function J(e,t,n){let r=G(e,t);if(n>H)return null;if(`default`in r)return r.default;if(`const`in r)return r.const;let i=r.enum;if(Array.isArray(i)&&i.length>0)return i[0];let a=[...W(r.anyOf),...W(r.oneOf)];if(a.length>0){let e=a.find(e=>!K(G(e,t)).includes(`null`))??a[0];return e===void 0?null:J(e,t,n+1)}let o=W(r.allOf);if(o.length>0)return o.reduce((e,r)=>{let i=J(r,t,n+1);return U(e)&&U(i)?{...e,...i}:i},{});switch(K(r).find(e=>e!==`null`)){case`object`:return Y(r,t,n);case`array`:return[];case`string`:return``;case`number`:case`integer`:return typeof r.minimum==`number`?r.minimum:0;case`boolean`:return!1;default:return U(r.properties)?Y(r,t,n):null}}function Y(e,t,n){let r=U(e.properties)?e.properties:{},i={};for(let a of q(e)){let e=r[a];i[a]=U(e)?J(e,t,n+1):null}return i}function De(e){if(e!==null)return J(e,e,0)}function Oe(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e==`number`?Number.isInteger(e)?`integer`:`number`:typeof e}function ke(e,t){let n=Oe(e);return n===t||t===`number`&&n===`integer`}function X(e,t){return e===``?String(t):`${e}.${t}`}function Z(e,t,n,r,i){let a=G(t,n);if(i>H*2)return[];let o=[...W(a.anyOf),...W(a.oneOf)];if(o.length>0&&!o.some(t=>Z(e,t,n,r,i+1).length===0))return[{path:r,code:`no-branch`,expected:`${o.length}`}];let s=[];for(let t of W(a.allOf))s.push(...Z(e,t,n,r,i+1));let c=K(a);if(c.length>0&&!c.some(t=>ke(e,t)))return[...s,{path:r,code:`type`,expected:c.join(` | `)}];`const`in a&&JSON.stringify(a.const)!==JSON.stringify(e)&&s.push({path:r,code:`const`,expected:JSON.stringify(a.const)});let l=a.enum;if(Array.isArray(l)){let t=l.map(e=>JSON.stringify(e));t.includes(JSON.stringify(e))||s.push({path:r,code:`enum`,expected:t.join(`, `)})}if(typeof e==`number`&&s.push(...Ae(e,a,r)),typeof e==`string`&&s.push(...je(e,a,r)),Array.isArray(e)&&U(a.items)){let t=a.items;e.forEach((e,a)=>s.push(...Z(e,t,n,X(r,a),i+1)))}return U(e)&&s.push(...Me(e,a,n,r,i)),s}function Ae(e,t,n){let r=[],i=t.minimum,a=t.maximum;return typeof i==`number`&&e<i&&r.push({path:n,code:`minimum`,expected:`${i}`}),typeof a==`number`&&e>a&&r.push({path:n,code:`maximum`,expected:`${a}`}),r}function je(e,t,n){let r=[],i=t.minLength,a=t.maxLength;return typeof i==`number`&&e.length<i&&r.push({path:n,code:`min-length`,expected:`${i}`}),typeof a==`number`&&e.length>a&&r.push({path:n,code:`max-length`,expected:`${a}`}),r}function Me(e,t,n,r,i){let a=[],o=U(t.properties)?t.properties:{};for(let n of q(t))n in e||a.push({path:X(r,n),code:`required`,expected:n});for(let[s,c]of Object.entries(e)){let e=o[s];U(e)?a.push(...Z(c,e,n,X(r,s),i+1)):t.additionalProperties===!1&&a.push({path:X(r,s),code:`unknown-field`,expected:s})}return a}function Ne(e,t){return t===null?[]:Z(e,t,t,``,0)}function Pe(e){if(e.trim()===``)return{ok:!0,value:void 0};try{return{ok:!0,value:JSON.parse(e)}}catch(e){return{ok:!1,message:e instanceof Error?e.message:String(e)}}}function Q(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function Fe(e){let t=`${e.hubBase}/trpc/${e.path}`,n=`-H "Authorization: Bearer $CAMSTACK_TOKEN"`,r=e.input===void 0?null:JSON.stringify({json:e.input});if(e.kind===`mutation`){let e=r??JSON.stringify({json:null});return[`curl -sS -X POST ${n} \\`,` -H 'Content-Type: application/json' \\`,` --data ${Q(e)} \\`,` ${Q(t)}`].join(`
|
|
2
|
-
`)}return`curl -sS ${n} \\\n ${Q(`${t}${r===null?``:`?input=${encodeURIComponent(r)}`}`)}`}function $(e,t){let n=e[t];return typeof n==`string`?n:null}function Ie(e){let t=e instanceof Error?e.message:String(e),n=U(e)||e instanceof Error?Reflect.get(e,`data`):void 0;if(!U(n))return{message:t,code:null,httpStatus:null,path:null,capRouteReason:null};let r=n.httpStatus;return{message:t,code:$(n,`code`),httpStatus:typeof r==`number`?r:null,path:$(n,`path`),capRouteReason:$(n,`capRouteReason`)}}function Le(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}var Re={searchText:e=>[e.path,e.scope?.capName??``],facetGroups:[{id:`router`,value:e=>e.router},{id:`kind`,value:e=>e.kind},{id:`tier`,value:e=>e.tier},{id:`source`,value:e=>e.source}]},ze={query:`info`,mutation:`warning`,subscription:`neutral`},Be={public:`success`,protected:`neutral`,admin:`primary`};function Ve({kind:e}){let{t}=z();return i(k,{variant:ze[e],size:`sm`,children:t(`system.apiExplorer.kind.${e}`)})}function He({tier:e}){let{t}=z();return i(k,{variant:Be[e],style:`outline`,size:`sm`,children:t(`system.apiExplorer.tier.${e}`)})}function Ue({methods:t,selectedPath:n,onSelect:r}){let{t:a}=z(),o=ie(t,Re),s=e=>a(`system.apiExplorer.group.${e}`),c=e=>t=>e===`router`?t:a(`system.apiExplorer.${e}.${t}`),l=[{key:`path`,header:a(`system.apiExplorer.column.method`),sortValue:e=>e.path,render:t=>e(`span`,{className:`font-mono text-xs`,children:[e(`span`,{className:`text-foreground-muted`,children:[t.router,`.`]}),i(`span`,{className:`text-foreground`,children:t.method})]})},{key:`kind`,header:a(`system.apiExplorer.column.kind`),sortValue:e=>e.kind,render:e=>i(Ve,{kind:e.kind})},{key:`tier`,header:a(`system.apiExplorer.column.tier`),sortValue:e=>e.tier,render:e=>i(He,{tier:e.tier})},{key:`scope`,header:a(`system.apiExplorer.column.scope`),sortValue:e=>e.scope===null?null:`${e.scope.capName}:${e.scope.access}`,render:t=>t.scope===null?i(`span`,{className:`text-xs text-foreground-subtle`,children:a(`system.apiExplorer.coreRoute`)}):e(`span`,{className:`font-mono text-xs text-foreground-muted`,children:[t.scope.capName,` · `,t.scope.access]})}];return e(`div`,{className:`space-y-3`,children:[i(ce,{state:o.state,facets:o.facets,groups:o.groups.map(e=>({...e,label:s(e.id),facetLabel:c(e.id),...e.id===`router`?{display:`menu`}:{}})),labels:{searchPlaceholder:a(`system.apiExplorer.searchPlaceholder`),searchLabel:a(`system.apiExplorer.searchLabel`),facetsLabel:a(`system.apiExplorer.facetsLabel`),clearLabel:a(`system.apiExplorer.clearFilters`)},onSearch:o.setSearch,onToggleFacet:o.toggleFacet,onToggleGroupFacet:o.toggleGroupFacet,onClear:o.clear}),i(re,{columns:l,rows:o.rows,rowKey:e=>e.path,onRowClick:e=>r(e.path),rowClassName:e=>e.path===n?`bg-primary/10`:void 0,minWidthPx:560,maxBodyHeight:de,defaultSort:{columnKey:`path`,dir:`asc`},emptyMessage:o.active?a(`system.apiExplorer.noMatch`):a(`system.apiExplorer.noMethods`)})]})}var We={yes:`success`,"per-device":`warning`,no:`danger`},Ge={yes:`system.apiExplorer.callableYes`,"per-device":`system.apiExplorer.callablePerDevice`,no:`system.apiExplorer.callableNo`};function Ke(e){let t=De(e);return t===void 0?``:JSON.stringify(t,null,2)}function qe({method:t}){let{t:r}=z(),s=b(),c=te(F.useUtils().client),l=F.apiCatalog.inputSchema.useQuery({path:t.path},{enabled:t.hasInput,staleTime:1/0}),u=l.data?.schema??null,[d,f]=o(``),[p,h]=o(null),[g,v]=o(!1);a(()=>{f(Ke(u))},[u]);let x=n(()=>Pe(d),[d]),C=x.ok?Ne(x.value,u):[],w=t.kind!==`subscription`&&t.callable!==`no`,T=w&&x.ok&&C.length===0&&!g,E=t.kind===`mutation`?`mutation`:`query`,D=Fe({hubBase:_(),path:t.path,kind:E,input:x.ok?x.value:void 0}),O=async()=>{if(!x.ok||t.kind===`mutation`&&!await s({title:r(`system.apiExplorer.confirmTitle`),message:r(`system.apiExplorer.confirmMessage`,{method:t.path}),confirmLabel:r(`system.apiExplorer.run`),variant:`danger`}))return;v(!0);let e=performance.now();try{h({kind:`ok`,value:E===`mutation`?await c.mutation(t.path,x.value):await c.query(t.path,x.value),ms:performance.now()-e})}catch(t){h({kind:`error`,error:Ie(t),ms:performance.now()-e})}finally{v(!1)}};return i(j,{headingId:`api-explorer-method`,title:r(`system.apiExplorer.column.method`),icon:S,actions:e(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[i(Ve,{kind:t.kind}),i(He,{tier:t.tier})]}),children:e(`div`,{className:`space-y-4 p-3 sm:p-4`,children:[i(`p`,{className:`break-all font-mono text-sm text-foreground`,children:t.path}),i(N,{items:[{key:r(`system.apiExplorer.column.scope`),value:t.scope===null?r(`system.apiExplorer.coreRouteLong`):r(`system.apiExplorer.scopeValue`,{cap:t.scope.capName,access:t.scope.access,capScope:t.scope.capScope})},{key:r(`system.apiExplorer.callable`),value:i(k,{variant:We[t.callable],size:`sm`,children:r(Ge[t.callable])})}]}),t.kind===`subscription`&&i(`p`,{className:`text-sm text-foreground-muted`,children:r(`system.apiExplorer.subscriptionNote`)}),t.hasInput&&i(Je,{loading:l.isPending,error:l.error?.message??l.data?.error??null,schema:u}),w&&e(`div`,{className:`space-y-2`,children:[i(`label`,{htmlFor:`api-explorer-input`,className:`text-xs font-medium text-foreground-muted`,children:r(`system.apiExplorer.input`)}),i(pe,{id:`api-explorer-input`,value:d,onChange:e=>f(e.target.value),rows:t.hasInput?8:2,spellCheck:!1,placeholder:t.hasInput?void 0:r(`system.apiExplorer.noInput`),state:x.ok&&C.length===0?`default`:`error`,className:`font-mono text-xs`}),i(Ye,{parseError:x.ok?null:x.message,issues:C}),e(`div`,{className:`flex flex-wrap items-center gap-2`,children:[e(L,{onClick:()=>void O(),disabled:!T,children:[i(y,{className:`h-3.5 w-3.5`}),r(g?`system.apiExplorer.running`:`system.apiExplorer.run`)]}),t.hasInput&&e(L,{variant:`ghost`,onClick:()=>f(Ke(u)),children:[i(m,{className:`h-3.5 w-3.5`}),r(`system.apiExplorer.resetInput`)]})]})]}),p!==null&&i(Xe,{outcome:p}),t.kind!==`subscription`&&e(`div`,{className:`space-y-2`,children:[e(`div`,{className:`flex items-center justify-between gap-2`,children:[i(`span`,{className:`text-xs font-medium text-foreground-muted`,children:r(`system.apiExplorer.curl`)}),i(ge,{value:D,label:r(`system.apiExplorer.copy`),srLabel:r(`system.apiExplorer.curl`)})]}),i(P,{maxHeight:200,children:D}),i(`p`,{className:`text-xs text-foreground-subtle`,children:r(`system.apiExplorer.curlHint`)})]})]})})}function Je({loading:t,error:n,schema:r}){let{t:a}=z();return e(`div`,{className:`space-y-2`,children:[i(`span`,{className:`text-xs font-medium text-foreground-muted`,children:a(`system.apiExplorer.inputSchema`)}),t?i(me,{className:`h-24 w-full`}):n===null?i(P,{maxHeight:240,children:Le(r)}):i(M,{variant:`warning`,message:a(`system.apiExplorer.schemaUnavailable`,{error:n})})]})}function Ye({parseError:t,issues:n}){let{t:r}=z();return t===null&&n.length===0?null:e(`ul`,{className:`space-y-0.5 text-xs text-danger`,role:`alert`,children:[t!==null&&i(`li`,{children:r(`system.apiExplorer.invalidJson`,{error:t})}),n.map(e=>i(`li`,{children:r(`system.apiExplorer.issue.${e.code}`,{path:e.path===``?r(`system.apiExplorer.rootPath`):e.path,expected:e.expected})},`${e.path}:${e.code}`))]})}function Xe({outcome:t}){let{t:n}=z(),r=n(`system.apiExplorer.duration`,{ms:Math.round(t.ms)});if(t.kind===`ok`)return e(`div`,{className:`space-y-2`,children:[e(`div`,{className:`flex items-center gap-2`,children:[i(`span`,{className:`text-xs font-medium text-foreground-muted`,children:n(`system.apiExplorer.result`)}),i(k,{variant:`success`,size:`sm`,children:r})]}),i(P,{maxHeight:400,children:Le(t.value)})]});let{error:a}=t,o=[{key:n(`system.apiExplorer.errorCode`),value:a.code},{key:n(`system.apiExplorer.errorStatus`),value:a.httpStatus},{key:n(`system.apiExplorer.errorPath`),value:a.path},{key:n(`system.apiExplorer.errorCapRoute`),value:a.capRouteReason}].flatMap(e=>e.value===null?[]:[{key:e.key,value:String(e.value)}]);return i(M,{title:`${n(`system.apiExplorer.callFailed`)} · ${r}`,message:e(`div`,{className:`space-y-2`,children:[i(`p`,{className:`break-words`,children:a.message}),o.length>0&&i(N,{items:o})]})})}c();function Ze(){let{t:n}=z(),[o,s]=be(),c=o.get(V),l=F.apiCatalog.list.useQuery(void 0,{staleTime:1/0}),u=t(null),d=l.data?.methods.find(e=>e.path===c)??null,f=r(e=>{s(t=>{let n=new URLSearchParams(t);return n.set(V,e),n},{replace:!0})},[s]),p=d?.path??null;return a(()=>{p!==null&&u.current?.scrollIntoView?.({block:`start`,behavior:`smooth`})},[p]),i(B,{embedded:!0,icon:S,title:n(`system.apiExplorer.title`),subtitle:n(`system.apiExplorer.subtitle`),children:l.isPending?i(me,{className:`h-64 w-full`}):l.error===null?e(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[i(j,{headingId:`api-explorer-methods`,title:n(`system.apiExplorer.methodsTitle`,{count:l.data.methods.length}),children:i(`div`,{className:`p-3 sm:p-4`,children:i(Ue,{methods:l.data.methods,selectedPath:c,onSelect:f})})}),i(`div`,{ref:u,className:`min-w-0 scroll-mt-4`,children:d===null?c===null?i(I,{icon:w,title:n(`system.apiExplorer.pickTitle`),description:n(`system.apiExplorer.pickDescription`)}):i(M,{variant:`warning`,message:n(`system.apiExplorer.unknownMethod`,{method:c})}):i(qe,{method:d},d.path)})]}):i(M,{title:n(`system.apiExplorer.couldNotLoad`),message:l.error.message,onRetry:()=>void l.refetch()})})}var Qe={detection:`border-green-500`,detector:`border-green-500`,streaming:`border-blue-500`,decode:`border-blue-500`,decoder:`border-blue-500`,recording:`border-orange-500`,recorder:`border-orange-500`,transcoding:`border-purple-500`,transcoder:`border-purple-500`,restream:`border-cyan-500`,restreamer:`border-cyan-500`,storage:`border-yellow-500`,notification:`border-pink-500`,notifier:`border-pink-500`,faces:`border-indigo-500`},$e={detection:`bg-green-500/5`,detector:`bg-green-500/5`,streaming:`bg-blue-500/5`,decode:`bg-blue-500/5`,decoder:`bg-blue-500/5`,recording:`bg-orange-500/5`,recorder:`bg-orange-500/5`,transcoding:`bg-purple-500/5`,transcoder:`bg-purple-500/5`,restream:`bg-cyan-500/5`,restreamer:`bg-cyan-500/5`,storage:`bg-yellow-500/5`,notification:`bg-pink-500/5`,notifier:`bg-pink-500/5`,faces:`bg-indigo-500/5`};function et({entry:t,actions:n}){let r=t.name.toLowerCase(),a=Qe[r]??`border-primary`,o=$e[r]??`bg-primary/5`,s=t.providers.find(e=>e.active),c=n?.pendingCapability===t.name;return e(`div`,{className:`rounded-lg border-t-2 border border-border ${a} ${o} p-3 space-y-2`,children:[e(`div`,{className:`flex items-center justify-between gap-2`,children:[e(`span`,{className:`text-xs font-semibold text-foreground capitalize flex items-center gap-1.5`,children:[t.name,c&&i(E,{className:`h-3 w-3 animate-spin text-primary`})]}),i(`span`,{className:`rounded-full px-2 py-0.5 text-[10px] font-medium ${t.mode===`singleton`?`bg-primary/10 text-primary`:`bg-info/10 text-info`}`,children:t.mode})]}),t.mode===`singleton`?i(tt,{entry:t,actions:n,activeProvider:s,isPending:c}):i(nt,{entry:t,actions:n,isPending:c})]})}function tt({entry:t,actions:n,activeProvider:r,isPending:a}){let{t:o}=z();if(!n)return i(`div`,{children:r?e(`div`,{className:`flex items-center gap-1.5 text-[10px] text-foreground`,children:[i(v,{className:`h-3 w-3 text-green-400 shrink-0`}),i(`span`,{className:`font-medium`,children:r.addonName}),i(`span`,{className:`rounded-full bg-green-500/10 text-green-400 px-1.5 py-0.5 font-medium ml-auto`,children:`ACTIVE`})]}):i(`div`,{className:`text-[10px] text-foreground-subtle italic`,children:o(`addons.capabilityMap.noActiveProvider`,`No active provider`)})});if(t.providers.length===0)return i(`div`,{className:`text-[10px] text-foreground-subtle italic`,children:o(`addons.capabilityMap.noProviders`,`No providers`)});let s=`__inherit__`;return e(`div`,{className:`space-y-2`,children:[i(`div`,{className:`space-y-1`,children:t.providers.map(r=>{let o=r.active;return e(L,{variant:`unstyled`,type:`button`,disabled:a||o,onClick:()=>n.onSelectSingleton(t.name,r.addonId),className:`flex w-full items-center gap-1.5 rounded px-1.5 py-1 text-[10px] text-left transition-colors ${o?`bg-green-500/10 text-foreground cursor-default`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground disabled:opacity-50`}`,children:[i(`span`,{className:`h-2.5 w-2.5 rounded-full border shrink-0 ${o?`border-green-400 bg-green-400`:`border-border`}`}),i(`span`,{className:`font-medium truncate`,children:r.addonName}),o&&i(`span`,{className:`rounded-full bg-green-500/10 text-green-400 px-1.5 py-0.5 font-medium ml-auto shrink-0`,children:`ACTIVE`})]},r.addonId)})}),t.perNode&&t.perNode.length>0&&i(`div`,{className:`space-y-2 pt-1 border-t border-border/40`,children:t.perNode.map(r=>{let c=r.hasOverride&&r.resolvedActive?r.resolvedActive:s,l=[{value:s,label:r.resolvedActive?o(`addons.capabilityMap.inheritGlobalWith`,{provider:r.resolvedActive}):o(`addons.capabilityMap.inheritGlobal`)},...r.providers.map(e=>({value:e,label:e}))],u=e=>{e===s?n.onClearNodeSingleton(t.name,r.nodeId):n.onSelectNodeSingleton(t.name,r.nodeId,e)},d=a;return e(`div`,{className:`space-y-0.5`,children:[e(`div`,{className:`text-[9px] font-semibold uppercase tracking-widest text-foreground-subtle/60 px-1.5`,children:[r.nodeId,r.hasOverride&&i(`span`,{className:`ml-1.5 rounded-full bg-primary/10 text-primary px-1 py-0.5 normal-case tracking-normal font-medium`,children:o(`common.override`)})]}),l.map(t=>{let n=c===t.value;return e(L,{variant:`unstyled`,type:`button`,disabled:d||n,onClick:()=>u(t.value),className:`flex w-full items-center gap-1.5 rounded px-1.5 py-1 text-[10px] text-left transition-colors ${n?`bg-green-500/10 text-foreground cursor-default`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground disabled:opacity-50`}`,children:[i(`span`,{className:`h-2.5 w-2.5 rounded-full border shrink-0 ${n?`border-green-400 bg-green-400`:`border-border`}`}),i(`span`,{className:`font-medium truncate`,children:t.label}),n&&t.value!==s&&i(`span`,{className:`rounded-full bg-green-500/10 text-green-400 px-1.5 py-0.5 font-medium ml-auto shrink-0`,children:`ACTIVE`})]},t.value)})]},r.nodeId)})})]})}function nt({entry:t,actions:n,isPending:r}){let{t:a}=z();if(t.providers.length===0)return i(`div`,{className:`text-[10px] text-foreground-subtle italic`,children:a(`addons.capabilityMap.noProviders`,`No providers`)});if(!n)return i(`div`,{className:`space-y-1`,children:t.providers.map(t=>e(`div`,{className:`flex items-center justify-between gap-2 text-[10px]`,children:[i(`span`,{className:`text-foreground-subtle`,children:t.addonName}),t.active&&i(`span`,{className:`rounded-full bg-green-500/10 text-green-400 px-1.5 py-0.5 font-medium`,children:`ACTIVE`})]},t.addonId))});let o=t.providers.filter(e=>e.active).map(e=>e.addonId),s=(e,r)=>{let i=r?[...new Set([...o,e])]:o.filter(t=>t!==e);n.onToggleCollection(t.name,i)};return i(`div`,{className:`space-y-1`,children:t.providers.map(t=>e(`label`,{className:`flex items-center justify-between gap-2 text-[10px] rounded px-1.5 py-1 transition-colors ${r?`opacity-50`:`hover:bg-surface-hover cursor-pointer`}`,children:[e(`span`,{className:`flex items-center gap-1.5 min-w-0`,children:[i(d,{checked:t.active,disabled:r,onChange:e=>s(t.addonId,e.target.checked),className:`h-3 w-3 accent-green-500 shrink-0`}),i(`span`,{className:`text-foreground truncate`,children:t.addonName})]}),t.active&&i(`span`,{className:`rounded-full bg-green-500/10 text-green-400 px-1.5 py-0.5 font-medium shrink-0`,children:`ACTIVE`})]},t.addonId))})}function rt({capabilities:e,actions:t}){let{t:n}=z();return e.length===0?i(`div`,{className:`text-xs text-foreground-subtle text-center py-8`,children:n(`addons.capabilityMap.noCapabilitiesRegistered`,`No capabilities registered`)}):i(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3`,children:e.map(e=>i(et,{entry:e,actions:t},e.name))})}c();var it=[`capabilities`,`listCapabilities`];function at(e){return e===`singleton`||e===`collection`}function ot(e){let t=e.indexOf(`@`);return t===-1?ye.t(`system.capabilities.providerHub`,{addonId:e}):`${e.slice(0,t)} (${e.slice(t+1)})`}function st(e,t){return{name:e.name,mode:t,providers:e.providers.map(n=>({addonId:n,addonName:ot(n),active:t===`singleton`?e.activeProvider===n:!e.disabledProviders.includes(n)})),...t===`singleton`&&e.perNode?{perNode:e.perNode}:{}}}function ct(){let{t}=z(),r=T(),[a,c]=o(null),[l,d]=o(null),p=s({queryKey:it,queryFn:()=>r.trpcClient.capabilities.listCapabilities.query()}),m=n(()=>{let e=(p.data??[]).flatMap(e=>at(e.mode)?[st(e,e.mode)]:[]),t=e.filter(e=>e.mode===`singleton`).toSorted((e,t)=>e.name.localeCompare(t.name)),n=e.filter(e=>e.mode===`collection`).toSorted((e,t)=>e.name.localeCompare(t.name));return[...t,...n]},[p.data]),h=n(()=>m.filter(e=>e.mode===`singleton`),[m]),g=n(()=>m.filter(e=>e.mode===`collection`),[m]),_=u({mutationFn:e=>r.trpcClient.capabilities.setActiveSingleton.mutate({capability:e.capName,addonId:e.addonId}),onMutate:e=>{c(e.capName),d(null)},onSuccess:async(e,n)=>{d({kind:`success`,message:t(`system.capabilities.isNowActive`,`{{capName}} → {{addonId}} is now active.`,{capName:n.capName,addonId:n.addonId})}),await p.refetch()},onError:(e,n)=>{d({kind:`error`,message:t(`system.capabilities.failedToSet`,{cap:n.capName,error:e instanceof Error?e.message:t(`common.unknownError`)})})},onSettled:()=>c(null)}),y=u({mutationFn:e=>r.trpcClient.capabilities.setActiveSingleton.mutate({capability:e.capName,addonId:e.addonId,nodeId:e.nodeId}),onMutate:e=>{c(e.capName),d(null)},onSuccess:async(e,t)=>{d({kind:`success`,message:`${t.capName} @ ${t.nodeId} → ${t.addonId}.`}),await p.refetch()},onError:(e,n)=>{d({kind:`error`,message:t(`system.capabilities.failedToSetOnNode`,{cap:n.capName,node:n.nodeId,error:e instanceof Error?e.message:t(`common.unknownError`)})})},onSettled:()=>c(null)}),b=u({mutationFn:e=>r.trpcClient.capabilities.clearSingletonNodeOverride.mutate({capability:e.capName,nodeId:e.nodeId}),onMutate:e=>{c(e.capName),d(null)},onSuccess:async(e,n)=>{d({kind:`success`,message:t(`system.capabilities.nowInheritsTheGlobalDefault`,`{{capName}} @ {{nodeId}} now inherits the global default.`,{capName:n.capName,nodeId:n.nodeId})}),await p.refetch()},onError:(e,n)=>{d({kind:`error`,message:t(`system.capabilities.failedToClearOnNode`,{cap:n.capName,node:n.nodeId,error:e instanceof Error?e.message:t(`common.unknownError`)})})},onSettled:()=>c(null)}),x=u({mutationFn:e=>r.trpcClient.capabilities.setCollectionEnabledProviders.mutate({capability:e.capName,enabledAddonIds:[...e.enabledAddonIds]}),onMutate:e=>{c(e.capName),d(null)},onSuccess:async(e,n)=>{d({kind:`success`,message:t(`system.capabilities.providerSEnabled`,`{{capName}}: {{length}} provider(s) enabled.`,{capName:n.capName,length:n.enabledAddonIds.length})}),await p.refetch()},onError:(e,n)=>{d({kind:`error`,message:t(`system.capabilities.failedToUpdate`,{cap:n.capName,error:e instanceof Error?e.message:t(`common.unknownError`)})})},onSettled:()=>c(null)}),S={onSelectSingleton:(e,t)=>_.mutate({capName:e,addonId:t}),onSelectNodeSingleton:(e,t,n)=>y.mutate({capName:e,nodeId:t,addonId:n}),onClearNodeSingleton:(e,t)=>b.mutate({capName:e,nodeId:t}),onToggleCollection:(e,t)=>x.mutate({capName:e,enabledAddonIds:t}),pendingCapability:a};return e(B,{embedded:!0,icon:C,title:t(`system.capabilities.capabilities`,`Capabilities`),subtitle:t(`system.capabilities.chooseWhichProviderIsActive`,`Choose which provider is active for each system capability. Singleton caps pick exactly one provider; collection caps enable a set.`),children:[l&&e(`div`,{className:`flex items-center gap-2 rounded-md border px-3 py-2 text-xs ${l.kind===`success`?`border-success/30 bg-success/10 text-success`:`border-danger/40 bg-danger/10 text-danger`}`,children:[l.kind===`success`?i(v,{className:`h-3.5 w-3.5 shrink-0`}):i(f,{className:`h-3.5 w-3.5 shrink-0`}),i(`span`,{children:l.message})]}),p.isLoading&&i(`div`,{className:`flex items-center justify-center py-16`,children:i(`div`,{className:`animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full`})}),p.isError&&!p.isLoading&&i(M,{title:t(`system.capabilities.failedToLoadCapabilities`,`Failed to load capabilities`),message:p.error instanceof Error?p.error.message:t(`system.capabilities.unknownError`,`Unknown error`),onRetry:()=>void p.refetch()}),!p.isLoading&&!p.isError&&m.length===0&&i(`div`,{className:`text-xs text-foreground-subtle text-center py-16`,children:t(`system.capabilities.noCapabilitiesRegistered`,`No capabilities registered.`)}),!p.isLoading&&!p.isError&&m.length>0&&e(`div`,{className:`space-y-6`,children:[h.length>0&&e(`section`,{className:`space-y-2`,children:[i(`h2`,{className:`text-[11px] font-semibold uppercase tracking-widest text-foreground-subtle/70`,children:t(`system.capabilities.singletonPickOneProvider`,`Singleton — pick one provider`)}),i(rt,{capabilities:h,actions:S})]}),g.length>0&&e(`section`,{className:`space-y-2`,children:[i(`h2`,{className:`text-[11px] font-semibold uppercase tracking-widest text-foreground-subtle/70`,children:t(`system.capabilities.collectionEnableASet`,`Collection — enable a set`)}),i(rt,{capabilities:g,actions:S})]})]})]})}var lt={escape:`Esc`,enter:`Enter`};function ut(e,t){let n=ae(e),r=lt[n.key]??n.key.toUpperCase();return t===`mac`?`${n.alt?`⌥`:``}${n.shift?`⇧`:``}${n.mod?`⌘`:``}${r}`:[...n.mod?[`Ctrl`]:[],...n.alt?[`Alt`]:[],...n.shift?[`Shift`]:[],r].join(`+`)}function dt(){let{t}=z(),n=ne(),r=ue();return i(j,{headingId:`settings-hotkeys`,title:t(`systemPage.settings.hotkeys.title`,`Keyboard shortcuts`),icon:O,testId:`settings-hotkeys`,children:e(`div`,{className:`space-y-2 p-3`,children:[i(`p`,{className:`text-xs text-foreground-subtle`,children:t(`systemPage.settings.hotkeys.description`,`The shortcuts active on this page. They cannot be changed.`)}),n.length===0?i(I,{title:t(`systemPage.settings.hotkeys.empty`,`No shortcuts are active on this page.`)}):n.map(e=>i(R,{label:e.label??t(`systemPage.settings.hotkeys.unnamed`,`Shortcut`),children:i(`kbd`,{className:`rounded-md border border-border bg-surface px-1.5 py-0.5 font-mono text-xs text-foreground`,children:ut(e.combo,r)})},`${e.scope}|${e.combo}`))]})})}c();var ft=[[`system`]];function pt(e){return e.toFixed(6).replace(/0+$/,``).replace(/\.$/,``)}function mt(){let{t}=z(),n=l(),r=oe(),s=ve(),c=se(),[u,d]=o(``),[f,p]=o(``),[m,_]=o(null),v=r.data?.location??null;a(()=>{d(v===null?``:pt(v.latitude)),p(v===null?``:pt(v.longitude))},[v]);let y=async()=>{await n.invalidateQueries({queryKey:ft})},b=async e=>{e.preventDefault();let t=Number(u),n=Number(f);if(u.trim()===``||f.trim()===``){_(`Enter both a latitude and a longitude, or press Clear.`);return}if(!Number.isFinite(t)||t<-90||t>90){_(`Latitude must be between -90 and 90 decimal degrees.`);return}if(!Number.isFinite(n)||n<-180||n>180){_(`Longitude must be between -180 and 180 decimal degrees.`);return}_(null),await s.mutateAsync({latitude:t,longitude:n}),await y()},x=async()=>{_(null),await s.mutateAsync(null),await y()},S=async()=>{_(null),await c.mutateAsync(),await y()},C=s.isPending||c.isPending||r.isLoading;return e(fe,{className:`space-y-3`,children:[e(`div`,{className:`flex items-start justify-between gap-3`,children:[e(`div`,{className:`flex items-start gap-2`,children:[i(h,{className:`h-4 w-4 mt-0.5 text-muted-foreground shrink-0`}),i(`div`,{children:i(`h3`,{className:`text-sm font-medium`,children:t(`settings.siteLocationCard.siteLocation`,`Site location`)})})]}),v===null?i(k,{variant:`warning`,children:t(`settings.siteLocationCard.notConfigured`,`Not configured`)}):i(k,{variant:v.source===`operator-set`?`success`:`info`,children:v.source===`operator-set`?t(`settings.siteLocationCard.setByYou`,`Set by you`):t(`settings.siteLocationCard.derivedFromIp`,`Derived from IP`)})]}),v?.label!==void 0&&v.label!==``?i(`p`,{className:`text-xs text-muted-foreground`,children:t(`settings.siteLocationCard.detectedNear`,{place:v.label})}):null,v===null&&r.data?.derivationAttemptedAt!==null?e(`p`,{className:`text-xs text-warning`,children:[t(`settings.siteLocationCard.automaticDetectionFromThePublic`,`Automatic detection from the public IP did not succeed`),r.data?.derivationError!==null&&r.data?.derivationError!==void 0?`: ${r.data.derivationError}`:`.`,` `,t(`settings.siteLocationCard.itIsNotRetriedOn`,`It is not retried on its own — enter the coordinates, or press Detect.`)]}):null,e(`form`,{className:`flex flex-wrap items-end gap-3`,onSubmit:b,children:[e(`label`,{className:`flex flex-col gap-1 text-xs`,children:[i(`span`,{className:`text-muted-foreground`,children:t(`settings.siteLocationCard.latitude`,`Latitude`)}),i(A,{className:`w-40`,value:u,inputMode:`decimal`,placeholder:`40.851800`,onChange:e=>d(e.target.value),"aria-label":t(`settings.siteLocationCard.latitude`,`Latitude`)})]}),e(`label`,{className:`flex flex-col gap-1 text-xs`,children:[i(`span`,{className:`text-muted-foreground`,children:t(`settings.siteLocationCard.longitude`,`Longitude`)}),i(A,{className:`w-40`,value:f,inputMode:`decimal`,placeholder:`14.268100`,onChange:e=>p(e.target.value),"aria-label":t(`settings.siteLocationCard.longitude`,`Longitude`)})]}),i(L,{type:`submit`,disabled:C,children:t(`common.save`,`Save`)}),e(L,{type:`button`,variant:`ghost`,disabled:C,onClick:S,children:[i(g,{className:`h-3.5 w-3.5 mr-1`}),t(`settings.siteLocationCard.detectFromIp`,`Detect from IP`)]}),v===null?null:i(L,{type:`button`,variant:`ghost`,disabled:C,onClick:x,children:t(`settings.siteLocationCard.clear`,`Clear`)})]}),m===null?null:i(`p`,{className:`text-xs text-danger`,children:m}),i(`p`,{className:`text-xs text-muted-foreground`,children:t(`settings.siteLocationCard.wgs84DecimalDegreesDetectAsks`,`WGS84 decimal degrees. Detect asks a public geo-IP service once and will not overwrite a value you typed — clear it first.`)})]})}c();function ht(e){return D.some(t=>t===e)}function gt(e){return he.some(t=>t===e)}function _t(){let{t}=z(),n=_e(),[r,a]=o(!1),[s,c]=o(null),l=e=>{a(!0),c(null),n.update(e).catch(e=>c(e instanceof Error?e.message:String(e))).finally(()=>a(!1))},u=n.status!==`ok`||!n.writable||r;return i(j,{headingId:`settings-units`,title:t(`systemPage.myAccess.units.title`,`Units`),icon:ee,testId:`settings-units`,children:e(`div`,{className:`space-y-2 p-3`,children:[i(`p`,{className:`text-xs text-foreground-subtle`,children:t(`systemPage.myAccess.units.description`,`How readings are shown to you, on every device you sign in on. Stored values do not change.`)}),n.status===`error`&&i(M,{message:t(`systemPage.myAccess.units.loadError`,`Your unit preferences could not be read.`)}),n.status===`ok`&&!n.writable&&i(M,{message:t(`systemPage.myAccess.units.unreadable`,`The saved unit preferences are in a format this version cannot read, so they are left untouched.`)}),s!==null&&i(M,{message:s}),i(R,{label:t(`systemPage.myAccess.units.temperature`,`Temperature`),children:i(x,{"aria-label":t(`systemPage.myAccess.units.temperature`,`Temperature`),value:n.value.temperature,disabled:u,onChange:e=>{let t=e.target.value;gt(t)&&l({temperature:t})},options:[{value:`celsius`,label:t(`systemPage.myAccess.units.celsius`,`Celsius (°C)`)},{value:`fahrenheit`,label:t(`systemPage.myAccess.units.fahrenheit`,`Fahrenheit (°F)`)}]})}),i(R,{label:t(`systemPage.myAccess.units.system`,`Other measurements`),children:i(x,{"aria-label":t(`systemPage.myAccess.units.system`,`Other measurements`),value:n.value.system,disabled:u,onChange:e=>{let t=e.target.value;ht(t)&&l({system:t})},options:[{value:`metric`,label:t(`systemPage.myAccess.units.metric`,`Metric (km/h, hPa, mm)`)},{value:`imperial`,label:t(`systemPage.myAccess.units.imperial`,`Imperial (mph, inHg, in)`)}]})})]})})}function vt(){let{t}=z(),{nodes:n,isLoading:r}=le(),a=n.find(e=>e.isHub&&e.isOnline);return e(B,{embedded:!0,children:[i(mt,{}),r?i(`div`,{className:`text-foreground-subtle text-sm py-12 text-center`,children:t(`admin.system.settings.loadingHubTopology`,`Loading hub topology…`)}):a?i(Ee,{emptyMessage:t(`admin.system.settings.bootstrapUnavailable`,`Not available — the addon that owns the server settings did not answer.`)}):e(`div`,{className:`flex flex-col items-center justify-center text-foreground-subtle text-sm gap-2 py-12`,children:[i(p,{className:`h-8 w-8 opacity-30`}),i(`p`,{children:t(`admin.system.settings.noOnlineHubNodeFound`,`No online hub node found.`)}),i(`p`,{className:`text-xs`,children:t(`admin.system.settings.settingsWillAppearOnceThe`,`Settings will appear once the hub is reachable.`)})]}),e(`section`,{"aria-labelledby":`settings-per-user`,className:`mt-3 sm:mt-4 space-y-3 sm:space-y-4`,children:[i(`h2`,{id:`settings-per-user`,className:`text-xs font-semibold uppercase tracking-wide text-foreground-subtle`,children:t(`systemPage.settings.perUser`,`Your settings`)}),i(_t,{}),i(dt,{})]})]})}function yt(){let{t:e}=z(),t=Se(`/system/settings`,{t:e,isAdmin:!0})??{icon:p,title:e(`system.systemNav`,`System`)},{search:n,hash:r}=Ce();return new URLSearchParams(n).get(`tab`)===`secrets`?i(we,{replace:!0,to:`${xe(n)}${r}`}):i(Te,{icon:t.icon,title:t.title,defaultSection:`settings`,sectionsLabel:`${t.title} sections`,sections:[{id:`settings`,label:e(`system.system.settings`,`Settings`),content:i(vt,{})},{id:`capabilities`,label:e(`system.system.capabilities`,`Capabilities`),content:i(ct,{})},{id:`api-explorer`,label:e(`system.system.apiExplorer`),content:i(Ze,{}),ownedParams:[`method`]}]})}export{yt as SystemPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-CR4MjS0h.js";
|