1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9903],{89903:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var a=r(95155),s=r(12115),i=r(57346),l=r(95604),n=r(15239),o=r(26497),c=r(36917),d=r(43569),m=r(61310),u=r(50814);let p={no:{code:"+47",flag:"/flags/no.svg",label:"Norge",format:"### ## ###",placeholder:"123 45 678",maxLength:8},en:{code:"+44",flag:"/flags/us.svg",label:"United Kingdom",format:"#### ### ####",placeholder:"7911 123 4567",maxLength:11}};function h(e){let{isOpen:t,onClose:r}=e,h=(0,i.c)("callbackModal"),x=(0,l.useLocale)(),[g,f]=(0,s.useState)(""),[y,b]=(0,s.useState)(""),[j,w]=(0,s.useState)(""),[v,k]=(0,s.useState)(""),[N,C]=(0,s.useState)(""),[L,S]=(0,s.useState)(p.no),[P,E]=(0,s.useState)(!1),[F,M]=(0,s.useState)(""),[W,_]=(0,s.useState)(!1),B=async e=>{e.preventDefault(),M(""),E(!0);try{let e=v.replace(/\D/g,""),t="".concat(L.code).concat(e),a=await fetch("/api/submit-callback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:g,company:y,email:j,phone:t,message:N,countryCode:L.code,locale:x,formattedPhone:v,kilde:(0,m.getLeadSource)()})});if(!a.ok){let e=await a.json();throw Error(e.error||"Submission failed")}(0,u.P)({source:(0,m.getLeadSource)(),formName:"callback_modal"}),_(!0),f(""),b(""),w(""),k(""),C(""),setTimeout(()=>{r(),_(!1)},3e3)}catch(e){console.error("Submit error:",e),M(h("error"))}finally{E(!1)}};return t?(0,a.jsx)(o.N,{children:t&&(0,a.jsx)(c.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm",onClick:r,children:(0,a.jsxs)(c.P.div,{initial:{scale:.95,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.95,opacity:0,y:20},transition:{type:"spring",damping:25,stiffness:300},className:"relative w-full max-w-2xl rounded-2xl border border-white/10 bg-card p-8 shadow-2xl shadow-black/50",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("button",{onClick:r,className:"absolute right-5 top-5 flex h-9 w-9 items-center justify-center rounded-full bg-white/5 text-secondary transition-colors hover:bg-white/10 hover:text-primary",children:(0,a.jsx)(d.A,{className:"h-5 w-5"})}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h2",{className:"mb-2 text-2xl font-medium tracking-tight text-primary",children:"en"===x?"We'll call you within 1 hour":"Vi ringer deg innen 1 time"}),(0,a.jsx)("p",{className:"text-secondary",children:"en"===x?"Leave your number and we'll show you how Snakk.ai works for your business.":"Legg igjen nummeret ditt, s\xe5 viser vi hvordan Snakk.ai fungerer for din bedrift."})]}),W?(0,a.jsxs)(c.P.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"py-12 text-center",children:[(0,a.jsx)("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-success/15",children:(0,a.jsx)("svg",{className:"h-8 w-8 text-success",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,a.jsx)("p",{className:"text-lg font-medium text-primary",children:h("success")})]}):(0,a.jsxs)("form",{onSubmit:B,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"company",className:"mb-2 block text-sm font-medium text-primary/80",children:"en"===x?"Company name":"Firmanavn"}),(0,a.jsx)("input",{type:"text",id:"company",value:y,onChange:e=>b(e.target.value),className:"w-full rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-primary placeholder:text-primary/30 transition-all focus:border-accent focus:outline-none focus:ring-2 focus:ring-ring/30",placeholder:"en"===x?"Your company":"Firma AS",required:!0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"email",className:"mb-2 block text-sm font-medium text-primary/80",children:"en"===x?"Email":"E-post"}),(0,a.jsx)("input",{type:"email",id:"email",value:j,onChange:e=>w(e.target.value),className:"w-full rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-primary placeholder:text-primary/30 transition-all focus:border-accent focus:outline-none focus:ring-2 focus:ring-ring/30",placeholder:"en"===x?"[email protected]":"[email protected]",required:!0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"phone",className:"mb-2 block text-sm font-medium text-primary/80",children:h("phoneLabel")}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{S("+47"===L.code?p.en:p.no),k("")},className:"flex flex-shrink-0 items-center gap-1 rounded-l-lg border border-r-0 border-white/10 bg-white/[0.07] px-3 py-3 transition-colors hover:bg-white/10",children:[(0,a.jsx)(n.default,{src:L.flag,alt:L.label,width:16,height:16,className:"rounded-sm"}),(0,a.jsx)("span",{className:"text-sm font-medium text-primary",children:L.code})]}),(0,a.jsx)("input",{type:"tel",id:"phone",value:v,onChange:e=>{k(((e,t)=>{let r=e.replace(/\D/g,"");return"+47"===t.code?r.substring(0,t.maxLength).replace(/(\d{3})(\d{2})?(\d{3})?/,(e,t,r,a)=>{let s=t;return r&&(s+=" "+r),a&&(s+=" "+a),s}):r.substring(0,t.maxLength).replace(/(\d{4})(\d{3})?(\d{4})?/,(e,t,r,a)=>{let s=t;return r&&(s+=" "+r),a&&(s+=" "+a),s})})(e.target.value,L))},className:"min-w-0 flex-1 rounded-r-lg border border-white/10 bg-white/5 px-4 py-3 text-primary placeholder:text-primary/30 transition-all focus:border-accent focus:outline-none focus:ring-2 focus:ring-ring/30",placeholder:h("phonePlaceholder"),required:!0})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4 text-xs text-secondary",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("svg",{className:"h-3.5 w-3.5 text-success",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),"en"===x?"No spam":"Ingen spam"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("svg",{className:"h-3.5 w-3.5 text-success",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),"en"===x?"No commitment":"Ingen forpliktelse"]})]}),F&&(0,a.jsx)(c.P.p,{initial:{opacity:0,y:-10}
1,animate:{opacity:1,y:0},className:"rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive",children:F}),(0,a.jsx)("button",{type:"submit",disabled:P,className:"w-full rounded-full bg-primary px-6 py-4 font-medium text-primary-foreground transition-all hover:bg-ivory active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50",children:P?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),h("submitting")]}):"en"===x?"Call me â":"Ring meg â"})]})]})})}):null}}}]);
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.