1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[98074],{1752:e=>{e.exports={changePasswordWrapper:"changePassword_changePasswordWrapper__fPrlW",changePasswordSubmit:"changePassword_changePasswordSubmit__dE31Y",ctaButton:"changePassword_ctaButton__AMHOp"}},2344:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});var t=s(37876),o=s(11944),n=s.n(o);let r=({onClick:e=()=>{},isSelected:a,children:s})=>(0,t.jsx)("button",{type:"button","aria-pressed":a,className:`${n().tabText} ${a?n().tabSelected:""}`,onClick:e,children:s})},3442:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});var t=s(37876),o=s(71576),n=s.n(o);let r=({children:e,className:a=""})=>(0,t.jsx)("div",{className:`${n().pageContent} ${a}`,children:e})},7289:(e,a,s)=>{"use strict";s.d(a,{A:()=>T});var t=s(37876),o=s(43010),n=s.n(o),r=s(62228),i=s(47185),l=s(37899),c=s(88992),d=s(15348),h=s(86955),m=s(87860),u=s(14232),p=s(57777),_=s(24728),x=s(53835),w=s(69457),g=s(46492),j=s(5467),A=s(8715),f=s(1752),b=s.n(f);let v=({email:e})=>{let[a,s]=(0,u.useState)(!1),o=(0,c.mN)({mode:"onBlur",defaultValues:{currentPassword:"",newPassword:"",confirmNewPassword:""}}),n=[{name:"currentPassword",externalFieldNames:["body:old_password"],label:"Current Password",validationConfig:[new _.A("tooShort",h.A.password.tooShort,m.sl,["Password length must be at least 8 characters long","length","long"]),new _.A("incorrect",h.A.password.incorrect,m.ew,["Password provided is incorrect"])]},{name:"newPassword",externalFieldNames:["body:new_password_length","body:matching_passwords"],label:"New Password",validationConfig:[new _.A("tooShort",h.A.password.tooShort,m.sl,["Password length must be at least 8 characters long","length","long"]),new _.A("notDifferent",h.A.password.notDifferent,m.ew,["New password must differ from old password","diff"])],attributes:{onBlur:()=>{o.formState.touchedFields.confirmNewPassword&&o.trigger("confirmNewPassword")}}},{name:"confirmNewPassword",label:"Confirm New Password",validationConfig:[new _.A("tooShort",h.A.password.tooShort,m.sl),new _.A("doesNotMatch",h.A.confirmPassword.doesNotMatch,e=>(0,m.wG)(e,o.getValues("newPassword")??""))]}],r=async e=>{let{currentPassword:a,newPassword:t}=e,r=w.A.usernameInfo?.username;if(void 0===a||void 0===t||void 0===r)return void(0,x.zP)((0,x.CP)("Your account is still loading. Please try again in a moment."));s(!0);try{await w.A.changePassword(a,t),await w.A.authenticate(r,t),(0,p.tP)("Password successfully changed"),o.reset()}catch(e){(0,x.YV)(e,o,n)}finally{s(!1)}},i=async()=>{try{await w.A.sendChangePasswordEmail(e),(0,p.tP)(`Email to change password sent to ${e}!`)}catch(e){(0,x.zP)(e)}};return(0,t.jsx)(A.A,{isLoading:a,children:(0,t.jsx)(l.A,{cardTitle:"Change Password",children:(0,t.jsxs)("form",{onSubmit:e=>void o.handleSubmit(r)(e),children:[(0,t.jsx)("div",{className:b().changePasswordWrapper,children:n.map((e,a)=>(0,t.jsx)(d.A,{hookForm:o,name:e.name,label:e.label,attributes:{type:"password",...e.attributes},validationConfig:e.validationConfig,isRequired:!0},a))}),(0,t.jsxs)("div",{className:b().ctaButton,children:[(0,t.jsx)(g.A,{className:`${b().changePasswordSubmit} changePasswordSubmit`,type:"submit",children:"Save Changes"}),(0,t.jsx)(j.A,{onClick:()=>void i(),children:"Forgot Password?"})]})]})})})};var S=s(99365),N=s(6346),y=s(26765),C=s(59260),M=s(11827),P=s(51786);let R={google:"iconGoogle-25",microsoft:"iconMicrosoft-21",smarty:"iconSmartyPin_gradient-30"},T=({provider:e,email:a,removeLoginCallback:s,allowChanges:o=!0})=>{let{isOpen:l,openModal:c,closeModal:d}=(0,y.A)(),{isOpen:h,closeModal:m,openModal:p}=(0,y.A)(),[_,g]=(0,u.useState)(!1);(0,C.A)(l,"changePassword"),(0,C.A)(h,"removeLoginConfirmation");let j=async()=>{try{g(!0),m(),await w.A.deleteCredential(e,a),await s?.()}catch(e){(0,x.zP)((0,N.Ay)(e))}finally{g(!1)}};return(0,t.jsx)(A.A,{isLoading:_,children:(0,t.jsxs)("div",{className:n().cardWrapper,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:n().providerWrapper,children:Object.prototype.hasOwnProperty.call(R,e)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.I,{icon:R[e],height:"25",width:"25"}),(0,t.jsx)("span",{children:(0,r.ZH)(e)})]}):(0,t.jsxs)(t.Fragment,{children:["Your login is managed by your company: (",e,")"]})}),a]}),o&&(0,t.jsx)("div",{className:n().ctaButton,children:"smarty"===e?(0,t.jsx)(M.A,{onClick:c,children:"Change Password"}):["google","microsoft"].includes(e)?(0,t.jsx)(M.A,{onClick:()=>p(),children:"Remove"}):(0,t.jsx)("span",{})}),l&&(0,t.jsx)(i.A,{action:d,children:(0,t.jsx)("div",{className:n().changePasswordModal,children:(0,t.jsx)(v,{email:a})})}),(0,t.jsx)(S.A,{title:"Are you sure?",isOpen:h,closeModal:m,confirmButtonText:"Yes, Remove",action:()=>void j(),content:"Are you sure you want to remove this credential?"})]})})}},11944:e=>{e.exports={tabText:"tabItem_tabText__6nwgK",tabSelected:"tabItem_tabSelected__TFJ4Y"}},18281:e=>{e.exports={confirmationModalSmartyModalContainer:"confirmationModal_confirmationModalSmartyModalContainer__5oZRP",confirmationModalWrapper:"confirmationModal_confirmationModalWrapper__74aNJ",horizontalLine:"confirmationModal_horizontalLine__2ja95",confirmationModalTitle:"confirmationModal_confirmationModalTitle__LqX0g",confirmationModalTitleIcon:"confirmationModal_confirmationModalTitleIcon__oxZ_s",confirmationModalTitleWarning:"confirmationModal_confirmationModalTitleWarning__YL3pL",confirmationModalTitlePositive:"confirmationModal_confirmationModalTitlePositive__R6M00",confirmationModalContent:"confirmationModal_confirmationModalContent__cPqD_",confirmationModalButtonWrapper:"confirmationModal_confirmationModalButtonWrapper__pzzAM",button:"confirmationModal_button__q6C_w"}},18634:e=>{e.exports={tableRow:"adminUserSearchRow_tableRow___da_a",disabledRow:"adminUserSearchRow_disabledRow__k6gwD",email:"adminUserSearchRow_email__2viIr",disabledMessage:"adminUserSearchRow_disabledMessage__EwbJg",providerTableRow:"adminUserSearchRow_providerTableRow__IZgo3",icon:"adminUserSearchRow_icon__FmJ_J",expandedRow:"adminUserSearchRow_expandedRow__gizQ3",accountSearchContainer:"adminUserSearchRow_accountSearchContainer__50nc7",tooltip:"adminUserSearchRow_tooltip__wV37c",providerTooltip:"adminUserSearchRow_providerTooltip__7dEcz",providerTooltipInfo:"adminUserSearchRow_providerTooltipInfo___ZRtc",nameNotSet:"adminUserSearchRow_nameNotSet__H3woi",tooltipTableRow:"adminUserSearchRow_tooltipTableRow__sUkMf",alternatingColors:"adminUserSearchRow_alternatingColors__Vsk0_"}},18873:(e,a,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin-dashboard",function(){return s(51096)}])},23001:e=>{e.exports={table:"accountSearch_table__qVhh_",favoritedRow:"accountSearch_favoritedRow__bi_tL",nestedErrorLoadingInfo:"accountSearch_nestedErrorLoadingInfo__bbLTI",deactivatedRowClass:"accountSearch_deactivatedRowClass__uWvJ5",deactivatedMessage:"accountSearch_deactivatedMessage__nrlcA",tableRow:"accountSearch_tableRow__dHJ93",accountLink:"accountSearch_accountLink__nfKpx",expandedRowClass:"accountSearch_expandedRowClass___7WTg",expandedRow:"accountSearch_expandedRow__x0jKU"}},37314:e=>{e.exports={tabsWrapper:"tabSelector_tabsWrapper__S9gXy",extraSpacing:"tabSelector_extraSpacing__rdFVo"}},43010:e=>{e.exports={cardWrapper:"loginCard_cardWrapper__nv1RZ",providerWrapper:"loginCard_providerWrapper__gXQAN",ctaButton:"loginCard_ctaButton__mAxXf",changePasswordModal:"loginCard_changePasswordModal__hNZFh"}},46736:e=>{e.exports={table:"adminUserSearch_table__1HR3t"}},51096:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>ei});var t=s(37876),o=s(14232),n=s(49467),r=s(15348),i=s(49493),l=s(19821),c=s(76847),d=s(69457),h=s(68435),m=s(5467),u=s(97332),p=s(46492),_=s(53835),x=s(76609),w=s(48227),g=s(70700),j=s(20514),A=s(73821),f=s(23001),b=s.n(f);let v=({searchResults:e,setSearchResults:a,searchResultsAreLoading:s,setSearchResultsAreLoading:f,hookForm:v,router:S})=>{let[N,y]=(0,o.useState)([]),C=(0,o.useId)(),{favoritedAccounts:M,successLoadingFavorites:P,getFavoritedAccounts:R}=(0,g.A)();(0,o.useEffect)(()=>{(async()=>{let e=sessionStorage.getItem("accountSearchQuery");e&&(v.setValue("searchValue",e),await I({searchValue:e}))})()},[S.query]);let T=e=>void 0!==N.find(a=>a===e),I=async e=>{try{d.A.isAuthenticated()||((0,u.G)(S.asPath),await S.push("/login")),a([]),y([]),f(!0);let{searchValue:s}=e,t=`?search=${encodeURIComponent(s)}`;window.history.pushState({},"",t);let o=await Promise.allSettled([(0,n.lu)(s),(0,n.KW)(s),(0,n.Cg)(s),(0,n.NC)(s),(0,n.MT)(s),(0,n.I4)(s),(0,n.u_)(s)]),r=Object.values(o.reduce((e,a)=>("fulfilled"===a.status&&a.value.length>0&&a.value.forEach(a=>{e[String(a.account.id)]=a}),e),{})),i=await (0,n.bf)(r);if(a(i),1===i.length){let e=i[0]?.account.id;e&&(await S.push(`/admin-dashboard/account?account_id=${e}`),sessionStorage.removeItem("accountSearchQuery"))}else i.length>1&&sessionStorage.setItem("accountSearchQuery",s)}catch(e){(0,_.zP)(e)}finally{f(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("form",{onSubmit:e=>void v.handleSubmit(I)(e),children:[(0,t.jsx)(r.A,{hookForm:v,name:"searchValue",label:"Email, Order ID, Account ID, Credentials, or Company Name"}),(0,t.jsx)(p.A,{type:"submit",children:"Search"})]}),(0,t.jsx)("br",{}),(0,t.jsx)("br",{}),(0,t.jsx)("h4",{children:"Search Results"}),(0,t.jsx)(w.A,{isLoading:s,children:e?.length?(0,t.jsxs)(t.Fragment,{children:[!P&&(0,t.jsx)("div",{className:b().nestedErrorLoadingInfo,children:"Error loading favorited accounts, so some information might not look right. Try refreshing the page, and if the error persists, reach out to frontend."}),(0,t.jsxs)(h.AC,{className:b().table,isAdminDashTable:!0,children:[(0,t.jsx)(h.A0,{
1children:"Add to Favorites"}),(0,t.jsx)(h.A0,{children:"Account ID"}),(0,t.jsx)(h.A0,{children:"Team Members / Contacts"}),(0,t.jsx)(h.A0,{children:"Lifetime Purchase"}),(0,t.jsx)(h.A0,{}),e.map(({account:e,contacts:a,deactivated:s},o)=>{let n,r=T(o),d=`${C}-details-${e.id}`,u=void 0===(n=e.id)?void 0:M.get(n),p=`${s!==c.ZQ?b().deactivatedRowClass:""} ${r?b().expandedRowClass:""}`.trim();return(0,t.jsxs)("div",{className:b().tableRow,children:[(0,t.jsxs)(h.nA,{className:`${p} ${b().favoritedRow}`,children:[(0,t.jsx)(x.A,{account:e,getFavoritedAccounts:R,favoritedAccounts:M}),u&&`(${u.length<=15?u:u.slice(0,12)+"..."})`]}),(0,t.jsxs)(h.nA,{className:p,children:[(0,t.jsx)(m.A,{className:b().accountLink,href:`/admin-dashboard/account?account_id=${e.id}`,children:e.id}),s!==c.ZQ&&(0,t.jsx)("div",{className:b().deactivatedMessage,children:"Account has been deactivated"})]}),(0,t.jsx)(h.nA,{className:p,children:(0,t.jsx)(l.A,{contacts:a,teamMembers:e.users??[]})}),(0,t.jsx)(h.nA,{className:p,children:(0,i.Sd)(e?.lifetimePurchaseTotal)}),(0,t.jsx)(h.nA,{className:p,children:(0,t.jsx)(j.A,{isExpanded:T(o),toggleIsExpanded:()=>{T(o)?y(N.filter(e=>e!==o)):y([...N,o])},ariaLabel:"Toggle account details",...r&&{ariaControls:d}})}),T(o)?(0,t.jsx)("div",{id:d,className:b().expandedRow,children:(0,t.jsx)(A.A,{accountId:e?.id})}):null]},e.id)})]})]}):(0,t.jsx)("p",{children:"No Results"})})]})};var S=s(34166),N=s(44902),y=s(56542),C=s(2344),M=s(37899),P=s(27907),R=s(49668),T=s(73571),I=s(36959),E=s(92884),$=s(86570),k=s(15312),U=s(78098),O=s(16824),L=s(92646),F=s(68917),V=s(7289),W=s(55791),D=s.n(W);let B=({user:e,credentials:a})=>{let s=(0,O.Yu)(e?.firstName,e?.lastName,!0),o=!!e?.company,n=!!e?.phone;return(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:D().expandedCard,
1children:[(0,t.jsxs)("div",{className:D().userInfo,children:[(0,t.jsxs)("div",{className:D().userField,children:[(0,t.jsx)("strong",{children:"Name:"}),(0,t.jsx)("span",{className:e?.firstName||e?.lastName?void 0:D().nameNotSet,children:s})]}),(0,t.jsxs)("div",{className:D().userField,children:[(0,t.jsx)("strong",{children:"Company:"}),o?e?.company:(0,t.jsx)("div",{className:D().nameNotSet,children:"Not set"})]}),(0,t.jsxs)("div",{className:D().userField,children:[(0,t.jsx)("strong",{children:"Phone #:"}),n?e?.phone:(0,t.jsx)("div",{className:D().nameNotSet,children:"Not set"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:D().expandedTitle,children:"User's Credentials:"}),!e&&0===Object.keys(a).length&&(0,t.jsx)("div",{className:D().nameNotSet,children:"This user is a contact on an account, so they do not have any logins associated with Smarty."}),Object.entries(a).map(([e,a])=>a.map((a,s)=>(0,t.jsx)(V.A,{provider:e,email:a,allowChanges:!1},s)))]})]})})};var z=s(51786),q=s(18634),Y=s.n(q);let Z={google:"iconGoogle-25",microsoft:"iconMicrosoft-21",smarty:"iconSmartyPin_gradient-30",sso:"iconSSO-24"},Q=["smarty","google","microsoft","sso"],G=new Set(["google","microsoft","smarty"]),J=({user:e,emails:a,accounts:s,credentials:n,index:r,userId:i,setActionUser:l,openActivationModal:c,openDeactivationModal:d,openChangePasswordModal:u,openRedactPIIModal:p,canPerformGeneralActions:_})=>{let x,[w,g]=(0,o.useState)(null),{openDropdownId:A,toggleActionDropdown:f}=(0,F.A)(),b=(0,o.useId)(),v=(0,O.Yu)(e?.firstName,e?.lastName,!0),S=e=>{w===e?g(null):g(e)},N=e?.disabled?Y().disabledRow:r%2==0?Y().alternatingColors:"";return(0,t.jsxs)("div",{className:Y().tableRow,onClick:()=>S(r),children:[(0,t.jsxs)(h.nA,{className:N,children:[a?.map(e=>(0,t.jsx)("div",{className:Y().email,children:e},e)),e?.disabled&&(0,t.jsx)("div",{className:Y().disabledMessage,children:"User is deactivated"}),"DELETED PER DSAR REQUEST"===v&&(0,t.jsxs)("div",{className:Y().disabledMessage,children:["PII redacted per DSAR request"," ",e&&"0001-01-01T00:00:00Z"!==e.redactedTimestamp&&`on ${(0,O.qS)(new Date(e.redactedTimestamp))}`]})]}),s?.length===1&&0===s[0]?(0,t.jsxs)(h.nA,{className:`${Y().tooltipTableRow} ${N}`,children:["None",(0,t.jsx)(U.A,{className:Y().tooltip,children:"This means that the user was created, but they didn't finish the signup process, so they're not linked to an account."})]}):(0,t.jsx)(h.nA,{className:N,children:s?.map(e=>(0,t.jsx)("div",{children:(0,t.jsx)(m.A,{href:`/admin-dashboard/account?account_id=${e}`,children:e})},e))}),(0,t.jsx)(h.nA,{className:`${Y().tooltipTableRow} ${N}`,children:0===i?(0,t.jsx)("div",{className:Y().nameNotSet,children:"Contact only"}):(0,t.jsx)(t.Fragment,{children:i})}),(0,t.jsx)(h.nA,{className:`${Y().providerTableRow} ${N}`,children:Object.entries(n).sort(([e],[a])=>{let s=G.has(e)?e:"sso",t=G.has(a)?a:"sso";return Q.indexOf(s)-Q.indexOf(t)}).map(([e,a])=>{let s=Object.prototype.hasOwnProperty.call(Z,e)?Z[e]:Z.sso,o=!G.has(e);return(0,t.jsxs)(U.A,{jsxElement:(0,t.jsx)(z.I,{icon:s,height:"25",width:"25",className:Y().icon}),className:Y().providerTooltip,openTooltipClassName:Y().providerTooltipInfo,children:[o&&(0,t.jsx)("strong",{children:e}),a.map(e=>(0,t.jsx)("div",{children:e},e))]},e)})}),_&&0!==i&&e?(0,t.jsx)(h.nA,{className:N,onClick:a=>{a.stopPropagation(),f(e.id)},children:(0,t.jsx)(L.A,{actionEllipses:!0,includeArrow:!1,options:(x=[],e?.disabled?x.push({label:"Activate user",action:()=>{l(e),c()}}):x.push({label:"Deactivate user",action:()=>{l(e),d()}},{label:"Change password",action:()=>{l(e),u()}}),x.push({label:"Redact PII",action:()=>{l(e),p()}}),x),isOpen:A===i,children:(0,t.jsx)(z.I,{icon:"iconEllipses-25"})})}):(0,t.jsx)(h.nA,{className:N}),(0,t.jsx)(h.nA,{className:N,children:(0,t.jsx)(j.A,{isExpanded:w===r,toggleIsExpanded:()=>S(r),ariaLabel:"Toggle user details",...w===r&&{ariaControls:b}})}),w===r?(0,t.jsx)("div",{id:b,className:Y().expandedRow,onClick:e=>e.stopPropagation(),children:(0,t.jsx)(B,{user:e,credentials:n})}):null]})};var X=s(26765),H=s(59260),K=s(46736),ee=s.n(K);let ea=({searchResults:e,setSearchResults:a,searchResultsAreLoading:s,setSearchResultsAreLoading:n,hookForm:i,router:l})=>{let[c,m]=(0,o.useState)(null),{internalRoles:x}=(0,N.A)(),g=(0,T.v$)(x,"canPerformGeneralActions"),{isOpen:j,openM
1odal:A,closeModal:f}=(0,X.A)(),{isOpen:b,openModal:v,closeModal:S}=(0,X.A)(),{isOpen:y,openModal:C,closeModal:M}=(0,X.A)(),{isOpen:U,closeModal:O,openModal:L}=(0,X.A)(),F=async()=>{f(),await D()},V=async()=>{S(),await D()},W=async()=>{O(),await D()};(0,H.A)(b,"deactivateUser"),(0,H.A)(y,"changePassword"),(0,H.A)(U,"redactOnePII"),(0,o.useEffect)(()=>{(async()=>{let e=sessionStorage.getItem("accountSearchQuery");e&&(i.setValue("searchValue",e),await D({searchValue:e}))})()},[l.query]);let D=async e=>{try{d.A.isAuthenticated()||((0,u.G)(l.asPath),await l.push("/login")),a([]),n(!0);let s=e?.searchValue??i.getValues("searchValue"),t=`?search=${encodeURIComponent(s)}`;if(window.history.pushState({},"",t),!s)return;let o=await (0,P.b3)(s),r=new Map,c=0;for(let{email:e,user_id:a,account_id:s}of o.data.search_results??[]){let t=0===a?`zero-${c++}`:a,o=r.get(t);o||(o={userId:a,emails:new Set,accounts:new Set,credentials:{},user:null},r.set(t,o)),o.emails.add(e),o.accounts.add(s)}let h=[...r.values()].map(e=>e.userId).filter(e=>0!==e),m=B(h,100),p=[],x=[];try{let e=m.map(e=>Promise.all([(0,P.vk)(e),(0,P.C5)(e)]));for(let[a,s]of(await Promise.all(e)))p.push(...a.identities_profile??[]),x.push(...s??[])}catch(e){(0,_.qY)(e)}let w=new Map(x.map(e=>[e.user_id,e.credentials]));for(let e of p){let a=r.get(e.user_id);if(!a)continue;let s=a.emails.values().next().value;a.user=new R.A({id:e.user_id,email:e.email??s??"",dateAccepted:"",firstName:e.firstname,lastName:e.lastname,disabled:e.user_disabled,redactedTimestamp:e.redacted_timestamp,company:e.company,phone:e.phone}),a.credentials=w.get(e.user_id)??{}}a(Object.fromEntries([...r].map(([e,a])=>[e,{...a,emails:[...a.emails],accounts:[...a.accounts]}])))}catch(a){(0,_.qY)(a,!!e)}finally{n(!1)}},B=(e,a)=>Array.from({length:Math.ceil(e.length/a)},(s,t)=>e.slice(t*a,t*a+a));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("form",{onSubmit:e=>void i.handleSubmit(D)(e),children:[(0,t.jsx)(r.A,{hookForm:i,name:"searchValue",label:"User email"}),(0,t.jsx)(p.A,{type:"submit",children:"Search"})]}),(0,t.jsx)("br",{}),(0,t.jsx)("br",{}),(0,t.jsx)("h4",{children:"User Search Results"}),(0,t.jsx)(w.A,{isLoading:s,children:Object.keys(e??{}).length>0?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(h.AC,{className:ee().table,isAdminDashTable:!0,children:[(0,t.jsx)(h.A0,{children:"Email"}),(0,t.jsx)(h.A0,{children:"Account(s)"}),(0,t.jsx)(h.A0,{children:"User ID"}),(0,t.jsx)(h.A0,{children:"Credentials"}),(0,t.jsx)(h.A0,{children:"Actions"}),(0,t.jsx)(h.A0,{}),Object.entries(e).map(([e,{userId:a,emails:s,accounts:o,user:n,credentials:r}],i)=>(0,t.jsx)(J,{user:n,emails:s,accounts:o,credentials:r,index:i,userId:a,setActionUser:m,openActivationModal:A,openDeactivationModal:v,openChangePasswordModal:C,openRedactPIIModal:L,canPerformGeneralActions:g},e))]})}):(0,t.jsx)("p",{children:"No Results"})}),j&&c&&(0,t.jsx)(I.A,{closeModal:()=>{F()},user:c}),b&&c&&(0,t.jsx)(E.A,{closeModal:()=>{V()},user:c}),y&&c&&(0,t.jsx)($.A,{user:c,closeModal:M}),U&&c&&(0,t.jsx)(k.A,{user:c,closeModal:()=>{W()}})]})};var es=s(77432),et=s(88992),eo=s(89099),en=s(75846),er=s.n(en);let ei=()=>{let{internalRoles:e}=(0,N.A)(),[a,s]=(0,o.useState)([]),[n,r]=(0,o.useState)([]),[i,l]=(0,o.useState)(!1),[c,d]=(0,o.useState)("account"),h=(0,et.mN)({mode:"onBlur",defaultValues:{searchValue:""}}),m=(0,eo.useRouter)(),u={account:(0,t.jsx)(v,{searchResults:a,setSearchResults:s,searchResultsAreLoading:i,setSearchResultsAreLoading:l,hookForm:h,router:m}),user:(0,t.jsx)(ea,{searchResults:n,setSearchResults:r,searchResultsAreLoading:i,setSearchResultsAreLoading:l,hookForm:h,router:m})},p=e=>{h.reset(),s([]),r([]),d(e),sessionStorage.removeItem("accountSearchQuery"),window.history.replaceState({},"",window.location.pathname)},_="account"===c?0===a.length:0===Object.keys(n).length;return(0,t.jsx)(S.A,{internalRoles:e,children:(0,t.jsxs)("div",{className:er().searchContainer,children:[(0,t.jsxs)(M.A,{className:er().purchaseAccountCard,children:[(0,t.jsx)("div",{className:er().tabsWithNoBottomBorder,children:(0,t.jsxs)(y.A,{children:[(0,t.jsx)(C.A,{onClick:()=>p("account"),isSelected:"account"===c,children:"Account Search"}),(0,t.jsx)(C.A,{onClick:()=>p("user"),isSelected:"user"===c,children:"User Search"})]})}),u[c]]}),!i&&_&&(0,t.jsx)(es.A,{mainSearchPage:!0})]})})}},51478:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var t=s(37876),o=s(48375),n=s(96832),r=s.n(n);let i=({disabled:e,onClick:a,href:s,type:n,className:i="",children:l})=>(0,t.jsx)(o.A,{className:`${r().buttonNegative} ${i}`,attributes:{disabled:e,onClick:e?()=>{}:a,href:e?void 0:s,type:e?void 0:n},children:l})},55791:e=>{e.exports={expandedCard:"expandedUserView_expandedCard__6VfLv",nameNotSet:"expandedUserView_nameNotSet__mtOSj",userInfo:"expandedUserView_userInfo__N1Px2",userField:"expandedUserView_userField__z7OUf",expandedTitle:"expandedUserView_expandedTitle__nAA1N"}},56542:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});var t=s(37876),o=s(37314),n=s.n(o);let r=({children:e,includeExtraSpacing:a=!1})=>(0,t.jsx)("div",{className:`${n().tabsWrapper} ${a?n().extraSpacing:""}`,children:e})},66126:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var t=s(37876),o=s(48375),n=s(70827),r=s.n(n);let i=({disabled:e,onClick:a,href:s,type:n,className:i="",children:l,"aria-label":c})=>
1(0,t.jsx)(o.A,{className:`${r().buttonSecondaryDashboard} ${i}`,attributes:{disabled:e,onClick:e?()=>{}:a,href:e?void 0:s,type:e?void 0:n,"aria-label":c},children:l})},70827:e=>{e.exports={buttonSecondaryDashboard:"buttonSecondaryDashboard_buttonSecondaryDashboard__ZAhin",buttonSecondaryDashboardSmall:"buttonSecondaryDashboard_buttonSecondaryDashboardSmall__E6xBi"}},71576:e=>{e.exports={pageContent:"pageContent_pageContent__b6iCX"}},99365:(e,a,s)=>{"use strict";s.d(a,{A:()=>u});var t=s(37876),o=s(14232),n=s(66126),r=s(47185),i=s(3442),l=s(51478),c=s(11827),d=s(5400),h=s(18281),m=s.n(h);let u=({title:e,content:a,confirmButtonText:s,action:h=()=>{},cancelAction:u=()=>{},closeModal:p,isOpen:_,className:x="",btnType:w,isWarning:g=!0,isLoading:j=!1,titleIcon:A})=>{let f=(0,o.useId)(),b=w?{type:w}:{};return _?(0,t.jsx)(r.A,{action:e=>{e?.stopPropagation(),p()},ariaLabelledby:f,containerClass:`${m().confirmationModalSmartyModalContainer} ${x}`,children:(0,t.jsxs)(i.A,{className:m().confirmationModalWrapper,children:[(0,t.jsxs)("div",{className:`${m().confirmationModalTitle} ${g?m().confirmationModalTitleWarning:m().confirmationModalTitlePositive}`,id:f,children:[A&&(0,t.jsx)("span",{className:m().confirmationModalTitleIcon,children:A}),e]}),(0,t.jsx)("hr",{className:m().horizontalLine}),(0,t.jsx)("div",{className:m().confirmationModalContent,children:a}),(0,t.jsxs)("div",{className:m().confirmationModalButtonWrapper,children:[(0,t.jsx)(n.A,{className:m().button,onClick:()=>{p(),u()},children:"Cancel"}),j?(0,t.jsx)(d.A,{}):g?(0,t.jsx)(l.A,{className:m().button,...b,onClick:h,children:s}):(0,t.jsx)(c.A,{className:m().button,...b,onClick:h,disabled:j,children:s})]})]})}):null}}},e=>{e.O(0,[88992,96480,28311,75416,83845,72949,15348,54142,5894,45011,96735,85725,77432,16079,90636,46593,38792],()=>e(e.s=18873)),_N_E=e.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.