@fluid-topics/ft-reader-saved-bookmarks 2.2.51 → 2.2.52
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.
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
position: relative;
|
|
368
368
|
word-break: break-word;
|
|
369
369
|
}
|
|
370
|
-
`;var Ma=["top","right","bottom","left"],Pa=["start","end"],ui=Ma.reduce((e,t)=>e.concat(t,t+"-"+Pa[0],t+"-"+Pa[1]),[]),Zt=Math.min,Le=Math.max,er=Math.round;var ye=e=>({x:e,y:e}),kl={left:"right",right:"left",bottom:"top",top:"bottom"};function Ia(e,t,r){return Le(e,Zt(t,r))}function sn(e,t){return typeof e=="function"?e(t):e}function tr(e){return e.split("-")[0]}function ke(e){return e.split("-")[1]}function di(e){return e==="x"?"y":"x"}function pi(e){return e==="y"?"height":"width"}function on(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function fi(e){return di(on(e))}function Ua(e,t,r){r===void 0&&(r=!1);let n=ke(e),i=fi(e),s=pi(i),o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=li(o)),[o,li(o)]}function $a(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function li(e){let t=tr(e);return kl[t]+e.slice(t.length)}function Dl(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 Ba(e){return typeof e!="number"?Dl(e):{top:e,right:e,bottom:e,left:e}}function nt(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 Ha(e,t,r){let{reference:n,floating:i}=e,s=on(t),o=fi(t),a=pi(o),c=tr(t),l=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,m;switch(c){case"top":m={x:d,y:n.y-i.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-i.width,y:u};break;default:m={x:n.x,y:n.y}}let v=ke(t);return v&&(m[o]+=p*(v==="end"?1:-1)*(r&&l?-1:1)),m}async function Fa(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:m=0}=sn(t,e),v=Ba(m),x=a[p?u==="floating"?"reference":"floating":u],_=nt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(x)))==null||r?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},T=nt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:E,strategy:c}):w);return{top:(_.top-T.top+v.top)/b.y,bottom:(T.bottom-_.bottom+v.bottom)/b.y,left:(_.left-T.left+v.left)/b.x,right:(T.right-_.right+v.right)/b.x}}var Pl=50,Va=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:Fa},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Ha(l,n,c),p=n,m=0,v={};for(let S=0;S<s.length;S++){let x=s[S];if(!x)continue;let{name:_,fn:w}=x,{x:E,y:b,data:T,reset:k}=await w({x:d,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});d=E??d,u=b??u,v[_]={...v[_],...T},k&&m<Pl&&(m++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(l=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:d,y:u}=Ha(l,p,c)),S=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:v}};function Ml(e,t,r){return(e?[...r.filter(i=>ke(i)===e),...r.filter(i=>ke(i)!==e)]:r.filter(i=>tr(i)===i)).filter(i=>e?ke(i)===e||(t?$a(i)!==i:!1):!0)}var ja=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:s,middlewareData:o,placement:a,platform:c,elements:l}=t,{crossAxis:d=!1,alignment:u,allowedPlacements:p=ui,autoAlignment:m=!0,...v}=sn(e,t),S=u!==void 0||p===ui?Ml(u||null,m,p):p,x=((r=o.autoPlacement)==null?void 0:r.index)||0,_=S[x];if(_==null)return{};if(a!==_)return{reset:{placement:S[0]}};let w=await c.detectOverflow(t,v),E=Ua(_,s,await(c.isRTL==null?void 0:c.isRTL(l.floating))),b=[w[tr(_)],w[E[0]],w[E[1]]],T=[...((n=o.autoPlacement)==null?void 0:n.overflows)||[],{placement:_,overflows:b}],k=S[x+1];if(k)return{data:{index:x+1,overflows:T},reset:{placement:k}};let q=T.map(Z=>{let Ot=ke(Z.placement);return[Z.placement,Ot&&d?Z.overflows.slice(0,2).reduce((xc,vc)=>xc+vc,0):Z.overflows[0],Z.overflows]}).sort((Z,Ot)=>Z[1]-Ot[1]),or=((i=q.filter(Z=>Z[2].slice(0,ke(Z[0])?2:3).every(Ot=>Ot<=0))[0])==null?void 0:i[0])||q[0][0];return or!==a?{data:{index:x+1,overflows:T},reset:{placement:or}}:{}}}};var za=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:E,y:b}=w;return{x:E,y:b}}},...l}=sn(e,t),d={x:r,y:n},u=await s.detectOverflow(t,l),p=on(i),m=di(p),v=d[m],S=d[p],x=(w,E)=>Ia(E+u[w==="y"?"top":"left"],E,E-u[w==="y"?"bottom":"right"]);o&&(v=x(m,v)),a&&(S=x(p,S));let _=c.fn({...t,[m]:v,[p]:S});return{..._,data:{x:_.x-r,y:_.y-n,enabled:{[m]:o,[p]:a}}}}}};function cn(){return typeof window<"u"}function st(e){return Wa(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Se(e){var t;return(t=(Wa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wa(e){return cn()?e instanceof Node||e instanceof W(e).Node:!1}function le(e){return cn()?e instanceof Element||e instanceof W(e).Element:!1}function _e(e){return cn()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function Ka(e){return!cn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function rr(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Ga(e){return/^(table|td|th)$/.test(st(e))}function nr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Il=/transform|translate|scale|rotate|perspective|filter/,Ul=/paint|layout|strict|content/,it=e=>!!e&&e!=="none",hi;function _t(e){let t=le(e)?ue(e):e;return it(t.transform)||it(t.translate)||it(t.scale)||it(t.rotate)||it(t.perspective)||!ln()&&(it(t.backdropFilter)||it(t.filter))||Il.test(t.willChange||"")||Ul.test(t.contain||"")}function qa(e){let t=De(e);for(;_e(t)&&!Ct(t);){if(_t(t))return t;if(nr(t))return null;t=De(t)}return null}function ln(){return hi==null&&(hi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hi}function Ct(e){return/^(html|body|#document)$/.test(st(e))}function ue(e){return W(e).getComputedStyle(e)}function ir(e){return le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function De(e){if(st(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ka(e)&&e.host||Se(e);return Ka(t)?t.host:t}function Ya(e){let t=De(e);return Ct(t)?(e.ownerDocument||e).body:_e(t)&&rr(t)?t:Ya(t)}function an(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ya(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=W(i);if(s){let a=un(o);return t.concat(o,o.visualViewport||[],rr(i)?i:[],a&&r?an(a):[])}else return t.concat(i,an(i,[],r))}function un(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qa(e){let t=ue(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=_e(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=er(r)!==s||er(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Za(e){return le(e)?e:e.contextElement}function wt(e){let t=Za(e);if(!_e(t))return ye(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Qa(t),o=(s?er(r.width):r.width)/n,a=(s?er(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var $l=ye(0);function ec(e){let t=W(e);return!ln()||!t.visualViewport?$l:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bl(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===W(e)}function sr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),s=Za(e),o=ye(1);t&&(n?le(n)&&(o=wt(n)):o=wt(e));let a=Bl(s,r,n)?ec(s):ye(0),c=(i.left+a.x)/o.x,l=(i.top+a.y)/o.y,d=i.width/o.x,u=i.height/o.y;if(s&&n){let p=W(s),m=le(n)?W(n):n,v=p,S=un(v);for(;S&&m!==v;){let x=wt(S),_=S.getBoundingClientRect(),w=ue(S),E=_.left+(S.clientLeft+parseFloat(w.paddingLeft))*x.x,b=_.top+(S.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,l*=x.y,d*=x.x,u*=x.y,c+=E,l+=b,v=W(S),S=un(v)}}return nt({width:d,height:u,x:c,y:l})}function dn(e,t){let r=ir(e).scrollLeft;return t?t.left+r:sr(Se(e)).left+r}function tc(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-dn(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Hl(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,s=i==="fixed",o=Se(n),a=t?nr(t.floating):!1;if(n===o||a&&s)return r;let c={scrollLeft:0,scrollTop:0},l=ye(1),d=ye(0),u=_e(n);if((u||!s)&&((st(n)!=="body"||rr(o))&&(c=ir(n)),u)){let m=sr(n);l=wt(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let p=o&&!u&&!s?tc(o,c):ye(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:r.y*l.y-c.scrollTop*l.y+d.y+p.y}}function Fl(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Vl(e){let t=ir(e),r=e.ownerDocument.body,n=Le(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=Le(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),s=-t.scrollLeft+dn(e),o=-t.scrollTop;return ue(r).direction==="rtl"&&(s+=Le(e.clientWidth,r.clientWidth)-n),{width:n,height:i,x:s,y:o}}var jl=25;function zl(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",i=W(e),s=Se(e),o=i.visualViewport,a=s.clientWidth,c=s.clientHeight,l=0,d=0;if(o){let p=!ln()||t==="fixed";n?p||(l=-o.offsetLeft,d=-o.offsetTop):(a=o.width,c=o.height,p&&(l=o.offsetLeft,d=o.offsetTop))}if(dn(s)<=0){let p=s.ownerDocument,m=p.body,v=getComputedStyle(m),S=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(s.clientWidth-m.clientWidth-S),_=getComputedStyle(s).scrollbarGutter==="stable both-edges"?x/2:x;_<=jl&&(a-=_)}return{width:a,height:c,x:l,y:d}}function Kl(e,t){let r=sr(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=wt(e),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,l=n*s.y;return{width:o,height:a,x:c,y:l}}function Xa(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=zl(e,r,t);else if(t==="document")n=Vl(Se(e));else if(le(t))n=Kl(t,r);else{let i=ec(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nt(n)}function Wl(e,t){let r=t.get(e);if(r)return r;let n=an(e,[],!1).filter(a=>le(a)&&st(a)!=="body"),i=null,s=ue(e).position==="fixed",o=s?De(e):e;for(;le(o)&&!Ct(o);){let a=ue(o),c=_t(o),l=i?i.position:s?"fixed":"";!c&&(l==="fixed"||l==="absolute"&&a.position==="static")?n=n.filter(u=>u!==o):i=a,o=De(o)}return t.set(e,n),n}function Gl(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,o=[...r==="clippingAncestors"?nr(t)?[]:Wl(t,this._c):[].concat(r),n],a=Xa(t,o[0],i),c=a.top,l=a.right,d=a.bottom,u=a.left;for(let p=1;p<o.length;p++){let m=Xa(t,o[p],i);c=Le(m.top,c),l=Zt(m.right,l),d=Zt(m.bottom,d),u=Le(m.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function ql(e){let{width:t,height:r}=Qa(e);return{width:t,height:r}}function Yl(e,t,r){let n=_e(t),i=Se(t),s=r==="fixed",o=sr(e,!0,s,t),a={scrollLeft:0,scrollTop:0},c=ye(0);if((n||!s)&&((st(t)!=="body"||rr(i))&&(a=ir(t)),n)){let p=sr(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}!n&&i&&(c.x=dn(i));let l=i&&!n&&!s?tc(i,a):ye(0),d=o.left+a.scrollLeft-c.x-l.x,u=o.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:o.width,height:o.height}}function mi(e){return ue(e).position==="static"}function Ja(e,t){if(!_e(e)||ue(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Se(e)===r&&(r=r.ownerDocument.body),r}function rc(e,t){let r=W(e);if(nr(e))return r;if(!_e(e)){let i=De(e);for(;i&&!Ct(i);){if(le(i)&&!mi(i))return i;i=De(i)}return r}let n=Ja(e,t);for(;n&&Ga(n)&&mi(n);)n=Ja(n,t);return n&&Ct(n)&&mi(n)&&!_t(n)?r:n||qa(e)||r}var Xl=async function(e){let t=this.getOffsetParent||rc,r=this.getDimensions,n=await r(e.floating);return{reference:Yl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Jl(e){return ue(e).direction==="rtl"}var pn={convertOffsetParentRelativeRectToViewportRelativeRect:Hl,getDocumentElement:Se,getClippingRect:Gl,getOffsetParent:rc,getElementRects:Xl,getClientRects:Fl,getDimensions:ql,getScale:wt,isElement:le,isRTL:Jl};var nc=ja,ic=za;var sc=(e,t,r)=>{let n=new Map,i=r??{},s={...pn,...i.platform,_c:n};return Va(e,t,{...i,platform:s})};function oc(e){return Ql(e)}function yi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Ql(e){for(let t=e;t;t=yi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=yi(e);t;t=yi(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 ac(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},sc(e,t,{strategy:n.strategy,platform:{...pn,getOffsetParent:i=>pn.getOffsetParent(i,oc)},middleware:[ic({crossAxis:!0}),nc({allowedPlacements:[n.placement]})]})}var cc=y(C());var gi=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?vt.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Zl=new gi;var lc=(e,t)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:cc.hasChanged,converter:vt,...t}),r[Jt]=(i=r[Jt])!==null&&i!==void 0?i:new Map,r[Jt].set(n,e??{})};var de=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},D=class extends Zr{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 ie.Debouncer,this.revealDebouncer=new ie.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 uc.html`
|
|
370
|
+
`;var Ma=["top","right","bottom","left"],Pa=["start","end"],ui=Ma.reduce((e,t)=>e.concat(t,t+"-"+Pa[0],t+"-"+Pa[1]),[]),Zt=Math.min,Le=Math.max,er=Math.round;var ye=e=>({x:e,y:e}),kl={left:"right",right:"left",bottom:"top",top:"bottom"};function Ia(e,t,r){return Le(e,Zt(t,r))}function sn(e,t){return typeof e=="function"?e(t):e}function tr(e){return e.split("-")[0]}function ke(e){return e.split("-")[1]}function di(e){return e==="x"?"y":"x"}function pi(e){return e==="y"?"height":"width"}function on(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function fi(e){return di(on(e))}function Ua(e,t,r){r===void 0&&(r=!1);let n=ke(e),i=fi(e),s=pi(i),o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=li(o)),[o,li(o)]}function $a(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function li(e){let t=tr(e);return kl[t]+e.slice(t.length)}function Dl(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 Ba(e){return typeof e!="number"?Dl(e):{top:e,right:e,bottom:e,left:e}}function nt(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 Ha(e,t,r){let{reference:n,floating:i}=e,s=on(t),o=fi(t),a=pi(o),c=tr(t),l=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,m;switch(c){case"top":m={x:d,y:n.y-i.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-i.width,y:u};break;default:m={x:n.x,y:n.y}}let v=ke(t);return v&&(m[o]+=p*(v==="end"?1:-1)*(r&&l?-1:1)),m}async function Fa(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:m=0}=sn(t,e),v=Ba(m),x=a[p?u==="floating"?"reference":"floating":u],_=nt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(x)))==null||r?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},T=nt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:E,strategy:c}):w);return{top:(_.top-T.top+v.top)/b.y,bottom:(T.bottom-_.bottom+v.bottom)/b.y,left:(_.left-T.left+v.left)/b.x,right:(T.right-_.right+v.right)/b.x}}var Pl=50,Va=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:Fa},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Ha(l,n,c),p=n,m=0,v={};for(let S=0;S<s.length;S++){let x=s[S];if(!x)continue;let{name:_,fn:w}=x,{x:E,y:b,data:T,reset:k}=await w({x:d,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});d=E??d,u=b??u,v[_]={...v[_],...T},k&&m<Pl&&(m++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(l=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:d,y:u}=Ha(l,p,c)),S=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:v}};function Ml(e,t,r){return(e?[...r.filter(i=>ke(i)===e),...r.filter(i=>ke(i)!==e)]:r.filter(i=>tr(i)===i)).filter(i=>e?ke(i)===e||(t?$a(i)!==i:!1):!0)}var ja=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:s,middlewareData:o,placement:a,platform:c,elements:l}=t,{crossAxis:d=!1,alignment:u,allowedPlacements:p=ui,autoAlignment:m=!0,...v}=sn(e,t),S=u!==void 0||p===ui?Ml(u||null,m,p):p,x=((r=o.autoPlacement)==null?void 0:r.index)||0,_=S[x];if(_==null)return{};if(a!==_)return{reset:{placement:S[0]}};let w=await c.detectOverflow(t,v),E=Ua(_,s,await(c.isRTL==null?void 0:c.isRTL(l.floating))),b=[w[tr(_)],w[E[0]],w[E[1]]],T=[...((n=o.autoPlacement)==null?void 0:n.overflows)||[],{placement:_,overflows:b}],k=S[x+1];if(k)return{data:{index:x+1,overflows:T},reset:{placement:k}};let q=T.map(Z=>{let Ot=ke(Z.placement);return[Z.placement,Ot&&d?Z.overflows.slice(0,2).reduce((xc,vc)=>xc+vc,0):Z.overflows[0],Z.overflows]}).sort((Z,Ot)=>Z[1]-Ot[1]),or=((i=q.filter(Z=>Z[2].slice(0,ke(Z[0])?2:3).every(Ot=>Ot<=0))[0])==null?void 0:i[0])||q[0][0];return or!==a?{data:{index:x+1,overflows:T},reset:{placement:or}}:{}}}};var za=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:E,y:b}=w;return{x:E,y:b}}},...l}=sn(e,t),d={x:r,y:n},u=await s.detectOverflow(t,l),p=on(i),m=di(p),v=d[m],S=d[p],x=(w,E)=>Ia(E+u[w==="y"?"top":"left"],E,E-u[w==="y"?"bottom":"right"]);o&&(v=x(m,v)),a&&(S=x(p,S));let _=c.fn({...t,[m]:v,[p]:S});return{..._,data:{x:_.x-r,y:_.y-n,enabled:{[m]:o,[p]:a}}}}}};function cn(){return typeof window<"u"}function st(e){return Wa(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Se(e){var t;return(t=(Wa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wa(e){return cn()?e instanceof Node||e instanceof W(e).Node:!1}function le(e){return cn()?e instanceof Element||e instanceof W(e).Element:!1}function _e(e){return cn()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function Ka(e){return!cn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function rr(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Ga(e){return/^(table|td|th)$/.test(st(e))}function nr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Il=/transform|translate|scale|rotate|perspective|filter/,Ul=/paint|layout|strict|content/,it=e=>!!e&&e!=="none",hi;function _t(e){let t=le(e)?ue(e):e;return it(t.transform)||it(t.translate)||it(t.scale)||it(t.rotate)||it(t.perspective)||!ln()&&(it(t.backdropFilter)||it(t.filter))||Il.test(t.willChange||"")||Ul.test(t.contain||"")}function qa(e){let t=De(e);for(;_e(t)&&!Ct(t);){if(_t(t))return t;if(nr(t))return null;t=De(t)}return null}function ln(){return hi==null&&(hi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hi}function Ct(e){return/^(html|body|#document)$/.test(st(e))}function ue(e){return W(e).getComputedStyle(e)}function ir(e){return le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function De(e){if(st(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ka(e)&&e.host||Se(e);return Ka(t)?t.host:t}function Ya(e){let t=De(e);return Ct(t)?(e.ownerDocument||e).body:_e(t)&&rr(t)?t:Ya(t)}function an(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ya(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=W(i);if(s){let a=un(o);return t.concat(o,o.visualViewport||[],rr(i)?i:[],a&&r?an(a):[])}else return t.concat(i,an(i,[],r))}function un(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qa(e){let t=ue(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=_e(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=er(r)!==s||er(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Za(e){return le(e)?e:e.contextElement}function wt(e){let t=Za(e);if(!_e(t))return ye(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Qa(t),o=(s?er(r.width):r.width)/n,a=(s?er(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var $l=ye(0);function ec(e){let t=W(e);return!ln()||!t.visualViewport?$l:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bl(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===W(e)}function sr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),s=Za(e),o=ye(1);t&&(n?le(n)&&(o=wt(n)):o=wt(e));let a=Bl(s,r,n)?ec(s):ye(0),c=(i.left+a.x)/o.x,l=(i.top+a.y)/o.y,d=i.width/o.x,u=i.height/o.y;if(s&&n){let p=W(s),m=le(n)?W(n):n,v=p,S=un(v);for(;S&&m!==v;){let x=wt(S),_=S.getBoundingClientRect(),w=ue(S),E=_.left+(S.clientLeft+parseFloat(w.paddingLeft))*x.x,b=_.top+(S.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,l*=x.y,d*=x.x,u*=x.y,c+=E,l+=b,v=W(S),S=un(v)}}return nt({width:d,height:u,x:c,y:l})}function dn(e,t){let r=ir(e).scrollLeft;return t?t.left+r:sr(Se(e)).left+r}function tc(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-dn(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Hl(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,s=i==="fixed",o=Se(n),a=t?nr(t.floating):!1;if(n===o||a&&s)return r;let c={scrollLeft:0,scrollTop:0},l=ye(1),d=ye(0),u=_e(n);if((u||!s)&&((st(n)!=="body"||rr(o))&&(c=ir(n)),u)){let m=sr(n);l=wt(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let p=o&&!u&&!s?tc(o,c):ye(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:r.y*l.y-c.scrollTop*l.y+d.y+p.y}}function Fl(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Vl(e){let t=ir(e),r=e.ownerDocument.body,n=Le(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=Le(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),s=-t.scrollLeft+dn(e),o=-t.scrollTop;return ue(r).direction==="rtl"&&(s+=Le(e.clientWidth,r.clientWidth)-n),{width:n,height:i,x:s,y:o}}var jl=25;function zl(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",i=W(e),s=Se(e),o=i.visualViewport,a=s.clientWidth,c=s.clientHeight,l=0,d=0;if(o){let p=!ln()||t==="fixed";n?p||(l=-o.offsetLeft,d=-o.offsetTop):(a=o.width,c=o.height,p&&(l=o.offsetLeft,d=o.offsetTop))}if(dn(s)<=0){let p=s.ownerDocument,m=p.body,v=getComputedStyle(m),S=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(s.clientWidth-m.clientWidth-S),_=getComputedStyle(s).scrollbarGutter==="stable both-edges"?x/2:x;_<=jl&&(a-=_)}return{width:a,height:c,x:l,y:d}}function Kl(e,t){let r=sr(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=wt(e),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,l=n*s.y;return{width:o,height:a,x:c,y:l}}function Xa(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=zl(e,r,t);else if(t==="document")n=Vl(Se(e));else if(le(t))n=Kl(t,r);else{let i=ec(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nt(n)}function Wl(e,t){let r=t.get(e);if(r)return r;let n=an(e,[],!1).filter(a=>le(a)&&st(a)!=="body"),i=null,s=ue(e).position==="fixed",o=s?De(e):e;for(;le(o)&&!Ct(o);){let a=ue(o),c=_t(o),l=i?i.position:s?"fixed":"";!c&&(l==="fixed"||l==="absolute"&&a.position==="static")?n=n.filter(u=>u!==o):i=a,o=De(o)}return t.set(e,n),n}function Gl(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,o=[...r==="clippingAncestors"?nr(t)?[]:Wl(t,this._c):[].concat(r),n],a=Xa(t,o[0],i),c=a.top,l=a.right,d=a.bottom,u=a.left;for(let p=1;p<o.length;p++){let m=Xa(t,o[p],i);c=Le(m.top,c),l=Zt(m.right,l),d=Zt(m.bottom,d),u=Le(m.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function ql(e){let{width:t,height:r}=Qa(e);return{width:t,height:r}}function Yl(e,t,r){let n=_e(t),i=Se(t),s=r==="fixed",o=sr(e,!0,s,t),a={scrollLeft:0,scrollTop:0},c=ye(0);if((n||!s)&&((st(t)!=="body"||rr(i))&&(a=ir(t)),n)){let p=sr(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}!n&&i&&(c.x=dn(i));let l=i&&!n&&!s?tc(i,a):ye(0),d=o.left+a.scrollLeft-c.x-l.x,u=o.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:o.width,height:o.height}}function mi(e){return ue(e).position==="static"}function Ja(e,t){if(!_e(e)||ue(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Se(e)===r&&(r=r.ownerDocument.body),r}function rc(e,t){let r=W(e);if(nr(e))return r;if(!_e(e)){let i=De(e);for(;i&&!Ct(i);){if(le(i)&&!mi(i))return i;i=De(i)}return r}let n=Ja(e,t);for(;n&&Ga(n)&&mi(n);)n=Ja(n,t);return n&&Ct(n)&&mi(n)&&!_t(n)?r:n||qa(e)||r}var Xl=async function(e){let t=this.getOffsetParent||rc,r=this.getDimensions,n=await r(e.floating);return{reference:Yl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Jl(e){return ue(e).direction==="rtl"}var pn={convertOffsetParentRelativeRectToViewportRelativeRect:Hl,getDocumentElement:Se,getClippingRect:Gl,getOffsetParent:rc,getElementRects:Xl,getClientRects:Fl,getDimensions:ql,getScale:wt,isElement:le,isRTL:Jl};var nc=ja,ic=za;var sc=(e,t,r)=>{let n=new Map,i=r??{},s={...pn,...i.platform,_c:n};return Va(e,t,{...i,platform:s})};function oc(e){return Ql(e)}function yi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Ql(e){for(let t=e;t;t=yi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=yi(e);t;t=yi(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 ac(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},sc(e,t,{strategy:n.strategy,platform:{...pn,getOffsetParent:i=>n.strategy==="fixed"?window:pn.getOffsetParent(i,oc)},middleware:[ic({crossAxis:!0,boundary:n.strategy==="fixed"?[]:"clippingAncestors"}),nc({allowedPlacements:[n.placement]})]})}var cc=y(C());var gi=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?vt.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Zl=new gi;var lc=(e,t)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:cc.hasChanged,converter:vt,...t}),r[Jt]=(i=r[Jt])!==null&&i!==void 0?i:new Map,r[Jt].set(n,e??{})};var de=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},D=class extends Zr{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 ie.Debouncer,this.revealDebouncer=new ie.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 uc.html`
|
|
371
371
|
<div part="container"
|
|
372
372
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
|
|
373
373
|
<slot part="slot"></slot>
|