PageSourceSearch

https://frtassets.fotocasa.es/_sui/CardCallMeBack.fd12d26c.js

js fotocasa.es collected 2026-09-24 09:01:08 UTC 4,715 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[73074],{FIZ1:function(e,n,t){t.r(n),t.d(n,{default:function(){return T}});var a=t("M5j3"),l=t("jg1C"),s=t("ERkP"),o=t("aWzz"),c=t.n(o),i=t("SH0t"),r=t("+hKN"),d=t("ogaj"),u=t("RC1g"),_=t("hcqL"),p=t("/y3p"),C=t("+8Zr"),m=t("k0sV"),A=t("6aWq"),E=t("dsNx"),h=1;function T(e){var n=e.contextProps,t=e.onCall,o=e.onClose,c=e.onContactSuccess,T=(0,r.O6)(),v=(0,r.UK)("contact","cookies","languageIds","resourcesHost"),L=v[0],f=L.phonePattern,N=L.contactReasons,x=v[1],I=v[2],M=v[3],g=(0,r.sn)(),O=(0,r.s9)(),j=(0,r.Jd)(),R=(0,u.hN)().notify,b=(0,d.A)(),y=b.trackEvent,S=b.getTrackingPageType,D=b.TRACKING_EVENTS.SEGMENT,k=i.A.get,K=i.A.set,F=(null==j?void 0:j.email)||k("contact_email")||"",P=(null==j?void 0:j.username)||k("contact_name")||"",B=k("contact_phone")||"",U=(0,s.useState)("pending"),w=U[0],V=U[1],q=(0,s.useState)({value:B,error:"",valid:!!B}),G=q[0],H=q[1],z=(0,s.useState)(!1),W=z[0],Q=z[1],Z=n.clientId,$=n.contactType,J=n.promotionId,X=n.propertyId,Y=n.propertyTypeId,ee=n.transactionTypeId,ne=F?"call_me_back_simple":"call_me_back";(0,s.useEffect)((function(){var e=setTimeout((function(){Q(!0),y({channel:"ads",eventName:D.CALL_ME_BACK_MODAL_SEEN,eventVersion:2,modal_label:ne,page_type:S()})}),2e3);return function(){return clearTimeout(e)}}),[]);var te=function(e){y({channel:"ads",eventName:D.CALL_ME_BACK_MODAL_CLICKED,eventVersion:2,label:e,page_type:S(),position:ne})},ae=function(){te("accept"),null==t||t({position:ne})},le=function(e){var n=e.target.value,t=RegExp(f).test(n),a=!t&&(n?O.t("CONTACT_FORM_PHONE_VALIDATION_FORMAT"):O.t("CONTACT_FORM_PHONE_VALIDATION_REQUIRED"));H({value:n,errorMessage:a,valid:t}),V("pending")};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(C.lG,{open:W,onOpenChange:function(){te("close_modal"),Q(!1),null==o||o()},children:(0,l.jsxs)(C.ZJ,{children:[(0,l.jsx)(C.LC,{}),(0,l.jsxs)(C.Cf,{size:"sm",children:[(0,l.jsx)(C.L3,{asChild:!0,children:(0,l.jsx)("h3",{className:"sr-only",children:O.t("CALL_ME_BACK.MODAL_TITLE")})}),(0,l.jsx)(C.R4,{children:(0,l.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,l.jsx)("img",{alt:"call me back",className:"block mx-auto h-auto border-none",height:"99",src:M+"/img/contact_call_me_back_modal_duo.svg",title:"call me back",width:"214"}),(0,l.jsx)("h3",{className:"text-[1.25rem] mb-md",children:O.t("CALL_ME_BACK.MODAL_TITLE")}),(0,l.jsx)("span",{className:"flex flex-col gap-xl mb-lg",children:O.t("CALL_ME_BACK.MODAL_TEXT")}),(0,l.jsx)("div",{className:"mb-md",children:F?(0,l.jsxs)("form",{onSubmit:function(e){if(e.preventDefault(),te("accept"),G.valid){V("loading");var n={clientId:Z,comments:O.t("CONTACT_FORM.DEFAULT_MESSAGES.CALLME"),contactReason:N.CALLME.id,contactType:$,culture:O.culture,deviceType:T.deviceType,email:F,isMobile:T.isMobile,languageId:I[O.locale]||0,pathname:window.location.pathname,phone:G.value,promotionId:J,propertyId:X,propertyTypeId:Y,sessionId:k(x.session.cookieKey)||"",transactionTypeId:ee,userId:(null==j?void 0:j.id)||"",userName:P};g.get("mail_contact_use_case").execute(n).then((function(e){(null==e?void 0:e.value)!==h?V("error"):(c({contactData:n,email:F,phone:G,position:ne}),K("contact_phone",G.value),R({content:O.t("DUPLICATE_ADS.CONTACT_DUPLICATE_ADS.FORM.FEEDBACK.SUCCESS.MESSAGE"),position:u.vT.bottom}))})).catch((function(){R({autoClose:u.hT.manual,content:O.t("USER.MY_FAVOURITES_LISTS.GENERIC_ERROR"),position:u.vT.relative,type:u.fK.error,variation:u.Ev.positive})})).finally((function(){return null==o?void 0:o()}))}else G.value||H((function(e){return(0,a.A)({},e,{errorMessage:O.t("CONTACT_FORM_PHONE_VALIDATION_REQUIRED")})}))},children:[(0,l.jsx)("div",{className:"mb-xl",children:(0,l.jsxs)(m.D0,{state:G.errorMessage?"error":void 0,children:[(0,l.jsx)(E.pd,{"data-e2e":"field-phone",onChange:le,placeholder:O.t("CONTACT_FORM_PHONE_REQUIRED"),required:!0,type:"tel",value:G.value,disabled:"loading"===w}),(0,l.jsx)(m.sG,{children:G.errorMessage})]})}),(0,l.jsxs)(p.$,{type:"submit",disabled:"loading"===w,variant:"solid",intent:"basic",className:"w-full",children:[(0,l.jsx)(A.I,{size:"sm",children:(0,l.jsx)(_.O5,{})}),O.t("CALL_ME_BACK.I_WANT_CALL_ME")]})]}):(0,l.jsx)(p.$,{variant:"solid",intent:"basic",className:"w-full",onClick:ae,children:O.t("CALL_ME_BACK.I_WANT_CALL_ME")})}),(0,l.jsx)(p.$,{variant:"ghost",intent:"basic",className:"w-full",onClick:function(){te("reject"),Q(!1),null==o||o()},children:O.t("CALL_ME_BACK.NO_THANKS")})]})}),(0,l.jsx)(C.De,{"aria-label":O.t("close")})]})]})})})}
1T.displayName="CardCallMeBack",T.propTypes={contextProps:c().object.isRequired,onCall:c().func.isRequired,onClose:c().func.isRequired,onContactSuccess:c().func.isRequired}}}]);

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.