PageSourceSearch

https://blacksheepbi.com/assets/TamirDev-DcEFM7dh.js

js blacksheepbi.com collected 2026-09-30 08:26:56 UTC 81,454 bytes, 138 lines download raw bytes

1import{j as e,r as h}from"./ui-CPW3-RCR.js";import{u as bt}from"./useSmartScroll-Da1xVHwy.js";import{a0 as yt,aR as wt,e as lt,aF as vt,bo as jt,d as A,b as qe,S as _t,U as Nt,c8 as St,D as kt,R as $t,a9 as tt,ap as st,bB as Ct,P as Tt,s as ae,W as Et,bK as Pt,a2 as Mt,ao as Rt,a as Lt,g as Dt,u as Ot,bD as at,M as It,N as Ft,j as At,X as He,V as Wt,a6 as zt,k as Ht,L as Bt,ae as qt,a5 as Gt}from"./index-BraPXa8T.js";import{S as nt}from"./scroll-area-BQtXZnuf.js";import{t as Ut}from"./autoLearn-CRnZuHOE.js";import{M as Kt}from"./MermaidChart-DbehVDVk.js";import{S as Vt}from"./SendToTaskManager-ChKH7nnt.js";import{C as Jt}from"./ChatThreadSidebar-CfZe0DLw.js";import{u as Yt}from"./useChatThreads-C2aQZPDf.js";import{D as Qt}from"./DepartmentBrainPanel-BXjmvOXs.js";import{G as Xt}from"./gauge-xKz5X1-Y.js";import{S as Zt}from"./SavedResponses-DzznSC2_.js";import{r as es,u as ts}from"./xlsx-DLNWaC59.js";import{F as ct}from"./file-down-Chqz42zT.js";import{K as ss}from"./key-DLfwGZpn.js";import{B as Ue}from"./bookmark-D69rIKXw.js";import{M as as}from"./index-BfRVBusC.js";import{r as ns}from"./index-CbedGEwf.js";import"./supabase-B2z4OhLQ.js";import"./charts-DCB9_QAo.js";import"./vendor-CIXof4MH.js";import"./index-BdQq_4o_.js";import"./TaskCreateDialog-DKBsfrRz.js";import"./AdvancedDatePicker-ChPu-U4D.js";import"./tag-BX6YVh3F.js";import"./arrow-up-down-CCRYX6WW.js";import"./calendar-Cw1MR1gK.js";import"./en-US-CmMcNpXQ.js";import"./endOfMonth-F9aO6iN7.js";import"./format-DAGnYLwh.js";import"./startOfWeek-Dx_XlaWC.js";import"./isSameYear-CisLDsou.js";import"./subDays-B6CEP03R.js";import"./pt-XXd_e7HC.js";import"./it-Bv9SfiiA.js";import"./he-CneTJ2uI.js";import"./repeat-Bzyo7NvJ.js";import"./useTaskInlineHelpers-C6iIbF2m.js";import"./confetti.module-B5JVzsfH.js";import"./collapsible-CHuAoMFW.js";import"./index-DkD4heWV.js";import"./RichTextEditor-CJcYExHW.js";import"./index-CVizilC1.js";import"./with-selector-BvZ9_Y0X.js";import"./index-BP6EXeue.js";import"./index-BwRZ_Ozi.js";import"./dropdown-menu-ByQNdDT1.js";import"./circle-Bi-mZyos.js";import"./unlink-CAyXBby2.js";import"./heading-2-DPmEGPQt.js";import"./quote-BPj_Y_e6.js";import"./minus-CCCsL8N7.js";import"./table-CUdv-10Z.js";import"./strikethrough-DJ9SUok4.js";import"./link-BKA0FtFv.js";import"./select-DubWVshT.js";import"./formatDistanceToNow-DrARF4Rk.js";import"./constructNow-DBola7tm.js";import"./endOfDay-DBxpZW_E.js";import"./useDemoLocale-COy7_g6Y.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const rs=yt("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),is={speed:"speed",wordpress:"wp_error",security:"security",seo:"seo_technical",images:"images",server:"server"},rt={he:[{key:"speed",label:"בדיקת מהירות",prompt:"האתר של הלקוח נטען לאט. תעשה ניתוח מהירות מלא: Core Web Vitals, גודל תמונות, caching, CDN, minification, render-blocking resources, ו-TTFB. תן צ'קליסט מסודר עם עדיפויות."},{key:"wordpress",label:"תקלת וורדפרס",prompt:"יש שגיאה באתר וורדפרס. תדריך אותי שלב אחר שלב לזיהוי ופתרון: בדיקת לוגים, ניטרול תוספים, בדיקת ערכת נושא, בדיקת PHP errors, ובדיקת .htaccess."},{key:"security",label:"אבטחת אתר",prompt:"תעשה סריקת אבטחה לאתר וורדפרס: עדכוני ליבה ותוספים, hardening, הסרת תוספים מיותרים, 2FA, הגנת brute force, file permissions, database prefix, ו-SSL. תן דוח עם עדיפויות."},{key:"seo",label:"SEO טכני",prompt:"תבדוק SEO טכני לאתר: schema markup, sitemap.xml, robots.txt, canonical tags, redirect chains, broken links, hreflang, Open Graph, ו-structured data. תן דוח מפורט עם המלצות."},{key:"images",label:"אופטימיזציית תמונות",prompt:"תעזור לי לבצע אופטימיזציית תמונות מלאה: המרה ל-WebP/AVIF, דחיסה, lazy loading, srcset ו-sizes, CDN לתמונות, ו-placeholder blurry. תן צ'קליסט מעשי."},{key:"server",label:"שרת/אחסון",prompt:"צריך עזרה בהגדרות שרת: גרסת PHP, הגדרות MySQL, cPanel, migration בין שרתים, DNS, email configuration, ו-SSL certificates. תדריך אותי שלב אחר שלב."}],en:[{key:"speed",label:"Speed Audit",prompt:"The client's site loads slowly. Run a full speed analysis: Core Web Vitals, image sizes, caching, CDN, minification, render-blocking resources, and TTFB. Give me a prioritized checklist."},{key:"wordpress",label:"WordPress Issue",prompt:"There is a WordPress site error. Guide me step by step to diagnose and fix it: check logs, disable plugins, inspect the theme, review PHP errors, and verify .htaccess."},{key:"security",label:"Site Security",prompt:"Run a WordPress security review: core and plugin updates, hardening, remov
6ing unnecessary plugins, 2FA, brute-force protection, file permissions, database prefix, and SSL. Return a prioritized report."},{key:"seo",label:"Technical SEO",prompt:"Review the site's technical SEO: schema markup, sitemap.xml, robots.txt, canonical tags, redirect chains, broken links, hreflang, Open Graph, and structured data. Give me a detailed report with recommendations."},{key:"images",label:"Image Optimization",prompt:"Help me run full image optimization: convert to WebP/AVIF, compress assets, add lazy loading, configure srcset and sizes, use an image CDN, and add blurry placeholders. Give me an actionable checklist."},{key:"server",label:"Server / Hosting",prompt:"I need help with server setup: PHP version, MySQL settings, cPanel, migrations between hosts, DNS, email configuration, and SSL certificates. Walk me through it step by step."}],it:[{key:"speed",label:"Audit Velocità",prompt:"Il sito del cliente è lento. Esegui un'analisi completa della velocità: Core Web Vitals, dimensioni immagini, caching, CDN, minificazione, risorse bloccanti e TTFB. Dammi una checklist con priorità."},{key:"wordpress",label:"Problema WordPress",prompt:"C'è un errore su un sito WordPress. Guidami passo dopo passo per diagnosticarlo e risolverlo: controlla i log, disattiva i plugin, verifica il tema, gli errori PHP e il file .htaccess."},{key:"security",label:"Sicurezza Sito",prompt:"Esegui una revisione della sicurezza WordPress: aggiornamenti core e plugin, hardening, rimozione plugin inutili, 2FA, protezione brute force, permessi file, prefisso database e SSL. Restituisci un report con priorità."},{key:"seo",label:"SEO Tecnico",prompt:"Controlla il SEO tecnico del sito: schema markup, sitemap.xml, robots.txt, canonical tag, catene di redirect, link rotti, hreflang, Open Graph e structured data. Dammi un report dettagliato con consigli."},{key:"images",label:"Ottimizzazione Immagini",prompt:"Aiutami a fare un'ottimizzazione completa delle immagini: conversione in WebP/AVIF, compressione, lazy loading, srcset e sizes, CDN immagini e placeholder sfocati. Dammi una checklist pratica."},{key:"server",label:"Server / Hosting",prompt:"Mi serve aiuto con la configurazione del server: versione PHP, impostazioni MySQL, cPanel, migrazione tra server, DNS, configurazione email e certificati SSL. Guidami passo dopo passo."}],fr:[{key:"speed",label:"Audit Vitesse",prompt:"Le site du client est lent. Fais une analyse complète des performances : Core Web Vitals, taille des images, cache, CDN, minification, ressources bloquantes et TTFB. Donne-moi une checklist priorisée."},{key:"wordpress",label:"Problème WordPress",prompt:"Il y a une erreur sur un site WordPress. Guide-moi étape par étape pour l'identifier et la corriger : vérifier les logs, désactiver les plugins, inspecter le thème, les erreurs PHP et .htaccess."},{key:"security",label:"Sécurité du Site",prompt:"Fais un audit sécurité WordPress : mises à jour du core et des plugins, hardening, suppression des plugins inutiles, 2FA, protection brute force, permissions fichiers, préfixe base de données et SSL. Donne-moi un rapport priorisé."},{key:"seo",label:"SEO Technique",prompt:"Vérifie le SEO technique du site : schema markup, sitemap.xml, robots.txt, balises canoniques, chaînes de redirection, liens cassés, hreflang, Open Graph et structured data. Donne-moi un rapport détaillé avec recommandations."},{key:"images",label:"Optimisation des Images",prompt:"Aide-moi à faire une optimisation complète des images : conversion WebP/AVIF, compression, lazy loading, srcset et sizes, CDN d'images et placeholders flous. Donne-moi une checklist concrète."},{key:"server",label:"Serveur / Hébergement",prompt:"J'ai besoin d'aide pour la configuration serveur : version PHP, réglages MySQL, cPanel, migration entre serveurs, DNS, configuration email et certificats SSL. Guide-moi étape par étape."}],pt:[{key:"speed",label:"Auditoria de Velocidade",prompt:"O site do cliente está lento. Faça uma análise completa de velocidade: Core Web Vitals, tamanho de imagens, cache, CDN, minificação, recursos que bloqueiam renderização e TTFB. Me entregue uma checklist priorizada."},{key:"wordpress",label:"Problema WordPress",prompt:"Há um erro em um site WordPress. Me guie passo a passo para diagnosticar e corrigir: verificar logs, desativar plugins, revisar o tema, erros de PHP e o arquivo .htaccess."}
6,{key:"security",label:"Segurança do Site",prompt:"Faça uma revisão de segurança do WordPress: atualizações do core e plugins, hardening, remoção de plugins desnecessários, 2FA, proteção contra brute force, permissões de arquivo, prefixo do banco e SSL. Retorne um relatório priorizado."},{key:"seo",label:"SEO Técnico",prompt:"Revise o SEO técnico do site: schema markup, sitemap.xml, robots.txt, canonical tags, cadeias de redirecionamento, links quebrados, hreflang, Open Graph e structured data. Me entregue um relatório detalhado com recomendações."},{key:"images",label:"Otimização de Imagens",prompt:"Me ajude a fazer uma otimização completa de imagens: conversão para WebP/AVIF, compressão, lazy loading, srcset e sizes, CDN de imagens e placeholders borrados. Me entregue uma checklist prática."},{key:"server",label:"Servidor / Hospedagem",prompt:"Preciso de ajuda com configuração de servidor: versão do PHP, ajustes de MySQL, cPanel, migração entre servidores, DNS, configuração de e-mail e certificados SSL. Me guie passo a passo."}]},os={speed:e.jsx(Xt,{className:"w-4 h-4"}),wordpress:e.jsx(jt,{className:"w-4 h-4"}),security:e.jsx(vt,{className:"w-4 h-4"}),seo:e.jsx(lt,{className:"w-4 h-4"}),images:e.jsx(wt,{className:"w-4 h-4"}),server:e.jsx(rs,{className:"w-4 h-4"})};function ls(t){return(rt[t]??rt.en).map(u=>({key:is[u.key]??u.key,label:u.label,prompt:u.prompt,icon:os[u.key]}))}const Ke=ls("he"),Be="tamir_vault_pass_v1";async function Re(t,m={},u={}){const{data:d,error:x}=await ae.functions.invoke("tamir-vault",{body:{action:t,...m},headers:u});if(x)throw new Error(x.message||"vault call failed");return d}function cs(){const[t,m]=h.useState(()=>sessionStorage.getItem(Be)),[u,d]=h.useState(""),[x,S]=h.useState(!1),[r,f]=h.useState([]),[g,j]=h.useState(!1),[W,Z]=h.useState(""),[ee,re]=h.useState(!1),[ie,oe]=h.useState({}),[pe,V]=h.useState({}),[le,be]=h.useState(null),[Se,fe]=h.useState({}),c=h.useRef(new Set),[L,T]=h.useState(!1),[M,l]=h.useState({}),D={service_name:"שם הנכס",website_url:"לינק לאתר",login_url:"לינק כניסה",username:"שם משתמש",password:"סיסמה"},de=(i,n,p)=>{V(v=>({...v,[i]:{...v[i],[n]:p}})),l(v=>{var R;return(R=v[i])!=null&&R.includes(n)?{...v,[i]:v[i].filter(N=>N!==n)}:v})},me=(i,n)=>{var p;return(p=M[i])!=null&&p.includes(n)?"ring-1 ring-rose-500/70":""},[te,je]=h.useState(null),Ae=h.useRef(null),ue=t?{"x-vault-pass":t}:{},_e=h.useCallback(async()=>{if(t){j(!0);try{const i=await Re("list",{},ue);f(i.rows||[])}catch(i){String(i.message).includes("vault_locked")&&(sessionStorage.removeItem(Be),m(null)),A.error(i.message||"שגיאה בטעינה")}finally{j(!1)}}},[t]);h.useEffect(()=>{_e()},[_e]),h.useEffect(()=>{r.length&&fe(i=>{var v;let n=i,p=!1;for(const R of r)c.current.has(R.client_id)||(c.current.add(R.client_id),(((v=R.credentials)==null?void 0:v.length)||0)>0&&i[R.client_id]===void 0&&(p||(n={...i},p=!0),n[R.client_id]=!0));return p?n:i})},[r]);const We=async i=>{var n;i.preventDefault(),S(!0);try{const p=await Re("unlock",{code:u});p!=null&&p.ok&&(p!=null&&p.pass)?(sessionStorage.setItem(Be,p.pass),m(p.pass),d(""),A.success("הכספת נפתחה")):A.error("קוד שגוי")}catch(p){A.error((n=p.message)!=null&&n.includes("forbidden")?"אין הרשאה (סיווג 1 בלבד)":"קוד שגוי")}finally{S(!1)}},Ge=()=>{sessionStorage.removeItem(Be),m(null),oe({}),V({})},Le=async i=>{if(ie[i]){oe(n=>{const p={...n};return delete p[i],p});return}try{const n=await Re("decrypt",{credential_id:i},ue);oe(p=>({...p,[i]:n.password||""}))}catch(n){A.error("שגיאה בפענוח: "+(n.message||""))}},ke=(i,n)=>{const p=(n==null?void 0:n.id)||`new::${i}`;V(v=>({...v,[p]:n?{id:n.id,service_name:n.service_name,website_url:n.website_url||"",login_url:n.login_url||"",username:n.username||"",missing_note:n.missing_note||"",notes:n.notes||"",password:""}:{service_name:"אתר / WordPress",website_url:"",login_url:"",username:"",missing_note:"",notes:"",password:""}}))},$e=i=>{V(n=>{const p={...n};return delete p[i],p}),l(n=>{const p={...n};return delete p[i],p})},De=async(i,n,p)=>{const v=pe[n];if(!v)return;
6const R=[],a=!v.id||!(p!=null&&p.has_password),E=[["service_name",v.service_name],["website_url",v.website_url],["login_url",v.login_url],["username",v.username]];a&&E.push(["password",v.password]);for(const[I,se]of E)(!se||!String(se).trim())&&R.push(I);if(R.length>0){l(I=>({...I,[n]:R})),A.error("לא ניתן לשמור — חסרים שדות חובה",{description:`יש למלא: ${R.map(I=>D[I]).join(" · ")}`,duration:5e3});return}be(n);try{const I={id:v.id,client_id:i,service_name:v.service_name,website_url:v.website_url||null,login_url:v.login_url||null,username:v.username||null,missing_note:v.missing_note||null,notes:v.notes||null};v.password&&v.password.length>0&&(I.password=v.password),await Re("upsert",I,ue),A.success("נשמר"),$e(n),_e()}catch(I){A.error(I.message||"שגיאה בשמירה")}finally{be(null)}},Ce=async(i,n=!1)=>{try{if(i==="full"&&n&&!confirm("האם אתה בטוח שברצונך לייצא קובץ עם סיסמאות גלויות? פעולה זו נרשמת ביומן הגישה."))return;const p=await Re("export",{mode:i,include_passwords:n},ue),v=atob(p.b64),R=new Uint8Array(v.length);for(let I=0;I<v.length;I++)R[I]=v.charCodeAt(I);const N=new Blob([R],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),a=URL.createObjectURL(N),E=document.createElement("a");E.href=a,E.download=p.filename,E.click(),URL.revokeObjectURL(a)}catch(p){A.error("שגיאה בייצוא: "+(p.message||""))}},U=async i=>{try{const n=await i.arrayBuffer(),p=es(n,{type:"array"}),v=p.Sheets[p.SheetNames[0]],N=ts.sheet_to_json(v,{defval:""}).map(a=>({client_name:a["שם הלקוח"]??a.client_name??"",service_name:a.שירות??a.service??"",website_url:a["לינק לאתר"]??a.website_url??"",login_url:a["לינק כניסה לאתר"]??a.login_url??"",username:a["שם משתמש"]??a.username??"",password:a.סיסמא??a.סיסמה??a.password??"",missing_note:a["הערה (חסר/אחר)"]??a.הערה??a.note??""})).filter(a=>String(a.client_name).trim().length>0);if(N.length===0){A.error("הקובץ ריק או שלא נמצאה עמודת 'שם הלקוח'");return}je({rows:N,file_name:i.name})}catch(n){A.error("שגיאה בקריאת הקובץ: "+(n.message||""))}},ce=async()=>{var i;if(te)try{const n=await Re("import",{rows:te.rows},ue);A.success(`יובא בהצלחה: ${n.created} חדש, ${n.updated} עודכנו, ${n.skipped} דולגו${(i=n.unmatched)!=null&&i.length?`, ${n.unmatched.length} לא זוהו`:""}`),je(null),_e()}catch(n){A.error("שגיאה בייבוא: "+(n.message||""))}},Te=r.filter(i=>!(W&&!i.client_name.toLowerCase().includes(W.toLowerCase())||ee&&i.credentials.length>0&&i.credentials.some(n=>n.has_password||n.username||n.login_url)));return t?e.jsxs("div",{className:"p-4 space-y-4",dir:"rtl",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_t,{className:"w-5 h-5 text-emerald-500"}),e.jsx("h2",{className:"text-base font-semibold",children:"הגדרות הכספת"}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",Te.length," לקוחות)"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsxs("button",{onClick:()=>{var i;return(i=Ae.current)==null?void 0:i.click()},className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs bg-secondary hover:bg-secondary/80 transition-colors",children:[e.jsx(Nt,{className:"w-3.5 h-3.5"})," ייבוא Excel"]}),e.jsx("input",{ref:Ae,type:"file",accept:".xlsx,.xls",hidden:!0,onChange:i=>{var p;const n=(p=i.target.files)==null?void 0:p[0];n&&U(n),i.target.value=""}}),e.jsxs("button",{onClick:()=>Ce("template"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs bg-secondary hover:bg-secondary/80 transition-colors",children:[e.jsx(St,{className:"w-3.5 h-3.5"})," ייצוא דוגמה"]}),e.jsxs("button",{onClick:()=>Ce("full",!1),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs bg-secondary hover:bg-secondary/80 transition-colors",children:[e.jsx(kt,{className:"w-3.5 h-3.5"})," ייצוא מלא (בלי סיסמאות)"]}),e.jsxs("button",{onClick:()=>Ce("full",!0),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs bg-rose-500/10 text-rose-600 hover:bg-rose-500/20 transition-colors",children:[e.jsx(ct,{className:"w-3.5 h-3.5"})," ייצוא מלא עם סיסמאות"]}),e.jsx("button",{onClick:_e,className:"p-1.5 rounded-md hover:bg-secondary transition-colors",title:"רענן",children:e.jsx($t,{className:`w-4 h-4 ${g?"animate-spin":""}`})}),e.jsxs("button",{onClick:Ge,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs bg-secondary hover:bg-secondary/80 transition-colors",children:[e.jsx(qe,{className:"w-3.5 h-3.5"})," נעל"]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(lt,{className:"w-4 h-4 absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{value:W,onChange:i=>Z(i.target.value),placeholder:"חיפוש לקוח...",className:"w-full bg-secondary rounded-lg pr-9 pl-3 py-2 text-sm outline-none"})]}),e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:ee,onChange:i=>re(i.target.checked),className:"rounded"}),"רק חסרי פרטים"]})]}),te&&e.jsxs("div",{className:"border border-amber-500/30 bg-amber-500/5 rounded-lg p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm font-medium",children:["תצוגה מקדימה — ",te.file_name," 
6(",te.rows.length," שורות)"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:ce,className:"px-3 py-1.5 rounded-md text-xs bg-emerald-500 text-white",children:"אישור ייבוא"}),e.jsx("button",{onClick:()=>je(null),className:"px-3 py-1.5 rounded-md text-xs bg-secondary",children:"ביטול"})]})]}),e.jsxs("div",{className:"max-h-48 overflow-auto text-xs",children:[e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"text-muted-foreground sticky top-0 bg-card",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-right p-1",children:"לקוח"}),e.jsx("th",{className:"text-right p-1",children:"לינק אתר"}),e.jsx("th",{className:"text-right p-1",children:"משתמש"}),e.jsx("th",{className:"text-right p-1",children:"סיסמא"})]})}),e.jsx("tbody",{children:te.rows.slice(0,20).map((i,n)=>e.jsxs("tr",{className:"border-t border-border/50",children:[e.jsx("td",{className:"p-1",children:i.client_name}),e.jsx("td",{className:"p-1 truncate max-w-[200px]",children:i.website_url}),e.jsx("td",{className:"p-1",children:i.username}),e.jsx("td",{className:"p-1",children:i.password?"•••":"—"})]},n))})]}),te.rows.length>20&&e.jsxs("div",{className:"text-muted-foreground p-1",children:["+ ",te.rows.length-20," נוספות..."]})]})]}),(()=>{const i=Te.filter(N=>N.credentials.length>0),n=Te.filter(N=>N.credentials.length===0),p=N=>fe(a=>({...a,[N]:!a[N]})),v=(N,a,E,I=!1)=>{const se=pe[E],he=!!se;return e.jsxs("div",{className:`relative pr-6 py-2.5 border-t border-border/40 ${I?"bg-blue-500/5":"hover:bg-secondary/20"}`,children:[e.jsx("div",{className:"absolute right-2 top-0 bottom-0 w-px bg-border/60"}),e.jsx("div",{className:"absolute right-2 top-5 w-3 h-px bg-border/60"}),e.jsxs("div",{className:"grid grid-cols-12 gap-2 items-start",children:[e.jsxs("div",{className:"col-span-3 flex items-center gap-1.5 min-w-0",children:[e.jsx(ss,{className:"w-3.5 h-3.5 text-amber-500 flex-shrink-0"}),he?e.jsx("input",{value:se.service_name||"",onChange:J=>de(E,"service_name",J.target.value),placeholder:"* שם הנכס (אתר/דפי נחיתה/אינסטגרם...)",className:`w-full bg-secondary rounded px-2 py-1 text-xs ${me(E,"service_name")}`}):e.jsx("span",{className:"text-xs font-medium truncate",title:(a==null?void 0:a.service_name)||"",children:(a==null?void 0:a.service_name)||(I?"נכס חדש":"—")})]}),e.jsx("div",{className:"col-span-3 min-w-0 space-y-1",children:he?e.jsxs(e.Fragment,{children:[e.jsx("input",{value:se.website_url||"",onChange:J=>de(E,"website_url",J.target.value),placeholder:"* לינק לאתר",className:`w-full bg-secondary rounded px-2 py-1 text-xs ${me(E,"website_url")}`}),e.jsx("input",{value:se.login_url||"",onChange:J=>de(E,"login_url",J.target.value),placeholder:"* לינק כניסה",className:`w-full bg-secondary rounded px-2 py-1 text-xs ${me(E,"login_url")}`})]}):e.jsxs(e.Fragment,{children:[a!=null&&a.website_url?e.jsxs("a",{href:a.website_url,target:"_blank",rel:"noreferrer",className:"text-[11px] text-blue-500 hover:underline inline-flex items-center gap-1 truncate max-w-full",children:[e.jsx(Et,{className:"w-3 h-3 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:a.website_url})]}):e.jsx("div",{className:"text-[11px] text-muted-foreground",children:"—"}),(a==null?void 0:a.login_url)&&e.jsxs("a",{href:a.login_url,target:"_blank",rel:"noreferrer",className:"text-[11px] text-muted-foreground hover:text-blue-500 truncate block",children:["כניסה: ",a.login_url]})]})}),e.jsx("div",{className:"col-span-2 min-w-0",children:he?e.jsx("input",{value:se.username||"",onChange:J=>de(E,"username",J.target.value),placeholder:"* שם משתמש",className:`w-full bg-secondary rounded px-2 py-1 text-xs ${me(E,"username")}`}):e.jsx("span",{className:"text-xs truncate block",title:(a==null?void 0:a.username)||"",children:(a==null?void 0:a.username)||"—"})}),e.jsx("div",{className:"col-span-2 min-w-0",children:he?e.jsx("input",{type:"password",value:se.password||"",placeholder:a!=null&&a.has_password?"(ריק = ללא שינוי)":"* סיסמה",onChange:J=>de(E,"password",J.target.value),className:`w-full bg-secondary rounded px-2 py-1 text-xs ${me(E,"password")}`}):a!=null&&a.has_password?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("code",{className:"text-xs font-mono truncate",children:ie[a.id]??"••••••••"}),e.jsx("button",{onClick:()=>Le(a.id),className:"p-1 hover:bg-secondary rounded flex-shrink-0",title:ie[a.id]?"הסתר":"הצג",children:ie[a.id]?e.jsx(Pt,{className:"w-3 h-3"}):e.jsx(Mt,{className:"w-3 h-3"})})]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})}),e.jsx("div",{className:"col-span-2 flex items-start justify-end gap-1",children:he?e.jsxs(e.Fragment,{children:[e.jsx("input",{value:se.missing_note||"",onChange:J=>V(Ee=>({...Ee,[E]:{...se,missing_note:J.target.value}})),placeholder:"הערה",className:"flex-1 bg-secondary rounded px-2 py-1 text-xs min-w-0"}),e.jsx("button",{disabled:le===E,onClick:()=>De(N.client_id,E,a),className:"p-1.5 bg-emerald-500 text-white rounded flex-shrink-0",title:"שמור",children:e.jsx(Rt,{className:"w-3 h-3"})}),e.jsx("button",{onClick:()=>$e(E),className:"px-2 py-1 bg-secondary rounded text-[11px] flex-shrink-0",children:"ביטול"})]}):e.jsxs(e.Fragment,{children:[((a==null?void 0:a.missing_note)||(a==null?void 0:a.notes))&&e.jsx("span",{className:"text-[11px] text-muted-foreground truncate flex-1",title:(a==null?void 0:a.missing_note)||(a==null?void 0:a.notes)||"",children:(a==null?void 0:a.missing_note)||(a==null?void 0:a.notes)}),e.jsx("button",{onClick:()=>ke(N.client_id,a),className:"text-[11px] text-blue-500 hover:underline px-2 flex-shrink-0",children:"ערוך"})]})})]})]},E)},R=N=>{const a=Se[N.client_id],E=`new::${N.client_id}`,I=pe[E],se=N.credentials.length,he=se===0;return e.jsxs("div",{className:"border rounded-xl bg-card overflow-hidden",children:[e.jsxs("div",{className:`flex items-center justify-between gap-2 px-4 py-2.5 ${he?"bg-amber-500/5":"bg-secondary/30"}`,children:[e.jsxs("button",{onClick:()=>p(N.client_id),className:"flex items-center gap-2.5 flex-1 min-w-0 text-right",children:[e.jsx(st,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-300 ${a?"-rotate-90":"rotate-0"}`}),N.logo_url&&e.jsx("img",{src:N.logo_url,alt:"",className:"w-6 h-6 rounded object-contain bg-white/5 flex-shrink-0"}),e.jsx("span",{className:"font-semibold text-sm truncate",children:N.client_name}),he?e.jsx("span",{className:"text-[10px] bg-amber-500/20 text-amber-600 px-1.5 py-0.5 rounded font-medium flex-shrink-0",children:"חסר פרטי גישה"}):e.jsxs("span",{className:"text-[10px] bg-emerald-500/15 text-emerald-600 px-1.5 py-0.5 rounded font-medium flex-shrink-0",children:[se," ",se===1?"נכס":"נכסים"]})]}),e.jsxs("button",{onClick:()=>{fe(J=>({...J,[N.client_id]:!1})),ke(N.client_id,null)},className:"flex items-center gap-1 px-2.5 py-1 rounded-md text-xs bg-blue-500 text-white hover:bg-blue-600 transition-colors flex-shrink-0",title:"הוסף נכס/פרטי גישה ללקוח",children:[e.jsx(Tt,{className:"w-3.5 h-3.5"})," ",he?"הוסף נכס ראשון":"הוסף נכס"]})]}),e.jsx("div",{className:`grid transition-all duration-300 ease-in-out ${a?"grid-rows-[0fr] opacity-0":"grid-rows-[1fr] opacity-100"}`,children:e.jsxs("div",{className:"overflow-hidden",children:[he&&!I&&e.jsx("div",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:'ללקוח זה אין פרטי גישה עדיין · לחץ "הוסף נכס ראשון" כדי להתחיל'}),N.credentials.map(J=>v(N,J,J.id)),I&&v(N,null,E,!0)]})})]},N.client_id)};return e.jsxs("div",{className:"space-y-3",children:[i.map(R),n.length>0&&e.jsxs("div",{className:"border border-dashed rounded-xl bg-card/50",children:[e.jsxs("button",{onClick:()=>T(N=>!N),className:"w-full flex items-center justify-between px-4 py-2.5 text-xs text-muted-foreground hover:bg-secondary/20 rounded-xl",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(tt,{className:"w-3.5 h-3.5 text-amber-500"}),n.length," לקוחות ללא פרטי גישה"]}),L?e.jsx(st,{className:"w-4 h-4"}):e.jsx(Ct,{className:"w-4 h-4"})]}),L&&e.jsx("div",{className:"space-y-2 p-2 pt-0",children:n.map(R)})]}),!g&&Te.length===0&&e.jsx("div",{className:"border rounded-xl p-8 text-center text-sm text-muted-foreground",children:"לא נמצאו לקוחות"})]})})(),e.jsxs("div",{className:"text-[11px] text-muted-foreground flex items-center gap-1.5",children:[e.jsx(tt,{className:"w-3 h-3"}),"כל הסיסמאות מוצפנות (pgp_sym_encrypt). כל פענוח/ייצוא נרשם ביומן גישה (vault_access_log)."]})]}):e.jsx("div",{className:"flex items-center justify-center min-h-[60vh] p-6",dir:"rtl",children:e.jsxs("form",{onSubmit:We,className:"bg-card border rounded-xl p-8 max-w-md w-full shadow-lg",children:[e.jsxs("div",{className:"flex flex-col items-center text-center mb-6",children:[e.jsx("div",{className:"w-14 h-14 roun
6ded-2xl bg-gradient-to-br from-amber-500 to-rose-600 flex items-center justify-center mb-3",children:e.jsx(qe,{className:"w-7 h-7 text-white"})}),e.jsx("h2",{className:"text-lg font-semibold",children:"כספת פרטי גישה — מסך הגדרות"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1.5",children:"גישה לסיווג 1 בלבד · נדרש קוד גישה"})]}),e.jsx("input",{type:"password",value:u,onChange:i=>d(i.target.value),placeholder:"הקש קוד גישה",autoFocus:!0,className:"w-full bg-secondary rounded-lg px-4 py-3 text-sm outline-none focus:ring-2 focus:ring-amber-500/40 mb-3"}),e.jsx("button",{type:"submit",disabled:x||!u,className:"w-full bg-gradient-to-r from-amber-500 to-rose-600 text-white rounded-lg px-4 py-2.5 text-sm font-medium disabled:opacity-50",children:x?"פותח...":"פתח כספת"})]})})}const Ie=[{lang:"php · wp-config",lines:["<?php","define('WP_DEBUG', false);","define('DISALLOW_FILE_EDIT', true);","define('WP_AUTO_UPDATE_CORE', 'minor');","$table_prefix = 'wp_';"]},{lang:"php · wp hook",lines:["add_action('init', function () {","  if (!is_user_logged_in()) {","    remove_action('wp_head', 'wp_generator');","  }","});"]},{lang:"javascript · edge fn",lines:["export default async (req) => {","  const { id } = await req.json();","  const r = await fetch(`/api/${id}`);","  return Response.json(await r.json());","};"]},{lang:"typescript · fetch",lines:["const res = await fetch(url, {","  method: 'POST',","  headers: { 'Content-Type': 'application/json' },","  body: JSON.stringify(payload),","});"]},{lang:"python · webhook",lines:["import requests","def notify(lead):","    r = requests.post(WEBHOOK, json=lead)","    return r.status_code == 200"]},{lang:"python · lambda",lines:["def lambda_handler(event, ctx):","    body = json.loads(event['body'])","    return { 'statusCode': 200,","             'body': json.dumps(body) }"]},{lang:"css · animation",lines:["@keyframes pulse {","  0%   { opacity: .4; }","  50%  { opacity: 1;  }","  100% { opacity: .4; }","}"]},{lang:"html · meta",lines:['<meta charset="utf-8" />','<meta name="viewport"','  content="width=device-width,initial-scale=1" />','<link rel="canonical" href="…" />']},{lang:"zapier · zap",lines:["# Zap: New Lead → CRM","trigger: Webhooks (Catch Hook)","filter: only if email is set","action 1: Pipedrive – Create Person","action 2: Slack – Post to #leads"]},{lang:"make.com · scenario",lines:["[Webhook] ──► [Router]","        ├─► [HTTP POST] ──► CRM","        ├─► [Slack: #leads]","        └─► [Google Sheets: append row]"]},{lang:"sql · join",lines:["SELECT c.name, COUNT(l.id) AS leads","FROM clients c","LEFT JOIN leads l ON l.client_id = c.id","WHERE l.created_at > now() - interval '7d'","GROUP BY 1 ORDER BY 2 DESC;"]},{lang:"shell · deploy",lines:["$ curl -X POST https://api/deploy \\","    -H 'Authorization: Bearer ▮▮▮' \\",`    -d '{"env":"prod"}'`,"# → 200 OK  build ready in 42s"]},{lang:"nginx · cache",lines:["location ~* \\.(jpg|webp|css|js)$ {","  expires 30d;",'  add_header Cache-Control "public";',"}"]},{lang:"json · webhook",lines:["{",'  "event": "lead.created",','  "source": "facebook_ads",','  "value": 1200,','  "currency": "ILS"',"}"]}],ds=new Set(["function","const","let","var","return","await","async","import","export","from","default","if","else","for","while","try","catch","new","class","def","lambda","import","True","False","None","SELECT","FROM","WHERE","JOIN","LEFT","GROUP","ORDER","BY","AS","INSERT","UPDATE","DELETE","add_action","apply_filters","define","require","include","public","private","static","location","add_header","expires","trigger","filter","action","event","source"]),Fe=14,it=20,Ve=12.5,ot=18;function ms(t){let m=Ie[Math.floor(Math.random()*Ie.length)];if(t&&t.size<Ie.length){let u=0;for(;t.has(m)&&u<8;)m=Ie[Math.floor(Math.random()*Ie.length)],u++}return m}function us(t,m){return ds.has(t)?`rgba(110, 231, 183, ${m})`:/^["'`].*["'`]?$/.test(t)||/^["']/.test(t)?`rgba(252, 211, 77, ${m*.95})`:/^\/\/|^#/.test(t)?`rgba(120, 144, 130, ${m*.8})`:/^[<>]/.test(t)||/^<\w/.test(t)?`rgba(125, 211, 252, ${m})`:/^\d/.test(t)?`rgba(244, 114, 182, ${m*.9})`:`rgba(148, 197, 162, ${m})`}function ps(t,m,u,d,x){const S=m.trimStart();if(S.startsWith("//")||S.startsWith("#")){t.fillStyle=`rgba(120, 144, 130, ${x*.8})`,t.fillText(m,u,d);return}const r=m.split(/(\s+|[(){}\[\];,.:])/);let f=u;for(const g of r)g&&(t.fillStyle=us(g,x),t.fillText(g,f,d),f+=t.measureText(g).width)}function hs(t,m,u,d,x,S){const r=Math.min(S,d/2,x/2);t.beginPath(),t.moveTo(m+r,u),t.lineTo(m+d-r,u),t.quadraticCurveTo(m+d,u,m+d,u+r),t.lineTo(m+d,u+x-r),t.quadraticCurveTo(m+d,u+x,m+d-r,u+x),t.lineTo(m+r,u+x),t.quadraticCurveTo(m,u+x,m,u+x-r),t.lineTo(m,u+r),t.quadraticCurveTo(m,u,m+r,u),t.closePath()}function xs(){const t=h.useRef(null);h.useEffect(()=>{const u=t.current;if(!u)return;const d=u.getContext("2d");if(!d)return;const x=window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=Math.min(window.devicePixelRatio||1,2);let r=0,f=0,g=[],j=[];function W(c){return c.lines.reduce((L,T)=>L+T.length,0)+(c.lines.length-1)}function Z(c){d.font=`${Ve}px ui-monospace, SFMono-Regular, Menlo, monospace`;const L=Math.max(...c.lines.map(M=>d.measureText(M).width)),T=ot+c.lines.length*it;return{w:L+Fe*2,h:T+Fe}}function ee(){return r>=1200?Math.min(380,Math.floor(r*.26)):r>=900?Math.min(320,Math.floor(r*.28)):Math.floor(r*.46)}function re(){let c;r>=1200?c=2:(r>=700,c=1);const L=[],T=r>=700?["left","right"]:["left"];for(const M of T)for(let l=0;l<c;l++){const D=c===1?.5:.28+l*.44;L.push({id:`${M}-${l}`,side:M,yFrac:D})}j=L}function ie(c,L){const{w:T,h:M}=Z(c),l=ee();let D;
6L.side==="left"?(D=Math.max(10,Math.min(l-T-10,14)),l-T-10<14&&(D=10)):(D=Math.max(r-l+10,r-T-14),D+T>r-10&&(D=r-T-10));const de=L.yFrac*f;let me=Math.round(de-M/2);return me=Math.max(10,Math.min(f-M-10,me)),{x:D,y:me,w:T,h:M}}function oe(c,L){const T=new Set(g.filter(D=>D.phase!=="gone").map(D=>D.snippet)),M=ms(T),l=ie(M,c);return{snippet:M,slotId:c.id,x:l.x,y:l.y,w:l.w,h:l.h,revealed:0,totalChars:W(M),phase:"typing",phaseStart:L,holdMs:6e3+Math.random()*3e3,alpha:0,cps:16+Math.random()*8}}function pe(){r=u.clientWidth,f=u.clientHeight,u.width=Math.floor(r*S),u.height=Math.floor(f*S),d.setTransform(S,0,0,S,0,0),re(),g=[];const c=performance.now(),L=Math.max(1,Math.floor(j.length/2)),T=[...j].sort(()=>Math.random()-.5);for(let M=0;M<L;M++){const l=oe(T[M],c);l&&(l.revealed=l.totalChars*(.3+Math.random()*.4),l.alpha=.9,g.push(l))}}pe();const V=new ResizeObserver(pe);V.observe(u);let le=0,be=performance.now();function Se(c){hs(d,c.x-6,c.y-6,c.w+12,c.h+12,8),d.fillStyle=`rgba(15, 22, 30, ${.32*c.alpha})`,d.fill(),d.lineWidth=1,d.strokeStyle=`rgba(125, 211, 252, ${.1*c.alpha})`,d.stroke(),d.font="11px ui-monospace, SFMono-Regular, Menlo, monospace",d.textBaseline="top",d.fillStyle=`rgba(125, 211, 252, ${.55*c.alpha})`,d.fillText(`// ${c.snippet.lang}`,c.x+Fe,c.y),d.font=`${Ve}px ui-monospace, SFMono-Regular, Menlo, monospace`;let L=Math.floor(c.revealed),T=c.y+ot+4;for(let M=0;M<c.snippet.lines.length&&!(L<=0);M++){const l=c.snippet.lines[M],D=Math.min(l.length,L),de=l.slice(0,D);if(ps(d,de,c.x+Fe,T,.88*c.alpha),c.phase==="typing"&&D<l.length&&Math.floor(performance.now()/600)%2===0){const te=c.x+Fe+d.measureText(de).width;d.fillStyle=`rgba(186, 230, 253, ${.5*c.alpha})`,d.fillRect(te+1,T+1,1.5,Ve)}L-=D,D===l.length&&(L-=1),T+=it}}const fe=c=>{const L=Math.min(80,c-be);be=c,d.clearRect(0,0,r,f);const T=[],M=new Set;for(const l of g)l.phase==="typing"?(l.alpha=Math.min(1,l.alpha+L/600),l.revealed+=l.cps*L/1e3,l.revealed>=l.totalChars&&(l.revealed=l.totalChars,l.phase="hold",l.phaseStart=c)):l.phase==="hold"?(l.alpha=1,c-l.phaseStart>l.holdMs&&(l.phase="fadeout",l.phaseStart=c)):l.phase==="fadeout"&&(l.alpha=Math.max(0,1-(c-l.phaseStart)/2800),l.alpha<=0&&(l.phase="gone")),l.phase!=="gone"&&(Se(l),T.push(l),M.add(l.slotId));g=T;for(const l of j)if(!M.has(l.id)&&Math.random()<.012){const D=oe(l,c);D&&g.push(D)}le=requestAnimationFrame(fe)};if(!x)le=requestAnimationFrame(fe);else{d.clearRect(0,0,r,f);for(const c of g)c.revealed=c.totalChars,c.alpha=1,c.phase="hold",Se(c)}return()=>{cancelAnimationFrame(le),V.disconnect()}},[]);const m="linear-gradient(to right, black 0%, black 18%, transparent 32%, transparent 68%, black 82%, black 100%)";return e.jsx("canvas",{ref:t,"aria-hidden":!0,className:"pointer-events-none absolute inset-0 h-full w-full opacity-[0.20] dark:opacity-[0.28]",style:{zIndex:0,WebkitMaskImage:m,maskImage:m}})}const fs="https://ecrgkarlfnflbtpqsmun.supabase.co/functions/v1/tamir-chat",gs=["האתר של הלקוח נטען לאט — מה הצעדים הראשונים לשיפור מהירות?","יש שגיאה 500 באתר וורדפרס אחרי עדכון תוסף — מה עושים?","איך מוסיפים Google Tag Manager לאתר אלמנטור בצורה נכונה?","הציון של Core Web Vitals נמוך — איפה מתחילים?"];function bs({children:t,className:m}){const[u,d]=h.useState(!1),x=()=>{navigator.clipboard.writeText(t),d(!0),setTimeout(()=>d(!1),2e3)};return e.jsxs("div",{className:"relative group",children:[e.jsx("button",{onClick:x,className:"absolute top-2 left-2 p-1 rounded bg-secondary/80 text-muted-foreground hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity z-10",title:"העתק קוד",children:u?e.jsx(qt,{className:"w-3.5 h-3.5 text-emerald-500"}):e.jsx(Gt,{className:"w-3.5 h-3.5"})}),e.jsx("pre",{className:m,children:e.jsx("code",{children:t})})]})}function ys({req:t}){const[m,u]=h.useState(null),[d,x]=h.useState({}),S=h.useRef(!1),r=h.useCallback(async f=>{const g=`${f.type}:${f.id||f.service_name||"main"}`;u(g);try{const{data:j,error:W}=await ae.functions.invoke("tamir-create-credential-link",{body:{client_id:t.client_id,target_type:f.type,target_id:f.id,service_name:f.service_name,service_filter:f.service_name?[f.service_name]:void 0}});if(W)throw W;x(Z=>({...Z,[g]:{url:j.url,expires_in_minutes:j.expires_in_minutes}}));try{window.open(j.url,"_blank","noopener,noreferrer")}catch{}}catch(j){x(W=>({...W,[g]:{error:(j==null?void 0:j.message)||"שגיאה ביצירת הלינק"}}))}finally{u(null)}},[t.client_id]);return h.useEffect(()=>{t.auto&&t.sites.length===1&&!S.current&&(S.current=!0,r(t.sites[0]))},[t.auto,t.sites,r]),!t.sites||t.sites.length===0?e.jsx("div",{className:"text-sm text-amber-500 my-2",children:"לא נמצאו אתרים פעילים ללקוח. בחר לקוח אחר או הוסף אתר ראשי בכרטיס הלקוח."}):e.jsxs("div",{dir:"rtl",className:"my-3 space-y-2 border border-border rounded-lg p-3 bg-secondary/30",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"בחר את האתר שאליו אתה צריך גישה. הלינק יהיה תקף לצפייה אחת בלבד למשך 15 דקות."}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.sites.map(f=>{const g=`${f.type}:${f.id||f.service_name||"main"}`,j=d[g];return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("button",{onClick:()=>r(f),disabled:m===g,className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-md bg-primary text-primary-foreground text-sm hover:opacity-90 disabled:opacity-50",children:[m===g?e.jsx(Bt,{className:"w-3.5 h-3.5 animate-spin"}):null,f.label,f.url?e.jsxs("span",{className:"text-xs opacity-70",children:["— ",f.url]}):null]}),j&&"url"in j&&e.jsx("a",{href:j.url,target:"_blank",rel:"noreferrer",className:"text-xs text-primary underline truncate max-w-[300px]",children:"לינק נוצר — לחץ לפתיחה (תקף 15 דק׳)"}),j&&"error"in j&&e.jsx("div",{className:"text-xs text-destructive",children:j.error})]},g)})})]})}function ws({mode:t,staffName:m,clientName:u}){const d=m||"לך",x=t==="credential"?u?`מחפש במאגר של ${u} כמה רגעים וזה אצלך ${d}`:`מחפש במאגר כמה רגעים וזה אצלך ${d}`:`חושב וכבר מחזיר לך תשובה ${d}`;return e.jsx("div",{className:"flex justify-start",dir:"rtl",children:e.jsxs("div",{className:"max-w-[80%] rounded-2xl rounded-bl-sm bg-secondary/60 border border-border px-4 py-2.5 text-sm text-muted-foreground flex items-center gap-2",children:[e.jsx("span",{children:x}),e.jsxs("span",{className:"inline-flex gap-0.5",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-500/70 animate-pulse",style:{animationDelay:"0ms"}}),e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-500/70 animate-pulse",style:{animationDelay:"150ms"}}),e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-500/70 animate-pulse",style:{animationDelay:"300ms"}})]})]})})}async function vs(t,m){const[u,d]=await Promise.all([ae.from("client_credentials").select("service_name, website_url, credential_kind").eq("client_id",t).eq("is_active",!0),ae.from("landing_pages").select("id, name, slug").eq("client_id",t)]),x=u.data||[],S=d.data||[],r=[],f=new Set;for(const g of x){const j=g.service_name||"",W=j.toLowerCase(),Z=/mini|מיני/.test(W),ee=j||m;if(g.credential_kind==="website"){const re=`w:${ee}`;if(f.has(re))continue;f.add(re),r.push({kindKey:"main_site",label:ee,url:g.website_url,promptText:`מה פרטי הגישה ל${ee}?`})}else if(g.credential_kind==="landing_page"){const re=`l:${ee}`;if(f.has(re))continue;f.add(re),r.push({kindKey:Z?"mini_site":"landing_page",label:ee,url:g.website_url,promptText:`מה פרטי הגישה ל${ee}?`})}else{const re=`s:${ee}`;if(f.has(re))continue;f.add(re),r.push({kindKey:"service",label:ee,promptText:`מה פרטי הגישה ל${ee}?`})}}for(const g of S)r.some(j=>j.label.toLowerCase()===g.name.toLowerCase())||r.push({kindKey:"landing_page",label:g.name,url:`/lp/${g.slug}`,promptText:`מה פרטי הגישה ל${g.name}?`});return r}function js({content:t}){const m=[],u=/```(mermaid|access-request)\n([\s\S]*?)```/g;let d=0,x;for(;(x=u.exec(t))!==null;)x.index>d&&m.push({type:"text",content:t.slice(d,x.index)}),m.push({type:x[1]==="mermaid"?"mermaid":"access",content:x[2].trim()}),d=x.index+x[0].length;return d<t.length&&m.push({type:"text",content:t.slice(d)}),e.jsx(e.Fragment,{children:m.map((S,r)=>{if(S.type==="mermaid")return e.jsx(Kt,{chart:S.content},r);if(S.type==="access")try{const f=JSON.parse(S.content);return e.jsx(ys,{req:f},r)}catch{return e.jsx("div",{className:"text-xs text-destructive",children:"בלוק access-request לא תקי×
6Ÿ"},r)}return e.jsx("div",{dir:"rtl",className:"prose prose-sm prose-invert max-w-none text-right [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_li]:text-right [&_p]:text-right [&_h1]:text-right [&_h2]:text-right [&_h3]:text-right [&_h4]:text-right [&_ol]:pr-4 [&_ul]:pr-4 [&_table]:w-full [&_table]:border-collapse [&_th]:border [&_th]:border-border [&_th]:px-3 [&_th]:py-1.5 [&_th]:bg-secondary/60 [&_th]:text-right [&_td]:border [&_td]:border-border [&_td]:px-3 [&_td]:py-1.5 [&_td]:text-right",children:e.jsx(as,{remarkPlugins:[ns],components:{pre:({children:f})=>e.jsx(e.Fragment,{children:f}),code:({children:f,className:g})=>(g==null?void 0:g.includes("language-"))?e.jsx(bs,{className:g,children:String(f).replace(/\n$/,"")}):e.jsx("code",{className:g,children:f})},children:S.content})},r)})})}function Ta(){var Xe,Ze,et;const{selectedClient:t}=Lt(),{language:m}=Dt(),u=Yt({chatType:"tamir",clientId:(t==null?void 0:t.id)||null}),{threads:d,activeThreadId:x,messages:S,setMessages:r,loadingThreads:f,selectThread:g,createThread:j,persistMessage:W,saveAssistantDebounced:Z,startNewChat:ee,deleteThread:re}=u,[ie,oe]=h.useState(""),[pe,V]=h.useState(!1),[le,be]=h.useState([]),[Se,fe]=h.useState(!1),[c,L]=h.useState(""),[T,M]=h.useState("סיכום — התמיר"),[l,D]=h.useState(""),[de,me]=h.useState(!1),[te,je]=h.useState("chat"),{clearanceLevel:Ae,user:ue}=Ot(),_e=((Xe=ue==null?void 0:ue.user_metadata)==null?void 0:Xe.full_name)||(ue!=null&&ue.email?ue.email.split("@")[0]:null),We=Ae===1,[Ge,Le]=h.useState(null),[ke,$e]=h.useState(""),[De,Ce]=h.useState(null),[U,ce]=h.useState(null),[Te,i]=h.useState("technical"),[n,p]=h.useState([]),[v,R]=h.useState(!1),{bottomRef:N}=bt([S]),a=h.useRef(null),E=s=>new Promise((o,w)=>{const b=new FileReader;b.onload=()=>o(b.result),b.onerror=w,b.readAsText(s)}),I=async s=>{const o=s.target.files;if(!o)return;const w=[];for(const b of Array.from(o))try{if(["text/","application/json","application/xml","application/csv",".txt",".md",".csv",".json",".xml",".yaml",".yml",".html",".css",".js",".ts",".php"].some(_=>b.type.includes(_)||b.name.endsWith(_.replace(".","")))||b.size<5e5){const _=await E(b);w.push({name:b.name,content:_.slice(0,5e4)})}else w.push({name:b.name,content:`[קובץ בינארי: ${b.name}, גודל: ${(b.size/1024).toFixed(0)}KB]`});A.success(`הקובץ ${b.name} הועלה`)}catch{A.error(`שגיאה בקריאת ${b.name}`)}be(b=>[...b,...w]),a.current&&(a.current.value="")},se=s=>be(o=>o.filter((w,b)=>b!==s));h.useEffect(()=>{if(!(t!=null&&t.id)){p([]);return}let s=!1;return vs(t.id,t.name).then(o=>{s||p(o)}).catch(()=>{s||p([])}),()=>{s=!0}},[t==null?void 0:t.id,t==null?void 0:t.name]),h.useEffect(()=>{/פרטי גישה|גישה ל|סיסמ/.test(ie)?R(!0):R(!1)},[ie]);const he=s=>{const o=s.toLowerCase();return["פרטי גישה","פרטים לאתר","גישה לאתר","גישה לדף","סיסמה","סיסמא","יוזר","שם משתמש","wp-admin","כניסה לאתר","להיכנס לאתר","credentials","login details","access to","password"].some(b=>o.includes(b))},J=s=>{const o=s.toLowerCase();if(/(wp-?admin|wordpress|וורדפרס|אתר ראשי|לאתר|של האתר|website)/.test(o))return{hint:"main_site"};if(/(דף נחיתה|דפי נחיתה|לנדינג|landing)/.test(o))return{hint:"landing_page"};const w=[[/(activetrail|אקטיב\s*טרייל)/,"ActiveTrail"],[/(mailchimp|מיילצ'?ימפ)/,"Mailchimp"],[/(zapier|זאפייר)/,"Zapier"],[/(cloudflare|קלאודפלייר)/,"Cloudflare"],[/(google\s*ads|גוגל\s*אדס)/,"Google Ads"],[/(facebook|meta|פייסבוק|מטא)/,"Meta"],[/(tiktok|טיקטוק)/,"TikTok"],[/(linkedin|לינקדאין)/,"LinkedIn"],[/(smoove|סמוב)/,"Smoove"],[/(hubspot|האבספוט)/,"HubSpot"]];for(const[b,Y]of w)if(b.test(o))return{hint:"service",serviceName:Y};return{hint:"unknown"}},Ee=async(s,o)=>{const w={role:"user",content:s},b={role:"assistant",content:o};r(F=>[...F,w,b]);let Y=x;Y||(Y=await j(s)),Y&&(W(Y,"user",s),Z(Y,o))},dt=`## אבטחת אתר וורדפרס — מדריך מעשי
7
8### תוספים מומלצים
9| תוסף | חינמי | בתשלום | למה |
10| --- | --- | --- | --- |
11| **Wordfence** | ✅ | ✅ Premium | חומת אש + סריקת מאלוור — הכי מקיף |
12| **Solid Security** (לשעבר iThemes) | ✅ | ✅ Pro | Hardening + 2FA + הסתרת wp-login |
13| **Sucuri Security** | ✅ | ✅ Firewall | סריקה + ניקוי + WAF בענן |
14| **WPS Hide Login** | ✅ | — | משנה את כתובת ה-wp-admin |
15| **Limit Login Attempts Reloaded** | ✅ | — | הגנת brute force |
16| **All-In-One WP Migration** | ✅ | ✅ Unlimited | גיבויים והעברות |
17
18> בדרך כלל מספיק Wordfence Free + WPS Hide Login + Limit Login Attempts. אתרי חנות/לידים גבוהים — שדרוג ל-Wordfence Premium או Sucuri Firewall.
19
20### צ'קליסט Hardening — לפי סדר עדיפות
211. **עדכון ליבה + תוספים + תבנית** — כל שבוע, וגם הסרת תוספים לא בשימוש.
222. **סיסמה חזקה ל-admin + 2FA** (דרך Wordfence/Solid Security).
233. **שינוי שם משתמש מ-\`admin\`** למשהו לא ברור + הגבלת נסיונות כניסה.
244. **הסתרת \`wp-login.php\`** (WPS Hide Login).
255. **הגבלת XML-RPC** (\`/xmlrpc.php\`) אם לא משתמשים ב-Jetpack/אפליקציה.
266. **\`wp-config.php\`**: הוסף \`define('DISALLOW_FILE_EDIT', true);\` כדי לחסום עורך תוספים.
277. **File permissions**: 644 לקבצים, 755 לתיקיות, 600 ל-\`wp-config.php\`.
288. **שינוי \`wp_\` prefix של הטבלאות** (רק בהקמה — לא להריץ על אתר חי בלי גיבוי).
299. **SSL** פעיל בכל הדפים + redirect מ-http ל-https.
3010. **גיבוי יומי** אוטומטי (תוסף או שרת) — לפחות 7 גרסאות אחורה.
3111. **ניטור uptime** (UptimeRobot חינמי / Better Uptime).
3212. **הסתרת גרסת WP** מהתבנית.`,mt=`## אופטימיזציית תמונות — הכלים המומלצים
33
34### 1. [Compressimage.io](https://compressimage.io/) — **הכי מומלץ** ⭐
35תחת **אייקון ההגדרות** ⚙️ — הגדר:
36- **Image Quality** = \`70\`
37- **Max Width or Height (px)** = \`1920\`
38- **Convert to WebP** = \`ON\`
39
40> השילוב הזה נותן בדרך כלל **70-85% חיסכון** בלי פגיעה נראית באיכות, ומוודא שכל התמונות באתר ב-WebP — מה שמשפר ישירות את Core Web Vitals (LCP).
41
42### 2. [TinyPNG](https://tinypng.com/)
43חלופה מצוינת, חזקה במיוחד ל-PNG עם שקיפות. עד 20 תמונות בו-זמנית בחינם.
44
45### עקרונות זהב
46- **לא להעלות תמונה גולמית** לוורדפרס לפני דחיסה — חבל על משאבי השרת.
47- **אם התמונה נשארת JPG/PNG** — תוסף כמו \`ShortPixel\` או \`Smush\` יכול לדחוס בדיעבד.
48- **באלמנטור** — לכבות "Lazy Load" של אלמנטור ולהפעיל את זה של וורדפרס המובנה (אחרת זה כפול).`,ut=async s=>{var o,w,b,Y;if(!pe){if(s==="security"){await Ee("בקש המלצות אבטחה לאתר וורדפרס",dt);return}if(s==="images"){await Ee("איך לבצע אופטימיזציית תמונות?",mt);return}if(s==="wp_error"){ce({kind:"wp_error",code:"",details:""});return}if(s==="speed"){if(!(t!=null&&t.id)){await Ee("תריץ בדיקת מהירות","כדי להריץ בדיקת מהירות אני צריך לדעת איזה לקוח. בחר לקוח בהדר ואחר כך נסה שוב.");return}const F=`תריץ בדיקת מהירות לאתר של ${t.name}`;r(_=>[..._,{role:"user",content:F}]),i("technical"),V(!0);try{const{data:_}=await ae.from("clients").select("website_url").eq("id",t.id).maybeSingle();let Q=(_==null?void 0:_.website_url)||null;if(!Q){const{data:H}=await ae.from("client_credentials").select("website_url, credential_kind").eq("client_id",t.id).eq("is_active",!0),y=(H||[]).find(P=>P.credential_kind==="website"&&P.website_url);y&&(Q=y.website_url)}if(!Q){const H=`**אין דומיין מוגדר עבור ${t.name}.**
49
50כדי להריץ בדיקת מהירות (Google PageSpeed Insights) צריך קודם להגדיר את כתובת האתר —
51היכנס ל-**SEO → בדיקת אתר** והגדר את הדומיין, או הוסף אותו בכספת תחת "אתר ראשי", וחזור הנה.`,y={role:"assistant",content:H};r(B=>[...B,y]);let P=x;P||(P=await j(F)),P&&(W(P,"user",F),Z(P,H));return}const{data:C}=await ae.from("site_audit_scans").select("site_health, errors_count, warnings_count, notices_count, summary, completed_at, website_url").eq("client_id",t.id).eq("status","completed").order("completed_at",{ascending:!1}).limit(1).maybeSingle();let z;if(C){const H=C.summary||{}
51,y=H.thematic_scores||H,P=new Date(C.completed_at).toLocaleString("he-IL");z=`## בדיקת מהירות — ${t.name}
52**אתר:** \`${C.website_url}\` — נמדד ב-Google PageSpeed Insights ב-${P}.
53
54| מדד | ציון |
55| --- | --- |
56| Site Health | **${C.site_health??"—"}/100** |
57| Performance (Mobile) | ${y.mobile_performance??y.performance??"—"}/100 |
58| Performance (Desktop) | ${y.desktop_performance??"—"}/100 |
59| Core Web Vitals | ${y.core_web_vitals??"—"}/100 |
60| SEO | ${y.seo??"—"}/100 |
61| Accessibility | ${y.accessibility??"—"}/100 |
62| Best Practices | ${y.best_practices??"—"}/100 |
63
64**בעיות שזוהו:** ${C.errors_count||0} שגיאות · ${C.warnings_count||0} אזהרות · ${C.notices_count||0} הערות.
65
66> להרצת סריקה עדכנית — היכנס ל-**SEO → בדיקת אתר → הרץ סריקה**. הנתונים יתעדכנו אוטומטית גם כאן.`}else z=`**אין עדיין סריקת מהירות עבור ${t.name}** (אתר: \`${Q}\`).
67
68כדי לקבל מספרים מאומתים — היכנס ל-**SEO → בדיקת אתר** ולחץ "הרץ סריקה". זה לוקח ~30 שניות (PageSpeed Insights מ-Google), ואז אוכל להציג כאן Site Health, Core Web Vitals, ביצועים במובייל ובדסקטופ.`;const ye={role:"assistant",content:z};r(H=>[...H,ye]);let $=x;$||($=await j(F)),$&&(W($,"user",F),Z($,z))}catch(_){r(Q=>[...Q,{role:"assistant",content:`❌ שגיאה בשליפת בדיקת המהירות: ${(_==null?void 0:_.message)||_}`}])}finally{V(!1)}return}if(s==="server"){if(!(t!=null&&t.id)){await Ee("בדיקת שרת/אחסון","כדי לבדוק את האחסון והדומיין אני צריך לדעת איזה לקוח. בחר לקוח בהדר ואחר כך נסה שוב.");return}const F=`בדוק לי את האחסון והדומיין של ${t.name}`;r(_=>[..._,{role:"user",content:F}]),i("technical"),V(!0);try{const{data:{session:_}}=await ae.auth.getSession(),Q=_==null?void 0:_.access_token;if(!Q)throw new Error("יש להתחבר מחדש");const{data:C,error:z}=await ae.functions.invoke("tamir-whois",{headers:{Authorization:`Bearer ${Q}`},body:{client_id:t.id}});if((C==null?void 0:C.error)==="no_domain"||/no_domain/i.test((z==null?void 0:z.message)||"")||/no_domain/i.test(((o=z==null?void 0:z.context)==null?void 0:o.responseText)||"")){const O=`## שרת / אחסון — ${t.name}
69
70> 🔒 **פרטי הדומיין מוסתרים — לא הוגדר דומיין ללקוח**
71>
72> כדי להציג Registrar / NS / אחסון / פרטי קשר, אני צריך לדעת מה הדומיין של הלקוח.
73>
74> **סיבת ההסתרה:** לא קיימת רשומה פעילה מסוג \`website\` בכספת הלקוח, וגם בשדה \`website_url\` בכרטיס הלקוח השדה ריק. לכן אי×
74Ÿ מאיפה לשלוף נתוני RDAP/WHOIS.
75>
76> **איך מתקנים:**
77> 1. כספת הלקוח → הוסף רשומה מסוג "אתר" עם הדומיין (למשל \`example.co.il\`).
78> 2. או: כרטיס הלקוח → מלא את שדה \`website_url\`.
79> 3. נסה שוב את הכפתור "בדיקת שרת/אחסון".`;r(k=>[...k,{role:"assistant",content:O}]);let xe=x;xe||(xe=await j(F)),xe&&(W(xe,"user",F),Z(xe,O));return}if(z)throw z;if(C!=null&&C.error)throw new Error(C.message||C.error);const $=C,H=O=>O?new Date(O).toLocaleDateString("he-IL"):"—",y=($.ns||[]).map(O=>`- \`${O}\``).join(`
80`)||"_לא נמצאו רשומות NS._",P=($.contacts||[]).filter(O=>O.role!=="registrar"),B=$.rdap_status==="unavailable"?`### 🌐 פרטי הדומיין
81> 🔒 **פרטי הדומיין לא זמינים**
82>
83> ${$.rdap_reason}`:`### 🌐 פרטי הדומיין
84| שדה | ערך |
85| --- | --- |
86| Registrar | ${$.registrar||"—"} |
87| נרשם | ${H($.created)} |
88| תפוגה | ${H($.expires)} |
89| עודכן | ${H($.updated)} |
90| סטטוס | ${($.status||[]).join(", ")||"—"} |`,Ne=$.contacts_status==="redacted"?`### 📞 פרטי קשר
91> 🔒 ${$.contacts_reason}`:P.length?`### 📞 פרטי קשר
92| תפקיד | שם / ארגון | אימייל |
93| --- | --- | --- |
94${P.map(O=>`| ${O.role} | ${O.name||O.org||"—"} | ${O.email||(O.redacted?"_מוסתר (GDPR)_":"—")} |`).join(`
95`)}`:`### 📞 פרטי קשר
96> 🔒 כל פרטי הקשר מוסתרים ע״י הרשם (Privacy/GDPR).`,we=$.registrar_url,ne=we?/^https?:\/\//i.test(we)?we:`https://${we}`:void 0,Oe=ne?ne.replace(/^https?:\/\//i,"").replace(/\/$/,""):"",X=$.registrar||ne?`### 🏷️ ספק הדומיין (Registrar)
97**שם:** ${$.registrar||"—"}${ne?`  
98**אתר הרשם:** [${Oe}](${ne})`:""}`:`### 🏷️ ספק הדומיין (Registrar)
99> לא נמצא במרשם — [בדיקה ידנית ב-whois.com](https://www.whois.com/whois/${$.domain})`,q=`## שרת / אחסון — ${t.name}
100**דומיין:** \`${$.domain}\`
101
102${B}
103
104${X}
105
106### 🖥️ אחסון (לפי NS)
107**ספק מזוהה:** ${((w=$.hosting)==null?void 0:w.provider)||"לא מזוהה"} _(ביטחון: ${((b=$.hosting)==null?void 0:b.confidence)||"—"})_${(Y=$.hosting)!=null&&Y.note?`
108
109> ⚠️ ${$.hosting.note}`:""}
110
111**רשומות NS:**
112${y}
113
114${Ne}`,G={role:"assistant",content:q};r(O=>[...O,G]);let K=x;K||(K=await j(F)),K&&(W(K,"user",F),Z(K,q))}catch(_){r(Q=>[...Q,{role:"assistant",content:`❌ שגיאה בבדיקת השרת: ${(_==null?void 0:_.message)||_}`}])}finally{V(!1)}return}if(s==="seo_technical"){if(!(t!=null&&t.id)){ce({kind:"seo_technical",issue:""});return}const F=`שלוף את בעיות ה-SEO הטכני של ${t.name}`;r(_=>[..._,{role:"user",content:F}]),V(!0);try{const{data:_}=await ae.from("site_audit_scans").select("id, completed_at").eq("client_id",t.id).eq("status","completed").order("completed_at",{ascending:!1}).limit(1).maybeSingle();if(!_){ce({kind:"seo_technical",issue:""}),r(y=>y.slice(0,-1));return}const{data:Q}=await ae.from("site_audit_issues").select("id, title, severity, category, description, how_to_fix").eq("scan_id",_.id).eq("status","open").order("severity",{ascending:!0}).limit(40),C=Q||[];if(C.length===0){const y=`אין בעיות SEO פתוחות בסריקה האחרונה של ${t.name}. ✨`,P={role:"assistant",content:y};r(Ne=>[...Ne,P]);let B=x;B||(B=await j(F)),B&&(W(B,"user",F),Z(B,y));return}const z=C.map((y,P)=>{const B=y.severity==="error"?"🔴":y.severity==="warning"?"🟡":"🔵";return`${P+1}. ${B} **${y.title}** — _${y.category||"general"}_`}).join(`
115`),ye=`## בעיות SEO טכני — ${t.name}
116נמצאו **${C.length}** בעיות פתוחות בסריקה האחרונה. רשום בצ'אט "הסבר על בעיה #N" ואני אסביר אותה ואיך לתקן.
117
118${z}`,$={role:"assistant",content:ye};r(y=>[...y,$]);let H=x;H||(H=await j(F)),H&&(W(H,"user",F),Z(H,ye))}catch(_){r(Q=>[...Q,{role:"assistant",content:`❌ שגיאה בשליפת הבעיות: ${(_==null?void 0:_.message)||_}`}])}finally{V(!1)}return}}},Pe=async s=>{var ye,$,H;if(!s.trim()&&le.length===0||pe)return;let o=s.trim();const w=he(o),b=w?"credential_access":void 0;if(w&&!(t!=null&&t.id)){const y={role:"user",content:o},P={role:"assistant",content:"כדי להשיג פרטי גישה אני צריך לדעת איזה לקוח. בחר קודם לקוח מהפילטר בהדר העליון ואז שאל שוב, ואני אייצר לך לינק חד פעמי לפרטי הגישה."};r(B=>[...B,y,P]),oe("");return}if(w&&(t!=null&&t.id)){const y={role:"user",content:o};r(k=>[...k,y]),oe(""),i("credential"),V(!0);const{hint:P,serviceName:B}=J(o),[Ne,we]=await Promise.all([ae.from("client_credentials").select("service_name, website_url, login_url, username, credential_kind").eq("client_id",t.id).eq("is_active",!0),ae.from("landing_pages").select("id, name, slug, status").eq("client_id",t.id)]),ne=Ne.data||[],Oe=we.data||[],X=[],q=new Set;for(const k of ne){const ge=k.service_name||"",ze=k.credential_kind||"",ft=ge.toLowerCase(),gt=/mini|מיני/.test(ft),Me=ge||t.name;if(ze==="website"){const ve=`website:${Me}`;if(q.has(ve))continue;q.add(ve),X.push({kindKey:"main_site",type:"main_site",label:Me,url:k.website_url||void 0,service_name:ge||void 0})}else if(ze==="landing_page"){const ve=`lp:${Me}`;if(q.has(ve))continue;q.add(ve),X.push({kindKey:gt?"mini_site":"landing_page",type:"service",service_name:ge,label:Me,url:k.website_url||void 0})}else{const ve=`svc:${Me}`;if(q.has(ve))continue;q.add(ve),X.push({kindKey:"service",type:"service",service_name:ge,label:Me})}}for(const k of Oe){const ge=`lpid:${k.id}`;q.has(ge)||(q.add(ge),!X.some(ze=>(ze.label||"").toLowerCase()===k.name.toLowerCase())&&X.push({kindKey:"landing_page",type:"landing_page",id:k.id,label:k.name,url:`/lp/${k.slug}`}))}let G=X;if(P==="main_site")G=X.filter(k=>k.kindKey==="main_site");else if(P==="landing_page")G=X.filter(k=>k.kindKey==="landing_page"||k.kindKey==="mini_site");else if(P==="service"&&B){const k=B.toLowerCase();G=X.filter(ge=>(ge.service_name||"").toLowerCase().includes(k))}G.length===0&&(G=X);let K;if(G.length===0)K="לא נמצאו פרטי גישה ללקוח הזה בכספת. בקש מתמיר האנושי להוסיף אותם.";else if(G.length===1){const k={client_id:t.id,auto:!0,sites:[G[0]]};K=`להלן פרטי הגישה — הלינק חד‑פעמי ויפוג בעוד 15 דקות.
119
120\`\`\`access-request
121${JSON.stringify(k)}
122\`\`\``}
122else{const k={client_id:t.id,auto:!1,sites:G};K=`בחר את הנכס שאליו אתה צריך פרטי גישה (${G.length} נכסים זמינים):
123
124\`\`\`access-request
125${JSON.stringify(k)}
126\`\`\``}await new Promise(k=>setTimeout(k,2200));const O={role:"assistant",content:K};r(k=>[...k,O]),V(!1);let xe=x;xe||(xe=await j(o)),xe&&(W(xe,"user",o),Z(xe,O.content));return}const Y=Ke.find(y=>y.key===De);Y&&(o=`${Y.prompt}
127
128הערות נוספות מהמשתמש: ${o||"(ללא)"}`,Ce(null)),le.length>0&&(o+=`
129
130[קבצים מצורפים: ${le.map(y=>y.name).join(", ")}]`);const F={role:"user",content:o};r(y=>[...y,F]),oe(""),i("technical"),V(!0);const _=Date.now()+1800;let Q=!1,C=x;C||(C=await j(o)),C&&W(C,"user",o);let z="";try{const{data:{session:y}}=await ae.auth.getSession(),P=y==null?void 0:y.access_token;if(!P)throw new Error("לא מחובר — יש להתחבר מחדש");const B=await fetch(fs,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${P}`},body:JSON.stringify({messages:[...S,F],fileContents:le.length>0?le:void 0,client_id:(t==null?void 0:t.id)||null,language:m,intent:b})});if(be([]),!B.ok||!B.body){const X=await B.json().catch(()=>({}));throw new Error(X.error||`HTTP ${B.status}`)}const Ne=B.body.getReader(),we=new TextDecoder;let ne="";const Oe=async X=>{if(!Q){Q=!0;const q=_-Date.now();q>0&&await new Promise(G=>setTimeout(G,q))}z+=X,r(q=>{const G=q[q.length-1];return(G==null?void 0:G.role)==="assistant"?q.map((K,O)=>O===q.length-1?{...K,content:z}:K):[...q,{role:"assistant",content:z}]})};for(;;){const{done:X,value:q}=await Ne.read();if(X)break;ne+=we.decode(q,{stream:!0});let G;for(;(G=ne.indexOf(`
131`))!==-1;){let K=ne.slice(0,G);if(ne=ne.slice(G+1),K.endsWith("\r")&&(K=K.slice(0,-1)),!K.startsWith("data: "))continue;const O=K.slice(6).trim();if(O==="[DONE]")break;try{const k=(H=($=(ye=JSON.parse(O).choices)==null?void 0:ye[0])==null?void 0:$.delta)==null?void 0:H.content;k&&await Oe(k)}catch{ne=K+`
132`+ne;break}}}C&&z&&Z(C,z),Ut({userMessage:o,aiResponse:z,clientId:t==null?void 0:t.id,chatSource:"tamir-chat"})}catch(y){console.error("Tamir Chat error:",y),r(P=>[...P,{role:"assistant",content:`❌ שגיאה: ${y.message}`}])}finally{V(!1)}},Je=async s=>{const o=S[s];if(!(!o||o.role!=="assistant")){if(!ke.trim()){A.error("נא להזין כותרת");return}try{const{data:{session:w}}=await ae.auth.getSession();if(!(w!=null&&w.user))throw new Error("לא מחובר");const{error:b}=await ae.from("saved_copywriter_responses").insert({user_id:w.user.id,client_id:(t==null?void 0:t.id)||null,content:o.content,title:ke.trim(),template_type:"tamir"});if(b)throw b;A.success("נשמר למועדפים ⭐"),Le(null),$e("")}catch(w){A.error(`שגיאה: ${w.message}`)}}},Ye=h.useCallback(()=>{const s=S.filter(o=>o.role==="assistant");return s.length===0?(A.error("אין תשובות לסיכום"),""):s.map((o,w)=>`## תשובה ${w+1}
133
134${o.content}`).join(`
135
136---
137
138`)},[S]),pt=()=>{const s=Ye();if(!s)return;const o=new Blob([s],{type:"text/markdown;charset=utf-8"}),w=URL.createObjectURL(o),b=document.createElement("a");b.href=w,b.download=`tamir-report-${new Date().toISOString().slice(0,10)}.md`,b.click(),URL.revokeObjectURL(w),A.success("הדוח יוצא בהצלחה")},ht=()=>{const s=Ye();s&&(D(s),fe(!0))},xt=async()=>{if(!c.trim()){A.error("הכנס כתובת מייל");return}me(!0);try{const s=l.replace(/## (.*)/g,"<h2>$1</h2>").replace(/### (.*)/g,"<h3>$1</h3>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\n/g,"<br/>"),{data:o,error:w}=await ae.functions.invoke("josephs-send-email",{body:{to:c,subject:T,htmlBody:s}});if(w)throw w;if(o!=null&&o.formattedHtml){const b=window.open("","_blank");b&&(b.document.write(o.formattedHtml),b.document.close())}A.success("הדוח הוכן ונפתח בחלון חדש"),fe(!1)}catch(s){A.error(`שגיאה: ${s.message}`)}finally{me(!1)}},Qe=S.length>0;return e.jsxs("div",{className:"flex h-[calc(100vh-80px)] overflow-x-hidden",children:[e.jsx(Jt,{threads:d,activeThreadId:x,onSelect:g,onNew:ee,onDelete:re,loading:f}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between pb-4 border-b border-border mb-0 px-4 pt-1",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center",children:e.jsx(at,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-bold",children:"התמיר"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"מומחה פיתוח ואתרים — וורדפרס, אלמנטור, מהירות ובעיות טכניות"})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-0.5 bg-secondary/60 rounded-lg p-0.5 mr-2",children:[e.jsx("button",{onClick:()=>je("chat"),className:`px-3 py-1 rounded-md text-xs font-medium transition-colors ${te==="chat"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:"צ'אט"}),e.jsxs("button",{onClick:()=>je("favorites"),className:`flex items-center gap-1 px-3 py-1 rounded-md text-xs font-medium transition-colors ${te==="favorites"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(Ue,{className:"w-3 h-3"})," מועדפים"]}),We&&e.jsxs("button",{onClick:()=>je("vault"),className:`flex items-center gap-1 px-3 py-1 rounded-md text-xs font-medium transition-colors ${te==="vault"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(qe,{className:"w-3 h-3"})," הגדרות כספת"]})]}),Qe&&te==="chat"&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:pt,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",title:"ייצוא דוח",children:[e.jsx(ct,{className:"w-3.5 h-3.5"})," דוח"]}),e.jsxs("button",{onClick:ht,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",title:"שלח במייל",children:[e.jsx(It,{className:"w-3.5 h-3.5"})," מייל"]}),e.jsxs("button",{onClick:ee,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:[e.jsx(Ft,{className:"w-3.5 h-3.5"})," חדש"]})]})]})]}),te==="favorites"?e.jsx(Zt,{clientId:t==null?void 0:t.id}):te==="vault"&&We?e.jsx(nt,{className:"flex-1 min-h-0",children:e.jsx(cs,{})}):e.jsxs("div",{className:"relative flex-1 flex flex-col min-h-0",children:[e.jsx(xs,{}),e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col min-h-0",children:[e.jsx(nt,{className:"flex-1 min-h-0",children:e.jsxs("div",{className:"max-w-3xl mx-auto py-6 px-2 space-y-4",children:[!Qe&&e.jsxs("div",{className:"flex flex-col items-center justify-center pt-16 pb-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center mb-5",children:e.jsx(at,{className:"w-8 h-8 text-white"})}),e.jsx("h2",{className:"text-base font-semibold mb-1",dir:"rtl",children:t?`שלום, אני התמיר 💻 — מה הבעיה הטכנית של ${t.name}?`:"שלום, אני התמיר 💻"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md mb-4",dir:"rtl",children:t?`אני יכול לעזור עם וורדפרס, אלמנטור, מהירות, בעיות טכניות, וגם להשיג לך פרטי גישה לאתר של ${t.name} בלינק חד פעמי.`:"מומחה וורדפרס, אלמנטור, שיפורי מהירות ובעיות טכניות. בחר לקוח מההדר כדי שאוכל להשיג לך גם פרטי גישה לאתר."}),t&&e.jsx("div",{className:"mb-6 flex flex-wrap gap-2 justify-center",children:e.jsxs("button",{onClick:()=>Pe(`מה פרטי הגישה לאתר של ${t.name}?`),dir:"rtl",className:"text-xs px-4 py-2 rounded-lg bg-gradient-to-r from-cyan-500 to-blue-600 text-white font-medium hover:opacity-90 transition-opacity",children:["🔑 פרטי גישה לאתר של ",t.name]})}),e.jsxs("div",{className:"w-full max-w-lg mb-6",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2 font-medium",children:"תבניות מהירות:"}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:Ke.map(s=>e.jsxs("button",{onClick:()=>ut(s.key),className:"flex flex-col items-center gap-1.5 p-3 rounded-lg border border-border bg-secondary/40 hover:bg-secondary hover:border-cyan-500/30 transition-all text-center",children:[e.jsx("div",{className:"text-cyan-500",children:s.icon}),e.jsx("span",{className:"text-[11px] font-medium",children:s.label})]},s.key))})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 w-full max-w-lg",children:gs.map(s=>e.jsx("button",{onClick:()=>Pe(s),dir:"rtl",className:"text-right text-xs px-4 py-3 rounded-lg border border-border bg-secondary/50 hover:bg-secondary text-muted-foreground hover:text-foreground transition-colors",children:s},s))})]}),S.map((s,o)=>{const w=s.role==="user",b=new Intl.DateTimeFormat("he-IL",{hour:"2-digit",minute:"2-digit"}).format(new Date);return e.jsx("div",{className:`flex ${w?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:"flex flex-col max-w-[80%]",children:[e.jsx("div",{dir:"rtl",className:`rounded-2xl px-4 py-3 text-sm leading-relaxed shadow-sm ${w?"bg-gradient-to-r from-cyan-500 to-blue-600 text-white rounded-br-sm":"bg-secondary/60 border border-border rounded-bl-sm"}`,children:w?s.content:e.jsxs("div",{children:[e.jsx(js,{content:s.content}),e.jsxs("div",{className:"mt-2 flex justify-end gap-1 items-center",children:[e.jsx(Vt,{context:s.content}),Ge===o?e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("input",{value:ke,onChange:Y=>$e(Y.target.value),placeholder:"כותרת...",className:"bg-background rounded px-2 py-1 text-[11px] outline-none border border-border w-36",dir:"rtl",onKeyDown:Y=>Y.key==="Enter"&&Je(o),autoFocus:!0}),e.jsx("button",{onClick:()=>Je(o),className:"text-cyan-500 hover:text-cyan-400",children:e.jsx(Ue,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:()=>{Le(null),$e("")},className:"text-muted-foreground hover:text-foreground text-[10px]",children:"✕"})]}):e.jsxs("button",{onClick:()=>Le(o),className:"flex items-center gap-1 text-[10px] text-muted-foreground hover:text-cyan-500 transition-colors",children:[e.jsx(Ue,{className:"w-3 h-3"})," שמור"]})]})]})}),e.jsx("span",{className:`text-[10px] text-muted-foreground mt-1 ${w?"text-left":"text-right"} px-1`,dir:"ltr",children:b})]})},o)}),pe&&((Ze=S[S.length-1])==null?void 0:Ze.role)!=="assistant"&&e.jsx(ws,{mode:Te||"technical",staffName:_e,clientName:(t==null?void 0:t.name)||null}),e.jsx("div",{ref:N})]})}),e.jsx("div",{className:"px-4 pb-1",children:e.jsx("div",{className:"max-w-3xl mx-auto",children:e.jsx(Qt,{sectionKey:"tamir"})})}),le.length>0&&e.jsx("div",{className:"border-t border-border px-4 py-2",children:e.jsx("div",{className:"max-w-3xl mx-auto flex flex-wrap gap-2",children:le.map((s,o)=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-cyan-500/10 text-cyan-400 text-[11px] font-medium",children:[e.jsx(At,{className:"w-3 h-3"})," ",s.name,e.jsx("button",{onClick:()=>se(o),className:"hover:text-destructive",children:e.jsx(He,{className:"w-3 h-3"})})]},o))})}),De&&e.jsx("div",{className:"px-4 pb-1",children:e.jsxs("div",{className:"max-w-3xl mx-auto flex items-center gap-2",children:[e.jsxs("span",{className:"text-[11px] px-2 py-0.5 rounded bg-cyan-500/10 text-cyan-500 font-medium",children:["תבנית: ",(et=Ke.find(s=>
138s.key===De))==null?void 0:et.label]}),e.jsx("button",{onClick:()=>Ce(null),className:"text-muted-foreground hover:text-foreground text-xs",children:"✕"})]})}),(U==null?void 0:U.kind)==="wp_error"&&e.jsx("div",{className:"px-4 pb-2",children:e.jsxs("div",{className:"max-w-3xl mx-auto bg-card border border-cyan-500/30 rounded-lg p-3 space-y-2",dir:"rtl",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-sm font-medium text-cyan-400",children:"תקלת וורדפרס — תיאור הבעיה"}),e.jsx("button",{onClick:()=>ce(null),className:"text-muted-foreground hover:text-foreground",children:e.jsx(He,{className:"w-4 h-4"})})]}),e.jsx("input",{value:U.code,onChange:s=>ce({...U,code:s.target.value}),placeholder:"קוד שגיאה (למשל: 500, 404, ERR_TOO_MANY_REDIRECTS, White Screen)",className:"w-full bg-secondary rounded-md px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-cyan-500"}),e.jsx("textarea",{value:U.details,onChange:s=>ce({...U,details:s.target.value}),placeholder:"תיאור נוסף — מתי קורה, מה ניסית, איזה תוסף עדכנת לאחרונה...",rows:2,className:"w-full bg-secondary rounded-md px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-cyan-500 resize-none"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{onClick:()=>ce(null),className:"px-3 py-1.5 text-xs rounded-md hover:bg-secondary",children:"ביטול"}),e.jsx("button",{disabled:!U.code.trim()&&!U.details.trim(),onClick:()=>{const s=U.code.trim(),o=U.details.trim(),w=`הסבר תקלת WordPress: ${s?`קוד/שם תקלה: ${s}.`:""} ${o?`תיאור: ${o}.`:""} מה הגורם השכיח, איך לאבחן ואיך לפתור צעד-אחר-צעד.`;ce(null),Pe(w)},className:"px-3 py-1.5 text-xs rounded-md bg-gradient-to-r from-cyan-500 to-blue-600 text-white disabled:opacity-50",children:"נתח תקלה"})]})]})}),(U==null?void 0:U.kind)==="seo_technical"&&e.jsx("div",{className:"px-4 pb-2",children:e.jsxs("div",{className:"max-w-3xl mx-auto bg-card border border-cyan-500/30 rounded-lg p-3 space-y-2",dir:"rtl",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-sm font-medium text-cyan-400",children:"SEO טכני — מה הבעיה?"}),e.jsx("button",{onClick:()=>ce(null),className:"text-muted-foreground hover:text-foreground",children:e.jsx(He,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:t!=null&&t.id?"אין סריקת SEO פעילה ללקוח — תאר את הבעיה ואבדוק.":"אין לקוח נבחר — תאר את הבעיה הטכנית ואני אסייע."}),e.jsx("textarea",{value:U.issue,onChange:s=>ce({...U,issue:s.target.value}),placeholder:"לדוגמה: דף הבית לא מתאנדקס, robots.txt חוסם, sitemap לא נטען, מהירות נמוכה במובייל...",rows:3,className:"w-full bg-secondary rounded-md px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-cyan-500 resize-none"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{onClick:()=>ce(null),className:"px-3 py-1.5 text-xs rounded-md hover:bg-secondary",children:"ביטול"}),e.jsx("button",{disabled:!U.issue.trim(),onClick:()=>{const o=`בעיית SEO טכני: ${U.issue.trim()}. הסבר גורמים אפשריים, אבחון מדויק, ופתרון צעד-אחר-צעד עבור אתר וורדפרס.`;ce(null),Pe(o)},className:"px-3 py-1.5 text-xs rounded-md bg-gradient-to-r from-cyan-500 to-blue-600 text-white disabled:opacity-50",children:"נתח בעיה"})]})]})}),e.jsx("div",{className:"border-t border-border pt-3 pb-2 px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs("div",{className:"relative flex items-center gap-2",children:[e.jsx(Wt,{onTranscript:s=>oe(s)}),e.jsx("button",{onClick:()=>{var s;return(s=a.current)==null?void 0:s.click()},className:"p-2 rounded-md text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",title:"צרף קובץ",children:e.jsx(zt,{className:"w-4 h-4"})}),e.jsx("input",{ref:a,type:"file",multiple:!0,className:"hidden",onChange:I,accept:"*/*"}),e.jsx("input",{value:ie,onChange:s=>oe(s.target.value),onKeyDown:s=>{s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),Pe(ie))},onFocus:()=>{/פרטי גישה|גישה ל|סיסמ/.test(ie)&&R(!0)},onBlur:()=>setTimeout(()=>R(!1),150),placeholder:"שאל את התמיר — וורדפרס, מהירות, בעיות טכניות...",className:"flex-1 bg-secondary rounded-md px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-cyan-500",disabled:pe,dir:"rtl"}),e.jsx("button",{onClick:()=>Pe(ie),disabled:pe||!ie.trim()&&le.length===0,className:"p-2 rounded-md bg-gradient-to-r from-cyan-500 to-blue-600 text-white hover:opacity-90 transition-opacity disabled:opacity-50",children:e.jsx(Ht,{className:"w-4 h-4"})}),v&&e.jsx("div",{dir:"rtl",className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg p-2 z-30 animate-in fade-in slide-in-from-bottom-2 duration-200",children:t?n.length===0?e.jsxs("div",{className:"text-xs text-muted-foreground px-2 py-1.5",children:["אי×
138Ÿ פרטי גישה שמורים ל",t.name]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[10px] text-muted-foreground px-2 pb-1.5",children:"איזה פרטי גישה?"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map((s,o)=>e.jsx("button",{onMouseDown:w=>w.preventDefault(),onClick:()=>{oe(s.promptText),R(!1)},className:"text-xs px-3 py-1.5 rounded-md bg-secondary hover:bg-secondary/70 border border-border text-foreground transition-colors",children:s.label},o))})]}):e.jsx("div",{className:"text-xs text-muted-foreground px-2 py-1.5",children:"בחר לקוח כדי לראות נכסים זמינים"})})]}),e.jsxs("div",{className:"flex items-center justify-between mt-1.5 px-1",children:[e.jsxs("button",{type:"button",onClick:()=>{oe("פרטי גישה ל"),R(!0)},className:"text-[11px] text-cyan-500 hover:text-cyan-400 transition-colors flex items-center gap-1",children:[e.jsx(qe,{className:"w-3 h-3"})," ",t?`צריך פרטי גישה לאתרים של ${t.name}?`:"צריך פרטי גישה לאתרים?"]}),t&&n.length>0&&e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[n.length," נכסים זמינים"]})]})]})})]})]}),Se&&e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-background border border-border rounded-xl max-w-2xl w-full max-h-[80vh] overflow-y-auto p-6 space-y-4",dir:"rtl",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"שליחת סיכום במייל"}),e.jsx("button",{onClick:()=>fe(!1),className:"text-muted-foreground hover:text-foreground",children:e.jsx(He,{className:"w-5 h-5"})})]}),e.jsx("input",{value:c,onChange:s=>L(s.target.value),placeholder:"כתובת מייל",className:"w-full bg-secondary rounded-md px-3 py-2 text-sm outline-none"}),e.jsx("input",{value:T,onChange:s=>M(s.target.value),placeholder:"נושא",className:"w-full bg-secondary rounded-md px-3 py-2 text-sm outline-none"}),e.jsx("textarea",{value:l,onChange:s=>D(s.target.value),rows:12,className:"w-full bg-secondary rounded-md px-3 py-2 text-sm outline-none resize-y"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{onClick:()=>fe(!1),className:"px-4 py-2 rounded-md text-sm text-muted-foreground hover:bg-secondary",children:"ביטול"}),e.jsx("button",{onClick:xt,disabled:de,className:"px-4 py-2 rounded-md text-sm bg-gradient-to-r from-cyan-500 to-blue-600 text-white hover:opacity-90 disabled:opacity-50",children:de?"שולח...":"שלח"})]})]})})]})]})}export{Ta as default};

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.