PageSourceSearch

https://le-barreaumetre.fr/assets/FirmExploreCard-ML4d23G0.js

js le-barreaumetre.fr collected 2026-10-04 20:35:54 UTC 5,825 bytes, 1 lines download raw bytes

1import{j as s}from"./vendor-radix-BgQ1tEw6.js";import{z as C,s as m,B as j,c as u,t as p,C as F,a as E,q as B}from"./index-DjWeVXQh.js";import{B as g}from"./badge-t1Mm-JRA.js";import{u as $,r as x,L as z}from"./vendor-react-DXpIY7U8.js";import{V as N,ay as q,W as L,J as D,B as M,d as R}from"./vendor-utils-C1PKCXFi.js";import{a as b,g as V,b as A}from"./firm-logo-utils-CShPIu-B.js";function I({firmId:e,variant:l="outline",size:i="default",showText:t=!0,className:c}){const{user:n}=C(),d=$(),[o,r]=x.useState(!1),[v,f]=x.useState(!1),[_,h]=x.useState(!0);x.useEffect(()=>{n?w():h(!1)},[n,e]);const w=async()=>{if(n){h(!0);try{const{data:a,error:k}=await m.from("candidate_favorites").select("id").eq("user_id",n.id).eq("firm_id",e).maybeSingle();k||r(!!a)}catch(a){console.error("Error checking favorite:",a)}finally{h(!1)}}},y=async()=>{if(!n){d("/connexion-candidat");return}f(!0);try{if(o){const{error:a}=await m.from("candidate_favorites").delete().eq("user_id",n.id).eq("firm_id",e);if(a)throw a;r(!1),p.success("Retiré des favoris")}else{const{error:a}=await m.from("candidate_favorites").insert({user_id:n.id,firm_id:e});if(a)throw a;r(!0),p.success("Ajouté aux favoris",{action:{label:"Voir mes favoris",onClick:()=>d("/candidat?tab=favorites")}})}}catch(a){console.error("Error toggling favorite:",a),p.error("Une erreur est survenue")}finally{f(!1)}};return _?s.jsxs(j,{variant:l,size:i,disabled:!0,className:c,children:[s.jsx(N,{className:u("h-4 w-4 animate-spin",t&&"mr-2")}),t&&"Chargement..."]}):s.jsxs(j,{variant:o?"default":l,size:i,onClick:y,disabled:v,className:u(o&&"bg-destructive hover:bg-destructive/90",c),children:[v?s.jsx(N,{className:u("h-4 w-4 animate-spin",t&&"mr-2")}):s.jsx(q,{className:u("h-4 w-4",t&&"mr-2",o&&"fill-current")}),t&&(o?"En favoris":"Ajouter aux favoris")]})}function J({firm:e,marketAverageScore:l}){const i=e.cover_image_url||e.office_photos?.[0]||e.firm_photos?.[0]||null,t=e.departments||e.domain||[],c=t.slice(0,2),n=t.length>2,d=(e.cities||[]).slice(0,3),o=(e.cities||[]).length>3;return s.jsx(z,{to:`/cabinet/${e.slug}`,title:`Voir le profil de ${e.name}${e.cities?.[0]?` à ${e.cities[0]}`:""}`,children:s.jsxs(F,{className:u("group h-full min-h-[320px] overflow-hidden transition-all duration-300","hover:shadow-lg hover:border-primary/30 hover:-translate-y-0.5",e.is_premium&&"ring-1 ring-primary/20 bg-primary/[0.02]"),children:[s.jsxs("div",{className:"relative h-28 overflow-hidden",children:[i?s.jsx("img",{src:i,alt:`Photo de ${e.name}`,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"}):s.jsx("div",{className:"w-full h-full",style:{background:b(e.name)}}),s.jsx("div",{className:"absolute top-2 right-2 z-10",onClick:r=>r.preventDefault(),children:s.jsx(I,{firmId:e.id,size:"icon",variant:"ghost",showText:!1,className:"bg-white/90 hover:bg-white shadow-sm h-8 w-8"})}),e.avg_rating&&e.avg_rating>0&&s.jsxs("div",{className:"absolute top-2 left-2 z-10 flex items-center gap-1 bg-white/95 backdrop-blur-sm rounded-full px-2.5 py-1 shadow-sm",children:[s.jsx("span",{className:"text-amber-500 text-sm leading-none",children:"★"}),s.jsx("span",{className:"text-sm font-bold text-foreground leading-none",children:e.avg_rating.toFixed(1)}),e.review_count>0&&s.jsxs("span",{className:"text-xs text-muted-foreground leading-none",children:["(",e.review_count,")"]})]})]}),s.jsxs(E,{className:"p-4 flex flex-col gap-3",children:[s.jsxs("div",{className:"flex items-start gap-3 -mt-12 relative z-10",children:[s.jsx("div",{className:"shrink-0 w-20 h-20 rounded-xl bg-background shadow-md border flex items-center justify-center overflow-hidden",children:e.logo_url?s.jsx("img",{src:e.logo_url,alt:`Logo ${e.name}`,className:"w-full h-full object-contain p-1.5",loading:"lazy"}):s.jsx("div",{className:"w-full h-full flex items-center justify-center rounded-xl",style:{background:b(e.name)},children:s.jsx("span",{className:"text-lg font-bold",style:{color:A(e.name)},children:V(e.name)})})}),s.jsx("div",{className:"pt-12 flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("h3",{className:"font-semibold text-foreground truncate group-hover:text-primary transition-colors",children:e.name}),e.is_verified&&s.jsx(L,{className:"h-4 w-4 text-primary shrink-0"})]})})]}),e.tagline&&s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:e.tagline}),d.length>0&&s.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(D,{className:"h-4 w-4 shrink-0"}),s.jsxs("span",{className:"truncate",children:[d.join(", "),o&&` +${(e.cities?.length||0)-3}`]})]}),c.length>0&&s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[c.map(r=>s.jsx(g,{variant:"outline",className:"text-xs font-normal py-0.5",children:r},r)),n&&s.jsxs(g,{variant:"outline",className:"text-xs font-normal py-0.5 text-muted-foreground",children:["+",t.length-2]})]}),s.jsxs("div",{className:"flex flex-col gap-2 mt-auto pt-3 border-t",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[e.review_count>0&&s.jsxs("span",{children:[e.review_count," avis"]}),e.employee_count&&e.employee_count>0&&s.jsxs("span",{children:[e.employee_count," pers."]})]}),e.job_count>0&&s.jsxs(g,{variant:"secondary",className:"bg-orange-100 text-orange-700 hover:bg-orange-100 gap-1 text-xs shrink-0",children:[s.jsx(M,{className:"h-3 w-3"}
1),e.job_count," offre",e.job_count>1?"s":""]})]}),e.review_count>=B&&l&&l>0&&e.avg_rating&&e.avg_rating>l&&s.jsxs(g,{className:"bg-green-100 text-green-700 border-green-200 text-xs gap-1 w-fit",children:[s.jsx(R,{className:"h-3 w-3"}),"Au-dessus de la moyenne"]})]})]})]})})}export{J as F};

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.