@fluid-topics/ft-drawer 2.1.14 → 2.1.15

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.
@@ -318,7 +318,7 @@
318
318
  position: relative;
319
319
  word-break: break-word;
320
320
  }
321
- `;var La=["top","right","bottom","left"],Ra=["start","end"],ci=La.reduce((e,t)=>e.concat(t,t+"-"+Ra[0],t+"-"+Ra[1]),[]),cr=Math.min,We=Math.max,ur=Math.round;var be=e=>({x:e,y:e}),Mc={left:"right",right:"left",bottom:"top",top:"bottom"};function Pa(e,t,r){return We(e,cr(t,r))}function en(e,t){return typeof e=="function"?e(t):e}function dr(e){return e.split("-")[0]}function Ke(e){return e.split("-")[1]}function ui(e){return e==="x"?"y":"x"}function di(e){return e==="y"?"height":"width"}function tn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function pi(e){return ui(tn(e))}function Na(e,t,r){r===void 0&&(r=!1);let n=Ke(e),i=pi(e),o=di(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=li(s)),[s,li(s)]}function Da(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function li(e){let t=dr(e);return Mc[t]+e.slice(t.length)}function Ic(e){var t,r,n,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function ka(e){return typeof e!="number"?Ic(e):{top:e,right:e,bottom:e,left:e}}function st(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Ma(e,t,r){let{reference:n,floating:i}=e,o=tn(t),s=pi(t),a=di(s),l=dr(t),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,f;switch(l){case"top":f={x:u,y:n.y-i.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:d};break;case"left":f={x:n.x-i.width,y:d};break;default:f={x:n.x,y:n.y}}let h=Ke(t);return h&&(f[s]+=p*(h==="end"?1:-1)*(r&&c?-1:1)),f}async function Ia(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=en(t,e),h=ka(f),b=a[p?d==="floating"?"reference":"floating":d],x=st(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),A=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(S))&&await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1},H=st(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:S,strategy:l}):A);return{top:(x.top-H.top+h.top)/O.y,bottom:(H.bottom-x.bottom+h.bottom)/O.y,left:(x.left-H.left+h.left)/O.x,right:(H.right-x.right+h.right)/O.x}}var Uc=50,Ua=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ia},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ma(c,n,l),p=n,f=0,h={};for(let m=0;m<o.length;m++){let b=o[m];if(!b)continue;let{name:x,fn:A}=b,{x:S,y:O,data:H,reset:I}=await A({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=S??u,d=O??d,h[x]={...h[x],...H},I&&f<Uc&&(f++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:u,y:d}=Ma(c,p,l)),m=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:h}};function $c(e,t,r){return(e?[...r.filter(i=>Ke(i)===e),...r.filter(i=>Ke(i)!==e)]:r.filter(i=>dr(i)===i)).filter(i=>e?Ke(i)===e||(t?Da(i)!==i:!1):!0)}var $a=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=ci,autoAlignment:f=!0,...h}=en(e,t),m=d!==void 0||p===ci?$c(d||null,f,p):p,b=((r=s.autoPlacement)==null?void 0:r.index)||0,x=m[b];if(x==null)return{};if(a!==x)return{reset:{placement:m[0]}};let A=await l.detectOverflow(t,h),S=Na(x,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),O=[A[dr(x)],A[S[0]],A[S[1]]],H=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:x,overflows:O}],I=m[b+1];if(I)return{data:{index:b+1,overflows:H},reset:{placement:I}};let De=H.map(J=>{let ie=Ke(J.placement);return[J.placement,ie&&u?J.overflows.slice(0,2).reduce((Z,Ge)=>Z+Ge,0):J.overflows[0],J.overflows]}).sort((J,ie)=>J[1]-ie[1]),ke=((i=De.filter(J=>J[2].slice(0,Ke(J[0])?2:3).every(ie=>ie<=0))[0])==null?void 0:i[0])||De[0][0];return ke!==a?{data:{index:b+1,overflows:H},reset:{placement:ke}}:{}}}};var Ba=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:A=>{let{x:S,y:O}=A;return{x:S,y:O}}},...c}=en(e,t),u={x:r,y:n},d=await o.detectOverflow(t,c),p=tn(i),f=ui(p),h=u[f],m=u[p],b=(A,S)=>Pa(S+d[A==="y"?"top":"left"],S,S-d[A==="y"?"bottom":"right"]);s&&(h=b(f,h)),a&&(m=b(p,m));let x=l.fn({...t,[f]:h,[p]:m});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[f]:s,[p]:a}}}}}};function nn(){return typeof window<"u"}function lt(e){return ja(e)?(e.nodeName||"").toLowerCase():"#document"}function X(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(ja(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ja(e){return nn()?e instanceof Node||e instanceof X(e).Node:!1}function ue(e){return nn()?e instanceof Element||e instanceof X(e).Element:!1}function Te(e){return nn()?e instanceof HTMLElement||e instanceof X(e).HTMLElement:!1}function Ha(e){return!nn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof X(e).ShadowRoot}function Ut(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=de(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Fa(e){return/^(table|td|th)$/.test(lt(e))}function pr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Bc=/transform|translate|scale|rotate|perspective|filter/,Hc=/paint|layout|strict|content/,at=e=>!!e&&e!=="none",fi;function $t(e){let t=ue(e)?de(e):e;return at(t.transform)||at(t.translate)||at(t.scale)||at(t.rotate)||at(t.perspective)||!on()&&(at(t.backdropFilter)||at(t.filter))||Bc.test(t.willChange||"")||Hc.test(t.contain||"")}function Va(e){let t=Ne(e);for(;Te(t)&&!ct(t);){if($t(t))return t;if(pr(t))return null;t=Ne(t)}return null}function on(){return fi==null&&(fi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fi}function ct(e){return/^(html|body|#document)$/.test(lt(e))}function de(e){return X(e).getComputedStyle(e)}function fr(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ne(e){if(lt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ha(e)&&e.host||we(e);return Ha(t)?t.host:t}function Wa(e){let t=Ne(e);return ct(t)?(e.ownerDocument||e).body:Te(t)&&Ut(t)?t:Wa(t)}function rn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Wa(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=X(i);if(o){let a=sn(s);return t.concat(s,s.visualViewport||[],Ut(i)?i:[],a&&r?rn(a):[])}else return t.concat(i,rn(i,[],r))}function sn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qa(e){let t=de(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Te(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=ur(r)!==o||ur(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function Ya(e){return ue(e)?e:e.contextElement}function Bt(e){let t=Ya(e);if(!Te(t))return be(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=qa(t),s=(o?ur(r.width):r.width)/n,a=(o?ur(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var jc=be(0);function Xa(e){let t=X(e);return!on()||!t.visualViewport?jc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==X(e)?!1:t}function hr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Ya(e),s=be(1);t&&(n?ue(n)&&(s=Bt(n)):s=Bt(e));let a=Fc(o,r,n)?Xa(o):be(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){let p=X(o),f=n&&ue(n)?X(n):n,h=p,m=sn(h);for(;m&&n&&f!==h;){let b=Bt(m),x=m.getBoundingClientRect(),A=de(m),S=x.left+(m.clientLeft+parseFloat(A.paddingLeft))*b.x,O=x.top+(m.clientTop+parseFloat(A.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=S,c+=O,h=X(m),m=sn(h)}}return st({width:u,height:d,x:l,y:c})}function an(e,t){let r=fr(e).scrollLeft;return t?t.left+r:hr(we(e)).left+r}function Ja(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-an(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Vc(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",s=we(n),a=t?pr(t.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=be(1),u=be(0),d=Te(n);if((d||!d&&!o)&&((lt(n)!=="body"||Ut(s))&&(l=fr(n)),d)){let f=hr(n);c=Bt(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}let p=s&&!d&&!o?Ja(s,l):be(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Wc(e){return Array.from(e.getClientRects())}function Kc(e){let t=we(e),r=fr(e),n=e.ownerDocument.body,i=We(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=We(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+an(e),a=-r.scrollTop;return de(n).direction==="rtl"&&(s+=We(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}var Ka=25;function zc(e,t){let r=X(e),n=we(e),i=r.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let u=on();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}let c=an(n);if(c<=0){let u=n.ownerDocument,d=u.body,p=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,h=Math.abs(n.clientWidth-d.clientWidth-f);h<=Ka&&(o-=h)}else c<=Ka&&(o+=c);return{width:o,height:s,x:a,y:l}}function Gc(e,t){let r=hr(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Te(e)?Bt(e):be(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function za(e,t,r){let n;if(t==="viewport")n=zc(e,r);else if(t==="document")n=Kc(we(e));else if(ue(t))n=Gc(t,r);else{let i=Xa(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return st(n)}function Za(e,t){let r=Ne(e);return r===t||!ue(r)||ct(r)?!1:de(r).position==="fixed"||Za(r,t)}function qc(e,t){let r=t.get(e);if(r)return r;let n=rn(e,[],!1).filter(a=>ue(a)&&lt(a)!=="body"),i=null,o=de(e).position==="fixed",s=o?Ne(e):e;for(;ue(s)&&!ct(s);){let a=de(s),l=$t(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ut(s)&&!l&&Za(e,s))?n=n.filter(u=>u!==s):i=a,s=Ne(s)}return t.set(e,n),n}function Yc(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[...r==="clippingAncestors"?pr(t)?[]:qc(t,this._c):[].concat(r),n],a=za(t,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let f=za(t,s[p],i);l=We(f.top,l),c=cr(f.right,c),u=cr(f.bottom,u),d=We(f.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Xc(e){let{width:t,height:r}=qa(e);return{width:t,height:r}}function Jc(e,t,r){let n=Te(t),i=we(t),o=r==="fixed",s=hr(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=be(0);function c(){l.x=an(i)}if(n||!n&&!o)if((lt(t)!=="body"||Ut(i))&&(a=fr(t)),n){let f=hr(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&c();o&&!n&&i&&c();let u=i&&!n&&!o?Ja(i,a):be(0),d=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:s.width,height:s.height}}function hi(e){return de(e).position==="static"}function Ga(e,t){if(!Te(e)||de(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return we(e)===r&&(r=r.ownerDocument.body),r}function Qa(e,t){let r=X(e);if(pr(e))return r;if(!Te(e)){let i=Ne(e);for(;i&&!ct(i);){if(ue(i)&&!hi(i))return i;i=Ne(i)}return r}let n=Ga(e,t);for(;n&&Fa(n)&&hi(n);)n=Ga(n,t);return n&&ct(n)&&hi(n)&&!$t(n)?r:n||Va(e)||r}var Zc=async function(e){let t=this.getOffsetParent||Qa,r=this.getDimensions,n=await r(e.floating);return{reference:Jc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Qc(e){return de(e).direction==="rtl"}var ln={convertOffsetParentRelativeRectToViewportRelativeRect:Vc,getDocumentElement:we,getClippingRect:Yc,getOffsetParent:Qa,getElementRects:Zc,getClientRects:Wc,getDimensions:Xc,getScale:Bt,isElement:ue,isRTL:Qc};var el=$a,tl=Ba;var rl=(e,t,r)=>{let n=new Map,i={platform:ln,...r},o={...i.platform,_c:n};return Ua(e,t,{...i,platform:o})};function nl(e){return eu(e)}function mi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function eu(e){for(let t=e;t;t=mi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=mi(e);t;t=mi(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||$t(r)||t.tagName==="BODY"))return t}return null}async function il(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},rl(e,t,{strategy:n.strategy,platform:{...ln,getOffsetParent:i=>ln.getOffsetParent(i,nl)},middleware:[tl({crossAxis:!0}),el({allowedPlacements:[n.placement]})]})}var ol=g(T());var yi=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?Mt.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},tu=new yi;var sl=(e,t)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:ol.hasChanged,converter:Mt,...t}),r[ir]=(i=r[ir])!==null&&i!==void 0?i:new Map,r[ir].set(n,e??{})};var xe=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},F=class extends qr{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new pe.Debouncer,this.revealDebouncer=new pe.Debouncer,this.onTouch=t=>{this.isIgnored(t)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=t=>{this.isIgnored(t)||this.show()},this.onFocusIn=t=>{!this.isIgnored(t)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var t,r;return al.html`
321
+ `;var La=["top","right","bottom","left"],Ra=["start","end"],ci=La.reduce((e,t)=>e.concat(t,t+"-"+Ra[0],t+"-"+Ra[1]),[]),cr=Math.min,We=Math.max,ur=Math.round;var be=e=>({x:e,y:e}),Mc={left:"right",right:"left",bottom:"top",top:"bottom"};function Pa(e,t,r){return We(e,cr(t,r))}function en(e,t){return typeof e=="function"?e(t):e}function dr(e){return e.split("-")[0]}function Ke(e){return e.split("-")[1]}function ui(e){return e==="x"?"y":"x"}function di(e){return e==="y"?"height":"width"}function tn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function pi(e){return ui(tn(e))}function Na(e,t,r){r===void 0&&(r=!1);let n=Ke(e),i=pi(e),o=di(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=li(s)),[s,li(s)]}function Da(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function li(e){let t=dr(e);return Mc[t]+e.slice(t.length)}function Ic(e){var t,r,n,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function ka(e){return typeof e!="number"?Ic(e):{top:e,right:e,bottom:e,left:e}}function st(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Ma(e,t,r){let{reference:n,floating:i}=e,o=tn(t),s=pi(t),a=di(s),l=dr(t),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,f;switch(l){case"top":f={x:u,y:n.y-i.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:d};break;case"left":f={x:n.x-i.width,y:d};break;default:f={x:n.x,y:n.y}}let h=Ke(t);return h&&(f[s]+=p*(h==="end"?1:-1)*(r&&c?-1:1)),f}async function Ia(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=en(t,e),h=ka(f),b=a[p?d==="floating"?"reference":"floating":d],x=st(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),A=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(S))&&await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1},H=st(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:S,strategy:l}):A);return{top:(x.top-H.top+h.top)/O.y,bottom:(H.bottom-x.bottom+h.bottom)/O.y,left:(x.left-H.left+h.left)/O.x,right:(H.right-x.right+h.right)/O.x}}var Uc=50,Ua=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ia},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ma(c,n,l),p=n,f=0,h={};for(let m=0;m<o.length;m++){let b=o[m];if(!b)continue;let{name:x,fn:A}=b,{x:S,y:O,data:H,reset:I}=await A({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=S??u,d=O??d,h[x]={...h[x],...H},I&&f<Uc&&(f++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:u,y:d}=Ma(c,p,l)),m=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:h}};function $c(e,t,r){return(e?[...r.filter(i=>Ke(i)===e),...r.filter(i=>Ke(i)!==e)]:r.filter(i=>dr(i)===i)).filter(i=>e?Ke(i)===e||(t?Da(i)!==i:!1):!0)}var $a=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=ci,autoAlignment:f=!0,...h}=en(e,t),m=d!==void 0||p===ci?$c(d||null,f,p):p,b=((r=s.autoPlacement)==null?void 0:r.index)||0,x=m[b];if(x==null)return{};if(a!==x)return{reset:{placement:m[0]}};let A=await l.detectOverflow(t,h),S=Na(x,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),O=[A[dr(x)],A[S[0]],A[S[1]]],H=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:x,overflows:O}],I=m[b+1];if(I)return{data:{index:b+1,overflows:H},reset:{placement:I}};let De=H.map(J=>{let ie=Ke(J.placement);return[J.placement,ie&&u?J.overflows.slice(0,2).reduce((Z,Ge)=>Z+Ge,0):J.overflows[0],J.overflows]}).sort((J,ie)=>J[1]-ie[1]),ke=((i=De.filter(J=>J[2].slice(0,Ke(J[0])?2:3).every(ie=>ie<=0))[0])==null?void 0:i[0])||De[0][0];return ke!==a?{data:{index:b+1,overflows:H},reset:{placement:ke}}:{}}}};var Ba=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:A=>{let{x:S,y:O}=A;return{x:S,y:O}}},...c}=en(e,t),u={x:r,y:n},d=await o.detectOverflow(t,c),p=tn(i),f=ui(p),h=u[f],m=u[p],b=(A,S)=>Pa(S+d[A==="y"?"top":"left"],S,S-d[A==="y"?"bottom":"right"]);s&&(h=b(f,h)),a&&(m=b(p,m));let x=l.fn({...t,[f]:h,[p]:m});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[f]:s,[p]:a}}}}}};function nn(){return typeof window<"u"}function lt(e){return ja(e)?(e.nodeName||"").toLowerCase():"#document"}function X(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(ja(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ja(e){return nn()?e instanceof Node||e instanceof X(e).Node:!1}function ue(e){return nn()?e instanceof Element||e instanceof X(e).Element:!1}function Te(e){return nn()?e instanceof HTMLElement||e instanceof X(e).HTMLElement:!1}function Ha(e){return!nn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof X(e).ShadowRoot}function Ut(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=de(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Fa(e){return/^(table|td|th)$/.test(lt(e))}function pr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Bc=/transform|translate|scale|rotate|perspective|filter/,Hc=/paint|layout|strict|content/,at=e=>!!e&&e!=="none",fi;function $t(e){let t=ue(e)?de(e):e;return at(t.transform)||at(t.translate)||at(t.scale)||at(t.rotate)||at(t.perspective)||!on()&&(at(t.backdropFilter)||at(t.filter))||Bc.test(t.willChange||"")||Hc.test(t.contain||"")}function Va(e){let t=Ne(e);for(;Te(t)&&!ct(t);){if($t(t))return t;if(pr(t))return null;t=Ne(t)}return null}function on(){return fi==null&&(fi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fi}function ct(e){return/^(html|body|#document)$/.test(lt(e))}function de(e){return X(e).getComputedStyle(e)}function fr(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ne(e){if(lt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ha(e)&&e.host||we(e);return Ha(t)?t.host:t}function Wa(e){let t=Ne(e);return ct(t)?(e.ownerDocument||e).body:Te(t)&&Ut(t)?t:Wa(t)}function rn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Wa(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=X(i);if(o){let a=sn(s);return t.concat(s,s.visualViewport||[],Ut(i)?i:[],a&&r?rn(a):[])}else return t.concat(i,rn(i,[],r))}function sn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qa(e){let t=de(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Te(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=ur(r)!==o||ur(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function Ya(e){return ue(e)?e:e.contextElement}function Bt(e){let t=Ya(e);if(!Te(t))return be(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=qa(t),s=(o?ur(r.width):r.width)/n,a=(o?ur(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var jc=be(0);function Xa(e){let t=X(e);return!on()||!t.visualViewport?jc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==X(e)?!1:t}function hr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Ya(e),s=be(1);t&&(n?ue(n)&&(s=Bt(n)):s=Bt(e));let a=Fc(o,r,n)?Xa(o):be(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){let p=X(o),f=n&&ue(n)?X(n):n,h=p,m=sn(h);for(;m&&n&&f!==h;){let b=Bt(m),x=m.getBoundingClientRect(),A=de(m),S=x.left+(m.clientLeft+parseFloat(A.paddingLeft))*b.x,O=x.top+(m.clientTop+parseFloat(A.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=S,c+=O,h=X(m),m=sn(h)}}return st({width:u,height:d,x:l,y:c})}function an(e,t){let r=fr(e).scrollLeft;return t?t.left+r:hr(we(e)).left+r}function Ja(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-an(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Vc(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",s=we(n),a=t?pr(t.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=be(1),u=be(0),d=Te(n);if((d||!d&&!o)&&((lt(n)!=="body"||Ut(s))&&(l=fr(n)),d)){let f=hr(n);c=Bt(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}let p=s&&!d&&!o?Ja(s,l):be(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Wc(e){return Array.from(e.getClientRects())}function Kc(e){let t=we(e),r=fr(e),n=e.ownerDocument.body,i=We(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=We(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+an(e),a=-r.scrollTop;return de(n).direction==="rtl"&&(s+=We(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}var Ka=25;function zc(e,t){let r=X(e),n=we(e),i=r.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let u=on();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}let c=an(n);if(c<=0){let u=n.ownerDocument,d=u.body,p=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,h=Math.abs(n.clientWidth-d.clientWidth-f);h<=Ka&&(o-=h)}else c<=Ka&&(o+=c);return{width:o,height:s,x:a,y:l}}function Gc(e,t){let r=hr(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Te(e)?Bt(e):be(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function za(e,t,r){let n;if(t==="viewport")n=zc(e,r);else if(t==="document")n=Kc(we(e));else if(ue(t))n=Gc(t,r);else{let i=Xa(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return st(n)}function Za(e,t){let r=Ne(e);return r===t||!ue(r)||ct(r)?!1:de(r).position==="fixed"||Za(r,t)}function qc(e,t){let r=t.get(e);if(r)return r;let n=rn(e,[],!1).filter(a=>ue(a)&&lt(a)!=="body"),i=null,o=de(e).position==="fixed",s=o?Ne(e):e;for(;ue(s)&&!ct(s);){let a=de(s),l=$t(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ut(s)&&!l&&Za(e,s))?n=n.filter(u=>u!==s):i=a,s=Ne(s)}return t.set(e,n),n}function Yc(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[...r==="clippingAncestors"?pr(t)?[]:qc(t,this._c):[].concat(r),n],a=za(t,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let f=za(t,s[p],i);l=We(f.top,l),c=cr(f.right,c),u=cr(f.bottom,u),d=We(f.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Xc(e){let{width:t,height:r}=qa(e);return{width:t,height:r}}function Jc(e,t,r){let n=Te(t),i=we(t),o=r==="fixed",s=hr(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=be(0);function c(){l.x=an(i)}if(n||!n&&!o)if((lt(t)!=="body"||Ut(i))&&(a=fr(t)),n){let f=hr(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&c();o&&!n&&i&&c();let u=i&&!n&&!o?Ja(i,a):be(0),d=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:s.width,height:s.height}}function hi(e){return de(e).position==="static"}function Ga(e,t){if(!Te(e)||de(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return we(e)===r&&(r=r.ownerDocument.body),r}function Qa(e,t){let r=X(e);if(pr(e))return r;if(!Te(e)){let i=Ne(e);for(;i&&!ct(i);){if(ue(i)&&!hi(i))return i;i=Ne(i)}return r}let n=Ga(e,t);for(;n&&Fa(n)&&hi(n);)n=Ga(n,t);return n&&ct(n)&&hi(n)&&!$t(n)?r:n||Va(e)||r}var Zc=async function(e){let t=this.getOffsetParent||Qa,r=this.getDimensions,n=await r(e.floating);return{reference:Jc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Qc(e){return de(e).direction==="rtl"}var ln={convertOffsetParentRelativeRectToViewportRelativeRect:Vc,getDocumentElement:we,getClippingRect:Yc,getOffsetParent:Qa,getElementRects:Zc,getClientRects:Wc,getDimensions:Xc,getScale:Bt,isElement:ue,isRTL:Qc};var el=$a,tl=Ba;var rl=(e,t,r)=>{let n=new Map,i={platform:ln,...r},o={...i.platform,_c:n};return Ua(e,t,{...i,platform:o})};function nl(e){return eu(e)}function mi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function eu(e){for(let t=e;t;t=mi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=mi(e);t;t=mi(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||$t(r)||t.tagName==="BODY"))return t}return null}async function il(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},rl(e,t,{strategy:n.strategy,platform:{...ln,getOffsetParent:i=>ln.getOffsetParent(i,nl)},middleware:[tl({crossAxis:!0}),el({allowedPlacements:[n.placement]})]})}var ol=g(T());var yi=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?Mt.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},tu=new yi;var sl=(e,t)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:ol.hasChanged,converter:Mt,...t}),r[ir]=(i=r[ir])!==null&&i!==void 0?i:new Map,r[ir].set(n,e??{})};var xe=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},F=class extends qr{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new pe.Debouncer,this.revealDebouncer=new pe.Debouncer,this.onTouch=t=>{this.isIgnored(t)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=t=>{this.isIgnored(t)?this.matchesIgnored(t)&&this.hide():this.show()},this.onFocusIn=t=>{!this.isIgnored(t)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var t,r;return al.html`
322
322
  <div part="container"
323
323
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
324
324
  <slot part="slot"></slot>
@@ -333,7 +333,7 @@
333
333
  </div>
334
334
  </div>
335
335
  </div>
336
- `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let n=this.manual;this.manual=!0;let i=this.text;this.text={message:t},await this.show(r),this.text=i,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&il(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${pe.designSystemVariables.transitionDuration}, left ${pe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||(0,pe.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}};F.elementDefinitions={"ft-typography":ee};F.styles=_a;xe([sl()],F.prototype,"text",void 0);xe([(0,fe.property)({type:Boolean})],F.prototype,"manual",void 0);xe([(0,fe.property)({type:Boolean})],F.prototype,"inline",void 0);xe([(0,pe.numberProperty)()],F.prototype,"delay",void 0);xe([(0,fe.property)()],F.prototype,"position",void 0);xe([(0,pe.jsonProperty)([])],F.prototype,"ignoreMatchingElements",void 0);xe([(0,fe.queryAssignedNodes)()],F.prototype,"slotNodes",void 0);xe([(0,fe.query)(".ft-tooltip--container")],F.prototype,"container",void 0);xe([(0,fe.query)(".ft-tooltip")],F.prototype,"tooltip",void 0);xe([(0,fe.query)(".ft-tooltip--content")],F.prototype,"tooltipContent",void 0);xe([(0,fe.state)()],F.prototype,"visible",void 0);var cl=g(T());var ll={"ft-tooltip":F};(0,cl.customElements)(ll);var ul=g(j()),mr=g(T()),ut={color:mr.FtCssVariableFactory.extend("--ft-loader-color","",mr.designSystemVariables.colorPrimary),size:mr.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},dl=ul.css`
336
+ `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let n=this.manual;this.manual=!0;let i=this.text;this.text={message:t},await this.show(r),this.text=i,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&il(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${pe.designSystemVariables.transitionDuration}, left ${pe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(t){return(0,pe.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(t){return this.manual||this.matchesIgnored(t)}};F.elementDefinitions={"ft-typography":ee};F.styles=_a;xe([sl()],F.prototype,"text",void 0);xe([(0,fe.property)({type:Boolean})],F.prototype,"manual",void 0);xe([(0,fe.property)({type:Boolean})],F.prototype,"inline",void 0);xe([(0,pe.numberProperty)()],F.prototype,"delay",void 0);xe([(0,fe.property)()],F.prototype,"position",void 0);xe([(0,pe.jsonProperty)([])],F.prototype,"ignoreMatchingElements",void 0);xe([(0,fe.queryAssignedNodes)()],F.prototype,"slotNodes",void 0);xe([(0,fe.query)(".ft-tooltip--container")],F.prototype,"container",void 0);xe([(0,fe.query)(".ft-tooltip")],F.prototype,"tooltip",void 0);xe([(0,fe.query)(".ft-tooltip--content")],F.prototype,"tooltipContent",void 0);xe([(0,fe.state)()],F.prototype,"visible",void 0);var cl=g(T());var ll={"ft-tooltip":F};(0,cl.customElements)(ll);var ul=g(j()),mr=g(T()),ut={color:mr.FtCssVariableFactory.extend("--ft-loader-color","",mr.designSystemVariables.colorPrimary),size:mr.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},dl=ul.css`
337
337
  :host {
338
338
  line-height: 0;
339
339
  }