https://milmanltd.co.il/_next/static/chunks/122c198d96db6fa2.js?dpl=dpl_55wgepjRQAEDGUBkbaAYSzyYtqoV
1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,477754,e=>{"use strict";let t=(0,e.i(475254).default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",()=>t],477754)},301886,e=>{"use strict";let t={silver:{label:"×סף",background:"linear-gradient(135deg,#fdfdfd 0%,#dcdcdc 45%,#b4b4b4 100%)",border:"#9a9a9a"},gold:{label:"×××",background:"linear-gradient(135deg,#fdf3d0 0%,#e3c866 45%,#b8912f 100%)",border:"#a67c1f"},bronze:{label:"×ר×× ××",background:"linear-gradient(135deg,#f0d7bd 0%,#c98f5c 45%,#96603a 100%)",border:"#8a5730"},white:{label:"×××",background:"linear-gradient(135deg,#ffffff 0%,#f4f4f4 100%)",border:"#d4d4d4"},black:{label:"ש××ר",background:"linear-gradient(135deg,#4a4a4a 0%,#232323 100%)",border:"#111111"},wood:{label:"×¢×¥",background:"linear-gradient(135deg,#e0bd8f 0%,#c08e52 45%,#9a6a35 100%)",border:"#8a5f2f"}},r={mode:"perimeter",rate_per_cm:2.55,fixed_fee:15,rate_per_cm2:.35,min_price:20,min_side:1,max_long_side:40,max_short_side:30,step:.5,round_to:1,quote_above_quantity:50},a=(e,t)=>{let r=Number(e);return Number.isFinite(r)?r:t},i=e=>({enabled:!!e?.enabled,input_only:!!e?.input_only,mode:e?.mode==="area"?"area":r.mode,rate_per_cm:a(e?.rate_per_cm,r.rate_per_cm),fixed_fee:a(e?.fixed_fee,r.fixed_fee),rate_per_cm2:a(e?.rate_per_cm2,r.rate_per_cm2),min_price:a(e?.min_price,r.min_price),min_side:a(e?.min_side,r.min_side),max_long_side:a(e?.max_long_side,r.max_long_side),max_short_side:a(e?.max_short_side,r.max_short_side),step:Math.max(a(e?.step,r.step),.01),round_to:Math.max(a(e?.round_to,r.round_to),0),quote_above_quantity:a(e?.quote_above_quantity,r.quote_above_quantity),presets:e?.presets??[],quantity_tiers:e?.quantity_tiers??[],size_surcharges:e?.size_surcharges??[]}),o=(e,t)=>t>0?Math.round(Math.round(e/t)*t*1e3)/1e3:e,n=(e,t,r)=>{let a=i(e),o=Number(t),n=Number(r);if(!Number.isFinite(o)||!Number.isFinite(n)||o<=0||n<=0)return{ok:!1,issue:"missing",message:"×ש ××××× ×¨××× ×××××"};let l=Math.max(o,n),s=Math.min(o,n);return s<a.min_side?{ok:!1,issue:"too_small",message:`×××× ××× ××××ת ${a.min_side} ×¡×´× ××× ×¦××¢`}:l>a.max_long_side?{ok:!1,issue:"too_large",message:`×צ××¢ ××ר××× ××××× ×××××¢ ×¢× ${a.max_long_side} ס״×`}:s>a.max_short_side?{ok:!1,issue:"too_large",message:`צ××¢ ××ת ××××× ×××××¢ ×¢× ${a.max_long_side} ס״×, ××× ××©× ××× ××××ת ××××ת ×¢× ${a.max_short_side} ס״×`}:{ok:!0}},l=(e,t)=>t>0?Math.round(e/t)*t:Math.round(100*e)/100,s=(e,t,r,a=1)=>{let n,s,d,c,u,p=i(e),m=o(Math.max(Number(t)||0,0),p.step),f=o(Math.max(Number(r)||0,0),p.step),h=Math.round(m*f*100)/100,g=Math.round((m+f)*100)/100,_="area"===p.mode?p.fixed_fee+h*p.rate_per_cm2:g*p.rate_per_cm,x=(n=i(e),s=Math.max(Number(m)||0,Number(f)||0),[...n.size_surcharges].filter(e=>Number(e?.above_cm)>0).sort((e,t)=>Number(t.above_cm)-Number(e.above_cm)).find(e=>s>=Number(e.above_cm))??null),b=x?_*(Number(x.rate_multiplier)||1)+(Number(x.add_fixed)||0):_,v=l(Math.max(b,p.min_price),p.round_to),y=(d=i(e),c=Number(a)||0,(u=[...d.quantity_tiers].filter(e=>Number(e?.min_quantity)>0).sort((e,t)=>Number(t.min_quantity)-Number(e.min_quantity)).find(e=>c>=Number(e.min_quantity)))?Math.min(Math.max(Number(u.discount_percent)||0,0),100):0),w=y?l(v*(1-y/100),p.round_to):v;return{unitPrice:w,unitPriceBeforeVat:Math.round(w/1.18*100)/100,areaCm2:h,sumOfSidesCm:g,listUnitPrice:v,discountPercent:y,atMinimum:b<p.min_price,surchargeAboveCm:x?Number(x.above_cm):null,priceWithoutSurcharge:l(Math.max(_,p.min_price),p.round_to)}},d=(e,t)=>{let r=Number(e)||0,a=Number(t)||0,i=e=>String(Math.round(100*e)/100);return`${i(r)}\xd7${i(a)} ס״×`};e.s(["DIMENSION_PRICING_DEFAULTS",0,r,"PLATE_FINISHES",0,t,"buildStoredDimensions",0,(e,t,r,a=1)=>{let n=i(e),l=o(Number(t)||0,n.step),c=o(Number(r)||0,n.step),u=s(e,l,c,a);return{width:l,height:c,label:d(l,c),area_cm2:u.areaCm2,unit_price:u.unitPrice}},"computeDimensionPrice",0,s,"describeDimensionLimits",0,e=>{let t=i(e);return`צ××¢ ××ת ×¢× ${t.max_long_side} ס״×, ××©× ××× ×¢× ${t.max_short_side} ס״×. ××× ×××× ${t.min_side} ס״×.`},"formatDimensions",0,d,"getCheapestDimensionPrice",0,e=>{let t=i(e);if(t.input_only)return s(e,t.min_side,t.min_side,1).unitPrice;let r=t.presets.filter(e=>Number(e?.width)>0&&Number(e?.height)>0).map(t=>s(e,t.width,t.height,1).unitPrice);return r.length>0?Math.min(...r):t.min_price},"getPlateFinish",0,e=>t[e?.plate_finish??"silver"]??t.silver,"isDimensionPriced",0,e=>!!e?.dimension_pricing?.enabled,"isOversized",0,(e,t,r)=>"too_large"===n(e,t,r).issue,"requiresQuoteForQuantity",0,(e,t)=>{let r=i(e);return r.quote_above_quantity>0&&(Number(t)||0)>r.quote_above_quantity},"resolveDimensionConfig",0,i,"snapToStep",0,o,"validateDimensions",0,n])},326606,e=>{"use strict";let t,r,a;var i=e.i(843476),o=e.i(271645),n=e.i(981140),l=e.i(820783),s=e.i(30030),d=e.i(726330),c=e.i(303536),u=e.i(765491),p=e.i(610772),m=e.i(853660),f=e.i(774606),h=e.i(296626),g=e.i(248425),_=Symbol("radix.slottable");function x(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===_}var b=e.i(369340),v=e.i(186312),y=e.i(985369),w="Popover",[C,N]=(0,s.createContextScope)(w,[m.createPopperScope]),j=(0,m.createPopperScope)(),[k,M]=C(w),P=e=>{let{__scopePopover:t,children:r,open:a,defaultOpen:n,onOpenChange:l,modal:s=!1}=e,d=j(t),c=o.useRef(null),[u,f]=o.useState(!1),[h,g]=(0,b.useControllableState)({prop:a,defaultProp:n??!1,onChange:l,caller:w});return(0,i.jsx)(m.Root,{...d,children:(0,i.jsx)(k,{scope:t,contentId:(0,p.useId)(),triggerRef:c,open:h,onOpenChange:g,onOpenToggle:o.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:u,onCustomAnchorAdd:o.useCallback(()=>f(!0),[]),onCustomAnchorRemove:o.useCallback(()=>f(!1),[]),modal:s,children:r})})};P.displayName=w;var R="PopoverAnchor";o.forwardRef((e,t)=>
1{let{__scopePopover:r,...a}=e,n=M(R,r),l=j(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:d}=n;return o.useEffect(()=>(s(),()=>d()),[s,d]),(0,i.jsx)(m.Anchor,{...l,...a,ref:t})}).displayName=R;var E="PopoverTrigger",S=o.forwardRef((e,t)=>{let{__scopePopover:r,...a}=e,o=M(E,r),s=j(r),d=(0,l.useComposedRefs)(t,o.triggerRef),c=(0,i.jsx)(g.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":T(o.open),...a,ref:d,onClick:(0,n.composeEventHandlers)(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:(0,i.jsx)(m.Anchor,{asChild:!0,...s,children:c})});S.displayName=E;var A="PopoverPortal",[$,I]=C(A,{forceMount:void 0}),D=e=>{let{__scopePopover:t,forceMount:r,children:a,container:o}=e,n=M(A,t);return(0,i.jsx)($,{scope:t,forceMount:r,children:(0,i.jsx)(h.Presence,{present:r||n.open,children:(0,i.jsx)(f.Portal,{asChild:!0,container:o,children:a})})})};D.displayName=A;var z="PopoverContent",O=o.forwardRef((e,t)=>{let r=I(z,e.__scopePopover),{forceMount:a=r.forceMount,...o}=e,n=M(z,e.__scopePopover);return(0,i.jsx)(h.Presence,{present:a||n.open,children:n.modal?(0,i.jsx)(L,{...o,ref:t}):(0,i.jsx)(q,{...o,ref:t})})});O.displayName=z;var F=((a=o.forwardRef((e,t)=>{let{children:r,...a}=e;if(o.isValidElement(r)){var i;let e,n,s=(i=r,(n=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(n=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),d=function(e,t){let r={...t};for(let a in t){let i=e[a],o=t[a];/^on[A-Z]/.test(a)?i&&o?r[a]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[a]=i):"style"===a?r[a]={...i,...o}:"className"===a&&(r[a]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(a,r.props);return r.type!==o.Fragment&&(d.ref=t?(0,l.composeRefs)(t,s):s),o.cloneElement(r,d)}return o.Children.count(r)>1?o.Children.only(null):null})).displayName="PopoverContent.RemoveScroll.SlotClone",t=a,(r=o.forwardRef((e,r)=>{let{children:a,...n}=e,l=o.Children.toArray(a),s=l.find(x);if(s){let e=s.props.children,a=l.map(t=>t!==s?t:o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null);return(0,i.jsx)(t,{...n,ref:r,children:o.isValidElement(e)?o.cloneElement(e,void 0,a):null})}return(0,i.jsx)(t,{...n,ref:r,children:a})})).displayName="PopoverContent.RemoveScroll.Slot",r),L=o.forwardRef((e,t)=>{let r=M(z,e.__scopePopover),a=o.useRef(null),s=(0,l.useComposedRefs)(t,a),d=o.useRef(!1);return o.useEffect(()=>{let e=a.current;if(e)return(0,v.hideOthers)(e)},[]),(0,i.jsx)(y.RemoveScroll,{as:F,allowPinchZoom:!0,children:(0,i.jsx)(H,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,n.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),d.current||r.triggerRef.current?.focus()}),onPointerDownOutside:(0,n.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;d.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,n.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),q=o.forwardRef((e,t)=>{let r=M(z,e.__scopePopover),a=o.useRef(!1),n=o.useRef(!1);return(0,i.jsx)(H,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||r.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(n.current=!0));let i=t.target;r.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&n.current&&t.preventDefault()}})}),H=o.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:n,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,...g}=e,_=M(z,r),x=j(r);return(0,c.useFocusGuards)(),(0,i.jsx)(u.FocusScope,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:n,children:(0,i.jsx)(d.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:h,onEscapeKeyDown:s,onPointerDownOutside:p,onFocusOutside:f,onDismiss:()=>_.onOpenChange(!1),children:(0,i.jsx)(m.Content,{"data-state":T(_.open),role:"dialog",id:_.contentId,...x,...g,ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),B="PopoverClose";function T(e){return e?"open":"closed"}o.forwardRef((e,t)=>
1{let{__scopePopover:r,...a}=e,o=M(B,r);return(0,i.jsx)(g.Primitive.button,{type:"button",...a,ref:t,onClick:(0,n.composeEventHandlers)(e.onClick,()=>o.onOpenChange(!1))})}).displayName=B,o.forwardRef((e,t)=>{let{__scopePopover:r,...a}=e,o=j(r);return(0,i.jsx)(m.Arrow,{...o,...a,ref:t})}).displayName="PopoverArrow";var W=e.i(340974);let U=o.forwardRef(({className:e,align:t="center",sideOffset:r=4,...a},o)=>(0,i.jsx)(D,{children:(0,i.jsx)(O,{ref:o,align:t,sideOffset:r,className:(0,W.cn)("z-[200] w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));U.displayName=O.displayName,e.s(["Popover",()=>P,"PopoverContent",()=>U,"PopoverTrigger",()=>S],326606)},708276,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(225913),i=e.i(340974);let o=(0,a.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:r,...a},n)=>(0,t.jsx)("div",{ref:n,role:"alert",className:(0,i.cn)(o({variant:r}),e),...a}));n.displayName="Alert",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("h5",{ref:a,className:(0,i.cn)("mb-1 font-medium leading-none tracking-tight",e),...r})).displayName="AlertTitle";let l=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,i.cn)("text-sm [&_p]:leading-relaxed",e),...r}));l.displayName="AlertDescription",e.s(["Alert",()=>n,"AlertDescription",()=>l])},687607,e=>{"use strict";var t=e.i(271645),r=e.i(981140),a=e.i(30030),i=e.i(369340),o=e.i(934620),n=e.i(820783),l=e.i(248425),s=e.i(296626),d=e.i(610772),c=e.i(843476),u="Collapsible",[p,m]=(0,a.createContextScope)(u),[f,h]=p(u),g=t.forwardRef((e,r)=>{let{__scopeCollapsible:a,open:o,defaultOpen:n,disabled:s,onOpenChange:p,...m}=e,[h,g]=(0,i.useControllableState)({prop:o,defaultProp:n??!1,onChange:p,caller:u});return(0,c.jsx)(f,{scope:a,disabled:s,contentId:(0,d.useId)(),open:h,onOpenToggle:t.useCallback(()=>g(e=>!e),[g]),children:(0,c.jsx)(l.Primitive.div,{"data-state":w(h),"data-disabled":s?"":void 0,...m,ref:r})})});g.displayName=u;var _="CollapsibleTrigger",x=t.forwardRef((e,t)=>{let{__scopeCollapsible:a,...i}=e,o=h(_,a);return(0,c.jsx)(l.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":w(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...i,ref:t,onClick:(0,r.composeEventHandlers)(e.onClick,o.onOpenToggle)})});x.displayName=_;var b="CollapsibleContent",v=t.forwardRef((e,t)=>{let{forceMount:r,...a}=e,i=h(b,e.__scopeCollapsible);return(0,c.jsx)(s.Presence,{present:r||i.open,children:({present:e})=>(0,c.jsx)(y,{...a,ref:t,present:e})})});v.displayName=b;var y=t.forwardRef((e,r)=>{let{__scopeCollapsible:a,present:i,children:s,...d}=e,u=h(b,a),[p,m]=t.useState(i),f=t.useRef(null),g=(0,n.useComposedRefs)(r,f),_=t.useRef(0),x=_.current,v=t.useRef(0),y=v.current,C=u.open||p,N=t.useRef(C),j=t.useRef(void 0);return t.useEffect(()=>{let e=requestAnimationFrame(()=>N.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,o.useLayoutEffect)(()=>{let e=f.current;if(e){j.current=j.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();_.current=t.height,v.current=t.width,N.current||(e.style.transitionDuration=j.current.transitionDuration,e.style.animationName=j.current.animationName),m(i)}},[u.open,i]),(0,c.jsx)(l.Primitive.div,{"data-state":w(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!C,...d,ref:g,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:C&&s})});function w(e){return e?"open":"closed"}e.s(["CollapsibleContent",()=>v,"CollapsibleTrigger",()=>x,"Content",()=>v,"Root",()=>g,"Trigger",()=>x,"createCollapsibleScope",()=>m])},107899,e=>{"use strict";let t=(0,e.i(475254).default)("mouse-pointer-click",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.
1074z",key:"s0h3yz"}]]);e.s(["MousePointerClick",()=>t],107899)},171588,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(30030),i=e.i(75830),o=e.i(820783),n=e.i(981140),l=e.i(369340),s=e.i(248425),d=e.i(687607),c=e.i(610772),u=e.i(586318),p="Accordion",m=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[f,h,g]=(0,i.createCollection)(p),[_,x]=(0,a.createContextScope)(p,[g,d.createCollapsibleScope]),b=(0,d.createCollapsibleScope)(),v=r.default.forwardRef((e,r)=>{let{type:a,...i}=e;return(0,t.jsx)(f.Provider,{scope:e.__scopeAccordion,children:"multiple"===a?(0,t.jsx)(k,{...i,ref:r}):(0,t.jsx)(j,{...i,ref:r})})});v.displayName=p;var[y,w]=_(p),[C,N]=_(p,{collapsible:!1}),j=r.default.forwardRef((e,a)=>{let{value:i,defaultValue:o,onValueChange:n=()=>{},collapsible:s=!1,...d}=e,[c,u]=(0,l.useControllableState)({prop:i,defaultProp:o??"",onChange:n,caller:p});return(0,t.jsx)(y,{scope:e.__scopeAccordion,value:r.default.useMemo(()=>c?[c]:[],[c]),onItemOpen:u,onItemClose:r.default.useCallback(()=>s&&u(""),[s,u]),children:(0,t.jsx)(C,{scope:e.__scopeAccordion,collapsible:s,children:(0,t.jsx)(R,{...d,ref:a})})})}),k=r.default.forwardRef((e,a)=>{let{value:i,defaultValue:o,onValueChange:n=()=>{},...s}=e,[d,c]=(0,l.useControllableState)({prop:i,defaultProp:o??[],onChange:n,caller:p}),u=r.default.useCallback(e=>c((t=[])=>[...t,e]),[c]),m=r.default.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,t.jsx)(y,{scope:e.__scopeAccordion,value:d,onItemOpen:u,onItemClose:m,children:(0,t.jsx)(C,{scope:e.__scopeAccordion,collapsible:!0,children:(0,t.jsx)(R,{...s,ref:a})})})}),[M,P]=_(p),R=r.default.forwardRef((e,a)=>{let{__scopeAccordion:i,disabled:l,dir:d,orientation:c="vertical",...p}=e,g=r.default.useRef(null),_=(0,o.useComposedRefs)(g,a),x=h(i),b="ltr"===(0,u.useDirection)(d),v=(0,n.composeEventHandlers)(e.onKeyDown,e=>{if(!m.includes(e.key))return;let t=e.target,r=x().filter(e=>!e.ref.current?.disabled),a=r.findIndex(e=>e.ref.current===t),i=r.length;if(-1===a)return;e.preventDefault();let o=a,n=i-1,l=()=>{(o=a+1)>n&&(o=0)},s=()=>{(o=a-1)<0&&(o=n)};switch(e.key){case"Home":o=0;break;case"End":o=n;break;case"ArrowRight":"horizontal"===c&&(b?l():s());break;case"ArrowDown":"vertical"===c&&l();break;case"ArrowLeft":"horizontal"===c&&(b?s():l());break;case"ArrowUp":"vertical"===c&&s()}let d=o%i;r[d].ref.current?.focus()});return(0,t.jsx)(M,{scope:i,disabled:l,direction:d,orientation:c,children:(0,t.jsx)(f.Slot,{scope:i,children:(0,t.jsx)(s.Primitive.div,{...p,"data-orientation":c,ref:_,onKeyDown:l?void 0:v})})})}),E="AccordionItem",[S,A]=_(E),$=r.default.forwardRef((e,r)=>{let{__scopeAccordion:a,value:i,...o}=e,n=P(E,a),l=w(E,a),s=b(a),u=(0,c.useId)(),p=i&&l.value.includes(i)||!1,m=n.disabled||e.disabled;return(0,t.jsx)(S,{scope:a,open:p,disabled:m,triggerId:u,children:(0,t.jsx)(d.Root,{"data-orientation":n.orientation,"data-state":q(p),...s,...o,ref:r,disabled:m,open:p,onOpenChange:e=>{e?l.onItemOpen(i):l.onItemClose(i)}})})});$.displayName=E;var I="AccordionHeader",D=r.default.forwardRef((e,r)=>{let{__scopeAccordion:a,...i}=e,o=P(p,a),n=A(I,a);return(0,t.jsx)(s.Primitive.h3,{"data-orientation":o.orientation,"data-state":q(n.open),"data-disabled":n.disabled?"":void 0,...i,ref:r})});D.displayName=I;var z="AccordionTrigger",O=r.default.forwardRef((e,r)=>{let{__scopeAccordion:a,...i}=e,o=P(p,a),n=A(z,a),l=N(z,a),s=b(a);return(0,t.jsx)(f.ItemSlot,{scope:a,children:(0,t.jsx)(d.Trigger,{"aria-disabled":n.open&&!l.collapsible||void 0,"data-orientation":o.orientation,id:n.triggerId,...s,...i,ref:r})})});O.displayName=z;var F="AccordionContent",L=r.default.forwardRef((e,r)=>{let{__scopeAccordion:a,...i}=e,o=P(p,a),n=A(F,a),l=b(a);return(0,t.jsx)(d.Content,{role:"region","aria-labelledby":n.triggerId,"data-orientation":o.orientation,...l,...i,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function q(e){return e?"open":"closed"}L.displayName=F;var H=e.i(664659),B=e.i(340974);let T=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)($,{ref:a,className:(0,B.cn)("border-b",e),...r}));T.displayName="AccordionItem";let W=r.forwardRef(({className:e,children:r,...a},i)=>(0,t.jsx)(D,{className:"flex",children:(0,t.jsxs)(O,{ref:i,className:(0,B.cn)("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...a,children:[r,(0,t.jsx)(H.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));W.displayName=O.displayName;let U=r.forwardRef(({className:e,children:r,...a},i)=>(0,t.jsx)(L,{ref:i,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...a,children:(0,t.jsx)("div",{className:(0,B.cn)("pb-4 pt-0",e),children:r})}));U.displayName=L.displayName,e.s(["Accordion",()=>v,"AccordionContent",()=>U,"AccordionItem",()=>T,"AccordionTrigger",()=>W],171588)},605221,879915,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(354201),i=e.i(900727);let o=e=>e?e.sport_category_id?e.sport_category_id:e.category_id&&"694c061e1fd75048e27d02ee"!==e.category_id?e.category_id:null:null,n=(e,t=[])=>{if(!e?.slug||"filter"===e.tag_kind)return null;let r=o(e),a=r?t.find(e=>e.id===r):void 0;return a&&!1!==a.is_visible?(0,i.getCategoryUrlPath)(a,t):`/products/tag/${e.slug}`};e.s(["getTagHref",0,n,"getTagOwnerCategoryId",0,o],879915);var l=e.i(751975),s=e.i(664659),d=e.i(655900);let c="inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full bg-stone-100 text-stone-600 border border-stone-200",u=`${c} hover:bg-[#6899ca]/10 hover:text-[#6899ca] hover:border-[#6899ca]/30 transition-colors`;function p({tags:e,categories:i=[]}){let[o,p]=(0,r.useState)(!1);if(!e||0===e.length)return null;let m=o?e:e.slice(0,6),f=e.length-6;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mt-1",children:[m.map(e=>{let r=n(e,i);return r?(0,t.jsxs)(a.Link,{to:r,className:u,children:[(0,t.jsx)(l.Tag,{className:"w-3 h-3"}),e.name]},e.id):(0,t.jsxs)("span",{className:c,children:[(0,t.jsx)(l.Tag,{className:"w-3 h-3"}),e.name]},e.id)}),!o&&f>0&&(0,t.jsxs)("button",{onClick:()=>p(!0),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full bg-[#6899ca]/10 text-[#6899ca] border border-[#6899ca]/30 hover:bg-[#6899ca]/20 transition-colors cursor-pointer","aria-label":`××¦× ${f} ת×××ת × ×ספ×ת`,children:[(0,t.jsx)(s.ChevronDown,{className:"w-3 h-3"}),`+ ${f} ×¢××`]}),o&&e.length>6&&(0,t.jsxs)("button",{onClick:()=>p(!1),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full bg-stone-100 text-stone-500 border border-stone-200 hover:bg-stone-200 transition-colors cursor-pointer","aria-label":"××¦× ×¤××ת ת×××ת",children:[(0,t.jsx)(d.
1ChevronUp,{className:"w-3 h-3"}),"××¦× ×¤××ת"]})]})}e.s(["default",()=>p],605221)},132227,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(354201),i=e.i(373375),o=e.i(463059),n=e.i(519455),l=e.i(18670),s=e.i(534209),d=e.i(70811),c=e.i(659318),u=e.i(952997);function p({categoryName:e,allProducts:p,displayedProductIds:m,categoryId:f,categories:h,isB2B:g,getB2BPrice:_}){let x=(0,r.useRef)(null),[b,v]=(0,r.useState)(!1),[y,w]=(0,r.useState)(!1),C=(0,r.useMemo)(()=>{if(!f||!p?.length)return[];let e=new Set(m||[]),t=e=>{let r=[e];return h.filter(t=>t.parent_id===e).forEach(e=>{r.push(...t(e.id))}),r},r=h.find(e=>e.id===f),a=t(r?.parent_id||f);return p.filter(t=>{if(e.has(t.id)||!t.is_published)return!1;let r=a.includes(t.category_id),i=a.includes(t.sub_category_id),o=t.additional_categories?.some(e=>a.includes(e));return r||i||o}).sort((e,t)=>(e.sort_order||999)-(t.sort_order||999)).slice(0,20)},[f,p,m,h]),N=(0,r.useCallback)(()=>{let e=x.current;e&&(v(e.scrollLeft<-10),w(e.scrollLeft>-(e.scrollWidth-e.clientWidth-10)))},[]);(0,r.useEffect)(()=>{let e=x.current;if(e&&0!==C.length)return N(),e.addEventListener("scroll",N,{passive:!0}),window.addEventListener("resize",N),()=>{e.removeEventListener("scroll",N),window.removeEventListener("resize",N)}},[C,N]);let j=e=>{let t=x.current;if(!t)return;let r=t.querySelector("a")?.offsetWidth||250;t.scrollBy({left:"right"===e?-r-16:r+16,behavior:"smooth"})};return C.length<2?null:(0,t.jsx)("section",{className:"py-10 sm:py-14 bg-gradient-to-b from-amber-50/30 to-stone-50",dir:"rtl",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-8",children:[(0,t.jsxs)("h2",{className:"text-2xl sm:text-3xl font-bold text-stone-900 text-center mb-8",style:{fontFamily:"'Heebo', sans-serif"},children:["×¢×× ×",e]}),(0,t.jsxs)("div",{className:"relative",children:[y&&(0,t.jsx)(n.Button,{onClick:()=>j("right"),variant:"outline",size:"icon",className:"hidden sm:flex absolute right-0 top-1/2 -translate-y-1/2 z-10 rounded-full bg-white shadow-lg hover:bg-stone-50 -mr-4",children:(0,t.jsx)(o.ChevronRight,{className:"w-5 h-5"})}),b&&(0,t.jsx)(n.Button,{onClick:()=>j("left"),variant:"outline",size:"icon",className:"hidden sm:flex absolute left-0 top-1/2 -translate-y-1/2 z-10 rounded-full bg-white shadow-lg hover:bg-stone-50 -ml-4",children:(0,t.jsx)(i.ChevronLeft,{className:"w-5 h-5"})}),(0,t.jsx)("div",{ref:x,className:"flex gap-4 overflow-x-auto scrollbar-hide snap-x snap-mandatory pb-2 -mx-4 px-4 sm:mx-0 sm:px-0",style:{scrollbarWidth:"none",msOverflowStyle:"none",WebkitOverflowScrolling:"touch"},children:C.map(e=>(0,t.jsx)(a.Link,{to:(0,s.getProductUrl)(e,h),className:"flex-shrink-0 snap-start w-[70vw] sm:w-[45%] md:w-[30%] lg:w-[calc(25%-12px)]",children:(0,t.jsxs)(l.Card,{className:"group overflow-hidden border-none shadow-md hover:shadow-xl transition-all duration-300 h-full bg-white",children:[(0,t.jsx)("div",{className:"relative overflow-hidden bg-stone-100 rounded-t-lg aspect-square",children:(0,t.jsx)(d.default,{product:e,className:"group-hover:scale-105",size:500})}),(0,t.jsxs)(l.CardContent,{className:"p-4 text-right",children:[(0,t.jsx)("h3",{className:"font-bold text-stone-900 text-sm sm:text-base mb-2 line-clamp-2",style:{fontFamily:"'Heebo', sans-serif"},children:e.name}),(0,u.isQuoteOnly)(e)?(0,t.jsx)(c.default,{size:"sm"}):e.price&&(0,t.jsx)("p",{className:"text-[#6899ca] font-bold text-base sm:text-lg text-left",dir:"ltr",children:g&&!isNaN(parseFloat(e.price))?new Intl.NumberFormat("he-IL",{style:"currency",currency:"ILS"}).format(_(e.id,parseFloat(e.price),e.category_id,e.additional_categories,e.price_before_vat)):`${!isNaN(parseFloat(e.price))?Math.round(parseFloat(e.price)):e.price} ${!isNaN(parseFloat(e.price))?"âª":""}`})]})]})},e.id))})]})]})})}e.s(["default",()=>p])},85327,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(354201);e.i(890955);var i=e.i(849959);e.i(732832);var o=e.i(373375),n=e.i(463059),l=e.i(519455),s=e.i(18670),d=e.i(925935),c=e.i(70811),u=e.i(659318),p=e.i(952997);function m({categoryId:e}){let[m,f]=(0,r.useState)([]),[h,g]=(0,r.useState)(""),[_,x]=(0,r.useState)(!0),b=(0,r.useRef)(null),[v,y]=(0,r.useState)(!1),[w,C]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e?(async()=>{try{let t=await d.requestCache.get("categories",()=>i.db.entities.Category.list("sort_order"),6e5),r=t.find(t=>
1t.id===e);if(!r?.carousel_config?.enabled)return void x(!1);let a=r.carousel_config;g(a.title||`×¢×× ×${r.name}`);let o=await d.requestCache.get("published-products",()=>i.db.entities.Product.filter({is_published:!0}),6e5),n=[];if("products"===a.source_type&&a.product_ids?.length>0)n=a.product_ids.map(e=>o.find(t=>t.id===e)).filter(Boolean);else if("category"===a.source_type&&a.source_category_id){let e=function e(t,r){let a=[t];return r.filter(e=>e.parent_id===t).forEach(t=>{a.push(...e(t.id,r))}),a}(a.source_category_id,t);n=o.filter(t=>e.includes(t.category_id)||e.includes(t.sub_category_id)||(t.additional_categories||[]).some(t=>e.includes(t))).sort((e,t)=>(e.sort_order||999)-(t.sort_order||999))}f(n)}catch(e){console.error("Error loading custom carousel:",e)}finally{x(!1)}})():x(!1)},[e]);let N=(0,r.useCallback)(()=>{let e=b.current;e&&(y(e.scrollLeft<-10),C(e.scrollLeft>-(e.scrollWidth-e.clientWidth-10)))},[]);(0,r.useEffect)(()=>{let e=b.current;if(e&&0!==m.length)return N(),e.addEventListener("scroll",N,{passive:!0}),window.addEventListener("resize",N),()=>{e.removeEventListener("scroll",N),window.removeEventListener("resize",N)}},[m,N]);let j=e=>{let t=b.current;if(!t)return;let r=t.querySelector("a")?.offsetWidth||250;t.scrollBy({left:"right"===e?-r-16:r+16,behavior:"smooth"})};return _||0===m.length?null:(0,t.jsx)("section",{className:"py-12 sm:py-16 bg-stone-50",dir:"rtl",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-8",children:[(0,t.jsx)("h2",{className:"text-2xl sm:text-3xl font-bold text-stone-900 text-center mb-8",style:{fontFamily:"'Heebo', sans-serif"},children:h}),(0,t.jsxs)("div",{className:"relative",children:[w&&(0,t.jsx)(l.Button,{onClick:()=>j("right"),variant:"outline",size:"icon",className:"hidden sm:flex absolute right-0 top-1/2 -translate-y-1/2 z-10 rounded-full bg-white shadow-lg hover:bg-stone-50 -mr-4",children:(0,t.jsx)(n.ChevronRight,{className:"w-5 h-5"})}),v&&(0,t.jsx)(l.Button,{onClick:()=>j("left"),variant:"outline",size:"icon",className:"hidden sm:flex absolute left-0 top-1/2 -translate-y-1/2 z-10 rounded-full bg-white shadow-lg hover:bg-stone-50 -ml-4",children:(0,t.jsx)(o.ChevronLeft,{className:"w-5 h-5"})}),(0,t.jsx)("div",{ref:b,className:"flex gap-4 overflow-x-auto scrollbar-hide snap-x snap-mandatory pb-2 -mx-4 px-4 sm:mx-0 sm:px-0",style:{scrollbarWidth:"none",msOverflowStyle:"none",WebkitOverflowScrolling:"touch"},children:m.map(e=>{let r;return(0,t.jsx)(a.Link,{to:(r=e.seo?.slug||e.id,(0,i.createPageUrl)(`Product?slug=${r}`)),className:"flex-shrink-0 snap-start w-[70vw] sm:w-[45%] md:w-[30%] lg:w-[calc(25%-12px)]",children:(0,t.jsxs)(s.Card,{className:"group overflow-hidden border-none shadow-md hover:shadow-xl transition-all duration-300 h-full",children:[(0,t.jsx)("div",{className:"relative overflow-hidden bg-stone-100 rounded-t-lg aspect-square",children:(0,t.jsx)(c.default,{product:e,className:"group-hover:scale-105",size:500})}),(0,t.jsxs)(s.CardContent,{className:"p-4 text-right",children:[(0,t.jsx)("h3",{className:"font-bold text-stone-900 text-sm sm:text-base mb-2 line-clamp-2",style:{fontFamily:"'Heebo', sans-serif"},children:e.name}),(0,p.isQuoteOnly)(e)?(0,t.jsx)(u.default,{size:"sm"}):e.price&&(0,t.jsx)("p",{className:"text-[#6899ca] font-bold text-base sm:text-lg text-left",children:isNaN(parseFloat(e.price))?e.price:`${Math.round(parseFloat(e.price))} âª`})]})]})},e.id)})})]})]})})}e.s(["default",()=>m])},299023,e=>{"use strict";let t=(0,e.i(475254).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>t],299023)},16715,e=>{"use strict";let t=(0,e.i(475254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],16715)},569074,e=>{"use strict";let t=(0,e.i(475254).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",()=>t],569074)},473708,e=>{"use strict";let t=(0,e.i(475254).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["Image",()=>t],473708)},178583,e=>{"use strict";let t=(0,e.i(475254).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",()=>t],178583)},751975,e=>{"use strict";let t=(0,e.i(475254).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.
1172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",()=>t],751975)},647780,e=>{"use strict";let t=(0,e.i(475254).default)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);e.s(["Palette",()=>t],647780)},158209,e=>{"use strict";var t=e.i(271645);function r(){let[e,r]=(0,t.useState)(null),[a,i]=(0,t.useState)({}),[o,n]=(0,t.useState)({}),[l,s]=(0,t.useState)(!0);(0,t.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/b2b/pricing");if(!t.ok){e&&s(!1);return}let a=await t.json();if(!e)return;if(!a?.isB2B)return void s(!1);r({global_discount_percentage:a.globalDiscount||0,enable_cashback:a.enableCashback||!1,cashback_percentage:a.cashbackPercentage||0,store_credit_balance:a.storeCreditBalance||0,allowed_payment_methods:a.allowedPaymentMethods||[],skip_minimum_order:a.skipMinimumOrder||!1,prices_include_vat:a.pricesIncludeVat||!1,cashback_covers_shipping:a.cashbackCoversShipping||!1});let o={};(a.productOverrides||[]).forEach(e=>{o[e.product_id]=e}),i(o);let l={};(a.categoryDiscounts||[]).forEach(e=>{l[e.category_id]=e}),n(l)}catch(e){console.error("B2B pricing load error:",e)}e&&s(!1)})(),()=>{e=!1}},[]);let d=!!e?.prices_include_vat;return{isB2B:!!e,b2bUser:e,discountPercentage:e?.global_discount_percentage||0,storeCreditBalance:e?.store_credit_balance||0,enableCashback:e?.enable_cashback||!1,cashbackPercentage:e?.cashback_percentage||0,skipMinimumOrder:e?.skip_minimum_order||!1,cashbackCoversShipping:e?.cashback_covers_shipping||!1,pricesIncludeVat:d,vatLabel:d?'×××× ××¢"×':'××¤× × ××¢"×',categoryDiscounts:o,getB2BPrice:(t,r,i,n,l)=>{if(!e)return r;let s=t=>e?.prices_include_vat?1.18*t:t,d=a[t];if(d?.override_price!=null)return s(d.override_price);let c=l>0?l:r/1.18,u=[i,...n||[]].filter(Boolean),p=0;for(let e of u){let t=o[e];t&&t.discount_percentage>p&&(p=t.discount_percentage)}if(p>0)return s(c*(1-p/100));let m=e?.global_discount_percentage||0;return s(m>0?c*(1-m/100):c)},getB2BQuantityPricing:(t,r,i,n)=>{if(!e)return r||[];let l=t=>e?.prices_include_vat?(t||[]).map(e=>({...e,price_per_unit:null!=e.price_per_unit?1.18*e.price_per_unit:e.price_per_unit,...null!=e.original_price?{original_price:1.18*e.original_price}:{}})):t,s=a[t];if(s?.override_quantity_pricing?.length>0)return l(s.override_quantity_pricing);let d=[i,...n||[]].filter(Boolean),c=0;for(let e of d){let t=o[e];t&&t.discount_percentage>c&&(c=t.discount_percentage)}return l(function(e,t=0,r=null){return r&&r.length>0?r:!e||0===e.length||t<=0?e||[]:e.map(e=>({...e,price_per_unit:e.price_per_unit*(1-t/100),original_price:e.price_per_unit}))}((r||[]).map(e=>({...e,price_per_unit:e.price_per_unit/1.18})),c>0?c:e?.global_discount_percentage||0))},getEffectiveDiscount:(t,r,i)=>{let n=a[t];if(n?.override_price!=null)return null;let l=[r,...i||[]].filter(Boolean),s=0;for(let e of l){let t=o[e];t&&t.discount_percentage>s&&(s=t.discount_percentage)}return s>0?s:e?.global_discount_percentage||0},loading:l}}e.s(["default",()=>r],158209)},637011,e=>{"use strict";var t=e.i(843476),r=e.i(271645);e.i(174080);var a=e.i(991918),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,i)=>{let o=(0,a.createSlot)(`Primitive.${i}`),n=r.forwardRef((e,r)=>{let{asChild:a,...n}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(a?o:i,{...n,ref:r})});return n.displayName=`Primitive.${i}`,{...e,[i]:n}},{}),o="horizontal",n=["horizontal","vertical"],l=r.forwardRef((e,r)=>{var a;let{decorative:l,orientation:s=o,...d}=e,c=(a=s,n.includes(a))?s:o;return(0,t.jsx)(i.div,{"data-orientation":c,...l?{role:"none"}:{"aria-orientation":"vertical"===c?c:void 0,role:"separator"},...d,ref:r})});l.displayName="Separator";var s=e.i(340974);let d=r.forwardRef(({className:e,orientation:r="horizontal",decorative:a=!0,...i},o)=>(0,t.jsx)(l,{ref:o,decorative:a,orientation:r,className:(0,s.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",e),...i}));d.displayName=l.displayName,e.s(["Separator",()=>d],637011)},310217,e=>{"use strict";let t={x:0,y:0,w:1,h:1},r=e=>{if(null==e||""===e)return null;let t=Number(e);return Number.isFinite(t)?t:null},a=e=>Math.max(0,r(e.price)??0),i=e=>`âª${e%1==0?e:e.toFixed(2)}`,o=e=>e.toLowerCase().replace(/["'׳״ââ`׳״-]/g,"").replace(/\s+/g," ").trim(),n=e=>{let t=e?.composition;return t&&Array.isArray(t.items)&&0!==t.items.length?t:null},l=e=>{let t=new Map;for(let r of e.items){let e=r.size_label||(r.width_cm?`${r.width_cm} ס"×`:null),a=e?`${r.name} (${e})`:r.name;t.set(a,(t.get(a)||0)+1)}return[...t.entries()].map(([e,t])=>t>1?`${e} \xd7${t}`:e).join(", ")},s=e=>new Promise((t,r)=>{let a=new Image;a.crossOrigin="anonymous",a.onload=()=>t(a),a.onerror=()=>r(Error(`Could not load ${e}`)),a.src=e}),d=e=>s(e).catch(()=>s(`${e}${e.includes("?")?"&":"?"}composer=1`)),c=async e=>
1{let r=await d(e),a=Math.min(1,240/Math.max(r.naturalWidth,r.naturalHeight)),i=Math.max(1,Math.round(r.naturalWidth*a)),o=Math.max(1,Math.round(r.naturalHeight*a)),n=document.createElement("canvas");n.width=i,n.height=o;let l=n.getContext("2d",{willReadFrequently:!0});if(!l)throw Error("Canvas is not available");l.drawImage(r,0,0,i,o);let{data:s}=l.getImageData(0,0,i,o),c=i,u=o,p=-1,m=-1;for(let e=0;e<o;e++)for(let t=0;t<i;t++){let r=(e*i+t)*4;!(s[r+3]<16||s[r]>235&&s[r+1]>235&&s[r+2]>235)&&(t<c&&(c=t),t>p&&(p=t),e<u&&(u=e),e>m&&(m=e))}let f=r.naturalHeight/r.naturalWidth;if(p<c||m<u)return{crop:t,aspect:f};let h=Math.max(0,c-1),g=Math.max(0,u-1),_=Math.min(i,p+2),x=Math.min(o,m+2),b={x:h/i,y:g/o,w:(_-h)/i,h:(x-g)/o};return{crop:b,aspect:f*(b.h/b.w)}},u=new Map,p=new Map,m=async e=>{let t=await d(e),r=Math.min(1,1200/Math.max(t.naturalWidth,t.naturalHeight)),a=Math.max(1,Math.round(t.naturalWidth*r)),i=Math.max(1,Math.round(t.naturalHeight*r)),o=document.createElement("canvas");o.width=a,o.height=i;let n=o.getContext("2d",{willReadFrequently:!0});if(!n)throw Error("Canvas is not available");n.drawImage(t,0,0,a,i);let l=n.getImageData(0,0,a,i),{data:s}=l,c=new Uint8Array(a*i),u=new Int32Array(a*i),p=0,m=0,f=e=>{let t;!c[e]&&(s[(t=4*e)+3]<16||s[t]>235&&s[t+1]>235&&s[t+2]>235)&&(c[e]=1,u[m++]=e)};for(let e=0;e<a;e++)f(e),f((i-1)*a+e);for(let e=0;e<i;e++)f(e*a),f(e*a+a-1);for(;p<m;){let e=u[p++],t=e%a;t>0&&f(e-1),t<a-1&&f(e+1),e>=a&&f(e-a),e<a*(i-1)&&f(e+a)}for(let e=0;e<a*i;e++){let t=4*e;if(c[e]){s[t+3]=0;continue}let r=e%a;if(!(r>0&&c[e-1]||r<a-1&&c[e+1]||e>=a&&c[e-a]||e<a*(i-1)&&c[e+a]))continue;let o=Math.min(1,(255-Math.min(s[t],s[t+1],s[t+2]))/80);if(!(o>=1)){for(let e=0;e<3;e++)s[t+e]=Math.max(0,Math.round((s[t+e]-255*(1-o))/Math.max(o,.01)));s[t+3]=Math.round(s[t+3]*o)}}n.putImageData(l,0,0);let h=await new Promise((e,t)=>o.toBlob(r=>r?e(r):t(Error("Cutout export failed")),"image/png"));return{canvas:o,url:URL.createObjectURL(h)}},f=e=>{let t=u.get(e);return t||((t=m(e).then(t=>(p.set(e,t.url),t))).catch(()=>u.delete(e)),u.set(e,t)),t},h=async(e,r=1e3,a="image/jpeg")=>{let i=await d(e.background_url),o=Math.round(r*e.stage_aspect),n=document.createElement("canvas");n.width=r,n.height=o;let l=n.getContext("2d");if(!l)throw Error("Canvas is not available");l.fillStyle="#ffffff",l.fillRect(0,0,r,o),l.drawImage(i,0,0,r,o);let s=await Promise.all(e.items.map(e=>f(e.image_url).then(({canvas:e})=>({image:e,w:e.width,h:e.height,cut:!0}),()=>d(e.image_url).then(e=>({image:e,w:e.naturalWidth,h:e.naturalHeight,cut:!1}))))),c=r/500;return e.items.forEach((e,a)=>{let i=e.w/100*r,n=i*e.aspect,d=s[a];l.save(),d.cut?(l.shadowColor="rgba(0, 0, 0, 0.45)",l.shadowOffsetY=c,l.shadowBlur=1.5*c):l.globalCompositeOperation="multiply",l.translate(e.x/100*r,e.y/100*o),l.rotate(e.rotation*Math.PI/180),e.flip&&l.scale(-1,1);let u=e.crop||t;l.drawImage(d.image,u.x*d.w,u.y*d.h,u.w*d.w,u.h*d.h,-i/2,-n/2,i,n),l.restore()}),new Promise((e,t)=>{n.toBlob(r=>r?e(r):t(Error("Snapshot export failed")),a,.9)})},g=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");e.s(["ELEMENT_SHADOW",0,"drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.45))","MAX_ELEMENT_WIDTH",0,100,"MIN_ELEMENT_WIDTH",0,6,"buildCompositionEmailHtml",0,(e,t)=>{let r=n(e);if(!r)return"";let a=t?.maxSize??120,o=r.snapshot_url?`<a href="${g(r.snapshot_url)}" target="_blank"><img src="${g(r.snapshot_url)}" alt="×¢×צ×× ××××" style="max-width: ${a}px; max-height: ${a}px; border-radius: 4px; margin-top: 4px; border: 1px solid #ddd;"></a>`:"",s=r.pricing?.fee_per_unit?`<br><span style="font-size: 10px; color: #666;">ת×ספת ×××× ×××: ${i(r.pricing.fee_per_unit)} ×××××× (${(r.pricing.charged||[]).map(e=>`${g(e.name)} ${i(e.price)}`).join(", ")})</span>`:"";return`<div style="margin-top: 4px;"><span style="font-size: 10px; color: #666;">ð§© ×¢×צ×× ×××× ×××: ${g(l(r))}</span>${s}${o?`<br>${o}`:""}</div>`},"clamp",0,(e,t,r)=>Math.min(r,Math.max(t,e)),"cropImageStyle",0,(e=t)=>({position:"absolute",maxWidth:"none",width:`${100/e.w}%`,height:`${100/e.h}%`,left:`${-e.x/e.w*100}%`,top:`${-e.y/e.h*100}%`}),"describeComposerPricing",0,e=>
1{let t=Math.max(0,Math.floor(r(e?.element_composer_free_count)??0));return 0===t?null:1===t?"×××× × ××× ×××× ××××ר ××××":`${t} ×××× ××× ×××××× ××××ר ××××`},"describeComposition",0,l,"describeElementSize",0,e=>{let t=r(e.diameter_cm);if(t)return`×§××ר ${t} ס"×`;let a=r(e.width_cm),i=r(e.height_cm);return a&&i?`ר××× ${a} \xd7 ×××× ${i} ס"×`:a?`ר××× ${a} ס"×`:i?`×××× ${i} ס"×`:null},"elementPrice",0,a,"filterComposerElements",0,(e,t,{categoryId:r,query:a})=>{let i=o(a||"");if(i){let r=new Map(t.map(e=>[e.id,e.name]));return e.filter(e=>{let t=[e.name,e.keywords||"",...(e.category_ids||[]).map(e=>r.get(e)||"")].join(" ");return i.split(" ").every(e=>o(t).includes(e))})}return r?e.filter(e=>(e.category_ids||[]).includes(r)):e},"formatShekels",0,i,"getComposerBackgrounds",0,e=>{if(Array.isArray(e?.element_composer_backgrounds))return e.element_composer_backgrounds.filter(e=>e&&"string"==typeof e.url&&e.url);let t=e?.element_composer_background||e?.hero_image;return t?[{url:t,width_cm:e?.element_composer_width_cm??null,calibration:e?.element_composer_calibration??null}]:[]},"getCompositionPricing",0,(e,t)=>{let i=Math.max(0,Math.floor(r(e?.element_composer_free_count)??0)),o=t.map(e=>({name:e.name,price:a(e)})).sort((e,t)=>e.price-t.price).slice(i).filter(e=>e.price>0);return{free_count:i,element_count:t.length,charged:o,fee_per_unit:o.reduce((e,t)=>e+t.price,0)}},"getOrderComposition",0,n,"loadElementCutout",0,f,"measureElement",0,c,"newCompositionId",0,()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,"placedSizeCm",0,(e,t)=>{let a=r(e?.element_composer_width_cm);if(!a||a<=0)return null;let i=t.w/100*a;return{width:Math.round(10*i)/10,height:Math.round(i*t.aspect*10)/10}},"readyElementCutout",0,e=>p.get(e)??null,"realElementAspect",0,(e,t)=>{let a=r(e.width_cm),i=r(e.height_cm);return!r(e.diameter_cm)&&a&&i?i/a:t||null},"realElementWidthPercent",0,(e,t,a)=>{let i=r(e?.element_composer_width_cm);if(!i||i<=0)return null;let o=r(t.diameter_cm)??r(t.width_cm);if(o)return o/i*100;let n=r(t.height_cm);return n&&a?n/a/i*100:null},"renderCompositionSnapshot",0,h,"toNumberOrNull",0,r])},230869,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(310217);function i({item:e,className:i="",onPointerDown:o,onImageLoad:n}){let l=function(e){let[t,i]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let t=!0;return(0,a.loadElementCutout)(e).then(({url:r})=>{t&&i({src:e,url:r})},()=>{}),()=>{t=!1}},[e]),t?.src===e?t.url:(0,a.readyElementCutout)(e)}(e.image_url);return(0,t.jsx)("div",{className:`absolute overflow-hidden ${i}`,style:{left:`${e.x}%`,top:`${e.y}%`,width:`${e.w}%`,aspectRatio:`1 / ${e.aspect||1}`,transform:`translate(-50%, -50%) rotate(${e.rotation||0}deg) scaleX(${e.flip?-1:1})`,...l?{filter:a.ELEMENT_SHADOW}:{mixBlendMode:"multiply"}},onPointerDown:o,children:(0,t.jsx)("img",{src:l||e.image_url,alt:e.name,className:"pointer-events-none",style:(0,a.cropImageStyle)(e.crop),draggable:!1,onLoad:n})})}e.s(["default",()=>i])},111176,e=>{"use strict";var t=e.i(843476);e.i(271645);var r=e.i(230869);function a({composition:e,className:a="",style:i}){return e?.background_url?(0,t.jsxs)("div",{className:`relative overflow-hidden bg-white ${a}`,style:{aspectRatio:`1 / ${e.stage_aspect||1}`,isolation:"isolate",...i},children:[(0,t.jsx)("img",{src:e.background_url,alt:"××××",className:"absolute inset-0 w-full h-full object-fill select-none",draggable:!1}),(e.items||[]).map(e=>(0,t.jsx)(r.default,{item:e,className:"pointer-events-none"},e.uid))]}):null}e.s(["default",()=>a])}]);
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.