From 9a101ffaddcc53076a7e91acef3a040004a05e0a Mon Sep 17 00:00:00 2001 From: Github Actions Date: Mon, 11 Dec 2023 22:27:13 +0000 Subject: [PATCH] ci: automatic build fixes --- .../{index-a85120ae.js => index-e20ed2ad.js} | 16 +++++----------- build/index.html | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) rename build/assets/{index-a85120ae.js => index-e20ed2ad.js} (99%) diff --git a/build/assets/index-a85120ae.js b/build/assets/index-e20ed2ad.js similarity index 99% rename from build/assets/index-a85120ae.js rename to build/assets/index-e20ed2ad.js index 14092aea1..62f002c40 100644 --- a/build/assets/index-a85120ae.js +++ b/build/assets/index-e20ed2ad.js @@ -3701,7 +3701,7 @@ A Bitcoin Podcast. ${style$2} ${({color:tt="primaryText1"})=>`color: ${colors[tt]};`} -`,defaultParams={skip:"0",limit:"500"},getRadarData=async(tt=defaultParams)=>await api.get(`/radar?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getTopicsData=async(tt=defaultParams)=>await api.get(`/topics?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getAboutData=async()=>await api.get("/about"),getStats=async()=>await api.get("/stats"),getEdgeTypes=async()=>await api.get("/curation/edge/type"),postEdgeType=async tt=>await api.post("/curation/edge",JSON.stringify(tt)),postAboutData=async tt=>await api.post("/about",JSON.stringify(tt)),postMergeTopics=async tt=>await api.post("/curation/merge",JSON.stringify(tt)),triggerRadarJob=async()=>api.get("/radar/trigger-job"),putRadarData=async(tt,et)=>await api.put(`/radar/${tt}`,JSON.stringify(et)),putNodeData=async tt=>await api.put("/node",JSON.stringify(tt)),approveRadarData=async(tt,et)=>await api.put(`/radar/${tt}/approve`,JSON.stringify({approve:"True",pubkey:et})),deleteRadarData=async tt=>await api.delete(`/radar/${tt}`),sphinxPubkey="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",boostAgainstBudget=async tt=>{let et=await distExports$1.enable(!0);if(et||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),et=await distExports$1.keysend(sphinxPubkey,tt),!(et!=null&&et.success)){if(et=await distExports$1.topup(),!(et!=null&&et.budget)||(et==null?void 0:et.budget){const nt=await boostAgainstBudget(et),rt={amount:et,refid:tt};return await api.post("/boost",JSON.stringify(rt)),nt};function formatBudget(tt){return tt===null?"?":tt.toLocaleString().split(",").join(" ")}function formatDescription(tt){return tt?String(tt).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}var lodash={exports:{}};/** +`,defaultParams={skip:"0",limit:"500"},getRadarData=async(tt=defaultParams)=>await api.get(`/radar?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getTopicsData=async(tt=defaultParams)=>await api.get(`/topics?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getAboutData=async()=>await api.get("/about"),getStats=async()=>await api.get("/stats"),getEdgeTypes=async()=>await api.get("/curation/edge/type"),postEdgeType=async tt=>await api.post("/curation/edge",JSON.stringify(tt)),postAboutData=async tt=>await api.post("/about",JSON.stringify(tt)),postMergeTopics=async tt=>await api.post("/curation/merge",JSON.stringify(tt)),putRadarData=async(tt,et)=>await api.put(`/radar/${tt}`,JSON.stringify(et)),putNodeData=async tt=>await api.put("/node",JSON.stringify(tt)),approveRadarData=async(tt,et)=>await api.put(`/radar/${tt}/approve`,JSON.stringify({approve:"True",pubkey:et})),deleteRadarData=async tt=>await api.delete(`/radar/${tt}`),sphinxPubkey="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",boostAgainstBudget=async tt=>{let et=await distExports$1.enable(!0);if(et||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),et=await distExports$1.keysend(sphinxPubkey,tt),!(et!=null&&et.success)){if(et=await distExports$1.topup(),!(et!=null&&et.budget)||(et==null?void 0:et.budget){const nt=await boostAgainstBudget(et),rt={amount:et,refid:tt};return await api.post("/boost",JSON.stringify(rt)),nt};function formatBudget(tt){return tt===null?"?":tt.toLocaleString().split(",").join(" ")}function formatDescription(tt){return tt?String(tt).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}var lodash={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -5122,7 +5122,7 @@ outputColor=vec4(color,inputColor.a);}`,VignetteEffect=class extends Effect$1{co font-weight: 500; border-radius: 6px; margin-right: 5px; -`;const variableVector3=new Vector3,NodeBadge=({position:tt,userData:et,color:nt})=>{const rt=reactExports.useRef(null),[it,ot]=useDataStore(pt=>[pt.selectedNode,pt.setSelectedNode]),at=useDataStore(pt=>pt.setHoveredNode),st=useDataStore(pt=>pt.hoveredNode),lt=useDataStore(pt=>pt.showSelectionGraph),ct=((et==null?void 0:et.node_type)||"")==="topic",ut=((et==null?void 0:et.node_type)||"")==="guest"||((et==null?void 0:et.node_type)||"")==="person";useFrame(()=>{if(lt&&rt.current){const pt=variableVector3.set((et==null?void 0:et.x)||0,(et==null?void 0:et.y)||0,(et==null?void 0:et.z)||0);rt.current.position.copy(pt)}}),reactExports.useEffect(()=>function(){rt.current&&rt.current.clear()},[rt]);const ht=reactExports.useMemo(()=>(st==null?void 0:st.ref_id)===(et==null?void 0:et.ref_id),[st==null?void 0:st.ref_id,et==null?void 0:et.ref_id]),dt=(it==null?void 0:it.ref_id)===(et==null?void 0:et.ref_id);return ct||dt&<||!dt?jsxRuntimeExports.jsx("group",{ref:rt,position:tt,children:jsxRuntimeExports.jsx(Html$1,{center:!0,sprite:!0,zIndexRange:[0,0],children:jsxRuntimeExports.jsxs(Tag,{className:clsx$2(et==null?void 0:et.node_type,{selected:dt}),color:nt,fontColor:colors.white,fontSize:ct?64:20,onClick:pt=>{pt.stopPropagation(),et&&ot(et)},onPointerOut:pt=>{pt.stopPropagation(),at(null)},onPointerOver:pt=>{pt.stopPropagation(),at(et||null)},scale:ht?1.05:1,selected:!1,size:dt?100:68,type:(et==null?void 0:et.node_type)||"",children:[!ut&&!ct?jsxRuntimeExports.jsx("div",{className:"badge-wrapper",children:jsxRuntimeExports.jsx(TypeBadge,{type:(et==null?void 0:et.node_type)||""})}):null,ct?et==null?void 0:et.label:jsxRuntimeExports.jsx(Avatar$1,{rounded:ut,size:dt?60:52,src:(et==null?void 0:et.image_url)||"audio_default.svg",type:et==null?void 0:et.node_type})]})})}):null},RelevanceBadges=reactExports.memo(()=>{const tt=useDataStore(at=>at.data),et=useSelectedNode(),nt=useDataStore(at=>at.showSelectionGraph),rt=useDataStore(at=>at.selectionGraphData),it=useDataStore(at=>at.selectedNodeRelativeIds),ot=reactExports.useMemo(()=>(nt?rt.nodes:(tt==null?void 0:tt.nodes)||[]).filter(ct=>it.includes((ct==null?void 0:ct.ref_id)||"")||(et==null?void 0:et.ref_id)===(ct==null?void 0:ct.ref_id)).slice(0,maxChildrenDisplayed).map(ct=>{const ut=getNodeColorByType(ct.node_type||"",!0),ht=new Vector3((ct==null?void 0:ct.x)||0,(ct==null?void 0:ct.y)||0,(ct==null?void 0:ct.z)||0),dt=((tt==null?void 0:tt.nodes)||[]).filter(pt=>pt.ref_id&&nodesAreRelatives(pt,ct)).map(pt=>(pt==null?void 0:pt.ref_id)||"")||[];return jsxRuntimeExports.jsx(NodeBadge,{color:ut,position:ht,relativeIds:dt,userData:ct},`node-badge-${ct.ref_id}`)}),[it,tt==null?void 0:tt.nodes,nt,rt,et]);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:ot.length?ot:null},"node-badges")});RelevanceBadges.displayName="RelevanceBadges";const Segment=({link:tt,animated:et})=>{const nt=reactExports.useRef(null),rt=useSelectedNode(),[it,ot]=reactExports.useState(new Vector3(0,0,0)),[at,st]=reactExports.useState(new Vector3(0,0,0)),[lt,ct]=reactExports.useState(8947848),ut=useDataStore(ht=>ht.selectionGraphData);return reactExports.useEffect(()=>{var pt,mt,gt,bt,yt,wt;const ht=(rt==null?void 0:rt.ref_id)||"",dt=rt&&(ht===tt.targetRef||ht===tt.sourceRef);!tt.onlyVisibleOnSelect||dt?(ot(new Vector3(((pt=tt.sourcePosition)==null?void 0:pt.x)||0,((mt=tt.sourcePosition)==null?void 0:mt.y)||0,((gt=tt.sourcePosition)==null?void 0:gt.z)||0)),st(new Vector3(((bt=tt.targetPosition)==null?void 0:bt.x)||0,((yt=tt.targetPosition)==null?void 0:yt.y)||0,((wt=tt.targetPosition)==null?void 0:wt.z)||0))):(ot(new Vector3(0,0,0)),st(new Vector3(0,0,0))),ct(dt?tt.color||NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor:rt?5592405:8947848)},[rt,tt]),useFrame(()=>{if(et&&nt.current){const ht=ut.nodes.find(pt=>pt.ref_id===tt.sourceRef),dt=ut.nodes.find(pt=>pt.ref_id===tt.targetRef);nt.current.start.set((ht==null?void 0:ht.x)||0,(ht==null?void 0:ht.y)||0,(ht==null?void 0:ht.z)||0),nt.current.end.set((dt==null?void 0:dt.x)||0,(dt==null?void 0:dt.y)||0,(dt==null?void 0:dt.z)||0)}}),jsxRuntimeExports.jsx(Segment$1,{ref:nt,color:"0xFFFFFF",end:at,start:it})},fontProps={font:"/fonts/Inter-Bold.woff",characters:"abcdefghijklmnopqrstuvwxyz0123456789!",fontSize:2,letterSpacing:-.05,lineHeight:1,"material-toneMapped":!1},TextNode=reactExports.memo(({node:tt,hide:et})=>{const nt=reactExports.useRef(null),rt=useSelectedNode(),ot=useDataStore(ut=>ut.selectedNodeRelativeIds).includes((tt==null?void 0:tt.ref_id)||""),at=!!rt&&(rt==null?void 0:rt.id)===tt.id,st=useDataStore(ut=>ut.showSelectionGraph);useFrame(({camera:ut})=>{nt!=null&&nt.current&&(nt.current.quaternion.copy(ut.quaternion),st&&nt.current.position.set(tt.x,tt.y,tt.z))});const lt=reactExports.useMemo(()=>{let ut=(tt.scale||1)*4;return st&&at?ut=40:!at&&ot&&(ut=0),ut},[tt.scale,at,ot,st]),ct=reactExports.useMemo(()=>rt&&rt.node_type==="topic"&&!at?.2:1,[at,rt]);return jsxRuntimeExports.jsx(Text$2,{ref:nt,anchorX:"center",anchorY:"middle",color:colors.white,fillOpacity:ct,position:[tt.x,tt.y,tt.z],scale:lt,userData:tt,visible:!et&&!at,...fontProps,children:tt.label})});TextNode.displayName="TextNode";let simulation2d=null;const SelectionDataNodes=reactExports.memo(()=>{const tt=useGraphData(),et=useSelectedNode(),nt=useDataStore(ot=>ot.selectedNodeRelativeIds),rt=useDataStore(ot=>ot.selectionGraphData),it=useDataStore(ot=>ot.setSelectionData);return reactExports.useEffect(()=>{const ot=tt.nodes.filter(st=>st.ref_id===(et==null?void 0:et.ref_id)||nt.includes((st==null?void 0:st.ref_id)||"")).map(st=>{const lt=st.ref_id===(et==null?void 0:et.ref_id)&&st.node_type!=="topic"?{fx:0,fy:0,fz:0}:{};return{...st,x:0,y:0,z:0,...lt}}),at=generateLinksFromNodeData(ot,!1,!1);it({nodes:ot,links:at})},[tt,et,nt,it]),reactExports.useEffect(()=>{simulation2d=runForceSimulation(rt.nodes,rt.links,{numDimensions:2,forceLinkStrength:.01,forceCenterStrength:.85,forceChargeStrength:-20,velocityDecay:.9})},[rt]),useFrame(()=>{simulation2d&&simulation2d.tick()}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt==null?void 0:rt.nodes.map(ot=>ot.node_type==="topic"?jsxRuntimeExports.jsx(TextNode,{hide:!0,node:ot},`${ot.ref_id||ot.id}-compact`):jsxRuntimeExports.jsx(Cube,{animated:!0,hide:!0,node:ot},`${ot.ref_id||ot.id}-compact`)),jsxRuntimeExports.jsx(Segments,{fog:!0,lineWidth:.9,children:(rt==null?void 0:rt.links).map((ot,at)=>jsxRuntimeExports.jsx(Segment,{animated:!0,link:ot},at.toString()))},`selection-links-${rt==null?void 0:rt.links.length}`)]})});SelectionDataNodes.displayName="SelectionDataNodes";const Cubes=reactExports.memo(()=>{const tt=useGraphData(),et=useSelectedNode(),nt=useDataStore(dt=>dt.nearbyNodeIds),rt=useDataStore(dt=>dt.setHoveredNode),it=useDataStore(dt=>dt.showSelectionGraph),ot=useDataStore(dt=>dt.selectionGraphData),at=useAppStore(dt=>dt.setTranscriptOpen),st=reactExports.useCallback(dt=>!!(it&&!ot.nodes.find(pt=>pt.ref_id===dt.ref_id)),[it,ot]),lt=reactExports.useCallback(dt=>{const pt=dt==null?void 0:dt[0];pt&&(at(!1),pt.userData&&(st(pt.userData)||useDataStore.getState().setSelectedNode((pt==null?void 0:pt.userData)||null)))},[at,st]),ct=reactExports.useCallback(dt=>{dt.stopPropagation(),rt(null)},[rt]),ut=reactExports.useCallback(dt=>{var gt;const mt=dt.intersections.map(bt=>bt.object)[0];if((gt=mt==null?void 0:mt.userData)!=null&>.ref_id){const bt=mt.userData;st(bt)||(dt.stopPropagation(),rt(bt))}},[rt,st]),ht=it&&!!et;return jsxRuntimeExports.jsxs(Select$1,{filter:dt=>dt.filter(pt=>{var mt;return!!((mt=pt.userData)!=null&&mt.id)}),onChange:lt,onPointerOut:ct,onPointerOver:ut,children:[jsxRuntimeExports.jsx(BlurryInstances,{hide:ht}),jsxRuntimeExports.jsx(RelevanceBadges,{}),tt.nodes.filter(dt=>{const pt=(dt==null?void 0:dt.ref_id)===(et==null?void 0:et.ref_id);return nt.includes(dt.ref_id||"")||isMainTopic(dt)||pt}).map(dt=>dt.node_type==="topic"?jsxRuntimeExports.jsx(TextNode,{hide:ht,node:dt},dt.ref_id||dt.id):jsxRuntimeExports.jsx(Cube,{hide:ht,node:dt},dt.ref_id||dt.id)),ht&&jsxRuntimeExports.jsx(SelectionDataNodes,{})]})});Cubes.displayName="Cubes";const defaultData$7={earthRef:null},useRefStore=react(tt=>({...defaultData$7,setEarthRef:et=>tt({earthRef:et})})),getCurvedLineFromStartAndEnd=(tt,et)=>{const nt=new Quaternion().setFromUnitVectors(new Vector3(0,1,0),tt.clone().normalize()),rt=new Quaternion().setFromUnitVectors(new Vector3(0,1,0),et.clone().normalize()),it=new Quaternion,ot=50,at=[];for(let lt=0;lt<=ot;lt+=1){const ct=lt/ot;it.slerpQuaternions(nt,rt,ct);const ut=new Vector3(0,1,0).applyQuaternion(it).multiplyScalar(EARTH_RADIUS+EARTH_DATA_PADDING);at.push(ut)}return new CatmullRomCurve3(at).getPoints(ot)},CurvedLine=({link:tt})=>{const et=useSelectedNode(),[nt,rt]=reactExports.useState(8947848);reactExports.useEffect(()=>{const ot=(et==null?void 0:et.ref_id)||"",at=et&&(ot===tt.targetRef||ot===tt.sourceRef);rt(at?tt.color||NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor:et?5592405:8947848)},[et,tt]);const it=reactExports.useMemo(()=>{var ct,ut,ht,dt,pt,mt;const ot=(et==null?void 0:et.ref_id)||"",at=et&&(ot===tt.targetRef||ot===tt.sourceRef);if(!(!tt.onlyVisibleOnSelect||at))return[];const st=new Vector3(((ct=tt.sourcePosition)==null?void 0:ct.x)||0,((ut=tt.sourcePosition)==null?void 0:ut.y)||0,((ht=tt.sourcePosition)==null?void 0:ht.z)||0),lt=new Vector3(((dt=tt.targetPosition)==null?void 0:dt.x)||0,((pt=tt.targetPosition)==null?void 0:pt.y)||0,((mt=tt.targetPosition)==null?void 0:mt.z)||0);return getCurvedLineFromStartAndEnd(st,lt)},[tt,et]);return it.length?jsxRuntimeExports.jsx(Line$1,{color:nt,dashed:!1,lineWidth:3,points:it}):null},center$1=new Vector3(0,0,0),Earth=()=>{const tt=reactExports.useRef(null),et=reactExports.useRef(null),nt=useDataStore(lt=>lt.graphStyle),rt=useDataStore(lt=>lt.showSelectionGraph),it=useDataStore(lt=>lt.data),ot=useRefStore(lt=>lt.setEarthRef),at=useTexture("textures/earth/galaxy.png"),st=useTexture("textures/earth/clouds.png");return useFrame(({camera:lt})=>{et.current&&et.current.position.copy(lt.getWorldPosition(center$1))}),reactExports.useLayoutEffect(()=>{tt.current&&ot(tt)},[ot]),nt!=="earth"||rt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("mesh",{ref:tt,userData:{type:"earth"},children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS,200,200]}),jsxRuntimeExports.jsx(EarthMaterial,{})]}),jsxRuntimeExports.jsxs("mesh",{children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS+2,200,200]}),jsxRuntimeExports.jsx("meshStandardMaterial",{alphaMap:st,map:st,transparent:!0})]}),jsxRuntimeExports.jsxs("mesh",{children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS*4,200,200]}),jsxRuntimeExports.jsx("meshStandardMaterial",{map:at,opacity:.4,side:DoubleSide,transparent:!0})]}),jsxRuntimeExports.jsx("directionalLight",{ref:et,intensity:.9,position:[0,0,EARTH_RADIUS*3]}),it==null?void 0:it.links.map((lt,ct)=>jsxRuntimeExports.jsx(CurvedLine,{link:lt},`curved-${ct}`))]})},EarthMaterial=()=>{const tt=useTexture("textures/earth/earth.jpeg"),et=useTexture("textures/earth/bump.jpeg"),nt=useTexture("textures/earth/water.png"),rt=reactExports.useMemo(()=>new MeshStandardMaterial({map:tt,bumpMap:et,aoMap:et,roughnessMap:et,metalnessMap:nt,toneMapped:!0,roughness:35,metalness:0}),[tt,et,nt]);return jsxRuntimeExports.jsx("meshStandardMaterial",{...rt})},particleCount=2e3,radiusLimit=UNIVERSE_SCALE*4,colorsArray=Object.values(DATA_COLOR_PALETTE).map(tt=>tt),Particles=()=>{const tt=reactExports.useRef(null);useFrame(()=>{var at,st,lt;const it=((at=tt.current)==null?void 0:at.geometry.getAttribute("position")).array,ot=((st=tt.current)==null?void 0:st.geometry.getAttribute("velocity")).array;if(it&&ot){for(let ct=0;ctradiusLimit*radiusLimit){const wt=Math.random()*Math.PI*2,vt=Math.random()*Math.PI*2,kt=Math.random()*radiusLimit;it[ct]=Math.sin(wt)*Math.cos(vt)*kt,it[ct+1]=Math.sin(wt)*Math.sin(vt)*kt,it[ct+2]=Math.cos(wt)*kt}}((lt=tt.current)==null?void 0:lt.geometry.getAttribute("position")).needsUpdate=!0}});const et=reactExports.useMemo(()=>new Float32Array(particleCount*3),[]),nt=reactExports.useMemo(()=>new Float32Array(particleCount*3),[]);reactExports.useEffect(()=>{const it=radiusLimit;for(let ot=0;ot{rt.current&&tt.current&&(rt.current.setAttribute("position",new BufferAttribute(et,3)),rt.current.setAttribute("velocity",new BufferAttribute(nt,3)),tt.current.geometry=rt.current)},[et,nt]),reactExports.useEffect(()=>{if(rt.current){const it=[];for(let ot=0;ot({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:tt?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:tt?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:tt?"#ffffff66":"#5078f2",fontColor:tt?"#ffffff66":"#fff"}}),reuseableVector3=new Vector3,NodeControls=reactExports.memo(()=>{const tt=reactExports.useRef(null),et=useAppStore(ut=>ut.setSidebarOpen),nt=useDataStore(ut=>ut.showSelectionGraph),rt=useDataStore(ut=>ut.selectionGraphData),it=useDataStore(ut=>ut.data),ot=useSelectedNode(),at=useDataStore(ut=>ut.setSelectedNode),st=useDataStore(ut=>ut.setShowSelectionGraph);useFrame(()=>{lt()});const lt=reactExports.useCallback(()=>{const ut=nt?rt:it;if(tt.current){const ht=ut==null?void 0:ut.nodes.find(dt=>dt.ref_id===(ot==null?void 0:ot.ref_id));if(ht){const dt=reuseableVector3.set(ht==null?void 0:ht.x,ht==null?void 0:ht.y,ht==null?void 0:ht.z);tt.current.position.copy(dt)}}},[ot,nt,rt,it]),ct=reactExports.useMemo(()=>[{key:"control-key-1",colors:buttonColors(nt).focus,icon:jsxRuntimeExports.jsx(MdViewInAr,{}),left:10,className:"expand",onClick:()=>{const ut=!nt;st(ut),ut&&et(!0)}},{key:"control-key-2",colors:buttonColors(!0).close,icon:jsxRuntimeExports.jsx(MdClose,{}),left:40,className:"exit",onClick:()=>{at(null),st(!1)}}],[st,at,et,nt]);return ot?jsxRuntimeExports.jsx("group",{ref:tt,children:jsxRuntimeExports.jsx(Html$1,{center:!0,className:"control-panel",onClick:ut=>ut.stopPropagation(),onKeyDown:ut=>ut.stopPropagation(),onPointerDown:ut=>ut.stopPropagation(),onPointerOut:ut=>ut.stopPropagation(),onPointerOver:ut=>ut.stopPropagation(),onPointerUp:ut=>ut.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:ct.map(ut=>jsxRuntimeExports.jsx(IconButton,{backgroundColor:ut.colors.backgroundColor,borderColor:ut.colors.borderColor,className:ut.className,fontColor:ut.colors.fontColor,left:ut.left,onClick:ht=>{ht.stopPropagation(),ut.onClick()},children:ut.icon},ut.key))})}):null});NodeControls.displayName="NodeControls";const IconButton=styled$4.div` +`;const variableVector3=new Vector3,NodeBadge=({position:tt,userData:et,color:nt})=>{const rt=reactExports.useRef(null),[it,ot]=useDataStore(pt=>[pt.selectedNode,pt.setSelectedNode]),at=useDataStore(pt=>pt.setHoveredNode),st=useDataStore(pt=>pt.hoveredNode),lt=useDataStore(pt=>pt.showSelectionGraph),ct=((et==null?void 0:et.node_type)||"")==="topic",ut=((et==null?void 0:et.node_type)||"")==="guest"||((et==null?void 0:et.node_type)||"")==="person";useFrame(()=>{if(lt&&rt.current){const pt=variableVector3.set((et==null?void 0:et.x)||0,(et==null?void 0:et.y)||0,(et==null?void 0:et.z)||0);rt.current.position.copy(pt)}}),reactExports.useEffect(()=>function(){rt.current&&rt.current.clear()},[rt]);const ht=reactExports.useMemo(()=>(st==null?void 0:st.ref_id)===(et==null?void 0:et.ref_id),[st==null?void 0:st.ref_id,et==null?void 0:et.ref_id]),dt=(it==null?void 0:it.ref_id)===(et==null?void 0:et.ref_id);return ct||dt&<||!dt?jsxRuntimeExports.jsx("group",{ref:rt,position:tt,children:jsxRuntimeExports.jsx(Html$1,{center:!0,sprite:!0,zIndexRange:[0,0],children:jsxRuntimeExports.jsxs(Tag,{className:clsx$2(et==null?void 0:et.node_type,{selected:dt}),color:nt,fontColor:colors.white,fontSize:ct?64:20,onClick:pt=>{pt.stopPropagation(),et&&ot(et)},onPointerOut:pt=>{pt.stopPropagation(),at(null)},onPointerOver:pt=>{pt.stopPropagation(),at(et||null)},scale:ht?1.05:1,selected:!1,size:dt?100:68,type:(et==null?void 0:et.node_type)||"",children:[!ut&&!ct?jsxRuntimeExports.jsx("div",{className:"badge-wrapper",children:jsxRuntimeExports.jsx(TypeBadge,{type:(et==null?void 0:et.node_type)||""})}):null,ct?et==null?void 0:et.label:jsxRuntimeExports.jsx(Avatar$1,{rounded:ut,size:dt?60:52,src:(et==null?void 0:et.image_url)||"audio_default.svg",type:et==null?void 0:et.node_type})]})})}):null},RelevanceBadges=reactExports.memo(()=>{const tt=useDataStore(at=>at.data),et=useSelectedNode(),nt=useDataStore(at=>at.showSelectionGraph),rt=useDataStore(at=>at.selectionGraphData),it=useDataStore(at=>at.selectedNodeRelativeIds),ot=reactExports.useMemo(()=>(nt?rt.nodes:(tt==null?void 0:tt.nodes)||[]).filter(ct=>it.includes((ct==null?void 0:ct.ref_id)||"")||(et==null?void 0:et.ref_id)===(ct==null?void 0:ct.ref_id)).slice(0,maxChildrenDisplayed).map(ct=>{const ut=getNodeColorByType(ct.node_type||"",!0),ht=new Vector3((ct==null?void 0:ct.x)||0,(ct==null?void 0:ct.y)||0,(ct==null?void 0:ct.z)||0),dt=((tt==null?void 0:tt.nodes)||[]).filter(pt=>pt.ref_id&&nodesAreRelatives(pt,ct)).map(pt=>(pt==null?void 0:pt.ref_id)||"")||[];return jsxRuntimeExports.jsx(NodeBadge,{color:ut,position:ht,relativeIds:dt,userData:ct},`node-badge-${ct.ref_id}`)}),[it,tt==null?void 0:tt.nodes,nt,rt,et]);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:ot.length?ot:null},"node-badges")});RelevanceBadges.displayName="RelevanceBadges";const Segment=({link:tt,animated:et})=>{const nt=reactExports.useRef(null),rt=useSelectedNode(),[it,ot]=reactExports.useState(new Vector3(0,0,0)),[at,st]=reactExports.useState(new Vector3(0,0,0)),[lt,ct]=reactExports.useState(8947848),ut=useDataStore(ht=>ht.selectionGraphData);return reactExports.useEffect(()=>{var pt,mt,gt,bt,yt,wt;const ht=(rt==null?void 0:rt.ref_id)||"",dt=rt&&(ht===tt.targetRef||ht===tt.sourceRef);!tt.onlyVisibleOnSelect||dt?(ot(new Vector3(((pt=tt.sourcePosition)==null?void 0:pt.x)||0,((mt=tt.sourcePosition)==null?void 0:mt.y)||0,((gt=tt.sourcePosition)==null?void 0:gt.z)||0)),st(new Vector3(((bt=tt.targetPosition)==null?void 0:bt.x)||0,((yt=tt.targetPosition)==null?void 0:yt.y)||0,((wt=tt.targetPosition)==null?void 0:wt.z)||0))):(ot(new Vector3(0,0,0)),st(new Vector3(0,0,0))),ct(dt?tt.color||NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor:rt?5592405:8947848)},[rt,tt]),useFrame(()=>{if(et&&nt.current){const ht=ut.nodes.find(pt=>pt.ref_id===tt.sourceRef),dt=ut.nodes.find(pt=>pt.ref_id===tt.targetRef);nt.current.start.set((ht==null?void 0:ht.x)||0,(ht==null?void 0:ht.y)||0,(ht==null?void 0:ht.z)||0),nt.current.end.set((dt==null?void 0:dt.x)||0,(dt==null?void 0:dt.y)||0,(dt==null?void 0:dt.z)||0)}}),jsxRuntimeExports.jsx(Segment$1,{ref:nt,color:"0xFFFFFF",end:at,start:it})},fontProps={font:"/fonts/Inter-Bold.woff",characters:"abcdefghijklmnopqrstuvwxyz0123456789!",fontSize:2,letterSpacing:-.05,lineHeight:1,"material-toneMapped":!1},TextNode=reactExports.memo(({node:tt,hide:et})=>{const nt=reactExports.useRef(null),rt=useSelectedNode(),ot=useDataStore(ut=>ut.selectedNodeRelativeIds).includes((tt==null?void 0:tt.ref_id)||""),at=!!rt&&(rt==null?void 0:rt.id)===tt.id,st=useDataStore(ut=>ut.showSelectionGraph);useFrame(({camera:ut})=>{nt!=null&&nt.current&&(nt.current.quaternion.copy(ut.quaternion),st&&nt.current.position.set(tt.x,tt.y,tt.z))});const lt=reactExports.useMemo(()=>{let ut=(tt.scale||1)*4;return st&&at?ut=40:!at&&ot&&(ut=0),ut},[tt.scale,at,ot,st]),ct=reactExports.useMemo(()=>rt&&rt.node_type==="topic"&&!at?.2:1,[at,rt]);return jsxRuntimeExports.jsx(Text$2,{ref:nt,anchorX:"center",anchorY:"middle",color:colors.white,fillOpacity:ct,position:[tt.x,tt.y,tt.z],scale:lt,userData:tt,visible:!et&&!at,...fontProps,children:tt.label})});TextNode.displayName="TextNode";let simulation2d=null;const SelectionDataNodes=reactExports.memo(()=>{const tt=useGraphData(),et=useSelectedNode(),nt=useDataStore(ot=>ot.selectedNodeRelativeIds),rt=useDataStore(ot=>ot.selectionGraphData),it=useDataStore(ot=>ot.setSelectionData);return reactExports.useEffect(()=>{const ot=tt.nodes.filter(st=>st.ref_id===(et==null?void 0:et.ref_id)||nt.includes((st==null?void 0:st.ref_id)||"")).map(st=>{const lt=st.ref_id===(et==null?void 0:et.ref_id)&&st.node_type!=="topic"?{fx:0,fy:0,fz:0}:{};return{...st,x:0,y:0,z:0,...lt}}),at=generateLinksFromNodeData(ot,!1,!1);it({nodes:ot,links:at})},[tt,et,nt,it]),reactExports.useEffect(()=>{simulation2d=runForceSimulation(rt.nodes,rt.links,{numDimensions:2,forceLinkStrength:.01,forceCenterStrength:.85,forceChargeStrength:-20,velocityDecay:.9})},[rt]),useFrame(()=>{simulation2d&&simulation2d.tick()}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt==null?void 0:rt.nodes.map(ot=>ot.node_type==="topic"?jsxRuntimeExports.jsx(TextNode,{hide:!0,node:ot},`${ot.ref_id||ot.id}-compact`):jsxRuntimeExports.jsx(Cube,{animated:!0,hide:!0,node:ot},`${ot.ref_id||ot.id}-compact`)),jsxRuntimeExports.jsx(Segments,{fog:!0,lineWidth:.9,children:(rt==null?void 0:rt.links).map((ot,at)=>jsxRuntimeExports.jsx(Segment,{animated:!0,link:ot},at.toString()))},`selection-links-${rt==null?void 0:rt.links.length}`)]})});SelectionDataNodes.displayName="SelectionDataNodes";const Cubes=reactExports.memo(()=>{const tt=useGraphData(),et=useSelectedNode(),nt=useDataStore(dt=>dt.nearbyNodeIds),rt=useDataStore(dt=>dt.setHoveredNode),it=useDataStore(dt=>dt.showSelectionGraph),ot=useDataStore(dt=>dt.selectionGraphData),at=useAppStore(dt=>dt.setTranscriptOpen),st=reactExports.useCallback(dt=>!!(it&&!ot.nodes.find(pt=>pt.ref_id===dt.ref_id)),[it,ot]),lt=reactExports.useCallback(dt=>{const pt=dt==null?void 0:dt[0];pt&&(at(!1),pt.userData&&(st(pt.userData)||useDataStore.getState().setSelectedNode((pt==null?void 0:pt.userData)||null)))},[at,st]),ct=reactExports.useCallback(dt=>{dt.stopPropagation(),rt(null)},[rt]),ut=reactExports.useCallback(dt=>{var gt;const mt=dt.intersections.map(bt=>bt.object)[0];if((gt=mt==null?void 0:mt.userData)!=null&>.ref_id){const bt=mt.userData;st(bt)||(dt.stopPropagation(),rt(bt))}},[rt,st]),ht=it&&!!et;return jsxRuntimeExports.jsxs(Select$1,{filter:dt=>dt.filter(pt=>{var mt;return!!((mt=pt.userData)!=null&&mt.id)}),onChange:lt,onPointerOut:ct,onPointerOver:ut,children:[jsxRuntimeExports.jsx(BlurryInstances,{hide:ht}),jsxRuntimeExports.jsx(RelevanceBadges,{}),tt.nodes.filter(dt=>{const pt=(dt==null?void 0:dt.ref_id)===(et==null?void 0:et.ref_id);return nt.includes(dt.ref_id||"")||isMainTopic(dt)||pt}).map(dt=>dt.node_type==="topic"?jsxRuntimeExports.jsx(TextNode,{hide:ht,node:dt},dt.ref_id||dt.id):jsxRuntimeExports.jsx(Cube,{hide:ht,node:dt},dt.ref_id||dt.id)),ht&&jsxRuntimeExports.jsx(SelectionDataNodes,{})]})});Cubes.displayName="Cubes";const defaultData$7={earthRef:null},useRefStore=react(tt=>({...defaultData$7,setEarthRef:et=>tt({earthRef:et})})),getCurvedLineFromStartAndEnd=(tt,et)=>{const nt=new Quaternion().setFromUnitVectors(new Vector3(0,1,0),tt.clone().normalize()),rt=new Quaternion().setFromUnitVectors(new Vector3(0,1,0),et.clone().normalize()),it=new Quaternion,ot=50,at=[];for(let lt=0;lt<=ot;lt+=1){const ct=lt/ot;it.slerpQuaternions(nt,rt,ct);const ut=new Vector3(0,1,0).applyQuaternion(it).multiplyScalar(EARTH_RADIUS+EARTH_DATA_PADDING);at.push(ut)}return new CatmullRomCurve3(at).getPoints(ot)},CurvedLine=({link:tt})=>{const et=useSelectedNode(),[nt,rt]=reactExports.useState(8947848);reactExports.useEffect(()=>{const ot=(et==null?void 0:et.ref_id)||"",at=et&&(ot===tt.targetRef||ot===tt.sourceRef);rt(at?tt.color||NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor:et?5592405:8947848)},[et,tt]);const it=reactExports.useMemo(()=>{var ct,ut,ht,dt,pt,mt;const ot=(et==null?void 0:et.ref_id)||"",at=et&&(ot===tt.targetRef||ot===tt.sourceRef);if(!(!tt.onlyVisibleOnSelect||at))return[];const st=new Vector3(((ct=tt.sourcePosition)==null?void 0:ct.x)||0,((ut=tt.sourcePosition)==null?void 0:ut.y)||0,((ht=tt.sourcePosition)==null?void 0:ht.z)||0),lt=new Vector3(((dt=tt.targetPosition)==null?void 0:dt.x)||0,((pt=tt.targetPosition)==null?void 0:pt.y)||0,((mt=tt.targetPosition)==null?void 0:mt.z)||0);return getCurvedLineFromStartAndEnd(st,lt)},[tt,et]);return it.length?jsxRuntimeExports.jsx(Line$1,{color:nt,dashed:!1,lineWidth:3,points:it}):null},center$1=new Vector3(0,0,0),Earth=()=>{const tt=reactExports.useRef(null),et=reactExports.useRef(null),nt=useDataStore(lt=>lt.graphStyle),rt=useDataStore(lt=>lt.showSelectionGraph),it=useDataStore(lt=>lt.data),ot=useRefStore(lt=>lt.setEarthRef),at=useTexture("textures/earth/galaxy.png"),st=useTexture("textures/earth/clouds.png");return useFrame(({camera:lt})=>{et.current&&et.current.position.copy(lt.getWorldPosition(center$1))}),reactExports.useLayoutEffect(()=>{tt.current&&ot(tt)},[ot]),nt!=="earth"||rt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("mesh",{ref:tt,userData:{type:"earth"},children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS,200,200]}),jsxRuntimeExports.jsx(EarthMaterial,{})]}),jsxRuntimeExports.jsxs("mesh",{children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS+2,200,200]}),jsxRuntimeExports.jsx("meshStandardMaterial",{alphaMap:st,map:st,transparent:!0})]}),jsxRuntimeExports.jsxs("mesh",{children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS*4,200,200]}),jsxRuntimeExports.jsx("meshStandardMaterial",{map:at,opacity:.4,side:DoubleSide,transparent:!0})]}),jsxRuntimeExports.jsx("directionalLight",{ref:et,intensity:.9,position:[0,0,EARTH_RADIUS*3]}),it==null?void 0:it.links.map((lt,ct)=>jsxRuntimeExports.jsx(CurvedLine,{link:lt},`curved-${ct}`))]})},EarthMaterial=()=>{const tt=useTexture("textures/earth/earth.jpeg"),et=useTexture("textures/earth/bump.jpeg"),nt=useTexture("textures/earth/water.png"),rt=reactExports.useMemo(()=>new MeshStandardMaterial({map:tt,bumpMap:et,aoMap:et,roughnessMap:et,metalnessMap:nt,toneMapped:!0,roughness:35,metalness:0}),[tt,et,nt]);return jsxRuntimeExports.jsx("meshStandardMaterial",{...rt})},particleCount=2e3,radiusLimit=UNIVERSE_SCALE*4,colorsArray=Object.values(DATA_COLOR_PALETTE).map(tt=>tt),Particles=()=>{const tt=reactExports.useRef(null);useFrame(()=>{var at,st,lt;const it=((at=tt.current)==null?void 0:at.geometry.getAttribute("position")).array,ot=((st=tt.current)==null?void 0:st.geometry.getAttribute("velocity")).array;if(it&&ot){for(let ct=0;ctradiusLimit*radiusLimit){const wt=Math.random()*Math.PI*2,vt=Math.random()*Math.PI*2,kt=Math.random()*radiusLimit;it[ct]=Math.sin(wt)*Math.cos(vt)*kt,it[ct+1]=Math.sin(wt)*Math.sin(vt)*kt,it[ct+2]=Math.cos(wt)*kt}}((lt=tt.current)==null?void 0:lt.geometry.getAttribute("position")).needsUpdate=!0}});const et=reactExports.useMemo(()=>new Float32Array(particleCount*3),[]),nt=reactExports.useMemo(()=>new Float32Array(particleCount*3),[]);reactExports.useEffect(()=>{const it=radiusLimit;for(let ot=0;ot{rt.current&&tt.current&&(rt.current.setAttribute("position",new BufferAttribute(et,3)),rt.current.setAttribute("velocity",new BufferAttribute(nt,3)),tt.current.geometry=rt.current)},[et,nt]),reactExports.useEffect(()=>{if(rt.current){const it=[];for(let ot=0;ot({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:tt?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:tt?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:tt?"#ffffff66":"#5078f2",fontColor:tt?"#ffffff66":"#fff"}}),reuseableVector3=new Vector3,NodeControls=reactExports.memo(()=>{const tt=reactExports.useRef(null),et=useAppStore(ut=>ut.setSidebarOpen),nt=useDataStore(ut=>ut.showSelectionGraph),rt=useDataStore(ut=>ut.selectionGraphData),it=useDataStore(ut=>ut.data),ot=useSelectedNode(),at=useDataStore(ut=>ut.setSelectedNode),st=useDataStore(ut=>ut.setShowSelectionGraph);useFrame(()=>{lt()});const lt=reactExports.useCallback(()=>{const ut=nt?rt:it;if(tt.current){const ht=ut==null?void 0:ut.nodes.find(dt=>dt.ref_id===(ot==null?void 0:ot.ref_id));if(ht){const dt=reuseableVector3.set(ht==null?void 0:ht.x,ht==null?void 0:ht.y,ht==null?void 0:ht.z);tt.current.position.copy(dt)}}},[ot,nt,rt,it]),ct=reactExports.useMemo(()=>[{key:"control-key-1",colors:buttonColors(nt).focus,icon:jsxRuntimeExports.jsx(MdViewInAr,{}),left:10,className:"expand",onClick:()=>{const ut=!nt;st(ut),ut&&et(!0)}},{key:"control-key-2",colors:buttonColors(!0).close,icon:jsxRuntimeExports.jsx(MdClose,{}),left:40,className:"exit",onClick:()=>{at(null),st(!1)}}],[st,at,et,nt]);return ot?jsxRuntimeExports.jsx("group",{ref:tt,children:jsxRuntimeExports.jsx(Html$1,{center:!0,className:"control-panel",onClick:ut=>ut.stopPropagation(),onKeyDown:ut=>ut.stopPropagation(),onPointerDown:ut=>ut.stopPropagation(),onPointerOut:ut=>ut.stopPropagation(),onPointerOver:ut=>ut.stopPropagation(),onPointerUp:ut=>ut.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:ct.map(ut=>jsxRuntimeExports.jsx(IconButton,{backgroundColor:ut.colors.backgroundColor,borderColor:ut.colors.borderColor,className:ut.className,fontColor:ut.colors.fontColor,left:ut.left,onClick:ht=>{ht.stopPropagation(),ut.onClick()},children:ut.icon},ut.key))})}):null});NodeControls.displayName="NodeControls";const IconButton=styled$4.div` position: fixed; top: -60px; left: ${tt=>-7+tt.left}px; @@ -5763,7 +5763,7 @@ outputColor=vec4(color,inputColor.a);}`,VignetteEffect=class extends Effect$1{co overflow: auto; flex: 1; width: 100%; -`,ShieldPersonIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"shield_person",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1543_22988",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1543_22988)",children:jsxRuntimeExports.jsx("path",{id:"shield_person_2",d:"M9.99998 10.6249C10.7521 10.6249 11.3915 10.3616 11.9182 9.83486C12.4449 9.30816 12.7083 8.66875 12.7083 7.91661C12.7083 7.16447 12.4449 6.52505 11.9182 5.99836C11.3915 5.47165 10.7521 5.20829 9.99998 5.20829C9.24784 5.20829 8.60842 5.47165 8.08173 5.99836C7.55502 6.52505 7.29167 7.16447 7.29167 7.91661C7.29167 8.66875 7.55502 9.30816 8.08173 9.83486C8.60842 10.3616 9.24784 10.6249 9.99998 10.6249ZM9.99998 17.9005C8.08973 17.376 6.57051 16.3049 5.44231 14.6874C4.3141 13.0699 3.75 11.2574 3.75 9.24994V4.45509L9.99998 2.11536L16.25 4.45509V9.24994C16.25 11.2574 15.6859 13.0699 14.5576 14.6874C13.4295 16.3049 11.9102 17.376 9.99998 17.9005ZM9.99998 16.5833C10.782 16.3301 11.4823 15.9422 12.1009 15.4198C12.7195 14.8974 13.2569 14.298 13.7131 13.6218C13.1373 13.3269 12.5371 13.1009 11.9126 12.9439C11.2882 12.7868 10.6506 12.7083 9.99998 12.7083C9.34934 12.7083 8.71179 12.7868 8.08733 12.9439C7.46286 13.1009 6.8627 13.3269 6.28685 13.6218C6.74305 14.298 7.28044 14.8974 7.89902 15.4198C8.51762 15.9422 9.21794 16.3301 9.99998 16.5833Z",fill:"currentColor"})})]})}),SearchIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Property 1=Normal",children:jsxRuntimeExports.jsx("path",{id:"search",d:"M15.5192 20.6153C13.8115 20.6153 12.3654 20.023 11.1808 18.8384C9.99618 17.6538 9.40387 16.2077 9.40387 14.5C9.40387 12.7923 9.99618 11.3462 11.1808 10.1615C12.3654 8.97694 13.8115 8.38464 15.5192 8.38464C17.2269 8.38464 18.6731 8.97694 19.8577 10.1615C21.0423 11.3462 21.6346 12.7923 21.6346 14.5C21.6346 15.2141 21.5147 15.8961 21.275 16.5461C21.0352 17.1961 20.7153 17.7615 20.3153 18.2423L23.0692 20.9961C23.2077 21.1346 23.2785 21.3087 23.2817 21.5183C23.2849 21.7279 23.2141 21.9051 23.0692 22.05C22.9243 22.1948 22.7487 22.2673 22.5423 22.2673C22.3359 22.2673 22.1603 22.1948 22.0154 22.05L19.2615 19.2961C18.7615 19.7089 18.1865 20.032 17.5365 20.2653C16.8865 20.4987 16.2141 20.6153 15.5192 20.6153ZM15.5192 19.1154C16.8077 19.1154 17.899 18.6683 18.7933 17.774C19.6875 16.8798 20.1346 15.7885 20.1346 14.5C20.1346 13.2115 19.6875 12.1202 18.7933 11.2259C17.899 10.3317 16.8077 9.88459 15.5192 9.88459C14.2308 9.88459 13.1394 10.3317 12.2452 11.2259C11.351 12.1202 10.9038 13.2115 10.9038 14.5C10.9038 15.7885 11.351 16.8798 12.2452 17.774C13.1394 18.6683 14.2308 19.1154 15.5192 19.1154Z",fill:"currentColor"})})}),Search$2=({onSearch:tt})=>{const[et,nt]=reactExports.useState(""),rt=at=>{at.preventDefault(),tt(et)},it=()=>{nt(""),tt("")},ot=at=>{!at.target.value&&it(),nt(at.target.value)};return jsxRuntimeExports.jsxs(Wrapper$j,{onSubmit:rt,children:[jsxRuntimeExports.jsx(InputBase$1,{autoComplete:"off",autoCorrect:"off",inputProps:{"aria-label":"search sources"},onChange:ot,placeholder:"Search",size:"small",spellCheck:"false",sx:{ml:1,flex:1,fontSize:14,alignSelf:"center"},value:et}),et&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(StyledButton$6,{"aria-label":"search",onClick:it,type:"button",children:jsxRuntimeExports.jsx(ClearIcon$1,{})}),jsxRuntimeExports.jsx(Divider$3,{orientation:"vertical",sx:{height:28,m:.5}})]}),jsxRuntimeExports.jsx(StyledButton$6,{"aria-label":"search",onClick:rt,type:"button",children:jsxRuntimeExports.jsx(SearchIcon,{})})]})},StyledButton$6=styled$4(IconButton$2)` +`,SearchIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Property 1=Normal",children:jsxRuntimeExports.jsx("path",{id:"search",d:"M15.5192 20.6153C13.8115 20.6153 12.3654 20.023 11.1808 18.8384C9.99618 17.6538 9.40387 16.2077 9.40387 14.5C9.40387 12.7923 9.99618 11.3462 11.1808 10.1615C12.3654 8.97694 13.8115 8.38464 15.5192 8.38464C17.2269 8.38464 18.6731 8.97694 19.8577 10.1615C21.0423 11.3462 21.6346 12.7923 21.6346 14.5C21.6346 15.2141 21.5147 15.8961 21.275 16.5461C21.0352 17.1961 20.7153 17.7615 20.3153 18.2423L23.0692 20.9961C23.2077 21.1346 23.2785 21.3087 23.2817 21.5183C23.2849 21.7279 23.2141 21.9051 23.0692 22.05C22.9243 22.1948 22.7487 22.2673 22.5423 22.2673C22.3359 22.2673 22.1603 22.1948 22.0154 22.05L19.2615 19.2961C18.7615 19.7089 18.1865 20.032 17.5365 20.2653C16.8865 20.4987 16.2141 20.6153 15.5192 20.6153ZM15.5192 19.1154C16.8077 19.1154 17.899 18.6683 18.7933 17.774C19.6875 16.8798 20.1346 15.7885 20.1346 14.5C20.1346 13.2115 19.6875 12.1202 18.7933 11.2259C17.899 10.3317 16.8077 9.88459 15.5192 9.88459C14.2308 9.88459 13.1394 10.3317 12.2452 11.2259C11.351 12.1202 10.9038 13.2115 10.9038 14.5C10.9038 15.7885 11.351 16.8798 12.2452 17.774C13.1394 18.6683 14.2308 19.1154 15.5192 19.1154Z",fill:"currentColor"})})}),Search$2=({onSearch:tt})=>{const[et,nt]=reactExports.useState(""),rt=at=>{at.preventDefault(),tt(et)},it=()=>{nt(""),tt("")},ot=at=>{!at.target.value&&it(),nt(at.target.value)};return jsxRuntimeExports.jsxs(Wrapper$j,{onSubmit:rt,children:[jsxRuntimeExports.jsx(InputBase$1,{autoComplete:"off",autoCorrect:"off",inputProps:{"aria-label":"search sources"},onChange:ot,placeholder:"Search",size:"small",spellCheck:"false",sx:{ml:1,flex:1,fontSize:14,alignSelf:"center"},value:et}),et&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(StyledButton$6,{"aria-label":"search",onClick:it,type:"button",children:jsxRuntimeExports.jsx(ClearIcon$1,{})}),jsxRuntimeExports.jsx(Divider$3,{orientation:"vertical",sx:{height:28,m:.5}})]}),jsxRuntimeExports.jsx(StyledButton$6,{"aria-label":"search",onClick:rt,type:"button",children:jsxRuntimeExports.jsx(SearchIcon,{})})]})},StyledButton$6=styled$4(IconButton$2)` font-size: 24px; `,Wrapper$j=styled$4(Paper$1)` && { @@ -5822,7 +5822,7 @@ outputColor=vec4(color,inputColor.a);}`,VignetteEffect=class extends Effect$1{co &:visited { color: ${colors.white}; } -`,admins$1=["02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5","03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff","03bfe6723c06fb2b7546df1e8ca1a17ae5c504615da32c945425ccbe8d3ca6260d","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff"],Sources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(""),[it,ot]=useDataStore(yt=>[yt.sources,yt.setSources]),[at,st,lt,ct]=useUserStore(yt=>[yt.setIsAdmin,yt.isAdmin,yt.setPubKey,yt.pubKey]),[ut,ht]=reactExports.useState("");reactExports.useEffect(()=>{(async()=>{et(!0);try{const wt=await getRadarData();ot(wt.data)}catch(wt){console.warn(wt)}finally{et(!1)}})()},[ot]);const dt=yt=>{rt(nt===yt||!yt?"":yt)},pt=async()=>{await executeIfProd(async()=>{try{const yt=await distExports$1.enable(),wt=yt==null?void 0:yt.pubkey;lt(wt),wt&&at(wt&&admins$1.includes(wt))}catch(yt){console.warn(yt)}})},mt=async()=>{try{const yt=await triggerRadarJob();if(yt!=null&&yt.error){toast(jsxRuntimeExports.jsx(ToastMessage,{message:"An error happened"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"});return}toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Job started"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"success"})}catch{toast(jsxRuntimeExports.jsx(ToastMessage,{message:"An error happened"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"})}},gt=()=>ct?ct&&st?jsxRuntimeExports.jsx(RunButton,{endIcon:jsxRuntimeExports.jsx(MdRestartAlt,{color:colors.white}),onClick:mt,size:"small",children:"Run"}):jsxRuntimeExports.jsx(Text$4,{children:"You are not admin"}):jsxRuntimeExports.jsx(EditButton$1,{color:"secondary",onClick:pt,size:"medium",startIcon:jsxRuntimeExports.jsx(ShieldPersonIcon,{}),sx:{alignSelf:"flex-end",m:"0 36px 16px 0"},variant:"contained",children:"Admin"}),bt=reactExports.useMemo(()=>it==null?void 0:it.filter(yt=>(!nt||yt.source_type===nt)&&(yt.source.toLowerCase().startsWith(ut.toLowerCase())||yt.source.toLowerCase().includes(ut.toLowerCase()))).reverse(),[ut,nt,it]);return jsxRuntimeExports.jsxs(Wrapper$i,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$3,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$4,{className:"title",children:"Sources for this Graph"}),gt()]}),jsxRuntimeExports.jsx(Search$2,{onSearch:ht}),jsxRuntimeExports.jsxs(Flex,{className:"filters",direction:"row",pb:16,px:36,children:[jsxRuntimeExports.jsx(StyledPill,{className:clsx$2({selected:!nt}),onClick:()=>dt(""),size:"small",children:"All"}),Object.keys(sourcesMapper).map(yt=>jsxRuntimeExports.jsx(StyledPill,{className:clsx$2({selected:yt===nt}),onClick:()=>dt(yt),size:"small",children:sourcesMapper[yt]},yt))]}),jsxRuntimeExports.jsx(TableWrapper$1,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table$1,{canEdit:st,data:bt})})]})},Wrapper$i=styled$4(Flex)` +`,Sources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(""),[it,ot]=useDataStore(ht=>[ht.sources,ht.setSources]),[at]=useUserStore(ht=>[ht.isAdmin]),[st,lt]=reactExports.useState("");reactExports.useEffect(()=>{(async()=>{et(!0);try{const dt=await getRadarData();ot(dt.data)}catch(dt){console.warn(dt)}finally{et(!1)}})()},[ot]);const ct=ht=>{rt(nt===ht||!ht?"":ht)},ut=reactExports.useMemo(()=>it==null?void 0:it.filter(ht=>(!nt||ht.source_type===nt)&&(ht.source.toLowerCase().startsWith(st.toLowerCase())||ht.source.toLowerCase().includes(st.toLowerCase()))).reverse(),[st,nt,it]);return jsxRuntimeExports.jsxs(Wrapper$i,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsx(Heading$3,{align:"center",direction:"row",justify:"space-between",children:jsxRuntimeExports.jsx(Text$4,{className:"title",children:"Sources for this Graph"})}),jsxRuntimeExports.jsx(Search$2,{onSearch:lt}),jsxRuntimeExports.jsxs(Flex,{className:"filters",direction:"row",pb:16,px:36,children:[jsxRuntimeExports.jsx(StyledPill,{className:clsx$2({selected:!nt}),onClick:()=>ct(""),size:"small",children:"All"}),Object.keys(sourcesMapper).map(ht=>jsxRuntimeExports.jsx(StyledPill,{className:clsx$2({selected:ht===nt}),onClick:()=>ct(ht),size:"small",children:sourcesMapper[ht]},ht))]}),jsxRuntimeExports.jsx(TableWrapper$1,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table$1,{canEdit:at,data:ut})})]})},Wrapper$i=styled$4(Flex)` flex: 1; .title { font-size: 20px; @@ -5842,10 +5842,6 @@ outputColor=vec4(color,inputColor.a);}`,VignetteEffect=class extends Effect$1{co overflow: auto; flex: 1; width: 100%; -`,RunButton=styled$4(Button$2)` - margin-left: 8px; -`,EditButton$1=styled$4(Button$2)` - margin-left: auto; `,defaultData$2={data:null,ids:[],total:0,filters:{muted:!1,sortBy:DATE$1,page:0,pageSize:50}},useTopicsStore=react((tt,et)=>({...defaultData$2,setTopics:async()=>{const{data:nt,ids:rt,filters:it}=et(),ot=prepareTopicFilters(it);it.page<1&&tt({data:null,ids:[],total:0});const at=await getTopicsData(ot),st={...nt||{}},lt=[...rt];at.data.forEach(ct=>{st[ct.ref_id]=ct,lt.push(ct.ref_id)}),tt({data:st,ids:lt,total:at.topicCount})},setFilters:nt=>tt({filters:{...et().filters,page:0,...nt}}),terminate:()=>tt(defaultData$2)})),prepareTopicFilters=tt=>({muted:tt.muted?"True":"False",skip:String(tt.page*tt.pageSize),limit:String(tt.pageSize),sort_by:tt.sortBy,search:tt.search||""}),DropdownSearch$1=({onSelect:tt,selectedTopic:et})=>{const[nt,rt]=reactExports.useState(!1),[it,ot]=reactExports.useState(""),[at,st]=reactExports.useState([]),[lt,ct]=reactExports.useState(!1),ut=reactExports.useRef(null);reactExports.useEffect(()=>()=>st([]),[st]);const ht=async gt=>{const bt={muted:"False",sort_by:ALPHABETICALLY,search:gt,skip:"0",limit:"1000"};ct(!0);try{const yt=await getTopicsData(bt);st(yt.data)}catch{st([])}finally{ct(!1)}},dt=reactExports.useMemo(()=>lodashExports.debounce(ht,300),[]),pt=gt=>{tt(gt)},mt=gt=>{if(ot(gt),!gt){st([]);return}gt.length>2&&dt(gt)};return et?jsxRuntimeExports.jsxs(SelectedValue$1,{children:[jsxRuntimeExports.jsx("div",{className:"value",children:et.topic}),jsxRuntimeExports.jsx(Flex,{className:"icon",onClick:()=>tt(null),children:jsxRuntimeExports.jsx(ClearIcon$1,{})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Paper$1,{ref:ut,component:"form",onSubmit:gt=>gt.preventDefault(),sx:{p:"2px 4px",display:"flex",alignItems:"center",width:200},children:[jsxRuntimeExports.jsx(InputBase$1,{inputProps:{"aria-label":"search topic"},onChange:gt=>mt(gt.target.value),onFocus:()=>rt(!0),placeholder:"Search",size:"small",sx:{ml:1,flex:1},value:it}),it&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(StyledButton$5,{"aria-label":"search",onClick:()=>mt(""),type:"button",children:jsxRuntimeExports.jsx(ClearIcon$1,{})}),jsxRuntimeExports.jsx(Divider$3,{orientation:"vertical",sx:{height:28,m:.5}})]}),jsxRuntimeExports.jsx(StyledButton$5,{"aria-label":"search",type:"button",children:lt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:24}):jsxRuntimeExports.jsx(SearchIcon,{})})]}),ut.current&&at.length?jsxRuntimeExports.jsx(StyledPopover$4,{anchorEl:ut.current,open:nt,placement:"bottom",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:at.map(gt=>jsxRuntimeExports.jsx(MenuItem$4,{className:clsx$2({active:et===gt.ref_id}),onClick:()=>pt(gt),children:gt.topic},"option"))})}):null]})},MenuItem$4=styled$4(Flex).attrs({direction:"row",align:"center"})` font-family: Barlow; font-size: 13px; @@ -6516,7 +6512,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `);class AdapterMoment{constructor({locale:et,formats:nt,instance:rt}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=formatTokenMap,this.setLocaleToValue=it=>{const ot=this.getCurrentLocaleCode();return ot===it.locale()?it:it.locale(ot)},this.syncMomentLocale=it=>{var ot;const at=hooks.locale(),st=(ot=this.locale)!=null?ot:"en-us";if(at!==st){hooks.locale(st);const lt=it();return hooks.locale(at),lt}return it()},this.hasTimezonePlugin=()=>typeof this.moment.tz<"u",this.createSystemDate=it=>{const ot=this.moment(it).local();return this.locale===void 0?ot:ot.locale(this.locale)},this.createUTCDate=it=>{const ot=this.moment.utc(it);return this.locale===void 0?ot:ot.locale(this.locale)},this.createTZDate=(it,ot)=>{if(!this.hasTimezonePlugin())throw new Error(MISSING_TIMEZONE_PLUGIN);const at=ot==="default"?this.moment(it):this.moment.tz(it,ot);return this.locale===void 0?at:at.locale(this.locale)},this.date=it=>{if(it===null)return null;const ot=this.moment(it);return ot.locale(this.getCurrentLocaleCode()),ot},this.dateWithTimezone=(it,ot)=>it===null?null:ot==="UTC"?this.createUTCDate(it):ot==="system"||ot==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(it):this.createTZDate(it,ot),this.getTimezone=it=>{var ot,at,st;const lt=(ot=it._z)==null?void 0:ot.name,ct=it.isUTC()?"UTC":"system";return(at=lt??((st=this.moment.defaultZone)==null?void 0:st.name))!=null?at:ct},this.setTimezone=(it,ot)=>{var at,st;if(this.getTimezone(it)===ot)return it;if(ot==="UTC")return it.clone().utc();if(ot==="system")return it.clone().local();if(!this.hasTimezonePlugin()){if(ot!=="default")throw new Error(MISSING_TIMEZONE_PLUGIN);return it}const lt=ot==="default"?(at=(st=this.moment.defaultZone)==null?void 0:st.name)!=null?at:"system":ot;if(lt==="system")return it.clone().local();const ct=it.clone();return ct.tz(lt),ct},this.toJsDate=it=>it.toDate(),this.parseISO=it=>this.moment(it,!0),this.toISO=it=>it.toISOString(),this.parse=(it,ot)=>it===""?null:this.locale?this.moment(it,ot,this.locale,!0):this.moment(it,ot,!0),this.getCurrentLocaleCode=()=>this.locale||hooks.locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(hooks.localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=it=>{const ot=/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;return it.match(ot).map(at=>{const st=at[0];return st==="L"||st===";"?hooks.localeData(this.getCurrentLocaleCode()).longDateFormat(at):at}).join("")},this.getFormatHelperText=it=>this.expandFormat(it).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=it=>it===null,this.isValid=it=>this.moment(it).isValid(),this.format=(it,ot)=>this.formatByString(it,this.formats[ot]),this.formatByString=(it,ot)=>{const at=it.clone();return at.locale(this.getCurrentLocaleCode()),at.format(ot)},this.formatNumber=it=>it,this.getDiff=(it,ot,at)=>it.diff(ot,at),this.isEqual=(it,ot)=>it===null&&ot===null?!0:this.moment(it).isSame(ot),this.isSameYear=(it,ot)=>it.isSame(ot,"year"),this.isSameMonth=(it,ot)=>it.isSame(ot,"month"),this.isSameDay=(it,ot)=>it.isSame(ot,"day"),this.isSameHour=(it,ot)=>it.isSame(ot,"hour"),this.isAfter=(it,ot)=>it.isAfter(ot),this.isAfterYear=(it,ot)=>it.isAfter(ot,"year"),this.isAfterDay=(it,ot)=>it.isAfter(ot,"day"),this.isBefore=(it,ot)=>it.isBefore(ot),this.isBeforeYear=(it,ot)=>it.isBefore(ot,"year"),this.isBeforeDay=(it,ot)=>it.isBefore(ot,"day"),this.isWithinRange=(it,[ot,at])=>it.isBetween(ot,at,null,"[]"),this.startOfYear=it=>it.clone().startOf("year"),this.startOfMonth=it=>it.clone().startOf("month"),this.startOfWeek=it=>it.clone().startOf("week"),this.startOfDay=it=>it.clone().startOf("day"),this.endOfYear=it=>it.clone().endOf("year"),this.endOfMonth=it=>it.clone().endOf("month"),this.endOfWeek=it=>it.clone().endOf("week"),this.endOfDay=it=>it.clone().endOf("day"),this.addYears=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"years"):it.clone().add(ot,"years"),this.addMonths=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"months"):it.clone().add(ot,"months"),this.addWeeks=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"weeks"):it.clone().add(ot,"weeks"),this.addDays=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"days"):it.clone().add(ot,"days"),this.addHours=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"hours"):it.clone().add(ot,"hours"),this.addMinutes=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"minutes"):it.clone().add(ot,"minutes"),this.addSeconds=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"seconds"):it.clone().add(ot,"seconds"),this.getYear=it=>it.get("year"),this.getMonth=it=>it.get("month"),this.getDate=it=>it.get("date"),this.getHours=it=>it.get("hours"),this.getMinutes=it=>it.get("minutes"),this.getSeconds=it=>it.get("seconds"),this.getMilliseconds=it=>it.get("milliseconds"),this.setYear=(it,ot)=>it.clone().year(ot),this.setMonth=(it,ot)=>it.clone().month(ot),this.setDate=(it,ot)=>it.clone().date(ot),this.setHours=(it,ot)=>it.clone().hours(ot),this.setMinutes=(it,ot)=>it.clone().minutes(ot),this.setSeconds=(it,ot)=>it.clone().seconds(ot),this.setMilliseconds=(it,ot)=>it.clone().milliseconds(ot),this.getDaysInMonth=it=>it.daysInMonth(),this.getNextMonth=it=>it.clone().add(1,"month"),this.getPreviousMonth=it=>it.clone().subtract(1,"month"),this.getMonthArray=it=>{const at=[this.startOfYear(it)];for(;at.length<12;){const st=at[at.length-1];at.push(this.getNextMonth(st))}return at},this.mergeDateAndTime=(it,ot)=>it.clone().hour(ot.hour()).minute(ot.minute()).second(ot.second()),this.getWeekdays=()=>this.syncMomentLocale(()=>hooks.weekdaysShort(!0)),this.getWeekArray=it=>{const ot=this.setLocaleToValue(it),at=ot.clone().startOf("month").startOf("week"),st=ot.clone().endOf("month").endOf("week");let lt=0,ct=at;const ut=[];for(;ct.isBefore(st);){const ht=Math.floor(lt/7);ut[ht]=ut[ht]||[],ut[ht].push(ct),ct=ct.clone().add(1,"day"),lt+=1}return ut},this.getWeekNumber=it=>it.week(),this.getYearRange=(it,ot)=>{const at=this.moment(it).startOf("year"),st=this.moment(ot).endOf("year"),lt=[];let ct=at;for(;ct.isBefore(st);)lt.push(ct),ct=ct.clone().add(1,"year");return lt},this.getMeridiemText=it=>this.is12HourCycleInCurrentLocale()?hooks.localeData(this.getCurrentLocaleCode()).meridiem(it==="am"?0:13,0,!1):it==="am"?"AM":"PM",this.moment=rt||hooks,this.locale=et,this.formats=_extends$u({},defaultFormats,nt)}}const MuiButton={defaultProps:{disableElevation:!0,disableRipple:!0},styleOverrides:{root:{display:"inline-flex",padding:"12px 20px",justifyContent:"center",alignItems:"center",gap:"10px",borderRadius:"200px",background:colors.BUTTON1,color:"var(--Primary-Text, #fff)",fontFamily:"Barlow",fontSize:"12px",fontStyle:"normal",fontWeight:"400",lineHeight:"8px",cursor:"pointer",columnGap:"6px","&:hover":{background:colors.BUTTON1_HOVER,color:colors.GRAY3,outline:"none",boxShadow:"none"},"&:focus":{outline:"none",boxShadow:"none",background:colors.BUTTON1_PRESS,color:colors.GRAY6},"&:active":{outline:"none",boxShadow:"none",background:colors.BUTTON1_PRESS,color:colors.GRAY6},"&.MuiButton-sizeSmall":{fontSize:"11px",lineHeight:"14px",fontWeight:500,height:"28px"},"&.MuiButton-sizeMedium":{height:"32px",fontSize:"13px",lineHeight:"14px",fontWeight:500},"&.MuiButton-sizeLarge":{fontSize:"1.2rem",height:"40px"},"&.MuiButton-outlined":{}},textPrimary:{"& .MuiButton-endIcon":{color:colors.GRAY6},"& .MuiButton-startIcon":{color:colors.GRAY6}},outlined:{borderColor:colors.BUTTON1,borderWidth:"1px",backgroundColor:"transparent","&:hover":{borderColor:colors.BUTTON1_HOVER,backgroundColor:"transparent",color:colors.GRAY3},"&:active":{backgroundColor:colors.BUTTON1_PRESS,color:colors.GRAY6}},containedSecondary:{backgroundColor:colors.PRIMARY_BLUE,borderRadius:"6px",color:"white","&:hover":{backgroundColor:colors.PRIMARY_BLUE_BORDER,color:colors.white},"&:active":{backgroundColor:colors.BLUE_PRESS_STATE,color:colors.white},"&:focus":{backgroundColor:colors.BLUE_PRESS_STATE,color:colors.white},"&.MuiButton-sizeSmall":{fontSize:"11px",lineHeight:"14px",fontWeight:500},"&.MuiButton-sizeLarge":{fontSize:"14px",maxHeight:"40px",fontWeight:600,lineHeight:"16px"},"&.Mui-disabled":{background:"rgba(48, 51, 66, 0.50)",color:"rgba(82, 86, 110, 1)"}},textSecondary:{color:"purple","&:hover":{color:"darkpurple"}},startIcon:{fontSize:"20px",marginRight:0,"& > *:nth-of-type(1)":{fontSize:"20px"}},endIcon:{fontSize:"20px","& > *:nth-of-type(1)":{fontSize:"20px"}}}},palette=createPalette({mode:"dark",primary:{main:colors.primaryButton}}),appTheme=createTheme({palette,components:{MuiButton,MuiPopover:{styleOverrides:{root:{zIndex:99999}}}},typography:{button:{textTransform:"none",whiteSpace:"nowrap"}},breakpoints:{values:{xs:breakpoints.small,sm:breakpoints.medium,md:breakpoints.large,lg:1200,xl:1500}}}),AppProviders=({children:tt})=>jsxRuntimeExports.jsxs(ThemeProvider,{theme:appTheme,children:[jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:!0}),jsxRuntimeExports.jsx(Le,{theme:appTheme,children:jsxRuntimeExports.jsx(LocalizationProvider,{dateAdapter:AdapterMoment,children:tt})})]}),requiredRule={required:{message:"The field is required",value:!0}},AboutAdminView=({initialValues:tt})=>{const et=useForm({defaultValues:tt,mode:"onSubmit"}),{isSubmitting:nt}=et.formState,rt=et.handleSubmit(async it=>{try{await postAboutData(it)}catch(ot){console.warn(ot)}});return jsxRuntimeExports.jsx(FormProvider,{...et,children:jsxRuntimeExports.jsx("form",{id:"add-node-form",onSubmit:rt,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-title-id",label:"Graph Title",maxLength:50,name:"title",placeholder:"Type graph title here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-id",label:"Graph Description",maxLength:50,name:"description",placeholder:"Type graph description here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-mission_statement-id",label:"Mission Statement",maxLength:50,name:"mission_statement",placeholder:"Type mission statement here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-search_term-id",label:"Search Term",maxLength:50,name:"search_term",placeholder:"Type search term here...",rules:{...requiredRule}})})]}),jsxRuntimeExports.jsx(Flex,{pt:8,children:nt?jsxRuntimeExports.jsx(SubmitLoader,{children:jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:20})}):jsxRuntimeExports.jsx(Button,{disabled:nt,id:"add-node-submit-cta",kind:"big",type:"submit",children:"Save changes"})})]})})})},SubmitLoader=styled$4(Flex).attrs({align:"center",background:"primaryButton",borderRadius:8,justify:"center"})` padding: 16px 24px; opacity: 0.5; -`,CommonView=({initialValues:tt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[tt.title&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$4,{kind:"regular",children:"Graph Title"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$4,{className:"value",kind:"medium",children:tt.title})})]}),tt.description&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$4,{kind:"regular",children:"Graph Description"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$4,{className:"value",kind:"medium",children:tt.description})})]}),tt.mission_statement&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$4,{kind:"regular",children:"Mission Statement"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$4,{className:"value",kind:"medium",children:tt.mission_statement})})]})]}),admins=["02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5","03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff"],defaultData={description:"",mission_statement:"",search_term:"",title:""},About=()=>{const[tt,et,nt,rt]=useUserStore(ut=>[ut.setIsAdmin,ut.isAdmin,ut.setPubKey,ut.pubKey]),[it,ot]=reactExports.useState(!1),[at,st]=reactExports.useState(defaultData);reactExports.useEffect(()=>{(async()=>{ot(!0);try{const ht=await getAboutData();st(ht)}catch(ht){console.warn(ht)}finally{ot(!1)}})()},[]);const lt=async()=>{await executeIfProd(async()=>{try{const ut=await distExports$1.enable(),ht=ut==null?void 0:ut.pubkey;nt(ht),ht&&tt(ht&&admins.includes(ht))}catch(ut){console.warn(ut)}})},ct=()=>rt?rt&&et?null:jsxRuntimeExports.jsx(Text$4,{children:"You are not admin"}):jsxRuntimeExports.jsx(EditButton,{kind:"small",onClick:lt,children:"Admin"});return jsxRuntimeExports.jsxs(Wrapper$d,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$2,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$4,{className:"title",children:"About"}),ct()]}),it?jsxRuntimeExports.jsx(ContentWrapper,{align:"center",justify:"center",children:jsxRuntimeExports.jsx(ClipLoader$2,{})}):jsxRuntimeExports.jsx(ContentWrapper,{align:"stretch",justify:"flex-start",children:et?jsxRuntimeExports.jsx(AboutAdminView,{initialValues:at}):jsxRuntimeExports.jsx(CommonView,{initialValues:at})})]})},Wrapper$d=styled$4(Flex)` +`,CommonView=({initialValues:tt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[tt.title&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$4,{kind:"regular",children:"Graph Title"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$4,{className:"value",kind:"medium",children:tt.title})})]}),tt.description&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$4,{kind:"regular",children:"Graph Description"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$4,{className:"value",kind:"medium",children:tt.description})})]}),tt.mission_statement&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$4,{kind:"regular",children:"Mission Statement"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$4,{className:"value",kind:"medium",children:tt.mission_statement})})]})]}),defaultData={description:"",mission_statement:"",search_term:"",title:""},About=()=>{const[tt]=useUserStore(ot=>[ot.isAdmin]),[et,nt]=reactExports.useState(!1),[rt,it]=reactExports.useState(defaultData);return reactExports.useEffect(()=>{(async()=>{nt(!0);try{const at=await getAboutData();it(at)}catch(at){console.warn(at)}finally{nt(!1)}})()},[]),jsxRuntimeExports.jsxs(Wrapper$d,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsx(Heading$2,{align:"center",direction:"row",justify:"space-between",children:jsxRuntimeExports.jsx(Text$4,{className:"title",children:"About"})}),et?jsxRuntimeExports.jsx(ContentWrapper,{align:"center",justify:"center",children:jsxRuntimeExports.jsx(ClipLoader$2,{})}):jsxRuntimeExports.jsx(ContentWrapper,{align:"stretch",justify:"flex-start",children:tt?jsxRuntimeExports.jsx(AboutAdminView,{initialValues:rt}):jsxRuntimeExports.jsx(CommonView,{initialValues:rt})})]})},Wrapper$d=styled$4(Flex)` border-radius: 8px; box-shadow: 0px 5px 6px rgb(0 0 0 / 50%); padding: 16px; @@ -6535,8 +6531,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho overflow: auto; flex: 1; width: 100%; -`,EditButton=styled$4(Button)` - margin-left: auto; `,Heading$2=styled$4(Flex)` margin-bottom: 16px; ${Text$4} { diff --git a/build/index.html b/build/index.html index 291434dbc..2372cdc71 100644 --- a/build/index.html +++ b/build/index.html @@ -22,7 +22,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Second Brain - +