Files
houseplan-card/dist/houseplan-assets/live-interaction-runtime-CJ95X8vv.js
Matysh 7d4d75bdfb
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (blend) (push) Waiting to run
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (interaction) (push) Waiting to run
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (isometric) (push) Waiting to run
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (isometric-stage3) (push) Waiting to run
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (large-house) (push) Waiting to run
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (overlay) (push) Waiting to run
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (plan-snap) (push) Waiting to run
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (space-default) (push) Waiting to run
Полные бенчмарки производительности / Бенчмарки рендера и геометрии (space-glow) (push) Waiting to run
Проверка (CI) / Предполёт: документация, провенанс, процесс (push) Canceled after 0s
Проверка (CI) / Классификация изменённых файлов (push) Canceled after 0s
Проверка (CI) / Переиспользование: это дерево уже проверено (push) Canceled after 0s
Проверка (CI) / HACS: валидация репозитория (push) Canceled after 0s
Проверка (CI) / Hassfest: манифест интеграции (push) Canceled after 0s
Проверка (CI) / Мутанты по диффу (1/6): затронутые свидетели краснеют (push) Canceled after 0s
Проверка (CI) / Мутанты по диффу (2/6): затронутые свидетели краснеют (push) Canceled after 0s
Проверка (CI) / Мутанты по диффу (3/6): затронутые свидетели краснеют (push) Canceled after 0s
Проверка (CI) / Мутанты по диффу (4/6): затронутые свидетели краснеют (push) Canceled after 0s
Проверка (CI) / Мутанты по диффу (5/6): затронутые свидетели краснеют (push) Canceled after 0s
Проверка (CI) / Мутанты по диффу (6/6): затронутые свидетели краснеют (push) Canceled after 0s
Проверка (CI) / Фронтенд: типы, юниты, мутанты, синхрон бандла (push) Canceled after 0s
Проверка (CI) / Бандл головы dev для стенда (push) Canceled after 0s
Проверка (CI) / Смоки в браузере (шард 1 из 3) (push) Canceled after 0s
Проверка (CI) / Смоки в браузере (шард 2 из 3) (push) Canceled after 0s
Проверка (CI) / Смоки в браузере (шард 3 из 3) (push) Canceled after 0s
Проверка (CI) / Смоки: все шарды зелёные (push) Canceled after 0s
Проверка (CI) / Golden-кадры против принятых эталонов (push) Canceled after 0s
Проверка (CI) / Перф-смок: бюджет времени кадра (push) Canceled after 0s
Проверка (CI) / Геометрия: TS/Python parity исполнена (push) Canceled after 0s
Проверка (CI) / Бэкенд: pytest в Home Assistant (push) Canceled after 0s
Проверка (CI) / Доказательство выполненных проверок (push) Canceled after 0s
release: promote v1.78.0 from beta line
Issue: #616
Issue: #649
Issue: #651
Issue: #654
Issue: #660
Issue: #663
Issue: #676
Issue: #683
Issue: #688
Issue: #691
User-Visible: yes
Release: v1.78.0
2026-09-28 21:07:36 +03:00

2 lines
8.2 KiB
JavaScript

globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="a7aa4b718d3f5657591f9cf866d227c415e1f5f46fbc0b11ddce80a6845cf34e";import{eD as e}from"./houseplan-card-BYwTiVnu.js";const t=new WeakMap,o=e=>{let o=t.get(e);return o||(o={painted:null,pending:null,raf:0,anchor:null},t.set(e,o)),o},n=e=>`${e.x} ${e.y} ${e.w} ${e.h}`;function r(e,t){return{translateXPercent:(e.x-t.x)/t.w*100,translateYPercent:(e.y-t.y)/t.h*100,scaleX:e.w/t.w,scaleY:e.h/t.h}}const i=e=>0===e.translateXPercent&&0===e.translateYPercent&&1===e.scaleX&&1===e.scaleY,a=.15;const s=e=>[e.x,e.y,e.w,e.h].every(Number.isFinite)&&e.w>0&&e.h>0,l="inset(-25%)",c=(e,t,o={})=>{const n=e.style,r=((e,t)=>!0===t.exposeSceneOverflow&&"clip"!==e.getAttribute?.("data-hp-live-overflow"))(e,o);if(!t)return r&&"visible"===n.overflow&&n.removeProperty("overflow"),r&&n.clipPath===l&&n.removeProperty("clip-path"),void(n.transform&&(n.removeProperty("transform"),n.removeProperty("transform-origin"),n.removeProperty("will-change")));r&&"visible"!==n.overflow&&(n.overflow="visible"),r&&n.clipPath!==l&&(n.clipPath=l);const i=(e=>`translate(${e.translateXPercent}%,${e.translateYPercent}%) scale(${e.scaleX},${e.scaleY})`)(t);"0 0"!==n.transformOrigin&&"0px 0px"!==n.transformOrigin&&(n.transformOrigin="0 0"),"transform"!==n.willChange&&(n.willChange="transform"),n.transform!==i&&(n.transform=i)},f=(e,t)=>{e.getAttribute("viewBox")!==t&&e.setAttribute("viewBox",t)};function d(e,t,o,l,d={}){const u=d.now??("undefined"!=typeof performance?performance.now():Date.now()),h=l??{frame:t,at:-1/0};if(!s(t.view)||!s(o.view)||!s(o.floor))return h;const p=!0===d.force||!s(h.frame.view)||!s(h.frame.floor)||function(e,t,o){if(o-e.at>=100)return!0;const n=e.frame.view,r=t.view;if(Math.abs(r.x-n.x)>=r.w*a)return!0;if(Math.abs(r.y-n.y)>=r.h*a)return!0;const i=n.w/r.w;return Math.abs(1-i)>=a}(h,o,u),m=p?{frame:o,at:u}:h;if(p){const t=n(o.view),r=n(o.floor);for(const o of e.querySelectorAll('[data-hp-live-viewbox="camera"]'))f(o,t);for(const t of e.querySelectorAll('[data-hp-live-viewbox="floor"]'))f(t,r)}const v=r(m.frame.view,o.view),_=r(m.frame.floor,o.floor),g=!0===d.keepSceneLayer;for(const t of e.querySelectorAll('[data-hp-live-viewbox="camera"]'))c(t,i(v)&&!g?null:v,{exposeSceneOverflow:!0});for(const t of e.querySelectorAll('[data-hp-live-viewbox="floor"]'))c(t,i(_)&&!g?null:_,{exposeSceneOverflow:!0});const w=r(t.view,o.view);for(const t of e.querySelectorAll('[data-hp-live-layer="camera"]'))c(t,i(w)?null:w);const y=e.querySelector("[data-hp-live-zoom]");if(y){const e=o.zoom<=1;y.hidden!==e&&(y.hidden=e);const t=y.querySelector("[data-hp-live-zoom-value]"),n=`${Math.round(100*o.zoom)}%`;t&&t.textContent!==n&&(t.textContent=n)}return m}const u=e=>{const t=e._viewOr(e._baseVb());return{view:{...t},floor:{...e._floorView(t)},zoom:e._zoom}};const h=new WeakMap,p=new WeakMap,m=(e,t)=>{const o=e._spaceDisplayForRender().showLqi??e._config?.show_signal??!0,n=e._devicePresentation(t,o),r=n.haDisabled?e._t(`marker.ha_disabled_${n.disabledReason}`):t.userHidden?e._t("marker.hidden_ghost"):t.name,i=[t.model,n.valueBadge?.fullText||"",null!=n.lqiText?`LQI ${n.lqiText}`:""].filter(Boolean).join(" · ");return{title:t.name,meta:n.haDisabled?r:i}};const v=e=>{p.delete(e)},_=(e,t,o,n)=>{if(!o)return;const r=document.createElement("span");if(r.className="m",t){r.append(`${t} `);const e=document.createElement("b");e.textContent=o,n&&(e.style.color=n),r.append(e)}else r.textContent=o;e.append(r)},g=(t,o)=>{const n=o.querySelector("[data-hp-live-tip]");if(!n)return;const r=t._tip;if(!r)return n.hidden=!0,void n.replaceChildren();n.style.left=`${r.x+12}px`,n.style.top=`${r.y+12}px`,n.replaceChildren();const i=document.createElement("b");i.textContent=r.title,n.append(i),_(n,"",r.meta),_(n,t._t("tip.temp_avg"),null==r.temp?"":`${r.temp}°`),_(n,t._t("tip.hum_avg"),null==r.hum?"":`${r.hum}%`),_(n,t._t("tip.lqi"),null==r.lqi?"":String(r.lqi),null==r.lqi?void 0:e(r.lqi)),n.hidden=!1;const a=n.getBoundingClientRect(),s=Math.max(8,window.innerWidth-a.width-8),l=Math.max(8,window.innerHeight-a.height-8);n.style.left=`${Math.min(s,Math.max(8,r.x+12))}px`,n.style.top=`${Math.min(l,Math.max(8,r.y+12))}px`},w=(e,t,o)=>{const n=e.querySelector(t);n&&(n.setAttribute("d",o),n.toggleAttribute("hidden",!o))};function y(e){const t=e,o=t.renderRoot;if(!o)return;g(t,o);const n=t._hoverRoom,r=h.get(e),i=n?.space||"",a=n?.room||null;if(r?.room===a&&r?.space===i)return;h.set(e,{room:a,space:i});const s=n&&t._spaceModel(),l=s?t._roomHoverPaths(s):null;w(o,'[data-hp-live-room-hover="fill"]',l?.fillD||""),w(o,'[data-hp-live-room-hover="halo"]',l?.outlineD||""),w(o,'[data-hp-live-room-hover="outline"]',l?.outlineD||"")}function b(e){h.delete(e)}class x{constructor(e){this.host=e,this.deferredHass=!1}hass(e,t,o,n){const r=function(e,t,o){if(e===t)return"none";if(!e||!t||!o)return"structural";if(e.connection!==t.connection||e.entities!==t.entities||e.devices!==t.devices||e.areas!==t.areas||e.themes!==t.themes||e.user!==t.user||e.config!==t.config||e.floors!==t.floors||e.services!==t.services||e.panels!==t.panels||e.language!==t.language||e.locale?.language!==t.locale?.language||e.locale?.number_format!==t.locale?.number_format||e.locale?.time_format!==t.locale?.time_format||e.locale?.date_format!==t.locale?.date_format)return"structural";const n=new Set(["states","connection","entities","devices","areas","themes","user","config","floors","services","panels","language","locale"]);for(const o of new Set([...Object.keys(e),...Object.keys(t)]))if(!n.has(o)&&e[o]!==t[o])return"structural";for(const n of o.entityIds)if(e.states?.[n]!==t.states?.[n])return"state";return"none"}(e,t,o),i="state"===r&&this.active();i&&(this.deferredHass=!0);const a="none"!==r&&!i;return a||this.host._renderLife.observe(e,t,o,n),a}clear(){this.deferredHass=!1}take(){const e=this.deferredHass;return this.deferredHass=!1,e}viewport(e=!1){!function(e,t=!1){const n=e,r=o(e),i=u(n);if(t)return r.raf&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(r.raf),r.raf=0,r.pending=null,r.painted||(r.painted=i),void(r.anchor=d(n.renderRoot,r.painted,i,r.anchor,{keepSceneLayer:!0}));r.pending=i,r.raf||"function"!=typeof requestAnimationFrame||(r.raf=requestAnimationFrame(()=>{r.raf=0;const e=r.pending;r.pending=null;const t=n.renderRoot;e&&t&&(r.painted||(r.painted=e),r.anchor=d(t,r.painted,e,r.anchor,{keepSceneLayer:!0}))}))}(this.host,e)}hover(){y(this.host)}devicePointerTip(e,t){!function(e,t,o){const n=e;if(n._notePointer(t),!n._pointerModality.hoverEnabled||n._drag||n._deviceDrag)return void n._deviceHits.hover(n.renderRoot,null);const r=m(n,o);n._deviceHits.hover(n.renderRoot,o.id),n._showTip(t,r.title,r.meta)}(this.host,e,t)}deviceFocusTip(e,t){!function(e,t,o){const n=e;if("view"!==n._mode||n._drag||n._deviceDrag||!t?.matches(":focus-visible"))return;const r=t.getBoundingClientRect(),i={x:r.right,y:r.top,...m(n,o),source:"focus",deviceId:o.id};p.set(e,i),n._tip=i,y(n)}(this.host,e,t)}deviceBlur(e){!function(e,t){const o=e;p.get(e)?.deviceId===t&&(p.delete(e),"focus"===o._tip?.source&&(o._tip=null),y(o))}(this.host,e)}pointerLeave(){!function(e){const t=e;t._deviceHits.hover(t.renderRoot,null),t._tip=p.get(e)||null,t._hoverRoom=null,y(t)}(this.host)}deviceFocusActive(){return e=this.host,p.has(e);var e}clearDeviceFocus(){v(this.host)}active(){const e=this.host;return e._pointers.size>0||e._cameraTransition.active||!!e._deviceDrag||!!e._physicalDrag||!!e._physicalRotate||!!e._decorMove||!!e._decorDraft||!!e._dtDrag||!!e._bdDrag||!!e._opDrag||!!e._resize?.dragging}commit(){!function(e,t=!1){const n=e,r=o(e);r.raf&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(r.raf),r.raf=0,r.pending=null,r.painted=u(n);const i=n.renderRoot;if(i){for(const e of i.querySelectorAll('[data-hp-live-layer="camera"]'))c(e,null);r.anchor=d(i,r.painted,r.painted,r.anchor,{force:!0,keepSceneLayer:t})}}(this.host,this.active()),function(e){const t=e,o=p.get(e);if(!o)return;const n=[...t.renderRoot.querySelectorAll('[data-hp="device"]')].find(e=>e.dataset.id===o.deviceId);n?.matches(":focus-visible")||(p.delete(e),"focus"===t._tip?.source&&(t._tip=null))}(this.host),b(this.host),y(this.host)}dispose(){!function(e){const o=t.get(e);o?.raf&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(o.raf),t.delete(e)}(this.host),v(this.host),b(this.host)}}export{x as LiveRuntime};