@camstack/addon-admin-ui 1.2.701 → 1.2.702

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 (105) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/assets/{AccessSection-CmGUVN2c.js → AccessSection-CNgvvC6Q.js} +1 -1
  3. package/dist/assets/Addons-Dtx3xcZ2.js +5 -0
  4. package/dist/assets/{AdminPage-Dvziohv2.js → AdminPage-BkxgjFWW.js} +1 -1
  5. package/dist/assets/{AdminSectionedPage-3F0XiS4h.js → AdminSectionedPage-bGVBepbw.js} +1 -1
  6. package/dist/assets/AiProfiles-BLj-ic5N.js +3 -0
  7. package/dist/assets/Archive-y1aPYCx8.js +1 -0
  8. package/dist/assets/{BootstrapSettingsForm-D5_YCsD2.js → BootstrapSettingsForm-jBRoUiPn.js} +1 -1
  9. package/dist/assets/{Build-DgzW58SZ.js → Build-BoiB-nPA.js} +4 -4
  10. package/dist/assets/{Calendars-BzFF94EV.js → Calendars-BBTnm6OG.js} +1 -1
  11. package/dist/assets/Cluster-DN0Cwciw.js +1 -0
  12. package/dist/assets/{CompositionBlockEditor-BUQTd-UR.js → CompositionBlockEditor-BloGManS.js} +2 -2
  13. package/dist/assets/{CompositionEditorPage-BTvOMFXc.js → CompositionEditorPage-C5pNxu2M.js} +1 -1
  14. package/dist/assets/Data-LT-PQ05n.js +2 -0
  15. package/dist/assets/{DeviceDetail-C09lWDie.js → DeviceDetail-DAvmtNN2.js} +1 -1
  16. package/dist/assets/{Devices-DsS5GkXt.js → Devices-BJRvDHiT.js} +1 -1
  17. package/dist/assets/{EmbedDevicePage-BkW36-q-.js → EmbedDevicePage-CyKS-rmB.js} +1 -1
  18. package/dist/assets/{EmbedPlayerPage-BD43fNk-.js → EmbedPlayerPage-BsxSpEcY.js} +1 -1
  19. package/dist/assets/History-BPF9alct.js +1 -0
  20. package/dist/assets/{Identity-DXfvzQIG.js → Identity-dLFVHYZR.js} +1 -1
  21. package/dist/assets/InstancesTable-LVQWfz07.js +1 -0
  22. package/dist/assets/IntegrationDetail-C_vN9X7q.js +1 -0
  23. package/dist/assets/{Integrations-BOc2LGfc.js → Integrations-BUOpFqfh.js} +1 -1
  24. package/dist/assets/{Integrations-BgRTT3i6.js → Integrations-Dpb2V2yu.js} +1 -1
  25. package/dist/assets/Library-D4-BDy54.js +1 -0
  26. package/dist/assets/Locations-DGZ_lrp3.js +3 -0
  27. package/dist/assets/Logs-CUV00qxb.js +1 -0
  28. package/dist/assets/{MaskShapeCanvas-BwjxoZHj.js → MaskShapeCanvas-D57fCIme.js} +1 -1
  29. package/dist/assets/{MotionZonesSettings-CgruOSjK.js → MotionZonesSettings-w1kFM_O4.js} +1 -1
  30. package/dist/assets/MyAccess-D87gqxHt.js +2 -0
  31. package/dist/assets/{Network-Dxm48n1Y.js → Network-L7e5c9RP.js} +1 -1
  32. package/dist/assets/{NewExportModal-DQLl3C3Q.js → NewExportModal-CHwUJ26P.js} +1 -1
  33. package/dist/assets/{NodeAddonsSettingsPanel-H8ruMWFP.js → NodeAddonsSettingsPanel-Kqe8X8RH.js} +1 -1
  34. package/dist/assets/{Notifications-B44Sd1jg.js → Notifications-CucZNxjj.js} +1 -1
  35. package/dist/assets/{PanelContent-DnT2f8Cc.js → PanelContent-PhbemYUY.js} +2 -2
  36. package/dist/assets/Pipeline-9O3YfaWk.js +1 -0
  37. package/dist/assets/{PrivacyMaskSettings-B6WFh3P4.js → PrivacyMaskSettings-BS29zGkX.js} +1 -1
  38. package/dist/assets/{SceneMonitorEditor-M-wzPHRE.js → SceneMonitorEditor-CosxkmPM.js} +1 -1
  39. package/dist/assets/{SessionsList-D0tv-91a.js → SessionsList-OHo3GJ72.js} +2 -2
  40. package/dist/assets/{Showroom-BlMk46Us.js → Showroom-0iJ0CCe5.js} +1 -1
  41. package/dist/assets/{StorageLocationsTable-13scCxNp.js → StorageLocationsTable-DqTWO4k1.js} +1 -1
  42. package/dist/assets/System-DZXA2QSs.js +2 -0
  43. package/dist/assets/TemplateEditorDialog-8D78AUfO.js +1 -0
  44. package/dist/assets/{Terminal-BwEVkhLM.js → Terminal-Cvw2rPrb.js} +3 -3
  45. package/dist/assets/{TrainingProviders-CPc4S7AF.js → TrainingProviders-DcThiLnE.js} +1 -1
  46. package/dist/assets/{Viewer-B4D9Uq2-.js → Viewer-BUfnqb0c.js} +1 -1
  47. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-D6FI5YpS.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CNNET8uz.js} +1 -1
  48. package/dist/assets/{action-draft-BIhSMudC.js → action-draft-BTVZLATm.js} +1 -1
  49. package/dist/assets/{ai-page.helpers-BfJpXMnt.js → ai-page.helpers-qxf7BP-v.js} +1 -1
  50. package/dist/assets/{assignment-candidates-BfJhT0tz.js → assignment-candidates-d-6NU8po.js} +1 -1
  51. package/dist/assets/{authed-media-ChKbSmi3.js → authed-media-Bqh0pB9D.js} +1 -1
  52. package/dist/assets/{board-model-CyseSL_y.js → board-model-CPA2IZpg.js} +1 -1
  53. package/dist/assets/{camera-block-model-BKFq-3HR.js → camera-block-model-CJ0e2m0o.js} +1 -1
  54. package/dist/assets/client-Cng2SeYA.js +1122 -0
  55. package/dist/assets/{command-vocab-CeQ0ypHW.js → command-vocab-BzBhzE7i.js} +1 -1
  56. package/dist/assets/{device-detail-CFJoqbEo.js → device-detail-Cg2Zt8FL.js} +1 -1
  57. package/dist/assets/{device-integration-icon-BwgC8WB_.js → device-integration-icon-VMxiVsqd.js} +1 -1
  58. package/dist/assets/device-picker-model-B-FI9413.js +1 -0
  59. package/dist/assets/dist-CxrdebAP.js +1122 -0
  60. package/dist/assets/{dist-Bgy0yfXq.js → dist-D7Gew3v3.js} +1 -1
  61. package/dist/assets/{format-D9ROMB42.js → format-BopmTOzZ.js} +1 -1
  62. package/dist/assets/{hostInit-DO8vSCT5.js → hostInit-DuH1KOuD.js} +1 -1
  63. package/dist/assets/i18n--GTAj4mB.js +1 -0
  64. package/dist/assets/{icons-DrHUdyj-.js → icons-bi-mcO5N.js} +1 -1
  65. package/dist/assets/index-DbXFHmBJ.js +6 -0
  66. package/dist/assets/{linked-devices-model-bymuMeaF.js → linked-devices-model-Bnz1douR.js} +1 -1
  67. package/dist/assets/{mf-entry-bootstrap-0-dc995488.js → mf-entry-bootstrap-0-ddbe056c.js} +2 -2
  68. package/dist/assets/mount-B-FI9413.js +1 -0
  69. package/dist/assets/{notification-rule-status-CyADOgAm.js → notification-rule-status-ai5zWyzt.js} +1 -1
  70. package/dist/assets/{player-overlays-D546iNTv.js → player-overlays-fpbPSPqT.js} +1 -1
  71. package/dist/assets/remoteEntry-g0NfB_lk.js +1 -0
  72. package/dist/assets/{src-C9_yKHH3.js → src-eL0OacoB.js} +18 -18
  73. package/dist/assets/{sso-popup--gCyd56l.js → sso-popup-Za4GwQBP.js} +1 -1
  74. package/dist/assets/{step-inspector-model-B_OOCp6Z.js → step-inspector-model-BAgxIyNV.js} +1 -1
  75. package/dist/assets/{use-scenes-feed-D9kXSeA2.js → use-scenes-feed-BTNdL7JV.js} +1 -1
  76. package/dist/assets/{useAdminDeviceRemoval-CF8lG06z.js → useAdminDeviceRemoval-COlTnaF7.js} +1 -1
  77. package/dist/assets/useEventInvalidation-B-FI9413.js +1 -0
  78. package/dist/assets/{useNodeUrlSelection-ju70FIba.js → useNodeUrlSelection-DhtJZEtx.js} +1 -1
  79. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BSgZU_Z3.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-R-1W8c6C.js} +2 -2
  80. package/dist/index.html +8 -8
  81. package/dist/server/addon.js +205 -19
  82. package/package.json +2 -2
  83. package/dist/assets/Addons-CgCQDQsS.js +0 -5
  84. package/dist/assets/AiProfiles-BAdfHll3.js +0 -3
  85. package/dist/assets/Archive-tBDnGn2J.js +0 -1
  86. package/dist/assets/Cluster-Chna0Sjs.js +0 -1
  87. package/dist/assets/Data-Ge58RjOD.js +0 -2
  88. package/dist/assets/History-D-ERNFKB.js +0 -1
  89. package/dist/assets/InstancesTable-BzPfQPuA.js +0 -1
  90. package/dist/assets/IntegrationDetail-CEcOLviw.js +0 -1
  91. package/dist/assets/Library-DUI94NI6.js +0 -1
  92. package/dist/assets/Locations-DkcchiHh.js +0 -3
  93. package/dist/assets/Logs-DS49QhkO.js +0 -1
  94. package/dist/assets/MyAccess-TXMLevZM.js +0 -2
  95. package/dist/assets/Pipeline-XpW32I39.js +0 -1
  96. package/dist/assets/System-CkjsA5xm.js +0 -2
  97. package/dist/assets/TemplateEditorDialog-fJjZNx16.js +0 -1
  98. package/dist/assets/client-DQzHwaNb.js +0 -1122
  99. package/dist/assets/device-picker-model-CVOfqhXA.js +0 -1
  100. package/dist/assets/dist-B6zcGpdS.js +0 -1122
  101. package/dist/assets/i18n-HSlX-YO0.js +0 -1
  102. package/dist/assets/index-BN2PojUq.js +0 -6
  103. package/dist/assets/mount-CVOfqhXA.js +0 -1
  104. package/dist/assets/remoteEntry-CeXhbAxp.js +0 -1
  105. package/dist/assets/useEventInvalidation-CVOfqhXA.js +0 -1
@@ -1 +1 @@
1
- import"./client-DQzHwaNb.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-Cng2SeYA.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{_t as f,it as p,no as m}from"./player-overlays-D546iNTv.js";import{Aa as h,Da as g,Fn as _,Gi as v,Gp as y,It as b,Ji as x,Jn as S,Kd as C,Lf as w,Pn as T,Qt as E,Ud as D,Ui as O,Wd as k,Wi as A,Xt as j,Yi as M,Zp as N,Zt as P,dr as F,kp as I,nn as L,on as R,pp as z,qd as B,qt as V}from"./src-C9_yKHH3.js";import{t as H}from"./i18n-HSlX-YO0.js";import{n as U,t as W}from"./useTranslation-BJr-n0es.js";import{Q as G,S as K}from"./index-BN2PojUq.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=y(`remote`),s=C({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(z,{size:`sm`,variant:`outline`,onClick:()=>l(!0),"data-testid":`hero-remote`,children:[i(F,{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=w({kind:`remote`}),l=C({deviceId:e}),u=B(),d=D({deviceId:e}),[f,p]=o(null),m=s.data?.layoutTemplateId??null,h=(c.data??[]).find(e=>e.id===m),y=h===void 0?null:S(h.payload),b=new Set((l.data?.commands??[]).map(e=>e.role)),E=async t=>{let n=y?.buttons.find(e=>e.id===t)?.role;if(!(n===void 0||!b.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(O,{open:!0,onOpenChange:e=>!e&&r(),children:t(v,{width:`md`,placement:`sheet-on-mobile`,scroll:`body`,children:[i(x,{children:i(M,{children:a(`remote.hero.title`,{name:n})})}),t(A,{className:`space-y-3`,children:[s.status===`error`?i(g,{title:a(`remote.dialog.unreadable`),message:s.error?.message??``,onRetry:()=>void s.refetch()}):y===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:y,label:a(`remote.hero.title`,{name:n}),boundRoles:b,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=I();return a(()=>{r?.(!0)},[r]),i(`div`,{className:`flex h-full justify-center`,children:i(P,{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(h,{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=I();return i(`div`,{className:`flex h-full justify-center`,children:i(V,{deviceId:e.deviceId,canActuate:e.canActuate,orientation:t?`vertical`:`horizontal`,showName:e.showName!==!1,placeholder:i(h,{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=R(e),_=G(g.presence,g.list),y=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:y}:{},...s===void 0?{}:{onDrawn:s}}),m?i(O,{open:!0,onOpenChange:e=>!e&&h(!1),children:t(v,{width:`xl`,scroll:`body`,children:[i(x,{children:i(M,{children:u(`deviceModule.history`,`History`)})}),i(A,{className:`mt-3`,children:i(L,{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]),C=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(N.Provider,{client:t,queryClient:b,children:i(u,{client:b,children:i(p,{children:i(Z,{value:C,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,no as m}from"./player-overlays-fpbPSPqT.js";import{Aa as h,Ap as g,Da as _,Fn as v,Gd as y,Gi as b,It as x,Jd as S,Ji as C,Jn as w,Kp as T,Pn as E,Qp as D,Qt as O,Rf as k,Ui as A,Wd as j,Wi as M,Xt as N,Yi as P,Zt as F,dr as I,mp as L,nn as R,on as z,qd as B,qt as V}from"./src-eL0OacoB.js";import{t as H}from"./i18n--GTAj4mB.js";import{n as U,t as W}from"./useTranslation-BJr-n0es.js";import{Q as G,S as K}from"./index-DbXFHmBJ.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=T(`remote`),s=B({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(L,{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=y({deviceId:e}),c=k({kind:`remote`}),l=B({deviceId:e}),u=S(),d=j({deviceId:e}),[f,p]=o(null),m=s.data?.layoutTemplateId??null,h=(c.data??[]).find(e=>e.id===m),g=h===void 0?null:w(h.payload),x=new Set((l.data?.commands??[]).map(e=>e.role)),T=async t=>{let n=g?.buttons.find(e=>e.id===t)?.role;if(!(n===void 0||!x.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(A,{open:!0,onOpenChange:e=>!e&&r(),children:t(b,{width:`md`,placement:`sheet-on-mobile`,scroll:`body`,children:[i(C,{children:i(P,{children:a(`remote.hero.title`,{name:n})})}),t(M,{className:`space-y-3`,children:[s.status===`error`?i(_,{title:a(`remote.dialog.unreadable`),message:s.error?.message??``,onRetry:()=>void s.refetch()}):g===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:g,label:a(`remote.hero.title`,{name:n}),boundRoles:x,onSelect:e=>void T(e),renderWidget:(t,n)=>i(E,{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=g();return a(()=>{r?.(!0)},[r]),i(`div`,{className:`flex h-full justify-center`,children:i(F,{kind:t,deviceId:e,canActuate:n,orientation:s?`vertical`:`horizontal`,showName:o!==!1})})}function re(e){let t=O(e.deviceId);return t===`pending`?i(h,{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=g();return i(`div`,{className:`flex h-full justify-center`,children:i(V,{deviceId:e.deviceId,canActuate:e.canActuate,orientation:t?`vertical`:`horizontal`,showName:e.showName!==!1,placeholder:i(h,{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),_=G(g.presence,g.list),v=r(()=>h(!0),[]);return t(d,{children:[i(x,{deviceId:e,canActuate:n,lang:N(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(A,{open:!0,onOpenChange:e=>!e&&h(!1),children:t(b,{width:`xl`,scroll:`body`,children:[i(C,{children:i(P,{children:u(`deviceModule.history`,`History`)})}),i(M,{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(()=>K(x.t.bind(x)),[x]),C=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(D.Provider,{client:t,queryClient:b,children:i(u,{client:b,children:i(p,{children:i(Z,{value:C,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{ut as t}from"./index-BN2PojUq.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{ut as t}from"./index-DbXFHmBJ.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-eL0OacoB.js";