PageSourceSearch

https://nepalmotherhousetreks.com/_next/static/chunks/3867.a0ab338c1804b0e3.js

js nepalmotherhousetreks.com collected 2026-10-02 19:23:14 UTC 7,239 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3867],{23867:function(e,t,a){a.r(t);var r=a(57437),s=a(63628),o=a(99551),l=a(99376),n=a(2265),c=a(3507),u=a(72223);t.default=e=>{let{countries:t}=e,a="6LeevI4rAAAAADL_vxbEvZCisxukt4--9-2bdPix",p="https://nepalmotherhousetreks.com"+(0,l.usePathname)(),i=(0,l.useRouter)(),m={fullname:"",email:"",phone_number:"",country:"",comments:"",recaptcha_response:"",page_url:p,submit:"contact"},[d,h]=(0,n.useState)({}),[x,f]=(0,n.useState)(m),[b,g]=(0,n.useState)(!1),y=(0,n.useCallback)(async()=>{try{let{grecaptcha:e}=window;if(e&&"function"==typeof e.execute)return await e.execute(a,{action:"contactSubmit"});return console.error("reCAPTCHA is not properly initialized"),null}catch(e){return console.error("Error fetching reCAPTCHA token:",e),null}},[a]);(0,n.useEffect)(()=>{(()=>{let e=document.createElement("script");return e.src="https://www.google.com/recaptcha/api.js?render=".concat(a),e.async=!0,e.onload=()=>{setTimeout(y,1e3)},document.head.appendChild(e),()=>{document.head.removeChild(e)}})()},[y,a]);let N=e=>{let{name:t,value:a}=e.target;f(e=>({...e,[t]:a})),h(e=>({...e,[t]:void 0}))},j=async e=>{e.preventDefault(),g(!0);let t=await y();t||h(e=>({...e,recaptcha_response:""})),f(e=>({...e,recaptcha_response:t}));try{let{csrf_token:e}=await (0,o._V)(),a=await fetch("https://app.nepalmotherhousetreks.com/api/send-quick-inquiry",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":e},body:JSON.stringify({...x,recaptcha_response:t})}),r=await a.json();a.ok?(h({}),f({...m,recaptcha_response:x.recaptcha_response}),i.push("/thank-you")):422===a.status&&r.errors?h(r.errors):(0,s.Z)({type:"error",message:r.error})}catch(e){console.error("Network error:",e.message),(0,s.Z)({type:"error",message:"An error occurred. Please try again."})}finally{g(!1)}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("form",{action:"#",onSubmit:j,className:"contact-form",children:[(0,r.jsxs)("div",{className:"group relative z-0 mb-5 w-full",children:[(0,r.jsx)("input",{onChange:N,value:x.fullname,type:"text",name:"fullname",id:"fullname",className:"text-heading-color peer block w-full appearance-none rounded bg-transparent text-base focus:outline-none focus:ring-0 ".concat(d.fullname?"has-error":""),placeholder:""}),(0,r.jsxs)("label",{htmlFor:"fullname",className:" text-text-color peer-focus:text-text-color peer-focus:dark:text-text-color  absolute top-3   origin-[0] -translate-y-3 scale-75 transform pl-3  text-base duration-300 focus:pl-0 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:start-0 peer-focus:-translate-y-3 peer-focus:scale-75 rtl:peer-focus:translate-x-1/4",children:["Full Name ",(0,r.jsx)("span",{className:"text-red-700",children:"*"})]}),d.fullname&&(0,r.jsx)("small",{className:"font-semibold text-red-500",children:d.fullname[0]})]}),(0,r.jsxs)("div",{className:"group relative z-0 mb-5 w-full",children:[(0,r.jsx)("input",{onChange:N,value:x.email,type:"email",name:"email",id:"email",className:"text-heading-color peer block w-full appearance-none rounded bg-transparent text-base focus:outline-none focus:ring-0 ".concat(d.email?"has-error":""),placeholder:""}),(0,r.jsxs)("label",{htmlFor:"email",className:"text-text-color peer-focus:text-text-color peer-focus:dark:text-text-color absolute top-3   origin-[0] -translate-y-3 scale-75 transform pl-3  text-base duration-300 focus:pl-0 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:start-0 peer-focus:-translate-y-3 peer-focus:scale-75 rtl:peer-focus:translate-x-1/4",children:["Email Address ",(0,r.jsx)("span",{className:"text-red-700",children:"*"})]}),d.email&&(0,r.jsx)("small",{className:"font-semibold text-red-500",children:d.email[0]})]}),(0,r.jsxs)("div",{className:"mb-5 grid md:grid-cols-2 md:gap-6",children:[(0,r.jsxs)("div",{className:"group relative z-0 w-full",children:[(0,r.jsx)("input",{onChange:N,value:x.phone_number,type:"text",name:"phone_number",id:"phone_number",className:"text-heading-color peer block w-full appearance-none rounded bg-transparent text-base focus:outline-none focus:ring-0 ".concat(d.phone_number?"has-error":""),placeholder:""}),(0,r.jsxs)("label",{htmlFor:"phone_number",className:"text-text-color peer-focus:text-text-color peer-focus:dark:text-text-color absolute top-3   origin-[0] -translate-y-3 scale-75 transform pl-3  text-base duration-300 focus:pl-0 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:start-0 peer-focus:-translate-y-3 peer-focus:scale-75 rtl:peer-focus:translate-x-1/4",children:["Phone Number ",(0,r.jsx)("span",{className:"text-red-700",children:"*"})]}),d.phone_number&&(0,r.jsx)("small",{className:"font-semibold text-red-500",children:d.phone_number[0]})]}),(0,r.jsxs)("div",{className:"group relative z-0 w-full",children:[(0,r.jsxs)("select",{onChange:N,value:x.country,name:"country",id:"country",className:"text-heading-color peer block w-full appearance-none rounded bg-transparent text-base focus:outline-none focus:ring-0 ".concat(d.country?"has-error":""),children:[(0,r.jsx)("option",{value:"",children:"Choose Your Country"}),t.length>0&&t.map(e=>(0,r.jsx)("option",{value:e.name,children:e.name},e.id))]}),(0,r.jsxs)("label",{htmlFor:"country",className:"text-text-color peer-focus:text-text-color peer-focus:dark:text-text-color absolute top-3 origin-[0] -translate-y-3 scale-75 transform pl-3 text-base duration-300 focus:pl-0 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:start-0 peer-focus:-translate-y-3 peer-focus:scale-75 rtl:peer-focus:translate-x-1/4",children:["Choose Your Country ",(0,r.jsx)("span",{className:"text-red-700",children:"*"})]}),d.country&&(0,r.jsx)("small",{className:"font-semibold text-red-500",children:d.country[0]})]})]}),(0,r.jsxs)("div",{className:"relative z-0 mb-5 w-full",children:[(0,r.jsx)("textarea",{onChange:N,value:x.comments,name:"comments",id:"comments",rows:6,className:"text-heading-color peer block w-full appearance-none rounded bg-transparent text-base focus:outline-none focus:ring-0 ".concat(d.comments?"has-error":""),placeholder:""}),(0,r.jsxs)("label",{htmlFor:"comments",className:"peer-focus:text-text-color peer-focus:dark:text-text-color absolute top-3 origin-[0] -translate-y-3 scale-75 transform pl-3  text-base duration-300 focus:pl-0 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:start-0 peer-focus:-translate-y-3 peer-focus:scale-75 rtl:peer-focus:translate-x-1/4",children:["Questions / Comments ",(0,r.jsx)("span",{className:"text-red-700",children:"*"})]}),d.comments&&(0,r.jsx)("small",{className:"block font-semibold text-red-500",children:d.comments[0]}),d.recaptcha_response&&(0,r.jsx)("small",{className:"mb-2 block font-semibold text-red-500",children:d.recaptcha_response[0]})]}),(0,r.jsxs)("button",{type:"submit",name:"submit",disabled:b,"aria-busy":b,className:"arrow-move-effect flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-lg font-medium text-text_color underline",children:"Send Message"}),b?(0,r.jsx)(u.default,{className:"loader icon-black h-4 w-4"}):(0,r.jsx)(c.Haw,{className:"h-4 w-4"})]})]})})}}}]);

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.