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SearchOverlay.js","webpack://_N_E/./pages/components/ScrolledHeader.js","webpack://_N_E/./pages/components/ArticleHeader.module.css","webpack://_N_E/./pages/components/IonSearchOverlay.module.css"],"sourcesContent":["import React, { useState, useRef } from 'react';\nimport styles from './IonSearchOverlay.module.css';\n\nconst API_URL = 'http://ion-agentic-env.eba-rq3muvb8.us-east-1.elasticbeanstalk.com/';\n\nconst IonSearchOverlay = ({ isOpen, onClose }) => {\n const [query, setQuery] = useState('');\n const [isLoading, setIsLoading] = useState(false);\n const [searchResults, setSearchResults] = useState(null);\n const inputRef = useRef(null);\n\n const parseMarkdownResults = (markdownString) => {\n // Split into individual results\n const results = markdownString.split('\\n\\n').map(section => {\n const lines = section.split('\\n');\n const resultObj = {};\n \n lines.forEach(line => {\n // Extract number prefix if it exists\n const content = line.replace(/^\\d+\\.\\s*/, '');\n \n if (content.startsWith('**Title:**')) {\n const match = content.match(/\\[(.*?)\\]\\((.*?)\\)/);\n if (match) {\n resultObj.title = match[1];\n resultObj.url = match[2];\n }\n } else if (content.startsWith('**Date:**')) {\n resultObj.date = content.replace('**Date:**', '').trim();\n } else if (content.startsWith('**Writer:**')) {\n const match = content.match(/\\[(.*?)\\]\\((.*?)\\)/);\n if (match) {\n resultObj.writerText = match[1];\n resultObj.writerLink = match[2];\n }\n } else if (content.startsWith('**Preview:**')) {\n resultObj.preview = content.replace('**Preview:**', '').trim();\n } else if (content.startsWith('**Expertise:**')) {\n resultObj.expertise = content.replace('**Expertise:**', '').trim();\n } else if (content.startsWith('**Bio:**')) {\n resultObj.bio = content.replace('**Bio:**', '').trim();\n }\n });\n \n return resultObj;\n });\n \n return results.filter(result => result.title && result.url);\n };\n\n const handleSubmit = async (e) => {\n e.preventDefault();\n if (!query.trim()) return;\n\n setIsLoading(true);\n setSearchResults(null);\n\n try {\n const response = await fetch(`${API_URL}/api/search`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n query: query.trim(),\n query_type: 'articles',\n limit: 5\n })\n });\n\n if (!response.ok) {\n const errorData = await response.json();\n throw new Error(errorData.detail || 'Search request failed');\n }\n\n const data = await response.json();\n console.log('Raw API Response:', data);\n \n if (data.results) {\n const parsed = parseMarkdownResults(data.results);\n console.log('Parsed results:', parsed);\n setSearchResults(parsed);\n }\n } catch (error) {\n console.error('Search error:', error);\n setSearchResults([]);\n } finally {\n setIsLoading(false);\n }\n };\n\n const renderSearchResult = (result) => {\n return (\n
\n {result.preview}\n
\n )}\n {result.expertise && (\n{result.expertise}
\n )}\n {result.bio && (\n{result.bio}
\n )}\n