1"use strict";(self.webpackChunkfrontend_v1=self.webpackChunkfrontend_v1||[]).push([[46],{46:(e,a,i)=>{i.r(a),i.d(a,{default:()=>l});var n=i(9950),s=i(5886),t=i(2875),r=i(5348),o=i(4414);const l=e=>{let{onComplete:a,onClose:i,autoOpen:l=!1}=e;const[c,d]=(0,n.useState)([]),[m,u]=(0,n.useState)(""),[p,h]=(0,n.useState)(!1),[g,y]=(0,n.useState)(null),[v,A]=(0,n.useState)(null),f=[{id:"facebook",name:"Facebook",icon:(0,o.jsx)(t.iYk,{}),color:"#1877f2"},{id:"instagram",name:"Instagram",icon:(0,o.jsx)(t.ao$,{}),color:"#E4405F"},{id:"twitter",name:"Twitter/X",icon:(0,o.jsx)(t.feZ,{}),color:"#1da1f2"},{id:"linkedin",name:"LinkedIn",icon:(0,o.jsx)(t.QEs,{}),color:"#0077b5"},{id:"tiktok",name:"TikTok",icon:(0,o.jsx)(t.kkU,{}),color:"#000000"},{id:"snapchat",name:"Snapchat",icon:(0,o.jsx)(t.OHR,{}),color:"#fffc00"}],_=(e,a,i)=>{let n="Medium";e.toLowerCase().includes("critical")?n="Critical":e.toLowerCase().includes("high")?n="High":e.toLowerCase().includes("low")&&(n="Low");const s=P(e),t=a.map(a=>{const i=f.find(e=>e.id===a);return E(i,e)}),r=Math.min(2*a.length,s.length);return{platforms:a,platformNames:i,riskLevel:n,overallScore:k(n,a.length),criticalIssues:r,recommendations:s.slice(0,8),platformAnalysis:t,privacyTips:x(),dataExposureRisks:N(e),geminiResponse:e,analysisDate:(new Date).toLocaleString()}},P=e=>{const a=[];e.split("\n").forEach(e=>{if(e.includes("recommendation")||e.includes("setting")||e.includes("should")){const i=e.trim().replace(/^\d+\.?\s*/,"");i.length>10&&i.length<100&&a.push(i)}});return[...a,"\ud83d\udd12 Set all profiles to private/friends-only","\ud83d\udccd Disable location tracking and geotagging","\ud83d\udc65 Review and limit friend/follower lists","\ud83d\udce7 Turn off email/phone number discoverability","\ud83d\udd0d Disable search engine indexing of your profile","\ud83d\udcf1 Review and revoke third-party app permissions","\ud83c\udfaf Limit targeted advertising and data collection","\ud83d\udcf8 Review photo tagging and recognition settings"].slice(0,10)},E=(e,a)=>({...e,...{facebook:{riskLevel:"High",keySettings:["Privacy Settings","Timeline and Tagging","Public Posts","Friend Lists"],mainConcerns:["Data harvesting","Political profiling","Ad targeting"]},instagram:{riskLevel:"Medium",keySettings:["Account Privacy","Story Settings","Activity Status","Data Download"],mainConcerns:["Location exposure","Photo metadata","Business profiling"]},twitter:{riskLevel:"Medium",keySettings:["Tweet Privacy","Photo Tagging","Discoverability","Data Sharing"],mainConcerns:["Public conversations","Location tracking","Political targeting"]},linkedin:{riskLevel:"Low",keySettings:["Profile Visibility","Activity Broadcasts","Data Export","Ad Preferences"],mainConcerns:["Professional exposure","Recruiter access","Business networking"]},tiktok:{riskLevel:"Critical",keySettings:["Account Privacy","Data Download","Personalization","Third-party Sharing"],mainConcerns:["Chinese data laws","Algorithm manipulation","Minor safety"]},snapchat:{riskLevel:"Medium",keySettings:["Ghost Mode","Story Privacy","Data Requests","Ad Preferences"],mainConcerns:["Location sharing","Disappearing content myths","Teen safety"]}}[e.id]||{},analysisText:C(a,e.name)}),C=(e,a)=>{const i=e.split("\n"),n=[];let s=!1;return i.forEach(e=>{e.toLowerCase().includes(a.toLowerCase())?(s=!0,n.push(e)):s&&(""===e.trim()||e.match(/^\d+\./))?s=!1:s&&n.push(e)}),n.join(" ").trim()||`Privacy analysis for ${a} included in overall assessment.`},k=(e,a)=>{let i=70;return"Low"===e?i+=20:"High"===e?i-=15:"Critical"===e&&(i-=30),i-=Math.min(3*a,15),Math.max(0,Math.min(100,i))},x=()=>["Use unique, strong passwords for each platform","Enable two-factor authentication everywhere","Regularly review and clean up your friend/follower lists","Think twice before posting personal information","Use privacy-focused browsers and VPNs when possible"],N=e=>["Personal information sold to data brokers","Location data tracked and stored","Photos analyzed for facial recognition","Messages scanned for advertising","Behavioral patterns profiled and sold"].slice(0,4);return(0,o.jsx)(s.Ay,{toolName:"Social Media Privacy Audit",toolIcon:"\ud83d\udcf1",toolDescription:"Analyze your social media privacy settings and exposure risks",onClose:i,className:"social-media-privacy-tool",autoOpen:l,children:(0,o.jsxs)("div",{className:"social-media-privacy-content",children:[(0,o.jsxs)("div",{className:"privacy-audit-header",children:[(0,o.jsx)("h3",{children:"\ud83d\udd12 Social Media Privacy Analysis"}),(0,o.jsx)("p",{children:"Select your platforms and describe your current privacy concerns to get personalized recommendations."})]}),(0,o.jsxs)("div",{className:"platform-selection",children:[(0,o.jsx)("h4",{children:"\ud83d\udcf1 Which platforms do you use?"}),(0,o.jsx)("div",{className:"platform-grid",children:f.map(e=>(0,o.jsxs)("button",{className:"platform-btn "+(c.includes(e.id)?"selected":""),onClick:()=>{return a=e.id,void d(e=>e.includes(a)?e.filter(e=>e!==a):[...e,a]);var a},style:{"--platform-color":e.color},children:[(0,o.jsx)("div",{className:"platform-icon",style:{color:e.color},children:e.icon}),(0,o.jsx)("span",{children:e.name})]},e.id))})]}),(0,o.jsxs)("div",{className:"privacy-description",children:[(0,o.jsx)("h4",{children:"\ud83d\udcad Describe your privacy concerns (optional)"}),(0,o.jsx)("textarea",{value:m,onChange:e=>u(e.target.value),placeholder:"e.g., I'm worried about my posts being public, my location being tracked, targeted ads, family photos being seen by strangers...",className:"privacy-textarea",rows:4})]}),(0,o.jsx)("div",{className:"analyze-section",children:(0,o.jsxs)("button",{className:"analyze-btn",onClick:async()=>
1{if(0!==c.length){h(!0),A(null);try{const e=c.map(e=>{var a;return null===(a=f.find(a=>a.id===e))||void 0===a?void 0:a.name}).join(", "),i=`\n As a cybersecurity expert, analyze the privacy risks for these social media platforms: ${e}\n \n User's current privacy description: ${m||"No specific description provided"}\n \n Please provide:\n 1. Overall Privacy Risk Level (Low/Medium/High/Critical)\n 2. Platform-specific privacy concerns\n 3. Most critical privacy settings to check\n 4. Data exposure risks\n 5. Specific step-by-step recommendations for each platform\n 6. Red flags to look out for\n \n Focus on practical, actionable advice that a non-technical user can implement.\n Be specific about privacy settings locations and what to change.\n `,n=await(0,r.ar)(i),s=_(n,c,e);y(s),a&&a({type:"social_media_privacy",data:{platforms:s.platforms,riskLevel:s.riskLevel,overallScore:s.overallScore,criticalIssues:s.criticalIssues,recommendationsCount:s.recommendations.length},summary:`\ud83d\udd12 **Social Media Privacy Analysis**: ${s.riskLevel} risk across ${c.length} platform${c.length>1?"s":""} | ${s.criticalIssues} critical privacy concerns found | ${s.recommendations.length} specific recommendations provided`})}catch(v){console.error("Social media privacy analysis failed:",v),A("Failed to analyze social media privacy. Please try again.")}finally{h(!1)}}else A("Please select at least one social media platform")},disabled:0===c.length||p,children:[(0,o.jsx)(t.SMR,{}),p?"Analyzing Privacy Settings...":`Analyze ${c.length} Platform${1!==c.length?"s":""}`]})}),p&&(0,o.jsx)(s.lq,{message:"Analyzing your social media privacy risks and generating personalized recommendations..."}),v&&(0,o.jsx)(s.v4,{message:v}),g&&!p&&(0,o.jsx)(s.I8,{status:"Critical"===g.riskLevel?"error":"High"===g.riskLevel?"warning":"info",title:`Privacy Analysis Complete: ${g.riskLevel} Risk Level`,message:`Analyzed ${g.platforms.length} social media platform${g.platforms.length>1?"s":""} and found ${g.criticalIssues} privacy concerns requiring attention.`,details:(0,o.jsxs)("div",{className:"privacy-results",children:[(0,o.jsx)("div",{className:"risk-overview",children:(0,o.jsxs)("div",{className:"privacy-score",children:[(0,o.jsxs)("div",{className:`score-circle ${g.riskLevel.toLowerCase()}`,children:[(0,o.jsx)("span",{className:"score-number",children:g.overallScore}),(0,o.jsx)("span",{className:"score-label",children:"Privacy Score"})]}),(0,o.jsx)("div",{className:"risk-details",children:(0,o.jsxs)("div",{className:`risk-level ${g.riskLevel.toLowerCase()}`,children:["Critical"===g.riskLevel&&(0,o.jsx)(t.BS8,{}),"High"===g.riskLevel&&(0,o.jsx)(t.BS8,{}),"Medium"===g.riskLevel&&(0,o.jsx)(t.Ny1,{}),"Low"===g.riskLevel&&(0,o.jsx)(t.A7C,{}),(0,o.jsxs)("span",{children:[g.riskLevel," Risk Level"]})]})})]})}),(0,o.jsxs)("div",{className:"platform-analysis",children:[(0,o.jsx)("h4",{children:"\ud83d\udcca Platform-Specific Analysis"}),(0,o.jsx)("div",{className:"platform-results",children:g.platformAnalysis.map((e,a)=>{var i,n;return(0,o.jsxs)("div",{className:`platform-result ${null===(i=e.riskLevel)||void 0===i?void 0:i.toLowerCase()}`,children:[(0,o.jsxs)("div",{className:"platform-header",children:[e.icon,(0,o.jsx)("span",{className:"platform-name",children:e.name}),(0,o.jsxs)("span",{className:`risk-badge ${null===(n=e.riskLevel)||void 0===n?void 0:n.toLowerCase()}`,children:[e.riskLevel||"Medium"," Risk"]})]}),(0,o.jsxs)("div",{className:"platform-concerns",children:[(0,o.jsx)("strong",{children:"Key Settings to Check:"}),(0,o.jsx)("ul",{children:(e.keySettings||[]).map((e,a)=>(0,o.jsx)("li",{children:e},a))})]})]},a)})})]}),(0,o.jsxs)("div",{className:"privacy-recommendations",children:[(0,o.jsx)("h4",{children:"\ud83c\udfaf Priority Privacy Actions"}),(0,o.jsx)("div",{className:"recommendations-list",children:g.recommendations.map((e,a)=>(0,o.jsxs)("div",{className:"recommendation-item",children:[(0,o.jsx)("span",{className:"rec-number",children:a+1}),(0,o.jsx)("span",{className:"rec-text",children:e})]},a))})]}),(0,o.jsxs)("div",{className:"privacy-tips",children:[(0,o.jsx)("h4",{children:"\ud83d\udca1 Additional Privacy Tips"}),(0,o.jsx)("ul",{children:g.privacyTips.map((e,a)=>(0,o.jsx)("li",{children:e},a))})]})]}),actions:[{label:"Run Data Broker Scan",icon:"\ud83d\udd0d",variant:"primary",onClick:()=>{a&&a({type:"redirect_to_tool",tool:"data_broker_scan",context:"Social media privacy analysis completed"})}},{label:"Check Another Platform",icon:"\ud83d\udd04",variant:"secondary",onClick:()=>{d([]),u(""),y(null)}}]})]})})}},5348:(e,a,i)=>{i.d(a,{ar:()=>t,tN:()=>r});const n={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1,REACT_APP_AUTH_PROVIDER:"firebase",REACT_APP_FIREBASE_API_KEY:"AIzaSyCAag_Re5t3CxdvCqTb0E8ciy56y0iV_r8",REACT_APP_FIREBASE_AUTH_DOMAIN:"databrokersites.firebaseapp.com",REACT_APP_FIREBASE_PROJECT_ID:"databrokersites",REACT_APP_FIREBASE_STORAGE_BUCKET:"databrokersites.firebasestorage.app",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"668116718095",REACT_APP_FIREBASE_APP_ID:"1:668116718095:web:ac092a3eec80fd2485097a",REACT_APP_DISABLE_CLERK:"true",REACT_APP_API_BASE_URL:"https://cyberforget-backend-668116718095.us-central1.run.app",REACT_APP_DATA_REMOVALS_AUTH:"72382-cd",REACT_APP_THUMBIO_KEY:"72571-1234",REACT_APP_PRODUCTION_MODE:"true",REACT_APP_API_URL:"https://cyberforget-backend-668116718095.us-central1.run.app",REACT_APP_SOCKET_URL:"wss://cyberforget-backend-668116718095.us-central1.run.app",REACT_APP_SUPABASE_URL:"https://vprcocxfjfbmiblyirml.supabase.co",REACT_APP_SUPABASE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZwcmNvY3hmamZibWlibHlpcm1sIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTIyNjIxOTMsImV4cCI6MjA2NzgzODE5M30.-McryxBqqdP1wXqYpD1YLHRb1TtNvO7vqzU1Oh7_jZM",REACT_APP_DEBUG:"false",REACT_APP_LOG_LEVEL:"error",REACT_APP_SHOW_DEBUG_PROFILE:"false",REACT_APP_SHOW_HOURLY_TEST:"false",REACT_APP_SHOW_FEATURE_TOGGLES:"false",REACT_APP_LOG_API_CALLS:"false",REACT_APP_ENABLE_AUTO_SCROLL:"true",REACT_APP_AUTO_SCAN_ENABLED:"true",REACT_APP_AUTO_SCAN_INTERVAL:"360000",REACT_APP_MAX_CONCURRENT_SCANS:"2",REACT_APP_API_TIMEOUT:"30000",REACT_APP_API_RETRIES:"3",REACT_APP_ANALYTICS:"true",REACT_APP_ERROR_REPORTING:"true",REACT_APP_GA_MEASUREMENT_ID:"G-MWWRMNQT40",REACT_APP_ENABLE_ANALYTICS:"true",REACT_APP_STRIPE_PUBLISHABLE_KEY:"pk_live_51FhID3G356deDteTgLqP3lB3K5iUIpBjqOeMVpPgtYJ7VQd4rEe8xJPaMY5nkGQmJFHrI0ioqE7RzObYEgJxrNdR00jn5RvQ4d",REACT_APP_STRIPE_PREMIUM_MONTHLY_PRICE_ID:"price_1TeVJlG356deDteTN6skVY6u",REACT_APP_STRIPE_PREMIUM_ANNUAL_PRICE_ID:"price_1TeVJpG356deDteTS2JEODWK",REACT_APP_CLERK_PUBLISHABLE_KEY:"pk_live_your_clerk_key_here"}.REACT_APP_GEMINI_API_KEY||"AIzaSyBSA7Mcs-gxNRIUmt7z0w2WQf3D6tGDlwI",s="https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent",t
1=async e=>{try{console.log("\ud83e\udd16 Generating Gemini response for prompt:",e.substring(0,100)+"...");const a=await fetch(`${s}?key=${n}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{parts:[{text:e}]}],generationConfig:{temperature:.7,topK:1,topP:1,maxOutputTokens:2048},safetySettings:[{category:"HARM_CATEGORY_HARASSMENT",threshold:"BLOCK_MEDIUM_AND_ABOVE"},{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"BLOCK_MEDIUM_AND_ABOVE"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"BLOCK_MEDIUM_AND_ABOVE"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"BLOCK_MEDIUM_AND_ABOVE"}]})});if(!a.ok){const e=await a.text();throw console.error("Gemini API error:",e),new Error(`Gemini API failed: ${a.status} ${a.statusText}`)}const i=await a.json();if(console.log("\u2705 Gemini response received:",i),!i.candidates||!i.candidates[0]||!i.candidates[0].content)throw console.error("Invalid Gemini response structure:",i),new Error("Invalid response from Gemini API");const t=i.candidates[0].content.parts[0].text;return console.log("\ud83d\udcdd Generated text:",t.substring(0,200)+"..."),t}catch(a){return console.error("Error generating Gemini response:",a),e.includes("social media")?"Based on the social media platforms you've selected, here are some key privacy recommendations:\n\n1. Review your privacy settings on each platform to ensure posts are only visible to friends\n2. Disable location tracking and geotagging features\n3. Limit the personal information visible in your profile\n4. Review and remove third-party app permissions\n5. Enable two-factor authentication on all accounts\n6. Be cautious about what you share publicly\n\nYour privacy risk level appears to be MEDIUM based on common social media usage patterns. Consider tightening your privacy settings and being more selective about what you share online.":e.includes("wifi")||e.includes("network")?"Based on your WiFi network information, here are security recommendations:\n\n1. Upgrade to WPA3 encryption if your router supports it, or ensure you're using WPA2\n2. Use a strong, unique password for your WiFi network (12+ characters)\n3. Change the default router admin credentials\n4. Update your router firmware regularly\n5. Disable WPS (WiFi Protected Setup)\n6. Set up a separate guest network for visitors\n7. Consider hiding your network name (SSID) from public broadcasting\n\nYour network security appears to need some attention. The most critical step is ensuring you're using strong encryption and a secure password.":e.includes("message")||e.includes("scam")||e.includes("phishing")?"Based on the message content analysis, here are the findings:\n\nRISK LEVEL: HIGH - This message shows several warning signs of a potential scam or phishing attempt.\n\nRed flags detected:\n1. Urgent language designed to create pressure\n2. Request for personal information or immediate action\n3. Generic greeting without personalized information\n4. Suspicious sender or unusual contact method\n\nRecommendations:\n1. DO NOT click any links or download attachments\n2. DO NOT provide personal information, passwords, or payment details \n3. Delete the message immediately\n4. If the message claims to be from a legitimate organization, contact them directly through their official website or phone number\n5. Report the message as spam/phishing to your email or messaging provider\n\nRemember: Legitimate organizations rarely ask for sensitive information via email or text, and they don't typically create artificial urgency around account issues.":"I apologize, but I'm currently unable to process your request due to a temporary service issue. Please try again in a few moments, or contact support if the problem persists.\n\nIn the meantime, here are some general cybersecurity best practices:\n- Use strong, unique passwords for all accounts\n- Enable two-factor authentication where possible\n- Keep your software and devices updated\n- Be cautious of suspicious emails and messages\n- Regularly review your privacy settings on social media\n- Use secure networks for sensitive activities\n\nThank you for your patience."}},r=async(e,a,i,t)=>{try{console.log("\ud83e\udde0 Predicting data broker results for:",{firstName:e,lastName:a,city:i,state:t});const r=`You are a demographic analysis AI. Analyze the likelihood and expected data broker search results for this person:\n\nName: ${e} ${a}\nLocation: ${i}, ${t}\n\nConsider these factors in your analysis:\n1. Name commonality in the specified region (e.g., "John Smith" in USA is very common, "John Ahmed" in Iraq is rare)\n2. Cultural name patterns and regional demographics\n3. Population density of the location\n4. Typical data broker exposure rates for different demographic groups\n5. Immigration patterns and multicultural populations\n\nBased on demographic data, population statistics, and name frequency analysis, provide ONLY a realistic number representing how many data broker sites would likely have records for this person.\n\n
1IMPORTANT: Return ONLY a single integer number between 0-10, nothing else. No explanation, no text, just the number.\n\nGuidelines:\n- 0 = Completely fake/gibberish name (e.g., "iddijd sijsisj", "asdfgh qwerty", random characters)\n- 1-2 = Extremely rare/unique name combination\n- 3-4 = Uncommon name for the region\n- 5-6 = Moderately common name\n- 7-8 = Common name in the region\n- 9-10 = Very common name in a highly populated area (reserved for names like "John Smith" in major US cities)\n\nExamples:\n- "John Smith" in "New York, NY" \u2192 10 (extremely common name in populous area)\n- "Mohammed Ali" in "Dearborn, MI" \u2192 8 (common name in area with large Arab population)\n- "John Smith" in "Baghdad, Iraq" \u2192 1 (Western name extremely rare in Iraq)\n- "Xiao Wang" in "San Francisco, CA" \u2192 7 (common Chinese name in city with large Chinese population)\n- "Xiao Wang" in "Rural Alabama, AL" \u2192 2 (uncommon Chinese name in rural Southern USA)\n- "Unique Snowflake" in "Portland, OR" \u2192 3 (very unique name, moderate city)\n- "iddijd sijsisj" in "New York, NY" \u2192 0 (gibberish/fake name)\n- "asdfgh qwerty" in "Los Angeles, CA" \u2192 0 (random characters, not a real name)\n\nNow analyze: ${e} ${a} in ${i}, ${t}\nReturn only the number:`,l=await fetch(`${s}?key=${n}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{parts:[{text:r}]}],generationConfig:{temperature:.3,topK:1,topP:.8,maxOutputTokens:10}})});if(!l.ok)throw new Error(`Gemini API failed: ${l.status}`);const c=await l.json(),d=c.candidates[0].content.parts[0].text.trim().match(/\d+/),m=d?parseInt(d[0]):null;return null!==m&&m>=0&&m<=10?(console.log("\u2705 Predicted result count:",m),m):(console.warn("\u26a0\ufe0f Invalid AI prediction, using fallback heuristic"),o(e,a,i,t))}catch(r){return console.error("Error predicting data broker results:",r),o(e,a,i,t)}},o=(e,a,i,n)=>{const s=(e||"").toLowerCase().trim(),t=(a||"").toLowerCase().trim(),r=(i||"").toLowerCase().trim(),o=e=>{if(!e)return!1;if(/(.)\1{3,}/.test(e))return!0;if(!/[aeiou]/.test(e)&&e.length>3)return!0;return!!["asdf","qwer","zxcv","hjkl","uiop"].some(a=>e.includes(a))||e.length>10&&!/[aeiou]{2}/.test(e)};if(o(s)||o(t))return console.log("\ud83d\udeab Detected gibberish name, returning 0"),0;let l=3;["john","michael","david","james","robert","william","mary","jennifer","linda","patricia","sarah","jessica","lisa","karen"].includes(s)&&(l+=3),["smith","johnson","williams","brown","jones","garcia","martinez","davis","rodriguez","miller","wilson","moore","taylor","anderson"].includes(t)&&(l+=3);return["new york","los angeles","chicago","houston","phoenix","philadelphia","san antonio","san diego","dallas","san jose"].some(e=>r.includes(e))&&(l+=1),Math.min(l,10)}},5886:(e,a,i)=>{i.d(a,{v4:()=>c,lq:()=>l,I8:()=>o,Ay:()=>d});var n=i(9950),s=i(228),t=i(4152),r=i(4414);const o=e=>{let{status:a,title:i,message:n,details:s,actions:o,className:l=""}=e;return(0,r.jsxs)(t.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`tool-result ${a} ${l}`,children:[(0,r.jsxs)("div",{className:"result-header",children:[(0,r.jsx)("span",{className:"result-icon",children:(()=>{switch(a){case"success":return"\u2705";case"warning":return"\u26a0\ufe0f";case"error":return"\u274c";case"info":return"\u2139\ufe0f";default:return"\ud83d\udcca"}})()}),(0,r.jsx)("h4",{className:"result-title",children:i})]}),n&&(0,r.jsx)("p",{className:"result-message",children:n}),s&&(0,r.jsx)("div",{className:"result-details",children:s}),o&&o.length>0&&(0,r.jsx)("div",{className:"result-actions",children:o.map((e,a)=>(0,r.jsxs)("button",{className:`result-action-btn ${e.variant||"primary"}`,onClick:e.onClick,children:[e.icon&&(0,r.jsx)("span",{className:"action-icon",children:e.icon}),e.label]},a))})]})},l=e=>{let{message:a="Processing..."}=e;return(0,r.jsxs)("div",{className:"tool-loading",children:[(0,r.jsx)("div",{className:"loading-spinner"}),(0,r.jsx)("p",{className:"loading-message",children:a})]})},c=e=>{let{error:a,onRetry:i}=e;return(0,r.jsxs)("div",{className:"tool-error",children:[(0,r.jsx)("span",{className:"error-icon",children:"\u274c"}),(0,r.jsx)("p",{className:"error-message",children:a}),i&&(0,r.jsx)("button",{className:"retry-btn",onClick:i,children:"Try Again"})]})},d=e=>{let{toolName:a,toolIcon:i,toolDescription:o,onComplete:l,onClose:c,children:d,className:m="",showHeader:u=!0}=e;
1const[p,h]=(0,n.useState)(!1),[g,y]=(0,n.useState)(!1);return(0,r.jsx)(s.N,{children:!g&&(0,r.jsxs)(t.P.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.95},transition:{duration:.3},className:`chat-tool-container ${m} ${p?"minimized":""}`,children:[u&&(0,r.jsxs)("div",{className:"chat-tool-header",children:[(0,r.jsxs)("div",{className:"tool-info",children:[(0,r.jsx)("span",{className:"tool-icon",children:i}),(0,r.jsxs)("div",{className:"tool-text",children:[(0,r.jsx)("h3",{className:"tool-name",children:a}),(0,r.jsx)("p",{className:"tool-description",children:o})]})]}),(0,r.jsxs)("div",{className:"tool-controls",children:[(0,r.jsx)("button",{className:"tool-control-btn minimize-btn",onClick:()=>h(!p),title:p?"Expand":"Minimize",children:p?"\u25bc":"\u25b2"}),(0,r.jsx)("button",{className:"tool-control-btn close-btn",onClick:()=>{y(!0),setTimeout(()=>{c&&c()},300)},title:"Close tool",children:"\u2715"})]})]}),(0,r.jsx)(s.N,{children:!p&&(0,r.jsx)(t.P.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"chat-tool-content",children:n.cloneElement(d,{onComplete:e=>{l&&l(e),setTimeout(()=>{window.dispatchEvent(new CustomEvent("toolCompleted",{detail:{result:e,toolName:a}}))},100)}})})})]})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.