import{v as h,w as p,r as a,R as n,H as E,x as v,y as R,D as _,u as f}from"./iframe-B0O0VXUn.js";import{_ as y}from"./preload-helper-PPVm8Dsz.js";const w=Object.freeze(Object.defineProperty({__proto__:null,MDXProvider:h,useMDXComponents:f},Symbol.toStringTag,{value:"Module"}));var s={},m;function x(){if(m)return s;m=1;var e=p();return s.createRoot=e.createRoot,s.hydrateRoot=e.hydrateRoot,s}var D=x(),i=new Map;function g(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var C=({callback:e,children:r})=>{let t=a.useRef();return a.useLayoutEffect(()=>{t.current!==e&&(t.current=e,e())},[e]),r};typeof Promise.withResolvers>"u"&&(Promise.withResolvers=()=>{let e=null,r=null;return{promise:new Promise((t,o)=>{e=t,r=o}),resolve:e,reject:r}});var M=async(e,r,t)=>{let o=await T(r,t);if(g()){o.render(e);return}let{promise:u,resolve:c}=Promise.withResolvers();return o.render(a.createElement(C,{callback:c},e)),u},P=(e,r)=>{let t=i.get(e);t&&(t.unmount(),i.delete(e))},T=async(e,r)=>{let t=i.get(e);return t||(t=D.createRoot(e,r),i.set(e,t)),t},A={code:R,a:v,...E},O=class extends a.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:r}=this.props;r(e)}render(){let{hasError:e}=this.state,{children:r}=this.props;return e?null:n.createElement(n.Fragment,null,r)}},N=class{constructor(){this.render=async(e,r,t)=>{let o={...A,...r?.components},u=_;return new Promise((c,d)=>{y(async()=>{const{MDXProvider:l}=await Promise.resolve().then(()=>w);return{MDXProvider:l}},void 0,import.meta.url).then(({MDXProvider:l})=>M(n.createElement(O,{showException:d,key:Math.random()},n.createElement(l,{components:o},n.createElement(u,{context:e,docsParameter:r}))),t)).then(()=>c())})},this.unmount=e=>{P(e)}}};export{N as DocsRenderer,A as defaultComponents};
