import{n as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{d as n,l as r}from"./preact.module-CNakwbc9.js";var i=t({useCallback:()=>p,useContext:()=>m,useDebugValue:()=>h,useEffect:()=>c,useErrorBoundary:()=>g,useId:()=>_,useImperativeHandle:()=>d,useLayoutEffect:()=>l,useMemo:()=>f,useReducer:()=>s,useRef:()=>u,useState:()=>o});function a(e,t){A.__h&&A.__h(T,e,O||t),O=0;var n=T.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function o(e){return O=1,s(C,e)}function s(e,t,n){var r=a(w++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):C(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=T,!T.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,a=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),o){var s=o.call(this,e,t,n);return i?s||a:s}return!i||a};T.__f=!0;var o=T.shouldComponentUpdate,s=T.componentWillUpdate;T.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},T.shouldComponentUpdate=i}return r.__N||r.__}function c(e,t){var n=a(w++,3);!A.__s&&S(n.__H,t)&&(n.__=e,n.u=t,T.__H.__h.push(n))}function l(e,t){var n=a(w++,4);!A.__s&&S(n.__H,t)&&(n.__=e,n.u=t,T.__h.push(n))}function u(e){return O=5,f(function(){return{current:e}},[])}function d(e,t,n){O=6,l(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function f(e,t){var n=a(w++,7);return S(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function p(e,t){return O=8,f(function(){return e},t)}function m(e){var t=T.context[e.__c],n=a(w++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(T)),t.props.value):e.__}function h(e,t){A.useDebugValue&&A.useDebugValue(t?t(e):e)}function g(e){var t=a(w++,10),n=o();return t.__=e,T.componentDidCatch||=function(e,r){t.__&&t.__(e,r),n[1](e)},[n[0],function(){n[1](void 0)}]}function _(){var e=a(w++,11);if(!e.__){for(var t=T.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+n[1]++}return e.__}function v(){for(var e;e=k.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(b),t.__h.some(x),t.__h=[]}catch(n){t.__h=[],A.__e(n,e.__v)}}}function y(e){var t,n=function(){clearTimeout(r),L&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);L&&(t=requestAnimationFrame(n))}function b(e){var t=T,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),T=t}function x(e){var t=T;e.__c=e.__(),T=t}function S(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function C(e,t){return typeof t==`function`?t(e):t}var w,T,E,D,O,k,A,j,M,N,P,F,I,L,R=e((()=>{r(),O=0,k=[],A=n,j=A.__b,M=A.__r,N=A.diffed,P=A.__c,F=A.unmount,I=A.__,A.__b=function(e){T=null,j&&j(e)},A.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),I&&I(e,t)},A.__r=function(e){M&&M(e),w=0;var t=(T=e.__c).__H;t&&(E===T?(t.__h=[],T.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(b),t.__h.some(x),t.__h=[],w=0)),E=T},A.diffed=function(e){N&&N(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(k.push(t)!==1&&D===A.requestAnimationFrame||((D=A.requestAnimationFrame)||y)(v)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),E=T=null},A.__c=function(e,t){t.some(function(e){try{e.__h.some(b),e.__h=e.__h.filter(function(e){return!e.__||x(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],A.__e(n,e.__v)}}),P&&P(e,t)},A.unmount=function(e){F&&F(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{b(e)}catch(e){t=e}}),n.__H=void 0,t&&A.__e(t,n.__v))},L=typeof requestAnimationFrame==`function`}));export{l as a,_ as c,R as d,p as f,f as i,c as l,s as m,d as n,g as o,m as p,h as r,o as s,u as t,i as u};