1(this.webpackJsonppollitup=this.webpackJsonppollitup||[]).push([[13],{129:function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l})),r.d(t,"i",(function(){return b})),r.d(t,"h",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"d",(function(){return j})),r.d(t,"m",(function(){return f})),r.d(t,"l",(function(){return h})),r.d(t,"k",(function(){return O})),r.d(t,"f",(function(){return x})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return w}));var n=r(38),a=r(51),c=r(58),s=r(59),o=r(40);r(74);Object(s.a)();var i=o.a.firestore(),u=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r,n){var c;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=6;break}return e.next=3,i.collection(t).doc(n).set(r).catch((function(e){}));case 3:c=e.sent,e.next=9;break;case 6:return e.next=8,i.collection(t).add(r).catch((function(e){}));case 8:c=e.sent;case 9:return e.abrupt("return",c);case 10:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),l=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r,n,c,s){var o;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!s){e.next=6;break}return e.next=3,i.collection(t).doc(r).collection(n).doc(s).set(c).catch((function(e){}));case 3:o=e.sent,e.next=9;break;case 6:return e.next=8,i.collection(t).doc(r).collection(n).add(c).catch((function(e){}));case 8:o=e.sent;case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})));return function(t,r,n,a,c){return e.apply(this,arguments)}}(),b=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r){var c;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.collection(t).doc(r).get();case 2:if(!(c=e.sent).exists){e.next=7;break}return e.abrupt("return",Object(n.a)(Object(n.a)({},c.data()),{},{id:r}));case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),d=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t){var r,c;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.collection(t).get();case 2:if(!(r=e.sent).empty){e.next=5;break}return e.abrupt("return",[]);case 5:return c=[],r.forEach((function(e){c.push(Object(n.a)(Object(n.a)({},e.data()),{},{id:e.id}))})),e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),p=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r,c){var s,o;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.collection(t).doc(r).collection(c).get();case 2:if(!(s=e.sent).empty){e.next=5;break}return e.abrupt("return",[]);case 5:return o=[],s.forEach((function(e){o.push(Object(n.a)(Object(n.a)({},e.data()),{},{id:e.id}))})),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),j=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r){var n;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.collection(t).doc(r),e.next=3,n.collection("responses").get();case 3:return e.sent.forEach(function(){var e=Object(c.a)(Object(a.a)().mark((function e(t){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.collection("responses").doc(t.id).delete();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=7,n.delete();case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),f=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t){var r;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.collection("users").doc(t);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t){var r;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.get();case 2:return r=e.sent,e.abrupt("return",Object(n.a)(Object(n.a)({},r.data()),{},{id:r.id}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r){var c,s,o;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(r);case 2:return c=e.sent,e.next=5,i.collection(t).where("author","==",c).get();
1case 5:if(!(s=e.sent).empty){e.next=8;break}return e.abrupt("return",[]);case 8:return o=[],s.forEach((function(e){o.push(Object(n.a)(Object(n.a)({},e.data()),{},{id:e.id}))})),e.abrupt("return",o);case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),x=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r){var c,s,o,u;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.collection(t).get();case 2:if(!(c=e.sent).empty){e.next=5;break}return e.abrupt("return",[]);case 5:return s=[],c.forEach((function(e){s.push(Object(n.a)(Object(n.a)({},e.data()),{},{id:e.id}))})),[],u=new RegExp(r,"i"),o=s.filter((function(e){return u.test(e.name)})),e.abrupt("return",o);case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),m=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r){var c,s,o,u;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.collection(t).get();case 2:if(!(c=e.sent).empty){e.next=5;break}return e.abrupt("return",[]);case 5:return s=[],c.forEach((function(e){s.push(Object(n.a)(Object(n.a)({},e.data()),{},{id:e.id}))})),[],u=new RegExp(r,"i"),o=s.filter((function(e){return u.test(e.description)})),e.abrupt("return",o);case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),w=function(){var e=Object(c.a)(Object(a.a)().mark((function e(t,r){var c,s,o,u;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.collection(t).get();case 2:if(!(c=e.sent).empty){e.next=5;break}return e.abrupt("return",[]);case 5:return s=[],c.forEach((function(e){s.push(Object(n.a)(Object(n.a)({},e.data()),{},{id:e.id}))})),[],u=new RegExp(r,"i"),o=s.filter((function(e){return u.test(e.question)})),e.abrupt("return",o);case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},166:function(e,t,r){"use strict";var n=/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/,a=/^(?=.*[a-z])(?=.*[A-Z])(?=.*[@$%#^&*])(?=.*[0-9]).{8,}$/,c={name:function(e){return e.trim().length<4?{name:!0,nameError:"Poll name must be atleast 4 characters long."}:{name:!1,nameError:!1}},description:function(e){return e.trim().split(/\s+/).length<10?{description:!0,descriptionError:"Poll Description must contain atleast 10 words."}:{description:!1,descriptionError:!1}},question:function(e){return e.trim().split(/\s+/).length<4?{question:!0,questionError:"Poll Question must contain atleast 4 words."}:{question:!1,questionError:!1}},choice:function(e){return e.trim().length<3},email:function(e){return n.test(e)?{email:!1,emailError:!1}:{email:!0,emailError:"Please enter valid email address"}},password:function(e){return a.test(e)?{password:!1,passwordError:!1}:{password:!0,passwordError:"Minimum 8 characters, 1 uppercase, 1 lowercase, 1 symbol (@$%#^&*), 1 number (0-9)."}},password2:function(e,t){return e===t?{password2:!1,password2Error:!1}:{password2:!0,password2Error:"Password does not match"}}};t.a=c},168:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(38),a=r(70),c=r(42),s=(r(1),r(5)),o=function(e){return Object(s.jsxs)(a.e,Object(n.a)(Object(n.a)({align:"center",color:"gray.300"},e),{},{children:[Object(s.jsx)(a.a,{flex:"1",children:Object(s.jsx)(a.d,{borderColor:"currentcolor"})}),Object(s.jsx)(a.a,{as:"span",px:"3",color:Object(c.d)("gray.600","gray.400"),fontWeight:"medium",children:e.children}),Object(s.jsx)(a.a,{flex:"1",children:Object(s.jsx)(a.d,{borderColor:"currentcolor"})})]}))}},169:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(38),a=r(64),c=(r(1),r(21)),s=r(85),o=r(70),i=r(5),u=["href","children","tooltip","noUnderline"];function l(e){var t=e.href,r=e.children,l=e.tooltip,b=e.noUnderline,d=Object(a.a)(e,u);return Object(i.jsx)(i.Fragment,{children:l?Object(i.jsx)(s.a,{label:l,children:Object(i.jsx)(c.b,Object(n.a)(Object(n.a)({to:t,style:b?{textDecoration:"none"}:{}},d),{},{children:Object(i.jsx)(o.h,{children:r})}))}
1):Object(i.jsx)(c.b,Object(n.a)(Object(n.a)({to:t,style:b?{textDecoration:"none"}:{}},d),{},{children:Object(i.jsx)(o.h,{children:r})}))})}},175:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(38),a=r(23),c=r(73),s=r(70),o=r(84),i=r(67),u=r(1),l=r(191),b=r(5),d=u.forwardRef((function(e,t){var r=Object(a.e)(),d=r.isOpen,p=r.onToggle,j=u.useRef<HTMLInputElement>null,f=Object(a.j)(j,t);return Object(b.jsxs)(c.a,{id:e.id,children:[Object(b.jsx)(s.e,{justify:"space-between",children:Object(b.jsx)(c.b,{children:e.label||"Password"})}),Object(b.jsxs)(o.b,{children:[Object(b.jsx)(o.d,{children:Object(b.jsx)(i.b,{bg:"transparent !important",variant:"ghost","aria-label":d?"Mask password":"Reveal password",icon:d?Object(b.jsx)(l.b,{}):Object(b.jsx)(l.a,{}),onClick:function(){p();var e=j.current;if(e){e.focus({preventScroll:!0});var t=2*e.value.length;requestAnimationFrame((function(){e.setSelectionRange(t,t)}))}}})}),Object(b.jsx)(o.a,Object(n.a)({ref:f,type:d?"text":"password",autoComplete:"current-password",required:!0},e))]})]})}));d.displayName="PasswordField"},179:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(70),a=r(73),c=r(84),s=r(67),o=(r(1),r(175)),i=r(5),u=function(e){return Object(i.jsxs)(n.j,{spacing:"6",children:[Object(i.jsxs)(a.a,{id:"email",children:[Object(i.jsx)(a.b,{children:"Email address"}),Object(i.jsx)(c.a,{value:e.email,onChange:e.change,name:"email",type:"email",autoComplete:"off",required:!0}),e.errorObj.email&&e.errorObj.emailError?Object(i.jsx)("p",{className:"error",children:e.errorObj.emailError}):null]}),Object(i.jsx)(o.a,{value:e.password,name:"password",id:"password",onChange:e.change}),e.errorObj.password&&e.errorObj.passwordError?Object(i.jsx)("p",{className:"error",style:{textAlign:"center"},children:e.errorObj.passwordError}):null,Object(i.jsx)(n.h,{href:"/forgot-password",fontSize:"sm",style:{position:"relative",textAlign:"right"},children:" Forgot password? "}),Object(i.jsx)(s.a,{type:"submit",colorScheme:"blue",size:"lg",fontSize:"md",onClick:e.signIn,children:"Log in"})]})}},218:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return E}));var n=r(51),a=r(58),c=r(62),s=r(38),o=r(39),i=r(1),u=r.n(i),l=r(59),b=r(40),d=(r(60),r(34)),p=r(129),j=r(179),f=r(168),h=r(61),O=r(89),x=r(70),m=r(42),w=r(67),v=r(46),g=r(169),y=r(166),k=r(5);function E(){Object(l.a)();var e=Object(O.a)(),t=Object(d.b)(),r=t.user,i=t.loadingUser,E=u.a.useState({email:"",password:""}),C=Object(o.a)(E,2),A=C[0],P=C[1],q=u.a.useState({email:!0,password:!0}),R=Object(o.a)(q,2),S=R[0],W=R[1];u.a.useEffect((function(){r&&!i&&(window.location.href="/")}),[r,i]);function z(){return(z=Object(a.a)(Object(n.a)().mark((function t(){var r;return Object(n.a)().wrap((function(t){for(;;
1)switch(t.prev=t.next){case 0:if(r=!0,Object.values(S).forEach((function(e){!1===e||(r=!1)})),!r){t.next=7;break}return t.next=5,b.a.auth().signInWithEmailAndPassword(A.email,A.password).then((function(e){window.location.href="/"})).catch((function(t){e({title:"Error",description:t.message,status:"error",duration:5e3,isClosable:!0})}));case 5:t.next=8;break;case 7:return t.abrupt("return",e({title:"Error",description:"Please fill all Fields with Valid Data.",status:"error",duration:5e3,isClosable:!0}));case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function F(){return F=Object(a.a)(Object(n.a)().mark((function t(){var r;return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new b.a.auth.GoogleAuthProvider,t.next=3,b.a.auth().signInWithRedirect(r).then(function(){var e=Object(a.a)(Object(n.a)().mark((function e(t){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(p.i)("users",t.user.uid);case 2:if(e.sent){e.next=6;break}return e.next=6,Object(p.a)("users",{displayName:"",description:"",logo:""},t.user.uid);case 6:window.location.href="/";case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(t){e({title:"Error",description:t.message,status:"error",duration:5e3,isClosable:!0})}));case 3:case 4:case"end":return t.stop()}}),t)}))),F.apply(this,arguments)}return i||r?Object(k.jsx)(k.Fragment,{}):Object(k.jsx)(x.c,{maxW:"container.sm",p:8,children:Object(k.jsxs)(x.a,{bg:Object(m.d)("gray.50","inherit"),minH:"100vh",py:"12",px:{sm:"6",lg:"8"},children:[Object(k.jsxs)(x.a,{maxW:{sm:"md"},mx:{sm:"auto"},w:{sm:"full"},children:[Object(k.jsx)(x.g,{mt:"6",textAlign:"center",size:"xl",fontWeight:"extrabold",children:"Log in to your account"}),Object(k.jsxs)(x.k,{mt:"4",align:"center",maxW:"md",fontWeight:"medium",children:[Object(k.jsx)("span",{children:"Don't have an account?"}),Object(k.jsx)(x.a,{as:"a",marginStart:"1",href:"#",color:Object(m.d)("blue.600","blue.200"),_hover:{color:"blue.600"},display:{base:"block",sm:"revert"},children:Object(k.jsx)(g.a,{href:"/register",color:"brand.500",children:"Register"})})]})]}),Object(k.jsx)(x.a,{maxW:{sm:"md"},mx:{sm:"auto"},mt:"8",w:{sm:"full"},children:Object(k.jsxs)(x.a,{bg:Object(m.d)("white","gray.700"),py:"8",px:{base:"4",md:"10"},shadow:"base",rounded:{sm:"lg"},children:[Object(k.jsx)(j.a,{email:A.email,signIn:function(){return z.apply(this,arguments)},password:A.password,change:function(e){var t=e.target,r=t.name,n=t.value;P((function(e){return Object(s.a)(Object(s.a)({},e),{},Object(c.a)({},r,n))})),console.log(r);var a=y.a[r](n);W((function(e){return Object(s.a)(Object(s.a)({},e),a)}))},errorObj:S}),Object(k.jsx)(f.a,{mt:"6",children:"or continue with"}),Object(k.jsx)(x.i,{mt:"6",columns:1,spacing:"3",children:Object(k.jsxs)(w.a,{onClick:function(){return F.apply(this,arguments)},color:"currentColor",variant:"outline",children:[Object(k.jsx)(v.a,{children:"Sign in with Google"}),Object(k.jsx)(h.b,{})]})})]})})]})})}}}]); 2//# sourceMappingURL=13.dc12d051.chunk.js.map
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.