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]="35eead24-3e2d-523a-b786-7329c676ba12")}catch(e){}}(); 3import{r as d}from"./chunk-QUQL4437-u7y9NfBn.js";import{r as I,n as N,x as y,y as z,p as F,z as G,i as X,A as $,h as K,B as U,C as Y,D as _,E as j,u as J,a as q,F as T,G as v}from"./proxy-BnyKFKVf.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0693db97ce4fecab819a3939f0d0cccae75bb5de"}}catch{}})();const x=new WeakMap;let g;const M=(e,t,r)=>(s,n)=>n&&n[0]?n[0][e+"Size"]:N(s)&&"getBBox"in s?s.getBBox()[t]:s[r],Q=M("inline","width","offsetWidth"),Z=M("block","height","offsetHeight");function ee({target:e,borderBoxSize:t}){var r;(r=x.get(e))==null||r.forEach(s=>{s(e,{get width(){return Q(e,t)},get height(){return Z(e,t)}})})}function te(e){e.forEach(ee)}function se(){typeof ResizeObserver>"u"||(g=new ResizeObserver(te))}function ne(e,t){g||se();const r=I(e);return r.forEach(s=>{let n=x.get(s);n||(n=new Set,x.set(s,n)),n.add(t),g==null||g.observe(s)}),()=>{r.forEach(s=>{const n=x.get(s);n==null||n.delete(t),n!=null&&n.size||g==null||g.unobserve(s)})}}const L=new Set;let w;function re(){w=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};L.forEach(t=>t(e))},window.addEventListener("resize",w)}function le(e){return L.add(e),w||re(),()=>{L.delete(e),!L.size&&typeof w=="function"&&(window.removeEventListener("resize",w),w=void 0)}}function oe(e,t){return typeof e=="function"?le(e):ne(e,t)}function V(e,t){let r;const s=()=>{const{currentTime:n}=t,o=(n===null?0:n.value)/100;r!==o&&e(o),r=o};return y.preUpdate(s,!0),()=>z(s)}function ie(e,t,r){d.useInsertionEffect(()=>e.on(t,r),[e,t,r])}const ce=50,O=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),fe=()=>({time:0,x:O(),y:O()}),ue={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function b(e,t,r,s){const n=r[t],{length:l,position:o}=ue[t],c=n.current,f=r.time;n.current=e[`scroll${o}`],n.scrollLength=e[`scroll${l}`]-e[`client${l}`],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=F(0,n.scrollLength,n.current);const i=s-f;n.velocity=i>ce?0:G(n.current-c,i)}function ae(e,t,r){b(e,"x",t,r),b(e,"y",t,r),t.time=r}function de(e,t){const r={x:0,y:0};let s=e;for(;s&&s!==t;)if(X(s))r.x+=s.offsetLeft,r.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const n=s.getBoundingClientRect();s=s.parentElement;const l=s.getBoundingClientRect();r.x+=n.left-l.left,r.y+=n.top-l.top}else if(s instanceof SVGGraphicsElement){const{x:n,y:l}=s.getBBox();r.x+=n,r.y+=l;let o=null,c=s.parentNode;for(;!o;)c.tagName==="svg"&&(o=c),c=s.parentNode;s=o}else break;return r}const H={start:0,center:.5,end:1};function P(e,t,r=0){let s=0;if(e in H&&(e=H[e]),typeof e=="string"){const n=parseFloat(e);e.endsWith("px")?s=n:e.endsWith("%")?e=n/100:e.endsWith("vw")?s=n/100*document.documentElement.clientWidth:e.endsWith("vh")?s=n/100*document.documentElement.clientHeight:e=n}return typeof e=="number"&&(s=t*e),r+s}const he=[0,0];function ge(e,t,r,s){let n=Array.isArray(e)?e:he,l=0,o=0;return typeof e=="number"?n=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?n=e.split(" "):n=[e,H[e]?e:"0"]),l=P(n[0],r,s),o=P(n[1],t),l-o}const pe={All:[[0,0],[1,1]]},we={x:0,y:0};function me(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function ye(e,t,r){const{offset:s=pe.All}=r,{target:n=e,axis:l="y"}=r,o=l==="y"?"height":"width",c=n!==e?de(n,e):we,f=n===e?{width:e.scrollWidth,height:e.scrollHeight}:me(n),i={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let u=!t[l].interpolate;const h=s.length;for(let a=0;a<h;a++){const m=ge(s[a],i[o],f[o],c[l]);!u&&m!==t[l].interpolatorOffsets[a]&&(u=!0),t[l].offset[a]=m}
3u&&(t[l].interpolate=$(t[l].offset,K(s),{clamp:!1}),t[l].interpolatorOffsets=[...t[l].offset]),t[l].progress=U(0,1,t[l].interpolate(t[l].current))}function ve(e,t=e,r){if(r.x.targetOffset=0,r.y.targetOffset=0,t!==e){let s=t;for(;s&&s!==e;)r.x.targetOffset+=s.offsetLeft,r.y.targetOffset+=s.offsetTop,s=s.offsetParent}r.x.targetLength=t===e?t.scrollWidth:t.clientWidth,r.y.targetLength=t===e?t.scrollHeight:t.clientHeight,r.x.containerLength=e.clientWidth,r.y.containerLength=e.clientHeight}function Ee(e,t,r,s={}){return{measure:n=>{ve(e,s.target,r),ae(e,r,n),(s.offset||s.target)&&ye(e,r,s)},notify:()=>t(r)}}const p=new WeakMap,k=new WeakMap,W=new WeakMap,B=new WeakMap,E=new WeakMap,R=e=>e===document.scrollingElement?window:e;function A(e,{container:t=document.scrollingElement,trackContentSize:r=!1,...s}={}){if(!t)return Y;let n=W.get(t);n||(n=new Set,W.set(t,n));const l=fe(),o=Ee(t,e,l,s);if(n.add(o),!p.has(t)){const f=()=>{for(const a of n)a.measure(_.timestamp);y.preUpdate(i)},i=()=>{for(const a of n)a.notify()},u=()=>y.read(f);p.set(t,u);const h=R(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&k.set(t,oe(t,u)),h.addEventListener("scroll",u,{passive:!0}),u()}if(r&&!E.has(t)){const f=p.get(t),i={width:t.scrollWidth,height:t.scrollHeight};B.set(t,i);const u=()=>{const a=t.scrollWidth,m=t.scrollHeight;(i.width!==a||i.height!==m)&&(f(),i.width=a,i.height=m)},h=y.read(u,!0);E.set(t,h)}const c=p.get(t);return y.read(c,!1,!0),()=>{var h;z(c);const f=W.get(t);if(!f||(f.delete(o),f.size))return;const i=p.get(t);p.delete(t),i&&(R(t).removeEventListener("scroll",i),(h=k.get(t))==null||h(),window.removeEventListener("resize",i));const u=E.get(t);u&&(z(u),E.delete(t)),B.delete(t)}}const C=new Map;function Se(e){const t={value:0},r=A(s=>{t.value=s[e.axis].progress*100},e);return{currentTime:t,cancel:r}}function D({source:e,container:t,...r}){const{axis:s}=r;e&&(t=e);const n=C.get(t)??new Map;C.set(t,n);const l=r.target??"self",o=n.get(l)??{},c=s+(r.offset??[]).join(",");return o[c]||(o[c]=!r.target&&j()?new ScrollTimeline({source:t,axis:s}):Se({container:t,...r})),o[c]}function xe(e,t){const r=D(t);return e.attachTimeline({timeline:t.target?void 0:r,observe:s=>(s.pause(),V(n=>{s.time=s.iterationDuration*n},r))})}function Le(e){return e.length===2}function We(e,t){return Le(e)?A(r=>{e(r[t.axis].progress,r)},t):V(e,D(t))}function ze(e,{axis:t="y",container:r=document.scrollingElement,...s}={}){if(!r)return Y;const n={axis:t,container:r,...s};return typeof e=="function"?We(e,n):xe(e,n)}const He=()=>({scrollX:v(0),scrollY:v(0),scrollXProgress:v(0),scrollYProgress:v(0)}),S=e=>e?!e.current:!1;function Te({container:e,target:t,...r}={}){const s=J(He),n=d.useRef(null),l=d.useRef(!1),o=d.useCallback(()=>(n.current=ze((c,{x:f,y:i})=>{s.scrollX.set(f.current),s.scrollXProgress.set(f.progress),s.scrollY.set(i.current),s.scrollYProgress.set(i.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var c;(c=n.current)==null||c.call(n)}),[e,t,JSON.stringify(r.offset)]);return q(()=>{if(l.current=!1,S(e)||S(t)){l.current=!0;return}else return o()},[o]),d.useEffect(()=>{if(l.current)return T(!S(e)),T(!S(t)),o()},[o]),s}const Pe=()=>{const{scrollY:e}=Te(),[t,r]=d.useState(0),[s,n]=d.useState(0),[l,o]=d.useState(null),c=d.useRef(0);return ie(e,"change",f=>{const i=e.getPrevious()??f,u=f-i;if(n(f),f<=73)return r(-1);r(u)}),d.useEffect(()=>{c.current=window.scrollY;const f=()=>{const i=window.scrollY,u=c.current;i>u?o(null):i<u&&o("up"),n(i),c.current=i};return window.addEventListener("scroll",f,{passive:!0}),()=>{window.removeEventListener("scroll",f)}},[]),{scrollValue:t,scrollYValue:s,scrollDirection:l}};export{Pe as u}; 4//# sourceMappingURL=useScrollValue-CFboMBaE.js.map 5 6//# debugId=35eead24-3e2d-523a-b786-7329c676ba12
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.