1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9165,e=>{"use strict";let t={NEWEST:0,OLDEST:1,PRICE_ASC:2,PRICE_DESC:3};async function s(e=0,a=16,r="NEWEST",i={},n=""){let o=new URLSearchParams({offset:String(e),limit:String(a)}),l={sort:t[r],sell_type:"SELL",search_query:"",country_code:"BA"};for(let[e,t]of Object.entries(i))null!=t&&""!==t&&(Array.isArray(t)&&0===t.length||(l[e]=t));let c=await fetch(`/api/articles/filter?${o}`,{method:"POST",headers:{"Content-Type":"application/json","Access-Token":n},body:JSON.stringify(l)});return c.ok?c.json():[]}async function a(e,t){let s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:t})}),a=await s.json();if(!s.ok)throw Error(a.message||"GreÅ¡ka pri prijavi.");return a}async function r(e){let t=await fetch("/api/user/details",{headers:{"Access-Token":e},cache:"no-store"});return t.ok?t.json():null}async function i(e,t=""){let s=await fetch(`/api/user/articles?userId=${e}&type=active`,{headers:{"Access-Token":t},cache:"no-store"});return s.ok?s.json():[]}async function n(e,t=""){let s=await fetch(`/api/user/articles?userId=${e}&type=completed`,{headers:{"Access-Token":t},cache:"no-store"});return s.ok?s.json():[]}async function o(e){let t=await fetch("/api/article/favorites/active",{headers:{"Access-Token":e},cache:"no-store"});return t.ok?t.json():[]}async function l(e){let t=await fetch("/api/article/favorites/completed",{headers:{"Access-Token":e},cache:"no-store"});return t.ok?t.json():[]}async function c(e){let t=await fetch("/api/payment/transactions",{headers:{"Access-Token":e},cache:"no-store"});return t.ok?t.json():null}async function d(e=""){let t=await fetch("/api/payment/packages",{headers:{"Access-Token":e},cache:"no-store"});return t.ok?t.json():[]}async function u(){try{let e=await fetch("/api/brands");if(!e.ok)return[];return e.json()}catch{return[]}}async function m(){try{let e=await fetch("/api/locations");if(!e.ok)return[];return e.json()}catch{return[]}}async function h(e,t){let s=await fetch("/api/conversations",{headers:{"Access-Token":e},cache:"no-store"});if(!s.ok)return[];let a=await s.json();return Array.isArray(a)?a.map(e=>{let s;return s=e.conversation.initiator_id===t?e.responder:e.initiator,{conversation_id:e.conversation.conversation_id,initiator_id:e.conversation.initiator_id,responder_id:e.conversation.responder_id,other_user_id:s.user_id,other_username:s.username,other_profile_image_url:s.profile_image_url,article_id:e.article?.article_id??null,article_title:e.article?.title??null,article_main_image_url:e.article?.main_image_url??null,last_message:e.conversation.last_message_text,last_message_date:e.conversation.last_message_date}}):[]}async function p(e,t){let s=await fetch(`/api/conversations/${t}/messages`,{headers:{"Access-Token":e},cache:"no-store"});if(!s.ok)return[];let a=await s.json();return(Array.isArray(a)?a:a?.messages??[]).map(e=>({message_id:e.message_id,conversation_id:e.conversation_id,text:e.text,sender_id:e.sender_id,receiver_id:e.receiver_id,is_read:e.is_read,creation_date:e.creation_date}))}async function x(e,t){let s=await fetch("/api/chat/send",{method:"POST",headers:{"Content-Type":"application/json","Access-Token":e},body:JSON.stringify({sender_id:t.sender_id,receiver_id:t.receiver_id,subject_id:t.subject_id,text:t.text})});if(!s.ok)return null;let a=await s.json();return a?{message_id:a.message_id,conversation_id:a.conversation_id,text:a.text,sender_id:a.sender_id,receiver_id:a.receiver_id,is_read:a.is_read??!1,creation_date:a.creation_date}:null}function f(e){return{...e,vehicle_registration_id:e.vehicle_registration_id??e.vehicle_id??0}}async function j(e,t){let s=await e.json().catch(()=>null);throw Error(s?.message||t)}async function v(e){let t=await fetch("/api/vehicle-registration/my",{headers:{"Access-Token":e},cache:"no-store"});if(!t.ok)return[];let s=await t.json();return Array.isArray(s)?s.map(f):[]}async function b(e,t){let s=await fetch("/api/vehicle-registration/insert",{method:"POST",headers:{"Content-Type":"application/json","Access-Token":e},body:JSON.stringify(t)});return s.ok?f(await s.json()):j(s,"GreÅ¡ka pri dodavanju vozila.")}async function g(e,t,s){let a=await fetch(`/api/vehicle-registration/update/${t}`,{method:"PUT",headers:{"Content-Type":"application/json","Access-Token":e},body:JSON.stringify(s)});return a.ok?f(await a.json()):j(a,"GreÅ¡ka pri izmjeni vozila.")}async function k(e,t){let s=await fetch(`/api/vehicle-registration/${t}`,{method:"DELETE",headers:{"Access-Token":e}});if(!s.ok)return j(s,"GreÅ¡ka pri brisanju vozila.")}function y(e){return{id:e.attachment_id??e.id,url:e.url??e.attachment_url??e.file_url??""}}function w(e){let t=e.service_record??e.record??e,s=e.attachments??t.attachments??e.attachment_list??[];return{id:t.service_record_id??t.id,vehicle_id:t.vehicle_id,service_date:t.service_date,description:t.description??"",amount_paid:t.amount_paid??null,service_location:t.service_location??null,attachments:Array.isArray(s)?s.map(y):[]}}let N=e=>({"Content-Type":"application/json","Access-Token":e});async function _(e,t){let s=await fetch(`/api/vehicle/${t}/service-records`,{headers:{"Access-Token":e},cache:"no-store"});if(!s.ok)return j(s,"GreÅ¡ka pri uÄitavanju servisne knjige.");let a=await s.json();return Array.isArray(a)?a.map(w):[]}async function C(e,t,s){let a=await fetch(`/api/vehicle/${t}/service-records`,{method:"POST",headers:N(e),body:JSON.stringify(s)});if(!a.ok)return j(a,"GreÅ¡ka pri dodavanju zapisa.")}async function S(e,t,s){let a=await fetch(`/api/vehicle/service-records/${t}`,{method:"PUT",headers:N(e),body:JSON.stringify(s)});if(!a.ok)return j(a,"GreÅ¡ka pri izmjeni zapisa.")}async function A(e,t){let s=await fetch(`/api/vehicle/service-records/${t}`,{method:"DELETE",headers:{"Access-Token":e}});if(!s.ok)return j(s,"GreÅ¡ka pri brisanju zapisa.")}async function T(e,t,s){let a=await fetch(`/api/vehicle/service-records/${t}/attachments/${s}`,{method:"DELETE",headers:{"Access-Token":e}});if(!a.ok)return j(a,"GreÅ¡ka pri brisanju priloga.")}async function L(e,t){let s=new FormData;s.append("file",t,t.name);let a=await fetch("/api/files/upload",{method:"POST",headers:{"Access-Token":e},body:s});if(!a.ok)throw Error(`GreÅ¡ka pri slanju fajla ${t.name}.`);let r=await a.json().catch(()=>null),i=r?.image_url??r?.url??r?.file_url;if(!i)throw Error(`GreÅ¡ka pri slanju fajla ${t.name}.`);return i}e.s(["addServiceRecord",0,C,"addVehicleRegistration",0,b,"deleteServiceAttachment",0,T,"deleteServiceRecord",0,A,"deleteVehicleRegistration",0,k,"fetchArticles",0,s,"fetchBrands",0,u,"fetchConversations",0,h,"fetchCreditPackages",0,d,"fetchCreditTransactions",0,c,"fetchFavoritesActive",0,o,"fetchFavoritesCompleted",0,l,"fetchLocations",0,m,"fetchMessages",0,p,"fetchMyVehicleRegistrations",0,v,"fetchServiceRecords",0,_,"fetchUserArticlesActive",0,i,"fetchUserArticlesCompleted",0,n,"fetchUserDetails",0,r,"fuelLabel",0,function(e){return({DIESEL:"Dizel",PETROL:"Benzin",GAS:"Plin",ELECTRIC:"ElektriÄno",HYBRID:"Hibrid"})[e]??e},"loginUser",0,a,"sendMessage",0,x,"transmissionLabel",0,function(e){return({MANUAL:"Manuelni",AUTOMATIC:"Automatik",SEMI_AUTOMATIC:"Poluautomatik"})[e]??e},"updateServiceRecord",0,S,"updateVehicleRegistration",0,g,"uploadServiceFile",0,L])},94542,e=>{"use strict";var t=e.i(43476),s=e.i(22016),a=e.i(71645),r=e.i(18566),i=e.i(9165),n=e.i(59141);e.s(["default",0,function(){let e=(0,r.useRouter)(),[o,l]=(0,a.useState)("login"),[c,d]=(0,a.useState)({username:"",password:""}),[u,m]=(0,a.useState)(!1),[h,p]=(0,a.useState)(!1),[x,f]=(0,a.useState)(!1),[j,v]=(0,a.useState)(null),[b,g]=(0,a.useState)({username:"",password:""}),[k,y]=(0,a.useState)(!1),[w,N]=(0,a.useState)(!1),[_,C]=(0,a.useState)(""),[S,A]=(0,a.useState)(!1),[T,L]=(0,a.useState)(""),[z,M]=(0,a.useState)(""),[E,P]=(0,a.useState)(""),[O,G]=(0,a.useState)(!1),[R,B]=(0,a.useState)(!1),[U,F]=(0,a.useState)(!1),[W,$]=(0,a.useState)("");async function D(){if($(""),!_.trim())return void $("Unesite email adresu.");A(!0);try{await fetch(`/api/user/request-change-pass?email=${encodeURIComponent(_.trim())}`),l("forgot-code")}finally{A(!1)}}async function I(e){if(e.preventDefault(),$(""),!T||!z||!E)return void $("Popunite sva polja.");if(z!==E)return void $("Lozinke se ne poklapaju.");if(z.length<6)return void $("Lozinka mora imati najmanje 6 znakova.");F(!0);try{let e=await fetch("/api/user/change-pass",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:_,code:T,password:z})}),t=await e.json();if(!e.ok)return void $(t?.message??"GreÅ¡ka pri promjeni lozinke.");J({user:t})}finally{F(!1)}}function J(t){localStorage.setItem("carget_token",t.user?.access_token??""),localStorage.setItem("carget_user",JSON.stringify(t.user)),document.cookie=`carget_token=${encodeURIComponent(t.user?.access_token??"")}; path=/; max-age=2592000`,e.push("/")}async function V(e){if(e.preventDefault(),$(""),!c.username||!c.password)return void $("Molimo popunite sva polja.");m(!0);try{let e=await (0,i.loginUser)(c.username,c.password);J(e)}catch(e){$(e instanceof Error?e.message:"GreÅ¡ka pri prijavi.")}finally{m(!1)}}async function H(){$(""),y(!0);try{let{email:e,idToken:t}=await (0,n.signInWithGoogle)(),s=await fetch("/api/auth/google",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,id_token:t})}),a=await s.json();if(404===s.status){v({email:e,idToken:t}),l("google-register");return}if(!s.ok)return void $(a?.message??"GreÅ¡ka pri prijavi s Googleom.");J(a)}catch(e){$(e instanceof Error?e.message:"GreÅ¡ka pri prijavi s Googleom.")}finally{y(!1)}}async function K(e){if(e.preventDefault(),$(""),!b.username||!b.password)return void $("Molimo popunite sva polja.");if(j){N(!0);try{let e=await fetch("/api/auth/google",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:j.email,id_token:j.idToken,username:b.username,password:b.password})}),t=await e.json();if(!e.ok)return void $(t?.message??"GreÅ¡ka pri registraciji.");J(t)}catch(e){$(e instanceof Error?e.message:"GreÅ¡ka pri registraciji.")}finally{N(!1)}}}let q=()=>(0,t.jsxs)("svg",{className:"w-4 h-4 shrink-0",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),Z=()=>(0,t.jsxs)("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]});return(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-600 to-blue-800 p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-md",children:[(0,t.jsx)("div",{className:"flex justify-center mb-8",children:(0,t.jsx)(s.default,{href:"/",children:(0,t.jsx)("img",{src:"/logo_carget.svg",alt:"Carget",className:"h-9 w-auto brightness-0 invert"})})}),(0,t.jsxs)("div",{className:"bg-white rounded-2xl shadow-xl p-8",children:["login"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-slate-900 mb-1",children:"DobrodoÅ¡li nazad"}),(0,t.jsx)("p",{className:"text-slate-500 text-sm mb-6",children:"Prijavite se na vaÅ¡ raÄun"}),W&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg px-4 py-3 mb-5",children:W}),(0,t.jsxs)("form",{onSubmit:V,className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"KorisniÄko ime"}),(0,t.jsx)("input",{type:"text",placeholder:"VaÅ¡e korisniÄko ime",value:c.username,onChange:e=>d({...c,username:e.target.value}),className:"w-full px-4 py-2.5 rounded-lg border border-slate-300 text-slate-900 placeholder-slate-400 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-slate-700",children:"Lozinka"}),(0,t.jsx)("button",{type:"button",onClick:()=>{$(""),C(c.username.includes("@")?c.username:""),l("forgot-email")},className:"text-xs text-blue-600 hover:text-blue-700 font-medium",children:"Zaboravili ste lozinku?"})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:h?"text":"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:c.password,onChange:e=>d({...c,password:e.target.value}),className:"w-full px-4 py-2.5 pr-10 rounded-lg border border-slate-300 text-slate-900 placeholder-slate-400 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition"}),(0,t.jsx)("button",{type:"button",onClick:()=>p(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 transition-colors",children:h?(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):(0,t.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,t.jsx)("button",{type:"submit",disabled:u,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-60 text-white font-semibold py-2.5 px-4 roun
1ded-lg transition-colors text-sm flex items-center justify-center gap-2",children:u?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Z,{})," Prijavljivanje..."]}):"Prijava"})]}),(0,t.jsxs)("div",{className:"relative my-6",children:[(0,t.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,t.jsx)("div",{className:"w-full border-t border-slate-200"})}),(0,t.jsx)("div",{className:"relative flex justify-center text-xs text-slate-400 bg-white px-2",children:"ili nastavite s"})]}),(0,t.jsxs)("button",{type:"button",onClick:H,disabled:k,className:"w-full flex items-center justify-center gap-2 border border-slate-300 rounded-lg py-2.5 text-sm font-medium text-slate-700 hover:bg-slate-50 disabled:opacity-60 transition-colors",children:[k?(0,t.jsx)(Z,{}):(0,t.jsx)(q,{}),"Nastavi s Googleom"]}),(0,t.jsxs)("p",{className:"text-center text-sm text-slate-500 mt-6",children:["Nemate raÄun?"," ",(0,t.jsx)(s.default,{href:"/register",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Registrujte se besplatno"})]}),(0,t.jsx)("div",{className:"relative my-4",children:(0,t.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,t.jsx)("div",{className:"w-full border-t border-slate-100"})})}),(0,t.jsx)(s.default,{href:"/",className:"w-full flex items-center justify-center text-sm text-slate-400 hover:text-slate-600 transition-colors",children:"Nastavi kao gost"})]}),"google-register"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 bg-blue-50 border border-blue-100 rounded-lg px-3 py-2 mb-6",children:[(0,t.jsx)(q,{}),(0,t.jsx)("span",{className:"text-sm text-slate-700 truncate",children:j?.email})]}),(0,t.jsx)("h2",{className:"text-xl font-bold text-slate-900 mb-1",children:"Kreirajte nalog"}),(0,t.jsx)("p",{className:"text-slate-500 text-sm mb-6",children:"Odaberite korisniÄko ime i lozinku za vaÅ¡ Carget nalog."}),W&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg px-4 py-3 mb-5",children:W}),(0,t.jsxs)("form",{onSubmit:K,className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"KorisniÄko ime"}),(0,t.jsx)("input",{type:"text",placeholder:"Odaberite korisniÄko ime",value:b.username,onChange:e=>g({...b,username:e.target.value}),className:"w-full px-4 py-2.5 rounded-lg border border-slate-300 text-slate-900 placeholder-slate-400 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition",autoFocus:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Lozinka"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:x?"text":"password",placeholder:"Kreirajte lozinku",value:b.password,onChange:e=>g({...b,password:e.target.value}),className:"w-full px-4 py-2.5 pr-10 rounded-lg border border-slate-300 text-slate-900 placeholder-slate-400 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition"}),(0,t.jsx)("button",{type:"button",onClick:()=>f(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 transition-colors",children:x?(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):(0,t.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,t.jsx)("button",{type:"submit",disabled:w,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-60 text-white font-semibold py-2.5 px-4 roun
1ded-lg transition-colors text-sm flex items-center justify-center gap-2",children:w?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Z,{})," Registracija..."]}):"Registruj se"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{l("login"),$("")},className:"w-full mt-3 text-sm text-slate-500 hover:text-slate-700 transition-colors",children:"â Nazad na prijavu"})]}),"forgot-email"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-slate-900 mb-1",children:"Zaboravili ste lozinku?"}),(0,t.jsx)("p",{className:"text-slate-500 text-sm mb-6",children:"Unesite email adresu i poslat Äemo vam verifikacijski kod."}),W&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg px-4 py-3 mb-5",children:W}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Email adresa"}),(0,t.jsx)("input",{type:"email",placeholder:"Unesite email",value:_,onChange:e=>C(e.target.value),className:"w-full px-4 py-2.5 rounded-lg border border-slate-300 text-slate-900 placeholder-slate-400 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition",autoFocus:!0})]}),(0,t.jsx)("button",{type:"button",onClick:D,disabled:S,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-60 text-white font-semibold py-2.5 px-4 rounded-lg transition-colors text-sm flex items-center justify-center gap-2",children:S?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Z,{})," Slanje..."]}):"PoÅ¡alji verifikacijski kod"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{l("login"),$("")},className:"w-full mt-4 text-sm text-slate-500 hover:text-slate-700 transition-colors",children:"â Nazad na prijavu"})]}),"forgot-code"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-slate-900 mb-1",children:"Postavite novu lozinku"}),(0,t.jsxs)("p",{className:"text-slate-500 text-sm mb-1",children:["Verifikacijski kod je poslan na ",(0,t.jsx)("span",{className:"font-medium text-slate-700",children:_}),"."]}),(0,t.jsx)("p",{className:"text-xs text-slate-400 mb-6",children:"Provjerite inbox ili Spam/Junk folder."}),W&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg px-4 py-3 mb-5",children:W}),(0,t.jsxs)("form",{onSubmit:I,className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Nova lozinka"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:O?"text":"password",placeholder:"Najmanje 6 znakova",value:z,onChange:e=>M(e.target.value),className:"w-full px-4 py-2.5 pr-10 rounded-lg border border-slate-300 text-slate-900 placeholder-slate-400 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition"}),(0,t.jsx)("button",{type:"button",onClick:()=>G(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 transition-colors",children:O?(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):(0,t.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Potvrdi novu lozinku"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:R?"text":"password",placeholder:"Ponovite lozinku",value:E,onChange:e=>P(e.target.value),className:"w-full px-4 py-2.5 pr-10 rounded-lg border border-slate-300 text-slate-900 placeholder-slate-400 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition"}),(0,t.jsx)("button",{type:"button",onClick:()=>B(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 transition-colors",children:R?(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):(0,t.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Verifikacijski kod"}),(0,t.jsx)("input",{type:"text",inputMode:"numeric",maxLength:6,placeholder:"6-cifreni kod",value:T,onChange:e=>L(e.target.value.replace(/\D/g,"").slice(0,6)),className:"w-full px-4 py-2.5 rounded-lg border border-slate-300 text-slate-900 placeholder-slate-400 text-sm text-center tracking-widest font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition"})]}),(0,t.jsx)("button",{type:"submit",disabled:U,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-60 text-white font-semibold py-2.5 px-4 roun
1ded-lg transition-colors text-sm flex items-center justify-center gap-2",children:U?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Z,{})," Promjena lozinke..."]}):"Postavi novu lozinku"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{l("forgot-email"),$("")},className:"w-full mt-4 text-sm text-slate-500 hover:text-slate-700 transition-colors",children:"â Nazad"})]})]})]})})}])}]);
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.