PageSourceSearch

https://chawrantattoo.pl/core/modules/cfcae6ed51/public/views/temp…/dist/assets/ContestApp-CZ0fb9WD.js

js chawrantattoo.pl collected 2026-10-08 07:34:51 UTC 11,553 bytes, 1 lines download raw bytes

1import{b as L,j as e,r as l}from"./vendor-DBv0vXr_.js";import{s as y,c0 as z,c1 as O,bs as C,l as W,bW as q,bT as K,a as P,bJ as V,al as H,o as A,aH as Q}from"./booking-Dqn7HmPx.js";const $=()=>{const[s,i]=l.useState("start"),[c,p]=l.useState(0),[o,g]=l.useState(0),[b,m]=l.useState(0),[w,h]=l.useState(null),[v,N]=l.useState(!1),[f,k]=l.useState(!1),d=window.imh_public_data?.main_page_settings||{},n=Array.isArray(d.contest_questions)?d.contest_questions:[],r=Array.isArray(d.contest_visual_challenges)?d.contest_visual_challenges:[],S=d.contest_title||"Ink Quest",E=d.contest_subtitle||"Wyzwanie dla prawdziwych fanów sztuki.",_=d.contest_max_reward||"250 PLN";l.useEffect(()=>(y("contest-modal",f),()=>y("contest-modal",!1)),[f]),l.useEffect(()=>{const t=()=>{k(!0),i("start"),m(0),p(0),g(0),setTimeout(()=>{N(!0)},50)};return window.addEventListener("imh-internal-open-contest",t),window.imhPendingContestOpen&&(t(),window.imhPendingContestOpen=!1),()=>window.removeEventListener("imh-internal-open-contest",t)},[]);const T=()=>{N(!1),setTimeout(()=>k(!1),500)},R=t=>{const a=parseInt(t)===parseInt(n[c].correct);a&&m(j=>j+1),h(a),setTimeout(()=>{h(null),c<n.length-1?p(c+1):r.length>0?i("visual"):i("result")},800)},I=t=>{const a=t===r[o].correct;a&&m(j=>j+1),h(a),setTimeout(()=>{h(null),o<r.length-1?g(o+1):i("result")},800)},u=n.length+r.length,x=(()=>{const t=b/u;return t===1?{title:"INK LEGEND",discount:"25%",code:"CHW-MASTER-25",desc:"Pełna sesja z mega rabatem!",color:"text-red-500"}:t>=.6?{title:"INK ARTIST",discount:"15%",code:"CHW-SKILL-15",desc:"Solidny rabat na kolejny tatuaż.",color:"text-yellow-500"}:t>=.3?{title:"INK PADAWAN",discount:"50 PLN",code:"CHW-START-50",desc:"Voucher na start Twojej przygody.",color:"text-blue-500"}:{title:"INK NOVICE",discount:"KONSULTACJA",code:"FREE-CONSULT",desc:"Darmowa kawa i projektowanie!",color:"text-white/40"}})();return e.jsxs("div",{className:`fixed inset-0 z-[999999] bg-[#030303] text-white font-sans selection:bg-red-600 flex flex-col items-center justify-center p-6 md:p-12 overflow-y-auto overflow-x-hidden transition-all duration-500 ${v?"opacity-100":"opacity-0 pointer-events-none"}`,style:{display:f?"flex":"none"},children:[e.jsx("button",{onClick:T,className:"absolute top-6 right-6 z-50 text-white/50 hover:text-white transition-colors bg-white/5 hover:bg-white/10 p-2 rounded-full backdrop-blur-md border border-white/10",children:e.jsx(z,{size:32})}),e.jsx("div",{className:"fixed top-0 left-0 w-full h-full opacity-[0.03] pointer-events-none bg-[url('https://grainy-gradients.vercel.app/noise.svg')] z-0"}),e.jsx("div",{className:"fixed -top-[20%] -left-[10%] w-[60%] h-[60%] bg-red-600/10 rounded-full blur-[150px] pointer-events-none"}),e.jsxs("div",{className:`w-full max-w-[1000px] my-auto relative z-10 transition-all duration-1000 ${v?"opacity-100 translate-y-0 scale-100":"opacity-0 translate-y-10 scale-95"}`,children:[s!=="start"&&s!=="result"&&e.jsx("div",{className:"mb-8 flex justify-center gap-2",children:[...Array(u)].map((t,a)=>e.jsx("div",{className:`h-1.5 rounded-full transition-all duration-500 ${a<(s==="quiz"?c:n.length+o)?"w-8 bg-red-600":"w-2 bg-white/10"}`},a))}),e.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-[4rem] p-8 md:p-16 shadow-2xl relative overflow-hidden min-h-[600px] flex flex-col justify-center",children:[w!==null&&e.jsx("div",{className:`absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm transition-all ${w?"bg-emerald-500/10":"bg-red-600/10"}`,children:e.jsx("div",{className:"animate-in zoom-in duration-300",children:w?e.jsx(O,{size:120,className:"text-emerald-500"}):e.jsx(z,{size:120,className:"text-red-500"})})}),s==="start"&&e.jsxs("div",{className:"text-center space-y-12 animate-in fade-in zoom-in-95 duration-700",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 text-red-600",children:[e.jsx(C,{size:20,fill:"currentColor"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.8em] italic",children:"Tattoo Challenge"}),e.jsx(C,{size:20,fill:"currentColor"})]}),e.jsx("h2",{className:"text-6xl md:text-9xl font-black italic uppercase tracking-tighter leading-none",dangerouslySetInnerHTML:{__html:W(S)}})]}),e.jsxs("p",{className:"text-white/40 text-lg max-w-lg mx-auto font-medium leading-relaxed italic uppercase tracking-wide",children:[E," Odpowiedz poprawnie na pytania i zgarnij vouchery o wartości do"," ",e.jsx("span",{className:"text-red-600 font-black",children:_}),"."]}),u>0?e.jsxs("button",{onClick:()=>{n.length>0?i("quiz"):r.length>0?i("visual"):i("result")},className:"bg-white text-black px-16 py-6 rounded-[2rem] font-black text-xs uppercase tracking-[0.4em] shadow-[0_20px_40px_rgba(255,255,255,0.1)] hover:scale-105 active:scale-95 transition-all flex items-center gap-4 mx-auto",children:["Rozpocznij Wyzwanie ",e.jsx(q,{size:20})]}):e.jsx("div",{className:"bg-white/10 text-white/40 px-12 py-5 rounded-[2rem] font-black text-xs uppercase tracking-widest border border-white/5 mx-auto inline-block",children:"Konkurs w przygotowaniu"})]}),s==="quiz"&&n.length>0&&e.jsxs("div",{className:"space-y-12 animate-in fade-in slide-in-from-right-8 duration-500",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-2xl bg-red-600/10 flex items-center justify-center text-red-500",children:e.jsx(K,{size:24})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("span",{className:"text-[10px] font-black text-red-500 uppercase tracking-[0.4em] italic",children:"Etap 1: Wiedza"}),e.jsxs("h3",{className:"text-2xl md:text-4xl font-black italic uppercase tracking-tighter leading-none",children:["Pytanie ",c+1]})]})]}),e.jsxs("div",{className:"space-y-8",children:[e.jsx("p",{className:"text-xl md:text-3xl font-black italic uppercase tracking-tight text-white/90 leading-tight",children:n[c].q}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:n[c].options.map((t,a)=>e.jsxs("button",{onClick:()=>R(a),className:"p-8 rounded-[2rem] bg-white/5 border border-white/5 hover:border-red-600 hover:bg-white/[0.08] transition-all text-left group relative overflow-hidden",children:[e.jsx("span",{className:"font-black text-sm uppercase tracking-widest text-white/40 group-hover:text-white relative z-10 transition-colors",children:t}),e.jsx("div",{className:"absolute right-6 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-all",children:e.jsx(P,{size:20,className:"text-red-500"})})]},a))})]})]}),s==="visual"&&r.length>0&&e.jsxs("div",{className:"space-y-10 animate-in fade-in slide-in-from-right-8 duration-500",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-2xl bg-blue-600/10 flex items-center justify-center text-blue-500",children:e.jsx(V,{size:24})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("span",{className:"text-[10px] font-black text-blue-500 uppercase tracking-[0.4em] italic",children:"Etap 2: Oko Artysty"}),e.jsx("h3",{className:"text-2xl md:text-4xl font-black italic uppercase tracking-tighter leading-none",children:"Czyj to styl?"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10 items-center",children:[e.jsxs("div",{className:"aspect-square md:aspect-[3/4] rounded-[3rem] overflow-hidden border-2 border-white/5 shadow-2xl relative group",children:[e.jsx("img",{src:r[o].img,className:"w-full h-full object-cover grayscale transition-all duration-1000 group-hover:grayscale-0",alt:"Artist work"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-trans
1parent to-transparent"}),e.jsx("div",{className:"absolute bottom-8 left-8",children:e.jsx("span",{className:"bg-red-600 text-white px-4 py-1.5 rounded-full text-[9px] font-black uppercase tracking-widest italic",children:r[o].style})})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsx("p",{className:"text-lg font-bold italic uppercase tracking-widest text-white/60",children:"Wskaż artystę, który wykonał tę pracę:"}),e.jsx("div",{className:"grid gap-3",children:r[o].options.map(t=>e.jsx("button",{onClick:()=>I(t),className:"w-full p-6 rounded-2xl bg-white/5 border border-white/5 hover:border-blue-500 hover:bg-white/[0.08] transition-all font-black uppercase tracking-widest italic text-sm text-left px-8",children:t},t))})]})]})]}),s==="result"&&e.jsxs("div",{className:"text-center space-y-12 animate-in fade-in zoom-in-95 duration-1000",children:[e.jsxs("div",{className:"relative inline-block",children:[e.jsx("div",{className:`w-40 h-40 rounded-[3rem] flex items-center justify-center shadow-2xl rotate-12 mx-auto border-2 border-white/10 ${b/u>=.6?"bg-red-600 shadow-red-600/40":"bg-neutral-900"}`,children:e.jsx(H,{size:80,className:"text-white drop-shadow-2xl"})}),e.jsxs("div",{className:"absolute -bottom-4 -right-4 bg-white text-black px-6 py-2 rounded-full font-black text-xl italic shadow-2xl border-4 border-[#0a0a0a]",children:[b,"/",u]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:`text-5xl md:text-8xl font-black italic uppercase tracking-tighter leading-none ${x.color}`,children:x.title}),e.jsxs("p",{className:"text-white/40 text-sm md:text-lg max-w-md mx-auto font-bold uppercase tracking-widest italic leading-relaxed",children:[x.desc," Gratulacje, odblokowałeś unikalne korzyści!"]})]}),e.jsx("div",{className:"bg-white/[0.02] border-2 border-white/10 border-dashed rounded-[3.5rem] p-12 max-w-lg mx-auto relative overflow-hidden group shadow-inner",children:e.jsxs("div",{className:"relative z-10 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-center gap-4",children:[e.jsx(A,{className:"text-red-500",size:24}),e.jsx("span",{className:"text-xs font-black text-white/30 uppercase tracking-[0.5em] italic",children:"Twój Reward Code"}),e.jsx(A,{className:"text-red-500",size:24})]}),e.jsx("div",{className:"text-6xl md:text-7xl font-black tracking-tighter text-white uppercase italic",children:x.discount}),e.jsx("div",{className:"bg-black/40 backdrop-blur-md px-8 py-4 rounded-2xl border border-white/10 inline-block",children:e.jsx("span",{className:"text-2xl font-mono font-black tracking-[0.3em] text-red-500",children:x.code})}),e.jsx("p",{className:"text-[10px] text-white/20 font-black uppercase tracking-widest italic",children:"Zrób screena lub skopiuj kod. Ważny do końca miesiąca."})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 justify-center",children:[e.jsx("button",{onClick:()=>navigator.clipboard.writeText(x.code),className:"bg-white text-black px-12 py-5 rounded-[2rem] font-black text-xs uppercase tracking-widest shadow-2xl hover:scale-105 active:scale-95 transition-all",children:"Skopiuj do schowka"}),e.jsxs("button",{onClick:()=>{i("start"),m(0),p(0),g(0)},className:"bg-white/5 border border-white/10 text-white/30 px-10 py-5 rounded-[2rem] font-black text-xs uppercase tracking-widest hover:text-white transition-all flex items-center gap-3 justify-center",children:[e.jsx(Q,{size:16})," Spróbuj jeszcze raz"]})]})]})]})]})]})},B=()=>{let s=document.getElementById("contest-react-root");if(s||(s=document.createElement("div"),s.id="contest-react-root",document.body.appendChild(s)),s.dataset.reactMounted)return;s.dataset.reactMounted="true";const i=L.createRoot(s);window.ContestReact={loaded:!0,open:()=>{window.dispatchEvent(new CustomEvent("imh-internal-open-contest"))}},i.render(e.jsx($,{}))};export{B as initContestReact};

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.