import{i as A,k as ne,r as u}from"./vendor-react-C630P38J.js";var U,X;function ue(){if(X)return U;X=1;var r="Expected a function",e=NaN,n="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,t=/^0o[0-7]+$/i,i=parseInt,a=typeof A=="object"&&A&&A.Object===Object&&A,l=typeof self=="object"&&self&&self.Object===Object&&self,h=a||l||Function("return this")(),E=Object.prototype,d=E.toString,v=Math.max,m=Math.min,S=function(){return h.Date.now()};function D(c,b,w){var L,O,W,C,y,R,j=0,J=!1,T=!1,$=!0;if(typeof c!="function")throw new TypeError(r);b=_(b)||0,k(w)&&(J=!!w.leading,T="maxWait"in w,W=T?v(_(w.maxWait)||0,b):W,$="trailing"in w?!!w.trailing:$);function q(g){var p=L,x=O;return L=O=void 0,j=g,C=c.apply(x,p),C}function Z(g){return j=g,y=setTimeout(z,b),J?q(g):C}function ee(g){var p=g-R,x=g-j,H=b-p;return T?m(H,W-x):H}function B(g){var p=g-R,x=g-j;return R===void 0||p>=b||p<0||T&&x>=W}function z(){var g=S();if(B(g))return G(g);y=setTimeout(z,ee(g))}function G(g){return y=void 0,$&&L?q(g):(L=O=void 0,C)}function te(){y!==void 0&&clearTimeout(y),j=0,L=R=O=y=void 0}function re(){return y===void 0?C:G(S())}function M(){var g=S(),p=B(g);if(L=arguments,O=this,R=g,p){if(y===void 0)return Z(R);if(T)return y=setTimeout(z,b),q(R)}return y===void 0&&(y=setTimeout(z,b)),C}return M.cancel=te,M.flush=re,M}function k(c){var b=typeof c;return!!c&&(b=="object"||b=="function")}function I(c){return!!c&&typeof c=="object"}function F(c){return typeof c=="symbol"||I(c)&&d.call(c)==n}function _(c){if(typeof c=="number")return c;if(F(c))return e;if(k(c)){var b=typeof c.valueOf=="function"?c.valueOf():c;c=k(b)?b+"":b}if(typeof c!="string")return c===0?c:+c;c=c.replace(o,"");var w=f.test(c);return w||t.test(c)?i(c.slice(2),w?2:8):s.test(c)?e:+c}return U=D,U}var oe=ue();const K=ne(oe);var V=typeof window<"u"?u.useLayoutEffect:u.useEffect;function P(r,e,n,o){const s=u.useRef(e);V(()=>{s.current=e},[e]),u.useEffect(()=>{const f=window;if(!(f&&f.addEventListener))return;const t=i=>{s.current(i)};return f.addEventListener(r,t,o),()=>{f.removeEventListener(r,t,o)}},[r,n,o])}function Q(r){const e=u.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return V(()=>{e.current=r},[r]),u.useCallback((...n)=>{var o;return(o=e.current)==null?void 0:o.call(e,...n)},[e])}var ce=typeof window>"u";function le(r,e,n={}){const{initializeWithValue:o=!0}=n,s=u.useCallback(d=>n.serializer?n.serializer(d):JSON.stringify(d),[n]),f=u.useCallback(d=>{if(n.deserializer)return n.deserializer(d);if(d==="undefined")return;const v=e instanceof Function?e():e;let m;try{m=JSON.parse(d)}catch{return v}return m},[n,e]),t=u.useCallback(()=>{const d=e instanceof Function?e():e;if(ce)return d;try{const v=window.localStorage.getItem(r);return v?f(v):d}catch{return d}},[e,r,f]),[i,a]=u.useState(()=>o?t():e instanceof Function?e():e),l=Q(d=>{try{const v=d instanceof Function?d(t()):d;window.localStorage.setItem(r,s(v)),a(v),window.dispatchEvent(new StorageEvent("local-storage",{key:r}))}catch{}}),h=Q(()=>{const d=e instanceof Function?e():e;window.localStorage.removeItem(r),a(d),window.dispatchEvent(new StorageEvent("local-storage",{key:r}))});u.useEffect(()=>{a(t())},[r]);const E=u.useCallback(d=>{d.key&&d.key!==r||a(t())},[r,t]);return P("storage",E),P("local-storage",E),[i,l,h]}function se(r){const e=u.useRef(r);e.current=r,u.useEffect(()=>()=>{e.current()},[])}function ae(r,e=500,n){const o=u.useRef();se(()=>{o.current&&o.current.cancel()});const s=u.useMemo(()=>{const f=K(r,e,n),t=(...i)=>f(...i);return t.cancel=()=>{f.cancel()},t.isPending=()=>!!o.current,t.flush=()=>f.flush(),t},[r,e,n]);return u.useEffect(()=>{o.current=K(r,e,n)},[r,e,n]),s}function ge(r,e,n){const o=((l,h)=>l===h),s=r instanceof Function?r():r,[f,t]=u.useState(s),i=u.useRef(s),a=ae(t,e,n);return o(i.current,s)||(a(s),i.current=s),[f,a]}function ve({threshold:r=0,root:e=null,rootMargin:n="0%",freezeOnceVisible:o=!1,initialIsIntersecting:s=!1,onChange:f}={}){var t;const[i,a]=u.useState(null),[l,h]=u.useState(()=>({isIntersecting:s,entry:void 0})),E=u.useRef();E.current=f;const d=((t=l.entry)==null?void 0:t.isIntersecting)&&o;u.useEffect(()=>{if(!i||!("IntersectionObserver"in window)||d)return;const S=new IntersectionObserver(D=>{const k=Array.isArray(S.thresholds)?S.thresholds:[S.thresholds];D.forEach(I=>{const F=I.isIntersecting&&k.some(_=>I.intersectionRatio>=_);h({isIntersecting:F,entry:I}),E.current&&E.current(F,I)})},{threshold:r,root:e,rootMargin:n});return S.observe(i),()=>{S.disconnect()}},[i,JSON.stringify(r),e,n,d,o]);const v=u.useRef(null);u.useEffect(()=>{var S;!i&&((S=l.entry)!=null&&S.target)&&!o&&!d&&v.current!==l.entry.target&&(v.current=l.entry.target,h({isIntersecting:s,entry:void 0}))},[i,l.entry,o,d,s]);const m=[a,!!l.isIntersecting,l.entry];return m.ref=m[0],m.isIntersecting=m[1],m.entry=m[2],m}var Y=typeof window>"u";function be(r,e={}){let{initializeWithValue:n=!0}=e;Y&&(n=!1);const o=u.useCallback(a=>{if(e.deserializer)return e.deserializer(a);if(a==="undefined")return;let l;try{l=JSON.parse(a)}catch{return null}return l},[e]),s=u.useCallback(()=>{if(Y)return null;try{const a=window.localStorage.getItem(r);return a?o(a):null}catch{return null}},[r,o]),[f,t]=u.useState(()=>{if(n)return s()});u.useEffect(()=>{t(s())},[r]);const i=u.useCallback(a=>{a.key&&a.key!==r||t(s())},[r,s]);return P("storage",i),P("local-storage",i),f}var N=new Map;function ie(r){const e=document.querySelector(`script[src="${r}"]`),n=e==null?void 0:e.getAttribute("data-status");return{node:e,status:n}}function me(r,e){const[n,o]=u.useState(()=>!r||e!=null&&e.shouldPreventLoad?"idle":typeof window>"u"?"loading":N.get(r)??"loading");return u.useEffect(()=>{if(!r||e!=null&&e.shouldPreventLoad)return;const s=N.get(r);if(s==="ready"||s==="error"){o(s);return}const f=ie(r);let t=f.node;if(t)o(f.status??s??"loading");else{t=document.createElement("script"),t.src=r,t.async=!0,e!=null&&e.id&&(t.id=e.id),t.setAttribute("data-status","loading"),document.body.appendChild(t);const a=l=>{const h=l.type==="load"?"ready":"error";t==null||t.setAttribute("data-status",h)};t.addEventListener("load",a),t.addEventListener("error",a)}const i=a=>{const l=a.type==="load"?"ready":"error";o(l),N.set(r,l)};return t.addEventListener("load",i),t.addEventListener("error",i),()=>{t&&(t.removeEventListener("load",i),t.removeEventListener("error",i)),t&&(e!=null&&e.removeOnUnmount)&&(t.remove(),N.delete(r))}},[r,e==null?void 0:e.shouldPreventLoad,e==null?void 0:e.removeOnUnmount,e==null?void 0:e.id]),n}var de=typeof window>"u";function he(r={}){const{autoLock:e=!0,lockTarget:n,widthReflow:o=!0}=r,[s,f]=u.useState(!1),t=u.useRef(null),i=u.useRef(null),a=()=>{if(t.current){const{overflow:h,paddingRight:E}=t.current.style;if(i.current={overflow:h,paddingRight:E},o){const d=t.current===document.body?window.innerWidth:t.current.offsetWidth,v=parseInt(window.getComputedStyle(t.current).paddingRight,10)||0,m=d-t.current.scrollWidth;t.current.style.paddingRight=`${m+v}px`}t.current.style.overflow="hidden",f(!0)}},l=()=>{t.current&&i.current&&(t.current.style.overflow=i.current.overflow,o&&(t.current.style.paddingRight=i.current.paddingRight)),f(!1)};return V(()=>{if(!de)return n&&(t.current=typeof n=="string"?document.querySelector(n):n),t.current||(t.current=document.body),e&&a(),()=>{l()}},[e,n,o]),{isLocked:s,lock:a,unlock:l}}export{ve as a,le as b,ge as c,ae as d,he as e,be as f,me as u};