"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1210],{51210:function(e,t,i){i.r(t),i.d(t,{default:function(){return f}});var n=i(57437),a=i(2265),l=i(57818),d=i(60266),r=i(50495),s=i(10077),o=i(46613);let c=(0,l.default)(async()=>(await Promise.resolve().then(i.t.bind(i,60266,23))).Excalidraw,{loadableGenerated:{webpack:()=>[60266]},ssr:!1});function f(e){let[t,i]=(0,a.useState)([]),[l,f]=(0,a.useState)(!1),u=e=>void 0!==e.x&&void 0!==e.y&&void 0!==e.id&&void 0!==e.type;return(0,a.useEffect)(()=>{onkeydown=l?e=>{"Escape"===e.key&&(f(!1),window.dispatchEvent(new Event("resize")))}:null},[l]),(0,a.useEffect)(()=>{let t=[];for(let i of e.data)u(i)&&t.push(i);let n=[];for(let e of t)if("frame"!==e.type){if("arrow"===e.type){if(e.start&&!t.find(t=>{var i;return t.id===(null===(i=e.start)||void 0===i?void 0:i.id)})||e.end&&!t.find(t=>{var i;return t.id===(null===(i=e.end)||void 0===i?void 0:i.id)}))continue;n.push(e)}else n.push(e)}for(let e of t)if("frame"===e.type){var a;let t=null===(a=e.children)||void 0===a?void 0:a.map(e=>n.find(t=>t.id===e)),i=null==t?void 0:t.map(e=>null==e?void 0:e.id).filter(e=>void 0!==e);if(void 0===i||0===i.length)continue;n.push({...e,children:i})}i((0,d.convertToExcalidrawElements)(n))},[]),(0,n.jsx)("div",{className:"relative",children:(0,n.jsxs)("div",{className:"".concat(l?"fixed inset-0 bg-black bg-opacity-50 backdrop-blur-sm z-50 flex items-center justify-center":""),children:[(0,n.jsx)(r.z,{onClick:()=>{f(!l),window.dispatchEvent(new Event("resize"))},variant:"outline",className:"".concat(l?"absolute top-2 left-2 z-[60]":""),children:l?(0,n.jsx)(s.f,{className:"h-4 w-4"}):(0,n.jsx)(o.t,{className:"h-4 w-4"})}),(0,n.jsx)("div",{className:"\n                    ".concat(l?"w-[80vw] h-[80vh]":"w-full h-[500px]","\n                    bg-white overflow-hidden rounded-lg relative\n                "),children:(0,n.jsx)(c,{initialData:{elements:t,appState:{zenModeEnabled:!0},scrollToContent:!0},theme:"dark"===localStorage.getItem("theme")?"dark":"light",validateEmbeddable:!0,renderTopRightUI:(e,t)=>(0,n.jsx)(n.Fragment,{})})})]})})}}}]);