PageSourceSearch

https://fiks.org.pl/_next/static/chunks/20ftw8fi1_bj1.js

js fiks.org.pl collected 2026-10-06 13:34:25 UTC 7,503 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91247,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(43531),r=e.i(5852);e.s(["default",0,function(){let[e,l]=(0,a.useState)([]),[i,n]=(0,a.useState)(null),[d,o]=(0,a.useState)(1),[c,m]=(0,a.useState)(!1),[x,p]=(0,a.useState)(null),[u,g]=(0,a.useState)(null);(0,a.useState)(()=>{fetch("https://crm.fiks.org.pl/api/public/booking/services").then(e=>e.json()).then(e=>l(e.data)).catch(()=>{})});let b=async e=>{e.preventDefault(),g(null),m(!0);let t=Object.fromEntries(new FormData(e.currentTarget));t.service_type=i?.key,t.duration_minutes=i?.duration||50,t.is_online="on"===t.is_online,t.rodo_consent="on"===t.rodo_consent,t.is_first_visit="on"===t.is_first_visit,t.starts_at=new Date(t.preferred_date+"T"+(t.preferred_time||"10:00")).toISOString();let a=(0,r.getAttribution)();a&&(t.attribution=a);try{let e=await fetch("https://crm.fiks.org.pl/api/public/booking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),a=await e.json();if(!e.ok)throw Error(a.error||"Błąd");p(a);try{window.gtag?.("event","booking_created",{service:i?.key}),await (0,r.trackConversion)("booking",i?.price,{email:t.patient_email,phone:t.patient_phone})}catch{}}catch(e){g(e.message)}finally{m(!1)}};return x?(0,t.jsxs)("div",{className:"bg-white rounded-2xl p-10 text-center shadow-lg",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-green-100 rounded-full mx-auto mb-4 flex items-center justify-center",children:(0,t.jsx)(s.Check,{className:"w-8 h-8 text-green-600"})}),(0,t.jsx)("h3",{className:"text-2xl font-bold text-teal-900 mb-2",children:"Rezerwacja przyjęta!"}),(0,t.jsx)("p",{className:"text-gray-600 mb-4",children:x.message}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Sprawdź skrzynkę pocztową — wysłaliśmy szczegóły."})]}):(0,t.jsxs)("div",{className:"bg-white rounded-2xl p-5 sm:p-6 md:p-8 shadow-lg max-w-5xl mx-auto",children:[1===d&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-center mb-6",children:[(0,t.jsx)("h3",{className:"text-xl md:text-2xl font-bold text-teal-900",children:"1. Wybierz usługę"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:["Pierwsza konsultacja diagnostyczna jest ",(0,t.jsx)("strong",{children:"bezpłatna"})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{n(e),o(2)},className:"group text-left bg-teal-50 hover:bg-white hover:border-teal-500 hover:shadow-md rounded-2xl p-5 border-2 border-teal-100 transition-all flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2 mb-2",children:[(0,t.jsx)("span",{className:"font-bold text-teal-900 text-base leading-tight flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-xs font-bold whitespace-nowrap px-2.5 py-1 rounded-full ${0===e.price?"bg-green-100 text-green-700":"bg-teal-100 text-teal-800"}`,children:0===e.price?"BEZPŁATNIE":`${e.price} zł`})]}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-relaxed flex-1",children:e.description}),(0,t.jsx)("span",{className:"mt-3 text-xs text-teal-700 font-medium group-hover:translate-x-1 transition-transform inline-flex items-center gap-1",children:"Wybierz →"})]},e.key))})]}),2===d&&i&&(0,t.jsxs)("form",{onSubmit:b,className:"space-y-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>o(1),className:"text-sm text-teal-600",children:"← Zmień usługę"}),(0,t.jsxs)("div",{className:"bg-teal-50 rounded p-3 text-sm",children:["Wybrano: ",(0,t.jsx)("strong",{children:i.name})," · ",0===i.price?"BEZPŁATNIE":`${i.price} zł`," · ",i.duration," min"]}),(0,t.jsxs)("div",{className:"grid md:grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Imię i nazwisko *"}),(0,t.jsx)("input",{name:"patient_name",required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-lg"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email *"}),(0,t.jsx)("input",{name:"patient_email",type:"email",required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-lg"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Telefon *"}),(0,t.jsx)("input",{name:"patient_phone",type:"tel",required:!0,minLength:9,pattern:"[0-9 ()+\\-]{9,}",title:"Podaj numer telefonu (min. 9 cyfr) — potrzebny do potwierdzenia wizyty",placeholder:"np. 512 345 678",className:"w-full px-3 py-2 border border-gray-300 rounded-lg"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Wymagany — zadzwonimy, aby potwierdzić termin wizyty."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Grupa wieku"}),(0,t.jsxs)("select",{name:"age_group",className:"w-full px-3 py-2 border border-gray-300 rounded-lg",children:[(0,t.jsx)("option",{value:"",children:"— wybierz —"}),i.age_groups.includes("child_under_12")&&(0,t.jsx)("option",{value:"child_under_12",children:"Dziecko (do 12 lat)"}),i.age_groups.includes("teen")&&(0,t.jsx)("option",{value:"teen",children:"Nastolatek (13-17)"}),i.age_groups.includes("adult")&&(0,t.jsx)("option",{value:"adult",children:"Dorosły (18+)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Preferowana data *"}),(0,t.jsx)("input",{name:"preferred_date",type:"date",required:!0,min:new Date().toISOString().slice(0,10),className:"w-full px-3 py-2 border border-gray-300 rounded-lg"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Preferowana godzina"}),(0,t.jsx)("input",{name:"preferred_time",type:"time",defaultValue:"10:00",className:"w-full px-3 py-2 border border-gray-300 rounded-lg"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Wiadomość (opcjonalnie)"}),(0,t.jsx)("textarea",{name:"patient_message",rows:3,maxLength:2e3,placeholder:"Opisz krótko sytuację — pomoże nam się przygotować",className:"w-full px-3 py-2 border border-gray-300 rounded-lg"})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",name:"is_online"}),"Spotkanie online (Google Meet)"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",name:"is_first_visit",defaultChecked:!0}),"Pierwszy raz w Fundacji FIKS"]}),(0,t.jsxs)("label",{className:"flex items-start gap-2 text-sm bg-teal-50 rounded p-3",children:[(0,t.jsx)("input",{type:"checkbox",name:"rodo_consent",required:!0,className:"mt-0.5"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"Wyrażam zgodę"})," na przetwarzanie danych osobowych przez Fundację FIKS (KRS: 0001145300) w celu obsługi rezerwacji, zgodnie z RODO."]})]}),u&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-lg text-sm",children:u}
1),(0,t.jsx)("button",{type:"submit",disabled:c,className:"w-full bg-teal-700 hover:bg-teal-800 text-white font-bold py-3 rounded-lg disabled:opacity-60",children:c?"Wysyłanie...":"Zarezerwuj"})]})]})}])}]);

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.