1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52243],{20508:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},52243:(e,t,s)=>{s.r(t),s.d(t,{default:()=>v});var a=s(95155),l=s(22454),r=s(65229),i=s(20508),n=s(5917),c=s(25276),o=s(52619),d=s.n(o),x=s(15239),h=s(12115);let m={customerCare:"Customer Care",platformOptions:"Platform Options",userFriendly:"User Friendliness",processCredentialsPayout:"Payout Process"},u=e=>{let{filled:t=!0,half:s=!1,size:l=15}=e,r="M8 1.5L9.79 5.89L14.5 6.46L11.07 9.72L11.99 14.5L8 12.27L4.01 14.5L4.93 9.72L1.5 6.46L6.21 5.89L8 1.5Z";return s?(0,a.jsxs)("svg",{width:l,height:l,viewBox:"0 0 16 16",fill:"none",children:[(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"half-".concat(l),children:(0,a.jsx)("rect",{x:"0",y:"0",width:"8",height:"16"})})}),(0,a.jsx)("path",{d:r,fill:"#353434",stroke:"#353434",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:r,fill:"#07e88a",stroke:"#07e88a",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",clipPath:"url(#half-".concat(l,")")})]}):(0,a.jsx)("svg",{width:l,height:l,viewBox:"0 0 16 16",fill:"none",children:(0,a.jsx)("path",{d:r,fill:t?"#07e88a":"#353434",stroke:t?"#07e88a":"#353434",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})})},g=e=>{let{rating:t,size:s=15}=e,l=Math.floor(t),r=t%1>=.25;return(0,a.jsx)("div",{className:"flex items-center gap-[2px]",children:[1,2,3,4,5].map(e=>e<=l?(0,a.jsx)(u,{filled:!0,size:s},e):e===l+1&&r?(0,a.jsx)(u,{half:!0,size:s},e):(0,a.jsx)(u,{filled:!1,size:s},e))})};function f(e){let{totalReviews:t,averageRating:s,distribution:l,categoryAverages:i,firmSlug:n,propFirmScore:c,starFilter:o,onStarFilter:x}=e;return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"bg-[#141414] border border-[rgba(255,255,255,0.06)] rounded-[20px] p-4 md:p-6 flex flex-col items-center gap-3",children:[(0,a.jsx)("span",{className:"text-5xl font-bold text-white leading-none",children:s>0?s.toFixed(1):"â"}),(0,a.jsx)(g,{rating:s,size:20}),(0,a.jsxs)("span",{className:"text-sm text-white/50",children:[t," review",1!==t?"s":""]}),c&&c.total>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-full h-px bg-white/[0.06] my-1"}),(0,a.jsxs)("div",{className:"w-full flex flex-col gap-1.5",children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-white/40 tracking-wide uppercase",children:"Prop Score"}),(0,a.jsxs)("span",{className:"text-xs font-medium",style:{color:c.color},children:[c.total,"/100"]})]}),(0,a.jsx)("div",{className:"w-full h-1.5 bg-[rgba(255,255,255,0.08)] rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-500",style:{width:"".concat(c.total,"%"),backgroundColor:c.color}})})]})]}),Object.keys(i).length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-full h-px bg-white/[0.06] my-1"}),(0,a.jsx)("div",{className:"w-full flex flex-col gap-2",children:Object.entries(m).map(e=>{let[t,s]=e,l=i[t];return l?(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-white/50",children:s}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-white",children:l%1==0?l:l.toFixed(1)}),(0,a.jsx)(u,{filled:!0,size:10})]})]},t):null})})]})]}),(0,a.jsxs)("div",{className:"bg-[#141414] border border-[rgba(255,255,255,0.06)] rounded-[20px] p-4 md:p-5 flex flex-col gap-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-white",children:"Rating Distribution"}),null!==o&&(0,a.jsxs)("button",{onClick:()=>x(null),className:"flex items-center gap-1 text-xs text-[#07e88a] hover:text-[#06d17d] transition-colors",children:["Clear",(0,a.jsx)(r.A,{className:"w-3 h-3"})]})]}),[5,4,3,2,1].map(e=>{let s=l[e]||0,r=t>0?s/t*100:0,i=o===e;return(0,a.jsxs)("button",{onClick:()=>x(i?null:e),className:"flex items-center gap-2.5 rounded-lg px-1.5 py-1 -mx-1.5 transition-all ".concat(i?"bg-[#07e88a]/10 ring-1 ring-[#07e88a]/30":null===o||i?"hover:bg-white/[0.04]":"opacity-40 hover:opacity-70"),children:[(0,a.jsx)("span",{className:"text-xs text-white/70 w-4 text-right",children:e}),(0,a.jsx)(u,{filled:!0,size:12}),(0,a.jsx)("div",{className:"flex-1 h-2 bg-[rgba(255,255,255,0.08)] rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-[#07e88a] rounded-full transition-all duration-300",style:{width:"".concat(r,"%")}})}),(0,a.jsx)("span",{className:"text-xs text-white/50 w-6 text-right",children:s})]},e)})]}),(0,a.jsx)(d(),{href:"/submit-review?firm=".concat(n),rel:"nofollow",className:"flex items-center justify-center px-6 py-3 bg-[#07e88a] text-black font-semibold rounded-xl hover:bg-[#06d17d] transition-colors text-sm",children:"Leave a Review"})]})}function p(e){let{types:t,active:s,onChange:l}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("button",{onClick:()=>l(null),className:"px-3.5 py-1.5 rounded-full text-xs font-medium transition-colors ".concat(null===s?"bg-[#07e88a] text-black":"bg-white/5 text-white/70 hover:bg-white/10"),children:"All"}),t.map(e=>(0,a.jsx)("button",{onClick:()=>l(s===e?null:e),className:"px-3.5 py-1.5 rounded-full text-xs font-medium transition-colors ".concat(s===e?"bg-[#07e88a] text-black":"bg-white/5 text-white/70 hover:bg-white/10"),children:e},e))]})}let b=[{key:"recent",label:"Most Recent"},{key:"oldest",label:"Oldest"}];function w(e){var t;let{active:s,onChange:l}=e,r=(null==(t=b.find(e=>e.key===s))?void 0:t.label)||"Sort";return(0,a.jsx)("select",{value:s,onChange:e=>l(e.target.value),className:"bg-white/5 border border-white/[0.06] rounded-full px-3 py-1.5 text-xs text-white/70 appearance-none cursor-pointer hover:bg-white/10 transition-colors focus:outline-none focus:ring-1 focus:ring-[#07e88a]/30","aria-label":"Sort by ".concat(r),children:b.map(e=>{let{key:t,label:s}=e;return(0,a.jsx)("option",{value:t,className:"bg-[#141414] text-white",children:s},t)})})}function j(e){let{review:t,isExpanded:s,onToggle:l}=e,r=t.content.length>300,o=t.user.country||"USA",d={"united states":"us",usa:"us","united kingdom":"gb",uk:"gb",uae:"ae","united arab emirates":"ae",switzerland:"ch",germany:"de",france:"fr",spain:"es",italy:"it",canada:"ca",australia:"au",brazil:"br",india:"in",china:"cn",japan:"jp","south korea":"kr",mexico:"mx",netherlands:"nl",belgium:"be",swede
1n:"se",norway:"no",denmark:"dk",finland:"fi",poland:"pl",austria:"at",portugal:"pt",ireland:"ie",singapore:"sg",malaysia:"my",indonesia:"id",thailand:"th",vietnam:"vn",philippines:"ph","south africa":"za",nigeria:"ng",egypt:"eg",turkey:"tr",russia:"ru",ukraine:"ua",argentina:"ar",chile:"cl",colombia:"co",peru:"pe","new zealand":"nz",bulgaria:"bg",romania:"ro",croatia:"hr","czech republic":"cz",czechia:"cz",hungary:"hu",greece:"gr",serbia:"rs",slovakia:"sk",slovenia:"si",lithuania:"lt",latvia:"lv",estonia:"ee",iceland:"is",cyprus:"cy",malta:"mt",luxembourg:"lu","saudi arabia":"sa",qatar:"qa",kuwait:"kw",bahrain:"bh",oman:"om",jordan:"jo",lebanon:"lb",israel:"il",pakistan:"pk",bangladesh:"bd","sri lanka":"lk",nepal:"np",myanmar:"mm",kenya:"ke",ghana:"gh",tanzania:"tz",ethiopia:"et",morocco:"ma",tunisia:"tn",algeria:"dz",taiwan:"tw","hong kong":"hk",macau:"mo"}[o.toLowerCase()]||"us",[f,p]=(0,h.useState)(!1),[b,w]=(0,h.useState)(!1),j=!t.user.image||f;return(0,a.jsxs)("div",{className:"bg-[#141414] border border-[rgba(255,255,255,0.06)] rounded-[20px] p-4 md:p-6 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 md:gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden shrink-0 bg-[#1a1a1a] border border-[rgba(255,255,255,0.08)]",children:j?(0,a.jsx)("div",{className:"w-full h-full bg-[#1e1e1e] flex items-center justify-center",children:(0,a.jsx)(i.A,{className:"w-5 h-5 text-[rgba(255,255,255,0.35)]"})}):(0,a.jsx)("img",{src:t.user.image,alt:t.user.name||"User",width:40,height:40,className:"w-full h-full object-cover",loading:"lazy",onError:()=>p(!0)})}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-white truncate",children:t.user.name||"Anonymous"}),t.verified&&(0,a.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#07e88a] flex items-center justify-center shrink-0",title:"Verified Purchase",children:(0,a.jsx)(n.A,{className:"w-2.5 h-2.5 text-black"})}),!b&&(0,a.jsx)("div",{className:"flex items-center gap-1 shrink-0",children:(0,a.jsx)(x.default,{src:"https://flagcdn.com/w40/".concat(d,".png"),alt:"Flag of ".concat(o),width:16,height:12,className:"rounded-sm",onError:()=>w(!0)})})]}),(0,a.jsx)("span",{className:"text-xs text-white/40",suppressHydrationWarning:!0,children:function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(t<60)return"just now";let s=Math.floor(t/60);if(s<60)return"".concat(s,"m ago");let a=Math.floor(s/60);if(a<24)return"".concat(a,"h ago");let l=Math.floor(a/24);if(l<30)return"".concat(l,"d ago");let r=Math.floor(l/30);return r<12?"".concat(r,"mo ago"):"".concat(Math.floor(r/12),"y ago")}(t.createdAt)})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,a.jsx)(g,{rating:t.rating,size:14}),(0,a.jsxs)("span",{className:"text-xs font-medium text-white/70",children:[t.rating%1==0?t.rating:t.rating.toFixed(1),"/5"]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[t.accountSize&&(0,a.jsx)("span",{className:"bg-[#0b3222] border border-[rgba(7,232,138,0.12)] rounded-full px-2.5 py-0.5 text-xs text-white/80",children:t.accountSize}),t.program&&(0,a.jsx)("span",{className:"bg-[#0b3222] border border-[rgba(7,232,138,0.12)] rounded-full px-2.5 py-0.5 text-xs text-white/80",children:t.program})]}),(0,a.jsxs)("p",{className:"text-sm text-white/80 leading-relaxed",children:[r&&!s?"".concat(t.content.slice(0,300),"..."):t.content,r&&(0,a.jsx)("button",{onClick:l,className:"text-[#07e88a] hover:underline ml-1 text-sm",children:s?"Read Less":"Read More"})]}),t.categoryRatings&&Object.keys(t.categoryRatings).length>0&&(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2 bg-[#1b1a1a] border border-white/[0.04] rounded-xl p-3 md:p-4",children:Object.entries(m).map(e=>{var s;let[l,r]=e,i=null==(s=t.categoryRatings)?void 0:s[l];return!i||i<=0?null:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-white/50",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-white",children:i.toFixed(1)}),(0,a.jsx)(u,{filled:!0,size:10})]})]},l)})}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("button",{className:"flex items-center gap-1.5 text-white/40 hover:text-white/70 transition-colors group",children:[(0,a.jsx)(c.A,{className:"w-4 h-4"}),(0,a.jsxs)("span",{className:"text-xs",children:["Helpful",t.upvotes>0?" (".concat(t.upvotes,")"):""]})]})})]})}function v(e){let{firmId:t,firmName:s,firmSlug:i,ratingDistribution:n,propFirmScore:c,initialStarFilter:o,initialReviews:x}=e,[u,g]=(0,h.useState)(new Set),[b,v]=(0,h.useState)("recent"),[N,y]=(0,h.useState)(5),[k,z]=(0,h.useState)(null!=o?o:null),[C,S]=(0,h.useState)(null);(0,h.useEffect)(()=>{null!=o&&z(o)},[o]);let{data:L,isLoading:M}=(0,l.I)({queryKey:["firm-reviews",t],queryFn:async()=>{let e=await fetch("/api/firms/".concat(t,"/reviews"));if(!e.ok)throw Error("Failed to fetch reviews");return e.json()},staleTime:3e4,refetchOnMount:!0,initialData:x}),A=e=>{z(e),y(5)},R=e=>{S(e),y(5)},F=(0,h.useMemo)(()=>
1{if(!L)return[];let e=new Set;for(let t of L)t.program&&e.add(t.program);return Array.from(e).sort((e,t)=>e.localeCompare(t))},[L]),O=(null==L?void 0:L.length)||0,T=(0,h.useMemo)(()=>L&&0!==L.length?L.reduce((e,t)=>e+t.rating,0)/L.length:0,[L]),D=(0,h.useMemo)(()=>{if(!L)return{};let e={},t={};for(let s of L)if(s.categoryRatings)for(let[a,l]of Object.entries(s.categoryRatings))"number"==typeof l&&l>0&&(e[a]=(e[a]||0)+l,t[a]=(t[a]||0)+1);let s={};for(let a of Object.keys(m))t[a]&&t[a]>0&&(s[a]=e[a]/t[a]);return s},[L]),P=(0,h.useMemo)(()=>{if(n)return n;let e={1:0,2:0,3:0,4:0,5:0};if(!L)return e;for(let t of L){let s=Math.round(t.rating);s>=1&&s<=5&&e[s]++}return e},[n,L]),E=(0,h.useMemo)(()=>{if(!L)return[];let e=[...L];switch(null!==k&&(e=e.filter(e=>Math.round(e.rating)===k)),null!==C&&(e=e.filter(e=>e.program===C)),b){case"recent":return e.sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime());case"oldest":return e.sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime())}},[L,b,k,C]),q=E.slice(0,N),U=E.length>N;return M?(0,a.jsxs)("div",{className:"flex flex-col gap-6",id:"reviews",children:[(0,a.jsxs)("h2",{className:"text-2xl font-medium text-white",children:[s," Trader Reviews"]}),(0,a.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6",children:[(0,a.jsx)("div",{className:"w-full lg:w-[280px] shrink-0",children:(0,a.jsxs)("div",{className:"bg-[#141414] border border-[rgba(255,255,255,0.06)] rounded-[20px] p-6 animate-pulse",children:[(0,a.jsx)("div",{className:"h-16 bg-white/10 rounded mb-4"}),(0,a.jsx)("div",{className:"h-32 bg-white/10 rounded"})]})}),(0,a.jsx)("div",{className:"flex-1 flex flex-col gap-4",children:[1,2,3].map(e=>(0,a.jsxs)("div",{className:"bg-[#141414] border border-[rgba(255,255,255,0.06)] rounded-[20px] p-6 animate-pulse",children:[(0,a.jsx)("div",{className:"h-10 bg-white/10 rounded mb-4"}),(0,a.jsx)("div",{className:"h-20 bg-white/10 rounded"})]},e))})]})]}):L&&0!==L.length?(0,a.jsxs)("div",{className:"flex flex-col gap-6",id:"reviews",children:[(0,a.jsxs)("h2",{className:"text-lg md:text-2xl font-medium text-white",children:[s," Trader Reviews"," ",(0,a.jsxs)("span",{className:"text-[#07e88a]",children:["(",O,")"]})]}),(0,a.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6",children:[(0,a.jsx)("div",{className:"w-full lg:w-[280px] shrink-0",children:(0,a.jsx)("div",{className:"lg:sticky lg:top-24",children:(0,a.jsx)(f,{totalReviews:O,averageRating:T,distribution:P,categoryAverages:D,firmSlug:i,propFirmScore:c,starFilter:k,onStarFilter:A})})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-4 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,a.jsx)(p,{types:F,active:C,onChange:R}),(0,a.jsx)(w,{active:b,onChange:v})]}),null!==k&&(0,a.jsxs)("button",{onClick:()=>A(null),className:"self-start flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-[#07e88a]/10 border border-[#07e88a]/20 text-xs text-[#07e88a] hover:bg-[#07e88a]/20 transition-colors",children:["Showing ",k,"-star reviews",(0,a.jsx)(r.A,{className:"w-3 h-3"})]}),0===q.length?(0,a.jsxs)("div",{className:"bg-[#141414] border border-[rgba(255,255,255,0.06)] rounded-[20px] p-8 text-center",children:[(0,a.jsx)("p",{className:"text-white/50 text-sm",children:"No reviews match the current filters."}),(0,a.jsx)("button",{onClick:()=>{A(null),R(null)},className:"text-[#07e88a] hover:underline text-sm mt-2",children:"Clear all filters"})]}):q.map(e=>(0,a.jsx)(j,{review:e,isExpanded:u.has(e.id),onToggle:()=>{var t;return t=e.id,void g(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})}},e.id)),U&&(0,a.jsxs)("button",{onClick:()=>y(e=>e+5),className:"w-full py-3 rounded-xl bg-white/5 hover:bg-white/[0.08] text-white/70 text-sm font-medium transition-colors",children:["Show More Reviews (",E.length-N," remaining)"]})]})]})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",id:"reviews",children:[(0,a.jsxs)("h2",{className:"text-2xl font-medium text-white",children:[s," Trader Reviews"]}),(0,a.jsxs)("div",{className:"bg-[#141414] border border-[rgba(255,255,255,0.06)] rounded-[20px] p-10 text-center flex flex-col items-center gap-4",children:[(0,a.jsx)("span",{className:"text-white/60 text-lg",children:"No reviews yet"}),(0,a.jsxs)("p",{className:"text-white/40 text-sm max-w-md",children:["Be the first to share your experience with ",s,". Your review helps other traders make informed decisions."]}),(0,a.jsx)(d(),{href:"/submit-review?firm=".concat(i),rel:"nofollow",className:"inline-flex items-center justify-center px-6 py-2.5 bg-[#07e88a] text-black font-semibold rounded-xl hover:bg-[#06d17d] transition-colors text-sm mt-2",children:"Leave a Review"})]})]})}}}]);
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.