(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{6179:function(e,t,n){Promise.resolve().then(n.t.bind(n,3062,23)),Promise.resolve().then(n.bind(n,2009)),Promise.resolve().then(n.bind(n,4166)),Promise.resolve().then(n.t.bind(n,4780,23))},9942:function(e,t,n){"use strict";n.d(t,{_:function(){return r}}),n(8478);var r=(0,n(8649).$)("148282daf28166207a83e9684260c8158e47e646")},2837:function(e,t,n){"use strict";n.d(t,{v:function(){return r}}),n(8478);var r=(0,n(8649).$)("4a60d0c8b315bcd430b99cd5bbbb3549499a2979")},2009:function(e,t,n){"use strict";n.d(t,{ThemeProvider:function(){return i}});var r=n(3229);n(8355);var o=n(1659);function i(e){let{children:t,...n}=e;return(0,r.jsx)(o.f,{...n,children:t})}},4166:function(e,t,n){"use strict";n.d(t,{DocumentsProvider:function(){return _},s:function(){return v}});var r=n(3229),o=n(8355);n(8478);var i=n(8649),a=(0,i.$)("e9cb305fe64d8825c8e6be0754285718293d5097"),u=n(8593),c=n(9942),s=(0,i.$)("1da8ed2f74e58f66d4e2a54aaa973837fede5566"),d=n(2837),l=n(6404);let f=(0,o.createContext)(void 0),v=()=>{let e=(0,o.useContext)(f);if(void 0===e)throw Error("Cannot call `useDocument()` outside of a DocumentsContext provider!");return e},_=e=>{let[t,n]=(0,o.useState)(e.initialDocumentsDirectoryMetadata),[i,v]=(0,o.useState)({}),[_,b]=(0,o.useState)({});return"true"!==l.env.NEXT_PUBLIC_IS_BUILDING&&(0,u.z)(async t=>{let r=await a(e.initialDocumentsDirectoryMetadata.absolutePath);if(r)n(r);else throw Error("Hot reloading: unable to find the documents directory to update the sidebar");for await(let e of t){if(!e.filename.match(/\.(js|jsx|ts|tsx)$/))return;let t=e.filename,n=await s(t);if(void 0!==i[n]){console.debug("pathForChangedDocument",n);let e=await (0,c._)(n);v(t=>({...t,[n]:e}))}}}),(0,r.jsx)(f.Provider,{value:{documentsDirectoryMetadata:t,useDocumentRenderingResult:(e,t)=>((0,o.useEffect)(()=>{void 0===i[e]&&v(n=>({...n,[e]:t}))},[t,e]),void 0!==i[e])?i[e]:t,renderDocumentToPDF:d.v,pageConfigs:_,setPageConfig:(e,t)=>{b(n=>({...n,[e]:t}))}},children:e.children})}},8593:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var r=n(8355),o=n(5497);let i=e=>{let t=(0,r.useRef)(null);(0,r.useEffect)(()=>{t.current||(t.current=(0,o.io)());let n=t.current;return n.on("reload",t=>{console.log("Reloading..."),e(t)}),()=>{n.off()}},[e])}},4780:function(){},3062:function(e){e.exports={style:{fontFamily:"'__Inter_d65c78', '__Inter_Fallback_d65c78'",fontStyle:"normal"},className:"__className_d65c78",variable:"__variable_d65c78"}}},function(e){e.O(0,[613,1,698,267,744],function(){return e(e.s=6179)}),_N_E=e.O()}]);