UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

2 lines 33.3 kB
/*! For license information please see 39763.39f29c1e7718abac.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[39763],{81752:function(t,e,n){n.d(e,{BN:function(){return g},Ej:function(){return m},UE:function(){return f},UU:function(){return p},cY:function(){return d},rD:function(){return u}});var o=n(86518),i=(n(44114),n(72712),n(26910),n(18111),n(81148),n(22489),n(20116),n(61701),n(18237),n(13579),n(3362),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953),n(23276));const r=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],a=["mainAxis","crossAxis","limiter"],s=["apply"];function l(t,e,n){let{reference:o,floating:r}=t;const a=(0,i.TV)(e),s=(0,i.Dz)(e),l=(0,i.sq)(s),c=(0,i.C0)(e),u="y"===a,f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,h=o[l]/2-r[l]/2;let d;switch(c){case"top":d={x:f,y:o.y-r.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:p};break;case"left":d={x:o.x-r.width,y:p};break;default:d={x:o.x,y:o.y}}switch((0,i.Sg)(e)){case"start":d[s]-=h*(n&&u?-1:1);break;case"end":d[s]+=h*(n&&u?-1:1)}return d}async function c(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:a,rects:s,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:d=0}=(0,i._3)(e,t),g=(0,i.nI)(d),m=l[h?"floating"===p?"reference":"floating":p],y=(0,i.B1)(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),b="floating"===p?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),w=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},x=(0,i.B1)(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:c}):b);return{top:(y.top-x.top+g.top)/w.y,bottom:(x.bottom-y.bottom+g.bottom)/w.y,left:(y.left-x.left+g.left)/w.x,right:(x.right-y.right+g.right)/w.x}}const u=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=a.detectOverflow?a:Object.assign(Object.assign({},a),{},{detectOverflow:c}),u=await(null==a.isRTL?void 0:a.isRTL(e));let f=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:p,y:h}=l(f,o,u),d=o,g=0;const m={};for(let c=0;c<r.length;c++){const n=r[c];if(!n)continue;const{name:y,fn:b}=n,{x:v,y:w,data:x,reset:P}=await b({x:p,y:h,initialPlacement:o,placement:d,strategy:i,middlewareData:m,rects:f,platform:s,elements:{reference:t,floating:e}});p=null!=v?v:p,h=null!=w?w:h,m[y]=Object.assign(Object.assign({},m[y]),x),P&&g<50&&(g++,"object"==typeof P&&(P.placement&&(d=P.placement),P.rects&&(f=!0===P.rects?await a.getElementRects({reference:t,floating:e,strategy:i}):P.rects),({x:p,y:h}=l(f,d,u))),c=-1)}return{x:p,y:h,placement:d,strategy:i,middlewareData:m}},f=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:a,platform:s,elements:l,middlewareData:c}=e,{element:u,padding:f=0}=(0,i._3)(t,e)||{};if(null==u)return{};const p=(0,i.nI)(f),h={x:n,y:o},d=(0,i.Dz)(r),g=(0,i.sq)(d),m=await s.getDimensions(u),y="y"===d,b=y?"top":"left",v=y?"bottom":"right",w=y?"clientHeight":"clientWidth",x=a.reference[g]+a.reference[d]-h[d]-a.floating[g],P=h[d]-a.reference[d],E=await(null==s.getOffsetParent?void 0:s.getOffsetParent(u));let T=E?E[w]:0;T&&await(null==s.isElement?void 0:s.isElement(E))||(T=l.floating[w]||a.floating[g]);const O=x/2-P/2,z=T/2-m[g]/2-1,k=(0,i.jk)(p[b],z),L=(0,i.jk)(p[v],z),R=k,S=T-m[g]-L,A=T/2-m[g]/2+O,C=(0,i.qE)(R,A,S),j=!c.arrow&&null!=(0,i.Sg)(r)&&A!==C&&a.reference[g]/2-(A<R?k:L)-m[g]/2<0,B=j?A<R?A-R:A-S:0;return{[d]:h[d]+B,data:Object.assign({[d]:C,centerOffset:A-C-B},j&&{alignmentOffset:B}),reset:j}}});const p=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,a;const{placement:s,middlewareData:l,rects:c,initialPlacement:u,platform:f,elements:p}=e,h=(0,i._3)(t,e),{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0}=h,w=(0,o.A)(h,r);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const x=(0,i.C0)(s),P=(0,i.TV)(u),E=(0,i.C0)(u)===u,T=await(null==f.isRTL?void 0:f.isRTL(p.floating)),O=m||(E||!v?[(0,i.bV)(u)]:(0,i.WJ)(u)),z="none"!==b;!m&&z&&O.push(...(0,i.lP)(u,v,b,T));const k=[u,...O],L=await f.detectOverflow(e,w),R=[];let S=(null==(a=l.flip)?void 0:a.overflows)||[];if(d&&R.push(L[x]),g){const t=(0,i.w7)(s,c,T);R.push(L[t[0]],L[t[1]])}if(S=[...S,{placement:s,overflows:R}],!R.every(t=>t<=0)){var A,C;const t=((null==(A=l.flip)?void 0:A.index)||0)+1,e=k[t];if(e){if(!("alignment"===g&&P!==(0,i.TV)(e))||S.every(t=>(0,i.TV)(t.placement)!==P||t.overflows[0]>0))return{data:{index:t,overflows:S},reset:{placement:e}}}let n=null==(C=S.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:C.placement;if(!n)switch(y){case"bestFit":{var j;const t=null==(j=S.filter(t=>{if(z){const e=(0,i.TV)(t.placement);return e===P||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:j[0];t&&(n=t);break}case"initialPlacement":n=u}if(s!==n)return{reset:{placement:n}}}return{}}}};const h=new Set(["left","top"]);const d=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:a,placement:s,middlewareData:l}=e,c=await async function(t,e){const{placement:n,platform:o,elements:r}=t,a=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=(0,i.C0)(n),l=(0,i.Sg)(n),c="y"===(0,i.TV)(n),u=h.has(s)?-1:1,f=a&&c?-1:1,p=(0,i._3)(e,t);let{mainAxis:d,crossAxis:g,alignmentAxis:m}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&"number"==typeof m&&(g="end"===l?-1*m:m),c?{x:g*f,y:d*u}:{x:d*u,y:g*f}}(e,t);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:a+c.y,data:Object.assign(Object.assign({},c),{},{placement:s})}}}},g=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s,platform:l}=e,c=(0,i._3)(t,e),{mainAxis:u=!0,crossAxis:f=!1,limiter:p={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}}}=c,h=(0,o.A)(c,a),d={x:n,y:r},g=await l.detectOverflow(e,h),m=(0,i.TV)((0,i.C0)(s)),y=(0,i.PG)(m);let b=d[y],v=d[m];if(u){const t="y"===y?"bottom":"right",e=b+g["y"===y?"top":"left"],n=b-g[t];b=(0,i.qE)(e,b,n)}if(f){const t="y"===m?"bottom":"right",e=v+g["y"===m?"top":"left"],n=v-g[t];v=(0,i.qE)(e,v,n)}const w=p.fn(Object.assign(Object.assign({},e),{},{[y]:b,[m]:v}));return Object.assign(Object.assign({},w),{},{data:{x:w.x-n,y:w.y-r,enabled:{[y]:u,[m]:f}}})}}},m=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:a,rects:l,platform:c,elements:u}=e,f=(0,i._3)(t,e),{apply:p=()=>{}}=f,h=(0,o.A)(f,s),d=await c.detectOverflow(e,h),g=(0,i.C0)(a),m=(0,i.Sg)(a),y="y"===(0,i.TV)(a),{width:b,height:v}=l.floating;let w,x;"top"===g||"bottom"===g?(w=g,x=m===(await(null==c.isRTL?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(x=g,w="end"===m?"top":"bottom");const P=v-d.top-d.bottom,E=b-d.left-d.right,T=(0,i.jk)(v-d[w],P),O=(0,i.jk)(b-d[x],E),z=!e.middlewareData.shift;let k=T,L=O;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(L=E),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(k=P),z&&!m){const t=(0,i.T9)(d.left,0),e=(0,i.T9)(d.right,0),n=(0,i.T9)(d.top,0),o=(0,i.T9)(d.bottom,0);y?L=b-2*(0!==t||0!==e?t+e:(0,i.T9)(d.left,d.right)):k=v-2*(0!==n||0!==o?n+o:(0,i.T9)(d.top,d.bottom))}await p(Object.assign(Object.assign({},e),{},{availableWidth:L,availableHeight:k}));const R=await c.getDimensions(u.floating);return b!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}}},74234:function(t,e,n){n.a(t,async function(t,o){try{n.d(e,{BN:function(){return N},Ej:function(){return V},UE:function(){return W},UU:function(){return H},cY:function(){return F},iD:function(){return M},ll:function(){return Z},rD:function(){return I}});var i=n(69235),r=(n(18111),n(22489),n(45367),n(92731),n(3362),n(62953),n(23276)),a=n(81752),s=n(21306),l=t([i]);function u(t){const e=(0,s.L9)(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=(0,s.sb)(t),a=i?t.offsetWidth:n,l=i?t.offsetHeight:o,c=(0,r.LI)(n)!==a||(0,r.LI)(o)!==l;return c&&(n=a,o=l),{width:n,height:o,$:c}}function f(t){return(0,s.vq)(t)?t:t.contextElement}function p(t){const e=f(t);if(!(0,s.sb)(e))return(0,r.Jx)(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:a}=u(e);let l=(a?(0,r.LI)(n.width):n.width)/o,c=(a?(0,r.LI)(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}i=(l.then?(await l)():l)[0];const h=(0,r.Jx)(0);function d(t){const e=(0,s.zk)(t);return(0,s.Tc)()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:h}function g(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==(0,s.zk)(t))&&e}function m(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),a=f(t);let l=(0,r.Jx)(1);e&&(o?(0,s.vq)(o)&&(l=p(o)):l=p(t));const c=g(a,n,o)?d(a):(0,r.Jx)(0);let u=(i.left+c.x)/l.x,h=(i.top+c.y)/l.y,m=i.width/l.x,y=i.height/l.y;if(a){const t=(0,s.zk)(a),e=o&&(0,s.vq)(o)?(0,s.zk)(o):o;let n=t,i=(0,s._m)(n);for(;i&&o&&e!==n;){const t=p(i),e=i.getBoundingClientRect(),o=(0,s.L9)(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,a=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;u*=t.x,h*=t.y,m*=t.x,y*=t.y,u+=r,h+=a,n=(0,s.zk)(i),i=(0,s._m)(n)}}return(0,r.B1)({width:m,height:y,x:u,y:h})}function y(t,e){const n=(0,s.CP)(t).scrollLeft;return e?e.left+n:m((0,s.ep)(t)).left+n}function b(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-y(t,n),y:n.top+e.scrollTop}}function v(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const a="fixed"===i,l=(0,s.ep)(o),c=!!e&&(0,s.Tf)(e.floating);if(o===l||c&&a)return n;let u={scrollLeft:0,scrollTop:0},f=(0,r.Jx)(1);const h=(0,r.Jx)(0),d=(0,s.sb)(o);if((d||!d&&!a)&&(("body"!==(0,s.mq)(o)||(0,s.ZU)(l))&&(u=(0,s.CP)(o)),d)){const t=m(o);f=p(o),h.x=t.x+o.clientLeft,h.y=t.y+o.clientTop}const g=!l||d||a?(0,r.Jx)(0):b(l,u);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+h.x+g.x,y:n.y*f.y-u.scrollTop*f.y+h.y+g.y}}function w(t){return Array.from(t.getClientRects())}function x(t){const e=(0,s.ep)(t),n=(0,s.CP)(t),o=t.ownerDocument.body,i=(0,r.T9)(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=(0,r.T9)(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+y(t);const c=-n.scrollTop;return"rtl"===(0,s.L9)(o).direction&&(l+=(0,r.T9)(e.clientWidth,o.clientWidth)-i),{width:i,height:a,x:l,y:c}}const P=25;function E(t,e){const n=(0,s.zk)(t),o=(0,s.ep)(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,l=0,c=0;if(i){r=i.width,a=i.height;const t=(0,s.Tc)();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,c=i.offsetTop)}const u=y(o);if(u<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(o.clientWidth-e.clientWidth-i);a<=P&&(r-=a)}else u<=P&&(r+=u);return{width:r,height:a,x:l,y:c}}function T(t,e){const n=m(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,a=(0,s.sb)(t)?p(t):(0,r.Jx)(1);return{width:t.clientWidth*a.x,height:t.clientHeight*a.y,x:i*a.x,y:o*a.y}}function O(t,e,n){let o;if("viewport"===e)o=E(t,n);else if("document"===e)o=x((0,s.ep)(t));else if((0,s.vq)(e))o=T(e,n);else{const n=d(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return(0,r.B1)(o)}function z(t,e){const n=(0,s.$4)(t);return!(n===e||!(0,s.vq)(n)||(0,s.eu)(n))&&("fixed"===(0,s.L9)(n).position||z(n,e))}function k(t,e){const n=e.get(t);if(n)return n;let o=(0,s.v9)(t,[],!1).filter(t=>(0,s.vq)(t)&&"body"!==(0,s.mq)(t)),i=null;const r="fixed"===(0,s.L9)(t).position;let a=r?(0,s.$4)(t):t;for(;(0,s.vq)(a)&&!(0,s.eu)(a);){const e=(0,s.L9)(a),n=(0,s.sQ)(a);n||"fixed"!==e.position||(i=null);(r?!n&&!i:!n&&"static"===e.position&&!!i&&("absolute"===i.position||"fixed"===i.position)||(0,s.ZU)(a)&&!n&&z(t,a))?o=o.filter(t=>t!==a):i=e,a=(0,s.$4)(a)}return e.set(t,o),o}function L(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[..."clippingAncestors"===n?(0,s.Tf)(e)?[]:k(e,this._c):[].concat(n),o],l=O(e,a[0],i);let c=l.top,u=l.right,f=l.bottom,p=l.left;for(let s=1;s<a.length;s++){const t=O(e,a[s],i);c=(0,r.T9)(t.top,c),u=(0,r.jk)(t.right,u),f=(0,r.jk)(t.bottom,f),p=(0,r.T9)(t.left,p)}return{width:u-p,height:f-c,x:p,y:c}}function R(t){const{width:e,height:n}=u(t);return{width:e,height:n}}function S(t,e,n){const o=(0,s.sb)(e),i=(0,s.ep)(e),a="fixed"===n,l=m(t,!0,a,e);let c={scrollLeft:0,scrollTop:0};const u=(0,r.Jx)(0);function f(){u.x=y(i)}if(o||!o&&!a)if(("body"!==(0,s.mq)(e)||(0,s.ZU)(i))&&(c=(0,s.CP)(e)),o){const t=m(e,!0,a,e);u.x=t.x+e.clientLeft,u.y=t.y+e.clientTop}else i&&f();a&&!o&&i&&f();const p=!i||o||a?(0,r.Jx)(0):b(i,c);return{x:l.left+c.scrollLeft-u.x-p.x,y:l.top+c.scrollTop-u.y-p.y,width:l.width,height:l.height}}function A(t){return"static"===(0,s.L9)(t).position}function C(t,e){if(!(0,s.sb)(t)||"fixed"===(0,s.L9)(t).position)return null;if(e)return e(t);let n=t.offsetParent;return(0,s.ep)(t)===n&&(n=n.ownerDocument.body),n}function j(t,e){const n=(0,s.zk)(t);if((0,s.Tf)(t))return n;if(!(0,s.sb)(t)){let e=(0,s.$4)(t);for(;e&&!(0,s.eu)(e);){if((0,s.vq)(e)&&!A(e))return e;e=(0,s.$4)(e)}return n}let o=C(t,e);for(;o&&(0,s.Lv)(o)&&A(o);)o=C(o,e);return o&&(0,s.eu)(o)&&A(o)&&!(0,s.sQ)(o)?n:o||(0,s.gJ)(t)||n}const B=async function(t){const e=this.getOffsetParent||j,n=this.getDimensions,o=await n(t.floating);return{reference:S(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function D(t){return"rtl"===(0,s.L9)(t).direction}const M={convertOffsetParentRelativeRectToViewportRelativeRect:v,getDocumentElement:s.ep,getClippingRect:L,getOffsetParent:j,getElementRects:B,getClientRects:w,getDimensions:R,getScale:p,isElement:s.vq,isRTL:D};function $(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function q(t,e){let n,o=null;const i=(0,s.ep)(t);function a(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function s(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),a();const u=t.getBoundingClientRect(),{left:f,top:p,width:h,height:d}=u;if(l||e(),!h||!d)return;const g={rootMargin:-(0,r.RI)(p)+"px "+-(0,r.RI)(i.clientWidth-(f+h))+"px "+-(0,r.RI)(i.clientHeight-(p+d))+"px "+-(0,r.RI)(f)+"px",threshold:(0,r.T9)(0,(0,r.jk)(1,c))||1};let m=!0;function y(e){const o=e[0].intersectionRatio;if(o!==c){if(!m)return s();o?s(!1,o):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==o||$(u,t.getBoundingClientRect())||s(),m=!1}try{o=new IntersectionObserver(y,Object.assign(Object.assign({},g),{},{root:i.ownerDocument}))}catch(b){o=new IntersectionObserver(y,g)}o.observe(t)}(!0),a}function Z(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,u=f(t),p=i||r?[...u?(0,s.v9)(u):[],...e?(0,s.v9)(e):[]]:[];p.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const h=u&&l?q(u,n):null;let d,g=-1,y=null;a&&(y=new ResizeObserver(t=>{let[o]=t;o&&o.target===u&&y&&e&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(e)})),n()}),u&&!c&&y.observe(u),e&&y.observe(e));let b=c?m(t):null;return c&&function e(){const o=m(t);b&&!$(b,o)&&n();b=o,d=requestAnimationFrame(e)}(),n(),()=>{var t;p.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==h||h(),null==(t=y)||t.disconnect(),y=null,c&&cancelAnimationFrame(d)}}const F=a.cY,N=a.BN,H=a.UU,V=a.Ej,W=a.UE,I=(t,e,n)=>{const o=new Map,i=Object.assign({platform:M},n),r=Object.assign(Object.assign({},i.platform),{},{_c:o});return(0,a.rD)(t,e,Object.assign(Object.assign({},i),{},{platform:r}))};o()}catch(c){o(c)}})},21306:function(t,e,n){n.d(e,{$4:function(){return T},CP:function(){return E},L9:function(){return P},Lv:function(){return p},Tc:function(){return w},Tf:function(){return h},ZU:function(){return f},_m:function(){return k},ep:function(){return a},eu:function(){return x},gJ:function(){return v},mq:function(){return i},sQ:function(){return b},sb:function(){return c},v9:function(){return z},vq:function(){return l},zk:function(){return r}});n(18111),n(22489),n(27495);function o(){return"undefined"!=typeof window}function i(t){return s(t)?(t.nodeName||"").toLowerCase():"#document"}function r(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function a(t){var e;return null==(e=(s(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function s(t){return!!o()&&(t instanceof Node||t instanceof r(t).Node)}function l(t){return!!o()&&(t instanceof Element||t instanceof r(t).Element)}function c(t){return!!o()&&(t instanceof HTMLElement||t instanceof r(t).HTMLElement)}function u(t){return!(!o()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof r(t).ShadowRoot)}function f(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=P(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==i&&"contents"!==i}function p(t){return/^(table|td|th)$/.test(i(t))}function h(t){try{if(t.matches(":popover-open"))return!0}catch(e){}try{return t.matches(":modal")}catch(e){return!1}}const d=/transform|translate|scale|rotate|perspective|filter/,g=/paint|layout|strict|content/,m=t=>!!t&&"none"!==t;let y;function b(t){const e=l(t)?P(t):t;return m(e.transform)||m(e.translate)||m(e.scale)||m(e.rotate)||m(e.perspective)||!w()&&(m(e.backdropFilter)||m(e.filter))||d.test(e.willChange||"")||g.test(e.contain||"")}function v(t){let e=T(t);for(;c(e)&&!x(e);){if(b(e))return e;if(h(e))return null;e=T(e)}return null}function w(){return null==y&&(y="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),y}function x(t){return/^(html|body|#document)$/.test(i(t))}function P(t){return r(t).getComputedStyle(t)}function E(t){return l(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function T(t){if("html"===i(t))return t;const e=t.assignedSlot||t.parentNode||u(t)&&t.host||a(t);return u(e)?e.host:e}function O(t){const e=T(t);return x(e)?t.ownerDocument?t.ownerDocument.body:t.body:c(e)&&f(e)?e:O(e)}function z(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=O(t),a=i===(null==(o=t.ownerDocument)?void 0:o.body),s=r(i);if(a){const t=k(s);return e.concat(s,s.visualViewport||[],f(i)?i:[],t&&n?z(t):[])}return e.concat(i,z(i,[],n))}function k(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}},23276:function(t,e,n){n.d(e,{B1:function(){return k},C0:function(){return f},Dz:function(){return m},Jx:function(){return s},LI:function(){return r},PG:function(){return h},RI:function(){return a},Sg:function(){return p},T9:function(){return i},TV:function(){return g},WJ:function(){return b},_3:function(){return u},bV:function(){return O},jk:function(){return o},lP:function(){return T},nI:function(){return z},qE:function(){return c},sq:function(){return d},w7:function(){return y}});n(74423),n(72712),n(18111),n(61701),n(27495),n(25440);const o=Math.min,i=Math.max,r=Math.round,a=Math.floor,s=t=>({x:t,y:t}),l={left:"right",right:"left",bottom:"top",top:"bottom"};function c(t,e,n){return i(t,o(e,n))}function u(t,e){return"function"==typeof t?t(e):t}function f(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function h(t){return"x"===t?"y":"x"}function d(t){return"y"===t?"height":"width"}function g(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function m(t){return h(g(t))}function y(t,e,n){void 0===n&&(n=!1);const o=p(t),i=m(t),r=d(i);let a="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=O(a)),[a,O(a)]}function b(t){const e=O(t);return[v(t),e,v(e)]}function v(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const w=["left","right"],x=["right","left"],P=["top","bottom"],E=["bottom","top"];function T(t,e,n,o){const i=p(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?x:w:e?w:x;case"left":case"right":return e?P:E;default:return[]}}(f(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(v)))),r}function O(t){const e=f(t);return l[e]+t.slice(e.length)}function z(t){return"number"!=typeof t?function(t){return Object.assign({top:0,right:0,bottom:0,left:0},t)}(t):{top:t,right:t,bottom:t,left:t}}function k(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}},40158:function(t,e,n){n.a(t,async function(t,o){try{n.d(e,{A:function(){return O}});n(74423),n(44114),n(55081),n(18111),n(22489),n(61701),n(3362),n(42762),n(62953);var i=n(74234),r=n(21306),a=n(73015),s=n(5124),l=n(67576),c=n(6412),u=n(91336),f=n(717),p=n(17060),h=n(78520),d=t([i,p]);[i,p]=d.then?(await d)():d;let v,w,x,P=t=>t;var g=Object.defineProperty,m=Object.getOwnPropertyDescriptor,y=(t,e,n,o)=>{for(var i,r=o>1?void 0:o?m(e,n):e,a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o?i(e,n,r):i(r))||r);return o&&r&&g(e,n,r),r};function E(t){return null!==t&&"object"==typeof t&&"getBoundingClientRect"in t&&(!("contextElement"in t)||t instanceof Element)}const T=null===globalThis||void 0===globalThis||null===(v=globalThis.HTMLElement)||void 0===v?void 0:v.prototype.hasOwnProperty("popover");let O=class extends f.A{async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||E(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){var t,e;this.anchorEl&&this.active&&this.isConnected&&(null===(t=this.popup)||void 0===t||null===(e=t.showPopover)||void 0===e||e.call(t),this.cleanup=(0,i.ll)(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{var e,n;null===(e=this.popup)||void 0===e||null===(n=e.hidePopover)||void 0===n||n.call(e),this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl||!this.popup)return;const t=[(0,i.cY)({mainAxis:this.distance,crossAxis:this.skidding})];let e;this.sync?t.push((0,i.Ej)({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,n="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=n?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),T&&!E(this.anchor)&&"scroll"===this.boundary&&(e=(0,r.v9)(this.anchorEl).filter(t=>t instanceof Element)),this.flip&&t.push((0,i.UU)({boundary:this.flipBoundary||e,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push((0,i.BN)({boundary:this.shiftBoundary||e,padding:this.shiftPadding})),this.autoSize?t.push((0,i.Ej)({boundary:this.autoSizeBoundary||e,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push((0,i.UE)({element:this.arrowEl,padding:this.arrowPadding}));const n=T?t=>i.iD.getOffsetParent(t,a.WX):i.iD.getOffsetParent;(0,i.rD)(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:T?"absolute":"fixed",platform:Object.assign(Object.assign({},i.iD),{},{getOffsetParent:n})}).then(({x:t,y:e,middlewareData:n,placement:o})=>{const i="rtl"===this.localize.dir(),r={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=n.arrow.x,e=n.arrow.y;let o="",a="",s="",l="";if("start"===this.arrowPlacement){const n="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",a=i?n:"",l=i?"":n}else if("end"===this.arrowPlacement){const n="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";a=i?"":n,l=i?n:"",s="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",o="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",o="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:o,right:a,bottom:s,left:l,[r]:"calc(var(--arrow-base-offset) - var(--arrow-size-diagonal))"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.dispatchEvent(new u.B)}render(){return(0,s.qy)(w||(w=P` <slot name="anchor" @slotchange="${0}"></slot> <span part="hover-bridge" class="${0}"></span> <div popover="manual" part="popup" class="${0}"> <slot></slot> ${0} </div> `),this.handleAnchorChange,(0,c.H)({"popup-hover-bridge":!0,"popup-hover-bridge-visible":this.hoverBridge&&this.active}),(0,c.H)({popup:!0,"popup-active":this.active,"popup-fixed":!T,"popup-has-arrow":this.arrow}),this.arrow?(0,s.qy)(x||(x=P`<div part="arrow" class="arrow" role="presentation"></div>`)):"")}constructor(){super(...arguments),this.localize=new p.c(this),this.active=!1,this.placement="top",this.boundary="viewport",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl&&this.popup){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let n=0,o=0,i=0,r=0,a=0,s=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top<e.top?(n=t.left,o=t.bottom,i=t.right,r=t.bottom,a=e.left,s=e.top,l=e.right,c=e.top):(n=e.left,o=e.bottom,i=e.right,r=e.bottom,a=t.left,s=t.top,l=t.right,c=t.top):t.left<e.left?(n=t.right,o=t.top,i=e.left,r=e.top,a=t.right,s=t.bottom,l=e.left,c=e.bottom):(n=e.right,o=e.top,i=t.left,r=t.top,a=e.right,s=e.bottom,l=t.left,c=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${n}px`),this.style.setProperty("--hover-bridge-top-left-y",`${o}px`),this.style.setProperty("--hover-bridge-top-right-x",`${i}px`),this.style.setProperty("--hover-bridge-top-right-y",`${r}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${a}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${s}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}};O.css=h.A,y([(0,l.P)(".popup")],O.prototype,"popup",2),y([(0,l.P)(".arrow")],O.prototype,"arrowEl",2),y([(0,l.MZ)()],O.prototype,"anchor",2),y([(0,l.MZ)({type:Boolean,reflect:!0})],O.prototype,"active",2),y([(0,l.MZ)({reflect:!0})],O.prototype,"placement",2),y([(0,l.MZ)()],O.prototype,"boundary",2),y([(0,l.MZ)({type:Number})],O.prototype,"distance",2),y([(0,l.MZ)({type:Number})],O.prototype,"skidding",2),y([(0,l.MZ)({type:Boolean})],O.prototype,"arrow",2),y([(0,l.MZ)({attribute:"arrow-placement"})],O.prototype,"arrowPlacement",2),y([(0,l.MZ)({attribute:"arrow-padding",type:Number})],O.prototype,"arrowPadding",2),y([(0,l.MZ)({type:Boolean})],O.prototype,"flip",2),y([(0,l.MZ)({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(t=>t.trim()).filter(t=>""!==t),toAttribute:t=>t.join(" ")}})],O.prototype,"flipFallbackPlacements",2),y([(0,l.MZ)({attribute:"flip-fallback-strategy"})],O.prototype,"flipFallbackStrategy",2),y([(0,l.MZ)({type:Object})],O.prototype,"flipBoundary",2),y([(0,l.MZ)({attribute:"flip-padding",type:Number})],O.prototype,"flipPadding",2),y([(0,l.MZ)({type:Boolean})],O.prototype,"shift",2),y([(0,l.MZ)({type:Object})],O.prototype,"shiftBoundary",2),y([(0,l.MZ)({attribute:"shift-padding",type:Number})],O.prototype,"shiftPadding",2),y([(0,l.MZ)({attribute:"auto-size"})],O.prototype,"autoSize",2),y([(0,l.MZ)()],O.prototype,"sync",2),y([(0,l.MZ)({type:Object})],O.prototype,"autoSizeBoundary",2),y([(0,l.MZ)({attribute:"auto-size-padding",type:Number})],O.prototype,"autoSizePadding",2),y([(0,l.MZ)({attribute:"hover-bridge",type:Boolean})],O.prototype,"hoverBridge",2),O=y([(0,l.EM)("wa-popup")],O),o()}catch(b){o(b)}})},78520:function(t,e,n){n.d(e,{A:function(){return i}});let o;var i=(0,n(5124).AH)(o||(o=(t=>t)`:host{--arrow-color:black;--arrow-size:var(--wa-tooltip-arrow-size);--popup-border-width:0px;--show-duration:100ms;--hide-duration:100ms;--arrow-base-offset:var(--popup-border-width);--arrow-size-diagonal:calc((var(--arrow-size) + var(--arrow-base-offset)) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));--arrow-size-div:calc(var(--arrow-size-diagonal) * 2);--arrow-clipping-corner:calc(var(--arrow-base-offset) * 1.4142);display:contents}.popup{position:absolute;isolation:isolate;max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}:where(.popup){inset:unset;padding:unset;margin:unset;width:unset;height:unset;color:unset;background:unset;border:unset;overflow:unset}.popup-fixed{position:fixed}.popup:not(.popup-active){display:none}.arrow{position:absolute;width:var(--arrow-size-div);height:var(--arrow-size-div);background:var(--arrow-color);z-index:3;clip-path:polygon(var(--arrow-clipping-corner) 100%,var(--arrow-base-offset) calc(100% - var(--arrow-base-offset)),calc(var(--arrow-base-offset) - 2px) calc(100% - var(--arrow-base-offset)),calc(100% - var(--arrow-base-offset)) calc(var(--arrow-base-offset) - 2px),calc(100% - var(--arrow-base-offset)) var(--arrow-base-offset),100% var(--arrow-clipping-corner),100% 100%);rotate:45deg}:host([data-current-placement|=left]) .arrow{rotate:-45deg}:host([data-current-placement|=right]) .arrow{rotate:135deg}:host([data-current-placement|=bottom]) .arrow{rotate:225deg}.popup-hover-bridge:not(.popup-hover-bridge-visible){display:none}.popup-hover-bridge{position:fixed;z-index:899;top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}.show{animation:show var(--show-duration) ease}.hide{animation:show var(--hide-duration) ease reverse}@keyframes show{from{opacity:0}to{opacity:1}}.show-with-scale{animation:show-with-scale var(--show-duration) ease}.hide-with-scale{animation:show-with-scale var(--hide-duration) ease reverse}@keyframes show-with-scale{from{opacity:0;scale:0.8}to{opacity:1;scale:1}}`))},91336:function(t,e,n){n.d(e,{B:function(){return o}});class o extends Event{constructor(){super("wa-reposition",{bubbles:!0,cancelable:!1,composed:!0})}}},73015:function(t,e,n){n.d(e,{WX:function(){return i}});n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);var o=n(21306);function i(t){return a(t)}function r(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function a(t){for(let e=t;e;e=r(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=r(t);e;e=r(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||(0,o.sQ)(t))return e;if("BODY"===e.tagName)return e}}return null}}}]);