@camstack/addon-admin-ui 1.2.691 → 1.2.693

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/assets/{AccessSection-D8SFhAIG.js → AccessSection-BTyH6Uq_.js} +1 -1
  3. package/dist/assets/Addons-VJhgqhzH.js +5 -0
  4. package/dist/assets/{AdminPage-Dr8PsIuX.js → AdminPage-DHZrZAII.js} +1 -1
  5. package/dist/assets/{AdminSectionedPage-C3NbPIMK.js → AdminSectionedPage-3Jh0qbF0.js} +1 -1
  6. package/dist/assets/AiProfiles-Dle37tWQ.js +3 -0
  7. package/dist/assets/Archive-SdeDPpcj.js +1 -0
  8. package/dist/assets/{BootstrapSettingsForm-EahE9xrT.js → BootstrapSettingsForm-DhCX-aLg.js} +1 -1
  9. package/dist/assets/Build-DY6Kzxeg.js +40 -0
  10. package/dist/assets/{Calendars-DqxqjWNj.js → Calendars-C8ofmzzq.js} +1 -1
  11. package/dist/assets/Cluster-JhBKuQrD.js +1 -0
  12. package/dist/assets/CompositionBlockEditor-Br6RqkCB.js +2 -0
  13. package/dist/assets/CompositionEditorPage-15ZoqacB.js +1 -0
  14. package/dist/assets/Data-B5ocdjeC.js +2 -0
  15. package/dist/assets/DeviceDetail-CFZv3c_f.js +1 -0
  16. package/dist/assets/{Devices-PRxhQLdr.js → Devices-WxmPKN4U.js} +1 -1
  17. package/dist/assets/{EmbedDevicePage-cBOLQorO.js → EmbedDevicePage-8R3q6IQn.js} +1 -1
  18. package/dist/assets/{EmbedPlayerPage-DSZTQL2b.js → EmbedPlayerPage-GnCekJoU.js} +1 -1
  19. package/dist/assets/History-BtkXJRVt.js +1 -0
  20. package/dist/assets/Identity-BCgp4vmD.js +1 -0
  21. package/dist/assets/InstancesTable-C81CknSI.js +1 -0
  22. package/dist/assets/IntegrationDetail-D-YgdyLl.js +1 -0
  23. package/dist/assets/Integrations-DNAuezUf.js +1 -0
  24. package/dist/assets/{Integrations-DziYFJDe.js → Integrations-DvJiMePt.js} +2 -2
  25. package/dist/assets/Library-DhRQQIcQ.js +1 -0
  26. package/dist/assets/Locations-CzTWySjI.js +3 -0
  27. package/dist/assets/{Logs-D76tMs8T.js → Logs-Qs13Mwb4.js} +1 -1
  28. package/dist/assets/{MaskShapeCanvas-DhkgwuqU.js → MaskShapeCanvas-Dj-FghGr.js} +1 -1
  29. package/dist/assets/{MotionZonesSettings-ePEXl_eY.js → MotionZonesSettings-DbgeWC2L.js} +1 -1
  30. package/dist/assets/MyAccess-WIF20bV3.js +2 -0
  31. package/dist/assets/Network-C3KG_FSW.js +1 -0
  32. package/dist/assets/{NewExportModal-DcAnxwF1.js → NewExportModal-Dy3oNUAO.js} +1 -1
  33. package/dist/assets/NodeAddonsSettingsPanel-DdbuZ3Yi.js +1 -0
  34. package/dist/assets/Notifications-Bqde3sni.js +1 -0
  35. package/dist/assets/{PanelContent-BD4VlG0k.js → PanelContent-BMrwHYf4.js} +2 -2
  36. package/dist/assets/Pipeline-BYpUtJpZ.js +1 -0
  37. package/dist/assets/{PrivacyMaskSettings-BKbsxTCz.js → PrivacyMaskSettings-BWDEhn0S.js} +1 -1
  38. package/dist/assets/{SceneMonitorEditor-BsG_DspV.js → SceneMonitorEditor-df7cZ311.js} +1 -1
  39. package/dist/assets/SessionsList-Bjhwy-7x.js +2 -0
  40. package/dist/assets/{Showroom-syizHLdc.js → Showroom-DCb25_tl.js} +1 -1
  41. package/dist/assets/{StorageLocationsTable-DX9GAr79.js → StorageLocationsTable-D29oGl9n.js} +1 -1
  42. package/dist/assets/System-Bz2RLf9j.js +1 -0
  43. package/dist/assets/TemplateEditorDialog-C0r2EnJJ.js +1 -0
  44. package/dist/assets/{Terminal-DNCcPfaX.js → Terminal-8cb4qrcL.js} +5 -5
  45. package/dist/assets/{TrainingProviders-Kir4QyJ0.js → TrainingProviders-DiSjJ4vy.js} +1 -1
  46. package/dist/assets/{Viewer-CxhObjjY.js → Viewer-JA89uHB4.js} +1 -1
  47. package/dist/assets/{__vite-browser-external-B6QEsNSJ.js → __vite-browser-external-DIbVKiho.js} +1 -1
  48. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DrIBdeiK.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CaJo1z-X.js} +1 -1
  49. package/dist/assets/{action-draft-BaaZLiaa.js → action-draft-80EQEtaM.js} +1 -1
  50. package/dist/assets/{ai-page.helpers-ByoISKAg.js → ai-page.helpers-DDnyI4U7.js} +1 -1
  51. package/dist/assets/{assignment-candidates-CfAyipS2.js → assignment-candidates-5H8d1AOa.js} +1 -1
  52. package/dist/assets/{authed-media-DHr41d8D.js → authed-media-Cu0gpTLP.js} +1 -1
  53. package/dist/assets/{board-model-COHOZu1s.js → board-model-D56hE08L.js} +1 -1
  54. package/dist/assets/camera-block-model-CCoPnK76.js +1 -0
  55. package/dist/assets/client-B3h-2G71.js +1120 -0
  56. package/dist/assets/{command-vocab-CopJIH2j.js → command-vocab-5-fsG014.js} +1 -1
  57. package/dist/assets/{device-detail-Bg2Ezyca.js → device-detail-iMuwFcWs.js} +1 -1
  58. package/dist/assets/{device-integration-icon-C0zbgR36.js → device-integration-icon-qHQjeL9y.js} +1 -1
  59. package/dist/assets/device-picker-model-DY4G4-U0.js +1 -0
  60. package/dist/assets/dist-Bt80qYnQ.js +1120 -0
  61. package/dist/assets/dist-C5ZYqtm3.js +1 -0
  62. package/dist/assets/{format-DVtQDLvq.js → format-BkMEj2-U.js} +1 -1
  63. package/dist/assets/{hostInit-BTfD9BWB.js → hostInit-DNeMlxxp.js} +1 -1
  64. package/dist/assets/i18n-BwW8nRaE.js +1 -0
  65. package/dist/assets/icons-CyWLWtXs.js +1 -0
  66. package/dist/assets/index-Bz3Pl5tG.css +2 -0
  67. package/dist/assets/index-D_vdUQKv.js +6 -0
  68. package/dist/assets/{linked-devices-model-CmiXN3Md.js → linked-devices-model-CI7wpAm-.js} +1 -1
  69. package/dist/assets/{mf-entry-bootstrap-0-8b23b2f2.js → mf-entry-bootstrap-0-c51fcd96.js} +2 -2
  70. package/dist/assets/mount-DY4G4-U0.js +1 -0
  71. package/dist/assets/{notification-rule-status-C6gd_uCT.js → notification-rule-status-CObTJD-i.js} +1 -1
  72. package/dist/assets/player-overlays-ugkkFXtV.js +1 -0
  73. package/dist/assets/remoteEntry-CjuAs5ha.js +1 -0
  74. package/dist/assets/src-DeDx2fDl.js +279 -0
  75. package/dist/assets/{sso-popup-CH6-S_OR.js → sso-popup-BRNSJ3u5.js} +1 -1
  76. package/dist/assets/{step-inspector-model-BG1lVQcU.js → step-inspector-model-BkoSviyf.js} +1 -1
  77. package/dist/assets/{terminal-Dgb4lrgM.js → terminal-DZ5OZpgC.js} +1 -1
  78. package/dist/assets/{use-scenes-feed-CWLyPlSj.js → use-scenes-feed-bbgFxJ_U.js} +1 -1
  79. package/dist/assets/{useAdminDeviceRemoval-CK2_Fytr.js → useAdminDeviceRemoval-Ia1zPolI.js} +1 -1
  80. package/dist/assets/useEventInvalidation-DY4G4-U0.js +1 -0
  81. package/dist/assets/{useNodeUrlSelection-piTRveNK.js → useNodeUrlSelection-BQ2MYP7C.js} +1 -1
  82. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-ePjBjURL.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BWXQZsum.js} +2 -2
  83. package/dist/index.html +11 -11
  84. package/dist/server/addon.js +1326 -174
  85. package/package.json +2 -2
  86. package/dist/assets/Addons-4zb8WqsP.js +0 -5
  87. package/dist/assets/AiProfiles-09uEdzUc.js +0 -3
  88. package/dist/assets/Archive-DDg3Te3v.js +0 -1
  89. package/dist/assets/Build-Dysn_dsI.js +0 -40
  90. package/dist/assets/CameraGrids-BaVLUgNc.js +0 -1
  91. package/dist/assets/Cluster-DCb9pTRO.js +0 -1
  92. package/dist/assets/CompositionBlockEditor-Bo7NCArN.js +0 -2
  93. package/dist/assets/CompositionEditorPage-D9gqtKg_.js +0 -1
  94. package/dist/assets/Data-CCfGw4D3.js +0 -2
  95. package/dist/assets/DeviceDetail-DGaYflb1.js +0 -1
  96. package/dist/assets/History-BzHUR50W.js +0 -1
  97. package/dist/assets/Identity-BH_Psx-M.js +0 -1
  98. package/dist/assets/InstancesTable-BkkLy_BU.js +0 -1
  99. package/dist/assets/IntegrationDetail-Dh1zEIkB.js +0 -1
  100. package/dist/assets/Integrations-I8w-NmB5.js +0 -1
  101. package/dist/assets/Library-CrU752kO.js +0 -1
  102. package/dist/assets/Locations-Cz9dHdgC.js +0 -3
  103. package/dist/assets/MyAccess-DrN6K8e1.js +0 -2
  104. package/dist/assets/Network-CcBl6Bv3.js +0 -1
  105. package/dist/assets/NodeAddonsSettingsPanel-BUnGcCpc.js +0 -1
  106. package/dist/assets/Notifications-DC_4_Px5.js +0 -1
  107. package/dist/assets/Pipeline-C9c451F4.js +0 -1
  108. package/dist/assets/SessionsList-CXVcORvl.js +0 -2
  109. package/dist/assets/System-D_y9BjT7.js +0 -1
  110. package/dist/assets/TemplateEditorDialog-Dg33OIxl.js +0 -1
  111. package/dist/assets/client-dUCYJcne.js +0 -1120
  112. package/dist/assets/device-picker-model-QTALOVj9.js +0 -1
  113. package/dist/assets/dist-BqygMNK3.js +0 -1
  114. package/dist/assets/dist-DcdbWcG-.js +0 -1120
  115. package/dist/assets/i18n-CtEN5OSf.js +0 -1
  116. package/dist/assets/icons-J91dUPcu.js +0 -1
  117. package/dist/assets/index-BuwKkAl-.js +0 -6
  118. package/dist/assets/index-pEaRJHY2.css +0 -2
  119. package/dist/assets/mount-QTALOVj9.js +0 -1
  120. package/dist/assets/player-overlays-CMIUmcCR.js +0 -1
  121. package/dist/assets/remoteEntry-CYYrFOe1.js +0 -1
  122. package/dist/assets/src-CZCLpkMn.js +0 -279
  123. package/dist/assets/useEventInvalidation-QTALOVj9.js +0 -1
@@ -1 +1 @@
1
- import"./client-dUCYJcne.js";var e=`deviceId`;function t(e){let t=e.target;return t.kind===`devices`&&t.ids.length===1?t.ids[0]??null:null}var n=/(\{[A-Za-z0-9_]+\})/;function r(e){return e.toLowerCase().startsWith(`it`)?`it`:`en`}function i(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length===1&&t[0]===`$var`&&typeof Reflect.get(e,`$var`)==`string`}function a(e){let t=[];for(let r of e.split(n))r!==``&&(r.startsWith(`{`)&&r.endsWith(`}`)?t.push({kind:`slot`,key:r.slice(1,-1)}):t.push({kind:`text`,text:r}));return t}function o(e){let t=e.offer;switch(t.kind){case`number`:return{kind:`fixed`,value:t.min??0,...t.quantity===void 0||t.unit===void 0?{}:{unit:t.unit}};case`enum`:{let e=t.values[0];return{kind:`fixed`,value:e===void 0?``:e.value}}case`boolean`:return{kind:`fixed`,value:!1};default:return{kind:`fixed`,value:``}}}function s(e){return Object.fromEntries(e.openArgs.map(e=>[e.key,o(e)]))}function c(e,t,n){if(i(e))return{kind:`var`,name:e.$var};let r=l(t);return typeof e==`number`&&r!==void 0?{kind:`fixed`,value:e,unit:n??r.unit}:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?{kind:`fixed`,value:e}:o(t)}function l(e){let t=e.offer;if(!(t.kind!==`number`||t.quantity===void 0||t.unit===void 0))return{quantity:t.quantity,unit:t.unit,min:t.min,max:t.max}}function u(e,t){let n=e.find(e=>e.id===t.actionId);if(n===void 0)return null;let r=t.args??{};return{action:n,values:Object.fromEntries(n.openArgs.map(e=>[e.key,c(r[e.key],e,t.argUnits?.[e.key])]))}}function d(e){return e.kind===`var`?{$var:e.name}:e.value}function f(e){return e.kind===`fixed`&&e.value===``}function p(e,t,n){let r={},i={};for(let t of e.openArgs){let e=n[t.key]??o(t);t.optional===!0&&f(e)||(r[t.key]=d(e),e.kind===`fixed`&&e.unit!==void 0&&l(t)!==void 0&&(i[t.key]=e.unit))}return{kind:`command`,target:t,actionId:e.id,...Object.keys(r).length===0?{}:{args:r},...Object.keys(i).length===0?{}:{argUnits:i}}}function m(e,t){if(t.kind===`var`)return null;let n=e.offer;return n.kind===`number`?typeof t.value!=`number`||!Number.isFinite(t.value)?`empty`:n.min!==void 0&&t.value<n.min?`below`:n.max!==void 0&&t.value>n.max?`above`:null:n.kind===`text`||n.kind===`dynamic`?e.optional===!0||t.value!==``?null:`empty`:null}function h(e,t){for(let n of e.openArgs){let e=t[n.key];if(e===void 0)continue;let r=m(n,e);if(r!==null)return{key:n.key,issue:r}}return null}export{s as a,u as c,a as d,r as f,o as i,l,m as n,h as o,p as r,i as s,e as t,t as u};
1
+ import"./client-B3h-2G71.js";var e=`deviceId`;function t(e){let t=e.target;return t.kind===`devices`&&t.ids.length===1?t.ids[0]??null:null}var n=/(\{[A-Za-z0-9_]+\})/;function r(e){return e.toLowerCase().startsWith(`it`)?`it`:`en`}function i(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length===1&&t[0]===`$var`&&typeof Reflect.get(e,`$var`)==`string`}function a(e){let t=[];for(let r of e.split(n))r!==``&&(r.startsWith(`{`)&&r.endsWith(`}`)?t.push({kind:`slot`,key:r.slice(1,-1)}):t.push({kind:`text`,text:r}));return t}function o(e){let t=e.offer;switch(t.kind){case`number`:return{kind:`fixed`,value:t.min??0,...t.quantity===void 0||t.unit===void 0?{}:{unit:t.unit}};case`enum`:{let e=t.values[0];return{kind:`fixed`,value:e===void 0?``:e.value}}case`boolean`:return{kind:`fixed`,value:!1};default:return{kind:`fixed`,value:``}}}function s(e){return Object.fromEntries(e.openArgs.map(e=>[e.key,o(e)]))}function c(e,t,n){if(i(e))return{kind:`var`,name:e.$var};let r=l(t);return typeof e==`number`&&r!==void 0?{kind:`fixed`,value:e,unit:n??r.unit}:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?{kind:`fixed`,value:e}:o(t)}function l(e){let t=e.offer;if(!(t.kind!==`number`||t.quantity===void 0||t.unit===void 0))return{quantity:t.quantity,unit:t.unit,min:t.min,max:t.max}}function u(e,t){let n=e.find(e=>e.id===t.actionId);if(n===void 0)return null;let r=t.args??{};return{action:n,values:Object.fromEntries(n.openArgs.map(e=>[e.key,c(r[e.key],e,t.argUnits?.[e.key])]))}}function d(e){return e.kind===`var`?{$var:e.name}:e.value}function f(e){return e.kind===`fixed`&&e.value===``}function p(e,t,n){let r={},i={};for(let t of e.openArgs){let e=n[t.key]??o(t);t.optional===!0&&f(e)||(r[t.key]=d(e),e.kind===`fixed`&&e.unit!==void 0&&l(t)!==void 0&&(i[t.key]=e.unit))}return{kind:`command`,target:t,actionId:e.id,...Object.keys(r).length===0?{}:{args:r},...Object.keys(i).length===0?{}:{argUnits:i}}}function m(e,t){if(t.kind===`var`)return null;let n=e.offer;return n.kind===`number`?typeof t.value!=`number`||!Number.isFinite(t.value)?`empty`:n.min!==void 0&&t.value<n.min?`below`:n.max!==void 0&&t.value>n.max?`above`:null:n.kind===`text`||n.kind===`dynamic`?e.optional===!0||t.value!==``?null:`empty`:null}function h(e,t){for(let n of e.openArgs){let e=t[n.key];if(e===void 0)continue;let r=m(n,e);if(r!==null)return{key:n.key,issue:r}}return null}export{s as a,u as c,a as d,r as f,o as i,l,m as n,h as o,p as r,i as s,e as t,t as u};
@@ -1 +1 @@
1
- import{A as e,C as t,K as n,R as r,S as i,V as a,Y as o,d as s,et as c,k as l,u,x as d}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{Xa as f,_t as p,it as m}from"./player-overlays-CMIUmcCR.js";import{$t as h,Bd as g,Bp as _,Fn as v,Hi as y,Ji as b,Jn as x,Jt as S,Kp as C,Ld as w,Lt as T,Oa as E,Pn as D,Qt as O,Rd as k,Ta as A,Ui as j,Vd as M,Wi as N,Zt as P,cp as F,dr as I,jf as L,nn as R,on as z,qi as B,wp as V}from"./src-CZCLpkMn.js";import{t as H}from"./i18n-CtEN5OSf.js";import{n as U,t as W}from"./useTranslation-BJr-n0es.js";import{E as G,Y as K}from"./index-BuwKkAl-.js";c();function q({i18n:t,defaultNS:r,children:i}){let a=n(()=>({i18n:t,defaultNS:r}),[t,r]);return e(U.Provider,{value:a},i)}c();function J({deviceId:e,deviceName:n}){let{t:r}=W(),a=_(`remote`),s=g({deviceId:e},{enabled:a===`present`}),[c,l]=o(!1);return a!==`present`||(s.data?.commands.length??0)===0&&(s.data?.sources.length??0)===0?null:t(`div`,{className:`flex flex-wrap items-center justify-center gap-1`,children:[t(F,{size:`sm`,variant:`outline`,onClick:()=>l(!0),"data-testid":`hero-remote`,children:[i(I,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),r(`remote.hero.open`)]}),c&&i(Y,{deviceId:e,deviceName:n,onClose:()=>l(!1)})]})}function Y({deviceId:e,deviceName:n,onClose:r}){let{t:a}=W(),s=k({deviceId:e}),c=L({kind:`remote`}),l=g({deviceId:e}),u=M(),d=w({deviceId:e}),[f,p]=o(null),m=s.data?.layoutTemplateId??null,h=(c.data??[]).find(e=>e.id===m),_=h===void 0?null:x(h.payload),S=new Set((l.data?.commands??[]).map(e=>e.role)),C=async t=>{let n=_?.buttons.find(e=>e.id===t)?.role;if(!(n===void 0||!S.has(n))){p(null);try{let t=await u.mutateAsync({deviceId:e,role:n,repeat:1});t.status===`refused`&&p(a(`remote.test.refused.${t.reason}`,{detail:t.detail??``}))}catch(e){p(e instanceof Error?e.message:String(e))}}};return i(y,{open:!0,onOpenChange:e=>!e&&r(),children:t(N,{width:`md`,placement:`sheet-on-mobile`,scroll:`body`,children:[i(B,{children:i(b,{children:a(`remote.hero.title`,{name:n})})}),t(j,{className:`space-y-3`,children:[s.status===`error`?i(A,{title:a(`remote.dialog.unreadable`),message:s.error?.message??``,onRetry:()=>void s.refetch()}):_===null?i(`p`,{className:`text-xs text-foreground-muted`,children:a(`remote.hero.noLayout`)}):i(`div`,{className:`mx-auto w-full max-w-xs`,"data-testid":`remote-press`,children:i(v,{grid:_,label:a(`remote.hero.title`,{name:n}),boundRoles:S,onSelect:e=>void C(e),renderWidget:(t,n)=>i(D,{deviceId:e,button:t,sources:l.data?.sources??[],current:d.data?.source??``,placement:n})})}),f!==null&&i(`p`,{role:`alert`,className:`text-xs text-danger`,children:f})]})]})})}c();var X=l({});function Z({value:e,children:t}){return i(X.Provider,{value:e,children:t})}c();var Q={"off-while-running":{title:`Turn off while running?`,message:`The device is running. Cutting its power now interrupts what it is doing.`,confirm:`Turn off`},unlock:{title:`Unlock?`,message:`The lock will open.`,confirm:`Unlock`},install:{title:`Install the update?`,message:`The device may restart and be unavailable for a while.`,confirm:`Install`},press:{title:`Run it now?`,message:`The device acts as soon as you confirm.`,confirm:`Run`}},$=e=>e===`off-while-running`?`deviceHero.model.confirmOff`:`deviceHero.model.confirm.${e}`;function ee(){let{t:e,i18n:t}=W(),r=t.language;return n(()=>{let t=t=>({title:e(`${$(t)}.title`,Q[t].title),message:e(`${$(t)}.message`,Q[t].message),confirm:e(`${$(t)}.confirm`,Q[t].confirm)});return{noValue:e(`deviceHero.model.noValue`,`–`),callFailed:e(`deviceHero.model.callFailed`,`The device did not accept the command`),historyTooltip:e(`deviceHero.utility.history.tooltip`,`Opens the history of this device.`),consumables:{label:e(`deviceHero.utility.consumables.label`,`Consumables`),low:t=>e(`deviceHero.utility.consumables.low`,`{{count}} low`,{count:t}),ok:e(`deviceHero.utility.consumables.ok`,`OK`),tooltip:e(`deviceHero.utility.consumables.tooltip`,`Shows the level of each consumable and which ones need attention.`)},power:{label:e(`deviceHero.utility.power.label`,`Power source`),on:e(`deviceHero.utility.power.on`,`On`),off:e(`deviceHero.utility.power.off`,`Off`),tooltip:e(`deviceHero.utility.power.tooltip`,`Opens a menu to cut or restore the power feeding this device, or to restart it.`),tooltipReadOnly:e(`deviceHero.utility.power.tooltipReadOnly`,`Whether the power source feeding this device is on. Your session cannot change it.`)},confirm:{"off-while-running":t(`off-while-running`),unlock:t(`unlock`),install:t(`install`),press:t(`press`)}}},[e,r])}c();function te(e){let[t]=o(()=>new s({defaultOptions:{queries:{retry:!1,staleTime:5e3}}}));return e??t}function ne({deviceId:e,kind:t,canActuate:n,onDrawn:r,showName:o}){let s=V();return a(()=>{r?.(!0)},[r]),i(`div`,{className:`flex h-full justify-center`,children:i(O,{kind:t,deviceId:e,canActuate:n,orientation:s?`vertical`:`horizontal`,showName:o!==!1})})}function re(e){let t=h(e.deviceId);return t===`pending`?i(E,{className:`h-72 w-full`}):t===null?i(ie,{...e}):i(ne,{deviceId:e.deviceId,kind:t,canActuate:e.canActuate,onDrawn:e.onDrawn,showName:e.showName})}function ie(e){let t=V();return i(`div`,{className:`flex h-full justify-center`,children:i(S,{deviceId:e.deviceId,canActuate:e.canActuate,orientation:t?`vertical`:`horizontal`,showName:e.showName!==!1,placeholder:i(E,{className:`h-72 w-full`}),fallback:i(`div`,{className:`w-full`,children:i(ae,{...e})}),...e.onDrawn===void 0?{}:{onDrawn:e.onDrawn}})})}function ae({deviceId:e,canActuate:n,fallback:a,onDrawn:s,defaultHistoryOpen:c,showName:l}){let{t:u,i18n:f}=W(),p=ee(),[m,h]=o(c===!0),g=z(e),_=K(g.presence,g.list),v=r(()=>h(!0),[]);return t(d,{children:[i(T,{deviceId:e,canActuate:n,lang:P(f.language),labels:p,renderRemote:t=>i(J,{deviceId:e,deviceName:t}),fallback:a??null,showName:l!==!1,..._?{onOpenHistory:v}:{},...s===void 0?{}:{onDrawn:s}}),m?i(y,{open:!0,onOpenChange:e=>!e&&h(!1),children:t(N,{width:`xl`,scroll:`body`,children:[i(B,{children:i(b,{children:u(`deviceModule.history`,`History`)})}),i(j,{className:`mt-3`,children:i(R,{deviceId:e})})]})}):null]})}function oe({deviceId:e,trpcClient:t,theme:r,locale:a,canActuate:o=!1,defaultHistoryOpen:s,queryClient:c,fallback:l,onDrawn:d,onOpenDevice:h,onOpenCamera:g,onClose:_,onNavigate:v,showName:y}){let b=te(c),x=n(()=>H.cloneInstance({lng:a}),[a]),S=n(()=>G(x.t.bind(x)),[x]),w=n(()=>({onOpenDevice:h,onOpenCamera:g,onClose:_,onNavigate:v}),[h,g,_,v]);return i(`div`,{className:`${r} h-full`,"data-theme":r,"data-testid":`device-detail-module`,children:i(q,{i18n:x,children:i(f,{t:S,children:i(p,{client:t,children:i(C.Provider,{client:t,queryClient:b,children:i(u,{client:b,children:i(m,{children:i(Z,{value:w,children:i(re,{deviceId:e,canActuate:o,fallback:l,onDrawn:d,defaultHistoryOpen:s,showName:y})})})})})})})})})}export{J as n,oe as t};
1
+ import{A as e,C as t,K as n,R as r,S as i,V as a,Y as o,d as s,et as c,k as l,u,x as d}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{_t as f,it as p,to as m}from"./player-overlays-ugkkFXtV.js";import{Bp as h,Ea as g,Fn as _,Hd as v,Hi as y,It as b,Ji as x,Jn as S,Kp as C,Mf as w,Pn as T,Qt as E,Rd as D,Ui as O,Vd as k,Wi as A,Xt as j,Zt as M,cp as N,dr as P,ka as F,nn as I,on as L,qi as R,qt as z,wp as B,zd as V}from"./src-DeDx2fDl.js";import{t as H}from"./i18n-BwW8nRaE.js";import{n as U,t as W}from"./useTranslation-BJr-n0es.js";import{Q as G,k as K}from"./index-D_vdUQKv.js";c();function q({i18n:t,defaultNS:r,children:i}){let a=n(()=>({i18n:t,defaultNS:r}),[t,r]);return e(U.Provider,{value:a},i)}c();function J({deviceId:e,deviceName:n}){let{t:r}=W(),a=h(`remote`),s=k({deviceId:e},{enabled:a===`present`}),[c,l]=o(!1);return a!==`present`||(s.data?.commands.length??0)===0&&(s.data?.sources.length??0)===0?null:t(`div`,{className:`flex flex-wrap items-center justify-center gap-1`,children:[t(N,{size:`sm`,variant:`outline`,onClick:()=>l(!0),"data-testid":`hero-remote`,children:[i(P,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),r(`remote.hero.open`)]}),c&&i(Y,{deviceId:e,deviceName:n,onClose:()=>l(!1)})]})}function Y({deviceId:e,deviceName:n,onClose:r}){let{t:a}=W(),s=V({deviceId:e}),c=w({kind:`remote`}),l=k({deviceId:e}),u=v(),d=D({deviceId:e}),[f,p]=o(null),m=s.data?.layoutTemplateId??null,h=(c.data??[]).find(e=>e.id===m),b=h===void 0?null:S(h.payload),C=new Set((l.data?.commands??[]).map(e=>e.role)),E=async t=>{let n=b?.buttons.find(e=>e.id===t)?.role;if(!(n===void 0||!C.has(n))){p(null);try{let t=await u.mutateAsync({deviceId:e,role:n,repeat:1});t.status===`refused`&&p(a(`remote.test.refused.${t.reason}`,{detail:t.detail??``}))}catch(e){p(e instanceof Error?e.message:String(e))}}};return i(y,{open:!0,onOpenChange:e=>!e&&r(),children:t(A,{width:`md`,placement:`sheet-on-mobile`,scroll:`body`,children:[i(R,{children:i(x,{children:a(`remote.hero.title`,{name:n})})}),t(O,{className:`space-y-3`,children:[s.status===`error`?i(g,{title:a(`remote.dialog.unreadable`),message:s.error?.message??``,onRetry:()=>void s.refetch()}):b===null?i(`p`,{className:`text-xs text-foreground-muted`,children:a(`remote.hero.noLayout`)}):i(`div`,{className:`mx-auto w-full max-w-xs`,"data-testid":`remote-press`,children:i(_,{grid:b,label:a(`remote.hero.title`,{name:n}),boundRoles:C,onSelect:e=>void E(e),renderWidget:(t,n)=>i(T,{deviceId:e,button:t,sources:l.data?.sources??[],current:d.data?.source??``,placement:n})})}),f!==null&&i(`p`,{role:`alert`,className:`text-xs text-danger`,children:f})]})]})})}c();var X=l({});function Z({value:e,children:t}){return i(X.Provider,{value:e,children:t})}c();var Q={"off-while-running":{title:`Turn off while running?`,message:`The device is running. Cutting its power now interrupts what it is doing.`,confirm:`Turn off`},unlock:{title:`Unlock?`,message:`The lock will open.`,confirm:`Unlock`},install:{title:`Install the update?`,message:`The device may restart and be unavailable for a while.`,confirm:`Install`},press:{title:`Run it now?`,message:`The device acts as soon as you confirm.`,confirm:`Run`}},$=e=>e===`off-while-running`?`deviceHero.model.confirmOff`:`deviceHero.model.confirm.${e}`;function ee(){let{t:e,i18n:t}=W(),r=t.language;return n(()=>{let t=t=>({title:e(`${$(t)}.title`,Q[t].title),message:e(`${$(t)}.message`,Q[t].message),confirm:e(`${$(t)}.confirm`,Q[t].confirm)});return{noValue:e(`deviceHero.model.noValue`,`–`),callFailed:e(`deviceHero.model.callFailed`,`The device did not accept the command`),historyTooltip:e(`deviceHero.utility.history.tooltip`,`Opens the history of this device.`),consumables:{label:e(`deviceHero.utility.consumables.label`,`Consumables`),low:t=>e(`deviceHero.utility.consumables.low`,`{{count}} low`,{count:t}),ok:e(`deviceHero.utility.consumables.ok`,`OK`),tooltip:e(`deviceHero.utility.consumables.tooltip`,`Shows the level of each consumable and which ones need attention.`)},power:{label:e(`deviceHero.utility.power.label`,`Power source`),on:e(`deviceHero.utility.power.on`,`On`),off:e(`deviceHero.utility.power.off`,`Off`),tooltip:e(`deviceHero.utility.power.tooltip`,`Opens a menu to cut or restore the power feeding this device, or to restart it.`),tooltipReadOnly:e(`deviceHero.utility.power.tooltipReadOnly`,`Whether the power source feeding this device is on. Your session cannot change it.`)},confirm:{"off-while-running":t(`off-while-running`),unlock:t(`unlock`),install:t(`install`),press:t(`press`)}}},[e,r])}c();function te(e){let[t]=o(()=>new s({defaultOptions:{queries:{retry:!1,staleTime:5e3}}}));return e??t}function ne({deviceId:e,kind:t,canActuate:n,onDrawn:r,showName:o}){let s=B();return a(()=>{r?.(!0)},[r]),i(`div`,{className:`flex h-full justify-center`,children:i(M,{kind:t,deviceId:e,canActuate:n,orientation:s?`vertical`:`horizontal`,showName:o!==!1})})}function re(e){let t=E(e.deviceId);return t===`pending`?i(F,{className:`h-72 w-full`}):t===null?i(ie,{...e}):i(ne,{deviceId:e.deviceId,kind:t,canActuate:e.canActuate,onDrawn:e.onDrawn,showName:e.showName})}function ie(e){let t=B();return i(`div`,{className:`flex h-full justify-center`,children:i(z,{deviceId:e.deviceId,canActuate:e.canActuate,orientation:t?`vertical`:`horizontal`,showName:e.showName!==!1,placeholder:i(F,{className:`h-72 w-full`}),fallback:i(`div`,{className:`w-full`,children:i(ae,{...e})}),...e.onDrawn===void 0?{}:{onDrawn:e.onDrawn}})})}function ae({deviceId:e,canActuate:n,fallback:a,onDrawn:s,defaultHistoryOpen:c,showName:l}){let{t:u,i18n:f}=W(),p=ee(),[m,h]=o(c===!0),g=L(e),_=G(g.presence,g.list),v=r(()=>h(!0),[]);return t(d,{children:[i(b,{deviceId:e,canActuate:n,lang:j(f.language),labels:p,renderRemote:t=>i(J,{deviceId:e,deviceName:t}),fallback:a??null,showName:l!==!1,..._?{onOpenHistory:v}:{},...s===void 0?{}:{onDrawn:s}}),m?i(y,{open:!0,onOpenChange:e=>!e&&h(!1),children:t(A,{width:`xl`,scroll:`body`,children:[i(R,{children:i(x,{children:u(`deviceModule.history`,`History`)})}),i(O,{className:`mt-3`,children:i(I,{deviceId:e})})]})}):null]})}function oe({deviceId:e,trpcClient:t,theme:r,locale:a,canActuate:o=!1,defaultHistoryOpen:s,queryClient:c,fallback:l,onDrawn:d,onOpenDevice:h,onOpenCamera:g,onClose:_,onNavigate:v,showName:y}){let b=te(c),x=n(()=>H.cloneInstance({lng:a}),[a]),S=n(()=>K(x.t.bind(x)),[x]),w=n(()=>({onOpenDevice:h,onOpenCamera:g,onClose:_,onNavigate:v}),[h,g,_,v]);return i(`div`,{className:`${r} h-full`,"data-theme":r,"data-testid":`device-detail-module`,children:i(q,{i18n:x,children:i(m,{t:S,children:i(f,{client:t,children:i(C.Provider,{client:t,queryClient:b,children:i(u,{client:b,children:i(p,{children:i(Z,{value:w,children:i(re,{deviceId:e,canActuate:o,fallback:l,onDrawn:d,defaultHistoryOpen:s,showName:y})})})})})})})})})}export{J as n,oe as t};
@@ -1 +1 @@
1
- import{S as e}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{at as t}from"./index-BuwKkAl-.js";function n(n,r){switch(r.kind){case`resolved`:return e(t,{type:r.integration.addonId,size:`sm`});case`orphan`:return e(t,{type:n.addonId,size:`sm`});case`unknown`:case`unlinked`:return null}}export{n as t};
1
+ import{S as e}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{ct as t}from"./index-D_vdUQKv.js";function n(n,r){switch(r.kind){case`resolved`:return e(t,{type:r.integration.addonId,size:`sm`});case`orphan`:return e(t,{type:n.addonId,size:`sm`});case`unknown`:case`unlinked`:return null}}export{n as t};
@@ -0,0 +1 @@
1
+ import"./src-DeDx2fDl.js";