PageSourceSearch

https://ecomitram.org/_next/static/chunks/6333.9136cf36fa30e769.js

js ecomitram.org collected 2026-10-10 01:45:53 UTC 6,661 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6333],{28733:(e,t,r)=>{r.r(t),r.d(t,{ExistingGuestProfilePrompt:()=>u});var n=r(84157),l=r(41865),i=r(78079),a=r(44996),s=r(67531);function u(e){let{open:t,onDismiss:r}=e,{refresh:u}=(0,a.useAuthActions)(),o=(0,l.useRef)(null),d=(0,l.useRef)(null),[c,m]=(0,l.useState)(!1),[f,y]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!t)return;let e=e=>{if("Escape"===e.key){e.stopPropagation(),r();return}if("Tab"!==e.key)return;let t=o.current;if(!t)return;let n=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===n.length)return;let l=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&a===l?(e.preventDefault(),i.focus()):e.shiftKey||a!==i||(e.preventDefault(),l.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,r]),(0,l.useEffect)(()=>{if(!t)return;let e=document.body.style.overflow,r=document.activeElement;return r instanceof HTMLElement&&(d.current=r),document.body.style.overflow="hidden",()=>{var t,r;document.body.style.overflow=e,null==(r=d.current)||null==(t=r.focus)||t.call(r),d.current=null}},[t]);let x=(0,l.useCallback)(async e=>{m(!0),y(null);try{let t={country:e.country};e.state&&(t.state=e.state),e.district&&(t.district=e.district),e.city&&(t.city=e.city),await (0,i.uE)("/users/me",{method:"PATCH",body:{profile:{name:e.name},location:t}}),await u(),r()}catch(e){var t;y((t=e)instanceof i.hD?t.status>=400&&t.status<500?t.message||"Please check your details and try again.":"Something went wrong on our side — please try again.":"Network error — please check your connection and try again.")}finally{m(!1)}},[u,r]);return t?(0,n.jsxs)("div",{className:"fixed inset-0 z-[60] flex items-end justify-center",role:"dialog","aria-modal":"true","aria-label":"Tell us about you",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-foreground
1/40",onClick:r,"aria-hidden":"true"}),(0,n.jsxs)("div",{ref:o,className:"relative w-full max-w-md rounded-t-2xl border border-border bg-background px-6 pt-6 shadow-lg pb-safe",style:{paddingBottom:"max(env(safe-area-inset-bottom), 1.25rem)"},children:[(0,n.jsx)("div",{className:"mb-3 flex justify-center",children:(0,n.jsx)("span",{className:"inline-flex items-center rounded-full bg-muted px-2.5 py-0.5 text-xs font-medium text-muted-foreground",children:"Guest"})}),(0,n.jsx)("h2",{className:"mb-1 text-center text-lg font-semibold text-foreground",children:"Tell us about you"}),(0,n.jsx)("p",{className:"mb-5 text-center text-sm text-muted-foreground",children:"Add your basics so your contributions can be credited."}),(0,n.jsx)(s.Z,{onSubmit:x,error:f,submitting:c}),(0,n.jsx)("button",{type:"button",onClick:r,className:"mt-2 inline-flex h-12 w-full items-center justify-center rounded-xl text-sm font-medium text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:"Skip for now"})]})]}):null}},30158:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(20510).A)("locate-fixed",[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},34729:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(20510).A)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},57341:(e,t,r)=>{r.d(t,{sG:()=>a});var n=r(41865);r(11804);var l=r(12696),i=r(84157),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,l.TL)(`Primitive.${t}`),a=n.forwardRef((e,n)=>{let{asChild:l,...a}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(l?r:t,{...a,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{})},67531:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(84157),l=r(41865),i=r(12197);let a="India";function s(e){var t,r,n,l,i;let s=null!=(n=null==(t=e.country)?void 0:t.trim())?n:"";if(!s)return{country:"Country is required"};if(s===a){let t={};return(null==(l=e.state)?void 0:l.trim())||(t.state="State is required"),(null==(i=e.district)?void 0:i.trim())||(t.district="District is required"),Object.keys(t).length>0?t:null}let u={};return(null==(r=e.city)?void 0:r.trim())||(u.city="City is required"),Object.keys(u).length>0?u:null}function u(e){var t;let{onSubmit:r,defaultValues:u,error:o,submitLabel:d="Save",submitting:c=!1}=e,[m,f]=(0,l.useState)(null!=(t=null==u?void 0:u.name)?t:""),[y,x]=(0,l.useState)(()=>{var e;return{country:null!=(e=null==u?void 0:u.country)?e:a,state:null==u?void 0:u.state,district:null==u?void 0:u.district,city:null==u?void 0:u.city}}),[b,v]=(0,l.useState)(void 0),p=(0,l.useMemo)(()=>!c&&!!m.trim()&&null===s(y),[c,m,y]),g=(0,l.useCallback)(e=>{x(e),b&&v(void 0)},[b]),h=(0,l.useCallback)(async e=>{if(null==e||e.preventDefault(),c)return;let t=s(y);if(v(null!=t?t:void 0),t||!m.trim())return;let n=y.country.trim(),l=n===a;await r({name:m.trim(),country:n,...l?{state:y.state.trim(),district:y.district.trim()}:{city:y.city.trim()}})},[c,m,y,r]);return(0,n.jsxs)("form",{onSubmit:h,className:"flex w-full flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsx)("label",{htmlFor:"cpfb-name",className:"text-sm font-medium text-foreground",children:"Name"}),(0,n.jsx)("input",{id:"cpfb-name",type:"text",value:m,onChange:e=>f(e.target.value),maxLength:80,autoComplete:"name",className:"h-12 rounded-xl border border-border bg-card px-3 font-sans text-base text-foreground outline-none focus:border-primary focus:ring-[3px] focus:ring-primary/20"})]}),(0,n.jsx)(i.M,{value:y,onChange:g,required:!0,disabled:c,error:b}),o?(0,n.jsx)("p",{role:"alert",className:"rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive",children:o}):null,(0,n.jsx)("button",{type:"submit",disabled:!p,className:"h-12 rounded-xl bg-primary px-4 font-sans text-base font-semibold text-primary-foreground transition disabled:cursor-not-allowed disabled:opacity-60",children:d})]})}},75150:(e,t,r)=>{r.d(t,{b:()=>s});var n=r(41865),l=r(57341),i=r(84157),a=n.forwardRef((e,t)=>
1(0,i.jsx)(l.sG.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null==(r=e.onMouseDown)||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var s=a}}]);

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.