PageSourceSearch

https://www.formacao.dev/_next/static/chunks/6664.c2a4731fa22a13be.js

js formacao.dev collected 2026-10-04 06:51:47 UTC 3,363 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6664],{16664:(e,t,r)=>{r.r(t),r.d(t,{UdemyReviewsClient:()=>m,default:()=>f});var l=r(54568),i=r(7620),a=r(89861),s=r(92860),n=r(62666),o=r(46236),c=r(67237);function d(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}let x=i.forwardRef((e,t)=>{let{review:r,className:i,lightMode:a=!1,...n}=e,o=r["Student Name"],x=r.Rating,m=r.Comment;return(0,l.jsxs)(c.Zp,{ref:t,className:d("relative overflow-hidden rounded-xl border p-4 transition-all hover:shadow-lg h-full flex flex-col",a?"border-blue-100 bg-white hover:border-blue-200":"border-border bg-gray-900 bg-gradient-to-b from-zinc-800 to-zinc-900",i),...n,children:[(0,l.jsx)("div",{className:d("absolute right-4 top-4 text-4xl font-serif",a?"text-gray-200":"text-muted-foreground/10"),children:'"'}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 h-full flex-grow",children:[(0,l.jsx)("div",{className:"flex items-start justify-between gap-3",children:(0,l.jsx)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:(0,l.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,l.jsx)("h3",{className:d("font-semibold text-sm truncate",a?"text-blue-900":"text-foreground"),children:o}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,l.jsx)("div",{className:"flex gap-0.5",children:Array.from({length:5}).map((e,t)=>(0,l.jsx)(s.A,{size:12,className:d("transition-colors",t<Math.round(x)?"fill-yellow-400 text-yellow-400":a?"fill-gray-300 text-gray-300":"fill-muted-foreground/20 text-muted-foreground/20")},t))}),(0,l.jsx)("span",{className:d("text-xs font-medium",a?"text-blue-900":"text-foreground"),children:x})]})]})})}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)("p",{className:d("leading-snug line-clamp-5 text-sm",a?"text-gray-600":"text-muted-foreground"),children:m||"O aluno n\xe3o deixou um coment\xe1rio."})})]})]})});x.displayName="UdemyReviewCard";let m=e=>{let{initialReviews:t,totalReviews:r,lightMode:s=!1}=e,[c,m]=i.useState(t),[f,u]=i.useState(1),[g,h]=i.useState(!1),v=i.useCallback(async e=>{h(!0);try{let t=await fetch("/api/reviews?page=".concat(e,"&limit=").concat(9));if(!t.ok)throw Error("HTTP error! status: ".concat(t.status));let r=await t.json();if(!r.reviews||0===r.reviews.length)return void console.warn("No reviews returned from API");let l=r.reviews.map((t,r)=>({...t,id:"review-".concat(e,"-").concat(r)}));m(e=>[...e,...l])}catch(e){console.error("Failed to fetch reviews:",e)}finally{h(!1)}},[]),w=i.useCallback(()=>{let e=f+1;u(e),v(e)},[f,v]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.P.div,{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",initial:!1,children:c.map(e=>(0,l.jsx)(a.P.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.25},children:(0,l.jsx)(x,{review:e,lightMode:s})},e.id))}),g&&(0,l.jsx)("div",{className:"text-center mt-8 flex justify-center items-center",children:(0,l.jsx)(n.A,{className:d("animate-spin",s?"text-blue-500":"text-white")})}),!g&&c.length<r&&(0,l.jsx)("div",{className:"mt-8 text-center",children:(0,l.jsx)(o.$n,{onClick:w,disabled:g,className:d(s?"bg-[#02A3F3] hover:bg-[#124e6c] text-white":"bg-indigo-600 hover:bg-indigo-700 text-white font-semibold"),children:"Carregar mais"})})]})},f=m}}]);

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.