PageSourceSearch

https://www.maklarringen.se/_next/static/chunks/5111-95a708670dd02866.js

js maklarringen.se collected 2026-09-25 20:48:16 UTC 7,915 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5111],{92018:function(e,l,s){var t=s(52676),a=s(75271),r=s(43430),i=s(60379),c=s(74436),n=s(178),o=s(58513),d=s(99545),m=s(73149),h=s.n(m),x=s(88016),u=s(82527),f=s(54910);l.Z=e=>{var l;let{children:s,Heading:m,Subtitle:p,ButtonText:v,VitecLeadType:b,VitecCustomerId:j,BrokerId:N,ShowSwedishOffices:g=!0,isOpen:w=!1,onOpenChange:y}=e,[k,S]=(0,a.useState)([]),[_,C]=(0,a.useState)(""),[E,F]=(0,a.useState)(!0),[O,V]=(0,a.useState)(!1),[Z,L]=(0,a.useState)(!1),{executeRecaptcha:T}=(0,f.xX)(),I=(0,u.useTranslations)("common.forms"),z=m||I("freeValuationHeading"),P=p||I("freeValuationSubtitle"),{register:H,setValue:M,handleSubmit:R,formState:{errors:q}}=(0,r.cI)({resolver:(0,i.F)(x.kn),defaultValues:{officeid:null!=j?j:"",leadtype:null!==(l=null==b?void 0:b.toString())&&void 0!==l?l:"",assignedto:null!=N?N:""}});(0,a.useEffect)(()=>{w&&!O&&V(w)},[w]),(0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/broker-offices");if(!e.ok)throw Error("Failed to fetch offices");let l=await e.json();if(g){let e=null==l?void 0:l.filter(e=>!e.ForeignOffice);S(e)}else{let e=null==l?void 0:l.filter(e=>e.ForeignOffice);S(e)}if(j){let e=null==l?void 0:l.find(e=>(null==e?void 0:e.VitecCustomerId)===j);e&&M("officeid",e.VitecCustomerId)}}catch(e){console.error("Error fetching offices:",e)}finally{F(!1)}})()},[j,M,g]);let J=async e=>{F(!0);try{if(!T){console.warn("Recaptcha not yet available");return}let l=await T("dialog_form_contact"),s=await fetch("/api/create-contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,token:l})}),t=await s.json();if(!s.ok)throw Error(t.message||I("msgErrorNotSent"));C(I("msgSuccessSent"))}catch(e){console.error("Form submission error:",e),C(I("msgErrorNotSent")),L(!0)}finally{F(!1)}},U=e=>(null==e?void 0:e.message)||"";return(0,t.jsxs)(o.Vq,{open:O,onOpenChange:e=>{V(e),null==y||y(e)},children:[(0,t.jsx)(o.hg,{className:"ring-1 ring-input hover:ring-0 bg-background hover:bg-accent hover:text-accent-foreground px-4 py-2 rounded-2xl min-w-fit",children:s}),(0,t.jsxs)(o.cZ,{className:"flex items-center justify-center min-w-full lg:min-w-fit px-16 xl:px-32 pt-16 pb-8",children:[!_&&(0,t.jsxs)("form",{onSubmit:R(J),className:"flex flex-col items-center gap-4 w-full",children:[(0,t.jsx)(c.Z,{as:"h2",children:z}),(0,t.jsx)("p",{className:"mb-4 text-center",children:P}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 w-full",children:[(0,t.jsxs)("div",{className:"md:mb-4",children:[(0,t.jsxs)(d._,{className:"block font-[450] mb-2 text-left text-sm",children:[I("firstNameLabel"),"*"]}),(0,t.jsx)("input",{...H("firstname"),className:"w-full p-2 border rounded-[12px] h-12"}),q.firstname&&(0,t.jsx)("p",{className:"text-red-600 text-sm",children:U(q.firstname)})]}),(0,t.jsxs)("div",{className:"md:mb-4",children:[(0,t.jsxs)(d._,{className:"block font-[450] mb-2 text-left text-sm",children:[I("lastNameLabel"),"*"]}),(0,t.jsx)("input",{...H("lastname"),className:"w-full p-2 border rounded-[12px] h-12"}),q.lastname&&(0,t.jsx)("p",{className:"text-red-600 text-sm",children:U(q.lastname)})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 w-full",children:[(0,t.jsxs)("div",{className:"md:mb-4",children:[(0,t.jsxs)(d._,{className:"block font-[450] mb-2 text-left text-sm",children:[I("emailLabel"),"*"]}),(0,t.jsx)("input",{...H("email"),className:"w-full p-2 border rounded-[12px] h-12",type:"email",autoComplete:"email"}),q.email&&(0,t.jsx)("p",{className:"text-red-600 text-sm",children:U(q.email)})]}),(0,t.jsxs)("div",{className:"md:mb-4",children:[(0,t.jsxs)(d._,{className:"block font-[450] mb-2 text-left text-sm",children:[I("telephoneLabel"),"*"]}),(0,t.jsx)("input",{...H("telephone"),className:"w-full p-2 border rounded-[12px] h-12",type:"tel",autoComplete:"tel"}),q.telephone&&(0,t.jsx)("p",{className:"text-red-600 text-sm",children:U(q.telephone)})]})]}),!j&&(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 w-full",children:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(d._,{className:"block font-[450] mb-2 text-left text-sm",children:[I("selectOfficeLabel"),"*"]}),E?(0,t.jsx)("p",{children:I("loadingText")}):(0,t.jsxs)("select",{...H("officeid"),className:"w-full p-2 border rounded-[12px] h-12",children:[(0,t.jsx)("option",{value:"",children:I("selectOfficeOption")}),null==k?void 0:k.map((e,l)=>{var s,a;return(0,t.jsx)("option",{value:null==e?void 0:e.VitecCustomerId,children:null!==(s=null==e?void 0:e.title)&&void 0!==s?s:null==e?void 0:e.City},null!==(a=null==e?void 0:e._id)&&void 0!==a?a:l)})]}),q.officeid&&(0,t.jsx)("p",{className:"text-red-600 text-sm",children:U(q.officeid)})]})}),(0,t.jsx)(n.z,{type:"submit",disabled:E,children:null!=v?v:I("btnContact")}),(0,t.jsxs)("span",{className:"text-xs text-center opacity-70",children:[I("mandatoryFieldNote")," ",(0,t.jsx)(h(),{href:"/om-maklarringen/integritetspolicy/",className:"underline",children:I("privacyPolicyLinkText")}
1),". ",I.rich("mandatoryRecaptchaFieldNoteFull",{privacy:e=>(0,t.jsx)(h(),{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"underline",children:e}),terms:e=>(0,t.jsx)(h(),{href:"https://policies.google.com/terms",target:"_blank",rel:"noopener noreferrer",className:"underline",children:e})})]})]}),_&&(0,t.jsxs)("div",{className:"min-h-32",children:[(0,t.jsx)(c.Z,{as:"h2",className:"text-center mb-4",children:Z?"!":I("interestThankYouHeading")}),(0,t.jsx)("p",{className:"mb-4 text-center",children:_})]})]})]})}},32361:function(e,l,s){var t=s(52676),a=s(2733),r=s(50864),i=s(65457),c=s(61739),n=s(94855),o=s(32075),d=s.n(o),m=s(51483),h=s.n(m),x=s(75271),u=s(74436),f=s(65341),p=s(178),v=s(58945);l.Z=e=>{var l;let{heroImage:s,heroVideo:o,className:m,header:b,subheader:j,CTAText:N,officeName:g}=e,w=s&&s.asset?(0,c.S)(s.asset).url():"",y=o?(0,n.c)(o):"",k=(0,x.useCallback)(()=>g?"aspect-[1/0.98] min-h-[50vh] w-screen md:h-[calc(100vh-4.5rem)] md:min-h-[calc(100vh-4.5rem)]":d()(b)&&d()(j)&&d()(N)?"h-[calc(100vh-21rem)] min-h-[calc(100vh-21rem)]":"h-[calc(100vh-4.5rem)] min-h-[calc(100vh-4.5rem)]",[b,j,N,g]);return(0,t.jsxs)("div",{className:(0,a.cn)("relative wrap-px",k(),m),children:[y?(0,t.jsx)("video",{className:"absolute inset-0 w-full h-full object-cover",src:y,autoPlay:!0,loop:!0,muted:!0,playsInline:!0}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute inset-0 w-full h-full",children:(0,t.jsx)(h(),{src:w,alt:null!==(l=null==s?void 0:s.alt)&&void 0!==l?l:"",width:1440,height:900,priority:!0,className:"object-cover object-center w-full h-full",sizes:"(max-width: 640px) 200vw, (max-width: 1024px) 100vw, 100vw"})}),(0,t.jsx)("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)"},className:"absolute inset-0 w-full h-full bg-cover bg-center bg-no-repeat"})]}),(0,t.jsxs)("div",{className:"relative h-full z-10",children:[b&&(0,t.jsx)(v.M,{className:"justify-center h-full items-center text-center text-base-white px-4 pb-64  md:py-32 max-w-[var(--wrap-width)]",children:(0,t.jsxs)("div",{className:"flex flex-col gap-6 col-span-12 md:col-span-6 md:col-start-4 mt-auto",children:[(0,t.jsxs)("div",{className:"relative flex flex-col gap-4",children:[b&&(0,t.jsx)(u.Z,{as:"h1",display:!0,className:"text-center select-text",children:b}),j&&(0,t.jsx)(f.u,{className:"text-center select-text",children:j})]}),N&&(0,t.jsx)("div",{children:(0,t.jsx)(r.rU,{href:i.ps,children:(0,t.jsx)(p.z,{variant:"default",className:"px-6 bg-base-white rounded-xl text-base-black select-text hover:bg-neutrals-neutral-2",children:(0,t.jsx)(f.u,{small:!0,strong:!0,children:N})})})})]})}),g&&(0,t.jsx)("div",{className:"h-full wrap-px",children:(0,t.jsx)(v.M,{className:"h-fullrelative",children:(0,t.jsx)(u.Z,{as:"h1",display:!0,className:"absolute bottom-[2rem] md:bottom-[3.875rem] text-base-white",children:g})})})]})]})}}}]);

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.