PageSourceSearch

https://finthos.ai/assets/deepResearchExport-CL2y-8ii.js

js finthos.ai collected 2026-10-05 12:00:26 UTC 20,500 bytes, 2 lines download raw bytes

1import St from"./jspdf.es.min-Bh1qgChc.js";import{autoTable as xt}from"./jspdf.plugin.autotable-CfO62xhj.js";import{c as h,a as D}from"./Advisor-BkHEvck6.js";import"./index-g4WugBH4.js";import"./react-BpdGtorb.js";import"./charts-VqRjxJBw.js";import"./supabase-DRR_Es6B.js";import"./PremiumPageHeader-DtoR-MWi.js";import"./card-rwt4A55r.js";import"./textarea-DQF7pbvW.js";import"./scroll-area-C_O6PBee.js";import"./index-BdQq_4o_.js";import"./resizable-DfvKfWz5.js";import"./grip-vertical-Djbjqu9b.js";import"./dialog-CPfNxU02.js";import"./label-BhkyX0L4.js";import"./select-C-mPsjVI.js";import"./index-CP_LwkyG.js";import"./chevron-down-fgIjtWz2.js";import"./useSavedMessages-D_x38qf8.js";import"./badge-DEgwKkG_.js";import"./folder-CIfyWWby.js";import"./briefcase-CcrvOfEr.js";import"./loader-circle-D8jnIafj.js";import"./plus-CCLN8KKX.js";import"./markdown-content-2xHJ6WRf.js";import"./collapsible-B5jSS86d.js";import"./index-Bs2sydDB.js";import"./brain-C7FrD4rT.js";import"./circle-check-big-tnvYvNv2.js";import"./finthos-logo-BP-IVo33.js";import"./lightbulb-BTXNDNQC.js";import"./triangle-alert-DnKzB0ks.js";import"./clock-DMevmvOF.js";import"./slider-CMn2LDdN.js";import"./trash-2-DBIc44cF.js";import"./download-I5hXrnmp.js";import"./presentation-C0vh96UP.js";import"./globe-uz0LjgsN.js";import"./dollar-sign-DlmilPn4.js";import"./database-BSqXkgPZ.js";import"./arrow-right-HbiHr6XF.js";import"./calendar-D_26tjgl.js";import"./trending-down-BPYf34mQ.js";import"./list-checks-DfQ15ZRd.js";import"./search-C88qO0fg.js";import"./zap-DeX_tv2V.js";import"./info-CNue2mgk.js";import"./send-DZnJtVqJ.js";import"./formatDistanceToNow-CKuQd25-.js";import"./constructNow-BR0oC-tW.js";import"./en-US-Bfz1jvxT.js";import"./differenceInMonths-Bvhe9Knj.js";import"./getTimezoneOffsetInMilliseconds-B9UnuQsa.js";import"./differenceInCalendarMonths-CDiZ4PwV.js";import"./endOfMonth-TCNI7KCh.js";const c=[15,23,42],T=[11,77,44],ft=[34,197,94],b=[100,116,139],W=[220,38,38],w=[59,130,246],E=[124,58,237];function Tt(o){if(o==null)return"";if(typeof o=="string")return h(o);if(typeof o=="object"){const t=o,n=typeof t.title=="string"?t.title:null,l=typeof t.description=="string"?t.description:null;return n&&l?h(`${n} — ${l}`):h(t.title??t.action??t.description??t.text??Object.values(t).find(s=>typeof s=="string")??"")}return h(String(o))}const k=[[11,77,44],[26,135,84],[34,197,94],[134,239,172],[251,191,36],[249,115,22],[99,102,241],[236,72,153]];function G(o){if(!o)return new Date().toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"});try{return new Date(o).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}catch{return o}}function _(o){return o.addPage(),25}function g(o,t,n,l=25){const s=o.internal.pageSize.getHeight();return t+n>s-25?_(o):t}function R(o,t,n,l){return o.setFillColor(...T),o.roundedRect(20,l,12,12,2,2,"F"),o.setTextColor(255,255,255),o.setFont("helvetica","bold"),o.setFontSize(11),o.text(t,26,l+8.5,{align:"center"}),o.setTextColor(...c),o.setFontSize(20),o.text(n,36,l+9),l+20}function A(o,t,n,l={}){const s=l.fontSize??10,C=l.color??c,e=l.x??20,F=l.maxWidth??o.internal.pageSize.getWidth()-40;o.setFont("helvetica",l.bold?"bold":"normal"),o.setFontSize(s),o.setTextColor(...C);const S=(t||"").split(/\n+/);return S.forEach((x,v)=>{if(!x.trim())return;const f=o.splitTextToSize(x.trim(),F);for(const m of f)n=g(o,n,s*.5+1),o.text(m,e,n),n+=s*.5+1;v<S.length-1&&(n+=2)}),n}function Ft(o,t,n,l,s){const e=o.internal.pageSize.getWidth()-40,F=22;return l=g(o,l,F+4),o.setFillColor(s[0],s[1],s[2],.08),o.setDrawColor(...s),o.setLineWidth(.4),o.setFillColor(...s),o.rect(20,l,2,F,"F"),o.setFillColor(248,250,252),o.rect(22,l,e-2,F,"F"),o.setFontSize(8),o.setTextColor(...s),o.setFont("helvetica","bold"),o.text(h(t).toUpperCase(),26,l+7),o.setFontSize(11),o.setTextColor(...c),o.text(o.splitTextToSize(h(n)||"—",e-8),26,l+14),l+F+6}function $(o,t,n,l,s,C,e){o.setFillColor(...e),o.rect(t,n,2,22,"F"),o.setFillColor(248,250,252),o.rect(t+2,n,l-2,22,"F"),o.setDrawColor(226,232,240),o.rect(t,n,l,22,"S"),o.setFontSize(7),o.setTextColor(...e),o.setFont("helvetica","bold"),o.text(h(s).toUpperCase(),t+4,n+7),o.setFontSize(13),o.setTextColor(...c);const S=h(C)||"—",x=o.splitTextToSize(S,l-8)[0]??S;o.text(x,t+4,n+16)}function dt(o,t,n,l,s){const C=s.reduce((F,S)=>F+(Number(S.percentage)||0),0)||1;let e=-Math.PI/2;
1s.forEach((F,S)=>{const x=(Number(F.percentage)||0)/C*Math.PI*2,v=e+x,f=k[S%k.length];o.setFillColor(...f);const m=Math.max(8,Math.ceil(x/(Math.PI*2)*60));for(let z=0;z<m;z++){const I=e+x*z/m,y=e+x*(z+1)/m;o.triangle(t,n,t+Math.cos(I)*l,n+Math.sin(I)*l,t+Math.cos(y)*l,n+Math.sin(y)*l,"F")}e=v})}function gt(o,t,n,l,s,C){o.setFontSize(11),o.setFont("helvetica","bold"),o.setTextColor(...c),o.text(t,l,s),s+=4;const e=l+22,F=s+22;dt(o,e,F,20,n);let S=s+4;return o.setFontSize(8),o.setFont("helvetica","normal"),n.forEach((x,v)=>{const f=k[v%k.length];o.setFillColor(...f),o.rect(l+48,S-2.5,3,3,"F"),o.setTextColor(...c);const m=`${x.category} ${x.percentage}%`;o.text(o.splitTextToSize(m,C-50),l+53,S),S+=5}),Math.max(F+22,S)+4}function zt(o,t,n,l,s,C,e){if(o.setFontSize(11),o.setFont("helvetica","bold"),o.setTextColor(...c),o.text(e,t,n),n+=4,o.setDrawColor(229,231,235),o.setLineWidth(.2),o.rect(t,n,l,s,"S"),!C.length)return n+s+4;const F=C.map(m=>Number(m.volume)||0),S=Math.max(...F,1),x=Math.min(...F,0),v=S-x||1;for(let m=1;m<4;m++){const z=n+s*m/4;o.setDrawColor(241,245,249),o.line(t,z,t+l,z)}o.setDrawColor(...T),o.setLineWidth(.7);const f=l/Math.max(C.length-1,1);for(let m=0;m<C.length-1;m++){const z=t+f*m,I=n+s-(F[m]-x)/v*s,y=t+f*(m+1),L=n+s-(F[m+1]-x)/v*s;o.line(z,I,y,L)}return o.setFillColor(...T),o.setFontSize(7),o.setTextColor(...b),C.forEach((m,z)=>{const I=t+f*z,y=n+s-(F[z]-x)/v*s;o.circle(I,y,1.2,"F"),o.text(m.year,I,n+s+4,{align:"center"})}),o.setFontSize(7),o.text(`$${S}B`,t+l+1,n+3),o.text(`$${x}B`,t+l+1,n+s),n+s+8}function be(o){var U,O,Y,Q,K,j,q,X,J,Z,tt,et,ot,nt,it,lt,st,rt,at,ct,ht,mt,pt;const t=new St({orientation:"portrait",unit:"mm",format:"a4"}),n=t.internal.pageSize.getWidth(),l=t.internal.pageSize.getHeight(),s=`FR-${o.id.slice(0,8).toUpperCase()}`,C=h(o.query)||"Untitled research";t.setFillColor(...T),t.rect(0,0,n,4,"F");let e=60;t.setTextColor(...T),t.setFont("helvetica","bold"),t.setFontSize(28),t.text("FINTHOS",n/2,e,{align:"center"}),e+=4,t.setDrawColor(...T),t.setLineWidth(1.5),t.line(60,e,n-60,e),e+=18,t.setFontSize(28),t.setTextColor(...c),t.text("Deep Research Report",n/2,e,{align:"center"}),e+=14,t.setFontSize(16),t.setFont("helvetica","normal");const F=t.splitTextToSize(C,n-60);
1t.text(F,n/2,e,{align:"center"}),e+=F.length*7+6,t.setFontSize(11),t.setTextColor(...b),t.text(G(o.completed_at),n/2,e,{align:"center"}),e=l/2+20,t.setFillColor(245,243,255),t.setDrawColor(...E),t.setLineWidth(.6),t.roundedRect(20,e,n-40,36,3,3,"FD"),t.setFontSize(8),t.setTextColor(...E),t.setFont("helvetica","bold"),t.text("RESEARCH QUERY",26,e+8),t.setFontSize(12),t.setTextColor(...c),t.setFont("helvetica","normal"),t.text(t.splitTextToSize(C,n-52),26,e+16),t.setFontSize(9),t.setTextColor(...W),t.setFont("helvetica","bold"),t.text("CONFIDENTIAL",n/2,l-28,{align:"center"}),t.setTextColor(...b),t.setFont("helvetica","normal"),t.setFontSize(9),t.text(`Research ID: ${s}`,n/2,l-22,{align:"center"}),t.setFontSize(8),t.text("Generated by Finthos AI Research Platform",n/2,l-16,{align:"center"}),e=_(t),t.setFontSize(22),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("Table of Contents",20,e+5),t.setDrawColor(...T),t.setLineWidth(1),t.line(20,e+9,n-20,e+9),e+=20;const S=[["I.   Executive Summary","3"],["II.  Key Findings","4"],["III. Market Analysis","5"],["IV.  Portfolio Implications","6"],["V.   Strategic Recommendations","7"],["VI.  Risk Factors & Considerations","8"],["VII. Conclusion","9"],["VIII.Appendices","10"],["     A. Methodology","10"],["     B. Data Sources","11"],["     C. Disclaimers","12"]];t.setFontSize(11),t.setFont("helvetica","normal"),S.forEach(([i,a])=>{t.setTextColor(...c),t.text(i,20,e),t.setTextColor(...b),t.text(a,n-20,e,{align:"right"}),t.setDrawColor(220,220,220),t.setLineDashPattern([.6,1.2],0),t.line(85,e-1,n-25,e-1),t.setLineDashPattern([],0),e+=8}),e=_(t),e=R(t,"I","Executive Summary",e),e=Ft(t,"Question Asked",C,e,w),t.setFontSize(14),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("Bottom Line",20,e),e+=7;const x=(n-40-8)/3,v=o.bottom_line||{};if($(t,20,e,x,"Recommended Action",v.recommended_action||"See Recommendations",T),$(t,20+x+4,e,x,"Target Return",v.target_return||"—",w),$(t,20+(x+4)*2,e,x,"Time Horizon",v.time_horizon||"—",E),e+=28,e=A(t,D(o.executive_summary),e,{fontSize:10}),e+=4,(U=o.key_numbers)!=null&&U.length){e=g(t,e,36),t.setFillColor(...T),t.roundedRect(20,e,n-40,32,2,2,"F"),t.setFontSize(10),t.setTextColor(255,255,255),t.setFont("helvetica","bold"),t.text("KEY NUMBERS AT A GLANCE",26,e+7);const i=o.key_numbers.slice(0,4),a=(n-52)/i.length;i.forEach((r,p)=>{const d=26+a*p+a/2;t.setFontSize(15),t.setFont("helvetica","bold");const u=h(r.value)||"—",N=t.splitTextToSize(u,a-4)[0]??u;t.text(N,d,e+19,{align:"center"}),t.setFontSize(8),t.setFont("helvetica","normal");const P=h(r.label)||"",B=t.splitTextToSize(P,a-4)[0]??P;t.text(B,d,e+26,{align:"center"})}),e+=38}(O=o.key_findings)!=null&&O.length&&(e=_(t),e=R(t,"II","Key Findings",e),o.key_findings.forEac
1h((i,a)=>{e=g(t,e,30),t.setFillColor(...T),t.roundedRect(20,e-4,8,8,1,1,"F"),t.setFontSize(9),t.setTextColor(255,255,255),t.setFont("helvetica","bold"),t.text(String(a+1),24,e+1.5,{align:"center"}),t.setFontSize(12),t.setTextColor(...c),t.text(h(i.title)||"Finding",32,e+1),e+=8,e=A(t,D(i.description),e,{fontSize:10,x:32,maxWidth:n-52});const r=h(i.supporting_data);if(r){const p=t.splitTextToSize(r,n-78),d=Math.max(12,p.length*4+6);e=g(t,e,d+2),t.setFillColor(239,246,255),t.rect(32,e,n-52,d,"F"),t.setFontSize(8),t.setTextColor(...w),t.setFont("helvetica","bold"),t.text("DATA:",35,e+5),t.setTextColor(...c),t.setFont("helvetica","normal"),t.text(p,47,e+5),e+=d+2}e+=4})),e=_(t),e=R(t,"III","Market Analysis",e),t.setFontSize(13),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("Quantitative Analysis",20,e),e+=7,e=A(t,D(o.data_analysis)||"No quantitative analysis available.",e),e+=4,(Y=o.market_size_series)!=null&&Y.length&&(e=g(t,e,70),e=zt(t,20,e,n-40,50,o.market_size_series,"Market Size Evolution"));const f=o.key_insights||{};if(f.insight||f.warning||f.by_the_numbers){e=g(t,e,36);const i=(n-40-8)/3;[{title:"KEY INSIGHT",color:E,text:f.insight},{title:"WATCH OUT",color:[202,138,4],text:f.warning},{title:"BY THE NUMBERS",color:w,text:f.by_the_numbers}].forEach((a,r)=>{const p=20+(i+4)*r;t.setFillColor(248,250,252),t.setDrawColor(...a.color),t.setLineWidth(.4),t.roundedRect(p,e,i,32,2,2,"FD"),t.setFontSize(8),t.setTextColor(...a.color),t.setFont("helvetica","bold"),t.text(a.title,p+3,e+6),t.setFontSize(8),t.setTextColor(...c),t.setFont("helvetica","normal"),t.text(t.splitTextToSize(D(a.text)||"—",i-6),p+3,e+12)}),e+=38}if((Q=o.current_allocation)!=null&&Q.length||(K=o.proposed_allocation)!=null&&K.length||(j=o.gap_analysis)!=null&&j.length){if(e=_(t),e=R(t,"IV","Portfolio Implications",e),(q=o.current_allocation)!=null&&q.length||(X=o.proposed_allocation)!=null&&X.length){t.setFontSize(13),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("Allocation Comparison",20,e),e+=6;const i=(n-40-8)/2;let a=e,r=e;(J=o.current_allocation)!=null&&J.length&&(a=gt(t,"Current Portfolio",o.current_allocation,20,e,i)),(Z=o.proposed_allocation)!=null&&Z.length&&(r=gt(t,"Proposed Portfolio",o.proposed_allocation,20+i+8,e,i)),e=Math.max(a,r)+4}(tt=o.gap_analysis)!=null&&tt.length&&(e=g(t,e,30),t.setFontSize(13),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("Gap Analysis",20,e),e+=4,xt(t,{startY:e,margin:{left:20,right:20},head:[["Category","Current","Proposed","Change"]],body:o.gap_analysis.map(i=>[h(i.category),`${i.current}%`,`${i.proposed}%`,`${i.change>0?"+":""}${i.change}%`]),headStyles:{fillColor:T,textColor:[255,255,255],fontSize:9},bodyStyles:{fontSize:9,textColor:c},theme:"grid",styles:{cellPadding:2.5},columnStyles:{1:{halign:"right"},2:{halign:"right"},3:{halign:"right",fontStyle:"bold"}}}),e=(((et=t.lastAutoTable)==null?void 0:et.finalY)??e)+8)}if((ot=o.recommendations)!=null&&ot.length&&(e=_(t),e=R(t,"V","Strategic Recommendations",e),o.recommendations.forEach((i,a)=>{var d;const r=i.priority==="high"?W:i.priority==="medium"?[202,138,4]:w;e=g(t,e,24),t.setFillColor(...r),t.roundedRect(20,e-4,8,8,1,1,"F"),t.setFontSize(9),t.setTextColor(255,255,255),t.setFont("helvetica","bold"),t.text(String(a+1),24,e+1.5,{align:"center"}),t.setFontSize(12),t.setTextColor(...c),t.text(h(i.title)||"Recommendation",32,e+1);const p=(i.priority||"").toUpperCase();if(p){const u=t.getTextWidth(p)+6;t.setFillColor(...r),t.roundedRect(n-20-u,e-3,u,6,1,1,"F"),t.setFontSize(7),t.setTextColor(255,255,255),t.text(p,n-20-u/2,e+1,{align:"center"})}e+=7,e=A(t,D(i.description),e,{fontSize:10,x:32,maxWidth:n-52}),(d=i.action_items)!=null&&d.length&&(e=g(t,e,8+i.action_items.length*5),t.setFontSize(9),t.setFont("helvetica","bold"),t.setTextColor(...T),t.text("Action Items",32,e),e+=5,i.action_items.forEach(u=>{const N=Tt(u);if(!N)return;t.setFont("helvetica","normal"),t.setFontSize(9),t.setTextColor(...c);const P=t.splitTextToSize(`▸ ${N}`,n-56);for(const B of P)e=g(t,e,5),t.text(B,35,e),e+=5})),e+=6}),(nt=o.implementation_roadmap)!=null&&nt.length)){e=g(t,e,30),t.setFillColor(245,243,255),t.setDrawColor(...E),t.setLineWidth(.4);const i=e;t.roundedRect(20,e,n-40,8+o.implementation_roadmap.length*12,3,3,"FD"),e+=7,t.setFontSize(11),t.setFont("helvetica","bold"),t.setTextColor(...E),t.text("Implementation Roadmap",25,e),e+=6,o.implementation_roadmap.forEac
1h(a=>{const r=h(a.phase)||"Phase";t.setFillColor(...E);const p=t.getTextWidth(r)+6;t.roundedRect(25,e-3,p,6,1,1,"F"),t.setFontSize(8),t.setTextColor(255,255,255),t.setFont("helvetica","bold"),t.text(r,25+p/2,e+1,{align:"center"}),t.setTextColor(...c),t.setFont("helvetica","bold"),t.setFontSize(9),t.text(h(a.title)||"",25+p+4,e+1),t.setFont("helvetica","normal"),t.setFontSize(8),t.setTextColor(...b),t.text(t.splitTextToSize(h(a.description),n-60-p),25+p+4,e+6),e+=12}),e=i+8+o.implementation_roadmap.length*12+6}if(e=_(t),e=R(t,"VI","Risk Factors & Considerations",e),(it=o.risk_factors)!=null&&it.length?o.risk_factors.forEach(i=>{e=g(t,e,24),t.setFillColor(254,226,226),t.setDrawColor(...W),t.setLineWidth(.4),t.rect(20,e,2,4,"F"),t.setFontSize(11),t.setFont("helvetica","bold"),t.setTextColor(...W),t.text(h(i.title)||"Risk",26,e+3),e+=7,e=A(t,D(i.description),e,{fontSize:9,x:26,maxWidth:n-46});const a=h(i.mitigation);if(a){const r=t.splitTextToSize(a,n-70),p=r.length*4+4;e=g(t,e,p),t.setFontSize(8),t.setFont("helvetica","bold"),t.setTextColor(...W),t.text("MITIGATION:",26,e),t.setFont("helvetica","normal"),t.setTextColor(...c),t.text(r,50,e),e+=r.length*4+2}e+=4}):e=A(t,"No specific risk factors identified.",e,{color:b}),(lt=o.bull_case)!=null&&lt.length||(st=o.bear_case)!=null&&st.length){e=g(t,e,60),t.setFontSize(13),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("Alternative Viewpoints",20,e),e+=6;const i=(n-40-8)/2,a=e;t.setFillColor(220,252,231),t.setDrawColor(...ft),t.roundedRect(20,e,i,50,2,2,"FD"),t.setFontSize(10),t.setFont("helvetica","bold"),t.setTextColor(21,128,61),t.text("Bull Case",24,e+6),t.setFont("helvetica","normal"),t.setFontSize(8),t.setTextColor(...c);let r=e+12;(o.bull_case||[]).forEach(d=>{const u=t.splitTextToSize(`• ${h(d)}`,i-8);t.text(u,24,r),r+=u.length*4}),t.setFillColor(254,226,226),t.setDrawColor(...W),t.roundedRect(20+i+8,a,i,50,2,2,"FD"),t.setFontSize(10),t.setFont("helvetica","bold"),t.setTextColor(...W),t.text("Bear Case",24+i+8,a+6),t.setFont("helvetica","normal"),t.setFontSize(8),t.setTextColor(...c);let p=a+12;(o.bear_case||[]).forEach(d=>{const u=t.splitTextToSize(`• ${h(d)}`,i-8);t.text(u,24+i+8,p),p+=u.length*4}),e=Math.max(r,p)+4}e=_(t),e=R(t,"VII","Conclusion",e),e=Ft(t,"Question",C,e,w);const m=o.conclusion||{};e=g(t,e,30),t.setFillColor(...T),t.roundedRect(20,e,n-40,26,3,3,"F"),t.setFontSize(8),t.setTextColor(255,255,255),t.setFont("helvetica","bold"),t.text("ANSWER",26,e+6),t.setFontSize(11),t.setFont("helvetica","normal");const z=m.answer||(D(o.executive_summary).split(/[.!?]/)[0]??"See report findings."),I=h(z),y=t.splitTextToSize(I,n-52);t.text(y.slice(0,2),26,e+13),e+=32;const L=(n-40-8)/3;$(t,20,e,L,"Timing",m.timing_label||"—",T),$(t,20+L+4,e,L,"Expected Return",m.expected_return||(((rt=o.bottom_line)==null?void 0:rt.target_return)??"—"),E),$(t,20+(L+4)*2,e,L,"Risk Level",m.risk_level||"Moderate",[249,115,22]),e+=28,(at=o.next_steps)!=null&&at.length&&(e=g(t,e,20),t.setFontSize(13),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("Next Steps",20,e),e+=6,o.next_steps.forEach((i,a)=>{e=g(t,e,12),t.setFillColor(...T),t.circle(24,e,3,"F"),t.setFontSize(8),t.setTextColor(255,255,255),t.setFont("helvetica","bold"),t.text(String(a+1),24,e+1,{align:"center"}),t.setFontSize(10),t.setTextColor(...c),t.text(h(i.title)||"",30,e),t.setFontSize(8),t.setFont("helvetica","normal"),t.setTextColor(...b);const r=t.splitTextToSize(h(i.description),n-50);t.text(r,30,e+5),e+=5+r.length*4+3})),e=_(t),e=R(t,"VIII","Appendices",e),t.setFontSize(13),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("A. Methodology",20,e),t.setDrawColor(...b),t.setLineWidth(.4),t.line(20,e+2,n-20,e+2),e+=8;const M=o.methodology||{data_sources:[],time_period:"",confidence_level:0,limitations:""};t.setFontSize(10),t.setFont("helvetica","bold"),t.text("Data Sources:",20,e),e+=5,t.setFont("helvetica","normal"),(M.data_sources||[]).forEach(i=>{e=g(t,e,5),t.text(`• ${h(i)}`,24,e),e+=5}),e+=2,t.setFont("helvetica","bold"),t.text("Analysis Period:",20,e),t.setFont("helvetica","normal"),t.text(h(M.time_period)||"—",55,e),e+=6,t.setFont("helvetica","bold"),t.text("Confidence:",20,e),t.setFont("helvetica","normal"),t.text(`${M.confidence_level||0}%`,55,e),e+=6,t.setFont("helvetica","bold"),t.text("Limitations:",20,e),e+=5,t.setFont("helvetica","normal"),e=A(t,D(M.limitations)||"—",e,{fontSize:10}),e+=6,(ct=o.sources)!=null&&ct.length&&(e=g(t,e,14),t.setFontSize(13),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("B. Data Sources & Citations",20,e),t.line(20,e+2,n-20,e+2),e+=8,xt(t,{startY:e,margin:{left:20,right:20},head:[["#","Title","Type","Date"]],body:o.sources.map((i,a)=>{const r=h(i.title),p=typeof i.url=="string"?i.url.trim():"",d=p?`${r}
2${p}`:r;return[`[${a+1}]`,d,h(i.type),G(i.date)]}),headStyles:{fillColor:T,textColor:[255,255,255],fontSize:9},bodyStyles:{fontSize:8,textColor:c},theme:"grid",styles:{cellPadding:2},columnStyles:{0:{cellWidth:12},3:{cellWidth:28}}}),e=(((ht=t.lastAutoTable)==null?void 0:ht.finalY)??e)+8),e=g(t,e,70),t.setFontSize(13),t.setFont("helvetica","bold"),t.setTextColor(...c),t.text("C. Disclaimers",20,e),t.line(20,e+2,n-20,e+2),e+=7;const Ct=["Not Investment Advice: This report is provided for informational purposes only and does not constitute investment advice or a solicitation to buy or sell securities.","Forward-Looking Statements: Statements based on current expectations and assumptions. Actual results may differ materially.","AI-Generated Content: This research was generated using artificial intelligence. Verify critical information independently.","Confidentiality: This report is confidential and intended solely for the named recipient.",`Date of Analysis: Information current as of ${G(o.completed_at)}.`];t.setFontSize(9),t.setFont("helvetica","normal"),Ct.forEach(i=>
2{e=A(t,i,e,{fontSize:9,color:b}),e+=1.5});const H=t.getNumberOfPages();for(let i=1;i<=H;i++){t.setPage(i);const a=t.internal.pageSize.getHeight();if(i>1)try{const r=t;r.GState&&typeof r.setGState=="function"&&((mt=r.saveGraphicsState)==null||mt.call(r),r.setGState(new r.GState({opacity:.06})),t.setTextColor(220,38,38),t.setFontSize(80),t.setFont("helvetica","bold"),t.text("CONFIDENTIAL",n/2,a/2,{align:"center",angle:30}),(pt=r.restoreGraphicsState)==null||pt.call(r))}catch{}t.setDrawColor(220,220,220),t.setLineWidth(.3),t.line(20,a-12,n-20,a-12),t.setFontSize(7),t.setTextColor(...b),t.setFont("helvetica","normal"),t.text(`Finthos Deep Research • ${s} • CONFIDENTIAL`,20,a-7),t.text(`Page ${i} of ${H}`,n-20,a-7,{align:"right"})}const V=`finthos_research_${s}.pdf`;return t.save(V),V}export{be as exportDeepResearchPDF};

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.