1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5828],{5828:function(e,t,n){"use strict";n.r(t);var a=n(5893),r=n(7757),o=n.n(r),c=n(2137),i=n(6156),s=n(7294),l=n(1902);n(6286);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function(e){var t=e.id,n=e.type,r=e.comments,m=e.Moment,u=[],p=(0,s.useState)([]),x=p[0],f=p[1],h=(0,s.useState)([]),v=h[0],g=h[1],j=(0,s.useState)(!1),b=j[0],_=j[1],y=(0,s.useState)(0),k=y[0],S=y[1],w=(0,s.useState)(""),N=w[0],D=w[1],C=(0,s.useState)(""),O=C[0],Z=C[1],I=(0,s.useState)(""),E=I[0],U=I[1],A=(0,s.useState)(""),P=A[0],F=A[1],R=(0,s.useState)(""),Y=R[0],q=R[1],z=(0,s.useState)(""),J=z[0],T=z[1],M=(0,s.useState)(""),B=M[0],L=M[1],W=(0,s.useState)(!1),H=W[0],V=W[1],G=(0,s.useState)({name:"",email:"",comment:""}),K=G[0],Q=G[1],X=K.name,$=K.email,ee=K.comment,te=(K.comment12,(0,s.useState)({name1:"",email1:"",comment123:""})),ne=te[0],ae=te[1],re=function(e){return ae(d(d({},ne),{},(0,i.Z)({},e.target.name,e.target.value)))},oe=ne.name1,ce=ne.email1,ie=ne.comment123,se=function(){var e=(0,c.Z)(o().mark((function e(a){var r,c,i,s,m,d,u,p,x,f,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.preventDefault(),""!==ie){e.next=8;break}T("Comment cannot be blank."),setTimeout((function(){return T("")}),2e3),F(""),q(""),e.next=53;break;case 8:if(""!==oe||localStorage.UserData){e.next=15;break}F("Name is Required."),setTimeout((function(){return F("")}),2e3),q(""),T(""),e.next=53;break;case 15:if(""!==ce||localStorage.UserData){e.next=22;break}q("Email is Required."),setTimeout((function(){return q("")}),2e3),F(""),T(""),e.next=53;break;case 22:if(e.prev=22,r=JSON.stringify({name1:oe,email1:ce}),!0!==H){e.next=45;break}if(localStorage.UserData){e.next=32;break}return localStorage.setItem("UserData",r),c={name1:oe,email1:ce,comment123:ie,date:Date.now(),isAutheticated:!1},e.next=30,l.Z.firestore().collection(n).doc(t).collection("comment").doc(k).collection("replycomment").doc().set(c,{merge:!0});case 30:e.next=43;break;case 32:if(i=JSON.parse(localStorage.getItem("UserData")),s=i.name1,m=i.email1,""===s||void 0===s||""===m){e.next=39;break}return d={name1:s,email1:m,comment123:ie,date:Date.now(),isAutheticated:!1},e.next=37,l.Z.firestore().collection(n).doc(t).collection("comment").doc(k).collection("replycomment").doc().set(d,{merge:!0});case 37:e.next=43;break;case 39:return u=JSON.parse(localStorage.getItem("UserData")),p=u.name,x=u.email,f={name:p,email:x,comment123:ie,date:Date.now(),isAutheticated:!1},e.next=43,l.Z.firestore().collection(n).doc(t).collection("comment").doc(k).collection("replycomment").doc().set(f,{merge:!0});case 43:e.next=48;break;case 45:return h={name1:oe,email1:ce,comment123:ie,date:Date.now(),isAutheticated:!1},e.next=48,l.Z.firestore().collection(n).doc(t).collection("comment").doc(k).collection("replycomment").doc().set(h,{merge:!0});case 48:e.next=53;break;case 50:e.prev=50,e.t0=e.catch(22),console.log(e.t0);case 53:case"end":return e.stop()}}),e,null,[[22,50]])})));return function(t){return e.apply(this,arguments)}}();(0,s.useEffect)((function(){function e(){return(e=(0,c.Z)(o().mark((function e(){var a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.Z.firestore().collection(n).doc(t).collection("comment").get();case 2:a=e.sent,g(a.docs.map((function(e){return{results:e.data(),id:e.id}})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]);var le=function(e){return Q(d(d({},K),{},(0,i.Z)({},e.target.name,e.target.value)))};(0,s.useEffect)((function(){g(r)}),[r]);var me=function(){var e=(0,c.Z)(o().mark((function e(a){var r,c,i,s,m,d,u,p,x,f,h,v,j,b,_;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.preventDefault(),""!==ee){e.next=8;break}U("Comment cannot be blank."),setTimeout((function(){return U("")}),2e3),D(""),Z(""),e.next=69;break;case 8:if(""!==X||localStorage.UserData){e.next=15;break}D("Name is Required."),setTimeout((function(){return D("")}),2e3),Z(""),U(""),e.next=69;break;case 15:if(""!==$||localStorage.UserData){e.next=22;break}Z("Email is Required."),setTimeout((function(){return Z("")}),2e3),D(""),U(""),e.next=69;break;case 22:if(e.prev=22,r=JSON.stringify({name:X,email:$}),!0!==H){e.next=57;break}if(localStorage.UserData){e.next=36;break}return localStorage.setItem("UserData",r),c={name:X,email:$,comment:ee,date:Date.now(),isAutheticated:!1},e.next=30,l.Z.firestore().collection(n).doc(t).collection("comment").doc().set(c,{merge:!0});case 30:return e.next=32,l.Z.firestore().collection(n).doc(t).collection("comment").get();case 32:i=e.sent,g(i.docs.map((function(e){return{results:e.data(),id:e.id}}))),e.next=55;break;case 36:if(s=JSON.parse(localStorage.getItem("UserData")),m=s.name,d=s.email,""===m||void 0===m||""===d){e.next=47;break}return u={name:m,email:d,comment:ee,date:Date.now(),isAutheticated:!1},e.next=41,l.Z.firestore().collection(n).doc(t).collection("comment").doc().set(u,{merge:!0});case 41:return e.next=43,l.Z.firestore().collection(n).doc(t).collection("comment").get();case 43:p=e.sent,g(p.docs.map((function(e){return{results:e.data(),id:e.id}}))),e.next=55;break;case 47:return x=JSON.parse(localStorage.getItem("UserData")),f=x.name1,h=x.email1,v={name1:f,email1:h,comment:ee,date:Date.now(),isAutheticated:!1},e.next=51,l.Z.firestore().collection(n).doc(t).collection("comment").doc().set(v,{merge:!0});case 51:return e.next=53,l.Z.firestore().collection(n).doc(t).collection("comment").get();case 53:j=e.sent,g(j.docs.map((function(e){return{results:e.data(),id:e.id}})));case 55:e.next=64;break;case 57:return b={name:X,email:$,comment:ee,date:Date.now(),isAutheticated:!1},e.next=60,l.Z.firestore().collection(n).doc(t).collection("comment").doc().set(b,{merge:!0});case 60:return e.next=62,l.Z.firestore().collection(n).doc(t).collection("comment").get();case 62:_=e.sent,g(_.docs.map((function(e){return{results:e.data(),id:e.id}})));case 64:e.next=69;break;case 66:e.prev=66,e.t0=e.catch(22),console.log(e.t0);case 69:case"end":return e.stop()}}),e,null,[[22,66]])})));return function(t){return e.apply(this,arguments)}}(),de=(0,s.useCallback)((function(e){function a(){return(a=(0,c.Z)(o().mark((function a(){var r;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,l.Z.firestore().collection(n).doc(t).collection("comment").doc(e).collection("replycomment").get();case 2:(r=a.sent).docs.length>0?f(r.docs.map((function(e){return{results:e.data(),id:e.id}}))):f([]);case 4:case"end":return a.stop()}}),a)})))).apply(this,arguments)}!function(){a.apply(this,arguments)}()}),[B]),ue=function(){V(!H)};return(0,a.jsxs)("div",{className:"__comment",children:[(0,a.jsx)("div",{style:{marginBottom:"20px"},children:"price"===n?(0,a.jsx)("div",{className:"mobile__famous__container",children:(0,a.jsx)("h2",{children:"Comment"})}):"packages"===n?(0,a.jsx)("div",{className:"packages__famous__container",children:(0,a.jsx)("h2",{children:"Comment"})}):(0,a.jsx)("div",{className:"home__blockHeading tech__trendingColor",children:(0,a.jsx)("h2",{children:"Comment"})})}),(0,a.jsxs)("div",{className:"__commentBody",children:[(0,a.jsx)("p",{style:{color:"red"},children:E}),(0,a.jsx)("textarea",{className:"comment__textArea",id:"w3review",name:"comment",value:ee,onChange:function(e){return le(e)},placeholder:"Write Comment..!",onClick:function(){return _(!0)},rows:"4",cols:"50"}),b&&!localStorage.getItem("UserData")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"comment__input",children:[(0,a.jsxs)("div",{style:{width:"100%",marginRight:"3px"},children:[(0,a.jsx)("p",{style:{color:"red"},children:N}),(0,a.jsx)("input",{type:"text",name:"name",placeholder:"Enter Your Name",value:X,onChange:function(e){return le(e)},required:!0})]}),(0,a.jsxs)("div",{style:{width:"100%"},children:[(0,a.jsx)("p",{style:{color:"red"},children:O}),(0,a.jsx)("input",{type:"text",name:"email",placeholder:"Enter Your Email(Your email address will not be published.)",value:$,onChange:function(e){return le(e)},required:!0})]})]}),(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[(0,a.jsx)("input",{type:"checkbox",name:"SaveInformation",value:$,checked:H,onChange:ue}),(0,a.jsx)("p",{style:{fontSize:"10px",marginLeft:"10px"},children:"Save the aforementioned information in this browser for the next time I post a comment."})]})]}),(0,a.jsx)("button",{className:"Comment__from__button",type:"submit",onClick:function(e){return me(e)},children:"Post"})]}),(0,a.jsx)("div",{className:"__showComments",children:null!==v&&void 0!==v&&v.length>0&&v.map((function(e,t){var n;return u.push(e.id),(0,a.jsxs)("div",{className:"__showCommentsInner",children:[(0,a.jsxs)("div",{className:"__commentDetail",children:[(0,a.jsx)("div",{style:{margin:"10px 5px 0 5px"},children:(0,a.jsx)("img",{className:"comment__avatar",src:"https://firebasestorage.googleapis.com/v0/b/bepakistani-dbc7b.appspot.com/o/Profile_avatar_placeholder_large.png?alt=media&token=ad33ac57-7098-4c61-8df6-c8b8d6221a28",alt:"avatar"})}),(0,a.jsxs)("div",{className:"__commentnamedate",children:[(0,a.jsxs)("div",{className:"comment__dateAndName",children:[(0,a.jsx)("h3",{style:{fontSize:"19px",marginRight:"3px"},children:e.results.name||e.results.name1})," ","\u2013",(0,a.jsx)("p",{style:{fontSize:"15px"},children:(0,a.jsx)(m,{format:"MMMM D, YYYY",children:null===e||void 0===e||null===(n=e.results)||void 0===n?void 0:n.date})})]}),(0,a.jsx)("p",{style:{fontSize:"15px"},children:e.results.comment})]})]}),""!==x&&null!==x&&void 0!==x&&B===e.id&&x.map((function(t,n){var r,o,c,i,s;return B===e.id&&(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"__reply",children:(0,a.jsxs)("div",{className:"__commentDetail",children:[(0,a.jsx)("div",{style:{margin:"10px 5px 0 5px"},children:(0,a.jsx)("img",{className:"comment__avatar",src:"https://firebasestorage.googleapis.com/v0/b/bepakistani-dbc7b.appspot.com/o/Profile_avatar_placeholder_large.png?alt=media&token=ad33ac57-7098-4c61-8df6-c8b8d6221a28",alt:"avatar"})}),(0,a.jsxs)("div",{className:"__commentnamedate",children:[(0,a.jsxs)("div",{className:"comment__dateAndName",children:[(0,a.jsx)("h3",{style:{fontSize:"19px",marginRight:"3px"},children:(null===t||void 0===t||null===(r=t.results)||void 0===r?void 0:r.name1)||(null===t||void 0===t||null===(o=t.results)||void 0===o?void 0:o.name)})," ","\u2013",(0,a.jsx)("p",{style:{fontSize:"15px"},children:moment(null===t||void 0===t||null===(c=t.results)||void 0===c?void 0:c.date).fromNow()})]}),(0,a.jsx)("p",{style:{fontSize:"15px"},children:(null===t||void 0===t||null===(i=t.results)||void 0===i?void 0:i.comment)||(null===t||void 0===t||null===(s=t.results)||void 0===s?void 0:s.comment123)})]})]})})},t.id)})),(0,a.jsxs)("div",{className:"__LikeDislike",children:[(0,a.jsx)("div",{className:"__eachOption2",onClick:function(){L(e.id),function(e){
1S(e)}(e.id)},children:(0,a.jsx)("p",{style:{color:"#FF5900",cursor:"pointer"},children:"Reply"})}),(0,a.jsx)("div",{className:"__eachOption2"}),(0,a.jsxs)("div",{className:"__eachOption2",onClick:function(){L(e.id),de(e.id),S(e.id)},children:[(0,a.jsx)("p",{style:{color:"#FF5900",cursor:"pointer"},children:"View Replies"}),e.id===B?(0,a.jsx)("i",{style:{color:"#FF5900",cursor:"pointer"},className:"fas fa-sort-down"}):(0,a.jsx)("i",{style:{color:"#FF5900",cursor:"pointer"},className:"fas fa-sort-up"})]})]}),e.id===k&&(0,a.jsx)("div",{children:""!==u&&null!==u&&void 0!==u&&u.map((function(t){return t===k&&(0,a.jsxs)("div",{className:"__commentBody",children:[(0,a.jsx)("p",{style:{color:"red"},children:J}),(0,a.jsx)("textarea",{className:"comment__textArea",id:"w3review",name:"comment123",value:ie,onChange:function(e){return re(e)},placeholder:"Write Comment..!",rows:"4",cols:"50"}),!localStorage.getItem("UserData")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"comment__input",children:[(0,a.jsxs)("div",{style:{width:"100%",marginRight:"3px"},children:[(0,a.jsx)("p",{style:{color:"red"},children:P}),(0,a.jsx)("input",{type:"text",name:"name1",placeholder:"Enter Your Name",value:oe,onChange:function(e){return re(e)},required:!0})]}),(0,a.jsxs)("div",{style:{width:"100%"},children:[(0,a.jsx)("p",{style:{color:"red"},children:Y}),(0,a.jsx)("input",{type:"text",name:"email1",placeholder:"Enter Your Email(Your email address will not be published.)",value:ce,onChange:function(e){return re(e)},required:!0})]})]}),(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[(0,a.jsx)("input",{type:"checkbox",name:"SaveInformation",value:$,checked:H,onChange:ue}),(0,a.jsx)("p",{style:{fontSize:"10px",marginLeft:"10px"},children:"Save the aforementioned information in this browser for the next time I post a comment."})]})]}),(0,a.jsx)("button",{className:"Comment__from__button",type:"submit",onClick:function(t){de(e.id),se(t)},children:"Post"})]},t)}))})]},e.id)}))})]})}}}]);
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.