1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9105],{11545:function(e,t,r){r.d(t,{AS:function(){return i},M6:function(){return n},YY:function(){return a},cl:function(){return l}}),r(83079);var s=r(12119),n=(0,s.$)("610494e3646b4f9fa424ee4973f058163836459e"),a=(0,s.$)("2dc17e15e292cd0fd2d432aec464ebf0870e3ca1"),l=(0,s.$)("6ffd084a9421b15ae6dfb462f949427752d277f9"),i=(0,s.$)("810fb2a099a71053ff810fe3fb106879c66b4494")},99890:function(e,t,r){r.d(t,{K:function(){return o}});let s="#5C0E1A",n="#5C3D00",a="#1A3461",l="#1A4D2E",i={urodziny:{iconName:"urodziny",bg:"#F8ECED",border:"#ECD8DC",color:s,tone:"burgund"},slub:{iconName:"slub",bg:"#FDF8EE",border:"#EAD8A8",color:n,tone:"gold"},baby_shower:{iconName:"baby_shower",bg:"#F0FFF4",border:"#C8F0D8",color:l,tone:"green"},komunia:{iconName:"komunia",bg:"#F0F7FF",border:"#C8DEFF",color:a,tone:"info"},osiemnastka:{iconName:"urodziny",bg:"#F8ECED",border:"#ECD8DC",color:s,tone:"burgund"},swieta:{iconName:"boze_narodzenie",bg:"#F0FAF0",border:"#C8ECC8",color:l,tone:"green"},ogolna:{iconName:"inne",bg:"#F8ECED",border:"#ECD8DC",color:s,tone:"burgund"},boze_narodzenie:{iconName:"boze_narodzenie",bg:"#F0FAF0",border:"#C8ECC8",color:l,tone:"green"},rocznica:{iconName:"rocznica",bg:"#FDF8EE",border:"#EAD8A8",color:n,tone:"gold"},walentynki:{iconName:"walentynki",bg:"#F8ECED",border:"#ECD8DC",color:s,tone:"burgund"},dzien_matki:{iconName:"dzien_matki",bg:"#F8ECED",border:"#ECD8DC",color:s,tone:"burgund"},dzien_ojca:{iconName:"dzien_ojca",bg:"#F0F7FF",border:"#C8DEFF",color:a,tone:"info"},imieniny:{iconName:"imieniny",bg:"#F0FFF4",border:"#C8F0D8",color:l,tone:"green"},parapetowka:{iconName:"parapetowka",bg:"#FDF8EE",border:"#EAD8A8",color:n,tone:"gold"},zareczyny:{iconName:"zareczyny",bg:"#FDF8EE",border:"#EAD8A8",color:n,tone:"gold"},wielkanoc:{iconName:"wielkanoc",bg:"#F0FFF4",border:"#C8F0D8",color:l,tone:"green"},panienski:{iconName:"panienski",bg:"#F8ECED",border:"#ECD8DC",color:s,tone:"burgund"},dzien_kobiet:{iconName:"dzien_kobiet",bg:"#F8ECED",border:"#ECD8DC",color:s,tone:"burgund"},inne:{iconName:"inne",bg:"#F8ECED",border:"#ECD8DC",color:s,tone:"burgund"}};function o(e){var t;return null!==(t=i[e])&&void 0!==t?t:i.inne}},9105:function(e,t,r){r.d(t,{GuestListView:function(){return Z}});var s=r(57437),n=r(2265),a=r(27648),l=r(14438),i=r(11545),o=r(32489),c=r(92934),d=r(42449),x=r(21410),h=r(19895);function m(e){let{isOpen:t,onClose:r,itemTitle:a,itemImage:l,itemId:m,itemUrl:u,hasLink:g,storeName:f,recipientName:p,reservationId:j,reservationToken:b}=e,w=(0,x.NT)(),[,y]=(0,n.useTransition)();function v(){y(()=>{(0,i.cl)({reservationId:j,token:b,event:"modal_dismissed"})}),r()}if((0,n.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&v()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]),!t)return null;let k=null!=f?f:w("share.confirmed.store_generic"),N=(0,h.P)({id:m,url:null!=u?u:null});return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 wg-modal-backdrop",onClick:e=>{e.target===e.currentTarget&&v()},children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl w-full max-w-sm shadow-2xl overflow-hidden",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"confirmed-modal-title",children:[(0,s.jsxs)("div",{className:"px-6 pt-6 pb-5 relative",style:{background:"linear-gradient(135deg, #fdf0ed 0%, #f0f7ee 100%)"},children:[(0,s.jsx)("button",{onClick:v,className:"absolute top-4 right-4 wg-text-muted hover:opacity-60 transition-opacity","aria-label":"Zamknij",children:(0,s.jsx)(o.Z,{size:18})}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:"#6eba7f22"},children:(0,s.jsx)(c.Z,{size:20,style:{color:"#6eba7f"}})}),(0,s.jsx)("div",{children:(0,s.jsx)("h3",{id:"confirmed-modal-title",className:"wg-heading font-bold text-base",style:{color:"#2c2c2c"},children:w("share.confirmed.heading")})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-14 h-14 roun
1ded-xl flex-shrink-0 overflow-hidden flex items-center justify-center",style:{backgroundColor:"#f5f5f5"},children:l?(0,s.jsx)("img",{src:l,alt:a,className:"w-full h-full object-cover",onError:e=>{e.currentTarget.style.display="none"}}):(0,s.jsx)("span",{className:"text-2xl",children:"\uD83C\uDF81"})}),(0,s.jsxs)("p",{className:"wg-text text-sm leading-snug line-clamp-3",children:[(0,s.jsx)("span",{className:"wg-text-muted",children:w("share.confirmed.subtitle_prefix")})," ",(0,s.jsx)("strong",{children:a})," ",(0,s.jsxs)("span",{className:"wg-text-muted",children:[w("share.confirmed.subtitle_for")," ",p,"."]})]})]})]}),(0,s.jsxs)("div",{className:"px-6 py-5 flex flex-col gap-4",children:[g?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("a",{href:N,target:"_blank",rel:"noopener noreferrer",onClick:function(){y(()=>{(0,i.cl)({reservationId:j,token:b,event:"affiliate_clicked"})})},className:"wg-bg-primary wg-text-white w-full flex items-center justify-center gap-2.5 rounded-full py-3.5 text-sm font-semibold transition-all hover:shadow-md hover:scale-[1.01] wg-shadow-rose-md no-underline",children:[(0,s.jsx)(d.Z,{size:16}),w("share.confirmed.buy_cta").replace("{storeName}",k)]}),(0,s.jsx)("p",{className:"text-xs text-center leading-relaxed",style:{color:"#8a8a8a"},children:w("share.confirmed.buy_argument").replace("{recipientName}",p)})]}):(0,s.jsx)("div",{className:"rounded-xl p-3 text-center text-xs",style:{backgroundColor:"#f5f5f5",color:"#8a8a8a"},children:w("share.confirmed.no_link_note")}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)("button",{onClick:v,className:"text-xs underline-offset-2 hover:underline transition-opacity hover:opacity-70",style:{color:"#8a8a8a"},children:w("share.confirmed.buy_later")})})]})]})})}var u=r(47411);let g=(0,u.Z)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),f=(0,u.Z)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]);var p=r(51817),j=r(87414),b=r(96362),w=r(31047),y=r(82023),v=r(23426);let k={viewBox:"0 0 48 48",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},N={urodziny:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M8 32h32v6a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2v-6Z"}),(0,s.jsx)("path",{d:"M8 32c0-3 3-5 8-5h16c5 0 8 2 8 5"}),(0,s.jsx)("path",{d:"M8 36h32"}),(0,s.jsx)("path",{d:"M15 27v-6"}),(0,s.jsx)("path",{d:"M24 27v-8"}),(0,s.jsx)("path",{d:"M33 27v-6"}),(0,s.jsx)("path",{d:"M15 21c0-1.2.7-2 1.5-3C15.8 17 15 16.2 15 15c0 1.2.7 2 1.5 3 .3.3.5.6.5 1 0 1.1-.9 2-2 2Z",fill:e,stroke:e}),(0,s.jsx)("path",{d:"M24 19c0-1.2.7-2 1.5-3C24.8 15 24 14.2 24 13c0 1.2.7 2 1.5 3 .3.3.5.6.5 1 0 1.1-.9 2-2 2Z"}),(0,s.jsx)("path",{d:"M33 21c0-1.2.7-2 1.5-3C32.8 17 32 16.2 32 15c0 1.2.7 2 1.5 3 .3.3.5.6.5 1 0 1.1-.9 2-2 2Z"})]}),slub:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"18",cy:"30",r:"9"}),(0,s.jsx)("circle",{cx:"30",cy:"30",r:"9"}),(0,s.jsx)("path",{d:"M18 12l-3 5h6l-3-5Z",fill:e,stroke:e}),(0,s.jsx)("path",{d:"M15 17h6"})]}),komunia:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M24 6v6"}),(0,s.jsx)("path",{d:"M15 9l3 5"}),(0,s.jsx)("path",{d:"M33 9l-3 5"}),(0,s.jsx)("circle",{cx:"24",cy:"20",r:"4"}),(0,s.jsx)("path",{d:"M24 24v14"}),(0,s.jsx)("path",{d:"M18 30h12"}),(0,s.jsx)("path",{d:"M12 40c4-2 8-2 12-2s8 0 12 2"})]}),baby_shower:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"16",y:"18",width:"16",height:"22",rx:"4"}),(0,s.jsx)("path",{d:"M18 14h12v4H18z"}),(0,s.jsx)("path",{d:"M20 14v-1a4 4 0 0 1 8 0v1"}),(0,s.jsx)("path",{d:"M19 27c2 1.3 4 1.3 5 0s3-1.3 5 0"}),(0,s.jsx)("path",{d:"M24 33a2.5 2.5 0 0 1 2-1.2c1.3 0 2 .9 2 2 0 1.6-2.5 3.2-4 4-1.5-.8-4-2.4-4-4 0-1.1.7-2 2-2 .8 0 1.6.4 2 1.2Z",fill:e,stroke:e})]}),boze_narodzenie:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M24 8l-6 9h3l-5 8h3l-5 8h20l-5-8h3l-5-8h3l-6-9Z"}),(0,s.jsx)("path",{d:"M20 42h8"}),(0,s.jsx)("path",{d:"M24 33v9"}),(0,s.jsx)("path",{d:"M24 4l1 3 3 .3-2.3 2 .7 3-2.4-1.5L21.6 12.3l.7-3
1L20 7.3l3-.3L24 4Z",fill:e,stroke:e})]}),inne:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"8",y:"20",width:"32",height:"20",rx:"2"}),(0,s.jsx)("path",{d:"M8 26h32"}),(0,s.jsx)("path",{d:"M24 20v20"}),(0,s.jsx)("path",{d:"M24 20c-2-3-6-6-9-6a3 3 0 0 0 0 6c3 0 6 0 9 0Z"}),(0,s.jsx)("path",{d:"M24 20c2-3 6-6 9-6a3 3 0 0 1 0 6c-3 0-6 0-9 0Z"})]}),rocznica:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M13 8l4 11a5 5 0 0 0 10 0l4-11"}),(0,s.jsx)("path",{d:"M17 8h14"}),(0,s.jsx)("path",{d:"M22 24v12"}),(0,s.jsx)("path",{d:"M18 40h8"}),(0,s.jsx)("path",{d:"M31 8l4 11a5 5 0 0 0 5 3"}),(0,s.jsx)("path",{d:"M35 23v13"}),(0,s.jsx)("path",{d:"M31 40h8"})]}),walentynki:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M24 40c-2-1.5-12-8-12-17a7 7 0 0 1 12-5 7 7 0 0 1 12 5c0 9-10 15.5-12 17Z"}),(0,s.jsx)("path",{d:"M24 18c-1-1.5-3-3-5-3"})]}),dzien_matki:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M24 22c-2-3-2-6 0-8 2 2 2 5 0 8Z"}),(0,s.jsx)("path",{d:"M16 24c-2-2-2-5 0-7 2 2 2 5 0 7Z"}),(0,s.jsx)("path",{d:"M32 24c-2-2-2-5 0-7 2 2 2 5 0 7Z"}),(0,s.jsx)("path",{d:"M16 24v8"}),(0,s.jsx)("path",{d:"M24 22v10"}),(0,s.jsx)("path",{d:"M32 24v8"}),(0,s.jsx)("path",{d:"M12 32h24l-3 8H15l-3-8Z"})]}),dzien_ojca:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M18 8h12l-2 4 4 4-8 24-8-24 4-4-2-4Z"}),(0,s.jsx)("path",{d:"M20 12h8"}),(0,s.jsx)("path",{d:"M16 16h16"})]}),imieniny:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"24",cy:"18",r:"3"}),(0,s.jsx)("path",{d:"M24 15c0-4 3-7 6-7-1 4-3 6-6 7Z"}),(0,s.jsx)("path",{d:"M24 15c0-4-3-7-6-7 1 4 3 6 6 7Z"}),(0,s.jsx)("path",{d:"M27 20c3-1 7-1 9 1-3 2-6 2-9-1Z"}),(0,s.jsx)("path",{d:"M21 20c-3-1-7-1-9 1 3 2 6 2 9-1Z"}),(0,s.jsx)("path",{d:"M24 21v19"}),(0,s.jsx)("path",{d:"M24 30c3-2 5-2 8-1-1 3-4 4-8 1Z"})]}),parapetowka:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M8 24l16-13 16 13"}),(0,s.jsx)("path",{d:"M12 22v17h24V22"}),(0,s.jsx)("path",{d:"M20 39v-9h8v9"}),(0,s.jsx)("circle",{cx:"24",cy:"20",r:"2.2",fill:e,stroke:e})]}),zareczyny:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"24",cy:"32",r:"9"}),(0,s.jsx)("path",{d:"M18 16h12l4 6-10 8-10-8 4-6Z",fill:e,stroke:e}),(0,s.jsx)("path",{d:"M18 16l6 6 6-6"}),(0,s.jsx)("path",{d:"M14 22h20"})]}),wielkanoc:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M24 6c-7 0-12 9-12 18s5 18 12 18 12-9 12-18S31 6 24 6Z"}),(0,s.jsx)("path",{d:"M14 22c2 2 4 2 6 0s4-2 6 0 4 2 6 0 4-2 4-2"}),(0,s.jsx)("path",{d:"M14 32c2-2 4-2 6 0s4 2 6 0 4-2 6 0 4 2 4 2"})]}),panienski:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M10 12h28L24 28 10 12Z"}),(0,s.jsx)("path",{d:"M24 28v10"}),(0,s.jsx)("path",{d:"M18 40h12"}),(0,s.jsx)("path",{d:"M30 12l4-4"}),(0,s.jsx)("circle",{cx:"34",cy:"8",r:"2",fill:e,stroke:e})]}),dzien_kobiet:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"24",cy:"18",r:"8"}),(0,s.jsx)("path",{d:"M24 26v14"}),(0,s.jsx)("path",{d:"M18 34h12"}),(0,s.jsx)("path",{d:"M16 12c0-3 3-6 8-6s8 3 8 6",stroke:e}),(0,s.jsx)("circle",{cx:"16",cy:"12",r:"1.5",fill:e,stroke:e}),(0,s.jsx)("circle",{cx:"32",cy:"12",r:"1.5",fill:e,stroke:e}),(0,s.jsx)("circle",{cx:"24",cy:"6",r:"1.5",fill:e,stroke:e})]})};function _(e){var t;let{name:r,size:n=44,accent:a="#C09A3A",className:l,...i}=e,o=N[r];return o?(0,s.jsx)("svg",{...k,width:n,height:n,className:l,role:"img","aria-label":null!==(t=i["aria-label"])&&void 0!==t?t:r,children:o(a)}):null}var M=r(99890),C=r(3548);function F(e){let{item:t,isLoggedIn:r,loginHref:l,onClose:i,onConfirm:c}=e,[d,h]=(0,n.useState)(""),[m,u]=(0,n.useState)(!1),[b,w]=(0,n.useState)(""),y=(0,x.NT)();async function v(e){if(e.preventDefault(),d.trim().length<2){w(y("share.name_min_error"));return}u(!0),w(""),await c(d.trim()),u(!1)}return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 wg-modal-backdrop",onClick:e=>{e.target===e.currentTarget&&i()},children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl p-6 w-full max-w-md
1shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"wg-heading font-bold text-lg",children:y("share.reserve_heading")}),(0,s.jsx)("p",{className:"wg-text-muted text-sm mt-1 line-clamp-2",children:t.title})]}),(0,s.jsx)("button",{onClick:i,className:"wg-text-muted ml-4 flex-shrink-0 hover:opacity-60 transition-opacity",children:(0,s.jsx)(o.Z,{size:18})})]}),(0,s.jsxs)("div",{className:"wg-bg-gold-light rounded-xl p-3 mb-5 flex items-start gap-2.5",children:[(0,s.jsx)(g,{size:14,className:"wg-text-gold flex-shrink-0 mt-0.5"}),(0,s.jsx)("p",{className:"wg-text-muted text-xs leading-relaxed",children:y("share.anonymity_tip")})]}),(0,s.jsxs)("form",{onSubmit:v,className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"wg-text text-sm font-medium block mb-1.5",children:y("share.your_name")}),(0,s.jsx)("input",{type:"text",value:d,onChange:e=>{h(e.target.value),w("")},placeholder:y("share.name_placeholder_modal"),maxLength:60,autoFocus:!0,className:"w-full rounded-xl px-4 py-3 text-sm border outline-none focus:border-[#E8A598] transition-colors ".concat(b?"wg-border-error":"wg-border-2")}),b&&(0,s.jsx)("p",{className:"wg-text-error text-xs mt-1",children:b})]}),!r&&(0,s.jsxs)("div",{className:"wg-bg-tag wg-border rounded-xl p-3 flex items-center gap-2.5",children:[(0,s.jsx)(f,{size:14,className:"wg-text-primary flex-shrink-0"}),(0,s.jsxs)("p",{className:"wg-text-muted text-xs",children:[(0,s.jsx)(a.default,{href:l,className:"wg-text-primary font-semibold underline",children:y("common.save")})," ",y("share.login_hint_modal")]})]}),(0,s.jsxs)("button",{type:"submit",disabled:m,className:"wg-bg-primary wg-text-white w-full flex items-center justify-center gap-2 rounded-full py-3 text-sm font-semibold transition-opacity disabled:opacity-60 wg-shadow-rose-md",children:[m?(0,s.jsx)(p.Z,{size:15,className:"animate-spin"}):(0,s.jsx)(j.Z,{size:15}),m?y("share.reserving"):y("share.confirm_yes")]})]})]})})}function z(e){let{item:t,myToken:r,isLoggedIn:a,onReserve:l,onCancel:i,onBuyAndReserve:o,canReserve:m}=e,u=!!r||!!t.is_my_reservation,g=t.is_reserved||u,[f,p]=(0,n.useState)(!1),w=(0,x.NT)(),y={1:{stars:"â
â
â
",label:w("lists.priority_must"),colorClass:"wg-text-primary",bgClass:"wg-bg-tag"},2:{stars:"â
â
",label:w("lists.priority_want"),colorClass:"wg-text-gold",bgClass:"wg-bg-gold-light"},3:{stars:"â
",label:w("lists.priority_nice"),colorClass:"wg-text-muted",bgClass:"bg-[#F5F5F5]"}}[t.priority];return(0,s.jsxs)("div",{className:"wg-bg-white wg-border rounded-2xl overflow-hidden transition-shadow",style:{opacity:g&&!u?.72:1,boxShadow:g&&!u?"none":void 0},children:[(0,s.jsxs)("div",{className:"flex gap-4 p-5",children:[(0,s.jsxs)("div",{className:"w-20 h-20 rounded-xl flex-shrink-0 flex items-center justify-center overflow-hidden relative ".concat(g&&!u?"wg-bg-surface":"wg-bg-tag"),children:[t.image_url&&!f?(0,s.jsx)("img",{src:t.image_url,alt:t.title,className:"w-full h-full object-cover rounded-xl",onError:()=>p(!0)}):(0,s.jsx)(v.j,{variant:g&&!u?"reserved":"available"}),g&&!u&&(0,s.jsx)("div",{className:"wg-reserved-overlay absolute inset-0 flex items-center justify-center rounded-xl",children:(0,s.jsx)(c.Z,{size:22,className:"wg-text-gold"})})]}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2 mb-1",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm leading-snug ".concat(g&&!u?"wg-text-muted":"wg-text"),children:t.title}),null!=t.price&&(0,s.jsxs)("span",{className:"text-sm font-bold flex-shrink-0 ".concat(g&&!u?"wg-text-subtle":"wg-text-primary"),children:[t.price.toLocaleString("pl-PL")," ",w("common.currency")]})]}),t.description&&(0,s.jsx)("p",{className:"wg-text-muted text-xs mb-2 line-clamp-2",children:t.description}),(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full ".concat(g?u?"wg-bg-gold-light wg-text-gold":"wg-bg-surface wg-text-muted":"".concat(y.bgClass," ").concat(y.colorClass)),children:[(0,s.jsx)("span",{style:{letterSpacing:"-1px",fontSize:"0.6rem"},children:g?"â":y.stars}),g?w(u?"share.my_reservation":"share.reserved_by"):y.label]}),t.url&&!g&&(0,s.jsxs)("a",{href:(0,h.P)(t),target:"_blank",rel:"noopener noreferrer",className:"wg-text-gold inline-flex items-center gap-1 text-xs transition-opacity hover:opacity-70 no-underline",children:[(0,s.jsx)(b.Z,{size:10}),w("share.buy_gift")]})]})]})]}),(0,s.jsx)("div",{className:"px-5 pb-5",children:g?u?(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[t.url&&(0,s.jsxs)("a",{href:(0,h.P)(t),target:"_blank",rel:"noopener noreferrer",className:"wg-bg-primary wg-text-white w-full flex items-center justify-center gap-2 rounded-full py-2.5 text-sm font-semibold transition-all hover:shadow-md hover:scale-[1.01] wg-shadow-rose no-underline",children:[(0,s.jsx)(d.Z,{size:14}),w("share.buy_gift")]}),a&&t.my_reservation_id&&(0,s.jsx)("button",{onClick:()=>i(t),className:"wg-text-muted text-xs text-center w-full hover:wg-text transition-colors underline underline-offset-2",children:w("reserved.cancel_reservation")})]}):(0,s.jsxs)("div",{className:"wg-bg-surface wg-text-muted flex items-center justify-center gap-2 rounded-full py-2.5 text-sm font-medium",children:[(0,s.jsx)(c.Z,{size:15}),w("share.reserved_btn")]}):m?(0,s.jsx)("div",{className:"flex flex-col gap-2",children:t.url&&o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{onClick:()=>o(t),className:"wg-bg-primary wg-text-white w-full flex items-center justify-center gap-2 rounded-full py-2.5 text-sm font-semibold transition-all hover:shadow-md hover:scale-[1.01] wg-shadow-rose",children:[(0,s.jsx)(d.Z,{size:14}),w("share.buy_gift")]}),(0,s.jsx)("button",{onClick:()=>l(t),className:"wg-text-muted text-xs text-center w-full hover:wg-text transition-colors underline underline-offset-2",children:w("share.reserve_only")})]}):(0,s.jsxs)("button",{onClick:()=>l(t),className:"wg-bg-primary wg-text-white w-full flex items-center justify-center gap-2 rounded-full py-2.5 text-sm font-semibold transition-all hover:shadow-md hover:scale-[1.01] wg-shadow-rose",children:[(0,s.jsx)(j.Z,{size:14}),w("share.reserve_this")]})}):(0,s.jsxs)("div",{className:"wg-text-subtle flex items-center justify-center gap-2 rounded-full py-2.5 text-sm font-medium bg-[#F5F5F5]",children:[(0,s.jsx)(j.Z,{size:14}),w("share.available")]})})]})}function Z(e){let{list:t,initialItems:r,isLoggedIn:c,isOwner:d=!1,slug:u}
1=e,[g,p]=(0,n.useState)(r),[b,v]=(0,n.useState)(null),[k,N]=(0,n.useState)({}),[Z,E]=(0,n.useState)(!1),[D,S]=(0,n.useState)(null),A=(0,n.useRef)(null),I=(0,x.NT)(),L=(0,x.bU)(),T=!d,R="/login?next=/shared/".concat(u);(0,n.useEffect)(()=>{try{let e=localStorage.getItem("wishglow_tokens"),t=e?JSON.parse(e):{};N(t)}catch(e){}},[]);let P=(0,n.useCallback)(e=>{A.current=e.id,v(e)},[]),U=(0,n.useCallback)(async(e,t)=>{let r=crypto.randomUUID(),s=await (0,i.YY)({itemId:e.id,name:t,token:r});if("error"in s){l.Am.error(s.error),A.current=null;return}try{let t=localStorage.getItem("wishglow_tokens"),s=t?JSON.parse(t):{};s[e.id]=r,localStorage.setItem("wishglow_tokens",JSON.stringify(s)),N(s)}catch(e){}if(s.isFirstReservation){var n;(0,C.L9)("first_reservation",{occasion:null!==(n=s.occasion)&&void 0!==n?n:void 0,days_since_created:s.daysSinceCreated})}A.current===e.id&&e.url&&window.open((0,h.P)(e),"_blank","noopener,noreferrer"),A.current=null,p(t=>t.map(t=>t.id===e.id?{...t,is_reserved:!0,is_my_reservation:!0,my_reservation_id:s.reservationId}:t)),v(null),S({reservationId:s.reservationId,reservationToken:r,itemId:s.itemId,itemTitle:s.itemTitle,itemImage:s.itemImage,itemUrl:e.url,hasLink:s.hasLink,storeName:s.storeName,recipientName:s.recipientName})},[]),O=(0,n.useCallback)(()=>{S(null),c||E(!0)},[c]),H=(0,n.useCallback)(async e=>{if(!e.my_reservation_id)return;let t=await (0,i.M6)(e.my_reservation_id);if("error"in t){l.Am.error(t.error);return}try{let t=localStorage.getItem("wishglow_tokens"),r=t?JSON.parse(t):{};delete r[e.id],localStorage.setItem("wishglow_tokens",JSON.stringify(r)),N(r)}catch(e){}p(t=>t.map(t=>t.id===e.id?{...t,is_reserved:!1,is_my_reservation:!1,my_reservation_id:null}:t)),l.Am.success("Rezerwacja anulowana.")},[]),V=g.filter(e=>!e.is_reserved),q=g.filter(e=>e.is_reserved);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-8",children:[t.owner_name&&(0,s.jsxs)("p",{className:"wg-text-muted text-sm mb-2 flex items-center gap-1.5",children:[(0,s.jsx)(j.Z,{size:13,className:"wg-text-primary flex-shrink-0"}),I("share.list_for")," ",(0,s.jsx)("span",{className:"wg-text font-semibold",children:t.owner_name})]}),(0,s.jsx)("h1",{className:"wg-heading wg-text font-bold leading-tight mb-3 wg-title-section",children:t.title}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-3",children:[t.occasion_type&&(()=>{let e=(0,M.K)(t.occasion_type);return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-medium px-3 py-1 rounded-full",style:{backgroundColor:e.bg,border:"1px solid ".concat(e.border),color:e.color},children:[(0,s.jsx)(_,{name:e.iconName,size:14}),I("occasions."+t.occasion_type)]})})(),t.occasion_date&&(0,s.jsxs)("span",{className:"wg-text-muted flex items-center gap-1.5 text-xs",children:[(0,s.jsx)(w.Z,{size:12}),new Date(t.occasion_date+"T00:00:00").toLocaleDateString("en"===L?"en-GB":"pl-PL",{day:"numeric",month:"long",year:"numeric"})]})]}),t.description&&(0,s.jsx)("p",{className:"wg-text-muted text-sm leading-relaxed",children:t.description}),g.length>0&&(0,s.jsxs)("div",{className:"mt-4 flex items-center gap-3",children:[(0,s.jsx)("div",{className:"wg-bg-surface flex-1 h-2 rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"wg-bg-gold h-full rounded-full transition-all duration-500",style:{width:"".concat(q.length/g.length*100,"%")}})}),(0,s.jsx)("span",{className:"wg-text-muted text-xs flex-shrink-0",children:I("share.reserved_progress",{reserved:q.length,total:g.length})})]})]}),0===g.length?(0,s.jsxs)("div",{className:"text-center py-16",children:[(0,s.jsx)("p",{className:"text-4xl mb-3",children:"\uD83C\uDF81"}),(0,s.jsx)("p",{className:"wg-text font-medium mb-1",children:I("share.empty_list")}),(0,s.jsx)("p",{className:"wg-text-muted text-sm",children:I("share.empty_owner_desc")})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[V.map(e=>{var t;return(0,s.jsx)(z,{item:e,myToken:null!==(t=k[e.id])&&void 0!==t?t:null,isLoggedIn:c,onReserve:v,onCancel:H,onBuyAnd
1Reserve:P,canReserve:T},e.id)}),q.map(e=>{var t;return(0,s.jsx)(z,{item:{...e,is_reserved:!0},myToken:null!==(t=k[e.id])&&void 0!==t?t:null,isLoggedIn:c,onReserve:v,onCancel:H,onBuyAndReserve:P,canReserve:T},e.id)})]}),(0,s.jsxs)("div",{className:"mt-8 rounded-2xl border wg-bg-surface p-5 text-center shadow-sm",style:{borderColor:"#c8e6c2"},children:[(0,s.jsx)("div",{className:"w-10 h-10 rounded-full flex items-center justify-center mx-auto mb-3",style:{backgroundColor:"#f0f7ee"},children:(0,s.jsx)(y.Z,{size:18,style:{color:"#a8c5a0"}})}),(0,s.jsx)("p",{className:"wg-text font-semibold text-sm mb-1",children:I("share.guest_cta_title")}),(0,s.jsx)("p",{className:"wg-text-muted text-xs leading-relaxed mb-4 max-w-xs mx-auto",children:I("share.guest_cta_desc")}),(0,s.jsxs)("a",{href:"/?ref=guest-cta",onClick:()=>{var e;return(0,C.L9)("guest_cta_click",{occasion:null!==(e=t.occasion_type)&&void 0!==e?e:void 0})},className:"inline-flex items-center gap-1.5 text-xs font-semibold px-5 py-2.5 rounded-full text-white",style:{backgroundColor:"#e8a598"},children:[(0,s.jsx)(j.Z,{size:13}),I("share.guest_cta_button")]})]}),!c&&Z&&(0,s.jsxs)("div",{className:"mt-6 rounded-2xl border wg-bg-surface p-4 flex gap-3 items-start shadow-sm",style:{borderColor:"#e8a598"},children:[(0,s.jsx)("div",{className:"flex-shrink-0 mt-0.5 w-8 h-8 rounded-full flex items-center justify-center",style:{backgroundColor:"#fdf0ed"},children:(0,s.jsx)(f,{size:16,style:{color:"#e8a598"}})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"wg-text font-semibold text-sm mb-1",children:I("share.login_prompt_title")}),(0,s.jsx)("p",{className:"wg-text-muted text-xs leading-relaxed mb-3",children:I("share.login_prompt_desc")}),(0,s.jsxs)(a.default,{href:R,className:"inline-flex items-center gap-1.5 text-xs font-semibold px-4 py-2 rounded-full text-white",style:{backgroundColor:"#e8a598"},children:[(0,s.jsx)(f,{size:13}),I("share.login_prompt_cta")]})]}),(0,s.jsx)("button",{onClick:()=>E(!1),className:"flex-shrink-0 wg-text-muted hover:wg-text transition-colors","aria-label":"Zamknij",children:(0,s.jsx)(o.Z,{size:16})})]}),b&&(0,s.jsx)(F,{item:b,isLoggedIn:c,loginHref:R,onConfirm:e=>U(b,e),onClose:()=>v(null)}),D&&(0,s.jsx)(m,{isOpen:!0,onClose:O,itemTitle:D.itemTitle,itemImage:D.itemImage,itemId:D.itemId,itemUrl:D.itemUrl,hasLink:D.hasLink,storeName:D.storeName,recipientName:D.recipientName,reservationId:D.reservationId,reservationToken:D.reservationToken})]})}},23426:function(e,t,r){r.d(t,{j:function(){return a}});var s=r(57437);let n="#C09A3A";function a(e){let{variant:t="available",size:r=34}=e;return(0,s.jsx)("svg",{width:r,height:r,viewBox:"0 0 48 48",fill:"none",stroke:"reserved"===t?"#9AA0A6":"#7A2A33",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",role:"presentation",children:"reserved"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M24 26c-3-5-9-10-14-8a4 4 0 0 0 0 8c5 0 9-1 14 0Z"}),(0,s.jsx)("path",{d:"M24 26c3-5 9-10 14-8a4 4 0 0 1 0 8c-5 0-9-1-14 0Z"}),(0,s.jsx)("circle",{cx:"24",cy:"26",r:"3",fill:n,stroke:n}),(0,s.jsx)("path",{d:"M22 30l-3 8M26 30l3 8"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M24 6v10M24 32v10M6 24h10M32 24h10"}),(0,s.jsx)("path",{d:"M24 16c1.5 4.5 3.5 6.5 8 8-4.5 1.5-6.5 3.5-8 8-1.5-4.5-3.5-6.5-8-8 4.5-1.5 6.5-3.5 8-8Z",fill:n,stroke:n,strokeWidth:1.2})]})})}},19895:function(e,t,r){r.d(t,{P:function(){return s}});function s(e){return"/api/go/".concat(e.id)}},3548:function(e,t,r){function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!=typeof window.gtag)return;let r={};for(let[e,s]of Object.entries(t))null!=s&&(r[e]=s);window.gtag("event",e,r)}r.d(t,{CO:function(){return l},L9:function(){return s},t4:function(){return a}});let n="wg_src";function a(){if("undefined"==typeof document)return null;let e=document.cookie.match(new RegExp("(?:^|; )".concat(n,"=([^;]*)")));return e?decodeURIComponent(e[1]):null}function l(){var e;let t=new URLSearchParams(window.location.search),r=null!==(e=t.get("utm_source"))&&void 0!==e?e:t.get("ref");if(!r||a())return;let s=r.trim().slice(0,60);if(!s)return;let l="https:"===window.location.protocol?"; Secure":"";document.cookie="".concat(n,"=").concat(encodeURIComponent(s),"; Max-Age=").concat(7776e3,"; Path=/; SameSite=Lax").concat(l)}},21410:function(e,t,r){r.d(t,{bd:function(){return x},bU:function(){return m},NT:function(){return h}});var s=r(57437),n=r(79441),a=r(38706),l=r(66264),i=r(47221);function o(e){e.code!==i.a.MISSING_MESSAGE&&console.error(e)}function c(e){let{namespace:t,key:r}=e;return t?"".concat(t,".").concat(r):r}var d=r(69090);function x(e){let{children:t,locale:r,messages:a}=e;return(0,s.jsx)(n.default,{locale:r,messages:a,onError:o,getMessageFallback:c,children:t})}function h(){let e=(0,a.T)();return(0,d.IW)(e)}function m(){return(0,l.bU)()}},69090:function(e,t,r){r.d(t,{IW:function(){return n},RF:function(){return s}});let s=["pl","en"];function n(e){let t=(t,r)=>e(t,r);return t.raw=t=>e.raw(t),t}},31047:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(47411).Z)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},92934:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(47411).Z)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},96362:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(47411).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},87414:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(47411).Z)("gift",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8",key:"1sqzm4"}],["path",{d:"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5",key:"kc0143"}],["rect",{x:"3",y:"7",width:"18",height:"4",rx:"1",key:"1hberx"}]])},51817:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(47411).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},42449:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(47411).Z)("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7
1a2 2 0 0 0-1.6.8z",key:"o988cm"}]])},82023:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(47411).Z)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},27648:function(e,t,r){r.d(t,{default:function(){return n.a}});var s=r(72972),n=r.n(s)},12119:function(e,t,r){Object.defineProperty(t,"$",{enumerable:!0,get:function(){return n}});let s=r(83079);function n(e){let{createServerReference:t}=r(6671);return t(e,s.callServer)}},38706:function(e,t,r){r.d(t,{T:function(){return a}});var s=r(66264);function n(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let a=n(0,s.T_);n(0,s.Gb)}}]);
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.