PageSourceSearch

https://tsofit.org.il/assets/DigitalScreenDisplay-BqwEzXWK.js

js tsofit.org.il collected 2026-09-25 02:13:11 UTC 207,426 bytes, 165 lines download raw bytes

1import{j as e,R as G,ar as vt,d8 as jt,bB as wt,r as b,aa as Nt,u as yt,d as he,h as kt,aN as et,a7 as ie,I as _e,a5 as U,br as $e,aF as tt,cz as De,aH as ye,a6 as xe,x as st,aA as Pe,P as at,Y as ge,aC as Le,ao as _t,cM as $t,d7 as St,aM as lt,by as zt,bA as It,aP as Mt,W as Tt,H as At}from"./index-BuF13C9R.js";import{f as nt}from"./money-CmD9E_V-.js";import{A as Bt}from"./activity-DHmBXD6z.js";import{g as pe}from"./interestUtils-yEzCJxi2.js";import{P as Fe}from"./personalModules-BCvBDl3i.js";import{Q as ae}from"./index-wNrvqzRj.js";import{r as Ct}from"./pdfThumbnail-8FHFJvMD.js";import{f as Et,a as Rt,s as Dt,r as rt}from"./screenCanvas-DJaKKblp.js";import{K as Pt}from"./key-round-BTTGfzC9.js";import{F as Lt}from"./film-BOiDnw57.js";import{S as Q}from"./sparkles-Bk9eJtR5.js";import{T as Ft,B as Ht}from"./tree-pine-B7Qmh7nY.js";import{U as Ot}from"./utensils-r-GP3VfR.js";import{L as Wt}from"./leaf-BxZ8PRn4.js";import{B as Yt}from"./baby-BUG_dxit.js";import{S as Xt}from"./scan-line-BtEGSEkh.js";const He={fire:{label:"שריפה",title:"שריפה — פינוי מיידי",icon:wt,from:"#b91c1c",to:"#ea580c",accent:"#fed7aa",emoji:"🔥"},earthquake:{label:"רעידת אדמה",title:"רעידת אדמה — צאו למרחב פתוח",icon:Bt,from:"#92400e",to:"#b45309",accent:"#fde68a",emoji:"🏚️"},security:{label:"אירוע ביטחוני",title:"אירוע ביטחוני — היכנסו למרחב מוגן",icon:jt,from:"#7f1d1d",to:"#991b1b",accent:"#fecaca",emoji:"🛡️"},general:{label:"חירום כללי",title:"מצב חירום",icon:vt,from:"#b91c1c",to:"#dc2626",accent:"#fecaca",emoji:"⚠️"}},Ut=t=>He[t]||He.general;function qt({emergency:t,preview:l=!1}){const r=Ut(t==null?void 0:t.type),i=r.icon,s=(t==null?void 0:t.title)||r.title,a=(t==null?void 0:t.text)||"",n=(t==null?void 0:t.image)||"",o=`repeating-linear-gradient(45deg, ${r.accent}, ${r.accent} 22px, transparent 22px, transparent 44px)`;return e.jsxs("div",{className:"w-full h-full relative overflow-hidden text-white flex flex-col items-center justify-center text-center",dir:"rtl",style:{background:`linear-gradient(160deg, ${r.from}, ${r.to})`},children:[e.jsx("style",{children:"@keyframes emgPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.08);opacity:.85}}@keyframes emgFlash{0%,100%{opacity:.35}50%{opacity:.9}}"}),e.jsx("div",{className:"absolute top-0 inset-x-0",style:{height:"3.2vmin",background:o,animation:"emgFlash 1.1s ease-in-out infinite"}}),e.jsx("div",{className:"absolute bottom-0 inset-x-0",style:{height:"3.2vmin",background:o,animation:"emgFlash 1.1s ease-in-out infinite"}}),e.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(circle at 50% 40%, rgba(255,255,255,.18), transparent 60%)"}}),e.jsxs("div",{className:"relative z-10 flex flex-col items-center gap-[2.4vmin] px-[8%] py-[6vmin] max-w-[92%]",children:[e.jsxs("span",{className:"inline-flex items-center gap-3 rounded-full font-black tracking-widest px-6 py-2",style:{background:"rgba(0,0,0,.28)",fontSize:"clamp(16px,2.4vmin,34px)",letterSpacing:".15em"},children:[r.emoji," התראת חירום · ",r.label]}),e.jsx("span",{className:"grid place-items-center rounded-full",style:{width:"18vmin",height:"18vmin",background:"rgba(0,0,0,.22)",animation:"emgPulse 1.3s ease-in-out infinite"},children:e.jsx(i,{style:{width:"11vmin",height:"11vmin"}})}),G.createElement(l?"div":"h1",{className:"font-black leading-tight drop-shadow",style:{fontSize:"clamp(34px,8vmin,150px)"}},s),a&&e.jsx("p",{className:"font-bold leading-snug opacity-95",style:{fontSize:"clamp(20px,4vmin,72px)"},children:a}),n&&e.jsx("img",{src:n,alt:"",className:"rounded-2xl object-contain ring-4 ring-white/30 mt-[1vmin]",style:{maxHeight:"34vmin",maxWidth:"80%"}})]})]})}const Zt=[{key:"full",label:"מסך מלא",hint:"אזור תוכן אחד על כל המסך",regions:[{id:"r1",name:"אזור 1"}],grid:{columns:"1fr",rows:"1fr",areas:'"r1"'}},{key:"split2",label:"שני חלקים שווים",hint:"שני אזורים זה לצד זה",regions:[{id:"r1",name:"אזור 1"},{id:"r2",name:"אזור 2"}],grid:{columns:"1fr 1fr",rows:"1fr",areas:'"r1 r2"'}},{key:"main_side",label:"אזור גדול + אזור צד",hint:"אזור מרכזי גדול ואזור צד צר",regions:[{id:"r1",name:"אזור 1"},{id:"r2",name:"אזור 2"}],grid:{columns:"2.4fr 1fr",rows:"1fr",areas:'"r1 r2"'}},{key:"thirds",label:"שלושה חלקים",hint:"שלושה אזורים שווים",regions:[{id:"r1",name:"אזור 1"},{id:"r2",name:"אזור 2"},{id:"r3",name:"אזור 3"}],grid:{columns:"1fr 1fr 1fr",rows:"1fr",areas:'"r1 r2 r3"'}},{key:"main_two",label:"אזור גדול + שני אזורים קטנים",hint:"אזור מרכזי גדול ולצדו שני אזורים",regions:[{id:"r1",name:"אזור 1"},{id:"r2",name:"אזור 2"},{id:"r3",name:"אזור 3"}],grid:{columns:"2.2fr 1fr",rows:"1fr 1fr",areas:'"r1 r2" "r1 r3"'}},{key:"header_thirds",label:"כותרת עליונה + שלושה אזורים",hint:"פס עליון קבוע ומתחתיו שלושה אזורים",regions:[{id:"top",name:"אזור עליון"},{id:"r1",name:"אזור 1"},{id:"r2",name:"אזור 2"},{id:"r3",name:"אזור 3"}],grid:{columns:"1fr 1fr 1fr",rows:"1.05fr 3fr",areas:'"top top top" "r1 r2 r3"'}}],ke=t=>Zt.find(l=>l.key===t)||null,Oe=[{key:"tr",label:"ימין למעלה",align:"items-start justify-end",text:"right"},{key:"tc",label:"מרכז למעלה",align:"items-start justify-center",text:"center"},{key:"tl",label:"שמאל למעלה",align:"items-start justify-start",text:"left"},{key:"cr",label:"ימין",align:"items-center justify-end",text:"right"},{key:"center",label:"מרכז",align:"items-center justify-center",text:"center"},{key:"cl",label:"שמאל",align:"items-center justify-start",text:"left"},{key:"br",label:"ימין למטה",align:"items-end justify-end",text:"right"},{key:"bc",label:"מרכז למטה",align:"items-end justify-center",text:"center"},{key:"bl",label:"שמאל למטה",align:"items-end justify-start",text:"left"}],Gt=t=>(Oe.find(l=>l.key===t)||Oe[4]).align,Ca=[5,8,10,15,20],Ea=[{key:"fade",label:"דהייה"},{key:"slide",label:"החלקה"},{key:"appear",label:"הופעה"},{key:"none",label:"ללא מעבר"}],Ra=[{key:"title_desc",label:"כותרת ותיאור",icon:"Heading"},{key:"ticker",label:"סטריפ רץ",icon:"Type"},{key:"text",label:"טקסט",icon:"Type"},{key:"image",label:"תמונה",icon:"Image"},{key:"image_text",label:"תמונה עם טקסט",icon:"ImagePlus"},{key:"video",label:"סרטון",icon:"Film"},{key:"qr",label:"קוד QR",icon:"QrCode"},{key:"logo",label:"לוגו",icon:"Sparkles"},{key:"color",label:"צבע רקע",icon:"Palette"}],Da=[{key:"news_update",type:"module",source_module:"news_update",label:"חדשות ועדכונים",icon:"Newspaper"},{key:"events",type:"module",source_module:"events",label:"אירועים קרובים",icon:"CalendarDays"},{key:"photo_albums",type:"module",source_module:"photo_albums",label:"אלבומי תמונות",icon:"Images"},{key:"business_hours",type:"module",source_module:"business_hours",label:"שעות פעילות",icon:"Clock"},{key:"businesses",type:"module",source_module:"businesses",label:"אינדקס עסקים",icon:"Store"},{key:"birthdays",type:"module",source_module:"birthdays",label:"ברכות ליום הולדת",icon:"Cake"},{key:"digital_pages",type:"module",source_module:"digital_pages",label:"עלונים ועמודים",icon:"FileText"},{key:"interests",type:"module",source_module:"interests",label:"תחומי עניין",icon:"Heart"},{key:"memorial_pages",type:"module",source_module:"memorial_pages",label:"זוכרים ומנציחים",icon:"Flame"},{key:"pub",type:"pub",label:"פאב קהילתי",icon:"Beer"},{key:"secondhand",type:"secondhand",label:"חנות יד2",icon:"ShoppingBag"},{key:"weather",type:"weather",label:"תחזית שבועית",icon:"CloudSun"},{key:"personal_area",type:"personal_area",label:"אזור אישי",icon:"UserCircle"}],Pa={news_update:[["banners","חדשות ובאנרים"],["cards","חדשות וכרטסיות"]],events:[["banners","אירועים ובאנרים"],["central","אירוע מרכזי"]],businesses:[["auto","שילוב מתחלף"],["listing","תצוגת עסקים"]],business_hours:[["carousel","קרוסלת מתקנים"],["expanded","מתקן מורחב"]],photo_albums:[["featured","אלבום מלא"],["grid","רשת אלבומים"]]},La=t=>
1t==="businesses"?"auto":t==="business_hours"?"carousel":t==="photo_albums"?"featured":"banners";function it(t,l){return{id:t,name:l||"אזור",position:"center",appearance:{bg_color:"",bg_image:"",rounded:!0,overlay:0,show_title:!0,show_desc:!0,show_icon:!0},rotate:!1,interval_seconds:8,transition:"fade",items:[]}}function Kt(t){const l=ke(t);return l?{layout:t,regions:l.regions.map(r=>it(r.id,r.name))}:{layout:"",regions:[]}}const oe={primary:0,normal:1,minor:2},We=t=>{const l={...t};return delete l.importance,delete l.group,delete l._id,l};function Fa(t){const l=(Array.isArray(t)?t:[]).filter(h=>h&&h.source);if(!l.length)return{layout:"",regions:[]};const r=new Map,i=[];for(const h of l){const d=h.group?String(h.group):"";if(d){if(!r.has(d)){const v={items:[],importance:h.importance||"normal",rotate:!0};r.set(d,v),i.push(v)}const g=r.get(d);g.items.push(We(h)),oe[h.importance]<oe[g.importance]&&(g.importance=h.importance)}else i.push({items:[We(h)],importance:h.importance||"normal",rotate:!1})}i.sort((h,d)=>(oe[h.importance]??1)-(oe[d.importance]??1));const s=i.length,a=s<=1?"full":s===2?"main_side":s===3?"main_two":"header_thirds",n=Kt(a),f=[...a==="header_thirds"?["r1","r2","r3","top"]:n.regions.map(h=>h.id)],u={};if(a==="header_thirds"){const h=i.findIndex(d=>d.items.some(g=>g.source==="free"&&g.free_type==="ticker"));h>=0&&(u.top=i[h],i.splice(h,1),f.splice(f.indexOf("top"),1))}let x=0;for(const h of f)x<i.length&&(u[h]=i[x++]);const c=f.filter(h=>u[h]).slice(-1)[0];for(;x<i.length&&c;){const h=i[x++];u[c].items.push(...h.items),u[c].rotate=!0}const m=n.regions.map(h=>{const d=u[h.id],g=it(h.id,h.name);return d?{...g,items:d.items,rotate:!!(d.rotate&&d.items.length>1),interval_seconds:8}:g});return{layout:a,regions:m}}const Ha=[{key:"auto",label:"אוטומטי",hint:"זז רק אם התוכן לא נכנס"},{key:"none",label:"ללא תנועה",hint:"הטקסט יוקטן כדי להיכנס"},{key:"scroll",label:"גלילה",hint:"הטקסט עולה ברצף"},{key:"pages",label:"דפדוף",hint:"הטקסט מתחלף בעמודים"}],Vt=.55;function Jt(t,l){return t==="scroll"||t==="pages"||t==="none"?t:Number(l)<Vt?"scroll":"none"}function Qt(t){const l=String(t||"").length;return Math.min(90,Math.max(14,Math.round(l/6)))}function es(t,l=1){const r=Math.max(1,Math.ceil(String(t||"").length/Math.max(1,l)));return Math.min(14e3,Math.max(4e3,r*90))}function ts(t){const l=Array.isArray(t==null?void 0:t.urls)?t.urls.filter(i=>String(i||"").trim()):[];if(l.length)return l;const r=String((t==null?void 0:t.url)||"").trim();return r?[r]:[]}const Oa=[{key:"auto",label:"אוטומטי",hint:"מתחלק לפי משך הפריט על המסך"},{key:"3",label:"3 שניות"},{key:"5",label:"5 שניות"},{key:"8",label:"8 שניות"},{key:"12",label:"12 שניות"},{key:"20",label:"20 שניות"}];function ss(t){const l=Number(t==null?void 0:t.hold_sec);return Number.isFinite(l)&&l>0?Math.min(120,Math.round(l)):null}function ot(t,l,r=null){const i=Math.max(1,Number(t)||1);if(i<2)return 0;const s=Number(r);if(Number.isFinite(s)&&s>0)return Math.max(1e3,Math.round(s*1e3));const a=Number(l)>0?Number(l)*1e3:0;return a?Math.max(1800,Math.round(a/i)):4500}function Wa(t,l){const r=Math.max(0,Number(t)||0);return r<2?0:Math.round(r*ot(r,0,l)/1e3)}function Ya(t,l,r){const i=Array.isArray(t)?t.slice():[];if(l<0||l>=i.length||r<0||r>=i.length||l===r)return i;const[s]=i.splice(l,1);return i.splice(r,0,s),i}function Xa(t,l=6500,r=!0){const[i,s]=b.useState(0);return b.useEffect(()=>{s(0)},[t]),b.useEffect(()=>{if(!r||t<=1)return;const a=setInterval(()=>s(n=>(n+1)%t),l);return()=>clearInterval(a)},[t,l,r]),t>0?Math.min(i,t-1):0}function Ua(t,l){const r=Math.max(1,l),i=[];for(let s=0;s<(t||[]).length;s+=r)i.push(t.slice(s,s+r));return i.length?i:[[]]}function as(t,l){const r=[];let i="";const s=()=>{i.trim()&&r.push(i.trim()),i=""};for(let a of t.split(new RegExp("(?<=[.!?…])\\s+"))){if(a.length>l){for(s();a.length>l;)r.push(a.slice(0,l).trim()),a=a.slice(l);i=a.trim();continue}const n=`${i} ${a}`.trim();n.length>l&&i?(s(),i=a):i=n}return s(),r}function ls(t,l=160){const r=String(t||"").replace(/\r\n?/g,`
2`).trim();if(!r)return[];if(r.length<=l)return[r];const i=[];let s="";const a=()=>{const n=s.replace(/\s+$/,"");n.trim()&&i.push(n),s=""};for(const n of r.split(`
3`)){if(n.length>l){a(),i.push(...as(n,l));continue}const o=s?`${s}
4${n}`:n;o.length>l&&s?(a(),s=n):s=o}return a(),i.length?i:[r]}const ns=.02,rs=3;function is(t,l,r){const[i,s]=b.useState(1),a=b.useRef(0),n=b.useCallback(()=>{const o=t.current,f=l.current;if(!o||!f)return;const u=o.clientHeight,x=f.scrollHeight;!u||!x||s(c=>{const m=Math.max(ns,Math.min(1,c*(u/x)));return Math.abs(m-c)<.01?c:m})},[t,l]);return b.useLayoutEffect(()=>{a.current=0,s(1)},r),b.useLayoutEffect(()=>{a.current>=rs||(a.current+=1,n())}),b.useEffect(()=>{var u,x;const o=t.current;if(!o)return;const f=new ResizeObserver(()=>{a.current=0,s(1)});return f.observe(o),(x=(u=document.fonts)==null?void 0:u.ready)==null||x.then(()=>{a.current=0,s(1)}).catch(()=>{}),()=>f.disconnect()},[t]),i}
4function os(t){const l=String(t||"#ffffff").trim(),r=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(l);if(!r)return!0;const i=r[1].length===3?r[1].split("").map(o=>o+o).join(""):r[1],[s,a,n]=[0,2,4].map(o=>parseInt(i.slice(o,o+2),16)/255);return .2126*s+.7152*a+.0722*n>.55}function cs(t){return{alignItems:{right:"flex-end",center:"center",left:"flex-start"}[t==null?void 0:t.align]||"flex-end",textAlign:(t==null?void 0:t.align)||"right",color:(t==null?void 0:t.color)||"#ffffff",fontWeight:(t==null?void 0:t.weight)||700,fontFamily:(t==null?void 0:t.family)||void 0,lineHeight:(t==null?void 0:t.lineHeight)||1.25,fontStyle:t!=null&&t.italic?"italic":void 0,textDecoration:t!=null&&t.underline?"underline":void 0,textShadow:(t==null?void 0:t.shadow)===!1||!os(t==null?void 0:t.color)?"none":"0 2px 10px rgba(0,0,0,.55)",whiteSpace:"pre-wrap",wordBreak:"break-word"}}function ds({el:t,boxH:l,live:r=!1,editable:i=!1,onInput:s,onDone:a,onFit:n,placeholder:o}){const f=b.useRef(null),u=b.useRef(null),x=String((t==null?void 0:t.text)||""),c=Et(t==null?void 0:t.fontSize,l),m=is(f,u,[x,c,t==null?void 0:t.family,t==null?void 0:t.weight,t==null?void 0:t.lineHeight,l]);b.useEffect(()=>{n==null||n(t==null?void 0:t.id,m)},[n,t==null?void 0:t.id,m]);const h=r&&!i?Jt(t==null?void 0:t.motion,m):"none",d=b.useMemo(()=>h==="pages"?ls(x,Math.max(60,Math.round(160*m))):[],[h,x,m]),[g,v]=b.useState(0);b.useEffect(()=>{v(0)},[h,x]),b.useEffect(()=>{if(h!=="pages"||d.length<2)return;const j=setInterval(()=>v(k=>(k+1)%d.length),es(x,d.length));return()=>clearInterval(j)},[h,d.length,x]),b.useEffect(()=>{if(!i||!u.current)return;u.current.innerText=x,u.current.focus();const j=document.createRange();j.selectNodeContents(u.current),j.collapse(!1);const k=window.getSelection();k==null||k.removeAllRanges(),k==null||k.addRange(j)},[i,t==null?void 0:t.id]);const p={...cs(t),fontSize:h==="none"?c*m:c};if(h==="scroll"){const j=Qt(x);return e.jsxs("div",{ref:f,className:"w-full h-full overflow-hidden pointer-events-none relative",style:p,dir:"rtl",children:[e.jsx("style",{children:"@keyframes dsCanvasRise{0%{transform:translateY(100%)}100%{transform:translateY(-100%)}}@media (prefers-reduced-motion: reduce){.ds-canvas-rise{animation:none!important}}"}),e.jsx("div",{ref:u,className:"ds-canvas-rise w-full absolute inset-x-0",style:{animation:`dsCanvasRise ${j}s linear infinite`},children:x})]})}return h==="pages"&&d.length>1?e.jsx("div",{ref:f,className:"w-full h-full flex flex-col justify-center overflow-hidden pointer-events-none",style:p,dir:"rtl",children:e.jsx("div",{ref:u,className:"w-full animate-in fade-in duration-500",children:d[g]},g)}):e.jsx("div",{ref:f,className:`w-full h-full flex flex-col justify-center overflow-hidden ${i?"cursor-text":"pointer-events-none"}`,style:p,dir:"rtl",children:i?e.jsx("div",{ref:u,contentEditable:!0,suppressContentEditableWarning:!0,className:"w-full outline-none",onInput:j=>s==null?void 0:s(j.currentTarget.innerText),onBlur:a,onPointerDown:j=>j.stopPropagation(),onKeyDown:j=>{j.stopPropagation(),j.key==="Escape"&&(j.preventDefault(),a==null||a())}}):e.jsx("div",{ref:u,className:"w-full",children:x||(o?e.jsx("span",{className:"opacity-40",children:o}):null)})})}function xs({el:t,live:l,durationSec:r}){const i={width:"100%",height:"100%",objectFit:t.fit==="cover"?"cover":"contain",borderRadius:`${t.radius||0}%`,opacity:t.opacity==null?1:t.opacity},s=ts(t),a=ot(s.length,r,ss(t)),[n,o]=b.useState(0);if(b.useEffect(()=>{o(0)},[s.join("|")]),b.useEffect(()=>{if(!l||!a)return;const u=setInterval(()=>o(x=>(x+1)%s.length),a);return()=>clearInterval(u)},[l,a,s.length]),t.type==="video")return t.url?l?e.jsx("video",{src:t.url,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:i}):e.jsx("video",{src:t.url,muted:!0,playsInline:!0,preload:"metadata",style:i}):null;const f=t.type==="pdf"?(t.pages||[])[t.page||0]||"":s[n]||s[0]||"";return f?e.jsx("img",{src:f,alt:"",style:i,draggable:!1,className:l&&s.length>1?"animate-in fade-in duration-700":void 0},f):null}function ct({canvas:t,live:l=!1,fillBackground:r=!1,durationSec:i=0,className:s="",style:a}){const n=b.useRef(null),[o,f]=b.useState({w:0,h:0});b.useLayoutEffect(()=>{const h=n.current;if(!h)return;const d=()=>f({w:h.clientWidth,h:h.clientHeight});d();const g=new ResizeObserver(d);return g.observe(h),()=>g.disconnect()},[]);const u=t,x=Rt(u==null?void 0:u.format,o.w,o.h),c=(u==null?void 0:u.background)||{},m=Dt(u);return e.jsx("div",{ref:n,className:`relative overflow-hidden ${s}`,style:r?{background:c.color||"#0f2740",...a}:a,children:e.jsxs("div",{className:"absolute overflow-hidden",style:{width:x.width,height:x.height,left:x.left,top:x.top,background:c.color||"#0f2740"},children:[c.image&&e.jsx("img",{src:c.image,alt:"",className:"absolute inset-0 w-full h-full",style:{objectFit:c.fit==="contain"?"contain":"cover"},draggable:!1}),c.image&&Number(c.overlay)>0&&e.jsx("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${Math.min(.9,Number(c.overlay))})`}}),m.map(h=>e.jsx("div",{className:"absolute",style:{left:`${h.x}%`,top:`${h.y}%`,width:`${h.w}%`,height:`${h.h}%`,zIndex:h.z},children:h.type==="text"?e.jsx(ds,{el:h,boxH:x.height,live:l}):e.jsx(xs,{el:h,live:l,durationSec:i})},h.id))]})})}const dt=["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],me=G.createContext(!1),be=t=>`ds_token_${t}`,Ye=t=>`ds_slides_${t}`;function ue({className:t="",style:l}){return e.jsx("div",{className:t,style:{...l,display:"flex",alignItems:"center",justifyContent:"center",background:"#0a2443",borderRadius:"inherit"},children:e.jsx("img",{src:kt,alt:"ESHUV",style:{width:"82%",height:"82%",objectFit:"contain"}})})}function Xe(){return e.jsxs("div",{className:"relative w-full h-full overflow-hidden flex flex-col items-center justify-center text-center",style:{background:"radial-gradient(120% 120% at 50% 30%, #24507d 0%, #163457 58%, #0c2138 100%)"},children:[e.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 -top-1/4 w-[1632px] h-[1026px] pointer-events-none ds-spot",style:{background:"radial-gradient(closest-side, rgba(56,185,119,0.22), rgba(34,211,238,0.10) 45%, transparent 72%)"}}),e.jsx("div",{className:"absolute bottom-0 inset-x-0 h-40 pointer-events-none",style:{background:"linear-gradient(to top, rgba(56,185,119,0.12), transparent)"}}),e.jsxs("div",{className:"relative z-10 flex flex-col items-center gap-8 ds-stage-in",children:[e.jsx("div",{className:"w-48 h-48 rounded-[2.4rem] overflow-hidden ring-1 ring-white/15 ds-splash-pulse",style:{boxShadow:"0 40px 90px -20px rgba(34,211,238,0.35)"},children:e.jsx(ue,{className:"w-full h-full"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-6xl font-black text-white drop-shadow-lg",children:"עולים לאוויר"}),e.jsxs("p",{className:"text-3xl font-bold text-white/60 mt-3",children:["מתחברים לערוץ הקיבוץ",e.jsx("span",{className:"ds-dots"})]})]})]}),e.jsx("div",{className:"absolute inset-y-0 right-0 w-1/2 z-20 ds-curtain-r",style:{background:"repeating-linear-gradient(90deg, rgba(0,0,0,0.28) 0 10px, rgba(255,255,255,0.05) 10px 26px), linear-gradient(90deg, #3b0d17, #5b1220 45%, #3b0d17)",boxShadow:"inset -40px 0 70px rgba(0,0,0,0.6)"}}),e.jsx("div",{className:"absolute inset-y-0 left-0 w-1/2 z-20 ds-curtain-l",style:{background:"repeating-linear-gradient(90deg, rgba(0,0,0,0.28) 0 10px, rgba(255,255,255,0.05) 10px 26px), linear-gradient(270deg, #3b0d17, #5b1220 45%, #3b0d17)",boxShadow:"inset 40px 0 70px rgba(0,0,0,0.6)"}}),e.jsx("style",{children:`
5        @keyframes dsCurtainR { 0%,16% { transform: translateX(0); } 100% { transform: translateX(100%); } }
6        @keyframes dsCurtainL { 0%,16% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
7        .ds-curtain-r { animation: dsCurtainR 2.3s cubic-bezier(.7,0,.25,1) forwards; }
8        .ds-curtain-l { animation: dsCurtainL 2.3s cubic-bezier(.7,0,.25,1) forwards; }
9        @keyframes dsStageIn { 0%,22% { opacity: 0; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
10        .ds-stage-in { animation: dsStageIn 2.5s ease-out both; }
11        @keyframes dsSpot { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
12        .ds-spot { animation: dsSpot 4s ease-in-out infinite; }
13        @keyframes dsDots { 0% { content: ''; } 33% { content: '.'; } 66% { content: '..'; } 100% { content: '...'; } }
14        .ds-dots::after { content: ''; animation: dsDots 1.4s steps(1) infinite; }
15        @media (prefers-reduced-motion: reduce) { .ds-curtain-r,.ds-curtain-l { display: none; } .ds-stage-in { animation: none; } }
16      `})]})}const Se=t=>t==null?{icon:"🌡️",label:""}:t===0?{icon:"☀️",label:"בהיר"}:t<=3?{icon:"⛅",label:"מעונן חלקית"}:t<=48?{icon:"🌫️",label:"ערפל"}:t<=67?{icon:"🌧️",label:"גשם"}:t<=77?{icon:"❄️",label:"שלג"}:t<=82?{icon:"🌦️",label:"ממטרים"}:t<=99?{icon:"⛈️",label:"סופה"}:{icon:"🌡️",label:""},xt=t=>t==null?"":["צפוני","צפון-מזרחי","מזרחי","דרום-מזרחי","דרומי","דרום-מערבי","מערבי","צפון-מערבי"][Math.round(t/45)%8],ft=["news_board","events_board","memorial_board","business_board","cards_board","birthdays_board","business_hours_board","albums_board","service_requests_board","interests_board","digital_pages_board","personal_area_board","secondhand_board","pub_board","weather_board","synagogue_board","content_page_board","video","banners_board","theme_images_board","app_promo","multi_board"];function ze({slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n,onVideoEnd:o}){if(!t)return null;switch(t.kind){case"news_board":return e.jsx(As,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"events_board":return e.jsx(ca,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"memorial_board":return e.jsx(Bs,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"business_board":return e.jsx(oa,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"cards_board":return e.jsx(Rs,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"birthdays_board":return e.jsx(Es,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"business_hours_board":return e.jsx(xa,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"albums_board":return e.jsx(fa,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"service_requests_board":return e.jsx(ma,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"interests_board":return e.jsx(ua,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"digital_pages_board":return e.jsx(pa,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n});case"personal_area_board":return e.jsx(Ps,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"secondhand_board":return e.jsx(Ys,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n});case"pub_board":return e.jsx(Zs,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n});case"weather_board":return e.jsx(Js,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"synagogue_board":return e.jsx(la,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"content_page_board":return e.jsx(ta,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"link_cards_board":return e.jsx(sa,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"video":return e.jsx(js,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a,onVideoEnd:o});case"banners_board":return e.jsx(ws,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"theme_images_board":return e.jsx(Ns,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"app_promo":return e.jsx(_s,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a});case"multi_board":return e.jsx(hs,{slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n});default:return e.jsx(ps,{slide:t,primary:s,secondary:a,onVideoEnd:o})}}function mt({children:t}){const l=b.useRef(null),[r,i]=b.useState(1);return b.useEffect(()=>{const s=l.current;if(!s)return;const a=()=>{const o=s.getBoundingClientRect();o.width&&o.height&&i(Math.min(o.width/1920,o.height/1080))};a();const n=new ResizeObserver(a);return n.observe(s),()=>n.disconnect()},[]),e.jsx("div",{ref:l,className:"w-full h-full overflow-hidden relative",children:e.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",width:1920,height:1080,transform:`translate(-50%, -50%) scale(${r})`,transformOrigin:"center center"},children:t})})}function fs({content:t,primary:l,secondary:r,position:i="center",durationSec:s=0}){const a=t||{},n=a.free_type||"text",o=Gt(i),f=a.align==="right"?"text-right":a.align==="left"?"text-left":"text-center",u=a.title_size==="xl"?"text-6xl":a.title_size==="sm"?"text-3xl":a.title_size==="md"?"text-4xl":"text-5xl",x=a.text_color||"#ffffff",c=a.bg_color||"";if(n==="ticker"){const m=(a.text||a.title||"").trim();return e.jsxs("div",{className:"w-full h-full flex items-center overflow-hidden",style:{background:c||`linear-gradient(90deg, ${l}, ${r})`},children:[e.jsxs("div",{className:"ds-ticker-track",style:{color:x},children:[e.jsx("span",{className:"ds-ticker-seg",children:m}),e.jsx("span",{className:"ds-ticker-seg","aria-hidden":"true",children:m})]}),e.jsx("style",{children:".ds-ticker-track{display:inline-flex;white-space:nowrap;font-weight:800;font-size:clamp(1.1rem,4.2vh,2.4rem);animation:dsTickerRun 20s linear infinite}.ds-ticker-seg{padding:0 2.5rem}@keyframes dsTickerRun{from{transform:translateX(0)}to{transform:translateX(-50%)}}@media(prefers-reduced-motion:reduce){.ds-ticker-track{animation:none}}"})]})}if(n==="content_page"){const m=rt(a);if(m)return e.jsx(ct,{canvas:m,live:!0,durationSec:s,className:"w-full h-full"});const h=ht(a.body_html||"");return e.jsxs("div",{className:"w-full h-full grid place-items-center p-[4%]",style:{background:c||"#ffffff"},children:[a.missing?e.jsx("span",{className:"text-slate-400 text-xl",children:"עמוד תוכן אינו זמין"}):h?e.jsx("div",{className:"ds-cp-region max-w-full max-h-full overflow-auto text-center text-slate-900",dangerouslySetInnerHTML:{__html:h}}):e.jsx("span",{className:"text-slate-300 text-xl",children:"עמוד תוכן ריק"}),e.jsx("style",{children:".ds-cp-region{font-size:clamp(1rem,3.4vh,2rem);line-height:1.35}.ds-cp-region h1,.ds-cp-region h2{font-weight:900;font-size:clamp(1.4rem,5vh,3rem);margin:0 0 .3em;line-height:1.1}.ds-cp-region h3{font-weight:800;margin:0 0 .25em}.ds-cp-region p{margin:0 0 .4em}.ds-cp-region img{max-width:100%;max-height:38vh;border-radius:10px;margin:.3em auto;display:block;object-fit:contain}.ds-cp-region ul,.ds-cp-region ol{display:inline-block;text-align:right;margin:.2em 0;padding-inline-start:1.1em}"})]})}if(n==="color")return e.jsx("div",{className:"w-full h-full",style:{background:c||`linear-gradient(135deg, ${l}, ${r})`},children:e.jsx("div",{className:`w-full h-full flex ${o} p-[5%]`,children:e.jsxs("div",{className:f,children:[a.title&&e.jsx("p",{className:`${u} font-black leading-tight`,style:{color:x},children:a.title}),a.text&&e.jsx("p",{className:"text-2xl mt-3 opacity-90",style:{color:x},children:a.text})]})})});if(n==="logo")return e.jsx("div",{className:"w-full h-full",style:{background:c||`radial-gradient(120% 120% at 50% 30%, ${l}22, transparent 70%)`},children:e.jsx("div",{className:`w-full h-full flex ${o} p-[5%]`,children:e.jsxs("div",{className:"flex flex-col items-center gap-6",children:[e.jsx("div",{className:"w-[42%] max-w-[240px] min-w-[120px] aspect-square rounded-[2rem] overflow-hidden ring-1 ring-white/15 shadow-2xl",children:e.jsx(ue,{className:"w-full h-full"})}),a.title&&e.jsx("p",{className:`${u} font-black text-center`,style:{color:a.text_color||"#0f172a"},children:a.title})]})})});if(n==="qr")return e.jsx("div",{className:"w-full h-full",style:{background:c||"#fff"},children:e.jsx("div",{className:`w-full h-full flex ${o} p-[5%]`,children:e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[a.title&&e.jsx("p",{className:`${u} font-black text-center`,style:{color:a.text_color||"#0f172a"},children:a.title}),e.jsx("div",{className:"bg-white p-4 rounded-2xl shadow-xl",children:e.jsx(ae,{value:a.qr_url||"https://eshuv.app",size:220})}),(a.qr_label||a.text)&&e.jsx("p",{className:"text-2xl font-semibold",style:{color:a.text_color||"#33415
165"},children:a.qr_label||a.text})]})})});if(n==="video"){const m=a.youtube_id;return e.jsx("div",{className:"w-full h-full bg-black flex items-center justify-center overflow-hidden",children:m?e.jsx("iframe",{title:"video",className:"w-full h-full",src:`https://www.youtube.com/embed/${m}?autoplay=1&mute=1&controls=0&loop=1&playlist=${m}`,allow:"autoplay",frameBorder:"0"}):a.media_url?e.jsx("video",{src:a.media_url,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"w-full h-full",style:{objectFit:a.image_fit==="contain"?"contain":"cover"}}):e.jsx("p",{className:"text-white/60 text-2xl",children:"אין סרטון"})})}return n==="image"||n==="image_text"?e.jsxs("div",{className:"w-full h-full relative overflow-hidden",style:{background:c||"#0f172a"},children:[a.image&&e.jsx("img",{src:a.image,alt:"",className:"absolute inset-0 w-full h-full",style:{objectFit:a.image_fit==="contain"?"contain":"cover"}}),n==="image_text"&&(a.title||a.text)&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(to top, rgba(0,0,0,${.55+(a.overlay||0)}), transparent 60%)`}}),e.jsxs("div",{className:`absolute inset-0 flex flex-col justify-end p-[5%] ${f}`,children:[a.title&&e.jsx("p",{className:`${u} font-black text-white drop-shadow-lg leading-tight`,children:a.title}),a.text&&e.jsx("p",{className:"text-2xl text-white/90 mt-2",children:a.text})]})]})]}):e.jsx("div",{className:"w-full h-full",style:{background:c||`linear-gradient(135deg, ${l}12, ${r}12)`},children:e.jsx("div",{className:`w-full h-full flex ${o} p-[7%]`,children:e.jsxs("div",{className:`${f} max-w-full`,children:[a.title&&e.jsx("p",{className:`${u} font-black leading-tight`,style:{color:a.text_color||"#0f172a"},children:a.title}),a.text&&e.jsx("p",{className:"text-2xl leading-relaxed mt-2",style:{color:a.text_color||"#334155"},children:a.text})]})})})}function ms({content:t,primary:l,weather:r}){const i=t||{},s=i.accent||l||"#0891b2";if(i.widget==="weather"){const o=r==null?void 0:r.temp;return e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center gap-2 bg-white",style:{color:s},children:[e.jsx("div",{className:"text-6xl",children:"⛅"}),e.jsx("div",{className:"font-black tabular-nums",style:{fontSize:"clamp(1.6rem,7vh,4rem)"},dir:"ltr",children:o!=null?`${o}°`:"—"}),e.jsx("div",{className:"text-slate-500 font-semibold",style:{fontSize:"clamp(.8rem,2.4vh,1.4rem)"},children:i.title||"מזג אוויר"})]})}if(i.widget==="gallery"){const o=(Array.isArray(i.images)?i.images:[]).filter(x=>x&&x.image);if(o.length===0)return e.jsx("div",{className:"w-full h-full grid place-items-center bg-white text-slate-400",style:{fontSize:"clamp(.8rem,2.4vh,1.2rem)"},children:i.empty||"אין תמונות"});const f=o.length,u=f===1?1:f<=4?2:3;return e.jsxs("div",{className:"relative w-full h-full bg-slate-900 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 grid gap-0.5",style:{gridTemplateColumns:`repeat(${u}, 1fr)`,gridAutoRows:"1fr"},children:o.slice(0,u*3).map((x,c)=>e.jsx("div",{className:"relative overflow-hidden bg-slate-800",children:e.jsx("img",{src:x.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"})},c))}),i.title&&e.jsxs("div",{className:"absolute bottom-0 inset-x-0 px-3 py-2 text-white font-black flex items-center gap-2",style:{background:`linear-gradient(to top, ${s}, transparent)`,fontSize:"clamp(.9rem,2.8vh,1.5rem)"},children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-white/80"})," ",i.title]})]})}const a=Array.isArray(i.items)?i.items:[],n=a.some(o=>o&&o.image);return e.jsxs("div",{className:"w-full h-full flex flex-col bg-white overflow-hidden",children:[e.jsxs("div",{className:"flex-none px-3 py-2 text-white font-black flex items-center gap-2",style:{background:s,fontSize:"clamp(.9rem,2.8vh,1.5rem)"},children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-white/80"})," ",i.title]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-hidden p-2.5 flex flex-col gap-1.5",children:a.length===0?e.jsx("div",{className:"flex-1 grid place-items-center text-slate-400",style:{fontSize:"clamp(.8rem,2.4vh,1.2rem)"},children:i.empty||"אין תוכן"}):a.map((o,f)=>e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-slate-100 last:border-0 pb-1.5 flex-none",children:[n&&(o.image?e.jsx("img",{src:o.image,alt:"",className:"w-12 h-12 rounded-lg object-cover flex-none bg-slate-100",style:{width:"clamp(2.2rem,6vh,3.5rem)",height:"clamp(2.2rem,6vh,3.5rem)"}}):e.jsx("span",{className:"rounded-lg flex-none",style:{width:"clamp(2.2rem,6vh,3.5rem)",height:"clamp(2.2rem,6vh,3.5rem)",background:`${s}22`}})),!n&&e.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-none",style:{background:s}}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-bold text-slate-800 leading-tight",style:{fontSize:"clamp(.85rem,2.6vh,1.4rem)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:o.title}),o.meta&&e.jsx("div",{className:"text-slate-400 truncate",style:{fontSize:"clamp(.7rem,1.9vh,1rem)"},children:o.meta})]})]},f))})]})}function us({region:t,boardProps:l}){const r=Array.isArray(t.contents)?t.contents:[],[i,s]=b.useState(0),a=t.rotate&&r.length>1;b.useEffect(()=>{if(!a)return;const c=Math.max(3,Number(t.interval_seconds)||8)*1e3,m=setInterval(()=>s(h=>(h+1)%r.length),c);return()=>clearInterval(m)},[a,t.interval_seconds,r.length]);const n=t.appearance||{},o=r.length?r[Math.min(i,r.length-1)]:null,f=t.transition==="slide"?"ds-region-slide":t.transition==="appear"?"ds-region-appear":t.transition==="none"?"":"ds-region-fade",u=c=>c?c.kind==="free_content"?e.jsx(fs,{content:c,primary:l.primary,secondary:l.secondary,position:t.position,durationSec:Math.max(3,Number(t.interval_seconds)||8)}):c.kind==="widget"?e.jsx(ms,{content:c,primary:l.primary,secondary:l.secondary,weather:l.weather}):e.jsx(me.Provider,{value:!0,children:e.jsx(mt,{children:ze({slide:c,...l})})}):null,x={};return n.bg_image?(x.backgroundImage=`url(${n.bg_image})`,x.backgroundSize="cover",x.backgroundPosition="center"):n.bg_color&&(x.background=n.bg_color),e.jsxs("div",{className:"relative w-full h-full overflow-hidden border-[6px] border-white shadow-[0_6px_28px_rgba(2,6,23,0.14)]",style:{...x,borderRadius:n.rounded!==!1?22:0},children:[o?e.jsx("div",{className:`w-full h-full ${f}`,children:u(o)},i):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center gap-2 text-center p-6",style:{background:"linear-gradient(135deg,#f1f5f9,#e2e8f0)"},children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-white/70 flex items-center justify-center",children:e.jsx(at,{className:"w-6 h-6 text-slate-400"})}),e.jsx("p",{className:"text-slate-400 text-lg font-medium",children:t.name})]}),n.bg_image&&n.overlay?e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:`rgba(0,0,0,${n.overlay})`,borderRadius:n.rounded!==!1?18:0}}):null]})}function hs({slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n}
16){const o=ke(t.layout)||ke("full"),f=Array.isArray(t.regions)?t.regions:[],u=Object.fromEntries(f.map(h=>[h.id,h])),x={design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n},c=l||{},m=c.show_time!==!1||c.show_date!==!1||c.show_weather!==!1&&!!i||!!c.logo_url;return e.jsxs("div",{className:"w-full h-full flex flex-col",style:{background:`linear-gradient(135deg, ${s}, ${a})`},children:[m&&e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx("div",{className:`flex-1 min-h-0 px-[1.2%] pb-[1.2%] ${m?"pt-[0.6%]":"pt-[1.2%]"}`,children:e.jsx("div",{className:"w-full h-full grid gap-[1.2%]",style:{gridTemplateColumns:o.grid.columns,gridTemplateRows:o.grid.rows,gridTemplateAreas:o.grid.areas},children:o.regions.map(h=>{const d=u[h.id]||{id:h.id,name:h.name,contents:[]};return e.jsx("div",{style:{gridArea:h.id},className:"min-w-0 min-h-0",children:e.jsx(us,{region:d,boardProps:x})},h.id)})})}),e.jsx("style",{children:`
17        @keyframes dsRegionFade { from { opacity: 0; } to { opacity: 1; } }
18        @keyframes dsRegionSlide { from { opacity: 0; transform: translateX(3%); } to { opacity: 1; transform: translateX(0); } }
19        @keyframes dsRegionAppear { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }
20        .ds-region-fade { animation: dsRegionFade .6s ease both; }
21        .ds-region-slide { animation: dsRegionSlide .55s cubic-bezier(.4,0,.2,1) both; }
22        .ds-region-appear { animation: dsRegionAppear .6s ease both; }
23      `})]})}function gs(){const{kibbutzId:t,channelId:l}=Nt(),[r]=yt(),i=r.get("preview")==="1",[s,a]=b.useState("login"),[n,o]=b.useState(null),[f,u]=b.useState(""),[x,c]=b.useState(!1),[m,h]=b.useState(""),[d,g]=b.useState([]),[v,p]=b.useState(0),[j,k]=b.useState(!1),[I,P]=b.useState(null),[B,E]=b.useState(!1),[T,q]=b.useState(!1),[L,y]=b.useState(()=>new Date),[w,_]=b.useState(null),[D,V]=b.useState(1),J=b.useRef(typeof localStorage<"u"?localStorage.getItem(be(l)):null),$=b.useRef(null),F=b.useRef(null);b.useEffect(()=>{he.entities.DigitalScreenChannelPublic.filter({kibbutz_id:t,id:l}).then(N=>{N!=null&&N[0]&&(o(N[0]),i&&a("playing"))}).catch(()=>{})},[t,l,i]),b.useEffect(()=>{const N=setInterval(()=>y(new Date),1e3);return()=>clearInterval(N)},[]),b.useEffect(()=>{const N=()=>{const S=window.innerWidth||1920,M=window.innerHeight||1080;V(Math.min(S/1920,M/1080))};return N(),window.addEventListener("resize",N),window.addEventListener("orientationchange",N),()=>{window.removeEventListener("resize",N),window.removeEventListener("orientationchange",N)}},[]);const ee=b.useCallback(async N=>{var S,M;c(!0),h("");try{const R=await he.functions.invoke("digitalScreenLogin",{community_id:t,channel_id:l,password:N,device_token:J.current||void 0}),C=R==null?void 0:R.data;if(C!=null&&C.success){J.current=C.device_token;try{localStorage.setItem(be(l),C.device_token)}catch{}o(C.design),a("playing");try{(M=(S=document.documentElement).requestFullscreen)==null||M.call(S)}catch{}}else h("סיסמה שגויה")}catch(R){h((R==null?void 0:R.message)||"סיסמה שגויה")}finally{c(!1)}},[t,l]),Y=b.useCallback(async()=>{try{const N=await he.functions.invoke("digitalScreenPlaylist",{community_id:t,channel_id:l,device_token:i?void 0:J.current||void 0,preview:i||void 0}),S=(N==null?void 0:N.data)||{};if(q(!0),i&&S.design&&o(M=>({...M||{},...S.design})),S.emergency?P(S.emergency):(P(null),E(!!S.paused),g(M=>{const R=S.slides||[];try{localStorage.setItem(Ye(l),JSON.stringify(R))}catch{}return JSON.stringify(M)!==JSON.stringify(R)?(p(0),R):M})),S.command==="refresh"&&window.location.reload(),S.command==="disconnect"){try{localStorage.removeItem(be(l))}catch{}window.location.reload()}if(typeof S.command=="string"&&S.command.startsWith("switch_channel:")){const M=S.command.split(":")[1];M&&(window.location.href=`/digital-screen/${t}/${M}`)}return S.command==="next"&&p(M=>d.length?(M+1)%d.length:0),S.poll_interval||20}catch{if(!d.length)try{const N=JSON.parse(localStorage.getItem(Ye(l))||"[]");N.length&&g(N)}catch{}return 15}},[t,l,d.length]);b.useEffect(()=>{if(s!=="playing")return;let N=!1;const S=async()=>{const M=await Y();N||($.current=setTimeout(S,(M||20)*1e3))};return S(),()=>{N=!0,clearTimeout($.current)}},[s,Y]),b.useEffect(()=>{if(s!=="playing"||!(n!=null&&n.show_weather)||(n==null?void 0:n.lat)==null||(n==null?void 0:n.lng)==null)return;let N=!1;const S=async()=>{try{const C=await(await fetch(`https://api.open-meteo.com/v1/forecast?latitude=${n.lat}&longitude=${n.lng}&current=temperature_2m,weather_code,wind_speed_10m,wind_direction_10m`)).json();!N&&(C!=null&&C.current)&&_({temp:Math.round(C.current.temperature_2m),code:C.current.weather_code,windSpeed:Math.round(C.current.wind_speed_10m),windDir:C.current.wind_direction_10m})}catch{}};S();const M=setInterval(S,900*1e3);return()=>{N=!0,clearInterval(M)}},[s,n]),b.useEffect(()=>{if(s!=="playing"||i)return;k(!0);const N=setTimeout(()=>k(!1),1e4);return()=>clearTimeout(N)},[s,i]);const O=d[v],W=b.useCallback(()=>p(N=>d.length?(N+1)%d.length:0),[d.length]);b.useEffect(()=>{if(!(s!=="playing"||I||!O))return clearTimeout(F.current),F.current=setTimeout(W,(O.duration||10)*1e3),()=>clearTimeout(F.current)},[s,I,O,v,W]);const z=(n==null?void 0:n.primary_color)||"#2563eb",te=(n==null?void 0:n.secondary_color)||"#06b6d4";return s!=="playing"?i?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-black",children:e.jsx("div",{className:"w-8 h-8 border-4 border-white/20 border-t-white rounded-full animate-spin"})}):e.jsxs("div",{dir:"rtl",className:"relative min-h-screen flex items-center justify-center overflow-hidden text-white p-6",style:{background:"#0b1220"},children:[e.jsx("div",{className:"absolute inset-0 ds-login-bg",style:{backgroundImage:`linear-gradient(130deg, ${z}, ${te}, ${z})`}}),e.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(circle at 25% 20%, rgba(255,255,255,0.10), transparent 45%), radial-gradient(circle at 80% 80%, rgba(0,0,0,0.35), transparent 55%)"}}),e.jsx("div",{className:"absolute -top-24 -right-24 w-96 h-96 rounded-full blur-3xl op
23acity-30",style:{background:te}}),e.jsx("div",{className:"absolute -bottom-24 -left-24 w-96 h-96 rounded-full blur-3xl opacity-30",style:{background:z}}),e.jsxs("div",{className:"relative z-10 w-full max-w-xl",children:[e.jsxs("div",{className:"rounded-[2.2rem] bg-white/12 backdrop-blur-2xl border border-white/25 shadow-2xl px-12 py-14 text-center ds-float-in",children:[e.jsx("div",{className:"mx-auto mb-8 w-44 h-44 rounded-[2rem] overflow-hidden shadow-2xl ring-1 ring-white/25",children:e.jsx(ue,{className:"w-full h-full"})}),e.jsx("h1",{className:"text-7xl font-black tracking-tight leading-none drop-shadow-lg",children:(n==null?void 0:n.community_name)||(n==null?void 0:n.name)||"מסך דיגיטלי"}),e.jsxs("div",{className:"mt-5 inline-flex items-center gap-3 px-6 py-2.5 rounded-full bg-white/15 border border-white/25 shadow-lg",children:[e.jsxs("span",{className:"relative flex h-3.5 w-3.5",children:[e.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75 animate-ping"}),e.jsx("span",{className:"relative inline-flex rounded-full h-3.5 w-3.5 bg-emerald-400"})]}),e.jsx("span",{className:"text-2xl font-black text-white",children:"ערוץ הקיבוץ מעודכן בלייב"})]}),(n==null?void 0:n.location)&&e.jsx("p",{className:"text-white/55 text-base mt-4",children:n.location}),e.jsxs("form",{onSubmit:N=>{N.preventDefault(),f&&ee(f)},className:"mt-10",children:[e.jsxs("div",{className:"relative mb-3",children:[e.jsx(Pt,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-5 h-5 text-white/50"}),e.jsx("input",{type:"password",value:f,onChange:N=>u(N.target.value),placeholder:"סיסמת המסך",dir:"ltr",autoFocus:!0,className:"w-full h-14 rounded-2xl bg-white/15 border border-white/25 pr-12 pl-4 text-center text-lg tracking-widest placeholder:tracking-normal placeholder:text-white/40 focus:outline-none focus:border-white/60 focus:bg-white/20 transition-all"})]}),m&&e.jsx("p",{className:"text-red-200 bg-red-500/20 rounded-xl py-2 text-sm mb-3",children:m}),e.jsx("button",{type:"submit",disabled:x||!f,className:"w-full h-14 rounded-2xl text-lg font-black shadow-xl bg-white text-slate-900 hover:brightness-95 active:scale-[0.99] transition-all disabled:opacity-50",children:x?"מתחבר…":"התחברות למסך"})]})]}),e.jsx("p",{className:"text-center text-white/55 text-sm tracking-wide mt-8",children:'מופעל ע"י חברת יישובטק בע"מ'})]}),e.jsx("style",{children:"@keyframes dsLoginBg { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} } .ds-login-bg { background-size: 220% 220%; animation: dsLoginBg 18s ease infinite; opacity: 0.55; }"})]}):e.jsxs("div",{dir:"rtl",className:"fixed inset-0 bg-black text-white overflow-hidden select-none",style:{cursor:"none"},children:[e.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",width:"1920px",height:"1080px",transform:`translate(-50%, -50%) scale(${D})`,transformOrigin:"center center"},children:[j&&e.jsx("div",{className:"absolute inset-0 z-40",children:e.jsx(Xe,{})}),e.jsx("div",{className:"absolute inset-0",children:e.jsx("div",{className:"absolute inset-0 ds-slide-in",children:I?e.jsx(qt,{emergency:I}):O?ze({slide:O,design:n,now:L,weather:w,primary:z,secondary:te,kibbutzId:t,onVideoEnd:W}):T?e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-center gap-5 px-10 text-white/70",children:[(n==null?void 0:n.logo_url)&&e.jsx("img",{src:n.logo_url,alt:"",className:"h-32 object-contain opacity-40"}),e.jsx("p",{className:"text-3xl font-bold",children:B?"הערוץ מושהה":"אין תוכן פעיל להצגה"}),e.jsx("p",{className:"text-lg text-white/45 max-w-2xl leading-relaxed",children:B?"הפעילו את הערוץ בממשק ניהול המסך הדיגיטלי כדי להתחיל בהצגה.":"הוסיפו פריטי תוכן לערוץ, וודאו שהם פעילים ובתוך טווח התאריכים/השעות שהוגדר."})]}):e.jsx(Xe,{})},I?"emg":O?`${O.kind}-${v}`:"empty")}),!I&&O&&!ft.includes(O.kind)&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute top-0 inset-x-0 z-10",children:e.jsx(A,{design:n,now:L,weather:w,primary:z,secondary:te})}),(n==null?void 0:n.ticker_text)&&e.jsx("div",{className:"absolute bottom-0 inset-x-0 z-10 bg-black/60 overflow-hidden whitespace-nowrap py-1.5",children:e.jsx("div",{className:"inline-block ds-ticker text-lg font-medium px-4",children:n.ticker_text})})]})]}),e.jsx("style",{children:`
24        @keyframes dsTicker { from { transform: translateX(-100%); } to { transform: translateX(100vw); } }
25        .ds-ticker { animation: dsTicker 22s linear infinite; }
26        @keyframes dsWave {
27          0%   { opacity: 0; clip-path: inset(0 0 0 100%); transform: scale(1.03); }
28          55%  { opacity: 1; }
29          100% { opacity: 1; clip-path: inset(0 0 0 0%); transform: scale(1); }
30        }
31        .ds-slide-in { animation: dsWave 0.9s cubic-bezier(.22,1,.36,1) both; will-change: clip-path, opacity, transform; }
32        @keyframes dsTitleLine { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
33        .ds-title-line { transform-origin: right center; animation: dsTitleLine 0.9s cubic-bezier(.22,1,.36,1) 0.15s both; }
34        @keyframes dsTitleH { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
35        .ds-title-h { animation: dsTitleH 0.7s cubic-bezier(.22,1,.36,1) both; }
36        .ds-title-kicker { animation: dsTitleH 0.7s cubic-bezier(.22,1,.36,1) both; }
37        @keyframes dsMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
38        .ds-marquee { animation: dsMarquee linear infinite; }
39        @keyframes dsSplashPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.75; transform: scale(0.97); } }
40        .ds-splash-pulse { animation: dsSplashPulse 2.4s ease-in-out infinite; }
41        @keyframes dsCaret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
42        .ds-caret { display: inline-block; margin-inline-start: 3px; font-weight: 400; animation: dsCaret 0.85s step-end infinite; }
43        @keyframes dsTick { to { transform: rotate(360deg); } }
44        .ds-clock-sec { transform-origin: 50px 50px; animation: dsTick 60s steps(60) infinite; }
45        .ds-clock-min { transform-origin: 50px 50px; animation: dsTick 3600s linear infinite; }
46        @keyframes dsPulseOpen { 0%,100% { box-shadow: 0 0 0 0 rgba(21,128,61,0.35); } 70% { box-shadow: 0 0 0 16px rgba(21,128,61,0); } }
47        .ds-pulse-open { animation: dsPulseOpen 2.1s ease-out infinite; }
48        @keyframes dsFloatIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
49        .ds-float-in { animation: dsFloatIn 0.8s cubic-bezier(.22,1,.36,1) both; }
50        @keyframes dsKen { 0% { transform: scale(1) translate(0,0); } 100% { transform: scale(1.12) translate(-1.5%, -1.5%); } }
51        .ds-ken { animation: dsKen 12s ease-out both; }
52        @media (prefers-reduced-motion: reduce) { .ds-slide-in, .ds-title-line, .ds-title-h, .ds-title-kicker, .ds-marquee, .ds-splash-pulse, .ds-caret, .ds-clock-sec, .ds-clock-min, .ds-pulse-open, .ds-float-in, .ds-ken { animation: none !important; } }
53      `})]})}function X({text:t,speed:l=45,startDelay:r=0,caret:i=!0,caretColor:s}){const[a,n]=b.useState(0),o=t||"";b.useEffect(()=>{if(n(0),!o)return;let u=0,x;const c=setTimeout(()=>{x=setInterval(()=>{u+=1,n(u),u>=o.length&&clearInterval(x)},l)},r);return()=>{clearTimeout(c),clearInterval(x)}},[o,l,r]);const f=a>=o.length;return e.jsxs(e.Fragment,{children:[o.slice(0,a),i&&!f&&e.jsx("span",{className:"ds-caret",style:s?{color:s}:void 0,children:"▍"})]})}function ut({size:t=240,color:l="#0b2f63",accent:r="#38b977",className:i="",style:s}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",className:i,style:s,children:[e.jsx("circle",{cx:"50",cy:"50",r:"47",fill:"rgba(255,255,255,0.7)",stroke:l,strokeOpacity:"0.18",strokeWidth:"3"}),Array.from({length:12}).map((a,n)=>e.jsx("line",{x1:"50",y1:"7",x2:"50",y2:n%3===0?15:12,stroke:l,strokeOpacity:n%3===0?.5:.28,strokeWidth:n%3===0?3:2,transform:`rotate(${n*30} 50 50)`},n)),e.jsx("line",{className:"ds-clock-min",x1:"50",y1:"52",x2:"50",y2:"27",stroke:l,strokeWidth:"4",strokeLinecap:"round"}),e.jsx("line",{className:"ds-clock-sec",x1:"50",y1:"56",x2:"50",y2:"18",stroke:r,strokeWidth:"2",strokeLinecap:"round"}),e.jsx("circle",{cx:"50",cy:"50",r:"3.6",fill:l})]})}function ps({slide:t,primary:l,secondary:r,onVideoEnd:i}){var s,a,n,o;
53if(t.kind==="video"){const f=(((s=t.title)==null?void 0:s.length)||0)*55;return e.jsxs("div",{className:"relative w-full h-full flex items-end gap-12 px-16 pt-32 pb-8 overflow-hidden",dir:"rtl",style:{background:"radial-gradient(120% 130% at 78% 12%, #274d73 0%, #163150 55%, #0d2036 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl opacity-30 ds-nb-a",style:{background:l}}),e.jsx("div",{className:"absolute -bottom-52 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-25 ds-nb-b",style:{background:r}})]}),e.jsxs("div",{className:"relative z-10 w-[34%] flex-shrink-0 text-white self-center",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-lg font-black mb-6 text-white",style:{background:l,boxShadow:`0 12px 24px -10px ${l}`},children:[e.jsx(Lt,{className:"w-5 h-5"})," סרטון"]}),t.title&&e.jsx("h2",{className:"text-6xl font-black leading-tight mb-6 drop-shadow-lg",style:{minHeight:"1.1em"},children:e.jsx(X,{text:t.title,speed:55,caretColor:r})}),t.text&&e.jsx("p",{className:"text-3xl leading-relaxed text-white/85 line-clamp-[9]",children:e.jsx(X,{text:t.text,speed:26,startDelay:f+400,caret:!1})})]}),e.jsx("div",{className:"relative z-10 flex-1 flex items-end justify-center min-w-0",style:{perspective:"2200px"},children:e.jsxs("div",{className:"ds-tv relative flex flex-col items-center",style:{width:"920px"},children:[e.jsxs("div",{className:"relative w-full rounded-[1.6rem] p-3",style:{background:"linear-gradient(145deg, #223047, #0b1120)",boxShadow:`0 60px 120px -32px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.05), 0 30px 80px -30px ${l}`},children:[e.jsxs("div",{className:"relative rounded-[1.05rem] overflow-hidden bg-black",style:{aspectRatio:"16/9"},children:[e.jsx("video",{src:t.media_url,autoPlay:!0,muted:t.mute!==!1,loop:!1,onEnded:i,onError:i,className:"w-full h-full object-cover"}),e.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(115deg, rgba(255,255,255,0.14), transparent 32%)"}}),e.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-[1.05rem] ring-1 ring-inset ring-white/10"})]}),e.jsx("div",{className:"absolute bottom-1.5 left-1/2 -translate-x-1/2 w-2 h-2 rounded-full",style:{background:r,boxShadow:`0 0 10px 2px ${r}`}})]}),e.jsx("div",{className:"relative",style:{width:"7%",height:"37px",background:"linear-gradient(180deg, #2b3546 0%, #161d2b 100%)",boxShadow:"inset 0 -6px 10px rgba(0,0,0,0.45)"}}),e.jsx("div",{className:"relative",style:{width:"38%",height:"28px",borderRadius:"50%",background:"linear-gradient(180deg, #4b586e 0%, #212a3a 70%, #10151f 100%)",boxShadow:"0 14px 26px -10px rgba(0,0,0,0.7), inset 0 2px 3px rgba(255,255,255,0.14)"}}),e.jsx("div",{className:"absolute -bottom-6 w-[46%] h-8 rounded-[50%] blur-xl",style:{background:"rgba(0,0,0,0.55)"}})]})}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}@keyframes dsTvFloat{0%,100%{transform:rotateY(-18deg) rotateX(5deg) translateY(0)}50%{transform:rotateY(-18deg) rotateX(5deg) translateY(-10px)}}.ds-tv{transform-style:preserve-3d;transform:rotateY(-18deg) rotateX(5deg);animation:dsTvFloat 7s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.ds-tv{animation:none}}"})]})}if(t.kind==="image"){const f=(((a=t.title)==null?void 0:a.length)||0)*55;return e.jsxs("div",{className:"relative w-full h-full overflow-hidden bg-black",dir:"rtl",children:[e.jsx("div",{className:"absolute inset-0 bg-center bg-cover bg-no-repeat ds-ken",style:{backgroundImage:`url(${t.image})`}}),(t.title||t.text)&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute inset-x-0 bottom-0 h-2/3",style:{background:"linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 45%, transparent)"}}),e.jsxs("div",{className:"absolute bottom-0 inset-x-0 p-16 text-white ds-float-in",children:[e.jsx("span",{className:"block h-1.5 w-28 rounded-full mb-6",style:{background:`linear-gradient(90deg, ${l}, ${r})`}}),t.title&&e.jsx("h2",{className:"text-7xl font-black leading-tight mb-4 line-clamp-2 drop-shadow-lg",style:{minHeight:"1.1em"},children:e.jsx(X,{text:t.title,speed:55,caretColor:r})}),t.text&&e.jsx("p",{className:"text-3xl leading-relaxed text-white/90 line-clamp-3 max-w-5xl drop-shadow",children:e.jsx(X,{text:t.text,speed:24,startDelay:f+400,caret:!1})})]})]})]})}if(t.kind==="text"){const f=(((n=t.title)==null?void 0:n.length)||0)*55;return e.jsxs("div",{className:"relative w-full h-full flex flex-col items-center justify-center text-center px-16 overflow-hidden text-white",style:{background:`linear-gradient(135deg, ${l}, ${r})`},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45v
53w] rounded-full blur-3xl opacity-20 ds-nb-a",style:{background:"#ffffff"}}),e.jsx("div",{className:"absolute -bottom-52 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-10 ds-nb-b",style:{background:"#000000"}})]}),t.title&&e.jsx("h2",{className:"relative z-10 text-7xl font-black mb-6 leading-tight drop-shadow-lg",style:{minHeight:"1.1em"},children:e.jsx(X,{text:t.title,speed:55})}),t.text&&e.jsx("p",{className:"relative z-10 text-4xl max-w-5xl leading-relaxed text-white/90",children:e.jsx(X,{text:t.text,speed:26,startDelay:f+400,caret:!1})}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}"})]})}if(t.kind==="app_promo"){const f=(((o=t.title)==null?void 0:o.length)||0)*55;return e.jsxs("div",{className:"relative w-full h-full flex flex-col items-center justify-center text-center px-16 overflow-hidden text-white",style:{background:`linear-gradient(135deg, ${l}, ${r})`},children:[e.jsx("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
53acity-20 ds-nb-a",style:{background:"#ffffff"}})}),t.image?e.jsx("img",{src:t.image,alt:"",className:"relative z-10 max-h-[486px] object-contain mb-8 ds-float-in"}):e.jsx(et,{className:"relative z-10 w-40 h-40 mb-8 opacity-80 ds-float-in"}),e.jsx("h2",{className:"relative z-10 text-7xl font-black mb-4 drop-shadow-lg",style:{minHeight:"1.1em"},children:e.jsx(X,{text:t.title,speed:55})}),t.text&&e.jsx("p",{className:"relative z-10 text-3xl max-w-4xl text-white/90",children:e.jsx(X,{text:t.text,speed:26,startDelay:f+400,caret:!1})}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}"})]})}return e.jsxs("div",{className:"w-full h-full flex items-stretch bg-slate-900",children:[t.image&&e.jsx("div",{className:"w-1/2 bg-center bg-cover",style:{backgroundImage:`url(${t.image})`}}),e.jsxs("div",{className:`${t.image?"w-1/2":"w-full"} flex flex-col justify-center px-16 text-right`,style:{background:`linear-gradient(135deg, ${l}22, transparent)`},children:[t.source_module&&e.jsx("span",{className:"text-xl font-bold mb-4 self-start px-4 py-1 rounded-full",style:{background:r},children:$s[t.source_module]||""}),e.jsx("h2",{className:"text-5xl font-extrabold mb-5 leading-tight",children:t.title}),t.subtitle&&e.jsx("p",{className:"text-2xl text-white/70 mb-3",children:t.subtitle}),t.text&&e.jsx("p",{className:"text-2xl text-white/85 leading-relaxed line-clamp-6",children:t.text})]})]})}function Ue({src:t,source:l,youtube_id:r,mute:i,autoplay:s,loop:a}){if(l==="youtube"&&r){const n=new URLSearchParams({autoplay:s!==!1?"1":"0",mute:i!==!1?"1":"0",controls:"0",loop:a?"1":"0",playlist:r,modestbranding:"1",rel:"0",playsinline:"1"});return e.jsx("iframe",{src:`https://www.youtube-nocookie.com/embed/${r}?${n.toString()}`,title:"video",className:"absolute inset-0 w-full h-full border-0",allow:"autoplay; encrypted-media; picture-in-picture"})}return t?e.jsx("video",{src:t,autoPlay:s!==!1,muted:i!==!1,loop:a!==!1,playsInline:!0,className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-slate-900 text-white/30",children:e.jsx(et,{className:"w-16 h-16"})})}function bs({children:t,primary:l,secondary:r,className:i=""}){return e.jsxs("div",{className:`ds-vid-float relative ${i}`,style:{transformStyle:"preserve-3d",transform:"rotateY(-16deg) rotateX(6deg)"},children:[e.jsxs("div",{className:"relative w-full rounded-[1.3rem] p-2.5",style:{background:"linear-gradient(145deg,#223047,#0b1120)",boxShadow:`0 60px 120px -34px rgba(0,0,0,0.9), 0 30px 80px -30px ${l}`},children:[e.jsxs("div",{className:"relative rounded-[0.85rem] overflow-hidden bg-black",style:{aspectRatio:"16/9"},children:[t,e.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(115deg, rgba(255,255,255,0.14), transparent 32%)"}})]}),e.jsx("div",{className:"absolute bottom-1 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full",style:{background:r,boxShadow:`0 0 8px 2px ${r}`}})]}),e.jsx("div",{className:"relative mx-auto",style:{width:"112%",marginLeft:"-6%",height:"14px",borderRadius:"0 0 12px 12px",background:"linear-gradient(180deg,#3a4557,#111726)",boxShadow:"0 20px 30px -14px rgba(0,0,0,0.7)"}})]})}function vs({children:t,primary:l,className:r=""}){return e.jsx("div",{className:`relative ${r}`,style:{height:"100%",transformStyle:"preserve-3d",transform:"rotateY(14deg) rotateX(4deg)"},children:e.jsxs("div",{className:"relative h-full bg-slate-900 rounded-[2rem] p-2.5 ring-1 ring-black/10 mx-auto",style:{aspectRatio:"1/2",boxShadow:`0 55px 110px -30px rgba(0,0,0,0.6), 0 30px 70px -30px ${l}`},children:[e.jsx("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 w-16 h-4 bg-slate-900 rounded-b-xl z-10"}),e.jsxs("div",{className:"relative w-full h-full rounded-[1.6rem] overflow-hidden bg-black",children:[t,e.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(115deg, rgba(255,255,255,0.12), transparent 30%)"}})]})]})})}function js({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){var p;const n=t.view==="two",o=t.layout==="phone_left",f=t.text_speed||45,u=(((p=t.title)==null?void 0:p.length)||0)*f+400,x={src:t.media_url,source:t.source,youtube_id:t.youtube_id,mute:t.mute,autoplay:t.autoplay,loop:t.loop},c=t.video2||{},m={src:c.media_url,source:c.source,youtube_id:c.youtube_id,mute:c.mute,autoplay:c.autoplay,loop:c.loop},h=t.aspect==="9:16",d=t.bg==="dark",g=e.jsx(bs,{primary:s,secondary:a,className:"w-full",children:e.jsx(Ue,{...x})}),v=j=>e.jsx(vs,{primary:s,children:e.jsx(Ue,{...j})});return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden",dir:"rtl",children:[e.jsx("div",{className:"absolute inset-0 z-0 ds-vid-bg",style:{background:d?"linear-gradient(130deg,#0b1220,#15233b,#0b1220)":`linear-gradient(130deg, ${s}, ${a}, ${s})`}}),e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[46vw] h-[46vw] rounded-full blur-3xl op
53acity-30 ds-vid-a",style:{background:a}}),e.jsx("div",{className:"absolute -bottom-52 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-25 ds-vid-b",style:{background:s}}),e.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(circle at 28% 30%, rgba(255,255,255,0.10), transparent 45%), radial-gradient(circle at 82% 82%, rgba(0,0,0,0.35), transparent 55%)"}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 grid grid-cols-12 gap-6 px-14 pb-10 pt-2 items-center",children:[e.jsxs("div",{className:"col-span-4 min-h-0 text-white",children:[e.jsx("span",{className:"block h-2 w-28 rounded-full mb-6",style:{background:"linear-gradient(90deg, rgba(255,255,255,.9), rgba(255,255,255,.2))"}}),t.title&&e.jsx("h1",{className:"text-7xl font-black leading-tight drop-shadow-lg",style:{minHeight:"1.1em"},children:e.jsx(X,{text:t.title,speed:f})}),t.text&&e.jsx("p",{className:"text-3xl leading-relaxed text-white/90 mt-6 drop-shadow line-clamp-[8]",children:e.jsx(X,{text:t.text,speed:Math.max(18,f-18),startDelay:u,caret:!1})})]}),e.jsx("div",{className:"col-span-8 min-h-0 h-full flex items-center justify-center gap-10",style:{perspective:"2200px"},children:n?e.jsx(e.Fragment,{children:o?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-[78%] flex items-center",children:v(m)}),e.jsx("div",{className:"w-[58%]",children:g})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-[58%]",children:g}),e.jsx("div",{className:"h-[78%] flex items-center",children:v(m)})]})}):h?e.jsx("div",{className:"h-[86%] flex items-center",children:v(x)}):e.jsx("div",{className:"w-[82%]",children:g})})]}),e.jsx("style",{children:`
54        @keyframes dsVidBg { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
55        .ds-vid-bg { background-size: 240% 240%; animation: dsVidBg 20s ease infinite; }
56        @keyframes dsVidA { 0%,100%{transform:translate(0,0)} 50%{transform:translate(4vw,3vh)} }
57        @keyframes dsVidB { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-5vw,-3vh)} }
58        .ds-vid-a{animation:dsVidA 26s ease-in-out infinite}.ds-vid-b{animation:dsVidB 32s ease-in-out infinite}
59        @keyframes dsVidFloat { 0%,100%{transform:translateY(0) rotateY(-16deg) rotateX(6deg)} 50%{transform:translateY(-10px) rotateY(-16deg) rotateX(6deg)} }
60        .ds-vid-float{animation:dsVidFloat 7s ease-in-out infinite}
61        @media (prefers-reduced-motion:reduce){.ds-vid-bg,.ds-vid-a,.ds-vid-b,.ds-vid-float{animation:none!important}}
62      `})]})}function ne({b:t,textPos:l,overlay:r,rounded:i,showTitle:s,showDesc:a,primary:n}){const o={br:"items-end justify-start text-right",tr:"items-start justify-start text-right",center:"items-center justify-center text-center",bl:"items-end justify-end text-left"}[l]||"items-end justify-start text-right";return e.jsxs("div",{className:`relative w-full h-full overflow-hidden ${i?"rounded-3xl":""}`,style:{boxShadow:"0 20px 44px -22px rgba(0,0,0,.5)"},children:[t.image?e.jsx("img",{src:t.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(135deg, ${n}, #0b2f63)`}}),e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(0deg, rgba(0,0,0,${Math.min(.92,r+.28)}), rgba(0,0,0,${r*.3}) 55%, transparent)`}}),t.label&&e.jsx("span",{className:"absolute top-3 right-3 z-10 px-3 py-1 rounded-full text-sm font-black text-white",style:{background:n},children:t.label}),(s&&t.title||a&&t.text)&&e.jsxs("div",{className:`absolute inset-0 z-10 flex flex-col ${o} p-6 text-white`,children:[s&&t.title&&e.jsx("h3",{className:"text-3xl font-black leading-tight drop-shadow line-clamp-2",children:t.title}),a&&t.text&&e.jsx("p",{className:"text-lg text-white/90 mt-1 drop-shadow line-clamp-2",children:t.text})]})]})}function ws({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=Array.isArray(t.banners)?t.banners:[],o=t.layout||"featured",f={textPos:t.text_position,overlay:t.overlay??.42,rounded:t.rounded!==!1,showTitle:t.show_banner_titles!==!1,showDesc:t.show_banner_descs!==!1,primary:s},u=G.useMemo(()=>
62{if(o!=="carousel")return[];const h=4,d=[];for(let g=0;g<n.length;g+=h)d.push(n.slice(g,g+h));return d.length?d:[[]]},[o,n]),[x,c]=b.useState(0);b.useEffect(()=>{if(o!=="carousel"||u.length<2||t.autoplay===!1)return;const h=setInterval(()=>c(d=>(d+1)%u.length),Math.max(4e3,(t.transition_ms||700)+4500));return()=>clearInterval(h)},[o,u.length,t.autoplay,t.transition_ms]);const m=()=>{if(!n.length)return e.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-400 text-2xl",children:"לא נוספו באנרים"});if(o==="grid"){const g=n.length<=6?3:4;return e.jsx("div",{className:"w-full h-full grid gap-4",style:{gridTemplateColumns:`repeat(${g},1fr)`,gridAutoRows:"1fr"},children:n.map((v,p)=>e.jsx(ne,{b:v,...f},p))})}if(o==="magazine")return e.jsx("div",{className:"w-full h-full grid grid-cols-4 grid-rows-2 gap-4",children:n.slice(0,4).map((g,v)=>{const p=v===0?"col-span-2 row-span-2":v===1?"col-span-2":"";return e.jsx("div",{className:p,children:e.jsx(ne,{b:g,...f})},v)})});if(o==="carousel"){const g=u[x]||n.slice(0,4),v=Math.min(4,Math.max(1,g.length));return e.jsx("div",{className:"w-full h-full grid gap-4 animate-soft-fade",style:{gridTemplateColumns:`repeat(${v},1fr)`},children:g.map((p,j)=>e.jsx(ne,{b:p,...f},j))},x)}const[h,...d]=n;return e.jsxs("div",{className:"w-full h-full grid gap-4",style:{gridTemplateColumns:"1.7fr 1fr"},children:[e.jsx(ne,{b:h,...f}),e.jsx("div",{className:"grid gap-4",style:{gridAutoRows:"1fr"},children:d.slice(0,4).map((g,v)=>e.jsx(ne,{b:g,...f},v))})]})};return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(180deg,#ffffff 0%,#eef2f7 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
62acity-[0.12]",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.10]",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),t.show_title!==!1&&e.jsx(H,{kicker:t.show_desc!==!1&&t.subtitle||"",title:t.title||"עדכונים",primary:s,secondary:a}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 px-9 pb-6 pt-2",children:m()})]})}function Ns({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){var L;const n=(Array.isArray(t.images)?t.images:[]).filter(y=>y.image),[o,f]=b.useState(0),[u,x]=b.useState(null),c=n[o]||null,m=t.type_speed_title||55,h=t.type_speed_desc||26,d=t.hold!=null?t.hold:1200,g=!!t.hide_desc,v=t.countdown!==!1&&n.length>1,p=(((L=c==null?void 0:c.title)==null?void 0:L.length)||0)*m+300,j=!g&&(c!=null&&c.text)?c.text.length*h+300:0;if(b.useEffect(()=>{if(x(null),!c)return;const y=[],w=p+j+d;return v?(y.push(setTimeout(()=>x(3),w)),y.push(setTimeout(()=>x(2),w+1e3)),y.push(setTimeout(()=>x(1),w+2e3)),y.push(setTimeout(()=>f(_=>(_+1)%n.length),w+3e3))):n.length>1&&y.push(setTimeout(()=>f(_=>(_+1)%n.length),w+1500)),()=>y.forEach(clearTimeout)},[o,c,p,j,d,v,n.length]),!c)return e.jsx("div",{className:"w-full h-full flex items-center justify-center bg-black text-white/60 text-2xl",dir:"rtl",children:"לא הועלו תמונות"});const k=t.img_transition==="slide"?"ds-ti-slide":t.img_transition==="fade"?"ds-ti-fade":"ds-ti-zoom",I={tr:"items-start justify-start text-right",cr:"items-center justify-start text-right",br:"items-end justify-start text-right",center:"items-center justify-center text-center",cl:"items-center justify-end text-right"},P=I[t.text_position]||I.cr,B=t.text_position==="cl"?"right-16":"left-16",E=t.title_size==="xl"?"text-8xl":t.title_size==="sm"?"text-5xl":"text-7xl",T=t.desc_size==="lg"?"text-4xl":t.desc_size==="sm"?"text-2xl":"text-3xl",q=t.overlay!=null?t.overlay:.5;return e.jsxs("div",{className:"relative w-full h-full overflow-hidden bg-black",dir:"rtl",children:[e.jsx("div",{className:`absolute inset-0 bg-center bg-cover ${k}`,style:{backgroundImage:`url("${c.image}")`,backgroundPosition:c.focus||"center"}},o),e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(0deg, rgba(0,0,0,${Math.min(.9,q+.15)}), rgba(0,0,0,${q*.3}) 55%, transparent 78%)`}}),e.jsx("div",{className:"absolute top-0 inset-x-0 z-30",children:e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a})}),e.jsx("div",{className:`absolute inset-0 z-10 flex flex-col ${P} px-20 pb-20 pt-40`,style:{color:t.text_color||"#ffffff"},children:e.jsxs("div",{className:"max-w-4xl",children:[e.jsx("span",{className:"block h-2 w-28 rounded-full mb-6",style:{background:`linear-gradient(90deg, ${s}, ${a})`}}),e.jsx("h1",{className:`${E} font-black leading-tight drop-shadow-lg`,style:{minHeight:"1.1em"},children:e.jsx(X,{text:c.title,speed:m,caretColor:a})},`t${o}`),!g&&c.text&&e.jsx("p",{className:`${T} mt-5 leading-relaxed drop-shadow`,style:{opacity:.92},children:e.jsx(X,{text:c.text,speed:h,startDelay:p,caret:!1})},`d${o}`)]})}),u!=null&&e.jsx("div",{className:`absolute ${B} top-1/2 -translate-y-1/2 z-20`,children:e.jsx("div",{className:"relative w-40 h-40 rounded-full flex items-center justify-center",style:{background:"rgba(0,0,0,.45)",border:`4px solid ${a}`,boxShadow:`0 0 40px -8px ${a}`},children:e.jsx("span",{className:"text-8xl font-black text-white ds-ti-pop",children:u},u)})}),n.length>1&&e.jsx("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 z-20 flex gap-2",children:n.map((y,w)=>e.jsx("span",{className:`h-2.5 rounded-full transition-all ${w===o?"w-8":"w-2.5"}`,style:{background:w===o?a:"rgba(255,255,255,.5)"}},w))}),e.jsx("style",{children:`
63        @keyframes dsTiZoom { 0% { opacity: 0; transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
64        .ds-ti-zoom { animation: dsTiZoom 1.1s ease-out both; }
65        @keyframes dsTiFade { from { opacity: 0; } to { opacity: 1; } }
66        .ds-ti-fade { animation: dsTiFade 1s ease-out both; }
67        @keyframes dsTiSlide { from { opacity: 0; transform: translateX(-6%); } to { opacity: 1; transform: none; } }
68        .ds-ti-slide { animation: dsTiSlide 1s cubic-bezier(.22,1,.36,1) both; }
69        @keyframes dsTiPop { 0% { opacity: 0; transform: scale(.5); } 40% { opacity: 1; transform: scale(1.1); } 100% { transform: scale(1); } }
70        .ds-ti-pop { display: inline-block; animation: dsTiPop .4s ease-out both; }
71      `})]})}function ys(){return e.jsx("svg",{width:"30",height:"30",viewBox:"0 0 384 512",fill:"white","aria-hidden":!0,
71children:e.jsx("path",{d:"M318.7 268c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.6zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})})}function ks(){return e.jsxs("svg",{width:"26",height:"28",viewBox:"0 0 512 512","aria-hidden":!0,children:[e.jsx("path",{fill:"#00E5FF",d:"M47 27 300 256 47 485c-9-5-15-15-15-27V54c0-12 6-22 15-27z"}),e.jsx("path",{fill:"#00C853",d:"M47 27c4-2 9-3 14-2l246 141-64 71z"}),e.jsx("path",{fill:"#FFCE00",d:"M307 166l124 70c19 11 19 29 0 40l-124 70-64-90z"}),e.jsx("path",{fill:"#FF3D00",d:"M47 485l196-158 64 71-246 89c-7 2-14 1-14-2z"})]})}function _s({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=(l==null?void 0:l.community_name)||t.title||"הקהילה",o=!!(t.title&&t.text),f=({cls:u,brand:x,hero:c,quick:m,feedN:h})=>e.jsx("article",{className:`dsap-phone ${u}`,"aria-hidden":!0,children:e.jsxs("div",{className:"dsap-screen",children:[e.jsxs("div",{className:"dsap-top",children:[e.jsx("span",{className:"dsap-brand",children:x}),e.jsx("span",{className:"dsap-avatar"})]}),e.jsx("div",{className:"dsap-hero",children:e.jsx("span",{children:c})}),m&&e.jsx("div",{className:"dsap-grid",children:m.map((d,g)=>e.jsxs("div",{className:"dsap-qc",children:[e.jsx("i",{}),d]},g))}),e.jsx("div",{className:"dsap-feed",children:Array.from({length:h}).map((d,g)=>e.jsxs("div",{className:"dsap-row",children:[e.jsx("div",{className:"dsap-thumb"}),e.jsxs("div",{className:"dsap-lines",children:[e.jsx("b",{}),e.jsx("span",{})]})]},g))}),e.jsx("div",{className:"dsap-fab"}),e.jsx("div",{className:"dsap-shimmer"})]})});return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden",dir:"rtl",style:{background:"radial-gradient(circle at 14% 82%, rgba(255,255,255,.96) 0 18%, transparent 40%), radial-gradient(circle at 18% 78%, rgba(0,184,199,.12) 0 24%, transparent 52%), linear-gradient(115deg,#ffffff 0%,#f8fdfe 46%,#e9f9fc 100%)"},children:[e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 grid items-center",style:{gridTemplateColumns:"1.02fr .98fr",gap:"40px",padding:"0 70px 20px"},children:[e.jsxs("div",{className:"justify-self-end",style:{maxWidth:880},children:[e.jsx("div",{className:"dsap-eyebrow",children:"האפליקציה הקהילתית שלכם"}),e.jsx("h1",{className:"dsap-h1",children:o?t.title:e.jsxs(e.Fragment,{children:["היום יותר מתמיד",e.jsx("span",{className:"dsap-strong",children:"חשוב שנהיה מחוברים"})]})}),e.jsx("div",{className:"dsap-accent"}),e.jsx("p",{className:"dsap-lead",children:o?t.text:e.jsxs(e.Fragment,{children:["הורידו לנייד ותישארו מחוברים לכל מה שקורה ב־",e.jsx("strong",{className:"dsap-cname",children:n}),". חדשות, אירועים, שירותים, תשלומים ועדכונים חשובים – הכל במקום אחד, זמין ונוח בכל רגע."]})}),e.jsxs("div",{className:"dsap-stores",children:[e.jsxs("span",{className:"dsap-badge",children:[e.jsx(ys,{}),e.jsxs("span",{className:"dsap-bt",children:[e.jsx("span",{className:"s",children:"Download on the"}),e.jsx("span",{className:"b",children:"App Store"})]})]}),e.jsxs("span",{className:"dsap-badge",children:[e.jsx(ks,{}),e.jsxs("span",{className:"dsap-bt",children:[e.jsx("span",{className:"s",children:"GET IT ON"}),e.jsx("span",{className:"b",children:"Google Play"})]})]})]})]}),e.jsxs("div",{className:"dsap-visual",children:[e.jsx("div",{className:"dsap-halo"}),e.jsx("span",{className:"dsap-spark s1"}),e.jsx("span",{className:"dsap-spark s2"}),e.jsx("span",{className:"dsap-spark s3"}),e.jsxs("div",{className:"dsap-stage",children:[e.jsx(f,{cls:"dsap-far",brand:"השירותים שלי",hero:"כל הקהילה בכף היד",quick:["אירועים","שירות","תשלומים","אלפון","חדשות","טפסים"],feedN:2}),e.jsx(f,{cls:"dsap-back",brand:"עדכונים מהקהילה",hero:"נשארים מעודכנים",quick:null,feedN:4}),e.jsx(f,{cls:"dsap-main",brand:"שלום, ברוכים הבאים",hero:"הקהילה מחכה לכם",quick:["חדשות","אירועים","פניות","תשלומים","יד2","אלבומים"],feedN:2})]})]})]}),e.jsx("style",{children:`
72        .dsap-eyebrow{display:inline-flex;align-items:center;gap:10px;margin-bottom:18px;padding:11px 18px;color:#12385d;background:rgba(255,255,255,.78);border:1px solid rgba(0,184,199,.26);border-radius:999px;font-size:20px;font-weight:800;box-shadow:0 8px 30px rgba(10,36,67,.07)}
73        .dsap-eyebrow::before{content:"";width:11px;height:11px;border-radius:50%;background:#00b8c7;box-shadow:0 0 0 6px rgba(0,184,199,.12)}
74        .dsap-h1{margin:0;color:#0a2443;font-size:82px;line-height:.98;letter-spacing:-3px;font-weight:900}
75        .dsap-strong{display:block;color:#09111c;margin-top:6px}
76        .dsap-accent{width:150px;height:8px;margin:26px 0 22px auto;
76background:linear-gradient(90deg,#00b8c7,#00d9a5);border-radius:999px;animation:dsapLine .85s cubic-bezier(.2,.8,.2,1) both}
77        .dsap-lead{margin:0;max-width:820px;font-size:30px;line-height:1.5;font-weight:500;color:#1d2d3c}
78        .dsap-lead .dsap-cname{color:#0a2443;font-weight:900;position:relative;white-space:nowrap}
79        .dsap-lead .dsap-cname::after{content:"";position:absolute;right:0;left:0;bottom:-3px;height:4px;border-radius:999px;background:rgba(0,184,199,.28)}
80        .dsap-stores{display:flex;flex-wrap:wrap;gap:16px;margin-top:32px}
81        .dsap-badge{min-width:200px;height:66px;display:flex;align-items:center;justify-content:center;gap:14px;padding:0 20px;border-radius:14px;color:#fff;background:#050505;border:1px solid rgba(255,255,255,.16);box-shadow:0 11px 24px rgba(0,0,0,.16)}
82        .dsap-bt{display:block}.dsap-bt .s{display:block;font-size:12px;opacity:.88;line-height:1}.dsap-bt .b{display:block;margin-top:2px;font-size:22px;line-height:1;font-weight:800;direction:ltr}
83        .dsap-visual{position:relative;min-height:520px;display:flex;align-items:center;justify-content:center;direction:ltr}
84        .dsap-halo{position:absolute;width:540px;height:540px;border-radius:50%;background:rgba(255,255,255,.76);box-shadow:inset 0 0 0 1px rgba(0,184,199,.1);animation:dsapBreathe 5s ease-in-out infinite}
85        .dsap-stage{position:relative;width:640px;height:560px;transform:rotate(-2deg)}
86        .dsap-phone{position:absolute;width:238px;height:484px;padding:9px;border-radius:44px;background:linear-gradient(145deg,#1f2530,#0e1118 54%,#343d48);border:1px solid rgba(255,255,255,.35);box-shadow:0 34px 60px rgba(7,22,39,.28),inset 0 0 0 2px rgba(255,255,255,.12);overflow:hidden;transform-origin:center bottom}
87        .dsap-phone::before{content:"";position:absolute;top:16px;left:50%;width:82px;height:22px;transform:translateX(-50%);background:#080b10;border-radius:0 0 16px 16px;z-index:5}
88        .dsap-screen{position:relative;width:100%;height:100%;overflow:hidden;border-radius:36px;background:linear-gradient(180deg,#f9feff,#eef7f8)}
89        .dsap-main{left:48px;bottom:22px;transform:perspective(1000px) rotateY(16deg) rotateZ(-7deg);z-index:4;animation:dsapFloatA 5.5s ease-in-out infinite}
90        .dsap-back{left:196px;top:24px;transform:perspective(1000px) rotateY(18deg) rotateZ(-2deg) scale(.96);opacity:.94;z-index:3;animation:dsapFloatB 6.4s ease-in-out infinite}
91        .dsap-far{left:352px;top:-4px;transform:perspective(1000px) rotateY(20deg) rotateZ(4deg) scale(.88);opacity:.75;z-index:2;animation:dsapFloatC 7.2s ease-in-out infinite}
92        .dsap-top{height:64px;padding:30px 16px 8px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #e5eef0;direction:rtl}
93        .dsap-brand{font-weight:900;color:#0a2443;font-size:14px}
94        .dsap-avatar{width:26px;height:26px;border-radius:50%;background:linear-gradient(145deg,#00b8c7,#58d7de)}
95        .dsap-hero{position:relative;height:120px;margin:13px;overflow:hidden;border-radius:22px;background:linear-gradient(120deg,rgba(4,30,50,.08),rgba(4,30,50,.46)),linear-gradient(135deg,#71c788,#2d7444)}
96        .dsap-hero span{position:absolute;right:16px;bottom:16px;color:#fff;font-size:19px;font-weight:900;direction:rtl}
97        .dsap-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;padding:0 13px 11px;direction:rtl}
98        .dsap-qc{height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:14px;background:#fff;border:1px solid #e3edef;box-shadow:0 4px 12px rgba(16,56,81,.06);font-size:10px;color:#385061;font-weight:800}
99        .dsap-qc i{display:block;width:18px;height:18px;border-radius:7px;background:linear-gradient(145deg,#00b8c7,#72d9df)}
100        .dsap-feed{padding:0 13px;direction:rtl}
101        .dsap-row{height:50px;display:flex;align-items:center;gap:9px;margin-bottom:9px;padding:8px;border-radius:13px;background:#fff;border:1px solid #e5eef0}
102        .dsap-thumb{width:44px;height:34px;border-radius:9px;background:linear-gradient(135deg,#c0ebee,#64bcc6);flex:0 0 auto}
103        .dsap-lines{flex:1}
103.dsap-lines b,.dsap-lines span{display:block;border-radius:999px;background:#c9d8de}.dsap-lines b{width:72%;height:7px;margin-bottom:6px}.dsap-lines span{width:92%;height:5px;opacity:.65}
104        .dsap-fab{position:absolute;left:50%;bottom:16px;width:48px;height:48px;transform:translateX(-50%);border-radius:50%;background:#00b8c7;border:4px solid #fff;box-shadow:0 9px 18px rgba(0,184,199,.3)}
105        .dsap-fab::before,.dsap-fab::after{content:"";position:absolute;left:50%;top:50%;width:16px;height:2px;background:#fff;transform:translate(-50%,-50%);border-radius:2px}.dsap-fab::after{transform:translate(-50%,-50%) rotate(90deg)}
106        .dsap-shimmer{position:absolute;inset:-40%;background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.28) 48%,transparent 61%);transform:translateX(-60%);animation:dsapShimmer 5s linear infinite;pointer-events:none}
107        .dsap-spark{position:absolute;width:12px;height:12px;border-radius:50%;background:#00b8c7;box-shadow:0 0 0 10px rgba(0,184,199,.10);animation:dsapPulse 2.2s ease-in-out infinite}
108        .dsap-spark.s1{right:120px;top:64px}.dsap-spark.s2{left:20px;bottom:130px;animation-delay:.8s}.dsap-spark.s3{right:30px;bottom:50px;animation-delay:1.4s}
109        @keyframes dsapLine{from{transform:scaleX(0);transform-origin:right}to{transform:scaleX(1);transform-origin:right}}
110        @keyframes dsapBreathe{0%,100%{transform:scale(.96);opacity:.88}50%{transform:scale(1.03);opacity:1}}
111        @keyframes dsapFloatA{0%,100%{transform:perspective(1000px) rotateY(16deg) rotateZ(-7deg) translateY(0)}50%{transform:perspective(1000px) rotateY(16deg) rotateZ(-7deg) translateY(-10px)}}
112        @keyframes dsapFloatB{0%,100%{transform:perspective(1000px) rotateY(18deg) rotateZ(-2deg) scale(.96) translateY(0)}50%{transform:perspective(1000px) rotateY(18deg) rotateZ(-2deg) scale(.96) translateY(8px)}}
113        @keyframes dsapFloatC{0%,100%{transform:perspective(1000px) rotateY(20deg) rotateZ(4deg) scale(.88) translateY(0)}50%{transform:perspective(1000px) rotateY(20deg) rotateZ(4deg) scale(.88) translateY(-8px)}}
114        @keyframes dsapShimmer{0%{transform:translateX(-60%)}40%,100%{transform:translateX(70%)}}
115        @keyframes dsapPulse{0%,100%{transform:scale(.8);opacity:.55}50%{transform:scale(1.1);opacity:1}}
116        @media (prefers-reduced-motion:reduce){.dsap-halo,.dsap-phone,.dsap-shimmer,.dsap-spark,.dsap-accent{animation:none!important}}
117      `})]})}const $s={news_update:"חדשות ועדכונים",events:"אירועים",activities:"חוגים ופעילויות",memorial_pages:"לזכרם"},fe=t=>{const l=String(t||"").slice(0,10);if(!l)return"";const[r,i,s]=l.split("-");return`${s}.${i}.${r}`},Ss=["","ק","ר","ש","ת","תק","תר","תש","תת","תתק"],zs=["","י","כ","ל","מ","נ","ס","ע","פ","צ"],Is=["","א","ב","ג","ד","ה","ו","ז","ח","ט"];function Ms(t){const l=t%1e3;let r=Ss[Math.floor(l/100)]+zs[Math.floor(l%100/10)]+Is[l%10];return r=r.replace("יה","טו").replace("יו","טז"),r.length<=1?`${r}׳`:`${r.slice(0,-1)}״${r.slice(-1)}`}function Ts(t){try{return new Intl.DateTimeFormat("he-IL-u-ca-hebrew",{day:"numeric",month:"long",year:"numeric"}).formatToParts(t).map(l=>l.type==="day"||l.type==="year"?Ms(Number(l.value)):l.value).join("")}catch{return""}}const qe="linear-gradient(to bottom,transparent,#dbe3ec 18%,#dbe3ec 82%,transparent)";function A({design:t,now:l,weather:r,primary:i,secondary:s="#06b6d4"}){if(b.useContext(me))return null;const a=r?Se(r.code):null,n=(t==null?void 0:t.show_time)!==!1,o=(t==null?void 0:t.show_date)!==!1,f=(t==null?void 0:t.show_weather)!==!1&&!!r;return e.jsxs("div",{className:"relative z-20 mx-6 mt-6 flex-shrink-0",children:[e.jsxs("header",{dir:"rtl",className:"ds-head relative grid items-center gap-8 overflow-hidden rounded-[28px] border border-white/90 bg-white/95 px-9 py-5 shadow-[0_18px_45px_rgba(21,35,58,0.14)] backdrop-blur-xl",style:{gridTemplateColumns:"minmax(240px,1fr) auto minmax(240px,1fr)"},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:`radial-gradient(circle at 8% 18%, ${i}14, transparent 24%), radial-gradient(circle at 91% 84%, ${s}14, transparent 22%)`}}),e.jsx("div",{className:"relative z-10 flex min-w-0 items-center justify-self-start",children:(t==null?void 0:t.logo_url)&&e.jsx("img",{src:t.logo_url,alt:"",className:"ds-head-logo h-24 max-w-[18rem] object-contain object-right",style:{filter:"drop-shadow(0 8px 16px rgba(0,0,0,.08))"}})}),e.jsxs("div",{className:"relative z-10 flex items-center justify-center gap-7",style:{whiteSpace:"nowrap"},children:[o&&e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-extrabold text-slate-900",children:["יום ",dt[l.getDay()]]}),e.jsx("div",{className:"text-lg font-semibold text-slate-500 tabular-nums",children:l.toLocaleDateString("he-IL")}),e.jsx("div",{className:"text-2xl font-black",style:{color:"#6c8b2f"},children:Ts(l)})]}),o&&n&&e.jsx("span",{className:"ds-head-line h-16 w-px",style:{background:qe}}),n&&e.jsx("div",{className:"text-7xl font-black tabular-nums leading-none tracking-tight",style:{color:"#0b2f63"},children:l.toLocaleTimeString("he-IL",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}),n&&e.jsx("span",{className:"ds-head-line h-16 w-px",style:{background:qe}})]}),e.jsx("div",{className:"relative z-10 flex items-center justify-end gap-4 justify-self-end",children:f&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-right leading-tight",children:[e.jsxs("div",{className:"text-5xl font-black",style:{color:"#0b2f63"},children:[r.temp,"°"]}),(a==null?void 0:a.label)&&e.jsx("div",{className:"mt-1 text-lg font-extrabold text-slate-800",children:a.label}),r.windSpeed!=null&&e.jsxs("div",{className:"mt-0.5 text-base font-semibold text-slate-500",children:["רוח ",xt(r.windDir)," · ",r.windSpeed,' קמ"ש']})]}),a&&e.jsx("span",{className:"text-6xl",children:a.icon})]})}),e.jsx("span",{className:"ds-head-dot absolute bottom-3.5 left-4 h-2 w-2 rounded-full",style:{background:"#38b977",boxShadow:"0 0 0 6px rgba(56,185,119,.12)"},title:"המסך מחובר"})]}),e.jsx("style",{children:"@keyframes dsHeadIn{from{opacity:0;transform:translateY(-16px)}to{opacity:1;transform:none}}@keyframes dsHeadLogo{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}@keyframes dsHeadLine{0%,100%{opacity:.45}50%{opacity:1}}@keyframes dsHeadDot{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.72);opacity:.55}}.ds-head{animation:dsHeadIn .8s cubic-bezier(.22,1,.36,1) both}.ds-head-logo{animation:dsHeadLogo 5s ease-in-out infinite}.ds-head-line{animation:dsHeadLine 3.5s ease-in-out infinite}.ds-head-dot{animation:dsHeadDot 2.2s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.ds-head,.ds-head-logo,.ds-head-line,.ds-head-dot{animation:none!important}}"})]})}function H({kicker:t,title:l,primary:r,secondary:i,tone:s}){if(b.useContext(me))return null;
117const a=s==="dark",n=a?"#ffffff":r,o=a?"#d6b370":i,f=a?"#d6b370":r,u=a?"transparent":i;return e.jsxs("div",{className:"relative z-10 px-12 pt-8 pb-1 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("h1",{className:"ds-title-h text-5xl font-black leading-none whitespace-nowrap",style:{color:n},children:l}),e.jsx("span",{className:"ds-title-line h-1.5 flex-1 rounded-full",style:{background:`linear-gradient(90deg, ${f}, ${u}, transparent)`}})]}),t&&e.jsx("p",{className:"ds-title-kicker text-base font-bold tracking-widest mt-1.5",style:{color:o},children:t})]})}function K({items:t,render:l,cardWidth:r="576px",seconds:i}){if(!t.length)return null;const s=i||Math.max(22,t.length*7),a=[...t,...t];return e.jsx("div",{className:"w-full h-full overflow-hidden",dir:"ltr",children:e.jsx("div",{className:"flex h-full items-stretch ds-marquee",style:{width:"max-content",animationDuration:`${s}s`},children:a.map((n,o)=>e.jsx("div",{className:"flex-shrink-0 h-full px-3",style:{width:r},dir:"rtl",children:l(n,o%t.length)},o))})})}function As({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.news||[],o=t.banners||[],[f,u]=b.useState(0),[x,c]=b.useState(0);b.useEffect(()=>{if(n.length<2)return;const d=setInterval(()=>u(g=>(g+1)%n.length),6e3);return()=>clearInterval(d)},[n.length]),b.useEffect(()=>{if(o.length<2)return;const d=setInterval(()=>c(g=>(g+1)%o.length),7e3);return()=>clearInterval(d)},[o.length]);const m=n[f]||null,h=t.categories||[];return e.jsxs("div",{className:"relative w-full h-full flex flex-col bg-slate-50 text-slate-900 overflow-hidden",dir:"rtl",children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
117acity-[0.18] ds-nb-a",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.16] ds-nb-b",style:{background:a}}),e.jsx("div",{className:"absolute top-1/3 left-1/4 w-[30vw] h-[30vw] rounded-full blur-3xl opacity-[0.10] ds-nb-a",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:"כל מה שחשוב לדעת",title:t.title||"חדשות ועדכונים",primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 grid grid-cols-12 gap-6 px-12 pb-6 pt-2",children:[e.jsx("div",{className:"col-span-8 min-h-0",children:m?e.jsxs("div",{className:"h-full rounded-[2rem] overflow-hidden shadow-2xl relative bg-slate-800 animate-soft-fade ring-1 ring-black/5",children:[m.image?e.jsx("img",{src:m.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(160deg, ${s}, ${a})`}}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to top, rgba(0,0,0,0.92), rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.05))"}}),m.date&&e.jsx("span",{className:"absolute top-7 left-7 px-4 py-1.5 rounded-full text-base font-semibold text-white bg-black/45 backdrop-blur",children:fe(m.date)}),e.jsxs("div",{className:"absolute bottom-0 inset-x-0 p-12 text-white",children:[m.category&&e.jsxs("span",{className:"inline-flex items-center gap-2 px-5 py-2 rounded-full text-lg font-black text-white shadow-xl mb-4",style:{background:s,boxShadow:`0 12px 24px -8px ${s}`},children:[e.jsx(Q,{className:"w-5 h-5"})," ",m.category]}),e.jsx("h2",{className:"text-7xl font-black leading-tight mb-4 line-clamp-3 drop-shadow",children:m.title}),m.text&&e.jsx("p",{className:"text-3xl leading-relaxed text-white/90 line-clamp-6 max-w-5xl",children:m.text})]})]},f):e.jsx("div",{className:"h-full rounded-[2rem] bg-white shadow flex items-center justify-center text-slate-400 text-2xl",children:"אין עדכונים להצגה"})}),t.view==="cards"?e.jsxs("div",{className:"col-span-4 min-h-0 grid grid-rows-4 gap-3",children:[n.filter((d,g)=>g!==f).slice(0,4).map((d,g)=>e.jsxs("div",{className:"rounded-2xl overflow-hidden bg-white ring-1 ring-black/5 flex animate-soft-fade",style:{boxShadow:`0 20px 40px -26px ${s}66`},children:[e.jsx("div",{className:"w-2/5 flex-shrink-0 bg-slate-100",children:d.image?e.jsx("img",{src:d.image,alt:"",className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{background:`linear-gradient(160deg, ${s}, ${a})`},children:e.jsx(Le,{className:"w-8 h-8 text-white/70"})})}),e.jsxs("div",{className:"flex-1 p-4 min-w-0 flex flex-col justify-center",children:[d.category&&e.jsx("span",{className:"text-sm font-bold",style:{color:a},children:d.category}),e.jsx("h3",{className:"text-2xl font-black leading-tight line-clamp-2",style:{color:s},children:d.title}),d.date&&e.jsx("span",{className:"text-sm text-slate-400 mt-1",children:fe(d.date)})]})]},g)),n.filter((d,g)=>g!==f).length===0&&e.jsx("div",{className:"row-span-4 rounded-2xl bg-white/70 ring-1 ring-black/5 flex items-center justify-center text-slate-400 text-xl",children:"אין עדכונים נוספים"})]}):e.jsx("div",{className:"col-span-4 min-h-0",children:e.jsx("div",{className:"h-full rounded-[2rem] overflow-hidden bg-white ring-1 ring-black/5",style:{boxShadow:`0 30px 60px -20px ${s}66, 0 12px 24px -12px rgba(0,0,0,0.25)`},children:o.length?e.jsx("img",{src:o[x],alt:"",className:"w-full h-full object-cover animate-soft-fade"},x):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-center p-8",style:{background:`linear-gradient(160deg, ${s}, ${a})`},children:[(l==null?void 0:l.logo_url)&&e.jsx("img",{src:l.logo_url,alt:"",className:"h-24 object-contain mb-6 bg-white/90 rounded-3xl p-3"}),e.jsx("span",{className:"w-16 h-16 rounded-2xl bg-white/20 backdrop-blur flex items-center justify-center mb-5",children:e.jsx(Le,{className:"w-8 h-8 text-white"})}),e.jsx("p",{className:"text-white text-3xl font-black leading-tight",children:"ערוצי עדכונים בכל התחומים"}),e.jsxs("p",{className:"text-white/85 text-xl mt-3 flex items-center gap-2",children:[e.jsx(_t,{className:"w-5 h-5"})," שתמיד תהיו מעודכנים"]}),h.length>0&&e.jsx("div",{className:"flex flex-wrap justify-center gap-2 mt-6",children:h.slice(0,4).map((d,g)=>e.jsx("span",{className:"px-4 py-1.5 rounded-full bg-white/20 backdrop-blur text-base font-bold border border-white/25 text-white",children:d},g))})]})})})]}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}"})]})}function Bs({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.people||[],[o,f]=b.useState(0);b.useEffect(()=>{if(n.length<2)return;const c=setInterval(()=>f(m=>(m+1)%n.length),6e3);return()=>clearInterval(c)},[n.length]);
117const u=n[o]||null,x=u?[u.birth,u.death].filter(Boolean).join(" – "):"";return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-100",dir:"rtl",style:{background:"radial-gradient(120% 120% at 50% 0%, #1e293b 0%, #0f172a 55%, #020617 100%)"},children:[e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:"החודש · לפני",title:t.title||"נפרדים מחברים אהובים",primary:s,secondary:a,tone:"dark"}),e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 grid grid-cols-12 gap-6 px-12 pb-6 pt-2",children:[e.jsx("div",{className:"col-span-8 min-h-0",children:u?e.jsxs("div",{className:"h-full rounded-[2rem] overflow-hidden ring-1 ring-white/10 relative animate-soft-fade",style:{background:"#131c2e",boxShadow:"0 30px 60px -20px rgba(0,0,0,0.6)"},children:[u.image?e.jsx("img",{src:u.image,alt:"",className:"absolute inset-y-0 right-0 h-full w-[64%] object-cover object-center",style:{WebkitMaskImage:"linear-gradient(to left, #000 55%, transparent 100%)",maskImage:"linear-gradient(to left, #000 55%, transparent 100%)"}}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx($e,{className:"w-24 h-24 text-white/10"})}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(90deg, #131c2e 0%, rgba(19,28,46,0.9) 40%, rgba(19,28,46,0.35) 62%, transparent 80%)"}}),e.jsxs("div",{className:"absolute inset-y-0 left-0 w-[56%] flex flex-col justify-center p-12 text-right",children:[e.jsx("span",{className:"inline-flex items-center gap-2 self-start px-4 py-1.5 rounded-full text-sm font-bold mb-5",style:{background:"rgba(214,179,112,0.15)",color:"#e6c78a"},children:"יהי זכרו ברוך"}),e.jsxs("h2",{className:"text-6xl font-black leading-tight text-white mb-3 line-clamp-2",children:[u.name," ",e.jsx("span",{className:"text-4xl font-bold text-slate-300",children:"ז״ל"})]}),x&&e.jsx("p",{className:"text-3xl font-semibold mb-1",style:{color:"#d6b370"},children:x}),u.death_hebrew&&e.jsxs("p",{className:"text-xl text-slate-400 mb-4",children:[u.death_hebrew,u.residence?` · ${u.residence}`:""]}),u.text&&e.jsx("p",{className:"text-2xl leading-relaxed text-slate-200/90 line-clamp-4",children:u.text})]})]},o):e.jsx("div",{className:"h-full rounded-[2rem] ring-1 ring-white/10 flex items-center justify-center text-slate-400 text-2xl",children:"אין דפי הנצחה להצגה"})}),e.jsx("div",{className:"col-span-4 min-h-0",children:e.jsxs("div",{className:"h-full rounded-[2rem] ring-1 ring-white/10 flex flex-col items-center justify-center text-center p-8 relative overflow-hidden",style:{background:"radial-gradient(90% 70% at 50% 30%, rgba(214,179,112,0.14), rgba(255,255,255,0.02))"},children:[e.jsxs("div",{className:"ds-candle mb-8","aria-hidden":"true",children:[e.jsx("span",{className:"ds-glow"}),e.jsx("span",{className:"ds-flame"}),e.jsx("span",{className:"ds-wick"}),e.jsx("span",{className:"ds-wax"})]}),e.jsx("p",{className:"text-3xl font-black text-white leading-tight",children:"זוכרים ומנציחים"}),e.jsx("p",{className:"text-lg mt-3 text-slate-300/80",children:"את חברינו היקרים שהלכו לעולמם"}),n.length>1&&e.jsx("div",{className:"flex items-center gap-2 mt-6",children:n.slice(0,8).map((c,m)=>e.jsx("span",{className:`h-2 rounded-full transition-all ${m===o?"w-6":"w-2"}`,style:{background:m===o?"#d6b370":"rgba(255,255,255,0.25)"}},m))})]})})]}),e.jsx("style",{children:`
118        .ds-candle{position:relative;width:70px;height:150px}
119        .ds-wax{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:56px;height:96px;border-radius:14px 14px 10px 10px;background:linear-gradient(180deg,#fdf6e3,#e9dcb8 60%,#d8c79a);box-shadow:inset 0 -10px 18px rgba(0,0,0,0.2),0 8px 20px rgba(0,0,0,0.35)}
120        .ds-wick{position:absolute;bottom:96px;left:50%;transform:translateX(-50%);width:3px;height:12px;background:#3b2f2f;border-radius:2px}
121        .ds-flame{position:absolute;bottom:104px;left:50%;transform:translateX(-50%);width:22px;height:44px;border-radius:50% 50% 50% 50%/60% 60% 40% 40%;background:linear-gradient(180deg,#fff6cf 0%,#ffcf5c 35%,#ff9d2e 70%,#ff7a18 100%);box-shadow:0 0 22px 6px rgba(255,170,60,0.65);transform-origin:50% 100%;animation:dsFlick 1.6s ease-in-out infinite}
122        .ds-glow{position:absolute;bottom:60px;left:50%;width:150px;height:150px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle,rgba(255,180,70,0.35),transparent 62%);animation:dsGlow 3s ease-in-out infinite}
123        @keyframes dsFlick{0%,100%{transform:translateX(-50%) scaleY(1) rotate(-1deg)}25%{transform:translateX(-51%) scaleY(1.08) rotate(1.5deg)}50%{transform:translateX(-49%) scaleY(0.96) rotate(-1.5deg)}75%{transform:translateX(-50%) scaleY(1.05) rotate(0.5deg)}}
124        @keyframes dsGlow{0%,100%{opacity:0.75;transform:translateX(-50%) scale(1)}50%{opacity:1;transform:translateX(-50%) scale(1.08)}}
125        @media (prefers-reduced-motion:reduce){.ds-flame,.ds-glow{animation:none!important}}
126      `})]})}
126const Cs=[{left:"5%",size:46,dur:15,delay:0,color:"#f472b6"},{left:"17%",size:62,dur:19,delay:4,color:"#a855f7"},{left:"30%",size:40,dur:13,delay:7,color:"#60a5fa"},{left:"44%",size:54,dur:17,delay:2,color:"#fb7185"},{left:"58%",size:44,dur:16,delay:9,color:"#34d399"},{left:"71%",size:60,dur:20,delay:3,color:"#fbbf24"},{left:"84%",size:42,dur:14,delay:6,color:"#c084fc"},{left:"93%",size:50,dur:18,delay:11,color:"#38bdf8"}];function Es({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.people||[],o=n.filter((x,c)=>c%2===0),f=n.filter((x,c)=>c%2===1),u=x=>{const c=(x.name||"").trim().charAt(0)||"★",m=x.today;return e.jsxs("div",{className:`h-full rounded-[1.8rem] overflow-hidden flex flex-col items-center justify-center text-center px-6 py-5 relative ring-1 ${m?"ring-white/25":"ring-black/5"}`,style:m?{background:"linear-gradient(155deg, #ec4899, #a855f7)",boxShadow:"0 28px 52px -20px rgba(219,39,119,0.65)"}:{background:"linear-gradient(170deg, #ffffff, #fdf4ff)",boxShadow:"0 20px 42px -24px rgba(168,85,247,0.45), 0 6px 14px -10px rgba(0,0,0,0.18)"},children:[m&&e.jsx("span",{className:"absolute top-3 left-4 text-3xl",children:"🎉"}),e.jsx("div",{className:`w-24 h-24 rounded-full flex items-center justify-center mb-3 ring-4 ${m?"ring-white/40":"ring-pink-100"}`,style:m?{background:"rgba(255,255,255,0.22)"}:{background:"linear-gradient(160deg, #f9a8d4, #c4b5fd)"},children:e.jsx("span",{className:"text-5xl font-black text-white drop-shadow",children:c})}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3.5 py-1 rounded-full text-base font-black mb-2",style:m?{background:"rgba(255,255,255,0.22)",color:"#ffffff"}:{background:"#fce7f3",color:"#db2777"},children:[e.jsx(De,{className:"w-4 h-4"})," ",m?"חוגג/ת היום!":"מזל טוב"]}),e.jsx("h3",{className:"text-3xl font-black leading-tight line-clamp-1",style:{color:m?"#ffffff":"#be185d"},children:x.name}),e.jsxs("p",{className:"text-xl mt-1.5 font-bold tabular-nums",style:{color:m?"rgba(255,255,255,0.9)":"#8b5cf6"},children:["🎈 ",x.date]})]})};return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(160deg, #fdf2f8 0%, #f5f3ff 55%, #eff6ff 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
126acity-[0.16]",style:{background:"#ec4899"}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.14]",style:{background:"#8b5cf6"}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:t.subtitle||"לכל החוגגים יום הולדת החודש",title:t.title||"מזל טוב וברכות",primary:"#db2777",secondary:"#a855f7"}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 flex flex-col gap-4 py-3 px-9",children:n.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(K,{items:o.length?o:n,render:u,cardWidth:"422px"})}),f.length>0&&e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(K,{items:f,render:u,cardWidth:"422px",seconds:Math.max(20,f.length*7)})})]}):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-slate-400 gap-3",children:[e.jsx(De,{className:"w-20 h-20 text-pink-200"}),e.jsx("p",{className:"text-2xl",children:"אין ימי הולדת החודש"})]})}),e.jsx("div",{className:"absolute inset-0 z-20 pointer-events-none overflow-hidden",children:Cs.map((x,c)=>e.jsxs("div",{className:"ds-balloon",style:{left:x.left,animationDuration:`${x.dur}s`,animationDelay:`${x.delay}s`},children:[e.jsx("div",{style:{width:x.size,height:x.size*1.25,background:x.color,borderRadius:"50% 50% 48% 48%",boxShadow:"inset -6px -9px 14px rgba(0,0,0,0.12)"}}),e.jsx("div",{style:{width:2,height:x.size*.8,background:"rgba(0,0,0,0.14)",margin:"0 auto"}})]},c))}),e.jsx("style",{children:".ds-balloon{position:absolute;bottom:-30%;opacity:0.6;will-change:transform;animation-name:dsBalloonUp;animation-timing-function:linear;animation-iteration-count:infinite}@keyframes dsBalloonUp{0%{transform:translateY(0) rotate(-6deg)}50%{transform:translateY(-70vh) rotate(6deg)}100%{transform:translateY(-140vh) rotate(-6deg)}}@media (prefers-reduced-motion:reduce){.ds-balloon{display:none}}"})]})}function Rs({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.cards||[],o=f=>e.jsxs("div",{className:"h-full rounded-3xl overflow-hidden bg-white ring-1 ring-black/5 flex flex-col",style:{boxShadow:`0 26px 50px -24px ${s}55, 0 8px 18px -12px rgba(0,0,0,0.22)`},children:[e.jsx("div",{className:"h-[52%] flex-shrink-0 bg-slate-100",children:f.image?e.jsx("img",{src:f.image,alt:"",className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{background:`linear-gradient(160deg, ${s}, ${a})`},children:e.jsx(Q,{className:"w-14 h-14 text-white/70"})})}),e.jsxs("div",{className:"p-8 flex-1 flex flex-col min-h-0",children:[e.jsx("h3",{className:"text-3xl font-black leading-tight mb-3 line-clamp-2",style:{color:s},children:f.title}),f.text&&e.jsx("p",{className:"text-xl text-slate-500 leading-relaxed line-clamp-5",children:f.text})]})]});return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(180deg, #ffffff 0%, #eaf4ef 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
126acity-[0.13]",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.11]",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:t.subtitle||"",title:t.title||"כרטסיות מידע",primary:s,secondary:a}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 py-4 px-9",children:n.length?e.jsx(K,{items:n,render:o,cardWidth:"595px"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-400 text-2xl",children:"אין כרטסיות להצגה"})})]})}function Ds(t,l){const r=[];for(let i=0;i<t.length;i+=l)r.push(t.slice(i,i+l));return r}function Ps({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.config||{},o=n.view==="detailed",f=Array.isArray(n.selected_keys)?n.selected_keys:[],u=o&&f.length?Fe.filter(g=>f.includes(g.key)):Fe,x=Array.isArray(t.hero_images)?t.hero_images.filter(Boolean):[],[c,m]=b.useState(0);b.useEffect(()=>{if(x.length<2)return;const g=setInterval(()=>m(v=>(v+1)%x.length),7e3);return()=>clearInterval(g)},[x.length]);const h=x[c]||"",d=g=>{const v=g.icon;return e.jsxs("div",{className:"relative h-full w-full rounded-3xl overflow-hidden flex flex-col justify-end p-6 ring-1 ring-black/10",style:{boxShadow:"0 22px 44px -22px rgba(15,23,42,.55)"},children:[h?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute inset-0 bg-center bg-cover",style:{backgroundImage:`url("${h}")`}},h),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(0deg, rgba(0,0,0,.82), rgba(0,0,0,.32) 52%, rgba(0,0,0,.08))"}})]}):e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(150deg, ${g.color}, ${g.color}cc 55%, ${g.color}99)`}}),e.jsx("span",{className:"absolute top-4 left-4 w-12 h-12 rounded-xl bg-white/15 backdrop-blur-sm flex items-center justify-center",children:e.jsx(v,{className:"w-7 h-7 text-white"})}),e.jsxs("div",{className:"relative z-10 text-white",children:[e.jsx("div",{className:"text-3xl font-black leading-tight drop-shadow",children:g.barTitle||g.title}),e.jsx("div",{className:"text-lg font-semibold text-white/90 mt-1 drop-shadow",children:g.tagline}),o&&g.desc&&e.jsx("div",{className:"text-base text-white/85 mt-1.5 leading-snug line-clamp-2 drop-shadow",children:g.desc})]})]})};return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(180deg, #ffffff 0%, #eef2fb 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
126acity-[0.13]",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.11]",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:t.subtitle||"האזור האישי של הקהילה",title:t.title||"אזור אישי",primary:s,secondary:a}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 py-4 px-9",children:u.length===0?e.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-400 text-2xl",children:"לא נבחרו שירותים להצגה"}):o?e.jsx(K,{items:u,cardWidth:"30rem",render:g=>e.jsxs("div",{className:"h-full rounded-3xl overflow-hidden bg-white ring-1 ring-black/5 flex flex-col",style:{boxShadow:`0 26px 50px -24px ${s}55`},children:[e.jsxs("div",{className:"relative h-[55%] flex-shrink-0 flex items-center justify-center overflow-hidden",children:[h?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute inset-0 bg-center bg-cover",style:{backgroundImage:`url("${h}")`}},h),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,.12))"}})]}):e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(150deg, ${g.color}, ${g.color}aa)`}}),G.createElement(g.icon,{className:"relative z-10 w-28 h-28 text-white drop-shadow-lg"})]}),e.jsxs("div",{className:"p-7 flex-1 flex flex-col min-h-0",children:[e.jsx("h3",{className:"text-3xl font-black leading-tight",style:{color:g.color},children:g.barTitle||g.title}),e.jsx("p",{className:"text-xl font-semibold text-slate-600 mt-1",children:g.tagline}),g.desc&&e.jsx("p",{className:"text-lg text-slate-500 leading-relaxed line-clamp-3 mt-2",children:g.desc})]})]})}):e.jsx(K,{items:Ds(u,3),cardWidth:"23rem",seconds:Math.max(26,u.length*4),render:g=>e.jsx("div",{className:"h-full grid grid-rows-3 gap-4 py-1",children:g.map(v=>e.jsx("div",{className:"min-h-0",children:d(v)},v.key))})})})]})}const Ls={new:"חדש",like_new:"כמו חדש",good:"במצב טוב",used:"משומש",needs_repair:"דורש תיקון"};function Fs(t){return t.listing_type==="giveaway"?"למסירה":t.price_agorot==null?"":`${nt(Math.round(t.price_agorot/100))}${t.is_price_flexible?" · גמיש":""}`}function Hs(t){return t.published_at&&Date.now()-new Date(t.published_at).getTime()<7*864e5}function ce({l:t,fields:l,primary:r,big:i}){const s=t.listing_type==="giveaway",a=s?"#0d9488":r;return e.jsxs("div",{className:"h-full rounded-3xl overflow-hidden bg-white ring-1 ring-black/5 flex flex-col",style:{boxShadow:`0 26px 50px -24px ${r}55`},children:[e.jsxs("div",{className:`relative ${i?"h-[62%]":"h-[56%]"} flex-shrink-0 bg-slate-100`,children:[t.primary_image?e.jsx("img",{src:t.primary_image,alt:"",className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx(U,{className:"w-16 h-16 text-slate-300"})}),e.jsx("span",{className:"absolute top-3 right-3 px-3 py-1 rounded-full text-sm font-black text-white",style:{background:s?"#0d9488":r},children:s?"למסירה":"למכירה"}),l.date&&Hs(t)&&e.jsx("span",{className:"absolute top-3 left-3 px-3 py-1 rounded-full text-sm font-black text-white bg-rose-500",children:"חדש"})]}),e.jsxs("div",{className:`${i?"p-8":"p-6"} flex-1 flex flex-col min-h-0`,children:[e.jsx("h3",{className:`${i?"text-4xl":"text-3xl"} font-black leading-tight line-clamp-2`,style:{color:"#0b2f63"},children:t.title}),e.jsx("p",{className:`${i?"text-4xl":"text-3xl"} font-black mt-2`,style:{color:a},children:Fs(t)}),e.jsxs("div",{className:"mt-auto pt-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-lg text-slate-500",children:[l.condition&&t.item_condition&&e.jsx("span",{children:Ls[t.item_condition]||t.item_condition}),l.category&&t.category_name&&e.jsxs("span",{children:["· ",t.category_name]}),l.publisher&&t.publisher_first&&e.jsxs("span",{children:["· ",t.publisher_first]})]})]})]})}const Ze=[{n:1,title:"נכנסים לאזור האישי",text:"לחנות היד2 הקהילתית"},{n:2,title:'בוחרים "פרסום מודעה"',text:"מהתפריט של החנות"},{n:3,title:"ממלאים את הטופס",text:"פרטי המודעה, תמונות ומחיר"},{n:4,title:"שולחים לאישור",text:"והמודעה מתפרסמת בחנות"}],Os={Home:At,Wrench:Tt,Baby:Yt,Bike:Ht,Leaf:Wt,BookOpen:Mt,Gamepad2:It,ShoppingBag:zt,Tag:lt,Store:U,Sparkles:Q,Heart:$e,Camera:St,Utensils:Ot,TreePine:Ft,Briefcase:$t},Ws={blue:"#2563eb",emerald:"#059669",amber:"#d97706",purple:"#7c3aed",rose:"#e11d48",cyan:"#0891b2",orange:"#ea580c",indigo:"#4f46e5",teal:"#0d9488",slate:"#47
1265569"};function Ys({slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n}){var y;const o=t.listings||[],f=Array.isArray(t.categories)?t.categories.filter(w=>w.title):[],u=t.fields||{},x=t.view||"full",c=_e(n,`/kibbutz-site/${n}/module/secondhand_store`,window.location.origin),[m,h]=b.useState(0);b.useEffect(()=>{if(x!=="central"||o.length<2)return;const w=setInterval(()=>h(_=>(_+1)%o.length),6e3);return()=>clearInterval(w)},[x,o.length]);const d=G.useMemo(()=>{if(x!=="by_category")return[];const w=new Map;for(const _ of o){const D=_.category_name||"שונות";w.has(D)||w.set(D,[]),w.get(D).push(_)}return[...w.entries()].map(([_,D])=>({name:_,items:D}))},[x,o]),[g,v]=b.useState(0);b.useEffect(()=>{if(x!=="by_category"||d.length<2)return;const w=setInterval(()=>v(_=>(_+1)%d.length),11e3);return()=>clearInterval(w)},[x,d.length]);const p=6,j=G.useMemo(()=>{const w=[];for(let _=0;_<o.length;_+=p)w.push(o.slice(_,_+p));return w.length?w:[[]]},[o]),[k,I]=b.useState(0);b.useEffect(()=>{if(x!=="full"||j.length<2)return;const w=setInterval(()=>I(_=>(_+1)%j.length),9e3);return()=>clearInterval(w)},[x,j.length]);const[P,B]=b.useState(0);b.useEffect(()=>{const w=setInterval(()=>B(_=>(_+1)%Ze.length),2600);return()=>clearInterval(w)},[]);const E=o.length===0,T=x==="by_category"&&d[g]?d[g].name:t.subtitle||"מוכרים, מוסרים ומתחדשים",q=()=>e.jsxs("div",{className:"rounded-3xl bg-white ring-1 ring-black/5 p-5 flex-shrink-0",style:{boxShadow:`0 26px 50px -24px ${s}44`},children:[e.jsx("div",{className:"text-xl font-black mb-3",style:{color:"#0b2f63"},children:"קטגוריות מובילות בחנות"}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:f.slice(0,6).map((w,_)=>{const D=Os[w.icon]||lt,V=Ws[w.color]||s;return e.jsxs("div",{className:"flex items-center gap-3 rounded-2xl px-3 py-2.5",style:{background:`${V}14`},children:[e.jsx("span",{className:"w-12 h-12 rounded-xl flex items-center justify-center flex-shrink-0 text-white",style:{background:V},children:e.jsx(D,{className:"w-6 h-6"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-lg font-black truncate",style:{color:"#0b2f63"},children:w.title}),w.count>0&&e.jsxs("div",{className:"text-sm text-slate-500",children:[w.count," מודעות"]})]})]},_)})})]}),L=()=>e.jsxs("div",{className:"h-full flex flex-col gap-4 min-h-0",children:[e.jsx("div",{className:"rounded-3xl p-6 text-white flex-shrink-0",style:{background:`linear-gradient(150deg, ${s}, ${a})`,boxShadow:`0 26px 50px -24px ${s}88`},children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-14 h-14 rounded-2xl bg-white/20 flex items-center justify-center flex-shrink-0",children:e.jsx(U,{className:"w-8 h-8"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-3xl font-black leading-tight",children:"רוצים למכור או למסור?"}),e.jsx("div",{className:"text-lg text-white/90 mt-0.5",children:"פרסמו מוצר בחנות היד2 הקהילתית — חינם ובקלות"})]})]})}),e.jsxs("div",{className:"rounded-3xl bg-white ring-1 ring-black/5 p-6 flex-1 min-h-0 flex flex-col overflow-hidden",style:{boxShadow:`0 26px 50px -24px ${s}44`},children:[e.jsx("div",{className:"text-xl font-black mb-3",style:{color:"#0b2f63"},children:"איך מפרסמים מודעה?"}),e.jsx("div",{className:"flex flex-col justify-between flex-1",children:Ze.map((w,_)=>{const D=_===P;return e.jsxs("div",{className:"flex items-start gap-3 rounded-2xl px-3 py-2 transition-all duration-500",style:D?{background:`${s}14`,transform:"scale(1.03)"}:void 0,children:[e.jsx("span",{className:"w-11 h-11 rounded-full flex items-center justify-center font-black text-xl flex-shrink-0 transition-all duration-500",style:{background:D?s:`${s}26`,color:D?"#fff":s},children:w.n}),e.jsxs("div",{children:[e.jsx("div",{className:"text-lg font-bold leading-tight",style:{color:D?s:"#1e293b"},children:w.title}),e.jsx("div",{className:"text-base text-slate-500 leading-snug",children:w.text})]})]},w.n)})})]}),e.jsxs("div",{className:"rounded-3xl bg-white ring-1 ring-black/5 p-4 flex items-center gap-4 flex-shrink-0",style:{boxShadow:`0 26p
126x 50px -24px ${s}44`},children:[e.jsx(ae,{value:c,size:104,bgColor:"#ffffff",fgColor:"#0b2f63"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xl font-black",style:{color:"#0b2f63"},children:"סרקו לחנות היד2"}),e.jsx("div",{className:"text-base text-slate-500",children:"לצפייה בכל המודעות ולפרסום מהנייד"})]})]})]});return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(180deg, #ffffff 0%, #eaf2fb 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl opacity-[0.13]",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.11]",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:T,title:t.title||"חנות יד2",primary:s,secondary:a}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 py-4 px-9",children:x==="central"&&!E?e.jsxs("div",{className:"w-full h-full flex items-stretch justify-center gap-8",children:[e.jsx("div",{className:"w-[42%]",children:e.jsx(ce,{l:o[m]||o[0],fields:u,primary:s,big:!0})}),e.jsx("div",{className:"w-[30rem] flex-shrink-0",children:e.jsx(L,{})})]}):x==="by_category"&&!E?e.jsx(K,{items:((y=d[g])==null?void 0:y.items)||o,cardWidth:"26rem",render:w=>e.jsx(ce,{l:w,fields:u,primary:s})}):x==="carousel"&&!E?e.jsx(K,{items:o,cardWidth:"26rem",render:w=>e.jsx(ce,{l:w,fields:u,primary:s})}):e.jsxs("div",{className:"w-full h-full grid gap-6",style:{gridTemplateColumns:"1fr 30rem"},children:[e.jsxs("div",{className:"min-h-0 flex flex-col gap-5",children:[f.length>0&&e.jsx(q,{}),e.jsx("div",{className:"flex-1 min-h-0",children:E?e.jsxs("div",{className:"w-full h-full rounded-3xl bg-white/70 ring-1 ring-black/5 flex flex-col items-center justify-center text-center p-10",children:[e.jsx(U,{className:"w-28 h-28 mb-5",style:{color:`${s}55`}}),e.jsx("div",{className:"text-4xl font-black",style:{color:"#0b2f63"},children:"החנות מחכה למודעה הראשונה"}),e.jsx("div",{className:"text-2xl text-slate-500 mt-3 max-w-2xl",children:"יש לכם מוצר למכירה או למסירה? פרסמו עכשיו באזור האישי — חינם ובדקה."})]}):e.jsx("div",{className:"w-full h-full grid grid-cols-3 grid-rows-2 gap-5 animate-soft-fade",children:(j[k]||[]).map(w=>e.jsx(ce,{l:w,fields:u,primary:s},w.id))},k)})]}),e.jsx(L,{})]})})]})}function Xs(t){return t.price_agorot!=null?nt(Math.round(t.price_agorot/100)):""}function Us(t,l){const r=(t||[]).find(u=>u.day_of_week===l.getDay());if(!r||!r.is_open||!r.open_time)return{open:!1,text:"סגור כעת",sub:""};const i=l.getHours()*60+l.getMinutes(),s=u=>{const[x,c]=String(u).split(":").map(Number);return(x||0)*60+(c||0)},a=s(r.open_time);let n=s(r.close_time||"23:59");return(n<=a?i>=a||i<n:i>=a&&i<n)?{open:!0,text:"פתוח עכשיו",sub:`נסגר ${r.close_time}`}:i<a?{open:!1,text:`נפתח היום ${r.open_time}`,sub:""}:{open:!1,text:"סגור כעת",sub:""}}function qs({p:t,primary:l}){return e.jsxs("div",{className:"h-full rounded-3xl overflow-hidden bg-white ring-1 ring-black/5 flex flex-col",style:{boxShadow:`0 26px 50px -24px ${l}55`},children:[e.jsxs("div",{className:"relative h-[56%] flex-shrink-0 bg-slate-100",children:[t.image?e.jsx("img",{src:t.image,alt:"",className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx(U,{className:"w-16 h-16 text-slate-300"})}),t.is_featured&&e.jsx("span",{className:"absolute top-3 right-3 px-3 py-1 rounded-full text-sm font-black text-white",style:{background:l},children:"מומלץ"})]}),e.jsxs("div",{className:"p-6 flex-1 flex flex-col min-h-0",children:[e.jsx("h3",{className:"text-3xl font-black leading-tight line-clamp-2",style:{color:"#0b2f63"},children:t.name}),t.description&&e.jsx("p",{className:"text-lg text-slate-500 line-clamp-2 mt-1",children:t.description}),e.jsxs("div",{className:"mt-auto pt-3 flex items-center justify-between",children:[e.jsx("span",{className:"text-4xl font-black",style:{color:l},children:Xs(t)}),t.category_name&&e.jsx("span",{className:"text-base text-slate-400",children:t.category_name})]})]})]})}function Ge({url:t,title:l,sub:r}){return e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-3 flex items-center gap-3",dir:"rtl",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-sm font-black",style:{color:"#0b2f63"},children:l}),e.jsx("div",{className:"text-xs text-slate-500 max-w-[9rem]",children:r})]}),e.jsx(ae,{value:t,size:84,bgColor:"#ffffff",fgColor:"#0b2f63"})]})}function Zs({slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n}){const o=t.pub||{},f=t.view||"combined",u=Us(t.hours,r),x=_e(n,`/kibbutz-site/${n}/pub`,window.location.origin),c=Array.isArray(t.categories)?t.categories:[],m=Array.isArray(t.hours)?t.hours:[],h=r.getDay();let d=t.products||[];f==="promos"&&(d=d.filter(p=>p.is_featured));const g=f!=="marketing"&&d.length>0,v=()=>e.jsxs("div",{className:"rounded-3xl bg-white/95 p-5 flex-shrink-0",style:{boxShadow:`0 26p
126x 50px -24px ${s}55`},children:[e.jsx("div",{className:"text-xl font-black mb-2.5",style:{color:s},children:"שעות פעילות"}),e.jsx("div",{className:"flex flex-col gap-1",children:dt.map((p,j)=>{const k=m.find(B=>B.day_of_week===j),I=k&&k.is_open&&k.open_time,P=j===h;return e.jsxs("div",{className:`flex items-center justify-between rounded-lg px-3 py-1 text-lg ${P?"font-black":"font-semibold"}`,style:P?{background:`${s}14`,color:"#0b2f63"}:{color:"#334155"},children:[e.jsxs("span",{children:[p,P?" · היום":""]}),e.jsx("span",{dir:"ltr",className:I?"":"text-slate-400",children:I?`${k.open_time}–${k.close_time||""}`:"סגור"})]},j)})})]});return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(180deg, #1a1206 0%, #2a1e0c 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
126acity-25 ds-nb-a",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-20 ds-nb-b",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 px-8 pb-6 pt-2 flex flex-col gap-4",children:[e.jsxs("div",{className:"relative h-[42%] flex-shrink-0 rounded-3xl overflow-hidden flex items-end",style:{background:o.cover?void 0:`linear-gradient(135deg, ${s}, ${a})`},children:[o.cover&&e.jsx("div",{className:"absolute inset-0 bg-center bg-cover ds-ken",style:{backgroundImage:`url("${o.cover}")`}}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,.15) 60%, transparent)"}}),e.jsxs("div",{className:"relative z-10 p-8 flex items-end gap-5 w-full",children:[o.logo&&e.jsx("img",{src:o.logo,alt:"",className:"h-24 w-24 rounded-2xl object-contain bg-white/90 p-2 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1 text-white",children:[e.jsx("h1",{className:"text-6xl font-black leading-none drop-shadow",children:o.name}),t.subtitle&&e.jsx("p",{className:"text-2xl font-semibold text-white/90 mt-2",children:t.subtitle}),c.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:c.slice(0,6).map(p=>e.jsx("span",{className:"px-4 py-1.5 rounded-full bg-white/20 backdrop-blur text-lg font-bold border border-white/25 text-white",children:p.name},p.id))})]}),e.jsx("span",{className:`px-5 py-2.5 rounded-full text-2xl font-black flex-shrink-0 ${u.open?"bg-emerald-500 text-white ds-pulse-open":"bg-white/90 text-slate-700"}`,children:u.text})]})]}),e.jsxs("div",{className:"flex-1 min-h-0 grid gap-4",style:{gridTemplateColumns:"1fr 26rem"},children:[e.jsx("div",{className:"min-h-0 rounded-3xl bg-black/20 p-3",children:g?e.jsx(K,{items:d,cardWidth:"22rem",render:p=>e.jsx(qs,{p,primary:s})}):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-center text-white px-10",children:[e.jsx("span",{className:"w-24 h-24 rounded-3xl bg-white/15 flex items-center justify-center mb-6",children:e.jsx(U,{className:"w-12 h-12 text-white/90"})}),e.jsx("div",{className:"text-5xl font-black",children:u.open?"הפאב פתוח — מוזמנים להיכנס!":"נתראה בפאב הקהילתי"}),e.jsx("div",{className:"text-2xl text-white/85 mt-4 max-w-2xl leading-relaxed",children:o.full_description||o.description||"מוזיקה טובה, חברים ואווירה קהילתית — הפאב מחכה לכם."})]})}),e.jsxs("div",{className:"min-h-0 flex flex-col gap-4 overflow-hidden",children:[e.jsx(v,{}),g&&(o.description||o.full_description)&&e.jsxs("div",{className:"rounded-3xl bg-white/95 p-5 flex-1 min-h-0",style:{boxShadow:`0 26px 50px -24px ${s}55`},children:[e.jsx("div",{className:"text-xl font-black mb-1",style:{color:s},children:"על הפאב"}),e.jsx("div",{className:"text-lg text-slate-700 leading-relaxed line-clamp-5",children:o.full_description||o.description})]}),(t.show_qr_order||t.show_qr_card)&&e.jsxs("div",{className:"flex gap-3 flex-shrink-0",children:[t.show_qr_order&&e.jsx("div",{className:"flex-1",children:e.jsx(Ge,{url:x,title:"סרקו להזמנה",sub:"הזמנה מהירה מהפאב"})}),t.show_qr_card&&e.jsx("div",{className:"flex-1",children:e.jsx(Ge,{url:x,title:"טעינת כרטיס",sub:"טעינת כרטיס הפאב"})})]})]})]})]}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.ds-nb-a,.ds-nb-b{animation:none}}"})]})}const Gs=["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"];function ve(t,l){return l?"linear-gradient(180deg, #0b1533 0%, #1a2550 100%)":t==null?"linear-gradient(180deg, #eaf4ff 0%, #cfe6ff 100%)":t===0?"linear-gradient(180deg, #7ec8ff 0%, #cdeaff 100%)":t<=3?"linear-gradient(180deg, #a9c7e6 0%, #dce9f5 100%)":t<=48?"linear-gradient(180deg, #b9c2cc 0%, #e2e8ee 100%)":t<=67?"linear-gradient(180deg, #6b83a3 0%, #9db3c9 100%)":t<=77?"linear-gradient(180deg, #cfe0ef 0%, #eef5fb 100%)":t<=82?"linear-gradient(180deg, #7b93b0 0%, #b3c6da 100%)":"linear-gradient(180deg, #3f4a63 0%, #6b7690 100%)"}function Ks(t){const l=Se(t.code);return t.precip>=60?`${t.dayName} — ${l.label}, סיכוי גבוה למשקעים.`:t.wind>=40?`${t.dayName} — ${l.label}, צפויות רוחות חזקות.`:t.tmax>=36?`${t.dayName} — חם במיוחד, ${l.label}.`:t.tmin<=4?`${t.dayName} — קר במיוחד, ${l.label}.`:`${t.dayName} — ${l.label}.`}function Vs(t){return t.tmax>=38?"עומס חום כבד":t.precip>=70?"סיכוי גבוה לגשם":t.wind>=45?"רוחות חזקות":t.tmin<=2?"קור קיצוני":t.code>=95?"סופת רעמים":""}function re({d:t,fields:l,big:r,today:i,weekend:s,dark:a}){const n=Se(t.code),o=a?"bg-white/12 border border-white/15":"bg-white/92 border border-white/70",f=a?"text-white":"text-slate-900",u=i?a?"#d6b370":"#0b2f63":a?"rgba(255,255,255,0.12)":"rgba(11,47,99,0.07)",x=i||a?"#ffffff"
126:"#0b2f63",c=[];l.precip&&t.precip!=null&&c.push({ic:"💧",val:`${t.precip}%`,sub:"משקעים"}),l.wind&&t.wind!=null&&c.push({ic:"🌬️",val:`${Math.round(t.wind)}`,sub:`קמ״ש${t.windDir!=null?` · ${xt(t.windDir)}`:""}`}),l.sun&&t.sunrise&&c.push({ic:"🌅",val:t.sunrise,sub:`שקיעה ${t.sunset}`});const m=a?"rgba(255,255,255,0.08)":"rgba(11,47,99,0.05)";return e.jsxs("div",{className:`relative h-full rounded-3xl overflow-hidden flex flex-col ${o} ${f} backdrop-blur-md`,style:{boxShadow:a?"0 28px 60px -24px rgba(0,0,0,.75)":"0 28px 58px -24px rgba(24,56,104,.5)",transform:i?"translateY(-8px)":void 0},children:[e.jsxs("div",{className:"flex items-center justify-between px-4 flex-shrink-0",style:{background:u,color:x,paddingTop:r?14:9,paddingBottom:r?14:9},children:[e.jsxs("div",{className:"leading-tight",children:[e.jsx("div",{className:`font-black ${r?"text-3xl":"text-xl"}`,children:i?"היום":`יום ${t.dayName}`}),e.jsx("div",{className:`font-bold tabular-nums opacity-90 ${r?"text-xl":"text-sm"}`,children:t.dateLabel})]}),s&&e.jsx("span",{className:"text-xs font-black px-2.5 py-1 rounded-full bg-amber-400 text-amber-950 flex-shrink-0",children:"סופ״ש"})]}),e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-1 px-3 py-2",children:[e.jsx("div",{className:`ds-wx-bob leading-none ${r?"text-[9rem]":"text-6xl"}`,children:n.icon}),e.jsx("div",{className:`font-bold text-center ${r?"text-3xl":"text-base"} ${a?"text-white/85":"text-slate-600"}`,children:n.label}),e.jsxs("div",{className:"flex items-baseline gap-2 mt-1",children:[e.jsxs("span",{className:`font-black leading-none ${r?"text-8xl":"text-5xl"}`,children:[Math.round(t.tmax),"°"]}),e.jsxs("span",{className:`font-bold ${r?"text-4xl":"text-2xl"} ${a?"text-white/55":"text-slate-400"}`,children:[Math.round(t.tmin),"°"]})]})]}),c.length>0&&e.jsx("div",{className:"flex-shrink-0 flex items-stretch gap-1.5 p-2",style:{borderTop:a?"1px solid rgba(255,255,255,.1)":"1px solid rgba(11,47,99,.08)"},children:c.map((h,d)=>e.jsxs("div",{className:"flex-1 rounded-xl flex flex-col items-center justify-center py-1.5 px-1 text-center",style:{background:m},children:[e.jsx("span",{className:`${r?"text-2xl":"text-lg"} leading-none`,children:h.ic}),e.jsx("span",{className:`font-black tabular-nums ${r?"text-xl":"text-sm"} mt-0.5 ${f}`,children:h.val}),e.jsx("span",{className:`${r?"text-sm":"text-[10px]"} ${a?"text-white/55":"text-slate-500"} leading-tight`,children:h.sub})]},d))})]})}function je({code:t,night:l}){const r=t??1,i=r<=1,s=r>=51&&r<=67||r>=80&&r<=82||r>=95,a=r>=71&&r<=77,n=r>=95,o=i?2:r<=48?4:5,f=Array.from({length:o},(c,m)=>({top:8+m*63%46,scale:.7+m*37%60/100,dur:46+m*17%40,delay:-(m*9)%46,op:l?.14:.5-m%3*.08})),u=s?Array.from({length:70},(c,m)=>m):[],x=a?Array.from({length:48},(c,m)=>m):[];return e.jsxs("div",{className:"absolute inset-0 z-0 overflow-hidden pointer-events-none","aria-hidden":!0,children:[e.jsx("div",{className:"absolute -top-32 -left-24 w-[46vw] h-[46vw] rounded-full blur-3xl",style:{background:l?"rgba(99,130,220,0.18)":"rgba(255,255,255,0.35)"}}),e.jsx("div",{className:"absolute -bottom-40 -right-24 w-[52vw] h-[52vw] rounded-full blur-3xl",style:{background:l?"rgba(30,45,95,0.5)":"rgba(120,180,240,0.25)"}}),!l&&i&&e.jsxs("div",{className:"absolute",style:{top:"4%",left:"6%"},children:[e.jsx("div",{className:"ds-wx-rays absolute",style:{width:620,height:620,left:-180,top:-180,borderRadius:"9999px",background:"repeating-conic-gradient(from 0deg, rgba(255,255,255,0.18) 0deg 3deg, transparent 3deg 20deg)",WebkitMask:"radial-gradient(circle, transparent 26%, #000 30%, #000 60%, transparent 66%)",mask:"radial-gradient(circle, transparent 26%, #000 30%, #000 60%, transparent 66%)"}}),e.jsx("div",{className:"ds-wx-sun",style:{width:260,height:260,borderRadius:"9999px",background:"radial-gradient(circle, rgba(255,246,196,0.95), rgba(255,214,102,0.42) 46%, transparent 70%)"}})]}),l&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ds-wx-sun absolute",style:{top:"6%",left:"8%",width:180,height:180,borderRadius:"9999px",background:"radial-gradient(circle at 38% 38%, #f4f6ff, #c8d2f0 55%, rgba(200,210,240,0.15) 72%, transparent 78%)",boxShadow:"0 0 90px 30px rgba(190,205,245,
1260.25)"}}),Array.from({length:40},(c,m)=>e.jsx("span",{className:"ds-wx-star absolute rounded-full bg-white",style:{top:`${m*53%70}%`,left:`${m*79%100}%`,width:2+m%3,height:2+m%3,opacity:.5+m%4*.12,animationDelay:`${m%7*.5}s`}},m))]}),f.map((c,m)=>e.jsx("div",{className:"ds-wx-cloud absolute",style:{top:`${c.top}%`,transform:`scale(${c.scale})`,opacity:c.op,animationDuration:`${c.dur}s`,animationDelay:`${c.delay}s`},children:e.jsx("div",{style:{width:220,height:66,borderRadius:"9999px",background:"#fff",filter:"blur(2px)",boxShadow:"70px 12px 0 -6px #fff, -66px 16px 0 -10px #fff, 20px -20px 0 -8px #fff"}})},m)),u.map(c=>e.jsx("span",{className:"ds-wx-drop absolute",style:{left:`${c*137%100}%`,animationDelay:`${c%13*.13}s`,animationDuration:`${.62+c%5*.12}s`}},`r${c}`)),x.map(c=>e.jsx("span",{className:"ds-wx-flake absolute rounded-full bg-white",style:{left:`${c*97%100}%`,width:6+c%4*2,height:6+c%4*2,opacity:.6+c%4*.1,animationDelay:`${c%11*.4}s`,animationDuration:`${5+c%5}s`}},`s${c}`)),n&&e.jsx("div",{className:"ds-wx-flash absolute inset-0",style:{background:"#fff"}}),e.jsx("style",{children:`
127        @keyframes dsWxSpin { to { transform: rotate(360deg); } }
128        .ds-wx-rays { animation: dsWxSpin 90s linear infinite; }
129        @keyframes dsWxSunPulse { 0%,100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.06); opacity: 1; } }
130        .ds-wx-sun { animation: dsWxSunPulse 6s ease-in-out infinite; }
131        @keyframes dsWxTwinkle { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
132        .ds-wx-star { animation: dsWxTwinkle 3.2s ease-in-out infinite; }
133        @keyframes dsWxDrift { from { transform: translateX(-24vw) scale(var(--s,1)); } to { transform: translateX(124vw) scale(var(--s,1)); } }
134        .ds-wx-cloud { left: 0; animation-name: dsWxDrift; animation-timing-function: linear; animation-iteration-count: infinite; }
135        @keyframes dsWxRain { 0% { transform: translateY(-140px); } 100% { transform: translateY(1220px); } }
136        .ds-wx-drop { top: 0; width: 2px; height: 92px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,.6)); animation-name: dsWxRain; animation-timing-function: linear; animation-iteration-count: infinite; }
137        @keyframes dsWxSnow { 0% { transform: translate(0,-60px); } 100% { transform: translate(40px,1180px); } }
138        .ds-wx-flake { top: 0; animation-name: dsWxSnow; animation-timing-function: linear; animation-iteration-count: infinite; }
139        @keyframes dsWxFlash { 0%,92%,100% { opacity: 0; } 94% { opacity: .55; } 96% { opacity: .12; } 98% { opacity: .4; } }
140        .ds-wx-flash { animation: dsWxFlash 7s ease-out infinite; }
141        @keyframes dsWxBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
142        .ds-wx-bob { animation: dsWxBob 3.6s ease-in-out infinite; }
143        @media (prefers-reduced-motion: reduce) { .ds-wx-rays,.ds-wx-sun,.ds-wx-star,.ds-wx-cloud,.ds-wx-drop,.ds-wx-flake,.ds-wx-flash,.ds-wx-bob { animation: none !important; } }
144      `})]})}function Js({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){var J;const n=t.config||{},o=n.fields||{precip:!0,wind:!0},f=n.override_lat!=null?n.override_lat:l==null?void 0:l.lat,u=n.override_lng!=null?n.override_lng:l==null?void 0:l.lng,x=n.place_label||"",[c,m]=b.useState(null),[h,d]=b.useState(!1),g=`ds_wx_${f}_${u}`;b.useEffect(()=>{if(f==null||u==null)return;let $=!1;const F=async()=>{try{const Y=`https://api.open-meteo.com/v1/forecast?latitude=${f}&longitude=${u}&timezone=auto&forecast_days=7&current=temperature_2m,weather_code,relative_humidity_2m&daily=weather_
144code,temperature_2m_max,temperature_2m_min,precipitation_probability_max,wind_speed_10m_max,wind_direction_10m_dominant,sunrise,sunset`,W=await(await fetch(Y)).json();if($||!(W!=null&&W.daily))return;const z=W.daily,N={days:z.time.map((S,M)=>{var C,le,Z,Ae,Be,Ce,Ee,Re;const R=new Date(S+"T00:00:00");return{date:S,dayIdx:R.getDay(),dayName:Gs[R.getDay()],dateLabel:R.toLocaleDateString("he-IL",{day:"2-digit",month:"2-digit"}),code:(C=z.weather_code)==null?void 0:C[M],tmax:(le=z.temperature_2m_max)==null?void 0:le[M],tmin:(Z=z.temperature_2m_min)==null?void 0:Z[M],precip:(Ae=z.precipitation_probability_max)==null?void 0:Ae[M],wind:(Be=z.wind_speed_10m_max)==null?void 0:Be[M],windDir:(Ce=z.wind_direction_10m_dominant)==null?void 0:Ce[M],sunrise:(((Ee=z.sunrise)==null?void 0:Ee[M])||"").slice(11,16),sunset:(((Re=z.sunset)==null?void 0:Re[M])||"").slice(11,16)}}),current:W.current?{temp:Math.round(W.current.temperature_2m),code:W.current.weather_code,humidity:W.current.relative_humidity_2m}:null,ts:Date.now()};m(N),d(!1);try{localStorage.setItem(g,JSON.stringify(N))}catch{}}catch{if($)return;try{const Y=JSON.parse(localStorage.getItem(g)||"null");if(Y){m(Y);return}}catch{}d(!0)}};F();const ee=setInterval(F,36e5);return()=>{$=!0,clearInterval(ee)}},[f,u,g]);const v=(c==null?void 0:c.days)||[],p=n.view||"full",[j,k]=b.useState(0);b.useEffect(()=>{if(p!=="carousel"||v.length<2)return;const $=setInterval(()=>k(F=>(F+1)%v.length),5e3);return()=>clearInterval($)},[p,v.length]);const I=G.useMemo(()=>{const $=[];for(let F=0;F<v.length;F+=3)$.push(v.slice(F,F+3));return $},[v]),[P,B]=b.useState(0);if(b.useEffect(()=>{if(p!=="detailed"||I.length<2)return;const $=setInterval(()=>B(F=>(F+1)%I.length),8e3);return()=>clearInterval($)},[p,I.length]),f==null||u==null)return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden",dir:"rtl",style:{background:ve(1,!1)},children:[e.jsx(je,{code:1,night:!1}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:t.subtitle||"תחזית מזג האוויר",title:t.title||"תחזית שבועית",primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col items-center justify-center text-center px-8",children:[e.jsx(Qs,{}),e.jsx("div",{className:"text-4xl font-black text-slate-800 mt-4",children:"לא הוגדר מיקום לקיבוץ"}),e.jsx("div",{className:"text-2xl text-slate-600 mt-2",children:"יש לעדכן את מיקום הקיבוץ בהגדרות הסופר-אדמין כדי להציג תחזית."})]})]});if(!c)return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden",dir:"rtl",style:{background:ve(2,!1)},children:[e.jsx(je,{code:2,night:!1}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:t.subtitle||"תחזית מזג האוויר",title:t.title||"תחזית שבועית",primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col items-center justify-center text-center",children:[e.jsx("div",{className:"text-6xl mb-3",children:"⛅"}),e.jsx("div",{className:"text-4xl font-black text-slate-800",children:h?"התחזית מתעדכנת":"טוען תחזית…"}),h&&e.jsx("div",{className:"text-2xl text-slate-600 mt-2",children:"נתוני מזג האוויר יהיו זמינים בעוד זמן קצר."})]})]});const E=0,T=v[E],L=n.night_mode!==!1&&(T!=null&&T.sunrise)&&(T!=null&&T.sunset)?(()=>{const $=r.getHours()*60+r.getMinutes(),F=ee=>{const[Y,O]=ee.split(":").map(Number);return Y*60+O};return $<F(T.sunrise)||$>=F(T.sunset)})():!1,y=((J=c.current)==null?void 0:J.code)??(T==null?void 0:T.code),w=ve(y,L),_=$=>n.highlight_weekend!==!1&&($.dayIdx===5||$.dayIdx===6),D=n.alerts!==!1&&T?Vs(T):"",V=c.current?{temp:c.current.temp,code:c.current.code}:i;return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden",dir:"rtl",style:{background:w},children:[e.jsx(je,{code:y,night:L}),e.jsx(A,{design:l,now:r,weather:V,primary:s,secondary:a}),e.jsx(H,{kicker:t.subtitle||"התחזית לשבעת הימים הקרובים",title:`${t.title||"תחזית שבועית"}${x?` · ${x}`:""}`,primary:s,secondary:a,tone:L?"dark":void 0}),D&&e.jsxs("div",{className:"relative z-10 mx-12 mt-1 rounded-2xl bg-red-600/95 text-white px-5 py-2.5 flex items-center gap-2 text-xl font-black shadow-lg",children:[e.jsx("span",{children:"⚠️"})," ",D]}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 px-9 pb-6 pt-2",children:p==="central"?e.jsxs("div",{className:"w-full h-full flex gap-5",children:[e.jsx("div",{className:"w-[34%] h-full",children:e.jsx(re,{d:T,fields:{precip:!0,wind:!0,sun:!0},big:!0,today:!0,weekend:_(T),dark:L})}),e.jsx("div",{className:"flex-1 grid grid-cols-3 grid-rows-2 gap-4",children:v.slice(1).map($=>e.jsx(re,{d:$,fields:o,today:!1,weekend:_($),dark:L},$.date))})]}):p==="carousel"?e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center gap-4",children:[e.jsx("div",{className:"w-[40%] h-[80%
144]",children:e.jsx(re,{d:v[j]||T,fields:{precip:!0,wind:!0,sun:!0},big:!0,today:j===E,weekend:_(v[j]||T),dark:L})}),e.jsx("div",{className:`${L?"text-white/90":"text-slate-700"} text-2xl font-semibold text-center max-w-3xl`,children:Ks(v[j]||T)})]}):p==="detailed"?e.jsx("div",{className:"w-full h-full grid grid-cols-3 gap-5",children:(I[P]||v.slice(0,3)).map($=>e.jsx(re,{d:$,fields:{precip:!0,wind:!0,sun:!0,humidity:!0},big:!0,today:$===T,weekend:_($),dark:L},$.date))}):e.jsx("div",{className:"w-full h-full grid grid-cols-7 gap-3",children:v.map($=>e.jsx(re,{d:$,fields:o,today:$===T,weekend:_($),dark:L},$.date))})}),e.jsxs("div",{className:`relative z-10 px-12 pb-4 text-sm ${L?"text-white/55":"text-slate-500"}`,children:["מקור: Open-Meteo · עודכן ",new Date(c.ts).toLocaleTimeString("he-IL",{hour:"2-digit",minute:"2-digit"})]})]})}function Qs(){return e.jsx("div",{className:"text-7xl",children:"⛅"})}function ht(t){return String(t||"").replace(/<script[\s\S]*?<\/script>/gi,"").replace(/ on\w+="[^"]*"/gi,"").replace(/ on\w+='[^']*'/gi,"").replace(/javascript:/gi,"")}const Ke={s:{w:"52%",h:"52%"},m:{w:"70%",h:"68%"},l:{w:"90%",h:"86%"}};function ea(t){const l=String(t||"").replace(/<[^>]+>/g," ").replace(/&nbsp;/g," ").replace(/\s+/g," ").trim().length,r=(String(t||"").match(/<img\b/gi)||[]).length;return r>=1&&l>80||l>220?"l":l>60||r>=1?"m":"s"}function ta({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=rt(t);if(n)return e.jsx(ct,{canvas:n,live:!0,durationSec:t==null?void 0:t.duration,className:"w-full h-full"});const o=ht(t.body_html||""),f=t.size&&t.size!=="auto"?t.size:ea(o),u=Ke[f]||Ke.m;return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden",dir:"rtl",style:{background:"linear-gradient(160deg, #eef2f7 0%, #ffffff 45%, #e8eef6 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
144acity-[0.13]",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-52 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.12]",style:{background:t.accent||a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),t.title&&e.jsx(H,{kicker:"עדכון קהילתי",title:t.title,primary:s,secondary:t.accent||a}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 grid place-items-center px-10 pb-8 pt-2",children:t.missing?e.jsxs("div",{className:"text-center text-slate-500",children:[e.jsx(ie,{className:"w-16 h-16 mx-auto mb-3 text-slate-300"}),e.jsx("div",{className:"text-3xl font-black text-slate-700",children:"עמוד התוכן אינו זמין"}),e.jsx("div",{className:"text-xl mt-1",children:"ייתכן שהעמוד נמחק מספריית התוכן."})]}):o?e.jsx("div",{className:"bg-white rounded-3xl shadow-2xl overflow-auto ds-cp-card",style:{width:u.w,height:u.h,boxShadow:`0 40px 90px -40px ${s}66`,borderTop:`6px solid ${t.accent||s}`},children:e.jsx("div",{className:"p-8 text-slate-900 text-center h-full flex flex-col justify-center",dangerouslySetInnerHTML:{__html:o}})}):e.jsx("div",{className:"text-3xl font-black text-slate-400",children:"עמוד תוכן ריק"})}),e.jsx("style",{children:`
145        .ds-cp-card{font-size:2rem;line-height:1.4}
146        .ds-cp-card h1,.ds-cp-card h2{font-weight:900;font-size:3rem;margin:0 0 .4em;line-height:1.1}
147        .ds-cp-card h3{font-weight:800;font-size:2.3rem;margin:0 0 .3em}
148        .ds-cp-card p{margin:0 0 .5em}
149        .ds-cp-card ul,.ds-cp-card ol{display:inline-block;text-align:right;margin:.3em 0;padding-inline-start:1.2em}
150        .ds-cp-card img{max-width:100%;max-height:42vh;border-radius:14px;margin:.5em auto;display:block;object-fit:contain}
151        .ds-cp-card a{color:inherit}
152      `})]})}function sa({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=Array.isArray(t.cards)?t.cards:[],o=8,f=G.useMemo(()=>{const m=[];for(let h=0;h<n.length;h+=o)m.push(n.slice(h,h+o));return m.length?m:[[]]},[n]),[u,x]=b.useState(0);b.useEffect(()=>{if(f.length<2)return;const m=setInterval(()=>x(h=>(h+1)%f.length),12e3);return()=>clearInterval(m)},[f.length]);const c=f[u]||[];return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(160deg, #f5f3ff 0%, #ffffff 45%, #ede9fe 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
152acity-[0.14]",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-52 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.12]",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:"עדכני מהאתר",title:t.title||"מידע",primary:s,secondary:a}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 px-9 pb-8 pt-2",children:t.missing||!n.length?e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-slate-400 gap-3",children:[e.jsx(ie,{className:"w-20 h-20 text-slate-200"}),e.jsx("p",{className:"text-2xl",children:t.missing?"העמוד המקושר אינו זמין":"אין כרטסיות להצגה בעמוד זה"})]}):e.jsx("div",{className:"grid grid-cols-4 gap-5 h-full animate-soft-fade",style:{gridAutoRows:"1fr"},children:c.map((m,h)=>e.jsxs("div",{className:"relative rounded-2xl overflow-hidden bg-white ring-1 ring-black/5 flex flex-col",style:{boxShadow:`0 24px 48px -30px ${s}66`},children:[e.jsxs("div",{className:"relative flex-1 min-h-0 bg-slate-100",children:[m.image?e.jsx("img",{src:m.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 grid place-items-center",style:{background:`linear-gradient(135deg, ${s}, ${a})`},children:e.jsx(ie,{className:"w-16 h-16 text-white/70"})}),t.show_qr&&(m.url||t.page_url)&&e.jsx("div",{className:"absolute bottom-2 left-2 bg-white rounded-xl p-1.5 shadow-lg ring-1 ring-black/5",children:e.jsx(ae,{value:m.url||t.page_url,size:92,includeMargin:!1})})]}),m.title&&e.jsx("div",{className:"p-3 border-t border-slate-100",children:e.jsx("p",{className:"text-xl font-black text-slate-800 line-clamp-2 leading-tight",children:m.title})})]},h))},u)})]})}const aa={alotHaShachar:"עלות השחר",misheyakir:"משיכיר",dawn:"עלות השחר",sunrise:"הנץ החמה",sofZmanShmaMGA:"סו״ז ק״ש (מג״א)",sofZmanShma:"סוף זמן ק״ש",sofZmanTfilla:"סוף זמן תפילה",chatzot:"חצות היום",minchaGedola:"מנחה גדולה",minchaKetana:"מנחה קטנה",plagHaMincha:"פלג המנחה",sunset:"שקיעה",tzeit:"צאת הכוכבים"},we=t=>String(t||"").slice(11,16);function de({className:t="",style:l}){return e.jsx("svg",{viewBox:"0 0 100 100",className:t,style:l,"aria-hidden":"true",children:e.jsx("path",{d:"M50 4 L61 24 84 24 72 44 84 64 61 64 50 84 39 64 16 64 28 44 16 24 39 24 Z",fill:"none",stroke:"currentColor",strokeWidth:"4",strokeLinejoin:"round"})})}function Ne({slide:t,design:l,now:r,weather:i,primary:s,secondary:a,place:n,children:o}){return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden",dir:"rtl",style:{background:"linear-gradient(160deg, #f7f3e8 0%, #eef1f8 45%, #e7ecf6 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
152acity-[0.13]",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-52 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.12]",style:{background:a}}),e.jsx(de,{className:"absolute -bottom-16 -left-10 w-[34vh] h-[34vh]",style:{color:s,opacity:.05}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:t.subtitle||"בית הכנסת",title:`${t.title||"לוח זמנים — בית הכנסת"}${n?` · ${n}`:""}`,primary:s,secondary:a}),o]})}function Ve({icon:t,title:l,primary:r}){return e.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[e.jsx("span",{className:"w-10 h-10 rounded-xl flex items-center justify-center text-xl flex-none",style:{background:`${r}14`,color:r},children:t}),e.jsx("span",{className:"text-3xl font-black text-slate-800",children:l})]})}function la({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.config||{},o=n.override_lat!=null?n.override_lat:l==null?void 0:l.lat,f=n.override_lng!=null?n.override_lng:l==null?void 0:l.lng,u=n.tzid||"Asia/Jerusalem",x=n.place_label||"",c=Array.isArray(n.prayers)?n.prayers.filter(y=>y&&(y.label||y.time)):[],m=Array.isArray(n.zmanim_keys)&&n.zmanim_keys.length?n.zmanim_keys:["sunrise","sofZmanShma","sofZmanTfilla","chatzot","minchaGedola","plagHaMincha","sunset","tzeit"],h=n.show_zmanim!==!1,d=n.show_shabbat!==!1,g=n.show_hebrew_date!==!1,v=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,[p,j]=b.useState(null),[k,I]=b.useState(!1),P=`ds_syn_${o}_${f}_${v}`;b.useEffect(()=>{if(o==null||f==null)return;let y=!1;const w=async()=>{try{const D=`https://www.hebcal.com/zmanim?cfg=json&latitude=${o}&longitude=${f}&tzid=${encodeURIComponent(u)}&date=${v}`,V=`https://www.hebcal.com/shabbat?cfg=json&latitude=${o}&longitude=${f}&tzid=${encodeURIComponent(u)}&lg=he&M=on`,J=`https://www.hebcal.com/converter?cfg=json&date=${v}&g2h=1&lg=h`,[$,F,ee]=await Promise.all([fetch(D),fetch(V),fetch(J)]),[Y,O,W]=await Promise.all([$.json(),F.json(),ee.json()]);if(y)return;const z=(Y==null?void 0:Y.times)||{},te={alotHaShachar:z.alotHaShachar||z.dawn,misheyakir:z.misheyakir,sunrise:z.sunrise,sofZmanShma:z.sofZmanShma,sofZmanShmaMGA:z.sofZmanShmaMGA,sofZmanTfilla:z.sofZmanTfilla,chatzot:z.chatzot,minchaGedola:z.minchaGedola,minchaKetana:z.minchaKetana,plagHaMincha:z.plagHaMincha,sunset:z.sunset,tzeit:z.tzeit7083deg||z.tzeit85deg||z.tzeit42min||z.tzeit50min},N=Array.isArray(O==null?void 0:O.items)?O.items:[],S=N.find(Z=>Z.category==="candles"),M=N.find(Z=>Z.category==="havdalah"),R=N.find(Z=>Z.category==="parashat"),C=N.find(Z=>Z.category==="holiday"),le={zman:te,hebrewDate:(W==null?void 0:W.hebrew)||"",candles:S?we(S.date):"",candlesTitle:(S==null?void 0:S.title)||"",havdalah:M?we(M.date):"",parasha:(R==null?void 0:R.hebrew)||(R==null?void 0:R.title)||"",holiday:(C==null?void 0:C.hebrew)||(C==null?void 0:C.title)||"",ts:Date.now()};j(le),I(!1);try{localStorage.setItem(P,JSON.stringify(le))}catch{}}catch{if(y)return;try{const D=JSON.parse(localStorage.getItem(P)||"null");if(D){j(D);return}}catch{}I(!0)}};w();const _=setInterval(w,36e5);return()=>{y=!0,clearInterval(_)}},[o,f,u,v,P]);const B={slide:t,design:l,now:r,weather:i,primary:s,secondary:a,place:x,showHebrewDate:g,data:p};if(o==null||f==null)return e.jsx(Ne,{...B,children:e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col items-center justify-center text-center px-8",children:[e.jsx(de,{className:"w-24 h-24",style:{color:s}}),e.jsx("div",{className:"text-4xl font-black text-slate-800 mt-4",children:"לא הוגדר מיקום לקהילה"}),e.jsx("div",{className:"text-2xl text-slate-600 mt-2",children:"יש לעדכן את מיקום הקהילה בהגדרות הסופר-אדמין כדי לחשב את הזמנים."})]})});if(!p)return e.jsx(Ne,{...B,children:e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col items-center justify-center text-center",children:[e.jsx("div",{className:"text-6xl mb-3",children:"🕍"}),e.jsx("div",{className:"text-4xl font-black text-slate-800",children:k?"הזמנים מתעדכנים":"טוען זמנים…"})]})});const E=m.map(y=>({key:y,label:aa[y]||y,time:we(p.zman[y])})).filter(y=>y.time),T=c.length>0,q=h&&E.length>0,L=d&&(p.parasha||p.candles||p.havdalah);return e.jsx(Ne,{...B,children:e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 px-9 pt-1 pb-3 flex flex-col gap-4",children:[g&&(p.hebrewDate||p.holiday)&&e.jsxs("div",{className:"flex items-center justify-center gap-4",children:[e.jsx("span",{className:"h-px flex-1 max-w-[22%]",style:{background:`linear-gradient(to left, ${s}55, transparent)`}}),e.jsx("span",{className:"text-3xl font-black text-slate-800 tracking-tight",children:p.hebrewDate}),p.holiday&&e.jsx("span",{className:"text-2xl font-black px-4 py-1 rounded-full text-white",style:{background:`linear-gradient(90deg, ${s}, ${a})`},children:p.holiday}),e.jsx("span",{className:"h-px flex-1 max-w-[22%]",style:{background:`linear-gradient(to right, ${s}55, transparent)`}})]}),e.jsxs("div",{className:`flex-1 min-h-0 grid gap-5 ${T&&q?"grid-cols-2":"grid-cols-1"}`,children:[T&&e.jsxs("div",{className:"min-h-0 flex flex-col",children:[e.jsx(Ve,{icon:e.jsx(de,{className:"w-5 h-5"}),title:"זמני התפילות",primary:s}),e.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-2.5",children:c.slice(0,6).map((y,w)=>e.jsxs("div",{className:"flex-1 min-h-0 rounded-2xl bg-white shadow-sm flex items-center gap-4 px-6 overflow-hidden",style:{borderRight:`7px solid ${s}`,boxShadow:"0 10px 24px -18px rgba(15,23,42,0.5)"},children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-4xl font-black text-slate-800 truncate leading-none",children:y.label||"תפילה"}),y.note&&e.jsx("div",{className:"text-lg text-slate-500 truncate mt-1.5",children:y.note})]}),e.jsx("div",{className:"text-6xl font-black tabular-nums flex-none leading-none",dir:"ltr",style:{color:y.time?s:"#cbd5e1"},children:y.time||"—"})]},w))})]}),q&&e.jsxs("div",{className:"min-h-0 flex flex-col",children:[e.jsx(Ve,{icon:"🕛",title:"זמני היום",primary:s}),e.jsx("div",{className:"flex-1 min-h-0 rounded-3xl bg-white/80 backdrop-blur-sm px-6 py-2 shadow-sm flex flex-col",style:{border:`1px solid ${s}1f`},children:E.map(y=>e.jsxs("div",{className:"flex-1 min-h-0 flex items-center justify-between border-b border-slate-200/70 last:border-0",children:[e.jsx("span",{className:"text-2xl font-semibold text-slate-600",children:y.label}),e.jsx("span",{className:"text-3xl font-black tabular-nums text-slate-900",dir:"ltr",children:y.time})]},y.key))})]})]}),L&&e.jsxs("div",{className:"rounded-3xl px-7 py-4 text-white shadow-lg flex items-center gap-6 flex-none",style:{background:`linear-gradient(120deg, ${s}, ${a})`},children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx(de,{className:"w-12 h-12 text-white/90 flex-none"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xl font-bold text-white/80",children:"פרשת השבוע"}),e.jsx("div",{className:"text-4xl font-black truncate",children:p.parasha||"—"})]})]}),p.candles&&e.jsxs("div",{className:"text-center flex-none px-4",children:[e.jsx("div",{className:"text-lg font-bold text-white/80",children:"כניסת השבת"}),e.jsx("div",{className:"text-5xl font-black tabular-nums",dir:"ltr",children:p.candles})]}),p.candles&&p.havdalah&&e.jsx("span",{className:"w-px h-14 bg-white/25 flex-none"}),p.havdalah&&e.jsxs("div",{className:"text-center flex-none px-4",children:[e.jsx("div",{className:"text-lg font-bold text-white/80",children:"צאת השבת"}),e.jsx("div",{className:"text-5xl font-black tabular-nums",dir:"ltr",children:p.havdalah})]})]}),e.jsxs("div",{className:"text-xs text-slate-400 text-left flex-none",children:["מקור הזמנים: Hebcal · עודכן ",new Date(p.ts).toLocaleTimeString("he-IL",{hour:"2-digit",minute:"2-digit"})]})]})})}const se=[{bar:"#10b981",ring:"#34d399",soft:"#ecfdf5",text:"#065f46"},{bar:"#3b82f6",ring:"#60a5fa",soft:"#eff6ff",text:"#1e40af"},{bar:"#f59e0b",ring:"#fbbf24",soft:"#fffbeb",text:"#92400e"},{bar:"#f43f5e",ring:"#fb7185",soft:"#fff1f2",text:"#9f1239"},{bar:"#8b5cf6",ring:"#a78bfa",soft:"#f5f3ff",text:"#5b21b6"},{bar:"#14b8a6",ring:"#2dd4bf",soft:"#f0fdfa",text:"#115e59"}],na=["ניהול פרטי העסק","שעות פעילות","קופונים ומבצעים","תקשורת עם לקוחות","גלריית תמונות","גלריית סרטונים"],ra=["חשיפה לתושבים ולסביבה","השפעה אורגנית אמיתית","עמוד עסקי מעוצב","קידום בגוגל וברשתות"],ia=["בעלי מקצוע","מזון ומסעדות","בריאות וטיפול","חינוך והדרכה","ספורט וכושר","שירותים לבית","רכב ותחבורה","יופי וטיפוח","מסחר וקניות"];function oa({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.businesses||[],o=t.view||"auto",[f,u]=b.useState(o==="marketing"?"promo":"list");b.useEffect(()=>{if(o==="marketing"||!n.length){u("promo");return}if(o==="listing"){u("list");return}const v=setInterval(()=>u(p=>p==="list"?"promo":"list"),8e3);return()=>clearInterval(v)},[o,n.length]);
152const x=[...new Set(n.map(v=>v.category).filter(Boolean))],c=(x.length>=4?x:ia).slice(0,9),[m,h]=b.useState(0);b.useEffect(()=>{if(f!=="list"||n.length<2)return;const v=setInterval(()=>h(p=>(p+1)%n.length),7e3);return()=>clearInterval(v)},[f,n.length]);const d=n[m]||n[0]||null,g=n.length?[1,2,3].map(v=>n[(m+v)%n.length]).filter((v,p,j)=>v&&v!==d&&j.indexOf(v)===p).slice(0,3):[];return e.jsxs("div",{className:"relative w-full h-full flex flex-col text-slate-900 overflow-hidden",dir:"rtl",style:{background:"linear-gradient(160deg, #e7ebf2 0%, #eef2f7 45%, #e3e8f0 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl opacity-[0.14]",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.12]",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:f==="promo"?"הצטרפו לאינדקס העסקים הקהילתי":"פרסמו כאן הטבות ושירותים לחברים",title:f==="promo"?"יש לכם עסק בקהילה? זה הזמן להצטרף":t.title||"מפרגנים לעסקים מקומיים",primary:s,secondary:a}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 py-4 px-9",children:f==="list"&&n.length?e.jsxs("div",{className:"w-full h-full grid grid-cols-12 gap-6",children:[e.jsx("div",{className:"col-span-4 min-h-0",children:d&&(()=>{const v=se[m%se.length],p=d.logo||d.image,j=({icon:k,children:I,ltr:P})=>I?e.jsxs("div",{className:"flex items-center gap-2 text-slate-600 min-w-0",children:[e.jsx(k,{className:"w-5 h-5 flex-shrink-0",style:{color:v.bar}}),e.jsx("span",{className:`text-xl font-semibold truncate ${P?"tabular-nums":""}`,dir:P?"ltr":void 0,children:I})]}):null;return e.jsxs("div",{className:"h-full rounded-3xl overflow-hidden bg-white flex flex-col animate-soft-fade",style:{border:`3px solid ${v.ring}`,boxShadow:`0 40px 80px -36px ${v.bar}`},children:[e.jsxs("div",{className:"relative h-[38%] flex items-center justify-center p-6 bg-white border-b",style:{borderColor:`${v.ring}33`},children:[p?e.jsx("img",{src:p,alt:"",className:"max-h-full max-w-[82%] object-contain"}):e.jsx(U,{className:"w-20 h-20",style:{color:v.ring}}),d.featured&&e.jsxs("span",{className:"absolute top-4 right-4 inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-black text-white",style:{background:`linear-gradient(90deg, ${s}, ${a})`},children:[e.jsx(Q,{className:"w-4 h-4"})," מומלץ"]})]}),e.jsxs("div",{className:"p-6 flex-1 flex flex-col min-h-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-2",children:[d.category&&e.jsx("span",{className:"text-sm font-bold px-3 py-1 rounded-full",style:{background:v.soft,color:v.text},children:d.category}),e.jsx("span",{className:"text-sm font-bold px-3 py-1 rounded-full",style:{background:`${s}12`,color:s},children:"עסק מקומי"}),d.coupon&&e.jsxs("span",{className:"text-sm font-bold px-3 py-1 rounded-full text-white",style:{background:v.bar},children:["🎁 ",d.coupon]})]}),e.jsx("h2",{className:"text-4xl font-black leading-tight line-clamp-2",style:{color:v.text},children:d.name}),d.text&&e.jsx("p",{className:"text-lg text-slate-500 leading-snug line-clamp-3 mt-2",children:d.text}),e.jsxs("div",{className:"mt-auto space-y-2 pt-3",children:[e.jsx(j,{icon:ye,ltr:!0,children:d.phone}),e.jsx(j,{icon:xe,children:d.address}),e.jsx(j,{icon:U,ltr:!0,children:d.website||d.email}),e.jsx(j,{icon:st,children:d.owner})]})]})]},m)})()}),e.jsx("div",{className:"col-span-8 min-h-0 grid grid-rows-3 gap-4",children:g.map((v,p)=>{const j=se[(m+p+1)%se.length],k=v.logo||v.image;return e.jsxs("div",{className:"min-h-0 rounded-2xl overflow-hidden bg-white ring-1 ring-black/5 flex animate-soft-fade",style:{boxShadow:`0 22px 44px -26px ${j.bar}`},children:[e.jsxs("div",{className:"flex-1 p-6 flex flex-col justify-center min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[v.category&&e.jsx("span",{className:"text-xs font-bold px-2.5 py-1 rounded-full",style:{background:j.soft,color:j.text},children:v.category}),v.featured&&e.jsx("span",{className:"text-xs font-black px-2.5 py-1 rounded-full text-white",style:{background:`linear-gradient(90deg, ${s}, ${a})`},children:"מומלץ"}),v.coupon&&e.jsxs("span",{className:"text-xs font-bold px-2.5 py-1 rounded-full text-white",style:{background:j.bar},children:["🎁 ",v.coupon]})]}),e.jsx("h3",{className:"text-3xl font-black leading-tight line-clamp-1",style:{color:j.text},children:v.name}),v.text&&e.jsx("p",{className:"text-base text-slate-500 line-clamp-1 mt-0.5",children:v.text}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 mt-2 text-base text-slate-500",children:[v.phone&&e.jsxs("span",{className:"inline-flex items-center gap-1.5",dir:"ltr",children:[e.jsx(ye,{className:"w-4 h-4",style:{color:j.bar}})," ",v.phone]}
152),v.address&&e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(xe,{className:"w-4 h-4",style:{color:j.bar}})," ",v.address]})]})]}),e.jsx("div",{className:"w-[34%] flex-shrink-0 flex items-center justify-center p-4 bg-white border-r",style:{borderColor:`${j.ring}33`},children:k?e.jsx("img",{src:k,alt:"",className:"max-h-24 max-w-[85%] object-contain"}):e.jsx(U,{className:"w-14 h-14",style:{color:j.ring}})})]},`${m}-${p}`)})})]}):e.jsxs("div",{className:"h-full grid grid-cols-12 gap-7 animate-soft-fade",children:[e.jsxs("div",{className:"col-span-5 min-h-0 rounded-3xl bg-white ring-1 ring-black/5 p-9 flex flex-col",style:{boxShadow:"0 40px 80px -40px rgba(15,23,42,0.4)"},children:[e.jsxs("span",{className:"inline-flex items-center gap-2 self-start px-4 py-1.5 rounded-full text-base font-black text-white mb-6",style:{background:`linear-gradient(90deg, ${s}, ${a})`},children:[e.jsx(Q,{className:"w-4 h-4"})," אינדקס העסקים הקהילתי"]}),e.jsx("h3",{className:"text-5xl font-black leading-[1.1] mb-3",style:{color:s},children:"יש לכם עסק בקהילה?"}),e.jsx("p",{className:"text-2xl font-bold text-slate-500 leading-snug mb-7",children:"פרסמו את העסק שלכם באינדקס הקהילתי והגיעו לכל התושבים."}),e.jsx("div",{className:"space-y-3.5 mb-auto",children:ra.map((v,p)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0",style:{background:`${s}18`,color:s},children:e.jsx(Pe,{className:"w-5 h-5"})}),e.jsx("span",{className:"text-2xl font-bold text-slate-700",children:v})]},p))}),e.jsxs("div",{className:"flex items-center justify-center gap-3 h-16 rounded-2xl text-white text-3xl font-black mt-8",style:{background:`linear-gradient(90deg, ${s}, ${a})`,boxShadow:`0 22px 40px -16px ${s}`},children:[e.jsx(at,{className:"w-8 h-8"})," הוספת עסק לאינדקס"]})]}),e.jsxs("div",{className:"col-span-7 min-h-0 flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-4",children:[e.jsx(U,{className:"w-6 h-6",style:{color:a}}),e.jsx("span",{className:"text-2xl font-black text-slate-600",children:"קטגוריות באינדקס העסקים"})]}),e.jsx("div",{className:"grid grid-cols-3 grid-rows-3 gap-4 flex-1 min-h-0",children:c.map((v,p)=>{const j=se[p%se.length];return e.jsxs("div",{className:"rounded-2xl bg-white ring-1 ring-black/5 flex flex-col items-center justify-center text-center gap-3 p-4",style:{boxShadow:`0 20px 36px -26px ${j.bar}`},children:[e.jsx("span",{className:"w-14 h-14 rounded-2xl flex items-center justify-center flex-shrink-0",style:{background:j.soft,color:j.bar},children:e.jsx(U,{className:"w-8 h-8"})}),e.jsx("span",{className:"text-xl font-black leading-tight line-clamp-2",style:{color:j.text},children:v})]},p)})}),e.jsx("div",{className:"flex flex-wrap gap-2.5 mt-4",children:na.map((v,p)=>e.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/70 ring-1 ring-black/5 text-lg font-bold text-slate-600",children:[e.jsx(Pe,{className:"w-4 h-4 flex-shrink-0",style:{color:s}})," ",v]},p))})]})]},"promo")})]})}function ca({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.events||[],o=t.banners||[],[f,u]=b.useState(0),[x,c]=b.useState(0);b.useEffect(()=>{if(n.length<2)return;const d=setInterval(()=>u(g=>(g+1)%n.length),6e3);return()=>clearInterval(d)},[n.length]),b.useEffect(()=>{if(o.length<2)return;const d=setInterval(()=>c(g=>(g+1)%o.length),7e3);return()=>clearInterval(d)},[o.length]);const m=n[f]||null,h=({icon:d,value:g})=>g?e.jsxs("span",{className:"inline-flex items-center gap-2 text-2xl font-semibold text-white/90",children:[e.jsx(d,{className:"w-6 h-6 opacity-80"})," ",g]}):null;return e.jsxs("div",{className:"relative w-full h-full flex flex-col bg-slate-50 text-slate-900 overflow-hidden",dir:"rtl",children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45v
152w] rounded-full blur-3xl opacity-[0.18] ds-nb-a",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.16] ds-nb-b",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:"מחכים לך באירוע הבא",title:t.title||"אירועים קרובים",primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 grid grid-cols-12 gap-6 px-12 pb-6 pt-2",children:[e.jsx("div",{className:"col-span-8 min-h-0",children:m?e.jsxs("div",{className:"h-full rounded-[2rem] overflow-hidden shadow-2xl relative bg-slate-800 animate-soft-fade ring-1 ring-black/5",children:[m.image?e.jsx("img",{src:m.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(160deg, ${s}, ${a})`}}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to top, rgba(0,0,0,0.92), rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.05))"}}),m.category&&e.jsx("span",{className:"absolute top-7 right-7 inline-flex items-center gap-2 px-5 py-2 rounded-full text-lg font-black text-white shadow-xl",style:{background:s,boxShadow:`0 12px 24px -8px ${s}`},children:m.category}),m.is_external&&m.external_url&&e.jsxs("div",{className:"absolute top-7 left-7 bg-white rounded-2xl p-4 shadow-2xl flex flex-col items-center gap-2 ring-1 ring-black/5",children:[e.jsx(ae,{value:m.external_url,size:128,level:"M"}),e.jsx("span",{className:"text-slate-800 text-lg font-black",children:m.external_action_type==="purchase"?"סרקו לרכישת כרטיסים":m.external_action_type==="registration"?"סרקו להרשמה":"סרקו לפרטים"})]}),e.jsxs("div",{className:"absolute bottom-0 inset-x-0 p-12 text-white",children:[e.jsx("h2",{className:"text-6xl font-black leading-tight mb-5 line-clamp-2 drop-shadow",children:m.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-8 gap-y-3 mb-5",children:[e.jsx(h,{icon:ge,value:fe(m.date)}),e.jsx(h,{icon:tt,value:m.time}),e.jsx(h,{icon:xe,value:m.location}),e.jsx(h,{icon:st,value:m.audience})]}),m.text&&e.jsx("p",{className:"text-3xl leading-relaxed text-white/90 line-clamp-4 max-w-5xl",children:m.text})]})]},f):e.jsx("div",{className:"h-full rounded-[2rem] bg-white shadow flex items-center justify-center text-slate-400 text-2xl",children:"אין אירועים קרובים"})}),t.view==="central"?e.jsxs("div",{className:"col-span-4 min-h-0 grid grid-rows-4 gap-3",children:[n.filter((d,g)=>g!==f).slice(0,4).map((d,g)=>e.jsxs("div",{className:"rounded-2xl overflow-hidden bg-white ring-1 ring-black/5 flex animate-soft-fade",style:{boxShadow:`0 20px 40px -26px ${s}66`},children:[e.jsx("div",{className:"w-2/5 flex-shrink-0 bg-slate-100",children:d.image?e.jsx("img",{src:d.image,alt:"",className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{background:`linear-gradient(160deg, ${s}, ${a})`},children:e.jsx(ge,{className:"w-8 h-8 text-white/70"})})}),e.jsxs("div",{className:"flex-1 p-4 min-w-0 flex flex-col justify-center",children:[e.jsx("h3",{className:"text-2xl font-black leading-tight line-clamp-2",style:{color:s},children:d.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-0.5 text-sm text-slate-500 mt-1",children:[d.date&&e.jsx("span",{children:fe(d.date)}),d.time&&e.jsxs("span",{children:["· ",d.time]}),d.location&&e.jsxs("span",{children:["· ",d.location]})]})]})]},g)),n.filter((d,g)=>g!==f).length===0&&e.jsx("div",{className:"row-span-4 rounded-2xl bg-white/70 ring-1 ring-black/5 flex items-center justify-center text-slate-400 text-xl",children:"אין אירועים נוספים"})]}):e.jsx("div",{className:"col-span-4 min-h-0",children:e.jsx("div",{className:"h-full rounded-[2rem] overflow-hidden bg-white ring-1 ring-black/5",style:{boxShadow:`0 30px 60px -20px ${s}66, 0 12px 24px -12px rgba(0,0,0,0.25)`},children:o.length?e.jsx("img",{src:o[x],alt:"",className:"w-full h-full object-cover animate-soft-fade"},x):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-center p-8",style:{background:`linear-gradient(160deg, ${s}, ${a})`},children:[(l==null?void 0:l.logo_url)&&e.jsx("img",{src:l.logo_url,alt:"",className:"h-24 object-contain mb-6 bg-white/90 rounded-3xl p-3"}),e.jsx("span",{className:"w-16 h-16 rounded-2xl bg-white/20 backdrop-blur flex items-center justify-center mb-5",children:e.jsx(ge,{className:"w-8 h-8 text-white"})}),e.jsx("p",{className:"text-white text-3xl font-black leading-tight",children:"כל האירועים במקום אחד"}),e.jsxs("p",{className:"text-white/85 text-xl mt-3 flex items-center gap-2",children:[e.jsx(Q,{className:"w-5 h-5"})," שלא תפספסו כלום"]})]})})})]}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}"})]})}const gt=t=>`${String(t.getHours()).padStart(2,"0")}
152:${String(t.getMinutes()).padStart(2,"0")}`;function Ie(t,l){const r=(t||[]).find(n=>Number(n.day)===l.getDay());if(!r||r.is_open===!1||!(r.time_slots||[]).length)return{open:!1,closedToday:!0,slots:[]};const i=(r.time_slots||[]).filter(n=>n&&n.from&&n.to);if(!i.length)return{open:!1,closedToday:!0,slots:[]};const s=gt(l);return{open:i.some(n=>s>=n.from&&s<=n.to),closedToday:!1,slots:i,day_note:r.day_note||""}}const Me=["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"];function Te(t){return Array.from({length:7},(l,r)=>{const i=(t||[]).find(a=>Number(a.day)===r),s=i&&i.is_open!==!1?(i.time_slots||[]).filter(a=>a&&a.from&&a.to):[];return{day:r,open:s.length>0,slots:s}})}function pt(t,l,r){var s;const i=(((s=t[l])==null?void 0:s.slots)||[]).find(a=>r<a.from);if(i)return{label:"היום",time:i.from};for(let a=1;a<=7;a++){const n=t[(l+a)%7];if(n.open)return{label:a===1?"מחר":`ביום ${Me[n.day]}`,time:n.slots[0].from}}return null}function da({service:t,now:l,primary:r,secondary:i}){var m;const s=Ie(t.schedule,l),a=Te(t.schedule),n=l.getDay(),o=gt(l),f=!s.closedToday&&s.open;let u;if(f){const h=s.slots.find(d=>o>=d.from&&o<=d.to);u={tone:"open",text:"פתוח עכשיו",sub:h?`נסגר ${h.to}`:""}}else{const h=pt(a,n,o);u={tone:(s.closedToday||!(((m=a[n])==null?void 0:m.slots)||[]).some(g=>o<g.from))&&s.closedToday?"closedToday":"closed",text:s.closedToday?"סגור היום":"סגור כעת",sub:h?`נפתח ${h.label} ${h.time}`:""}}const x=t.contacts||[],c=f?"linear-gradient(135deg,#16a34a,#22c55e)":u.tone==="closedToday"?"linear-gradient(135deg,#64748b,#94a3b8)":"linear-gradient(135deg,#dc2626,#ef4444)";return e.jsxs("div",{className:"h-full rounded-[1.6rem] overflow-hidden bg-white ring-1 ring-black/5 flex flex-col relative",style:{boxShadow:`0 26px 50px -24px ${r}66, 0 8px 18px -10px rgba(0,0,0,0.22)`},children:[e.jsx("div",{className:"h-2.5 w-full flex-shrink-0",style:{background:`linear-gradient(90deg, ${r}, ${i})`}}),e.jsxs("div",{className:"flex flex-col flex-1 min-h-0 p-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 flex-shrink-0",children:[e.jsxs("div",{className:"min-w-0",children:[t.category&&e.jsx("p",{className:"text-base font-bold tracking-wide",style:{color:i},children:t.category}),e.jsx("h3",{className:"text-3xl font-black leading-tight line-clamp-2",style:{color:r},children:t.name})]}),t.image?e.jsx("img",{src:t.image,alt:"",className:"w-16 h-16 rounded-xl object-cover flex-shrink-0 ring-1 ring-black/5"}):e.jsx(ut,{size:54,color:r,accent:i,className:"flex-shrink-0"})]}),e.jsxs("div",{className:`mt-3 flex-1 min-h-0 rounded-2xl px-6 py-6 flex flex-col items-center justify-center text-center gap-3 ${f?"ds-pulse-open":""}`,style:{background:c},children:[e.jsx("span",{className:"w-4 h-4 rounded-full bg-white/90"}),e.jsx("div",{className:"text-white text-5xl font-black leading-none",children:u.text}),u.sub&&e.jsx("div",{className:"text-white/90 text-3xl font-extrabold leading-none",children:u.sub})]}),e.jsxs("div",{className:"mt-auto pt-3 flex-shrink-0",children:[x.length>0&&e.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:x.slice(0,2).map((h,d)=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-base text-slate-600",children:[e.jsx(ye,{className:"w-4 h-4",style:{color:i}})," ",e.jsx("span",{dir:"ltr",className:"tabular-nums font-bold",children:h.phone||h.name})]},d))}),t.location&&e.jsxs("p",{className:"mt-1.5 text-base text-slate-500 flex items-center gap-1.5 line-clamp-1",children:[e.jsx(xe,{className:"w-5 h-5 flex-shrink-0"})," ",t.location]})]})]})]})}function xa({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.services||[],o=t.view||"carousel",[f,u]=b.useState(0);b.useEffect(()=>{if(o!=="expanded"||n.length<2)return;const d=setInterval(()=>u(g=>(g+1)%n.length),9e3);return()=>clearInterval(d)},[o,n.length]);const x=n[f]||n[0]||null,c=x?Ie(x.schedule,r):null,m=c&&!c.closedToday&&c.open,h=x?Te(x.schedule):[];return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(165deg, #ffffff 0%, #eaf1fb 55%, #e4eefb 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45v
152w] rounded-full blur-3xl opacity-[0.16] ds-nb-a",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.14] ds-nb-b",style:{background:a}}),e.jsx(ut,{size:640,color:s,accent:a,className:"absolute -bottom-48 -left-28 opacity-[0.05]"})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:"מתי פתוח · עדכני לרגע זה",title:t.title||"שעות פעילות",primary:s,secondary:a}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 py-4 px-9",children:n.length?o==="expanded"&&x?e.jsxs("div",{className:"w-full h-full grid gap-6 animate-soft-fade",style:{gridTemplateColumns:"1fr 1fr"},children:[e.jsxs("div",{className:"relative rounded-3xl overflow-hidden bg-slate-800 ring-1 ring-black/5 flex items-end",children:[x.image?e.jsx("img",{src:x.image,alt:"",className:"absolute inset-0 w-full h-full object-cover ds-ken"}):e.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(135deg, ${s}, ${a})`}}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(0deg, rgba(0,0,0,.82), transparent 62%)"}}),e.jsxs("div",{className:"relative z-10 p-8 text-white",children:[x.category&&e.jsx("span",{className:"text-lg font-bold text-white/90",children:x.category}),e.jsx("h2",{className:"text-6xl font-black leading-none drop-shadow",children:x.name}),x.text&&e.jsx("p",{className:"text-2xl text-white/85 mt-2 line-clamp-2 max-w-xl",children:x.text}),e.jsx("span",{className:`inline-flex items-center gap-2 px-5 py-2 mt-4 rounded-full text-2xl font-black ${m?"bg-emerald-500 text-white ds-pulse-open":"bg-white/90 text-slate-700"}`,children:c.closedToday?"סגור היום":m?"פתוח עכשיו":"סגור כעת"})]})]}),e.jsxs("div",{className:"rounded-3xl bg-white ring-1 ring-black/5 p-8 flex flex-col",style:{boxShadow:`0 26px 50px -24px ${s}55`},children:[e.jsx("div",{className:"text-2xl font-black mb-3",style:{color:s},children:"שעות פעילות השבוע"}),e.jsx("div",{className:"flex-1 flex flex-col justify-between",children:h.map((d,g)=>{const v=d.day===r.getDay();return e.jsxs("div",{className:`flex items-center justify-between rounded-xl px-4 py-2 ds-float-in text-2xl ${v?"font-black":"font-semibold"}`,style:v?{background:`${s}14`,color:"#0b2f63",animationDelay:`${g*.08}s`}:{color:"#334155",animationDelay:`${g*.08}s`},children:[e.jsxs("span",{children:[Me[d.day],v?" · היום":""]}),e.jsx("span",{dir:"ltr",className:d.open?"":"text-slate-400",children:d.open?d.slots.map(p=>`${p.from}–${p.to}`).join(", "):"סגור"})]},g)})})]})]},f):e.jsx(K,{items:n,render:d=>e.jsx(da,{service:d,now:r,primary:s,secondary:a}),cardWidth:"518px"}):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-slate-400 gap-3",children:[e.jsx(tt,{className:"w-20 h-20 text-slate-200"}),e.jsx("p",{className:"text-2xl",children:"שעות הפעילות מתעדכנות"})]})}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}"})]})}const Je=[{cols:4,rows:2,spans:["col-span-2 row-span-2","","","",""]},{cols:4,rows:2,spans:["col-span-2","col-span-2","","","",""]},{cols:4,rows:2,spans:["","","","","col-span-2","col-span-2"]},{cols:3,rows:2,spans:["col-span-2 row-span-2","",""]},{cols:3,rows:2,spans:["","","","col-span-3"]}];function fa({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=(t.albums||[]).filter(p=>(p.images||[]).length),o=t.view||"featured",[f,u]=b.useState(0);b.useEffect(()=>{if(o!=="featured"||n.length<2)return;const p=setInterval(()=>u(j=>(j+1)%n.length),1e4);return()=>clearInterval(p)},[o,n.length]);const x=8,c=G.useMemo(()=>{const p=[];for(let j=0;j<n.length;j+=x)p.push(n.slice(j,j+x));return p.length?p:[[]]},[n]),[m,h]=b.useState(0);b.useEffect(()=>{if(o!=="grid"||c.length<2)return;const p=setInterval(()=>h(j=>(j+1)%c.length),12e3);return()=>clearInterval(p)},[o,c.length]);const d=n[f]||null,g=(d==null?void 0:d.images)||[],v=Je[f%Je.length];return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-white",dir:"rtl",style:{background:"linear-gradient(160deg, #0b1220 0%, #16233b 60%, #0b1220 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45v
152w] rounded-full blur-3xl opacity-[0.22] ds-nb-a",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.18] ds-nb-b",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:o==="grid"?t.subtitle||"גלריית הקהילה":d!=null&&d.date?new Date(d.date).toLocaleDateString("he-IL"):"גלריית הקהילה",title:o==="grid"?t.title||"אלבומי תמונות":(d==null?void 0:d.title)||t.title||"אלבומי תמונות",primary:s,secondary:a,tone:"dark"}),e.jsx("div",{className:"relative z-10 flex-1 min-h-0 px-9 pb-8 pt-2",children:n.length?o==="grid"?e.jsx("div",{className:"grid grid-cols-4 grid-rows-2 gap-4 h-full animate-soft-fade",children:(c[m]||[]).map((p,j)=>e.jsxs("div",{className:"relative rounded-2xl overflow-hidden ring-1 ring-white/10 bg-slate-800",style:{boxShadow:"0 24px 48px -28px rgba(0,0,0,0.7)"},children:[e.jsx("img",{src:(p.images||[])[0],alt:"",className:`absolute inset-0 w-full h-full object-cover ${j===0?"ds-ken":""}`}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,.1) 55%, transparent)"}}),e.jsxs("div",{className:"absolute bottom-0 inset-x-0 p-4",children:[e.jsx("h3",{className:"text-2xl font-black leading-tight line-clamp-2 text-white drop-shadow",children:p.title}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white/70 mt-1",children:[p.date&&e.jsx("span",{children:new Date(p.date).toLocaleDateString("he-IL")}),e.jsxs("span",{children:["· ",(p.images||[]).length," תמונות"]})]})]})]},j))},m):e.jsx("div",{className:"grid h-full gap-4 animate-soft-fade",style:{gridTemplateColumns:`repeat(${v.cols}, 1fr)`,gridTemplateRows:`repeat(${v.rows}, 1fr)`},children:v.spans.map((p,j)=>e.jsx("div",{className:`relative rounded-[1.5rem] overflow-hidden ring-1 ring-white/10 bg-slate-800 ${p}`,style:{boxShadow:"0 24px 48px -28px rgba(0,0,0,0.7)"},children:e.jsx("img",{src:g[j%g.length],alt:"",className:`w-full h-full object-cover ${j===0?"ds-ken":""}`})},j))},f):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-white/50 gap-3",children:[e.jsx(Q,{className:"w-20 h-20 text-white/20"}),e.jsx("p",{className:"text-2xl",children:"אלבומים חדשים יעלו בקרוב"})]})}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}"})]})}const bt={blue:"#2563eb",sky:"#0284c7",cyan:"#0891b2",teal:"#0d9488",green:"#16a34a",emerald:"#059669",lime:"#65a30d",yellow:"#ca8a04",amber:"#d97706",orange:"#ea580c",red:"#dc2626",rose:"#e11d48",pink:"#db2777",purple:"#7c3aed",violet:"#7c3aed",indigo:"#4f46e5",slate:"#47
1525569"},Qe=[{title:"הזמנתך התקבלה",body:"קלטנו את הפנייה ופתחנו עבורך קריאת שירות."},{title:"שמחנו לעמוד לשירותך",body:"הפנייה שלך חשובה לנו — כבר מטפלים."},{title:"הפנייה בטיפול הצוות",body:"צוות השירות עודכן ונכנס לפעולה."},{title:"צוות השירות בדרך אליך",body:"נותן השירות יצא לכתובת שמסרת."}];function ma({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.categories||[],o=x=>bt[x]||s,[f,u]=b.useState(0);return b.useEffect(()=>{const x=setInterval(()=>u(c=>(c+1)%Qe.length),2600);return()=>clearInterval(x)},[]),e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(165deg, #ffffff 0%, #eef4fb 55%, #e6eefc 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
152acity-[0.15] ds-nb-a",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.13] ds-nb-b",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:"בכמה נגיעות, מכל מקום",title:t.title||"הזמנת שירות מהנייד",primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 grid grid-cols-12 gap-8 px-12 pb-8 pt-2 items-center",children:[e.jsx("div",{className:"col-span-5 min-h-0 h-full flex items-center justify-center",style:{perspective:"1700px"},children:e.jsxs("div",{className:"ds-phone-spin relative bg-slate-900 rounded-[2.5rem] p-3 ring-1 ring-black/10",style:{height:"86%",aspectRatio:"1 / 2",boxShadow:`0 55px 110px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06), 0 30px 70px -30px ${s}`},children:[e.jsx("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 w-24 h-6 bg-slate-900 rounded-b-2xl z-10"}),e.jsxs("div",{className:"w-full h-full bg-white rounded-[2rem] overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"px-6 pt-9 pb-5",style:{background:`linear-gradient(135deg, ${s}, ${a})`},children:[e.jsx("p",{className:"text-white/80 text-base font-bold",children:"היי, נעים לראותך 👋"}),e.jsx("h4",{className:"text-white text-3xl font-black mt-0.5",children:"הזמנת שירות"})]}),e.jsx("div",{className:"flex-1 min-h-0 p-4 grid grid-cols-2 gap-3 content-start overflow-hidden",children:(n.length?n:[{title:"תקלה",color:"amber"},{title:"בקשה",color:"blue"},{title:"ניקיון",color:"green"},{title:"תחזוקה",color:"sky"}]).slice(0,6).map((x,c)=>e.jsxs("div",{className:"rounded-2xl p-3 flex flex-col justify-end ring-1 ring-black/5 relative overflow-hidden",style:{aspectRatio:"1 / 0.82",background:x.image?"#111":`${o(x.color)}15`},children:[x.image&&e.jsx("img",{src:x.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"}),x.image&&e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to top, rgba(0,0,0,0.65), transparent 60%)"}}),e.jsx("span",{className:"relative w-9 h-9 rounded-xl mb-1.5 flex items-center justify-center text-white font-black",style:{background:o(x.color)},children:(x.title||"?").trim().charAt(0)}),e.jsx("span",{className:`relative text-base font-black leading-tight line-clamp-2 ${x.image?"text-white":"text-slate-800"}`,children:x.title})]},c))}),e.jsx("div",{className:"px-4 pb-5",children:e.jsx("div",{className:"h-12 rounded-2xl flex items-center justify-center text-white text-lg font-black",style:{background:`linear-gradient(90deg, ${s}, ${a})`},children:"שליחת פנייה"})})]})]})}),e.jsxs("div",{className:"col-span-7 min-h-0 flex flex-col justify-center gap-4",children:[e.jsx("p",{className:"text-3xl font-black",style:{color:s},children:"מרגע השליחה — מלווים אתכם בכל שלב"}),e.jsx("div",{className:"flex flex-col gap-3.5",children:Qe.map((x,c)=>{const m=c===f,h=c<f;return e.jsxs("div",{className:"rounded-[1.5rem] bg-white/95 border p-4 flex items-center gap-4 transition-all duration-500 ease-out",style:{borderColor:m?a:"rgba(0,0,0,0.05)",transform:m?"scale(1.02)":"scale(1)",opacity:m||h?1:.72,boxShadow:m?`0 24px 46px -20px ${s}88`:"0 10px 24px -16px rgba(0,0,0,0.28)"},children:[e.jsx("div",{className:"w-14 h-14 rounded-2xl overflow-hidden flex-shrink-0",children:e.jsx(ue,{className:"w-full h-full"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-base font-black",style:{color:a},children:"ESHUV · פניות ושירות"}),e.jsx("span",{className:"text-sm text-slate-400 font-bold",children:m?"עכשיו":h?"✓ בוצע":""})]}),e.jsx("p",{className:"text-2xl font-black text-slate-900 leading-tight mt-0.5",children:x.title}),e.jsx("p",{className:"text-lg text-slate-500 leading-snug",children:x.body})]})]},c)})})]})]}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}@keyframes dsPhoneSpin{0%,100%{transform:rotateY(-17deg) rotateX(3deg)}50%{transform:rotateY(17deg) rotateX(3deg)}}.ds-phone-spin{transform-style:preserve-3d;animation:dsPhoneSpin 9s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.ds-phone-spin{animation:none}}"})]})}function ua({slide:t,design:l,now:r,weather:i,primary:s,secondary:a}){const n=t.articles||[],o=t.categories||[],f=p=>bt[p]||s,u=o.length?o:(()=>{const p=new Map;for(const j of n)j.category&&!p.has(j.category)&&p.set(j.category,{title:j.category,icon:j.icon,color:j.color,image:j.image});return[...p.values()]})(),[x,c]=b.useState(0),[m,h]=b.useState(0);b.useEffect(()=>{if(n.length<2)return;const p=setInterval(()=>c(j=>(j+1)%n.length),9e3);return()=>clearInterval(p)},[n.length]),b.useEffect(()=>{if(u.length<=4)return;const p=setInterval(()=>h(j=>(j+4)%u.length),9e3);return()=>clearInterval(p)},[u.length]);const d=n[x]||null,g=u.length?Array.from({length:Math.min(4,u.length)},(p,j)=>u[(m+j)%u.length]):[],v=f(d==null?void 0:d.color);return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(165deg, #ffffff 0%, #f3f0fb 55%, #efeafc 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45v
152w] rounded-full blur-3xl opacity-[0.14] ds-nb-a",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.12] ds-nb-b",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:"מתעדכנים ומתעניינים בקהילה",title:t.title||"תחומי עניין בקהילה",primary:s,secondary:a}),e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 grid grid-cols-12 gap-8 px-12 pb-8 pt-2",children:[e.jsx("div",{className:"col-span-7 min-h-0 h-full",children:d?e.jsxs("div",{className:"h-full rounded-[2rem] overflow-hidden bg-white ring-1 ring-black/5 flex flex-col animate-soft-fade",style:{boxShadow:"0 44px 90px -44px rgba(15,23,42,0.45)"},children:[e.jsxs("div",{className:"relative flex-1 min-h-0",style:{background:`linear-gradient(160deg, ${v}22, ${v}0d)`},children:[d.image?e.jsx("img",{src:d.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:(()=>{const p=pe(d.icon);return e.jsx(p,{className:"w-40 h-40",style:{color:v,opacity:.35}})})()}),e.jsx("div",{className:"absolute inset-x-0 bottom-0 h-1/2",style:{background:"linear-gradient(to top, rgba(0,0,0,0.55), transparent)"}}),d.category&&e.jsxs("span",{className:"absolute top-6 right-6 inline-flex items-center gap-2 px-5 py-2.5 rounded-full text-white text-xl font-black shadow-lg",style:{background:v},children:[(()=>{const p=pe(d.icon);return e.jsx(p,{className:"w-6 h-6"})})()," ",d.category]})]}),e.jsxs("div",{className:"p-9 flex-shrink-0",children:[e.jsx("h3",{className:"text-5xl font-black leading-[1.1] line-clamp-2",style:{color:s},children:d.title||"תחום עניין"}),d.text&&e.jsx("p",{className:"text-2xl text-slate-500 leading-relaxed mt-4 line-clamp-3",children:d.text})]})]},x):e.jsxs("div",{className:"h-full rounded-[2rem] bg-white ring-1 ring-black/5 flex flex-col items-center justify-center gap-5 text-center px-10",style:{boxShadow:"0 44px 90px -44px rgba(15,23,42,0.45)"},children:[e.jsx($e,{className:"w-24 h-24",style:{color:s,opacity:.3}}),e.jsx("p",{className:"text-4xl font-black",style:{color:s},children:"תחומי העניין של הקהילה"}),e.jsx("p",{className:"text-2xl font-bold text-slate-400",children:"גלריית תוכן, פעילויות וקבוצות — הכל באפליקציה"})]})}),e.jsxs("div",{className:"col-span-5 min-h-0 h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-4 flex-shrink-0",children:[e.jsx(Q,{className:"w-6 h-6",style:{color:a}}),e.jsx("span",{className:"text-2xl font-black text-slate-600",children:"תחומי עניין בקהילה"})]}),e.jsx("div",{className:"grid grid-cols-2 grid-rows-2 gap-5 flex-1 min-h-0",children:g.map((p,j)=>{const k=pe(p.icon),I=f(p.color);return e.jsxs("div",{className:"relative rounded-[1.6rem] overflow-hidden ring-1 ring-black/5 flex flex-col justify-end animate-soft-fade min-h-0",style:{boxShadow:`0 26px 46px -30px ${I}`,background:p.image?"#0b1220":`linear-gradient(155deg, ${I}, ${I}cc)`},children:[p.image?e.jsx("img",{src:p.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx(k,{className:"absolute -bottom-4 -left-3 w-40 h-40 text-white/15"}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0.15) 55%, transparent)"}}),e.jsxs("div",{className:"relative p-6",children:[e.jsx("h4",{className:"text-4xl font-black text-white leading-tight line-clamp-2",style:{textShadow:"0 2px 10px rgba(0,0,0,0.5)"},children:p.title}),e.jsx("p",{className:"text-xl font-bold text-white/85 mt-1.5",style:{textShadow:"0 1px 6px rgba(0,0,0,0.5)"},children:"מחכים לך בערוץ"})]})]},`${m}-${j}`)})})]})]}),e.jsx("style",{children:"@keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}@keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}.ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}"})]})}function ha({page:t,primary:l}){const[r,i]=b.useState(""),[s,a]=b.useState(!1);b.useEffect(()=>{let o=!1;if(i(""),a(!1),!(t!=null&&t.cover||!(t!=null&&t.pdf)))return Ct(t.pdf,{width:900}).then(f=>{o||(f?i(f):a(!0))}),()=>{o=!0}},[t==null?void 0:t.cover,t==null?void 0:t.pdf]);const n=(t==null?void 0:t.cover)||r;return n?e.jsx("img",{src:n,alt:"",className:"absolute inset-0 w-full h-full object-cover ds-bl-ken"}):!(t!=null&&t.cover)&&(t!=null&&t.pdf)&&!s?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"w-10 h-10 rounded-full border-4 border-white/40 animate-spin",style:{borderTopColor:l}})}):e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 text-white/70",style:{background:`linear-gradient(160deg, ${l}, ${l}cc)`},children:[e.jsx(ie,{className:"w-16 h-16"}),e.jsx("p",{className:"text-lg font-bold px-4 text-center line-clamp-2",children:(t==null?void 0:t.t
152itle)||"עלון קהילתי"})]})}function ga({page:t,idx:l,cfg:r,footer:i,kibbutzId:s,primary:a,secondary:n,reduce:o}){const f=r.fields||{},u=r.show_qr!==!1&&f.qr!==!1,x=t.link||_e(s,`/kibbutz-site/${s}/digital-pages/${t.slug}`,window.location.origin),c=o?0:Math.min(l*140,900);return e.jsxs("div",{className:`relative min-h-0 h-full flex flex-col rounded-2xl overflow-hidden ${o?"animate-soft-fade":"ds-bl-in"}`,style:{animationDelay:`${c}ms`,boxShadow:"0 30px 60px -34px rgba(15,23,42,0.55), 0 0 0 1px rgba(0,0,0,0.05)",background:i.cardBg},children:[e.jsxs("div",{className:"relative flex-1 min-h-0 overflow-hidden bg-slate-200",children:[e.jsx(ha,{page:t,primary:a}),t.is_new&&f.new_label!==!1&&e.jsx("span",{className:"absolute top-3 right-3 px-3 py-1 rounded-full text-xs font-black text-white shadow-lg",style:{background:n},children:"חדש"}),f.category!==!1&&t.category&&e.jsx("span",{className:"absolute top-3 left-3 px-2.5 py-1 rounded-full text-[11px] font-bold bg-black/45 text-white backdrop-blur-sm",children:t.category}),i.overlay&&e.jsx("div",{className:"absolute inset-x-0 bottom-0 h-1/2",style:{background:"linear-gradient(to top, rgba(0,0,0,0.82), transparent)"}})]}),e.jsxs("div",{className:`${i.overlay?"absolute inset-x-0 bottom-0":"relative"} p-4 flex items-stretch gap-3`,style:i.overlay?void 0:{background:i.bg},children:[e.jsxs("div",{className:`min-w-0 flex-1 flex flex-col justify-center ${o?"":"ds-bl-foot"}`,style:{animationDelay:`${c+180}ms`},children:[f.title!==!1&&e.jsx("h3",{className:"text-lg font-black leading-tight line-clamp-2",style:{color:i.title},children:t.title||"עלון קהילתי"}),f.description!==!1&&t.description&&e.jsx("p",{className:"text-sm leading-snug line-clamp-2 mt-1",style:{color:i.text},children:t.description}),e.jsxs("div",{className:"flex items-center gap-2.5 mt-1.5 text-xs font-semibold",style:{color:i.muted},children:[f.date!==!1&&t.date&&e.jsx("span",{children:t.date.split("-").reverse().join(".")}),f.page_count!==!1&&t.page_count>1&&e.jsxs("span",{children:["· ",t.page_count," עמ׳"]})]})]}),u&&e.jsxs("div",{className:`flex-shrink-0 flex flex-col items-center justify-center gap-1 ${o?"":"ds-bl-qr"}`,style:{animationDelay:`${c+320}ms`},children:[e.jsx("div",{className:"p-1.5 rounded-lg bg-white ring-1 ring-black/10",children:e.jsx(ae,{value:x,size:64,bgColor:"#ffffff",fgColor:"#0f172a",level:"M"})}),e.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold",style:{color:i.muted},children:[e.jsx(Xt,{className:"w-3 h-3"})," סרקו לצפייה"]})]})]})]})}function pa({slide:t,design:l,now:r,weather:i,primary:s,secondary:a,kibbutzId:n}){const o=t.config||{},f=t.pages||[],u=Math.max(2,Math.min(6,Number(o.per_row)||4)),x=!!o.reduce_motion,c=Math.max(4,Number(o.group_seconds)||9),m=o.autoplay!==!1,h=o.show_dots!==!1,d=[];for(let B=0;B<f.length;B+=u)d.push(f.slice(B,B+u));const[g,v]=b.useState(0),p=d[g]||d[0]||[];b.useEffect(()=>{v(0)},[f.length,u]),b.useEffect(()=>{if(!m||d.length<2)return;const B=setInterval(()=>v(E=>(E+1)%d.length),c*1e3);return()=>clearInterval(B)},[m,d.length,c]);const j=o.footer_style||"light",k=j==="dark"?{bg:"#0f172a",cardBg:"#0f172a",title:"#ffffff",text:"#cbd5e1",muted:"#94a3b8",overlay:!1}:j==="brand"?{bg:s,cardBg:s,title:"#ffffff",text:"rgba(255,255,255,0.9)",muted:"rgba(255,255,255,0.75)",overlay:!1}:j==="overlay"?{bg:"transparent",cardBg:"#0f172a",title:"#ffffff",text:"#e2e8f0",muted:"#cbd5e1",overlay:!0}:{bg:"#ffffff",cardBg:"#ffffff",title:"#0f172a",text:"#475569",muted:"#94a3b8",overlay:!1},I=t.title||"עלונים ועמודים",P=t.category_label||"עלון קהילתי";return e.jsxs("div",{className:"relative w-full h-full flex flex-col overflow-hidden text-slate-900",dir:"rtl",style:{background:"linear-gradient(165deg, #ffffff 0%, #eef2f8 55%, #e7edf6 100%)"},children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-[45vw] h-[45vw] rounded-full blur-3xl op
152acity-[0.14] ds-nb-a",style:{background:s}}),e.jsx("div",{className:"absolute -bottom-48 -left-40 w-[50vw] h-[50vw] rounded-full blur-3xl opacity-[0.12] ds-nb-b",style:{background:a}})]}),e.jsx(A,{design:l,now:r,weather:i,primary:s,secondary:a}),e.jsx(H,{kicker:P,title:I,primary:s,secondary:a}),(t.headline||t.subtitle)&&e.jsxs("div",{className:"relative z-10 px-12 -mt-1 flex items-baseline gap-3 flex-wrap",children:[t.headline&&e.jsx("span",{className:"text-3xl font-black",style:{color:s},children:t.headline}),t.subtitle&&e.jsx("span",{className:"text-2xl text-slate-500 leading-snug line-clamp-1",children:t.subtitle})]}),p.length===0?e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col items-center justify-center gap-4 text-center px-12",children:[e.jsx("div",{className:"w-24 h-24 rounded-3xl bg-white ring-1 ring-black/5 flex items-center justify-center",children:e.jsx(ie,{className:"w-12 h-12 text-slate-300"})}),e.jsx("p",{className:"text-4xl font-black text-slate-700",children:"עלונים חדשים יעלו בקרוב"}),e.jsx("p",{className:"text-2xl text-slate-400",children:"המידע הקהילתי מתעדכן ויופיע כאן בקרוב."})]}):e.jsxs("div",{className:"relative z-10 flex-1 min-h-0 px-12 pb-10 pt-3 flex flex-col",children:[e.jsx("div",{className:"flex-1 min-h-0 grid gap-6",style:{gridTemplateColumns:`repeat(${Math.min(u,p.length)}, minmax(0,1fr))`},children:p.map((B,E)=>e.jsx(ga,{page:B,idx:E,cfg:o,footer:k,kibbutzId:n,primary:s,secondary:a,reduce:x},B.id||E))},g),h&&d.length>1&&e.jsx("div",{className:"flex items-center justify-center gap-2 mt-5",children:d.map((B,E)=>e.jsx("span",{className:"h-2.5 rounded-full transition-all",style:{width:E===g?30:10,background:E===g?s:"#cbd5e1"}},E))})]}),e.jsx("style",{children:`
153        @keyframes dsNbA{0%{transform:translate(0,0)}50%{transform:translate(4vw,3vh)}100%{transform:translate(0,0)}}
154        @keyframes dsNbB{0%{transform:translate(0,0)}50%{transform:translate(-5vw,-3vh)}100%{transform:translate(0,0)}}
155        .ds-nb-a{animation:dsNbA 26s ease-in-out infinite}.ds-nb-b{animation:dsNbB 32s ease-in-out infinite}
156        @keyframes dsBlIn{0%{opacity:0;transform:translateX(40px) scale(.96)}100%{opacity:1;transform:none}}
157        .ds-bl-in{animation:dsBlIn .7s cubic-bezier(.2,.8,.2,1) both}
158        @keyframes dsBlKen{0%{transform:scale(1)}100%{transform:scale(1.08)}}
159        .ds-bl-ken{animation:dsBlKen 14s ease-in-out infinite alternate}
160        @keyframes dsBlFoot{0%{opacity:0;transform:translateY(16px)}100%{opacity:1;transform:none}}
161        .ds-bl-foot{animation:dsBlFoot .6s ease-out both}
162        @keyframes dsBlQr{0%{opacity:0}100%{opacity:1}}
163        .ds-bl-qr{animation:dsBlQr .9s ease-out both}
164        @media (prefers-reduced-motion:reduce){.ds-nb-a,.ds-nb-b,.ds-bl-in,.ds-bl-ken,.ds-bl-foot,.ds-bl-qr{animation:none!important}}
165      `})]})}const qa=Object.freeze(Object.defineProperty({__proto__:null,BoardHeader:A,DS_WEEKDAYS:Me,EmbeddedContext:me,SELF_FRAMED_KINDS:ft,ScaledBoard:mt,default:gs,nextOpening:pt,renderBoard:ze,todayHours:Ie,weekRows:Te},Symbol.toStringTag,{value:"Module"}));export{A as B,ds as C,qa as D,qt as E,Ra as F,Oa as I,Ha as M,Oe as P,ct as S,me as a,mt as b,Ua as c,Ya as d,ft as e,Kt as f,Zt as g,ss as h,Wa as i,ke as j,Da as k,Fa as l,ts as m,pt as n,La as o,ls as p,Ca as q,ze as r,Ea as s,Ie as t,Xa as u,Pa as v,Te as w,Ut as x,He as y};

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.