{"version":3,"file":"AsyncCallTreeViewer-CMfYLp-3.js","sources":["../../components/features/AsyncCallTreeViewer.tsx"],"sourcesContent":["\n\nimport React, { useState, useMemo } from 'react';\nimport { ChartBarIcon } from '../icons/FeatureIcons.tsx';\n\ninterface CallNode {\n name: string;\n duration: number;\n children?: CallNode[];\n}\n\nconst exampleJson = `{\n \"name\": \"startApp\",\n \"duration\": 500,\n \"children\": [\n {\n \"name\": \"fetchUserData\",\n \"duration\": 300,\n \"children\": [\n { \"name\": \"authenticate\", \"duration\": 100 },\n { \"name\": \"fetchProfile\", \"duration\": 150 }\n ]\n },\n {\n \"name\": \"loadInitialAssets\",\n \"duration\": 450,\n \"children\": [\n { \"name\": \"loadImage.png\", \"duration\": 200 },\n { \"name\": \"loadScript.js\", \"duration\": 250 }\n ]\n }\n ]\n}`;\n\n\nconst TreeNode: React.FC<{ node: CallNode, level: number, maxDuration: number }> = ({ node, level, maxDuration }) => {\n const [isOpen, setIsOpen] = React.useState(true);\n const hasChildren = node.children && node.children.length > 0;\n\n return (\n
Paste a JSON structure to visualize an asynchronous function call tree.
\n