1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9027],{79027:function(e,t,n){n.r(t),n.d(t,{default:function(){return Navbar}});var i,a,o,r=n(16687),l=n(35029),s=n(81763),d=n(50044),c=n(57437),u=n(40934),f=n(29950),h=n(65255),p=n(80814),v=n(72759),m=n(42198),g=n(11490),x=n(16691),y=n.n(x),b=n(61396),w=n.n(b),j=n(24033),N=n(2265),C=n(81023),L=n(28811),k=n.n(L),S=n(88897),_=n(39684),I=n(97188),A=n(74548),E=n.n(A),M=n(63014),O=n(22924),notifications_NotificationItem=function(e){var t=e.setNotificationDropdownOpen,n=(0,C.I0)(),i=(0,j.useRouter)(),a=(0,C.v9)(function(e){return e.notification}).allNotification,o=(0,C.v9)(function(e){return e.user}).user,r=(0,s._)((0,N.useState)([]),2),l=r[0],d=r[1],handleReadNotifications=function(e){n((0,f.iG)(e))};return(0,N.useEffect)(function(){n((0,f.v6)())},[]),(0,N.useEffect)(function(){var e=null==a?void 0:a.filter(function(e){return!1===e.is_read});d(null==e?void 0:e.slice(0,5))},[a]),(0,c.jsx)(c.Fragment,{children:(null==l?void 0:l.length)>0?l.map(function(e,n){var a,r,l;return(0,c.jsxs)("div",{className:"".concat((null==e?void 0:e.is_read)===!1?"bg-gray-400":"bg-white border border-gray-400"," flex flex-col items-center p-2 my-2 bg-opacity-40 border-gray-400 border-opacity-50 rounded-md cursor-pointer"),onClick:function(){handleReadNotifications(null==e?void 0:e._id);var n=e.url.split("/");if(((null==o?void 0:o.role)=="buyer"?"buyer":"seller")!==n[1]);else{var a,r=(null==e?void 0:null===(a=e.activity)||void 0===a?void 0:a.includes("review"))?"".concat(null==e?void 0:e.url,"?open=activity"):null==e?void 0:e.url;i.push(r)}t(!1)},children:[(0,c.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,c.jsx)("div",{className:"",children:(0,c.jsx)("div",{className:"rounded-full w-[35px] h-[35px] border overflow-hidden",children:(0,c.jsx)(O.Z,{src:(null===(a=e.by_user_id)||void 0===a?void 0:a.profileImage)?null===(r=e.by_user_id)||void 0===r?void 0:r.profileImage:u.sh})})}),(0,c.jsx)("div",{className:"text-xs mx-2 flex-grow truncate",children:null==e?void 0:null===(l=e.activity)||void 0===l?void 0:l.replace(/(\d+(?:\.\d+)?)\$/g,"$$$1")}),(0,c.jsx)("div",{children:(0,c.jsx)("div",{className:"w-5",children:(0,c.jsx)(m.G,{icon:(null==e?void 0:e.is_read)===!1?I.FU$:I.dwZ,className:"text-gray-500 text-base cursor-pointer"})})})]}),(0,c.jsx)("div",{className:"w-full flex justify-end",children:(0,c.jsx)("div",{className:"text-[0.5rem] tracking-wider",children:E()(null==e?void 0:e.createdAt).isSame(E()(),"day")?E()(null==e?void 0:e.createdAt).format("h:mm A"):E()(null==e?void 0:e.createdAt).format("MM/DD/YYYY")})})]},n)}):"No new notifications to review."})},P=n(72344),W=n(10800),D=n(61580),T=n(56016);n(85398),n(22883),n(94968);var z={src:"/_next/static/media/inboxIcon.6baaa47c.svg",height:24,width:30,blurWidth:0,blurHeight:0},R={src:"/_next/static/media/InboxIconFill.7fd34b3a.svg",height:24,width:30,blurWidth:0,blurHeight:0},U={src:"/_next/static/media/notificationIcon.c11f9e3b.svg",height:26,width:24,blurWidth:0,blurHeight:0},V={src:"/_next/static/media/notificationIconFill.b636a4e1.svg",height:24,width:22,blurWidth:0,blurHeight:0},Z={src:"/_next/static/media/mapMarker.757ec035.svg",height:26,width:21,blurWidth:0,blurHeight:0},J={Alabama:"AL",Alaska:"AK",Arizona:"AZ",Arkansas:"AR",California:"CA",Colorado:"CO",Connecticut:"CT",Delaware:"DE",Florida:"FL",Georgia:"GA",Hawaii:"HI",Idaho:"ID",Illinois:"IL",Indiana:"IN",Iowa:"IA",Kansas:"KS",Kentucky:"KY",Louisiana:"LA",Maine:"ME",Maryland:"MD",Massachusetts:"MA",Michigan:"MI",Minnesota:"MN",Mississippi:"MS",Missouri:"MO",Montana:"MT",Nebraska:"NE",Nevada:"NV","New Hampshire":"NH","New Jersey":"NJ","New Mexico":"NM","New York":"NY","North Carolina":"NC","North Dakota":"ND",Ohio:"OH",Oklahoma:"OK",Oregon:"OR",Pennsylvania:"PA","Rhode Island":"RI","South Carolina":"SC","South Dakota":"SD",Tennessee:"TN",Texas:"TX",Utah:"UT",Vermont:"VT",Virginia:"VA",Washington:"WA","West Virginia":"WV",Wisconsin:"WI",Wyoming:"WY"},F=n(92173),G=(i=(0,r._)(function(){return(0,d.Jh)(this,function(e){return[2,new Promise(function(e,t){if(!navigator.geolocation){t(Error("Geolocation not supported"));return}navigator.geolocation.getCurrentPosition(function(t){return e(t.coords)},function(e){return t(e)},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})})]})}),function(){return i.apply(this,arguments)}),q=(a=(0,r._)(function(e,t){var n,i,a;return(0,d.Jh)(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,fetch("https://nominatim.openstreetmap.org/reverse?format=json&lat=".concat(e,"&lon=").concat(t,"&zoom=18&addressdetails=1"))];case 1:return[4,o.sent().json()];case 2:return[2,{city:(i=o.sent().address||{}).city||i.town||i.suburb||i.neighbourhood||i.village||i.hamlet||i.city_district||i.county||i.municipality,state:i.state,country:null===(n=i.country_code)||void 0===n?void 0:n.toUpperCase()}];case 3:throw console.error("Reverse geocoding failed:",a=o.sent()),a;case 4:return[2]}})}),function(e,t){return a.apply(this,arguments)}),H=(o=(0,r._)(function(e,t){var n,i,a,o,r,l,c,u,f,h,p,v,m,g,x,y=arguments;return(0,d.Jh)(this,function(d){switch(d.label){case 0:if(n=y.length>2&&void 0!==y[2]&&y[2],i=localStorage.getItem("userLocation"),a=localStorage.getItem("userLocationTimestamp"),!n&&i&&a&&(o=Date.now()-parseInt(a),r=JSON.parse(i),o<36e5&&r.latitude&&r.longitude))return e(t(r)),[2];d.label=1;case 1:return d.trys.push([1,4,,5]),[4,G()];case 2:return[4,q((l=d.sent()).latitude,l.longitude)];case 3:return u={country:(c=d.sent()).country,city:c.city,state:c.state||c.country,latitude:l.latitude,longitude:l.longitude},localStorage.setItem("userLocation",JSON.stringify(u)),localStorage.setItem("userLocationTimestamp",Date.now().toString()),e(t(u)),[2];case 4:return d.sent(),[3,5];case 5:return d.trys.push([5,7,,8]),[4,F.Z.get("https://ipinfo.io/json?token=5a6086648352e7",{timeout:5e3})];
1case 6:return h=(f=d.sent().data).country,p=f.city,v=f.region,m=f.loc,h&&p&&(e(t(x={country:h,city:p,state:v||h,latitude:(g=(0,s._)(m?m.split(",").map(Number):[null,null],2))[0]||32.7767,longitude:g[1]||-96.797})),localStorage.setItem("userLocation",JSON.stringify(x)),localStorage.setItem("userLocationTimestamp",Date.now().toString())),[3,8];case 7:return console.error("IP-based location fetch failed entirely. No location will be set.",d.sent().message),[3,8];case 8:return[2]}})}),function(e,t){return o.apply(this,arguments)}),B=k()(function(){return Promise.all([n.e(3749),n.e(8447),n.e(7906),n.e(6687),n.e(753),n.e(7142)]).then(n.bind(n,37142))},{loadableGenerated:{webpack:function(){return[37142]}},ssr:!1}),Y=k()(function(){return Promise.resolve().then(n.bind(n,61580))},{loadableGenerated:{webpack:function(){return[null]}},ssr:!1}),K=k()(function(){return n.e(4461).then(n.bind(n,4461))},{loadableGenerated:{webpack:function(){return[4461]}},ssr:!1,loading:function(){return null}}),$=k()(function(){return n.e(9331).then(n.bind(n,29331))},{loadableGenerated:{webpack:function(){return[29331]}},ssr:!1}),NavbarChildrenDropdown=function(e){var t,n=e.link,i=e.closeDropdown;return(0,c.jsx)("div",{className:"absolute left-0 p-2 bg-white border border-gray-200 top-full w-36 rounded-xl",children:null==n?void 0:null===(t=n.children)||void 0===t?void 0:t.map(function(e,t){return(0,c.jsx)("div",{className:"".concat(t!==n.children.length-1?"border-b":""),children:(0,c.jsx)(w(),{className:"flex px-4 py-2 rounded-lg hover:bg-primary hover:text-white ",href:e.to,onClick:i,children:e.text})})})})},NavbarItem=function(e){var t=e.link,n=e.pathname,i=(0,s._)((0,N.useState)(!1),2),a=i[0],o=i[1],r=(0,N.useRef)(null),onClick=function(e){r.current.contains(e.target)||o(!1)};return(0,N.useEffect)(function(){return window.addEventListener("click",onClick),function(){window.removeEventListener("click",onClick)}},[]),(0,c.jsx)("div",{children:(0,c.jsxs)("div",{ref:r,className:"relative inline-flex min-w-fit ",children:["help"===t.text?(0,c.jsx)(w(),{className:"p-1 lg:p-2 xl:p-3 text-md font-regular",href:"".concat(t.to),target:"_blank",rel:"noreferrer",children:(0,c.jsx)("div",{className:"flex items-center hover:text-primary ".concat(n===t.to?"text-primary":""),children:t.text})}):(0,c.jsx)(w(),{className:"p-1 lg:p-2 xl:p-3 text-md font-regular",href:"".concat(t.to),id:t.tourId||"",children:(0,c.jsx)("div",{className:"flex items-center hover:text-primary ".concat(n===t.to?"text-primary":"","\n "),children:t.text})}),a&&t.children&&0!==t.children.length?(0,c.jsx)(NavbarChildrenDropdown,{closeDropdown:function(){return o(!1)},link:t}):null]})})},NavbarContent=function(e){var t,n,i=e.className,a=(0,C.I0)(),o=(0,j.useRouter)();(0,N.useRef)(null);var l=(0,s._)((0,N.useState)(!1),2),u=l[0],x=l[1],b=(0,s._)((0,N.useState)(!1),2),L=b[0],k=b[1],I=(0,s._)((0,N.useState)(!1),2),A=I[0],F=I[1],G=(0,s._)((0,N.useState)(""),2),q=G[0],Q=G[1],X=(0,s._)((0,N.useState)(""),2),ee=X[0],et=X[1],en=(0,s._)((0,N.useState)("en"),2);en[0],en[1];var ei=(0,s._)((0,N.useState)(!1),2);ei[0],ei[1];var ea=(0,s._)((0,N.useState)(null),2);ea[0],ea[1];var eo=(0,C.v9)(function(e){return e.user}),er=eo.user,el=eo.invitedUsers,es=eo.userLocation,ed=(0,C.v9)(function(e){return e.user}).pendingTwoFactor?null:er,ec=(0,C.v9)(function(e){return e.notification}).allNotification,eu=(0,C.v9)(function(e){return e.user}).inviteLoading,ef=(0,C.v9)(function(e){return e.chat}).chats,eh=(0,s._)((0,N.useState)(!1),2),ep=eh[0],ev=eh[1],em=(0,s._)((0,N.useState)(!1),2),eg=em[0],ex=em[1],ey=(0,s._)((0,N.useState)(!1),2),eb=ey[0],ew=ey[1],ej=(0,N.useRef)(null),eN=(0,N.useRef)(null),eC=(0,j.usePathname)(),capitalize=function(e){return(null==e?void 0:e.charAt(0).toUpperCase())+(null==e?void 0:e.slice(1))},eL=(0,j.useSearchParams)(),ek=eC.includes("/seller")||eC.includes("/buyer"),eS=ed&&!eC.includes("/public")?(null==ed?void 0:ed.role)==="service-provider"?[{text:"My Dashboard",to:"/seller/dashboard",tourId:"tour-dashboard"},{text:"My Services",to:"/seller/services",tourId:"tour-my-services"},{text:"Available Work Orders",to:"/seller/jobs",tourId:"tour-available-jobs"},{text:"Manage Work Orders",to:"/seller/orders",tourId:"tour-manage-orders"}]:[{text:"My Dashboard",to:"/buyer/dashboard"},{text:"Browse",to:"/buyer/services"},{text:"My Posted Work Orders",to:"/buyer/jobs"},{text:"Manage Work Orders",to:"/buyer/orders"}]:[{text:"Home",to:"/"},{text:"Services",to:"/public/services"},{text:"Work Orders",to:"/public/jobs"},{text:"Contact",to:"/public/contact-us"},{text:"Blogs",to:"/blogs"},{text:"Invest",to:"/invest"}],e_=(t=(0,r._)(function(){return(0,d.Jh)(this,function(e){return ed?(ex(!1),o.push("/buyer/jobs/create")):o.push("/auth/login?fallback=/buyer/jobs/create"),[2]})}),function(){return t.apply(this,arguments)}),showCreateJob=function(){return["/seller/jobs","/buyer","/seller/orders","/seller/dashboard"].some(function(e){return eC.includes(e)})},eI=(0,s._)((0,N.useState)(0),2),eA=eI[0],eE=eI[1],eM=(0,s._)((0,N.useState)(""),2),eO=eM[0],eP=eM[1];(0,N.useEffect)(function(){if(ef){var e=ef.reduce(function(e,t){var n=t.participant_1_profile,i=t.participant_1_unread,a=t.participant_2_unread;return(null==ed?void 0:ed.id)!==(null==n?void 0:n.id)?e+(a>0?1:0):e+(i>0?1:0)},0);eE(e),a((0,_.VT)(e))}},[ef,null==ed?void 0:ed.id]),(0,N.useEffect)(function(){eP(null==ec?void 0:ec.filter(function(e){return!1===e.is_read}))},[ec]),(0,N.useEffect)(function(){var handleOutsideClick=function(e){ej.current&&!ej.current.contains(e.target)&&ew(!1)};return document.body.addEventListener("click",handleOutsideClick),function(){document.body.removeEventListener("click",handleOutsideClick)}},[]),(0,N.useEffect)(function(){var handleProfileOutsideClick=function(e){!eN.current||eN.current.contains(e.target)||e.target.closest(".ant-tour")||ev(!1)};return document.body.addEventListener("click",handleProfileOutsideClick),function(){document.body.removeEventListener("click",handleProfileOutsideClick)}},[]),(0,N.useEffect)(function(){null!=ed&&a((0,f.v6)())},[]);var logout=function(){a((0,h.TX)()),a((0,h._Z)()),o.push("/auth/login")};(0,N.useEffect)(function(){var e,t,n,i=setTimeout((0,r._)(function(){return(0,d.Jh)(this,function(i){switch(i.label){case 0:if(!ed)return[2];return[4,(0,P.hb)()];case 1:if(!(e=i.sent())||"function"!=typeof e.on)return[2];return t=function(e){a((0,f.wD)(e))},n=function(e){a((0,p.f5)(e))},e.on("notification",t),e.on("switch_role",n),[4,(0,P.Te)(ed.id,ed.role)];case 2:return i.sent(),[2]}})}),15e3);return function(){clearTimeout(i),e&&"function"==typeof e.off&&(t&&e.off("notification",t),n&&e.off("switch_role",n))}},[ed]),(0,N.useEffect)(function(){"true"===localStorage.getItem("reload")&&(window.location.reload(),localStorage.removeItem("reload")),g.Z.get("token")&&a((0,p.ts)())},[]);var eW=(n=(0,r._)(function(){var e,t,n,i=arguments;return(0,d.Jh)(this,function(o){switch(o.label){case 0:if(e=i.length>0&&void 0!==i[0]&&i[0],t=localStorage.getItem("userLocation"))try{n=JSON.parse(t),"Dallas"===n.city&&"Texas"===n.state&&(e=!0,localStorage.removeItem("userLocation"),localStorage.removeItem("userLocationTimestamp"))}catch(e){}return[4,H(a,p.pE,e)];case 1:return o.sent(),[2]}})}),function(){return n.apply(this,arguments)});(0,N.useEffect)(function(){g.Z.get("token")||eW()},[]);var truncateLocation=function(e){if(!e)return"";var t=e.split(" ");return t.length>4?t.slice(0,4).join(" ")+"...":e},eD=(null==es?void 0:es.city)||(null==ed?void 0:ed.city),eT="US"===((null==es?void 0:es.country)||(null==ed?void 0:ed.country))?J[(null==es?void 0:es.state)||(null==ed?void 0:ed.state)]||(null==es?void 0:es.state)||(null==ed?void 0:ed.state):(null==es?void 0:es.country)||(null==ed?void 0:ed.country),ez=eD&&eT&&eD.toLowerCase().includes(eT.toLowerCase())?eD:"".concat(eD).concat(eT?", ".concat(eT):""),eR=eD&&eT&&eD.toLowerCase().includes(eT.toLowerCase())?eD:"".concat(eD).concat(eT?", ".concat(eT):"");return(0,c.jsx)("div",{className:"bg-white relative z-50",children:(0,c.jsxs)("div",{className:i,children:[(0,c.jsxs)("div",{className:"container relative flex items-center py-4 xs:gap-4",children:[(0,c.jsx)(S.Z,{}),(0,c.jsxs)("div",{className:"flex items-center justify-between flex-1 gap-3",children:[ep&&(0,c.jsx)("div",{className:"absolute right-0 py-4 pl-6 pr-6 bg-white rounded-md shadow-lg top-20 z-50",children:(0,c.jsxs)("div",{className:"flex flex-col gap-4 font-light text-gray-400",ref:eN,onClick:function(){return ev(!1)},children:[(0,c.jsxs)("div",{className:"flex gap-2 justify-center items-center cursor-pointer",onClick:function(){return o.push(!0===eC.includes("buyer")?"/buyer":"/seller")},children:[(0,c.jsx)("div",{className:"w-12 h-12 rounded-full overflow-hidden border",children:(0,c.jsx)(O.Z,{src:null==ed?void 0:ed.profileImage})}),(0,c.jsx)("div",{className:"flex flex-col text-xs",children:(0,c.jsx)("p",{className:"font-bold text-lg text-gray-700",children:/^org$/i.test(null==ed?void 0:ed.firstName)?capitalize(null==ed?void 0:ed.lastName):"".concat(capitalize(null==ed?void 0:ed.firstName)," ").concat((null==ed?void 0:ed.organization)?capitalize(null==ed?void 0:ed.lastName):null==ed?void 0:ed.lastName[0].toUpperCase())})})]}),(0,c.jsx)("div",{className:"border-b"}),(0,c.jsx)(w(),{href:!0===eC.includes("buyer")?"/buyer":"/seller",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("/seller"===eC||"/buyer"===eC?"bg-primary text-white rounded-full":""," "),children:"Profile Settings"})})}),"seller"===(0,T.R)(null==ed?void 0:ed.role)&&(0,c.jsx)(w(),{href:"/seller/portfolio",children:(0,c.jsx)("div",{id:"tour-manage-portfolio",className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("/seller/portfolio"===eC?"bg-primary text-white rounded-full":""),children:"Manage Portfolio"})})}),(0,c.jsx)(w(),{href:!0===eC.includes("buyer")?"/buyer/tickets":"/seller/tickets",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("/seller/tickets"===eC||"/buyer/tickets"===eC?"bg-primary text-white rounded-full":""),children:"My Tickets"})})}),(0,c.jsx)("div",{children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ",onClick:function(){x(!0),a((0,p.k1)())},children:"Invite A Friend"})})}),(0,c.jsx)(w(),{href:eC.includes("buyer")?"/buyer/settings?selectedSetting=payment":"/seller/settings?selectedSetting=payment",id:"tour-billing-payments",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat(("/seller/settings"===eC||"/buyer/settings"===eC)&&"payment"===eL.get("selectedSetting")?"bg-primary text-white rounded-full":""),children:eC.includes("buyer")?"Payment Method":"Billing & Payments"})})}),eC.includes("buyer")&&(0,c.jsx)(w(),{href:"buyer"===(0,T.R)(null==ed?void 0:ed.role)?"/buyer/workorders":"/seller/jobs",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("buyer/workorders"===eC?"bg-primary text-white rounded-full":""),children:"Available Work Orders"})})}),"buyer"===(0,T.R)(null==ed?void 0:ed.role)&&!(null==ed?void 0:ed.isSpecial)&&!(null==ed?void 0:ed.isTrusted)&&(0,c.jsx)("div",{role:"button",onClick:function(){if(ed.paymentVerified)o.push("/buyer/settings?selectedSetting=wallet");else{M.Am.error("Please add your payment method first"),o.push("/buyer/settings?selectedSetting=payment");return}},href:"/buyer/settings?selectedSetting=wallet",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2",children:"Wallet Topup"})})}),(0,c.jsx)("div",{className:"border-b"}),(0,c.jsx)(w(),{href:eC.includes("/seller")?"/seller/about-us":"/buyer/about-us",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("/seller/about-us"===eC||"/buyer/about-us"===eC?"bg-primary text-white rounded-full":""),children:"About"})})}),(0,c.jsx)(w(),{href:eC.includes("/seller")?"/seller/contact-us":"/buyer/contact-us",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("/seller/contact-us"===eC||"/buyer/contact-us"===eC?"bg-primary text-white rounded-full":""),children:"Contact Us"})})}),(0,c.jsx)(w(),{href:eC.includes("/seller")?"/seller/notification-settings":"/buyer/notification-settings",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("/seller/notification-settings"===eC||"/buyer/notification-settings"===eC?"bg-primary text-white rounded-full":""),children:"Notification Settings"})})}),(0,c.jsx)(w(),{href:eC.includes("/seller")?"/seller/privacy-policy":"/buyer/privacy-policy",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("/buyer/privacy-policy"===eC||"/seller/privacy-policy"===eC?"bg-primary text-white rounded-full":""),children:"Privacy Policy"})})}),(0,c.jsx)(w(),{href:eC.includes("/seller")?"/seller/faqs":"/buyer/faqs",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 notranslate ".concat("/buyer/faqs"===eC||"/seller/faqs"===eC?"bg-primary text-white rounded-full":""),children:"FAQs"})})}),"seller"===(0,T.R)(null==ed?void 0:ed.role)&&(0,c.jsx)(w(),{href:"/seller/insurance-faq",children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2 ".concat("/seller/insurance-faq"===eC?"bg-primary text-white rounded-full":""),children:"Insurance FAQ"})})}),(0,c.jsx)("div",{className:"border-b"}),(0,c.jsx)("div",{children:(0,c.jsx)("div",{className:"hover:bg-primary w-full hover:text-white text-gray-700 rounded-full",children:(0,c.jsx)("h3",{className:"py-1 px-3 cursor-pointer -mt-2",onClick:function(){F(!0)},children:"Logout"})})})]})}),(0,c.jsx)("div",{className:"items-center menu-items text-[10px] lg:text-[11px] xl:text-[14px] xxl:text-[15px] 3xl:text-[16
1px] font-bold text-lightGrey gap-0.5 lg:gap-1 xl:gap-2 whitespace-nowrap",children:eS.map(function(e,t){return(0,c.jsx)(NavbarItem,{pathname:eC,link:e},"NavbarLink-".concat(t))})}),(0,c.jsxs)("div",{className:"flex items-center ml-auto gap-3",children:[eC&&!(null==eC?void 0:eC.includes("/seller"))&&showCreateJob()&&(0,c.jsx)("button",{onClick:e_,className:"btn-primary lg:block hidden w-fit h-[32px] lg:h-[34px] xl:h-[40px] lg:w-[120px] xl:w-[150px] text-[10px] lg:text-[11px] xl:text-sm",children:"New Work Order"}),ek?(0,c.jsxs)("div",{className:"relative flex items-center gap-3 sm:gap-6 shrink-0 md:shrink pl-3 sm:pl-5",children:[(0,c.jsx)(w(),{href:eC.includes("/seller")?"/seller/chat":"/buyer/chat",id:"tour-chat",children:(0,c.jsxs)("div",{className:"relative",children:[eA>0&&(0,c.jsx)("div",{className:"absolute bg-[#fa0505] rounded-full flex justify-center items-center w-2.5 h-2.5 -right-[4px] -top-[4px] border-2 border-white"}),(0,c.jsx)("div",{children:(0,c.jsx)(y(),{alt:"NavbarImage",width:20,height:16,src:eC.includes("/buyer/chat")||eC.includes("/seller/chat")?R:z})})]})}),(0,c.jsxs)("div",{ref:ej,className:"relative flex items-center shrink-0 md:shrink",children:[(0,c.jsx)("button",{onClick:function(){ew(function(e){return!e})},children:(0,c.jsxs)("div",{className:"relative",children:[(null==eO?void 0:eO.length)>0&&!eb&&(0,c.jsx)("div",{className:"absolute bg-[#fa0505] rounded-full flex justify-center items-center w-2.5 h-2.5 -right-[2px] -top-[2px] border-2 border-white"}),(0,c.jsx)("div",{children:(0,c.jsx)(y(),{alt:"NavbarImage",height:18,width:18,src:eC.includes("/buyer/notifications")||eC.includes("/seller/notifications")?V:U})})]})}),eb?(0,c.jsx)("div",{children:(0,c.jsx)("div",{className:"absolute top-full right-0 z-20",children:(0,c.jsxs)("div",{className:"w-96 lg:w-96 md:w-80 sm:w-80 bg-white shadow-md rounded-md overflow-hidden notification-modal",children:[(0,c.jsxs)("div",{className:"p-3 bg-gray-100 flex justify-between",children:[(0,c.jsx)("div",{children:(0,c.jsxs)("div",{className:"flex items-center",children:[(0,c.jsx)(y(),{alt:"NavbarImage",height:16,width:16,src:U}),(0,c.jsxs)("h5",{className:"ml-2 text-sm font-semibold",children:["Notifications (",null==eO?void 0:eO.length,")"]})]})}),(0,c.jsx)("button",{onClick:function(){return ew(!1)},className:"text-gray-500 hover:text-blue-500 focus:outline-none",children:(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,c.jsx)("path",{fillRule:"evenodd",d:"M4.707 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),(0,c.jsx)("div",{className:"p-3 h-[15rem] overflow-y-auto",children:(0,c.jsx)(notifications_NotificationItem,{setNotificationDropdownOpen:ew})}),(0,c.jsx)("div",{className:"p-3 border-t text-end ml-5",children:(0,c.jsx)("button",{className:"mt-auto text-gray-500 text-sm hover:text-blue-500",onClick:function(){ed&&(null==ed?void 0:ed.role)==="buyer"?o.push("/buyer/notifications"):o.push("/seller/notifications"),ew(!1)},children:"View all Notifications"})})]})})}):null]}),(0,c.jsx)("div",{className:"sm:w-12 sm:h-12 w-8 h-8 rounded-full overflow-hidden border cursor-pointer",onClick:function(){return ev(!ep)},id:"tour-profile",children:(0,c.jsx)(O.Z,{src:null==ed?void 0:ed.profileImage})})]}):(0,c.jsx)("button",{onClick:function(){g.Z.get("token")?o.push("/".concat((null==ed?void 0:ed.role)=="buyer"?"buyer/services":"seller/jobs")):o.push("/auth/login")},className:"sm:block hidden btn-font bg-white border-2 lg:border-[3px] border-primary text-primary hover:bg-primary hover:text-white font-bold rounded-full py-1 lg:py-1 px-3 lg:px-4 h-[32px] lg:h-[34px] xl:h-[40px] min-w-[90px] lg:min-w-[110px] xl:min-w-[130px] text-[10px] lg:text-[11px] xl:text-sm",children:ed?"View ".concat((null==ed?void 0:ed.role)=="buyer"?"Services":"Jobs"):"Login/Signup"}),!ek&&((null==es?void 0:es.city)||(null==ed?void 0:ed.city))&&(0,c.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1.5 lg:px-4 lg:py-2 bg-[#EBEBEB] rounded-full text-[10px] lg:text-xs xl:text-sm font-medium text-gray-700 whitespace-nowrap navbar-location-display transition-colors",title:ez,children:[(0,c.jsx)(y(),{src:Z,alt:"location",className:"text-gray-500 text-xs"}),(0,c.jsx)("span",{children:truncateLocation(ez)})]})]}),(0,c.jsx)("button",{onClick:function(){return ex(!0)},className:"menu-button w-8 h-8 font-semibold border-2 rounded-lg border-primary","aria-label":"Open Menu",children:(0,c.jsx)(m.G,{icon:v.xiG})})]}),(0,c.jsx)("div",{className:"fixed lg:hidden top-0 nav-side left-0 w-full h-full bg-black bg-opacity-80 z-40 ".concat(eg?"translate-x-0":"translate-x-full"),children:(0,c.jsxs)("div",{className:"fixed top-0 right-0 z-30 h-full py-10 px-6 bg-gray-100 w-72 transition-transform duration-700 ".concat(eg?"translate-x-0":"translate-x-full"),children:[(0,c.jsxs)("div",{className:"flex justify-between",children:[(0,c.jsx)(S.Z,{}),(0,c.jsx)("button",{onClick:function(){return ex(!1)},className:"w-8 h-8 text-base font-semibold border-2 rounded-lg border-primary text-primary","aria-label":"Close Menu",children:(0,c.jsx)(m.G,{icon:v.NBC})})]}),(0,c.jsxs)("div",{className:"flex flex-col items-center mt-6 w-full",children:[eS.map(function(e,t){return(0,c.jsxs)(w(),{className:"p-3 text-base font-regular w-full",href:e.to,onClick:function(){return ex(!1)},id:e.tourId?"".concat(e.tourId,"-mobile"):"",children:[(0,c.jsx)("div",{className:"text-left",children:e.text}),eC===e.to?(0,c.jsx)("div",{className:"w-full h-1 mt-2 rounded-2xl bg-primary"}):""]},"NavbarLink-".concat(t))}),eC&&!(null==eC?void 0:eC.includes("/seller"))&&showCreateJob()&&(0,c.jsx)("p",{onClick:e_,className:"p-3 text-base font-regular w-full md:hidden block",children:"Create Work Order"}),!ek&&(0,c.jsx)("p",{role:"button",onClick:function(){g.Z.get("token")?o.push("/".concat((null==ed?void 0:ed.role)=="buyer"?"buyer/services":"seller/jobs")):o.push("/auth/login")},className:"p-3 text-base font-regular w-full sm:hidden block",children:ed?"Vie
1w ".concat((null==ed?void 0:ed.role)=="buyer"?"Services":"Jobs"):"Login/Signup"}),!ek&&((null==es?void 0:es.city)||(null==ed?void 0:ed.city))&&(0,c.jsxs)("div",{className:"flex items-center justify-start gap-2 p-2 mt-4 bg-[#EBEBEB] rounded-full text-sm font-medium text-gray-700 whitespace-nowrap sidebar-location-display transition-colors",title:eR,children:[(0,c.jsx)(y(),{src:Z,alt:"location",className:"w-5 h-5 text-gray-500 text-xs"}),(0,c.jsx)("span",{children:truncateLocation(eR)})]})]})]})})]}),(0,c.jsx)(W.Z,{isOpen:u,toggle:function(){return x(!1)},className:"md:w-[30rem]",children:(0,c.jsxs)("div",{className:"p-6 marker:items-center",children:[(0,c.jsx)("h2",{className:"text-2xl text-center mb-3",children:"Invite Friend"}),(0,c.jsx)(Y,{addInternationalOption:!1,defaultCountry:"US",countries:["US","PK"],international:!0,placeholder:"Enter phone number",value:q,onChange:function(e){var t=e?String(e):"";Q(t),t&&!(0,D.isValidPhoneNumber)(t)?et("Please enter a valid phone number"):et("")}}),ee&&(0,c.jsx)("p",{className:"text-red-500",children:ee}),(0,c.jsx)("button",{className:"bg-primary text-sm font-light py-[10px] mt-4 rounded-md text-white w-full",onClick:function(){var e=String(q||"");if(!e){et("Please enter a phone number");return}if(!(0,D.isValidPhoneNumber)(e)){et("Please enter a valid phone number");return}et(""),a((0,p.R2)({payload:{phones:[q]},onSuccess:function(){x(!1),Q("")}}))},disabled:eu,children:eu?"inviting...":"Invite"}),(0,c.jsx)("div",{className:"conversation-container border border-primary rounded overflow-auto mt-3",children:(0,c.jsxs)("table",{className:"w-full mt-2 border-collapse overflow-auto",children:[(0,c.jsx)("thead",{className:"border-b-2 sticky top-0 bg-white border-primary",children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{style:{textWrap:"nowrap"},scope:"col",className:"font-medium text-gray-500 px-6 py-4 text-left",children:"Referred To"}),(0,c.jsx)("th",{scope:"col",className:"font-medium text-gray-500 px-6 py-4 text-left",children:"Status"}),(0,c.jsx)("th",{style:{textWrap:"nowrap"},scope:"col",className:"font-medium text-gray-500 px-6 text-nowrap py-4 text-left",children:"Created At"})]})}),(0,c.jsx)("tbody",{children:null==el?void 0:el.map(function(e,t){return(0,c.jsxs)("tr",{role:"button",className:"border-b border-black border-opacity-40 ".concat(t%2!=0?"bg-white":"bg-gray-100"),children:[(0,c.jsx)("td",{className:"text-sm text-gray-900 font-medium px-4 py-3 whitespace-nowrap ",children:null==e?void 0:e.referred}),(0,c.jsx)("td",{className:"text-sm text-gray-900 font-medium px-4 py-3 whitespace-nowrap ",children:null==e?void 0:e.status}),(0,c.jsx)("td",{className:"text-sm text-gray-900 font-medium px-4 py-3 whitespace-nowrap ",children:E()(null==e?void 0:e.createdAt).format("MM/DD/YYYY")})]},t)})})]})})]})}),(0,c.jsx)(K,{isOpen:L,toggle:function(){return k(!1)}}),(0,c.jsx)($,{message:"Are you sure you want to logout from the tealpot platform?",isOpen:A,setIsOpen:F,triggerAction:function(){return logout()}}),!((null==ed?void 0:ed.waitlisted)===!0||(null==ed?void 0:ed.status)==="WAITLISTED"||(null==ed?void 0:ed.status)==="waitlisted")&&(0,c.jsx)(B,{openProfileDropdown:function(){return ev(!0)},closeProfileDropdown:function(){return ev(!1)},openSidebar:function(){return ex(!0)},closeSidebar:function(){return ex(!1)}})]})})};function Navbar(e){return(0,c.jsx)(N.Suspense,{fallback:(0,c.jsx)("div",{className:"h-[80px] w-full bg-white"}),children:(0,c.jsx)(NavbarContent,(0,l._)({},e))})}},85398:function(e,t,n){n.r(t);var i=n(35029),a=n(88965),o=n(81763),r=n(57437),l=n(72759),s=n(42198),d=n(2265);t.default=function(e){var t,n=e.list,c=void 0===n?[]:n,u=e.value,f=void 0===u?"":u,h=e.onChange,p=void 0===h?function(){}:h,v=e.placeholder,m=e.required,g=e.disabled,x=e.additionalClasses,y=e.register,b=void 0===y?function(){}:y,w=e.registerValue,j=void 0===w?"":w,N=(0,o._)((0,d.useState)(!1),2),C=N[0],L=N[1],k=(0,o._)((0,d.useState)(""),2),S=k[0],_=k[1],I=(0,d.useRef)(null),handleClick=function(e){I.current.contains(e.target)||L(!1)},A=c&&(null===(t=c.find(function(e){return e.value===S}))||void 0===t?void 0:t.label);return A=A||(void 0===v?"":v)||f||"-- Select Option --",(0,d.useEffect)(function(){_(f)},[f]),(0,d.useEffect)(function(){return window.addEventListener("click",handleClick),function(){window.removeEventListener("click",handleClick)}},[c]),(0,r.jsxs)("div",{ref:I,className:"relative ".concat(g?"pointer-events-none":""),children:[(0,r.jsxs)("div",{onClick:function(){return L(function(e){return!e})},className:"border ".concat(g?"bg-gray-50":"bg-white"," cursor-pointer disabled:bg-transparent flex items-center py-4 px-5 mt-3 outline-none ").concat((null==x?void 0:x.includes("border-"))?"":"border-gray-200 border-opacity-40"," rounded-xl w-full resize-none ").concat(x),children:[(0,r.jsx)("label",{className:"w-full truncate",children:A}),(0,r.jsx)(s.G,{className:"ml-auto",color:"#008382",icon:C?l.onQ:l.gc2})]}),C&&c.length?(0,r.jsx)("div",{className:"absolute ".concat(c.length>=8?"max-h-[20rem]":c.length<8?"h-max":""," overflow-auto border z-40 border-gray-200 p-3 top-[calc(100%+8px)] rounded-2xl left-0 w-full bg-white shadow-lg"),children:c.map(function(e,t){return(0,r.jsx)("div",{role:"button",onClick:function(){L(!1),_(e.value),p(e)},className:"px-3 py-2.5 capitalize select-none rounded-xl transition-colors ".concat(S===e.value?"bg-primary text-white":"text-gray-800 hover:bg-primary/10"),children:(e.label||e.value).replace("_"," ")},"ListItem-".concat(t))})}):"",(0,r.jsx)("input",(0,a._)((0,i._)({type:"text",defaultValue:S,required:void 0!==m&&m},b(j)),{className:"absolute overflow-hidden outline-none -z-30 top-0 bottom-0 left-0 right-0"}))]})}},10800:function(e,t,n){var i=n(57437),a=n(72759),o=n(42198),r=n(2265);t.Z=function(e){var t=e.children,n=e.className,l=e.toggle,s=void 0===l?null:l,d=e.isOpen,c=e.locationClass,u=e.close;return(0,r.useEffect)(function(){return d?document.body.style.overflow="hidden":document.body.style.overflow="unset",function(){document.body.style.overflow="unset"}},[d]),d?(0,i.jsxs)("div",{children:[" ",(0,i.jsxs)("div",{className:"fixed z-50 bg-black overflow-y-auto flex items-center justify-center bg-opacity-70 w-full max-h-screen h-full box-border top-0 left-0",children:[(0,i.jsx)("div",{onClick:s||null,className:"absolute top-0 w-full left-0 "}),(0,i.jsx)("div",{className:"z-30 h-full w-full px-4 flex justify-center items-center ".concat(c," "),children:(0,i.jsxs)("div",{className:"relative overflow-hidden py-2 rounded-2xl bg-white w-full ".concat((null==n?void 0:n.includes("max-w-"))?"":"max-w-xl"," max-sm:w-screen z-30 ").concat(n),children:[(void 0===u||u)&&(0,i.jsx)("div",{className:"z-30 py-3 w-6 h-6 hover:bg-gray-100 hover:rounded-full absolute top-4 right-3 flex items-center justify-center cursor-pointer text-gray-400 hover:text-gray-600",onClick:s||null,children:(0,i.jsx)(o.G,{className:"focus:outline-none",icon:a.NBC})}),(0,i.jsx)("div",{className:"max-h-[75vh] h-auto overflow-y-auto",children:t})]})})]})]}):""}},22924:function(e,t,n){var i=n(57437),a=n(40934),o=n(16691),r=n.n(o),l=n(81023);t.Z=function(e){var t=e.src,n=e.width,o=e.height,s=e.className,d=(0,l.v9)(function(e){return e.user}).user,c=(null==d?void 0:d.role)==="buyer"?a.Me:a._r;return(0,i.jsx)(r(),{width:void 0===n?100:n,height:void 0===o?100:o,alt:"avatar",className:"".concat(void 0===s?"":s," w-full h-full object-cover"),src:t||c})}},42323:function(e,t,n){n.d(t,{bE:function(){return selectTotalNotification},k1:function(){return selectNotification}});var i=n(35029),a=n(88965),o=n(29930),r=n(29950),l=(0,o.oM)({name:"notification",initialState:{allNotification:[],totalNotifications:0,isLoading:!1,allPermissions:null,permissionsLoader:!1,permissionspageLoader:!1},reducers:{},extraReducers:function(e){e.addCase(r.v6.pending,function(e){e.isLoading=!0}).addCase(r.v6.fulfilled,function(e,t){var n,i;e.allNotification=null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.data,e.totalNotifications=null==t?void 0:null===(i=t.payload)||void 0===i?void 0:i.totalNotifications,e.isLoading=!1}).addCase(r.v6.rejected,function(e,t){e.isLoading=!1}).addCase(r.wD.fulfilled,function(e,t){var n,i;e.allNotification=null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.updatedNotification,e.totalNotifications=null==t?void 0:null===(i=t.payload)||void 0===i?void 0:i.totalNotification}
1).addCase(r.iG.pending,function(e){e.isLoading=!0}).addCase(r.iG.fulfilled,function(e,t){var n,o=null==t?void 0:null===(n=t.meta)||void 0===n?void 0:n.arg;e.allNotification=e.allNotification.map(function(e){return e._id===o?(0,a._)((0,i._)({},e),{is_read:!0}):e}),e.isLoading=!1}).addCase(r.iG.rejected,function(e,t){e.isLoading=!1}).addCase(r.U9.pending,function(e){e.isLoading=!0}).addCase(r.U9.fulfilled,function(e,t){e.allNotification=e.allNotification.map(function(e){return(0,a._)((0,i._)({},e),{is_read:!0})}),e.isLoading=!1}).addCase(r.U9.rejected,function(e,t){e.isLoading=!1}).addCase(r.Ko.pending,function(e,t){e.permissionspageLoader=!0}).addCase(r.Ko.fulfilled,function(e,t){var n,i;e.permissionspageLoader=!1,e.allPermissions=null===(i=t.payload)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.permissions}).addCase(r.Ko.rejected,function(e,t){e.permissionspageLoader=!1}).addCase(r.f5.pending,function(e,t){e.permissionsLoader=!0}).addCase(r.f5.fulfilled,function(e,t){var n,i,a,o,r;e.permissionsLoader=!1,(null===(i=t.payload)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.permissions)?e.allPermissions=t.payload.data.permissions:(null===(r=t.meta)||void 0===r?void 0:null===(o=r.arg)||void 0===o?void 0:null===(a=o.payload)||void 0===a?void 0:a.permissions)&&(e.allPermissions=t.meta.arg.payload.permissions)}).addCase(r.f5.rejected,function(e,t){e.permissionsLoader=!1})}});t.ZP=l.reducer;var selectNotification=function(e){return e.notification.allNotification},selectTotalNotification=function(e){return e.notification.totalNotifications}},29950:function(e,t,n){n.d(t,{Ko:function(){return b},U9:function(){return y},f5:function(){return w},iG:function(){return x},v6:function(){return m},wD:function(){return g}});var i,a,o,r,l,s,d=n(16687),c=n(98499),u=n(50044),f=n(29930),h=n(37745),p=n(42323),v=n(63014),m=(0,f.hg)("notification/getNotification",(i=(0,d._)(function(e,t){var n,i,a,o;return(0,u.Jh)(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,h.b.get("/notification/all?page=1")];case 1:return n=e.sent(),[2,t.fulfillWithValue(n.data)];case 2:return i=e.sent(),[2,t.rejectWithValue((null==i?void 0:null===(o=i.response)||void 0===o?void 0:null===(a=o.data)||void 0===a?void 0:a.message)||(null==i?void 0:i.message))];case 3:return[2]}})}),function(e,t){return i.apply(this,arguments)})),g=(0,f.hg)("notification/updateNotification",(a=(0,d._)(function(e,t){var n,i,a,o,r,l,s,d;return(0,u.Jh)(this,function(u){try{if(i=(0,p.k1)(t.getState()),a=null===(n=t.getState().user)||void 0===n?void 0:n.user,o=(0,p.bE)(t.getState()),r=i.some(function(t){return t._id===e._id}),i.length>0&&!r&&e.for_user_id===(null==a?void 0:a.id))return l=[e].concat((0,c._)(i)),[2,{totalNotification:o+1,updatedNotification:l}];return[2,{totalNotification:o,updatedNotification:i}]}catch(e){return[2,t.rejectWithValue("Error updating notification: ".concat((null==e?void 0:null===(d=e.response)||void 0===d?void 0:null===(s=d.data)||void 0===s?void 0:s.message)||(null==e?void 0:e.messaage)))]}return[2]})}),function(e,t){return a.apply(this,arguments)})),x=(0,f.hg)("notification/readNotification",(o=(0,d._)(function(e,t){var n,i,a,o;return(0,u.Jh)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,h.b.post("/notification/read/".concat(e))];case 1:return n=r.sent(),[2,t.fulfillWithValue(n.data)];case 2:return i=r.sent(),[2,t.rejectWithValue((null==i?void 0:null===(o=i.response)||void 0===o?void 0:null===(a=o.data)||void 0===a?void 0:a.message)||(null==i?void 0:i.message))];case 3:return[2]}})}),function(e,t){return o.apply(this,arguments)})),y=(0,f.hg)("notification/markAllReadNotification",(r=(0,d._)(function(e,t){var n,i,a,o;return(0,u.Jh)(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,h.b.post("/notification/read")];case 1:return n=e.sent(),[2,t.fulfillWithValue(n.data)];case 2:return i=e.sent(),[2,t.rejectWithValue((null==i?void 0:null===(o=i.response)||void 0===o?void 0:null===(a=o.data)||void 0===a?void 0:a.message)||(null==i?void 0:i.message))];case 3:return[2]}})}),function(e,t){return r.apply(this,arguments)})),b=(0,f.hg)("notification/getNotificationsPermissions",(l=(0,d._)(function(e){return(0,u.Jh)(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,h.b.get("/permission/")];case 1:return[2,e.sent().data];case 2:throw e.sent();case 3:return[2]}})}),function(e){return l.apply(this,arguments)})),w=(0,f.hg)("notification/postNotificationsPermissions",(s=(0,d._)(function(e,t){var n,i,a;return(0,u.Jh)(this,function(o){switch(o.label){case 0:n=e.payload,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,h.b.post("/permission/",n)];case 2:return(i=o.sent()).data.success?v.Am.success(i.data.message):v.Am.error(i.data.message),[2,i.data];case 3:return a=o.sent(),[2,t.rejectWithValue(a)];case 4:return[2]}})}),function(e,t){return s.apply(this,arguments)}))},65255:function(e,t,n){n.d(t,{TX:function(){return f},_Z:function(){return resetAllSlices},sZ:function(){return h}});var i=n(35029),a=n(88965),o=n(29930),r=n(47713),l=n(11490),s=n(63014),d=n(80814),c=(0,o.oM)({name:"user",initialState:{user:null,userLocation:null,occupationList:[],invitedUsers:[],paymentMethod:null,isLoading:!1,isSidebarOpen:!1,isProfileUpdating:!1,insurancePolicy:null,isEmailUpdating:!1,token:null,adminMessage:null,openChatDetail:null,inviteLoading:!1,getInviteLoading:!1,profileStatus:!1,requestLoading:!1,buyerWorkOrderModal:!1,pendingTwoFactor:!1},reducers:{toggleSidebar:function(e){e.isSidebarOpen=!e.isSidebarOpen},logoutUser:function(e){l.Z.remove("token"),localStorage.removeItem("auth"),e.pendingTwoFactor=!1,sessionStorage.removeItem("pendingTwoFactor")},removeExistingUser:function(e){e.user=null}},extraReducers:function(e){e.addCase(d.z1.fulfilled,function(e,t){e.profileStatus=t.payload}).addCase(d.pE.fulfilled,function(e,t){e.userLocation=t.payload}).addCase(d.pH.pending,function(e,t){e.isLoading=!0}).addCase(d.pH.fulfilled,function(e,t){var n,i,a;t.payload.success?(e.user=t.payload.data,(null===(n=t.payload.data)||void 0===n?void 0:n.twoStepAuth)?e.pen
1dingTwoFactor=!0:(e.token=t.payload.token,e.pendingTwoFactor=!1,(0,r.setCookie)("token",t.payload.token)),s.Am.success(null==t?void 0:null===(i=t.payload)||void 0===i?void 0:i.message)):(s.Am.error((null==t?void 0:null===(a=t.payload)||void 0===a?void 0:a.message)||"Something went wrong"),e.isLoading=!1),e.isLoading=!1}).addCase(d.pH.rejected,function(e,t){var n;s.Am.error((null===(n=t.payload)||void 0===n?void 0:n.message)||t.payload||"Something went wrong"),e.isLoading=!1}).addCase(d.So.pending,function(e,t){e.isLoading=!0}).addCase(d.So.fulfilled,function(e,t){s.Am.success("authentication verified"),e.isLoading=!1}).addCase(d.So.rejected,function(e,t){s.Am.error("authentication failed"),e.isLoading=!1}).addCase(d.Pl.pending,function(e){e.isLoading=!0}).addCase(d.Pl.fulfilled,function(e,t){s.Am.success("authentication verified"),e.isLoading=!1}).addCase(d.Pl.rejected,function(e){s.Am.success("authentication failed"),e.isLoading=!1}).addCase(d.zB.pending,function(e){e.isLoading=!0}).addCase(d.zB.fulfilled,function(e,t){var n;(0,r.setCookie)("token",null===(n=t.payload)||void 0===n?void 0:n.token),s.Am.success(t.payload.message),e.user=t.payload.data,e.isLoading=!1}).addCase(d.zB.rejected,function(e,t){e.isLoading=!1}).addCase(d.cn.pending,function(e){e.isLoading=!0}).addCase(d.cn.fulfilled,function(e,t){var n;s.Am.success(null===(n=t.payload)||void 0===n?void 0:n.message),(0,r.setCookie)("token",t.payload.token),e.user=t.payload.data,e.isLoading=!1}).addCase(d.cn.rejected,function(e,t){var n;s.Am.error((null===(n=t.payload)||void 0===n?void 0:n.message)||t.payload||"Something went wrong"),e.isLoading=!1}).addCase(d.qH.pending,function(e){e.isLoading=!0}).addCase(d.qH.fulfilled,function(e,t){s.Am.success(t.payload.message),e.isLoading=!1}).addCase(d.qH.rejected,function(e,t){var n;s.Am.error((null===(n=t.payload)||void 0===n?void 0:n.message)||t.payload||"Something went wrong"),e.isLoading=!1}).addCase(d.hz.pending,function(e){e.isLoading=!0}).addCase(d.hz.fulfilled,function(e,t){s.Am.success(t.payload.message),e.isLoading=!1}).addCase(d.hz.rejected,function(e,t){var n;s.Am.error((null===(n=t.payload)||void 0===n?void 0:n.message)||t.payload||"Something went wrong"),e.isLoading=!1}).addCase(d.o9.pending,function(e){e.isLoading=!0}).addCase(d.o9.fulfilled,function(e,t){e.isLoading=!1}).addCase(d.o9.rejected,function(e,t){e.isLoading=!1}).addCase(d.WC.pending,function(e){e.isLoading=!0}).addCase(d.WC.fulfilled,function(e,t){e.isLoading=!1}).addCase(d.WC.rejected,function(e,t){e.isLoading=!1}).addCase(d.lm.pending,function(e){e.isLoading=!0}).addCase(d.lm.fulfilled,function(e,t){e.isLoading=!1,e.user=t.payload.data,e.token=t.payload.token,(0,r.setCookie)("token",t.payload.token)}).addCase(d.lm.rejected,function(e,t){e.isLoading=!1}).addCase(d.lD.pending,function(e){e.requestLoading=!0}).addCase(d.lD.fulfilled,function(e,t){e.requestLoading=!1}).addCase(d.lD.rejected,function(e,t){e.requestLoading=!1}).addCase(d.S6.pending,function(e){e.isLoading=!0}).addCase(d.S6.fulfilled,function(e,t){e.isLoading=!1}).addCase(d.S6.rejected,function(e,t){e.isLoading=!1}).addCase(d.Lj.pending,function(e){e.isProfileUpdating=!0}).addCase(d.Lj.fulfilled,function(e){e.isProfileUpdating=!1}).addCase(d.Lj.rejected,function(e){e.isProfileUpdating=!1}).addCase(d.s.pending,function(e){e.isEmailUpdating=!0}).addCase(d.s.fulfilled,function(e,t){var n=t.payload;e.isEmailUpdating=!1,s.Am.success(null==n?void 0:n.message)}).addCase(d.s.rejected,function(e,t){var n,i=t.payload;s.Am.error((null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.message)||"Something went wrong"),e.isEmailUpdating=!1}).addCase(d.zj.fulfilled,function(e,t){var n,a=t.payload,o=null==a?void 0:null===(n=a.data)||void 0===n?void 0:n.map(function(e){return(0,i._)({value:e.name,label:e.name,id:e._id},e)});e.occupationList=o.sort(function(e,t){return e.label.localeCompare(t.label)})}).addCase(d.zj.rejected,function(e){e.occupationList=[]}).addCase(d.ts.fulfilled,function(e,t){var n=t.payload;e.user=n||null}).addCase(d.NF.pending,function(e){e.isLoading=!0}).addCase(d.NF.fulfilled,function(e,t){var n=t.payload;e.isLoading=!1,e.insurancePolicy=n.data}).addCase(d.NF.rejected,function(e,t){e.isLoading=!1}).addCase(d.Zy.pending,function(e){e.isLoading=!0}).addCase(d.Zy.fulfilled,function(e,t){s.Am.success(t.payload.message),e.isLoading=!1}).addCase(d.Zy.rejected,function(e,t){e.isLoading=!1}).addCase(d.Nr.pending,function(e){e.isLoading=!0}).addCase(d.Nr.fulfilled,function(e,t){var n;e.isLoading=!1,e.user=t.payload.data,e.token=t.payload.token,e.pendingTwoFactor=!1,(0,r.setCookie)("token",t.payload.token),s.Am.success(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.message)}).addCase(d.Nr.rejected,function(e){e.isLoading=!1}).addCase(d.yD.pending,function(e){e.isLoading=!0}).addCase(d.yD.fulfilled,function(e,t){e.isLoading=!1,(0,r.setCookie)("token",t.payload.token)}).addCase(d.yD.rejected,function(e){e.isLoading=!1}).addCase(d.o8.pending,function(e){e.isLoading=!0}).addCase(d.o8.fulfilled,function(e,t){var n;e.isLoading=!1,s.Am.success(null===(n=t.payload)||void 0===n?void 0:n.message)}).addCase(d.o8.rejected,function(e){e.isLoading=!1}).addCase(d.hA.pending,function(e){e.isLoading=!0}).addCase(d.hA.fulfilled,function(e,t){var n;e.paymentMethod=null,e.isLoading=!1,s.Am.success(null===(n=t.payload)||void 0===n?void 0:n.data)}).addCase(d.hA.rejected,function(e){e.isLoading=!1}
1).addCase(d.oO.pending,function(e){e.isLoading=!0}).addCase(d.oO.fulfilled,function(e,t){e.paymentMethod=t.payload.data,e.isLoading=!1}).addCase(d.oO.rejected,function(e){e.paymentMethod=null,e.isLoading=!1}).addCase(d.qz.pending,function(e){e.isLoading=!0}).addCase(d.qz.fulfilled,function(e,t){e.user=(0,a._)((0,i._)({},e.user),{reviews:t.payload.data}),e.isLoading=!1}).addCase(d.qz.rejected,function(e){e.isLoading=!1}).addCase(d.i6.pending,function(e){e.isLoading=!0}).addCase(d.i6.fulfilled,function(e,t){var n;e.isLoading=!1,e.adminMessage=null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.data}).addCase(d.i6.rejected,function(e){e.isLoading=!1}).addCase(d.WB.fulfilled,function(e,t){e.openChatDetail=t.payload}).addCase(d.R2.pending,function(e,t){e.inviteLoading=!0}).addCase(d.R2.fulfilled,function(e,t){e.inviteLoading=!1}).addCase(d.R2.rejected,function(e,t){e.inviteLoading=!1}).addCase(d.k1.pending,function(e,t){e.getInviteLoading=!0}).addCase(d.k1.fulfilled,function(e,t){e.getInviteLoading=!1,e.invitedUsers=null==t?void 0:t.payload.data}).addCase(d.k1.rejected,function(e,t){e.getInviteLoading=!1}).addCase(d.nC.pending,function(e){e.buyerWorkOrderModal=!1}).addCase(d.nC.fulfilled,function(e,t){e.buyerWorkOrderModal=t.payload}).addCase(d.nC.rejected,function(e){e.buyerWorkOrderModal=!1})}}),u=c.actions;u.toggleSidebar;var f=u.logoutUser,h=u.removeExistingUser,resetAllSlices=function(){return{type:"RESET_ALL_SLICES"}};t.ZP=c.reducer}}]);
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.