(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{7993: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).$)("34b3639282c8bdfa324bd1563be325e2d93bedb3")},2837:function(e,t,n){"use strict";n.d(t,{v:function(){return r}}),n(8478);var r=(0,n(8649).$)("9d97062bfb18aa8aea9de24f895e59cedb1435c8")},2009:function(e,t,n){"use strict";n.d(t,{ThemeProvider:function(){return a}});var r=n(3229);n(8355);var o=n(1659);function a(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 v},s:function(){return b}});var r=n(3229),o=n(8355);n(8478);var a=n(8649),i=(0,a.$)("3b21ef3c63aaa8a5efbac601292c20781fba04c2"),c=n(8593),u=n(9942),s=(0,a.$)("f95c575acad51775c4eec4a49b8988b0117dccd9"),l=n(2837),d=n(6404);let f=(0,o.createContext)(void 0),b=()=>{let e=(0,o.useContext)(f);if(void 0===e)throw Error("Cannot call `useDocument()` outside of a DocumentsContext provider!");return e},v=e=>{let[t,n]=(0,o.useState)(e.initialDocumentsDirectoryMetadata),[a,b]=(0,o.useState)({}),[v,_]=(0,o.useState)({});return"true"!==d.env.NEXT_PUBLIC_IS_BUILDING&&(0,c.z)(async t=>{let r=await i(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!==a[n]){console.log("pathForChangedDocument",n);let e=await (0,u._)(n);b(t=>({...t,[n]:e}))}}}),(0,r.jsx)(f.Provider,{value:{documentsDirectoryMetadata:t,useDocumentRenderingResult:(e,t)=>((0,o.useEffect)(()=>{void 0===a[e]&&b(n=>({...n,[e]:t}))},[t,e]),void 0!==a[e])?a[e]:t,renderDocumentToPDF:l.v,pageConfigs:v,setPageConfig:(e,t)=>{_(n=>({...n,[e]:t}))}},children:e.children})}},8593:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var r=n(8355),o=n(5497);let a=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=7993)}),_N_E=e.O()}]);