Files
llm-in-text/.build-check/assets/vendor-floating-ui-dom-Bo_IsNpa.js
T

2 lines
7.3 KiB
JavaScript
Raw Normal View History

import{f as st,o as rt,s as ct,c as lt}from"./vendor-floating-ui-core-B-QvIi8c.js";import{n as v,o as R,p as z,q as b,s as C,t as m,u as D,v as L,w as _,x as W,y as H,z as ft,A as j,B as ut,C as E,D as V,E as $,F as q,G as I,H as G,r as Q,I as A,J as Y}from"./vendor-floating-ui-utils-CALKnY__.js";function Z(t){const e=b(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=C(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,c=D(o)!==r||D(n)!==s;return c&&(o=r,n=s),{width:o,height:n,$:c}}function X(t){return v(t)?t:t.contextElement}function F(t){const e=X(t);if(!C(e))return m(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=Z(e);let s=(r?D(o.width):o.width)/n,c=(r?D(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const at=m(0);function tt(t){const e=L(t);return!Y()||!e.visualViewport?at:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ht(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==L(t)?!1:e}function T(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=X(t);let s=m(1);e&&(n?v(n)&&(s=F(n)):s=F(t));const c=ht(r,o,n)?tt(r):m(0);let f=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,u=i.width/s.x,a=i.height/s.y;if(r){const d=L(r),h=n&&v(n)?L(n):n;let w=d,p=G(w);for(;p&&n&&h!==w;){const y=F(p),g=p.getBoundingClientRect(),x=b(p),O=g.left+(p.clientLeft+parseFloat(x.paddingLeft))*y.x,B=g.top+(p.clientTop+parseFloat(x.paddingTop))*y.y;f*=y.x,l*=y.y,u*=y.x,a*=y.y,f+=O,l+=B,w=L(p),p=G(w)}}return Q({width:u,height:a,x:f,y:l})}function M(t,e){const o=I(t).scrollLeft;return e?e.left+o:T(R(t)).left+o}function et(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-M(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function dt(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=R(n),c=e?_(e.floating):!1;if(n===s||c&&r)return o;let f={scrollLeft:0,scrollTop:0},l=m(1);const u=m(0),a=C(n);if((a||!a&&!r)&&(($(n)!=="body"||q(s))&&(f=I(n)),C(n))){const h=T(n);l=F(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const d=s&&!a&&!r?et(s,f):m(0);return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-f.scrollLeft*l.x+u.x+d.x,y:o.y*l.y-f.scrollTop*l.y+u.y+d.y}}function gt(t){return Array.from(t.getClientRects())}function pt(t){const e=R(t),o=I(t),n=t.ownerDocument.body,i=E(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=E(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+M(t);const c=-o.scrollTop;return b(n).direction==="rtl"&&(s+=E(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:c}}const J=25;function wt(t,e){const o=L(t),n=R(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,c=0,f=0;if(i){r=i.width,s=i.height;const u=Y();(!u||u&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const l=M(n);if(l<=0){const u=n.ownerDocument,a=u.body,d=getComputedStyle(a),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,w=Math.abs(n.clientWidth-a.clientWidth-h);w<=J&&(r-=w)}else l<=J&&(r+=l);return{width:r,height:s,x:c,y:f}}const yt=new Set(["absolute","fixed"]);function mt(t,e){const o=T(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=C(t)?F(t):m(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,f=i*r.x,l=n*r.y;return{width:s,height:c,x:f,y:l}}function K(t,e,o){let n;if(e==="viewport")n=wt(t,o);else if(e==="document")n=pt(R(t));else if(v(e))n=mt(e,o);else{const i=tt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Q(n)}function nt(t,e){const o=W(t);return o===e||!v(o)||H(o)?!1:b(o).position==="fixed"||nt(o,e)}function xt(t,e){const o=e.get(t);if(o)return o;let n=z(t,[],!1).filter(c=>v(c)&&$(c)!=="body"),i=null;const r=b(t).position==="fixed";let s=r?W(t):t;for(;v(s)&&!H(s);){const c=b(s),f=j(s);!f&&c.position==="fixed"&&(i=null),(r?!f&&!i:!f&&c.position==="static"&&!!i&&yt.has(i.position)||q(s)&&!f&&nt(t,s))?n=n.filter(u=>u!==s):i=c,s=W(s)}return e.set(t,n),n}function vt(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?_(e)?[]:xt(e,this._c):[].concat(o),n],c=s[0],f=s.reduce((l,u)=>{c