1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[288],{1619:function(e,t,r){Promise.resolve().then(r.t.bind(r,2972,23)),Promise.resolve().then(r.bind(r,5053))},9376:function(e,t,r){"use strict";var n=r(5475);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},5053:function(e,t,r){"use strict";r.d(t,{default:function(){return l}});var n=r(7437),a=r(7648),o=r(9376),s=r(8123);let c=[{href:"/#how-it-works",label:"How It Works",matchPath:"/__none__",exact:!0},{href:"/#features",label:"Features",matchPath:"/__none__",exact:!0},{href:"/demo",label:"Demo",matchPath:"/demo",exact:!1}];function l(){let e=(0,o.usePathname)(),{loggedIn:t}=(0,s.aC)();return(0,n.jsx)("nav",{className:"fixed top-0 w-full z-50 h-16 bg-bg/80 backdrop-blur-sm border-b border-grid",children:(0,n.jsxs)("div",{className:"max-w-7xl mx-auto h-full px-6 flex items-center",children:[(0,n.jsx)(a.default,{href:"/",className:"font-display text-primary text-[20px] font-bold tracking-wider",children:"FIELDAGENT"}),(0,n.jsx)("div",{className:"flex items-center gap-8 ml-12",children:c.map(t=>{let r=t.exact?e===t.matchPath:e===t.matchPath||"/"!==t.matchPath&&e.startsWith(t.matchPath);return(0,n.jsxs)(a.default,{href:t.href,className:"relative py-1 group",children:[(0,n.jsx)("span",{className:"text-[14px] transition-colors ".concat(r?"text-primary font-medium":"text-text/45 group-hover:text-text/70"),children:t.label}),(0,n.jsx)("span",{className:"absolute -bottom-0.5 left-0 h-[2px] bg-primary rounded-full transition-all duration-300 ".concat(r?"w-full":"w-0 group-hover:w-full")})]},t.href)})}),(0,n.jsxs)("div",{className:"ml-auto flex items-center gap-4",children:[(0,n.jsxs)("a",{href:"tel:+16812911561",className:"bg-accent hover:bg-accent/90 text-white text-[13px] font-semibold px-5 py-2.5 rounded-full transition-colors inline-flex items-center gap-2",children:[(0,n.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:(0,n.jsx)("path",{d:"M3.65 1.55a1.5 1.5 0 0 1 2.12 0l1.06 1.06a1.5 1.5 0 0 1 0 2.12L5.77 5.79a8.3 8.3 0 0 0 4.44 4.44l1.06-1.06a1.5 1.5 0 0 1 2.12 0l1.06 1.06a1.5 1.5 0 0 1 0 2.12l-.7.71a2.5 2.5 0 0 1-2.65.65A13.2 13.2 0 0 1 3.23 5.84a2.5 2.5 0 0 1 .65-2.65z"})}),"Call Agent"]}),t?(0,n.jsx)(a.default,{href:"/dashboard",className:"bg-primary/10 text-primary text-[13px] font-semibold px-5 py-2.5 rounded-full hover:bg-primary/15 transition-colors",children:"Dashboard"}):(0,n.jsx)(a.default,{href:"/login",className:"text-[13px] text-text/45 hover:text-text/70 font-medium transition-colors",children:"Sign in"})]})]})})}},8123:function(e,t,r){"use strict";r.d(t,{IU:function(){return d},Ms:function(){return l},Vo:function(){return x},aC:function(){return p},hP:function(){return o},jb:function(){return h},jl:function(){return i},x4:function(){return m},yE:function(){return u}});var n=r(2265),a=r(3217);function o(){return localStorage.getItem("access_token")}function s(e,t){localStorage.setItem("access_token",e),localStorage.setItem("refresh_token",t)}function c(e){localStorage.setItem("username",e)}function l(){return localStorage.getItem("username")}function u(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("username")}function i(){return!!o()}let f=null;async function h(){return f||(f=(async()=>{let e=localStorage.getItem("refresh_token");if(!e)return!1;try{let t=await fetch("".concat(a.T,"/auth/token/refresh/"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh:e})});if(t.ok){let e=await t.json();return localStorage.setItem("access_token",e.access),!0}return u(),!1}catch(e){return!1}finally{f=null}})())}async function m(e,t){try{let r=await fetch("".concat(a.T,"/auth/login/"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:t})});if(r.ok){let t=await r.json();return s(t.access,t.refresh),c(t.username||e),{ok:!0}}let n=await r.json().catch(()=>null),o=(null==n?void 0:n.detail)||(null==n?void 0:n.error)||"Invalid credentials";return{ok:!1,error:o}}catch(e){return{ok:!1,error:"Network error â is the backend running?"}}}async function d(e,t,r,n){try{let o=await fetch("".concat(a.T,"/auth/signup/"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,email:t,phone_number:r,password:n})});if(o.ok||201===o.status){let t=await o.json();return s(t.access,t.refresh),c(t.username||e),{ok:!0}}let l=await o.json().catch(()=>null);if(l){let e=Object.values(l).flat()[0];if("string"==typeof e)return{ok:!1,error:e}}return{ok:!1,error:"Signup failed"}}catch(e){return{ok:!1,error:"Network error â is the backend running?"}}}let x=(0,n.createContext)({loggedIn:!1,logout:()=>{},refresh:()=>{}});function p(){return(0,n.useContext)(x)}},3217:function(e,t,r){"use strict";r.d(t,{T:function(){return n}});let n="https://crop-advisor-922c34c099bf.herokuapp.com/api/v1"}}
1,function(e){e.O(0,[648,971,117,744],function(){return e(e.s=1619)}),_N_E=e.O()}]);
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.