PageSourceSearch

https://grovais.com/assets/Store-D0EgNSty.js

js grovais.com collected 2026-10-03 18:26:28 UTC 10,497 bytes, 1 lines download raw bytes

1import{r as o,j as e,C as M,V as z,u as I,e as L,f as _,p as w,v as T}from"./index-DBSeQxH7.js";import{g as f}from"./cdnImage-UV_xpSAk.js";import{C as $}from"./chevron-right-C9uZWFPg.js";import{S as k}from"./star-BvP9Mg5w.js";import{S}from"./shopping-cart-CStjAt74.js";import{P as B}from"./ProductCard-B_9BvXg2.js";import{u as O}from"./useSEO-amfvVj20.js";import"./useBundleMovieCount-BHxhjNwT.js";import"./MultiBundleSticker-miRl1lew.js";const C={days:"ימים",months:"חודשים",years:"שנים"},v=c=>{const i=[...c];for(let s=i.length-1;s>0;s--){const x=Math.floor(Math.random()*(s+1));[i[s],i[x]]=[i[x],i[s]]}return i};function U({products:c=[],onSelect:i}){var y,N;const s=c.filter(r=>r.is_featured_store&&r.status==="published"),[x,p]=o.useState(()=>v(s.map((r,a)=>a))),[n,d]=o.useState(0),[u,l]=o.useState(!1),h=o.useRef(n);h.current=n;const t=s[x[n]],g=o.useCallback(()=>{s.length<=1||(p(r=>{let a=v(s.map((A,E)=>E));return a[0]===r[h.current]&&a.length>1&&([a[0],a[1]]=[a[1],a[0]]),a}),d(0))},[s.length]);if(o.useEffect(()=>{if(s.length<=1||u)return;const r=setInterval(()=>{d(a=>a+1>=s.length?(g(),0):a+1)},3e3);return()=>clearInterval(r)},[s.length,u,g]),o.useEffect(()=>{p(v(s.map((r,a)=>a))),d(0)},[s.length]),c.length===0||s.length===0||!t)return null;const F=r=>d(r),P=()=>d(r=>(r-1+s.length)%s.length),R=()=>{if(n+1>=s.length){g();return}d(r=>r+1)},m=t.banner_image_url||t.image_url,b=t.sale_price&&parseFloat(t.sale_price)<parseFloat(t.base_price),j=b?t.sale_price:t.base_price;return e.jsxs("div",{className:"relative w-full group",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e.jsxs("div",{className:"relative w-full overflow-hidden",style:{aspectRatio:"3250 / 1300",background:"#000"},children:[e.jsxs("div",{className:"absolute inset-0 cursor-pointer",onClick:()=>i(t),children:[m?e.jsx("img",{src:f(m,1920,768),srcSet:`${f(m,1280,512)} 1280w, ${f(m,1920,768)} 1920w, ${f(m,2400,960)} 2400w`,sizes:"100vw",alt:t.name,width:1920,height:768,className:"w-full h-full object-cover",style:{objectPosition:"center"},fetchpriority:"high",decoding:"async"}):e.jsx("div",{className:"w-full h-full bg-gradient-to-br from-primary/20 to-background"}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 35%)"}})]}),s.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:P,"aria-label":"המוצר הקודם",className:"cast-arrow-btn absolute right-4 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-black/45 backdrop-blur-md border border-white/15 flex items-center justify-center text-white/70 hover:text-white hover:bg-black/65 transition-all duration-200 hover:scale-110 active:scale-95",children:e.jsx($,{className:"w-6 h-6",strokeWidth:1.5})}),e.jsx("button",{onClick:R,"aria-label":"המוצר הבא",className:"cast-arrow-btn absolute left-4 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-black/45 backdrop-blur-md border border-white/15 flex items-center justify-center text-white/70 hover:text-white hover:bg-black/65 transition-all duration-200 hover:scale-110 active:scale-95",children:e.jsx(M,{className:"w-6 h-6",strokeWidth:1.5})})]}),((y=t.promotion_tags)==null?void 0:y.length)>0&&e.jsx("div",{className:"hidden md:flex absolute top-4 right-4 sm:top-6 sm:right-6 z-10 flex-col items-end gap-1.5 pointer-events-none",children:t.promotion_tags.map((r,a)=>e.jsx("span",{className:"text-[11px] font-bold px-2.5 py-1 rounded-full text-white shadow",style:{backgroundColor:r.color,opacity:.92},children:r.text},a))}),e.jsx("div",{className:"hidden md:flex absolute bottom-0 right-0 left-0 z-10 items-end pb-10 md:pb-12",dir:"rtl",children:e.jsx("div",{className:"w-full px-6 md:px-12 lg:px-16 text-right",children:e.jsxs("div",{className:"max-w-lg",children:[e.jsx("div",{className:"flex items-center gap-2 mb-4 flex-wrap",children:e.jsxs("span",{className:"flex items-center gap-1 text-[11px] font-bold text-primary/90 bg-primary/10 border border-primary/25 px-2.5 py-1 rounded-full backdrop-blur-sm",children:[e.jsx(k,{className:"w-3 h-3 fill-primary"})," מומלץ"]})}),e.jsx("h1",{className:"text-3xl md:text-4xl font-black text-white leading-tight mb-2 tracking-tight",style:{textShadow:"0 2px 20px rgba(0,0,0,0.6)"},children:t.name}),t.description&&e.jsx("p",{className:"text-white/85 text-sm leading-relaxed mb-6 line-clamp-2 max-w-sm",style:{textShadow:"0 2px 12px rgba(0,0,0,0.9)"},children:t.description}),e.jsxs("div",{className:"flex items-center gap-5 flex-wrap",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[b&&e.jsxs("span",{className:"text-white/35 line-through text-base",children:["₪",t.base_price]}),e.jsxs("span",{className:"text-3xl font-black text-white",children:["₪",j]}),b&&e.jsxs("span",{className:"text-xs font-bold px-2 py-0.5 rounded-full text-white",style:{background:"#e53e3e"},children:[Math.round((1-parseFloat(t.sale_price)/parseFloat(t.base_price))*100),"% הנחה"]}),t.bundle_duration_value&&t.bundle_duration_unit&&e.jsxs("span",{className:"text-xs text-white/40 border border-white/15 px-2 py-0.5 rounded-full",children:["תוקף: ",t.bundle_duration_value," ",C[t.bundle_duration_unit]]})]}),e.jsxs("button",{onClick:()=>i(t),className:"flex items-center gap-2 px-6 py-2.5 font-bold text-sm transition-all duration-200 hover:opacity-90 active:scale-95",style:{background:"rgba(255,255,255,0.12)",border:"1px solid rgba(255,255,255,0.2)",borderRadius:"40px",backdropFilter:"blur(12px)",color:"#fff"},children:[e.jsx(S,{className:"w-4 h-4"}),"לרכישה"]})]})]})})})]}),e.jsxs("div",{className:"md:hidden px-4 pt-4 pb-2 text-right",dir:"rtl",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[e.jsxs("span",{className:"flex items-center gap-1 text-[11px] font-bold text-primary/90 bg-primary/10 border border-primary/25 px-2.5 py-1 rounded-full",children:[e.jsx(k,{className:"w-3 h-3 fill-primary"})," מומלץ"]}),((N=t.promotion_tags)==null?void 0:N.length)>0&&t.promotion_tags.map((r,a)=>e.jsx("span",{className:"text-xs font-bold px-2.5 py-1 rounded-full text-white",style:{backgroundColor:r.color},children:r.text},a))]}),e.jsx("h1",{className:"text-2xl font-black text-white leading-tight mb-2 tracking-tight",children:t.name}),t.description&&e.jsx("p",{className:"text-white/70 text-sm leading-relaxed mb-3 line-clamp-2 font-light",children:t.description}),e.jsxs("div",{className:"flex items-center justify-start gap-2 mb-4 flex-wrap",children:[b&&e.jsxs("span",{className:"text-white/40 line-through text-sm",children:["₪",t.base_price]}),e.jsxs("span",{className:"text-2xl font-black text-white",children:["₪",j]}),b&&e.jsxs("span",{className:"text-xs font-bold px-2 py-0.5 rounded-full text-white",style:{background:"#e53e3e"},children:[Math.round((1-parseFloat(t.sale_price)/parseFloat(t.base_price))*100),"% הנחה"]}),t.bundle_duration_value&&t.bundle_duration_unit&&e.jsxs("span",{className:"text-xs text-white/50 border border-white/15 px-2 py-0.5 rounded-full",children:["תוקף: ",t.bundle_duration_value," ",C[t.bundle_duration_unit]]})]}),e.jsx("div",{className:"cta-container flex items-center gap-3",children:e.jsxs("button",{onClick:()=>i(t),className:"flex items-center gap-2 px-6 py-3 bg-primary hover:bg-primary/90 text-white font-bold text-base transition-all shadow-xl shadow-primary/30 rounded-full",children:[e.jsx(S,{className:"w-5 h-5"}),"לרכישה — ₪",j]})})]}),s.length>1&&e.jsx("div",{className:"flex items-center justify-center gap-2 py-3",dir:"rtl",children:s.map((r,a)=>e.jsx("button",{onClick:()=>F(a),"aria-label":`עבור למוצר ${a+1}`,"aria-current":a===n,className:`h-2 rounded-full transition-all duration-300 ${a===n?"w-7 bg-primary":"w-2 bg-white/30 hover:bg-white/60"}`},a))})]})}const q=[{value:"all",label:"הכל"},{value:"buy",label:"קנייה"},{value:"rent_daily",label:"השכרה יומית"},{value:"rent_monthly",label:"השכרה חודשית"},{value:"bundle",label:"חבילות"},{value:"subscription",label:"מנויים"}];function X(){O({fullTitle:"חנות | גרובייס — חבילות סרטים ומנויים",description:"רכשו חבילות סרטים מוזלות ומנויים בפלטפורמת גרובייס. חסכו כסף עם חבילות חודשיות ויומיות."});const[c,i]=o.useState("all"),[s,x]=z(),p=I(),{data:n=[],isLoading:d}=L({queryKey:["products","published"],queryFn:()=>_.entities.Product.filter({status:"published"})});o.useEffect(()=>{const l=s.get("product");l&&(async()=>{try{const h=await _.entities.Product.get(l);if(h){p(w(h),{replace:!0});return}}catch{}s.delete("product"),x(s,{replace:!0})})()},[s,p,x]);const u=o.useMemo(()=>c==="all"?n:n.filter(l=>l.type===c),[n,c]);return e.jsxs("div",{className:"min-h-screen bg-background text-foreground",dir:"rtl",children:[e.jsx("div",{className:"pt-16",children:e.jsx(U,{products:n,onSelect:l=>p(w(l))})}),e.jsxs("div",{className:"max-w-5xl mx-auto px-6 pb-20",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 pt-10 pb-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-black text-white tracking-tight",children:"החנות שלנו"}),e.jsxs("p",{className:"text-white/30 text-xs mt-1 font-medium",children:[n.length," מוצרים"]})]}),e.jsx("div",{className:"flex items-center gap-1 p-1 flex-wrap",style:{background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.09)",borderRadius:"30px"},children:q.map(l=>e.jsx("button",{onClick:()=>i(l.value),className:`px-4 py-1.5 text-xs font-semibold transition-all whitespace-nowrap ${c===l.value?"bg-white text-black shadow-sm":"text-white/50 hover:text-white"}`,style:{borderRadius:"30px"},children:l.label},l.value))})]}),d?e.jsx("div",{className:"flex justify-center py-24",children:e.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):u.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[e.jsx(T,{className:"w-14 h-14 text-white/10 mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"אין מוצרים זמינים כרגע"}),e.jsx("p",{className:"text-white/40 text-sm",children:"נסה לשנות את הסינון"})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:u.map(l=>e.jsx(B,{product:l,onClick:()=>p(w(l))},l.id))})]})]})}export{X as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.