@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
4 lines • 17.6 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import{E as t}from"./common-7RW_NFNf.js";const n=Math.min,e=Math.max,o=Math.round,i=Math.floor,r=t=>({x:t,y:t}),s={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function l(t,o,i){return e(t,n(o,i))}function f(t,e){return"function"==typeof t?t(e):t}function a(t){return t.split("-")[0]}function u(t){return t.split("-")[1]}function d(t){return"x"===t?"y":"x"}function m(t){return"y"===t?"height":"width"}const p=new Set(["top","bottom"]);function y(t){return p.has(a(t))?"y":"x"}function h(t){return d(y(t))}function w(t,e,n){void 0===n&&(n=!1);const o=u(t),i=h(t),r=m(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=O(l)),[l,O(l)]}function x(t){const e=O(t);return[g(t),e,g(e)]}function g(t){return t.replace(/start|end/g,(t=>c[t]))}const v=["left","right"],b=["right","left"],A=["top","bottom"],S=["bottom","top"];function R(t,e,n){switch(t){case"top":case"bottom":return n?e?b:v:e?v:b;case"left":case"right":return e?A:S;default:return[]}}function k(t,e,n,o){const i=u(t);let r=R(a(t),"start"===n,o);return i&&(r=r.map((t=>t+"-"+i)),e&&(r=r.concat(r.map(g)))),r}function O(t){return t.replace(/left|right|bottom|top/g,(t=>s[t]))}function F(t){return{top:0,right:0,bottom:0,left:0,...t}}function $(t){return"number"!=typeof t?F(t):{top:t,right:t,bottom:t,left:t}}function D(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}}function E(t,e,n){let{reference:o,floating:i}=t;const r=y(e),l=h(e),c=m(l),s=a(e),f="y"===r,d=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,g=o[c]/2-i[c]/2;let w;switch(s){case"top":w={x:d,y:o.y-i.height};break;case"bottom":w={x:d,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y:p};break;case"left":w={x:o.x-i.width,y:p};break;default:w={x:o.x,y:o.y}}switch(u(e)){case"start":w[l]-=g*(n&&f?-1:1);break;case"end":w[l]+=g*(n&&f?-1:1)}return w}const T=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,c=r.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(e));let a=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=E(a,o,s),d=o,h={},m=0;for(let n=0;n<c.length;n++){const{name:r,fn:p}=c[n],{x:g,y:y,data:w,reset:x}=await p({x:f,y:u,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:a,platform:l,elements:{reference:t,floating:e}});f=null!=g?g:f,u=null!=y?y:u,h={...h,[r]:{...h[r],...w}},x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(a=!0===x.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):x.rects),({x:f,y:u}=E(a,d,s))),n=-1)}return{x:f,y:u,placement:d,strategy:i,middlewareData:h}};async function P(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:l,elements:c,strategy:s}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=f(e,t),p=$(m),g=c[h?"floating"===d?"reference":"floating":d],y=D(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(g)))||n?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:s})),w="floating"===d?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(c.floating)),v=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},b=D(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:s}):w);return{top:(y.top-b.top+p.top)/v.y,bottom:(b.bottom-y.bottom+p.bottom)/v.y,left:(y.left-b.left+p.left)/v.x,right:(b.right-y.right+p.right)/v.x}}const M=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:c,platform:s,elements:a,middlewareData:d}=e,{element:p,padding:g=0}=f(t,e)||{};if(null==p)return{};const y=$(g),w={x:o,y:i},x=h(r),v=m(x),b=await s.getDimensions(p),R="y"===x,E=R?"top":"left",T=R?"bottom":"right",L=R?"clientHeight":"clientWidth",O=c.reference[v]+c.reference[x]-w[x]-c.floating[v],A=w[x]-c.reference[x],D=await(null==s.getOffsetParent?void 0:s.getOffsetParent(p));let H=D?D[L]:0;H&&await(null==s.isElement?void 0:s.isElement(D))||(H=a.floating[L]||c.floating[v]);const S=O/2-A/2,P=H/2-b[v]/2-1,V=n(y[E],P),C=n(y[T],P),F=V,W=H-b[v]-C,q=H/2-b[v]/2+S,k=l(F,q,W),_=!d.arrow&&null!=u(r)&&q!==k&&c.reference[v]/2-(q<F?V:C)-b[v]/2<0,N=_?q<F?q-F:q-W:0;return{[x]:w[x]+N,data:{[x]:k,centerOffset:q-k-N,..._&&{alignmentOffset:N}},reset:_}}}),j=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:c,platform:s,elements:u}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=f(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const R=a(i),E=y(c),T=a(c)===c,L=await(null==s.isRTL?void 0:s.isRTL(u.floating)),A=m||(T||!v?[O(c)]:x(c)),D="none"!==g;!m&&D&&A.push(...k(c,v,g,L));const H=[c,...A],S=await P(e,b),V=[];let C=(null==(o=r.flip)?void 0:o.overflows)||[];if(d&&V.push(S[R]),h){const t=w(i,l,L);V.push(S[t[0]],S[t[1]])}if(C=[...C,{placement:i,overflows:V}],!V.every((t=>t<=0))){var F,W;const t=((null==(F=r.flip)?void 0:F.index)||0)+1,e=H[t];if(e){if(!("alignment"===h&&E!==y(e))||C.every((t=>t.overflows[0]>0&&y(t.placement)===E)))return{data:{index:t,overflows:C},reset:{placement:e}}}let n=null==(W=C.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:W.placement;if(!n)switch(p){case"bestFit":{var q;const t=null==(q=C.filter((t=>{if(D){const e=y(t.placement);return e===E||"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:q[0];t&&(n=t);break}case"initialPlacement":n=c}if(i!==n)return{reset:{placement:n}}}return{}}}},z=new Set(["left","top"]);async function C(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),l=a(n),c=u(n),s="y"===y(n),d=z.has(l)?-1:1,h=r&&s?-1:1,m=f(e,t);let{mainAxis:p,crossAxis:g,alignmentAxis:w}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&"number"==typeof w&&(g="end"===c?-1*w:w),s?{x:g*h,y:p*d}:{x:p*d,y:g*h}}const L=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:c}=e,s=await C(e,t);return l===(null==(n=c.offset)?void 0:n.placement)&&null!=(o=c.arrow)&&o.alignmentOffset?{}:{x:i+s.x,y:r+s.y,data:{...s,placement:l}}}}},B=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:s={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...u}=f(t,e),h={x:n,y:o},m=await P(e,u),p=y(a(i)),g=d(p);let w=h[g],x=h[p];if(r){const t="y"===g?"bottom":"right";w=l(w+m["y"===g?"top":"left"],w,w-m[t])}if(c){const t="y"===p?"bottom":"right";x=l(x+m["y"===p?"top":"left"],x,x-m[t])}const v=s.fn({...e,[g]:w,[p]:x});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[g]:r,[p]:c}}}}}};function N(){return"undefined"!=typeof window}function I(t){return W(t)?(t.nodeName||"").toLowerCase():"#document"}function q(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function H(t){var e;return null==(e=(W(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function W(t){return!!N()&&(t instanceof Node||t instanceof q(t).Node)}function _(t){return!!N()&&(t instanceof Element||t instanceof q(t).Element)}function V(t){return!!N()&&(t instanceof HTMLElement||t instanceof q(t).HTMLElement)}function X(t){return!(!N()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof q(t).ShadowRoot)}const Y=new Set(["inline","contents"]);function G(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=ct(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Y.has(i)}const J=new Set(["table","td","th"]);function K(t){return J.has(I(t))}const Q=[":popover-open",":modal"];function U(t){return Q.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const Z=["transform","translate","scale","rotate","perspective"],tt=["transform","translate","scale","rotate","perspective","filter"],nt=["paint","layout","strict","content"];function et(t){const e=it(),n=_(t)?ct(t):t;return Z.some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||tt.some((t=>(n.willChange||"").includes(t)))||nt.some((t=>(n.contain||"").includes(t)))}function ot(t){let e=ft(t);for(;V(e)&&!st(e);){if(et(e))return e;if(U(e))return null;e=ft(e)}return null}function it(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const rt=new Set(["html","body","#document"]);function st(t){return rt.has(I(t))}function ct(t){return q(t).getComputedStyle(t)}function lt(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ft(t){if("html"===I(t))return t;const e=t.assignedSlot||t.parentNode||X(t)&&t.host||H(t);return X(e)?e.host:e}function at(t){const e=ft(t);return st(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&G(e)?e:at(e)}function ut(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=at(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=q(i);if(r){const t=dt(l);return e.concat(l,l.visualViewport||[],G(i)?i:[],t&&n?ut(t):[])}return e.concat(i,ut(i,[],n))}function dt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function mt(t){const e=ct(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=V(t),l=r?t.offsetWidth:n,c=r?t.offsetHeight:i,s=o(n)!==l||o(i)!==c;return s&&(n=l,i=c),{width:n,height:i,$:s}}function pt(t){return _(t)?t:t.contextElement}function yt(t){const e=pt(t);if(!V(e))return r(1);const n=e.getBoundingClientRect(),{width:i,height:l,$:c}=mt(e);let s=(c?o(n.width):n.width)/i,a=(c?o(n.height):n.height)/l;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const ht=r(0);function wt(t){const e=q(t);return it()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ht}function xt(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==q(t))&&e}function gt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),l=pt(t);let c=r(1);e&&(o?_(o)&&(c=yt(o)):c=yt(t));const s=xt(l,n,o)?wt(l):r(0);let a=(i.left+s.x)/c.x,f=(i.top+s.y)/c.y,u=i.width/c.x,d=i.height/c.y;if(l){const t=q(l),e=o&&_(o)?q(o):o;let n=t,i=dt(n);for(;i&&o&&e!==n;){const t=yt(i),e=i.getBoundingClientRect(),o=ct(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x,f*=t.y,u*=t.x,d*=t.y,a+=r,f+=l,n=q(i),i=dt(n)}}return D({width:u,height:d,x:a,y:f})}function vt(t,e){const n=lt(t).scrollLeft;return e?e.left+n:gt(H(t)).left+n}function bt(t,e,n){void 0===n&&(n=!1);const o=t.getBoundingClientRect();return{x:o.left+e.scrollLeft-(n?0:vt(t,o)),y:o.top+e.scrollTop}}function At(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const l="fixed"===i,c=H(o),s=!!e&&U(e.floating);if(o===c||s&&l)return n;let a={scrollLeft:0,scrollTop:0},f=r(1);const u=r(0),d=V(o);if((d||!d&&!l)&&(("body"!==I(o)||G(c))&&(a=lt(o)),V(o))){const t=gt(o);f=yt(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const h=!c||d||l?r(0):bt(c,a,!0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-a.scrollTop*f.y+u.y+h.y}}function St(t){return Array.from(t.getClientRects())}function Rt(t){const n=H(t),o=lt(t),i=t.ownerDocument.body,r=e(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),l=e(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-o.scrollLeft+vt(t);const s=-o.scrollTop;return"rtl"===ct(i).direction&&(c+=e(n.clientWidth,i.clientWidth)-r),{width:r,height:l,x:c,y:s}}function kt(t,e){const n=q(t),o=H(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,c=0,s=0;if(i){r=i.width,l=i.height;const t=it();(!t||t&&"fixed"===e)&&(c=i.offsetLeft,s=i.offsetTop)}return{width:r,height:l,x:c,y:s}}function Ot(t,e){const n=gt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,l=V(t)?yt(t):r(1);return{width:t.clientWidth*l.x,height:t.clientHeight*l.y,x:i*l.x,y:o*l.y}}function Ft(t,e,n){let o;if("viewport"===e)o=kt(t,n);else if("document"===e)o=Rt(H(t));else if(_(e))o=Ot(e,n);else{const n=wt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return D(o)}function $t(t,e){const n=ft(t);return!(n===e||!_(n)||st(n))&&("fixed"===ct(n).position||$t(n,e))}function Dt(t,e){const n=e.get(t);if(n)return n;let o=ut(t,[],!1).filter((t=>_(t)&&"body"!==I(t))),i=null;const r="fixed"===ct(t).position;let l=r?ft(t):t;for(;_(l)&&!st(l);){const e=ct(l),n=et(l);n||"fixed"!==e.position||(i=null);(r?!n&&!i:!n&&"static"===e.position&&!!i&&["absolute","fixed"].includes(i.position)||G(l)&&!n&&$t(t,l))?o=o.filter((t=>t!==l)):i=e,l=ft(l)}return e.set(t,o),o}function Et(t){let{element:o,boundary:i,rootBoundary:r,strategy:l}=t;const c=[..."clippingAncestors"===i?U(o)?[]:Dt(o,this._c):[].concat(i),r],s=c[0],a=c.reduce(((t,i)=>{const r=Ft(o,i,l);return t.top=e(r.top,t.top),t.right=n(r.right,t.right),t.bottom=n(r.bottom,t.bottom),t.left=e(r.left,t.left),t}),Ft(o,s,l));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Tt(t){const{width:e,height:n}=mt(t);return{width:e,height:n}}function Pt(t,e,n){const o=V(e),i=H(e),l="fixed"===n,c=gt(t,!0,l,e);let s={scrollLeft:0,scrollTop:0};const a=r(0);function f(){a.x=vt(i)}if(o||!o&&!l)if(("body"!==I(e)||G(i))&&(s=lt(e)),o){const t=gt(e,!0,l,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else i&&f();l&&!o&&i&&f();const u=!i||o||l?r(0):bt(i,s);return{x:c.left+s.scrollLeft-a.x-u.x,y:c.top+s.scrollTop-a.y-u.y,width:c.width,height:c.height}}function Mt(t){return"static"===ct(t).position}function jt(t,e){if(!V(t)||"fixed"===ct(t).position)return null;if(e)return e(t);let n=t.offsetParent;return H(t)===n&&(n=n.ownerDocument.body),n}function zt(t,e){const n=q(t);if(U(t))return n;if(!V(t)){let e=ft(t);for(;e&&!st(e);){if(_(e)&&!Mt(e))return e;e=ft(e)}return n}let o=jt(t,e);for(;o&&K(o)&&Mt(o);)o=jt(o,e);return o&&st(o)&&Mt(o)&&!et(o)?n:o||ot(t)||n}const Ct=async function(t){const e=this.getOffsetParent||zt,n=this.getDimensions,o=await n(t.floating);return{reference:Pt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Lt(t){return"rtl"===ct(t).direction}const Bt={convertOffsetParentRelativeRectToViewportRelativeRect:At,getDocumentElement:H,getClippingRect:Et,getOffsetParent:zt,getElementRects:Ct,getClientRects:St,getDimensions:Tt,getScale:yt,isElement:_,isRTL:Lt};function Nt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function It(t,o){let r,l=null;const c=H(t);function s(){var t;clearTimeout(r),null==(t=l)||t.disconnect(),l=null}return function a(f,u){void 0===f&&(f=!1),void 0===u&&(u=1),s();const d=t.getBoundingClientRect(),{left:h,top:m,width:p,height:g}=d;if(f||o(),!p||!g)return;const y={rootMargin:-i(m)+"px "+-i(c.clientWidth-(h+p))+"px "+-i(c.clientHeight-(m+g))+"px "+-i(h)+"px",threshold:e(0,n(1,u))||1};let w=!0;function x(e){const n=e[0].intersectionRatio;if(n!==u){if(!w)return a();n?a(!1,n):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==n||Nt(d,t.getBoundingClientRect())||a(),w=!1}try{l=new IntersectionObserver(x,{...y,root:c.ownerDocument})}catch(t){l=new IntersectionObserver(x,y)}l.observe(t)}(!0),s}function qt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,a=pt(t),f=i||r?[...a?ut(a):[],...ut(e)]:[];f.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)}));const u=a&&c?It(a,n):null;let d,h=-1,m=null;l&&(m=new ResizeObserver((t=>{let[o]=t;o&&o.target===a&&m&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var t;null==(t=m)||t.observe(e)}))),n()})),a&&!s&&m.observe(a),m.observe(e));let p=s?gt(t):null;return s&&function e(){const o=gt(t);p&&!Nt(p,o)&&n();p=o,d=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach((t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==u||u(),null==(t=m)||t.disconnect(),m=null,s&&cancelAnimationFrame(d)}}const Ht=L,Wt=B,_t=j,Vt=M,Xt=(t,e,n)=>{const o=new Map,i={platform:Bt,...n},r={...i.platform,_c:o};return T(t,e,{...i,platform:r})},Yt=async({floatingElement:e,referenceElement:n,arrowElement:o,align:i="top"})=>{var r,l,c;if("test"!==t){const t=[Ht(null!==(r=null==o?void 0:o.offsetHeight)&&void 0!==r?r:10),_t(),Wt()];o&&t.push(Vt({element:o}));const{x:s,y:a,middlewareData:f,placement:u}=await Xt(n,e,{placement:i,middleware:t,strategy:"fixed"});Object.assign(e.style,{left:`${s}px`,top:`${a}px`,visibility:"visible"}),o&&((null===(l=f.arrow)||void 0===l?void 0:l.x)?Object.assign(o.style,{left:`${f.arrow.x}px`,top:"bottom"===u?-o.offsetHeight/2+"px":"",bottom:"top"===u?-o.offsetHeight/2+"px":""}):(null===(c=f.arrow)||void 0===c?void 0:c.y)&&Object.assign(o.style,{left:"right"===u?-o.offsetWidth/2+"px":"",right:"left"===u?-o.offsetWidth/2+"px":"",top:`${f.arrow.y}px`}))}};export{Yt as a,qt as b};