1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5743],{31491:function(t,e,r){Promise.resolve().then(r.bind(r,67935))},16463:function(t,e,r){"use strict";var a=r(71169);r.o(a,"useParams")&&r.d(e,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(e,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(e,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(e,{useSearchParams:function(){return a.useSearchParams}})},67935:function(t,e,r){"use strict";r.d(e,{default:function(){return h}});var a=r(57437),n=r(58357);r(28388);var o=r(20357);o.env.NEXT_PUBLIC_PROJECT_ID;let s=o.env.NEXT_PUBLIC_APP_URL||"https://www.excelrs.dev",c="".concat(s,"/bannar1.jpg");var i=r(2265),u=r(71510),l=r(34080),d=r(16463);let m="678db178f70e70f6056b2c3d";function h(t){let{formName:e,publicUrl:r,bannerImage:o,formTitle:h}=t,[f,b]=(0,i.useState)(null),[g,p]=(0,i.useState)(o),[x,v]=(0,i.useState)(h),w=(0,d.useSearchParams)(),P=(null==w?void 0:w.get("id"))||e||"workshopform";(0,i.useEffect)(()=>{p(o)},[o]),(0,i.useEffect)(()=>{v(h)},[h]),(0,i.useEffect)(()=>{let t=!1;return(async()=>{try{let e=await fetch("".concat(n.nL,"/forms/").concat(encodeURIComponent(P),"?projectId=").concat(m),{cache:"no-store"});if(!e.ok||t)return;let r=await e.json(),a=null==r?void 0:r.data;if(!a||t)return;a.imageUrl&&p(function(t){if(!(null==t?void 0:t.trim()))return c;let e=t.trim();return e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("/")?"".concat(s).concat(e):"".concat(s,"/").concat(e)}(a.imageUrl)),a.formTitle&&v(a.formTitle)}catch(t){}})(),()=>{t=!0}},[P]);let _=(0,i.useCallback)(t=>{console.log("Form submitted:",t),b("Form submitted. Thank you!"),setTimeout(()=>b(null),3e3)},[]),N=(0,i.useCallback)(async()=>{let t=x||"Excelrs Form";try{let a=r||window.location.origin+"/forms",n=new URL(a,window.location.href);n.searchParams.set("id",e),navigator.share?(await navigator.share({title:t,text:x?"Fill out ".concat(x,":"):"Fill out this form:",url:n.toString()}),b("Shared")):(await navigator.clipboard.writeText(n.toString()),b("Link copied to clipboard"))}catch(t){b("Unable to share")}setTimeout(()=>b(null),2500)},[r,e,x]);return(0,a.jsxs)("div",{className:"min-h-screen bg-[#f6f3c6] py-10 px-4 sm:px-0 pb-24 md:pb-40",style:{paddingBottom:"calc(18rem + env(safe-area-inset-bottom))"},children:[(0,a.jsxs)("div",{className:"max-w-3xl mx-auto relative",children:[(0,a.jsx)("button",{onClick:N,className:"absolute top-3 right-3 bg-white shadow-lg rounded-full p-2 z-50 hover:bg-gray-100 transition",children:(0,a.jsx)(u.Z,{size:20,className:"text-gray-700"})}),(0,a.jsx)("div",{className:"h-40 md:h-44 rounded-t-xl overflow-hidden shadow",style:{backgroundImage:"url('".concat(g,"')"),backgroundSize:"cover",backgroundPosition:"center"}})]}),(0,a.jsx)("div",{className:"max-w-3xl mx-auto -mt-4",children:(0,a.jsx)("div",{className:"bg-white rounded-b-xl shadow-lg border border-gray-300",children:(0,a.jsx)("div",{className:"p-6 border-t border-gray-200 bg-white",children:(0,a.jsx)(l.Vo,{formName:P,apiUrl:n.nL,projectId:m,onSubmit:_})})})}),f&&(0,a.jsx)("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 bg-gray-900 text-white px-4 py-2 rounded-lg text-sm shadow-lg z-50",children:f})]})}},58357:function(t,e,r){"use strict";r.d(e,{CT:function(){return a},bz:function(){return o},nL:function(){return n}});let a=(r(20357).env.NEXT_PUBLIC_CLOUD_API_URL||"https://excelrs-cloud-new-1069037816864.asia-south1.run.app").replace(/\/+$/,""),n="https://powr-api.lawazia.tech";function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=String(t||"").replace(/^\/+/,"");return e?"".concat(n,"/").concat(e):n}},28388:function(t,e,r){"use strict";r.d(e,{oD:function(){return n}});var a=r(20357);let n=120;a.env.STATIC_PROFILE_PARAM_LIMIT}},function(t){t.O(0,[9715,7971,7279,251,5171,2971,7023,1744],function(){return t(t.s=31491)}),_N_E=t.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.