PageSourceSearch

https://randany.ai/_next/static/chunks/25-6cd76668e533346d.js

js randany.ai collected 2026-10-05 13:52:42 UTC 11,220 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25],{20025:function(e,a,s){s.r(a);var r=s(82841),t=s(19790),i=s(62729),l=s(67599),n=s(31740),d=s(80682),c=s(70426),o=s(62047),x=s(21223),m=s(43107),u=s(54690);a.default=e=>{let{num:a,reviews:s,loading:h,setReviews:v,t:g}=e,[f,j]=(0,t.useState)(null),p=(0,x.a)("(min-width: 768px)"),[y,b]=(0,t.useState)(!1),N=async(e,a)=>{a.stopPropagation();try{await navigator.clipboard.writeText(e.text),u.Am.success(g("messages.copied"))}catch(e){u.Am.error(g("messages.copyFailed"))}},w=(e,a)=>{a.stopPropagation();let r=[...s];r[e].liked=!r[e].liked,v(r)},C=e=>{j(e),b(!0)},k=e=>{let{rating:a}=e;return(0,r.jsx)("div",{className:"flex items-center gap-1",children:[void 0,void 0,void 0,void 0,void 0].map((e,s)=>(0,r.jsx)("svg",{className:"w-4 h-4 ".concat(s<a?"text-yellow-400":"text-gray-300"),fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})},s))})},P=()=>(0,r.jsxs)(c.mQ,{defaultValue:"overview",className:"mt-4",children:[(0,r.jsxs)(c.dr,{className:"grid w-full grid-cols-3",children:[(0,r.jsx)(c.SP,{value:"overview",children:g("reviewCard.tabs.overview")}),(0,r.jsx)(c.SP,{value:"analysis",children:g("reviewCard.tabs.analysis")}),(0,r.jsx)(c.SP,{value:"profile",children:g("reviewCard.tabs.profile")})]}),(0,r.jsxs)("div",{className:p?"lg:h-64 lg:overflow-y-auto":"h-[40vh] overflow-y-auto",children:[(0,r.jsxs)(c.nU,{value:"overview",className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h4",{className:"font-medium",children:g("reviewCard.labels.rating")}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(k,{rating:(null==f?void 0:f.metadata.rating)||0}),(0,r.jsxs)("span",{className:"text-lg font-bold",children:[null==f?void 0:f.metadata.rating,"/5"]})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h4",{className:"font-medium",children:g("reviewCard.labels.pros")}),(0,r.jsx)("ul",{className:"list-disc list-inside text-gray-600 dark:text-gray-400",children:null==f?void 0:f.metadata.pros.map((e,a)=>(0,r.jsx)("li",{children:e},a))})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h4",{className:"font-medium",children:g("reviewCard.labels.cons")}),(0,r.jsx)("ul",{className:"list-disc list-inside text-gray-600 dark:text-gray-400",children:null==f?void 0:f.metadata.cons.map((e,a)=>(0,r.jsx)("li",{children:e},a))})]})]}),(0,r.jsxs)(c.nU,{value:"analysis",className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h4",{className:"font-medium",children:g("reviewCard.labels.tone")}),(0,r.jsx)("p",{className:"text-gray-600 dark:text-gray-400",children:g("reviewCard.badges.tone.".concat(null==f?void 0:f.metadata.tone))})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h4",{className:"font-medium",children:g("reviewCard.labels.keywords")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:null==f?void 0:f.metadata.keywords.map((e,a)=>(0,r.jsx)(o.C,{variant:"secondary",children:e},a))})]})]}),(0,r.jsxs)(c.nU,{value:"profile",className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h4",{className:"font-medium",children:g("reviewCard.labels.persona")}),(0,r.jsx)("p",{className:"text-gray-600 dark:text-gray-400",children:null==f?void 0:f.metadata.reviewerProfile.persona})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h4",{className:"font-medium",children:g("reviewCard.labels.credibility")}),(0,r.jsx)("p",{className:"text-gray-600 dark:text-gray-400",children:null==f?void 0:f.metadata.reviewerProfile.credibility})]})]})]})]});return h?(0,r.jsx)("div",{className:"mt-8 grid grid-cols-1 md:grid-cols-2 gap-4",children:Array.from({length:Math.min(a||4,10)},(e,a)=>(0,r.jsx)("div",{className:"animate-pulse",children:(0,r.jsx)(i.Zb,{className:"h-60",children:(0,r.jsx)(i.aY,{className:"h-full bg-gray-200 dark:bg-gray-700"})})},a))}):(null==s?void 0:s.length)?(0,r.jsx)("div",{className:"flex flex-col mt-8 gap-y-8",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.map((e,a)=>(0,r.jsxs)(i.Zb,{className:"hover:lg:shadow-md transition-shadow duration-200 cursor-pointer flex flex-col ".concat(1===s.length?"md:col-span-2 md:w-1/2 md:mx-auto":""),onClick:()=>C(e),children:[(0,r.jsx)(i.aY,{className:"pt-6 flex-1",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start",children:[(0,r.jsx)(k,{rating:e.metadata.rating}),(0,r.jsx)(o.C,{variant:"positive"===e.metadata.tone?"default":"negative"===e.metadata.tone?"destructive":"secondary",children:g("reviewCard.badges.tone.".concat(e.metadata.tone))})]}),(0,r.jsx)("div",{className:"text-lg text-gray-900 dark:text-gray-100 line-clamp-4",children:e.text}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.metadata.keywords.slice(0,3).map((e,a)=>(0,r.jsx)(o.C,{variant:"outline",children:e},a))}),(0,r.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:e.metadata.reviewerProfile.persona})]})}),(0,r.jsxs)(i.eW,{className:"justify-around border-t border-gray-200 dark:border-gray-700 py-2",children:[(0,r.jsx)(l.pn,{children:(0,r.jsxs)(l.u,{children:[(0,r.jsx)(l.aJ,{asChild:!0,children:(0,r.jsx)("button",{onClick:a=>N(e,a),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",children:(0,r.jsx)(m.Dr$,{className:"h-4 w-4"})})}),(0,r.jsx)(l._v,{side:"bottom",children:g("reviewCard.buttons.copy")})]})}),(0,r.jsx)(l.pn,{children:(0,r.jsxs)(l.u,{children:[(0,r.jsx)(l.aJ,{asChild:!0,children:(0,r.jsx)("button",{onClick:e=>w(a,e),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",children:(0,r.jsx)(m.r6X,{className:"h-4 w-4 transition-colors duration-200 ".concat(e.liked?"fill-current text-red-500":"text-gray-400 hover:text-red-500")})})}),(0,r.jsx)(l._v,{side:"bottom",children:g("reviewCard.buttons.like")})]})}),(0,r.jsx)(l.pn,{children:(0,r.jsxs)(l.u,{children:[(0,r.jsx)(l.aJ,{asChild:!0,children:(0,r.jsx)("button",{onClick:()=>C(e),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",children:(0,r.jsx)(m.cC_,{className:"h-4 w-4"})})}),(0,r.jsx)(l._v,{side:"bottom",children:g("reviewCard.buttons.details")})]})})]})]},e.id||a)),p?(0,r.jsx)(n.Vq,{open:y,onOpenChange:b,children:(0,r.jsxs)(n.cZ,{className:"sm:max-w-[600px]",children:[(0,r.jsxs)(n.fK,{children:[(0,r.jsxs)(n.$N,{className:"text-xl font-semibold flex items-center gap-2",children:[(0,r.jsx)(k,{rating:(null==f?void 0:f.metadata.rating)||0}),(0,r.jsxs)("span",{children:[null==f?void 0:f.metadata.rating,"/5"]})]}),(0,r.jsx)(n.Be,{className:"text-sm text-gray-500",children:null==f?void 0:f.text})]}),(0,r.jsx)(P,{})]})}
1):(0,r.jsx)(d.dy,{open:y,onOpenChange:b,shouldScaleBackground:!0,setBackgroundColorOnScale:!1,children:(0,r.jsx)(d.sc,{className:"sm:max-w-[425px]",children:(0,r.jsxs)("div",{className:"px-4 pb-4 max-h-[70vh] overflow-y-auto",children:[(0,r.jsxs)(d.OX,{children:[(0,r.jsxs)(d.iI,{className:"text-xl font-semibold flex items-center gap-2",children:[(0,r.jsx)(k,{rating:(null==f?void 0:f.metadata.rating)||0}),(0,r.jsxs)("span",{children:[null==f?void 0:f.metadata.rating,"/5"]})]}),(0,r.jsx)(d.u6,{className:"text-sm text-gray-500 text-left",children:null==f?void 0:f.text})]}),(0,r.jsx)(P,{})]})})})]})}):null}},70426:function(e,a,s){s.d(a,{mQ:function(){return R},nU:function(){return D},dr:function(){return S},SP:function(){return _}});var r=s(82841),t=s(19790),i=s(43059),l=s(32311),n=s(68166),d=s(48389),c=s(18210),o=s(54338),x=s(55880),m=s(11276),u="Tabs",[h,v]=(0,l.b)(u,[n.Pc]),g=(0,n.Pc)(),[f,j]=h(u),p=t.forwardRef((e,a)=>{let{__scopeTabs:s,value:t,onValueChange:i,defaultValue:l,orientation:n="horizontal",dir:d,activationMode:u="automatic",...h}=e,v=(0,o.gm)(d),[g,j]=(0,x.T)({prop:t,onChange:i,defaultProp:l});return(0,r.jsx)(f,{scope:s,baseId:(0,m.M)(),value:g,onValueChange:j,orientation:n,dir:v,activationMode:u,children:(0,r.jsx)(c.WV.div,{dir:v,"data-orientation":n,...h,ref:a})})});p.displayName=u;var y="TabsList",b=t.forwardRef((e,a)=>{let{__scopeTabs:s,loop:t=!0,...i}=e,l=j(y,s),d=g(s);return(0,r.jsx)(n.fC,{asChild:!0,...d,orientation:l.orientation,dir:l.dir,loop:t,children:(0,r.jsx)(c.WV.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:a})})});b.displayName=y;var N="TabsTrigger",w=t.forwardRef((e,a)=>{let{__scopeTabs:s,value:t,disabled:l=!1,...d}=e,o=j(N,s),x=g(s),m=P(o.baseId,t),u=V(o.baseId,t),h=t===o.value;return(0,r.jsx)(n.ck,{asChild:!0,...x,focusable:!l,active:h,children:(0,r.jsx)(c.WV.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":u,"data-state":h?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:m,...d,ref:a,onMouseDown:(0,i.M)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():o.onValueChange(t)}),onKeyDown:(0,i.M)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&o.onValueChange(t)}),onFocus:(0,i.M)(e.onFocus,()=>{let e="manual"!==o.activationMode;h||l||!e||o.onValueChange(t)})})})});w.displayName=N;var C="TabsContent",k=t.forwardRef((e,a)=>{let{__scopeTabs:s,value:i,forceMount:l,children:n,...o}=e,x=j(C,s),m=P(x.baseId,i),u=V(x.baseId,i),h=i===x.value,v=t.useRef(h);return t.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,r.jsx)(d.z,{present:l||h,children:s=>{let{present:t}=s;return(0,r.jsx)(c.WV.div,{"data-state":h?"active":"inactive","data-orientation":x.orientation,role:"tabpanel","aria-labelledby":m,hidden:!t,id:u,tabIndex:0,...o,ref:a,style:{...e.style,animationDuration:v.current?"0s":void 0},children:t&&n})}})});function P(e,a){return"".concat(e,"-trigger-").concat(a)}function V(e,a){return"".concat(e,"-content-").concat(a)}k.displayName=C;var M=s(40870);let R=p,S=t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,r.jsx)(b,{ref:a,className:(0,M.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...t})});S.displayName=b.displayName;let _=t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,r.jsx)(w,{ref:a,className:(0,M.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",s),...t})});_.displayName=w.displayName;let D=t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,r.jsx)(k,{ref:a,className:(0,M.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...t})});D.displayName=k.displayName}}]);

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.