(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3732],{73732:function(e,t,r){Promise.resolve().then(r.t.bind(r,81749,23)),Promise.resolve().then(r.bind(r,48290)),Promise.resolve().then(r.bind(r,96299))},86790:function(e,t,r){"use strict";r.d(t,{x:function(){return n}});let n=(0,r(2265).createContext)({isRequestMade:!1})},98064:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(57437),i=r(16691),a=r.n(i),s=r(2265),o=r(22169);function c(e){var t;let{useSkeleton:r=!1,src:i,width:c,height:d,alt:l,className:u,classNames:p,...h}=e,[g,m]=s.useState(r?"loading":"complete"),b=null!==(t=null==u?void 0:u.includes("w-"))&&void 0!==t&&t;return(0,n.jsx)("figure",{style:b?void 0:{width:"".concat(c,"px")},className:u,children:(0,n.jsx)(a(),{className:(0,o.cn)(null==p?void 0:p.image,"loading"===g&&(0,o.cn)("animate-pulse",null==p?void 0:p.blur)),src:i,width:c,height:d,alt:l,onLoad:()=>m("complete"),...h})})}},48290:function(e,t,r){"use strict";r.r(t);var n=r(57437),i=r(24033),a=r(82749),s=r(2265),o=r(88216),c=r(18749),d=r(97081),l=r(81848),u=r(86790);t.default=e=>{var t;let{id:r}=e,{setIsRequestMade:p}=(0,s.useContext)(u.x),h=(0,i.useRouter)(),{data:g}=(0,a.useSession)(),{token:m}=null!==(t=null==g?void 0:g.user)&&void 0!==t?t:{},b=async()=>{if(g)try{let e=await c.b.post("/shopping-session/cart/shop",{productId:Number(r),quantity:1},{headers:{Authorization:"Bearer ".concat(m)}});e.data.status?(o.toast.success("Produsul a fost adăugat \xeen coș"),p&&p(e=>!e)):o.toast.error(e.data.message)}catch(e){o.toast.error(d.Kb.error),console.log(e)}else h.push("/conectare")};return(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(l.Z,{onClick:b,type:"submit",variant:"blue-marguerite",className:"font-nunito mt-auto flex w-full items-center justify-center rounded-[4px] py-3 text-center text-xs font-semibold text-white lg:rounded-lg lg:py-3 lg:text-xl",children:"Adaugă in coș"})})}},81848:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(57437),i=r(2265),a=r(51678),s=r(22169);let o={primary:["bg-primary-500 text-white","border-primary-600 border","hover:bg-primary-600 hover:text-white","active:bg-primary-700","disabled:bg-primary-700"],outline:["text-primary-500","border-primary-500 border","hover:bg-primary-50 active:bg-primary-100 disabled:bg-primary-100"],ghost:["text-primary-500","shadow-none","hover:bg-primary-50 active:bg-primary-100 disabled:bg-primary-100"],light:["bg-white text-gray-700","border border-gray-300","hover:text-dark hover:bg-gray-100","active:bg-white/80 disabled:bg-gray-200"],dark:["bg-gray-900 text-white","border border-gray-600","hover:bg-gray-800 active:bg-gray-700 disabled:bg-gray-700"],"blue-marguerite":["bg-blue-marguerite-500 text-white","border-blue-marguerite-600 border","hover:bg-blue-marguerite-600 hover:text-white","active:bg-blue-marguerite-700","disabled:bg-blue-marguerite-700"],"golden-tainoi":["bg-golden-tainoi-300 text-white","border-golden-tainoi-400 border","hover:bg-golden-tainoi-400 hover:text-white","active:bg-golden-tainoi-400","disabled:bg-golden-tainoi-100"],gray:["bg-[#FAFAFF] text-[#A9A3B7]","border-[#D8D8DD] border","hover:bg-[#fafaff33]"],pink:["border-[#DDC7FC] text-blue-marguerite-500","bg-[#DDC7FC] border","hover:bg-[#b9a2f3] active:bg-[#DDC7FC] focus:bg-[#DDC7FC]"],invariant:[]};var c=i.forwardRef((e,t)=>{let{children:r,className:i,disabled:c,isLoading:d,variant:l="primary",...u}=e,p=d||c;return(0,n.jsxs)("button",{ref:t,type:"button",disabled:p,className:(0,s.cn)("inline-flex items-center rounded font-medium","focus-visible:ring-primary-500 focus:outline-none focus-visible:ring","shadow-sm","transition-colors duration-75",[o[l]],"disabled:cursor-not-allowed",d&&"relative text-transparent transition-none hover:text-transparent disabled:cursor-wait",i),...u,children:[d&&(0,n.jsx)("div",{className:(0,s.cn)("absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",{"text-white":["primary","dark"].includes(l),"text-black":["light"].includes(l),"text-primary-500":["outline","ghost"].includes(l)}),children:(0,n.jsx)(a.Cd,{className:"animate-spin"})}),r]})})},96299:function(e,t,r){"use strict";r.r(t);var n=r(57437),i=r(61396),a=r.n(i);r(2265);var s=r(81848),o=r(98064);t.default=e=>{let{productData:t,shopTest:r,contestTest:i}=e;return(0,n.jsxs)("div",{className:"flex h-auto flex-col rounded-lg border border-[#DBDBDB]",children:[t.stock?(0,n.jsx)(a(),{href:r?"/teste-dowin/produs/".concat(t.id):i?"/concursurile-cangurul/produs/".concat(t.id):"/magazin-dowin/produs/".concat(t.id),children:(0,n.jsx)(o.Z,{src:t.image,width:286,height:200,alt:"product-".concat(t.id),className:"2xl:7 aspect-square h-full max-h-[460px] w-full flex-1 rounded-tl-[7px] rounded-tr-[7px] p-4 pb-0 2xl:pb-0",classNames:{image:"w-full h-full rounded-tl-[7px] rounded-tr-[7px] object-contain"},useSkeleton:!0})}):(0,n.jsx)(o.Z,{src:t.image,width:286,height:200,alt:"product-".concat(t.id),className:"2xl:7 aspect-square h-full max-h-[460px] w-full flex-1 rounded-tl-[7px] rounded-tr-[7px] p-4 pb-0 2xl:pb-0",classNames:{image:"w-full h-full rounded-tl-[7px] rounded-tr-[7px] object-contain opacity-80"},useSkeleton:!0}),(0,n.jsxs)("div",{className:"mt-auto p-4 2xl:p-7",children:[(0,n.jsx)("h4",{className:"font-nunito-bold text-base text-[#0C0210] 2xl:text-2xl",children:t.title}),(0,n.jsx)("span",{className:"mb-6 mt-4 block h-[1px] w-full bg-[#DBDBDB] 2xl:mb-10 2xl:mt-7"}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[r?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)("span",{className:"".concat(t.stock?"text-blue-marguerite-500":"text-[#A9A3B7]"," font-nunito-bold block text-base 2xl:text-2xl"),children:t.stock?t.price?"".concat(t.price," Lei"):"\xcen stoc":"Stoc epuizat"}),t.stock?(0,n.jsx)(a(),{href:r?"/teste-dowin/produs/".concat(t.id):i?"/concursurile-cangurul/produs/".concat(t.id):"/magazin-dowin/produs/".concat(t.id),children:(0,n.jsx)(s.Z,{variant:"blue-marguerite",className:"font-nunito-semibold rounded px-4 py-3 text-xs 2xl:px-6 2xl:py-3 2xl:text-xl",children:"Vezi mai multe"})}):(0,n.jsx)(s.Z,{variant:"gray",disabled:!0,className:"font-nunito-semibold rounded bg-[#A9A3B7] px-4 py-3 text-xs text-[#F1EBFF] hover:bg-[#A9A3B7] hover:text-[#F1EBFF] 2xl:px-6 2xl:py-3 2xl:text-xl",children:"Vezi mai multe"})]})]})]},t.id)}},18749:function(e,t,r){"use strict";r.d(t,{b:function(){return n}});let n=r(92173).Z.create({baseURL:"".concat("https://api.dowin.eu","/api"),headers:{"Cache-Control":"no-cache",Pragma:"no-cache",Expires:"0"}})},97081:function(e,t,r){"use strict";var n;r.d(t,{CU:function(){return i},Kb:function(){return n},L$:function(){return s},hn:function(){return o},qV:function(){return c},wM:function(){return a}});let i=/^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$/i,a=/^\d{6}$/,s=[{subject:"Cangurul",path:"/concursurile-cangurul",color:"#DDC7FC",fillFlower:"#F4EDFF",fillArrow:"#7150E4"},{subject:"DoWin",path:"/teste-dowin",color:"#7A5AED",fillFlower:"#B19BFF",fillArrow:"#FFFFFF"},{subject:"generale",path:"/instructiuni-test",color:"#DDC7FC",fillFlower:"#F4EDFF",fillArrow:"#7150E4"}];(n||(n={})).error="Ups! Ceva nu a mers bine. Vă rugăm \xeencercați din nou";let o=[{id:1,isOpenQuestion:!1,questionNumber:1,questionDescription:'\n    <div style=\'display: flex; flex-direction: column; width: 100%; gap: 0.2rem;\'>\n      <p>Ce cifră acoperă floarea?</p>\n      <img width="130" height="102" alt="image"\n      src="/practiceTest/Image_001.png" />\n    </div>',questionAnswers:[{id:1,answer:"<span>2</span>",checked:!1},{id:2,answer:"<span>3</span>",checked:!1},{id:3,answer:"<span>4</span>",checked:!1},{id:4,answer:"<span>5</span>",checked:!1},{id:5,answer:"<span>6</span>",checked:!1}],sureAnswer:!1,hasBeenOpen:!0},{id:2,isOpenQuestion:!1,questionNumber:2,questionDescription:'\n    <div style=\'display: flex; flex-direction: column; width: 100%; gap: 1rem;\'>\n      <p>In c\xe2te poze sunt exact șase personaje?</p>\n      <img width="508" height="85" alt="image" src="/practiceTest/Image_002.png" />\n    </div>\n    ',questionAnswers:[{id:1,answer:"<span>1</span>",checked:!1},{id:2,answer:"<span>2</span>",checked:!1},{id:3,answer:"<span>3</span>",checked:!1},{id:4,answer:"<span>4</span>",checked:!1},{id:5,answer:"<span>5</span>",checked:!1}],sureAnswer:!1,hasBeenOpen:!1},{id:3,isOpenQuestion:!1,questionNumber:3,questionDescription:'\n    <div style=\'display: flex; flex-direction: column; width: 100%; gap: 1rem;\'>\n      <p>Care este ordinea desfășurării \xeen timp a evenimentelor??</p>\n      <img width="508" height="85" alt="image" src="/practiceTest/Image_003.png" />\n    </div>',questionAnswers:[{id:1,answer:"<span>3, 2, 1</span>",checked:!1},{id:2,answer:"<span>2, 3, 1</span>",checked:!1},{id:3,answer:"<span>2, 1, 3</span>",checked:!1},{id:4,answer:"<span>1, 3, 2</span>",checked:!1},{id:5,answer:"<span>3, 1, 2</span>",checked:!1}],sureAnswer:!1,hasBeenOpen:!1},{id:4,isOpenQuestion:!1,questionNumber:4,questionDescription:'\n    <div style=\'display: flex; flex-direction: column; width: 100%; gap: 1rem;\'>\n      <p>Care este cel mai scurt drum către cuib?</p>\n      <img width="508" height="85" alt="image" src="/practiceTest/Image_004.png" />\n    </div>',questionAnswers:[{id:1,answer:"<span>1</span>",checked:!1},{id:2,answer:"<span>2</span>",checked:!1},{id:3,answer:"<span>3</span>",checked:!1},{id:4,answer:"<span>4</span>",checked:!1},{id:5,answer:"<span>Toate drumurile au aceeași lungime</span>",checked:!1}],sureAnswer:!1,hasBeenOpen:!1},{id:5,isOpenQuestion:!1,questionNumber:5,questionDescription:'<div style=\'display: flex; flex-direction: column; width: 100%; gap: 1rem;\'>\n      <p>Cu c\xe2te culori va fi colorat\xe3 mingea?\n      Fiecare număr reprezint\xe3 o alt\xe3 culoare.</p>\n      <img width="308" height="85" alt="image" src="/practiceTest/Image_005.png" />\n    </div>',questionAnswers:[{id:1,answer:"<span>2</span>",checked:!1},{id:2,answer:"<span>3</span>",checked:!1},{id:3,answer:"<span>4</span>",checked:!1},{id:4,answer:"<span>5</span>",checked:!1},{id:5,answer:"<span>6</span>",checked:!1}],sureAnswer:!1,hasBeenOpen:!1}],c=[{questionId:1,correctAnswerId:2},{questionId:2,correctAnswerId:3},{questionId:3,correctAnswerId:5},{questionId:4,correctAnswerId:5},{questionId:5,correctAnswerId:2},{questionId:6,correctAnswerId:3},{questionId:7,correctAnswerId:4},{questionId:8,correctAnswerId:4},{questionId:9,correctAnswerId:2},{questionId:10,correctAnswerId:3}]},22169:function(e,t,r){"use strict";r.d(t,{D:function(){return s},cn:function(){return a}});var n=r(57042),i=r(74769);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,i.m6)((0,n.Z)(t))}function s(e,t){let r;return function(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];clearTimeout(r),r=setTimeout(()=>{clearTimeout(r),e(...i)},t)}}},61396:function(e,t,r){e.exports=r(25250)}}]);