import{r as b,d as S,g as ne,b as oe}from"./index-Db5TLbgN.js";import{b as ie}from"./tslib.es6-e2qAPn_M.js";import{u as ae}from"./use-isomorphic-update-layout-effect-Bcq4v23f.js";function L(e){var t=b.useRef(e);t.current=b.useMemo(function(){return e},[e]);var n=b.useRef();return n.current||(n.current=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.current.apply(this,r)}),n.current}function ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var H=ce,se=typeof S=="object"&&S&&S.Object===Object&&S,ue=se,fe=ue,le=typeof self=="object"&&self&&self.Object===Object&&self,de=fe||le||Function("return this")(),X=de,me=X,be=function(){return me.Date.now()},ye=be,pe=/\s/;function ve(e){for(var t=e.length;t--&&pe.test(e.charAt(t)););return t}var ge=ve,Se=ge,$e=/^\s+/;function Te(e){return e&&e.slice(0,Se(e)+1).replace($e,"")}var je=Te,xe=X,Oe=xe.Symbol,J=Oe,W=J,K=Object.prototype,he=K.hasOwnProperty,_e=K.toString,v=W?W.toStringTag:void 0;function Ee(e){var t=he.call(e,v),n=e[v];try{e[v]=void 0;var r=!0}catch{}var i=_e.call(e);return r&&(t?e[v]=n:delete e[v]),i}var we=Ee,Ie=Object.prototype,Me=Ie.toString;function Re(e){return Me.call(e)}var Ce=Re,V=J,Fe=we,Le=Ce,Pe="[object Null]",ke="[object Undefined]",B=V?V.toStringTag:void 0;function ze(e){return e==null?e===void 0?ke:Pe:B&&B in Object(e)?Fe(e):Le(e)}var Ne=ze;function Ae(e){return e!=null&&typeof e=="object"}var Ge=Ae,We=Ne,Ve=Ge,Be="[object Symbol]";function Ue(e){return typeof e=="symbol"||Ve(e)&&We(e)==Be}var qe=Ue,De=je,U=H,He=qe,q=NaN,Xe=/^[-+]0x[0-9a-f]+$/i,Je=/^0b[01]+$/i,Ke=/^0o[0-7]+$/i,Qe=parseInt;function Ye(e){if(typeof e=="number")return e;if(He(e))return q;if(U(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=U(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=De(e);var n=Je.test(e);return n||Ke.test(e)?Qe(e.slice(2),n?2:8):Xe.test(e)?q:+e}var Ze=Ye,et=H,F=ye,D=Ze,tt="Expected a function",rt=Math.max,nt=Math.min;function ot(e,t,n){var r,i,c,d,s,f,l=0,z=!1,y=!1,M=!0;if(typeof e!="function")throw new TypeError(tt);t=D(t)||0,et(n)&&(z=!!n.leading,y="maxWait"in n,c=y?rt(D(n.maxWait)||0,t):c,M="trailing"in n?!!n.trailing:M);function R(a){var m=r,p=i;return r=i=void 0,l=a,d=e.apply(p,m),d}function Z(a){return l=a,s=setTimeout(g,t),z?R(a):d}function ee(a){var m=a-f,p=a-l,G=t-m;return y?nt(G,c-p):G}function N(a){var m=a-f,p=a-l;return f===void 0||m>=t||m<0||y&&p>=c}function g(){var a=F();if(N(a))return A(a);s=setTimeout(g,ee(a))}function A(a){return s=void 0,M&&r?R(a):(r=i=void 0,d)}function te(){s!==void 0&&clearTimeout(s),l=0,r=f=i=s=void 0}function re(){return s===void 0?d:A(F())}function C(){var a=F(),m=N(a);if(r=arguments,i=this,f=a,m){if(s===void 0)return Z(f);if(y)return clearTimeout(s),s=setTimeout(g,t),R(f)}return s===void 0&&(s=setTimeout(g,t)),d}return C.cancel=te,C.flush=re,C}var it=ot;const bt=ne(it);var at=function(){var e=ie(b.useState({}),2),t=e[1];return b.useCallback(function(){return t({})},[])};function yt(e){const{value:t,defaultValue:n,onChange:r}=e,i=at(),c=b.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=L((s,f=!1)=>{const l=typeof s=="function"?s(c.current):s;if(!(!f&&l===c.current))return c.current=l,i(),r==null?void 0:r(l)});return[c.current,d]}var Q={exports:{}},o={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var P=Symbol.for("react.element"),k=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),O=Symbol.for("react.context"),ct=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),st=Symbol.for("react.offscreen"),Y;Y=Symbol.for("react.module.reference");function u(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case P:switch(e=e.type,e){case $:case j:case T:case _:case E:return e;default:switch(e=e&&e.$$typeof,e){case ct:case O:case h:case I:case w:case x:return e;default:return t}}case k:return t}}}o.ContextConsumer=O;o.ContextProvider=x;o.Element=P;o.ForwardRef=h;o.Fragment=$;o.Lazy=I;o.Memo=w;o.Portal=k;o.Profiler=j;o.StrictMode=T;o.Suspense=_;o.SuspenseList=E;o.isAsyncMode=function(){return!1};o.isConcurrentMode=function(){return!1};o.isContextConsumer=function(e){return u(e)===O};o.isContextProvider=function(e){return u(e)===x};o.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===P};o.isForwardRef=function(e){return u(e)===h};o.isFragment=function(e){return u(e)===$};o.isLazy=function(e){return u(e)===I};o.isMemo=function(e){return u(e)===w};o.isPortal=function(e){return u(e)===k};o.isProfiler=function(e){return u(e)===j};o.isStrictMode=function(e){return u(e)===T};o.isSuspense=function(e){return u(e)===_};o.isSuspenseList=function(e){return u(e)===E};o.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$||e===j||e===T||e===_||e===E||e===st||typeof e=="object"&&e!==null&&(e.$$typeof===I||e.$$typeof===w||e.$$typeof===x||e.$$typeof===O||e.$$typeof===h||e.$$typeof===Y||e.getModuleId!==void 0)};o.typeOf=u;Q.exports=o;var ut=Q.exports;function pt(e,t){const n=L(e);ae(()=>{const r=t.current;if(r)if(window.ResizeObserver){let i;const c=new ResizeObserver(()=>{i=window.requestAnimationFrame(()=>n(r))});return c.observe(r),()=>{window.cancelAnimationFrame(i),c.disconnect()}}else n(r)},[t])}function ft(e,t,n){if(e&&typeof MutationObserver<"u"){let r=new MutationObserver(()=>{n()});return r.observe(e,t),()=>{r&&(r.disconnect(),r=null)}}return()=>{}}function vt(e,t,n){const r=L(e);b.useEffect(()=>ft(t.current,n,r),[t])}function gt(e,t,n){let r=e;return t!==void 0&&(r=Math.max(e,t)),n!==void 0&&(r=Math.min(r,n)),r}function St(e,t){let n=0;function r(i){oe.Children.forEach(i,c=>{ut.isFragment(c)?r(c.props.children):(t(c,n),n+=1)})}r(e)}export{pt as a,vt as b,gt as c,L as d,it as e,bt as f,at as g,H as i,ut as r,St as t,yt as u};
