1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="29955d9d-81e0-5bbd-a329-050ae0d57dbb")}catch(e){}}(); 3import{r as P}from"./chunk-62JRHF6Z-Cg50Stu2.js";import{r as C,p as R,v as N,i as F,d as V,f as g,c as A,a as D,n as X,s as Y,w as $,m}from"./resolve-elements-MpNw6NUP.js";import{u as G,a as _}from"./use-constant-1tyEX1cw.js";function We(e,t,s){P.useInsertionEffect(()=>e.on(t,s),[e,t,s])}const v=new WeakMap;let d;function J(e,t){if(t){const{inlineSize:s,blockSize:n}=t[0];return{width:s,height:n}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function j({target:e,contentRect:t,borderBoxSize:s}){var n;(n=v.get(e))===null||n===void 0||n.forEach(r=>{r({target:e,contentSize:t,get size(){return J(e,s)}})})}function q(e){e.forEach(j)}function K(){typeof ResizeObserver>"u"||(d=new ResizeObserver(q))}function Q(e,t){d||K();const s=C(e);return s.forEach(n=>{let r=v.get(n);r||(r=new Set,v.set(n,r)),r.add(t),d?.observe(n)}),()=>{s.forEach(n=>{const r=v.get(n);r?.delete(t),r?.size||d?.unobserve(n)})}}const w=new Set;let p;function U(){p=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};w.forEach(s=>s(t))},window.addEventListener("resize",p)}function Z(e){return w.add(e),p||U(),()=>{w.delete(e),!w.size&&p&&(p=void 0)}}function ee(e,t){return typeof e=="function"?Z(e):Q(e,t)}const te=50,H=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ne=()=>({time:0,x:H(),y:H()}),se={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function S(e,t,s,n){const r=s[t],{length:l,position:o}=se[t],i=r.current,c=s.time;r.current=e[`scroll${o}`],r.scrollLength=e[`scroll${l}`]-e[`client${l}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=R(0,r.scrollLength,r.current);const u=n-c;r.velocity=u>te?0:N(r.current-i,u)}function re(e,t,s){S(e,"x",t,s),S(e,"y",t,s),t.time=s}function le(e,t){const s={x:0,y:0};let n=e;for(;n&&n!==t;)if(n instanceof HTMLElement)s.x+=n.offsetLeft,s.y+=n.offsetTop,n=n.offsetParent;else if(n.tagName==="svg"){const r=n.getBoundingClientRect();n=n.parentElement;const l=n.getBoundingClientRect();s.x+=r.left-l.left,s.y+=r.top-l.top}else if(n instanceof SVGGraphicsElement){const{x:r,y:l}=n.getBBox();s.x+=r,s.y+=l;let o=null,i=n.parentNode;for(;!o;)i.tagName==="svg"&&(o=i),i=n.parentNode;n=o}else break;return s}const oe={All:[[0,0],[1,1]]},z={start:0,center:.5,end:1};function O(e,t,s=0){let n=0;if(e in z&&(e=z[e]),typeof e=="string"){const r=parseFloat(e);e.endsWith("px")?n=r:e.endsWith("%")?e=r/100:e.endsWith("vw")?n=r/100*document.documentElement.clientWidth:e.endsWith("vh")?n=r/100*document.documentElement.clientHeight:e=r}return typeof e=="number"&&(n=t*e),s+n}const ie=[0,0];function ce(e,t,s,n){let r=Array.isArray(e)?e:ie,l=0,o=0;return typeof e=="number"?r=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?r=e.split(" "):r=[e,z[e]?e:"0"]),l=O(r[0],s,n),o=O(r[1],t),l-o}const fe={x:0,y:0};function ue(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function ae(e,t,s){const{offset:n=oe.All}=s,{target:r=e,axis:l="y"}=s,o=l==="y"?"height":"width",i=r!==e?le(r,e):fe,c=r===e?{width:e.scrollWidth,height:e.scrollHeight}:ue(r),u={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let a=!t[l].interpolate;const y=n.length;for(let f=0;f<y;f++){const x=ce(n[f],u[o],c[o],i[l]);!a&&x!==t[l].interpolatorOffsets[f]&&(a=!0),t[l].offset[f]=x}a&&(t[l].interpolate=F(t[l].offset,V(n)),t[l].interpolatorOffsets=[...t[l].offset]),t[l].progress=t[l].interpolate(t[l].current)}function de(e,t=e,s){if(s.x.targetOffset=0,s.y.targetOffset=0,t!==e){let n=t;for(;n&&n!==e;)s.x.targetOffset+=n.offsetLeft,s.y.targetOffset+=n.offsetTop,n=n.offsetParent}s.x.targetLength=t===e?t.scrollWidth:t.clientWidth,s.y.targetLength=t===e?t.scrollHeight:t.clientHeight,s.x.containerLength=e.clientWidth,s.y.c
3ontainerLength=e.clientHeight}function he(e,t,s,n={}){return{measure:()=>de(e,n.target,s),update:r=>{re(e,s,r),(n.offset||n.target)&&ae(e,s,n)},notify:()=>t(s)}}const h=new WeakMap,T=new WeakMap,E=new WeakMap,B=e=>e===document.documentElement?window:e;function W(e,{container:t=document.documentElement,...s}={}){let n=E.get(t);n||(n=new Set,E.set(t,n));const r=ne(),l=he(t,e,r,s);if(n.add(l),!h.has(t)){const i=()=>{for(const f of n)f.measure()},c=()=>{for(const f of n)f.update(D.timestamp)},u=()=>{for(const f of n)f.notify()},a=()=>{g.read(i,!1,!0),g.read(c,!1,!0),g.update(u,!1,!0)};h.set(t,a);const y=B(t);window.addEventListener("resize",a,{passive:!0}),t!==document.documentElement&&T.set(t,ee(t,a)),y.addEventListener("scroll",a,{passive:!0})}const o=h.get(t);return g.read(o,!1,!0),()=>{var i;A(o);const c=E.get(t);if(!c||(c.delete(l),c.size))return;const u=h.get(t);h.delete(t),u&&(B(t).removeEventListener("scroll",u),(i=T.get(t))===null||i===void 0||i(),window.removeEventListener("resize",u))}}function I(e,t){let s;const n=()=>{const{currentTime:r}=t,o=(r===null?0:r.value)/100;s!==o&&e(o),s=o};return g.update(n,!0),()=>A(n)}function ge({source:e,container:t,axis:s="y"}){e&&(t=e);const n={value:0},r=W(l=>{n.value=l[s].progress*100},{container:t,axis:s});return{currentTime:n,cancel:r}}const L=new Map;function k({source:e,container:t=document.documentElement,axis:s="y"}={}){e&&(t=e),L.has(t)||L.set(t,{});const n=L.get(t);return n[s]||(n[s]=Y()?new ScrollTimeline({source:t,axis:s}):ge({source:t,axis:s})),n[s]}function pe(e){return e.length===2}function M(e){return e&&(e.target||e.offset)}function me(e,t){return pe(e)||M(t)?W(s=>{e(s[t.axis].progress,s)},t):I(e,k(t))}function ve(e,t){if(e.flatten(),M(t))return e.pause(),W(s=>{e.time=e.duration*s[t.axis].progress},t);{const s=k(t);return e.attachTimeline?e.attachTimeline(s,n=>(n.pause(),I(r=>{n.time=n.duration*r},s))):X}}function we(e,{axis:t="y",...s}={}){const n={axis:t,...s};return typeof e=="function"?me(e,n):ve(e,n)}function b(e,t){$(!!(!t||t.current))}const ye=()=>({scrollX:m(0),scrollY:m(0),scrollXProgress:m(0),scrollYProgress:m(0)});function xe({container:e,target:t,layoutEffect:s=!0,...n}={}){const r=G(ye);return(s?_:P.useEffect)(()=>(b("target",t),b("container",e),we((o,{x:i,y:c})=>{r.scrollX.set(i.current),r.scrollXProgress.set(i.progress),r.scrollY.set(c.current),r.scrollYProgress.set(c.progress)},{...n,container:e?.current||void 0,target:t?.current||void 0})),[e,t,JSON.stringify(n.offset)]),r}export{We as a,xe as u}; 4//# sourceMappingURL=use-scroll-C5lorfx_.js.map 5 6//# debugId=29955d9d-81e0-5bbd-a329-050ae0d57dbb
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.