"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4565],{4791:(e,a,t)=>{t.d(a,{A:()=>n});var l=t(4848),i=t(6540),c=t(5113);function n(e){let{user:a,userImage:t,setUserImage:n,database:s,className:d}=e,r=i.useRef();return(0,l.jsxs)("div",{className:"card no-hover col"+(d?" "+d:""),children:[(0,l.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,l.jsx)("img",{src:t?"string"==typeof t?t:t.imageBase64Full:"/images/user-preset.png",alt:"Database Image",width:100,className:"w-full h-full object-cover",ref:r,"data-imagepreview":"image"})}),(0,l.jsxs)("div",{className:"w-full flex-col image-selector-wrapper",children:[(0,l.jsx)("div",{className:"button outlined secondary w-full whitespace-normal",onClick:e=>{e.target.closest(".image-selector-wrapper").querySelector("input").click()},children:"Upload Image"}),(0,l.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Database Image",className:"hidden",onChange:async e=>{n(await (0,c.A)({imageInputFile:e.target.files[0],maxWidth:400}))}})]})]})}t(5165)},5165:(e,a,t)=>{t.d(a,{Ay:()=>n,PB:()=>s,fs:()=>d});var l=t(4848),i=t(6897),c=t(6540);function n(e){let{children:a,title:t,data:n,fullPage:s,wrapperClasses:r,closePopupDispatch:o,wrapperStyle:p,noContainer:h}=e;return s?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(r||""),"data-popupid":t||null,style:p,children:[h?(0,l.jsx)(c.Fragment,{children:a}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":n?JSON.stringify(n):"",children:a}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{d(),o&&o()},children:(0,l.jsx)(i.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),o&&o()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[h?(0,l.jsx)(c.Fragment,{children:a}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":n?JSON.stringify(n):"",children:[a,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{d(),o&&o()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),h&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{d(),o&&o()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),o&&o()}})]})}function s(e,a){let t=document.querySelector("[data-popupid='".concat(e,"']"));t&&(t.style.display="flex",a&&a(t))}function d(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},5113:(e,a,t)=>{t.d(a,{A:()=>l});async function l(e){let a,t,{imageInputFile:l,maxWidth:i}=e,c=document.querySelector("[data-imagepreview='image']"),n=l.name.replace(/\..*/,""),s=document.createElement("canvas"),d=l.type,r=i||null,o=URL.createObjectURL(l),p=new Image;return p.src=o,a=await new Promise((e,a)=>{p.onerror=function(){URL.revokeObjectURL(this.src),console.log("Cannot load image")},p.onload=function(){if(URL.revokeObjectURL(this.src),r){let e=r/p.naturalWidth;s.width=p.naturalWidth{e.src=t}),e(t)}}),t=await new Promise((e,a)=>{s.toBlob(a=>{e(null==a?void 0:a.size)},d,.95)}),{imageBase64:a.replace(/.*?base64,/,""),imageBase64Full:a,imageName:n,imageSize:t}}},7216:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},5014:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},9140:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},2894:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},9508:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},9753:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},1915:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},7273:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},5922:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},6897:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(5737).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])}}]);