1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[84446],{1691:function(e){"use strict";let r=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);e.exports=e=>!r.has(e&&e.code)},68075:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/settings/branding",function(){return t(99597)}])},85200:function(e,r,t){"use strict";t.d(r,{DY:function(){return AdminPage},hb:function(){return a},lm:function(){return AdminPageHeading},yG:function(){return AdminPageHeader}});var n=t(85893),o=t(48641),i=t(38655);t(67294);let AdminPage=e=>{let{children:r,...t}=e;return(0,n.jsx)(o.xu,{...t,children:r})},AdminPageHeader=e=>{let{children:r,...t}=e;return(0,n.jsx)(o.Kq,{direction:"row",spacing:"4",alignItems:"flex-start",...t,children:r})},AdminPageHeading=e=>{let{children:r,...t}=e;return(0,n.jsx)(o.X6,{size:"md",...t,children:r})},a=(0,i.Gp)((e,r)=>{let{children:t,...i}=e;return(0,n.jsx)(o.xu,{marginY:"5",...i,ref:r,children:t})})},28349:function(e,r,t){"use strict";t.d(r,{d:function(){return DragAndDropImageUpload}});var n=t(82729),o=t(85893),i=t(50456),a=t(37887),s=t(48641),l=t(23887),u=t(67294),d=t(32512),c=t(69783),g=t(68295),p=t(6491),m=t(35610),x=t(47741);let DragAndDropImageUploader=e=>{let{isDragActive:r,isLoading:t,getInputProps:n,getRootProps:i,isDisabled:a,newView:l=!1,imageSizeSmall:u=!1,imageSizeLarge:d=!1,...c}=e;return(0,o.jsx)(s.M5,{bg:l?"secondary.500":"gray.50",borderRadius:"sm",borderStyle:l?"dashed":"solid",borderWidth:l?"2px":"1px",borderColor:r?l?"primary.500":"gray.300":l?"secondary.500":"gray.50",cursor:r?"add":"default",minH:"177px",...i(),...c,children:t?(0,o.jsx)(m.$,{color:"primary.500"}):(0,o.jsxs)(s.gC,{spacing:"2",children:[l&&(0,o.jsx)(s.xu,{bg:"White",color:"primary.500",px:"2",w:"40px",h:"40px",py:"1",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",children:(0,o.jsx)(p.rG2,{w:"40px",h:"40px"})}),(0,o.jsxs)(s.xv,{color:l?"textPrimary.500":"gray.500",fontWeight:"medium",children:["Drag & drop an image"," ",l?"Or":""]}),!l&&(0,o.jsx)(s.xv,{color:l?"textPrimary.500":"gray.500",textStyle:"bodyStrong",children:"or"}),(0,o.jsx)("input",{...n()}),(0,o.jsx)(x.zx,{variant:l?"ghost":"outline",colorScheme:l?"primary":"gray",_hover:{bg:l?"secondary.500":"gray.100"},size:"sm",isDisabled:a,children:"Upload New"}),u&&(0,o.jsx)(s.xv,{color:l?"textPrimary.500":"gray.500",fontSize:"sm",children:"The image size is 300px by 300px"}),d&&(0,o.jsx)(s.xv,{color:l?"textPrimary.500":"gray.500",fontSize:"sm",children:"The image size is 1600px by 600px"})]})})};function _templateObject(){let e=(0,n._)(["\n query DragAndDropImageUpload_GetDraftImageProxy(\n $getDraftImageProxyInput: GetDraftImageProxyInput!\n $dynamicImageInput: DynamicImageInput!\n ) {\n getDraftImageProxy(input: $getDraftImageProxyInput) {\n imageId\n imageProxy(input: $dynamicImageInput)\n }\n }\n"]);return _templateObject=function(){return e},e}let h=(0,i.Ps)(_templateObject()),DragAndDropImageUpload=e=>{var r,t;let{value:n,onChange:i,source:p,imageInput:m,isDisabled:x,imageProps:y,nonDraftImageProxy:E,newView:v=!1,imageSizeSmall:f=!1,imageSizeLarge:_=!1}=e,I=(0,a.a)(h,{variables:{getDraftImageProxyInput:{imageId:null!=n?n:"",source:p},dynamicImageInput:m},skip:!n}),{uploadImages:C}=(0,c.i)(p),[j,R]=u.useState(!1),{getRootProps:A,getInputProps:S,isDragActive:O}=(0,d.u)({accept:"image/*",noKeyboard:!0,multiple:!1,disabled:x,onDrop:async e=>{let[r]=e;R(!0);let t=await C([r]);R(!1),i&&i(t[0])}});return(0,o.jsxs)(s.Kq,{alignItems:"center",spacing:"4",children:[(null===(t=I.data)||void 0===t?void 0:null===(r=t.getDraftImageProxy)||void 0===r?void 0:r.imageProxy)?(0,o.jsx)(s.xu,{children:(0,o.jsx)(l.Ee,{src:I.data.getDraftImageProxy.imageProxy,alt:"",fallback:(0,o.jsx)(g.o,{borderRadius:"lg",bg:"gray.200",p:"6"}),...y})}):E?(0,o.jsx)(s.xu,{children:(0,o.jsx)(l.Ee,{src:E,alt:"",fallback:(0,o.jsx)(g.o,{borderRadius:"lg",bg:"gray.200",p:"6"}),...y})}):null,(0,o.jsx)(DragAndDropImageUploader,{isDragActive:O,getRootProps:A,getInputProps:S,isLoading:j,isDisabled:x,p:"4",w:"full",borderRadius:"lg",bg:v?"secondary.500":"gray.50",newView:v,imageSizeSmall:f,imageSizeLarge:_})]})}},39174:function(e,r,t){"use strict";t.d(r,{A:function(){return NoMatchPage}});var n=t(85893),o=t(48641),i=t(23887),a=t(47741),s=t(11163);t(67294);let NoMatchPage=()=>{let e=(0,s.useRouter)();return(0,n.jsxs)(o.gC,{p:"12",spacing:"4",textAlign:"center",children:[(0,n.jsx)(i.Ee,{src:"https://tradewing-public.s3.us-east-2.amazonaws.com/tradewing-logo.png",alt:"Tradewing",width:"50px",height:"50px"}),(0,n.jsx)(o.xv,{textStyle:"xlBodyStrong",children:"Page Not Found"}),(0,n.jsx)(o.xv,{children:"Please check that you have the correct URL and try again. If you need help finding and accessing your community, please contact [email protected]."}),(0,n.jsx)(a.zx,{onClick:()=>
1e.push("/"),children:"Return to Site"})]})}},69783:function(e,r,t){"use strict";t.d(r,{i:function(){return useImageUpload}});var n=t(82729),o=t(50456),i=t(50319),a=t(80419),s=t(69073),l=t(49517);function _templateObject(){let e=(0,n._)(["\n mutation ImageUpload_UploadImage($input: PrepImagesAtSourceInput!) {\n prepImagesAtSource(input: $input) {\n results {\n presignedS3Url\n imageFileId\n metadataHeaders {\n name\n value\n }\n }\n }\n }\n"]);return _templateObject=function(){return e},e}let u="This file exceeds the maximum size of ".concat(15," MB. Please choose an image under the size limit and try again."),isImageUploadFileTooLarge=e=>e.size>15728640,d=(0,o.Ps)(_templateObject()),useImageUpload=(e,r)=>{let t=(0,a.pm)(),[n]=(0,i.D)(d),[o,{isUploading:c,uploadProgress:g,numUploading:p}]=(0,s.w)(),uploadImages=async i=>{try{if(i.some(isImageUploadFileTooLarge)&&(null==r?void 0:r.showUploadErrorToast))return t({title:u,status:"error"}),[];let{data:a}=await n({variables:{input:{source:e,numImages:i.length}}});if(!(null==a?void 0:a.prepImagesAtSource))throw Error("Image upload prep failed");if((null==a?void 0:a.prepImagesAtSource.results.length)!==i.length)throw Error("failed to prep for image upload");let s=null==a?void 0:a.prepImagesAtSource.results.map(async(e,r)=>{let{metadataHeaders:t,presignedS3Url:n,imageFileId:a}=e,s={};return null==t||t.forEach(e=>{let{name:r,value:t}=e;r&&t&&(s[r]=t)}),await o({file:i[r],presignedS3Url:n,metadataHeaders:s}),a}),l=await Promise.all(s);return l}catch(e){return(0,l.H)(e),[]}};return{uploadImages,isUploading:c,uploadProgress:g,numUploading:p}}},69073:function(e,r,t){"use strict";t.d(r,{w:function(){return useUploadFileToS3}});var n=t(80419),o=t(9669),i=t.n(o),a=t(28662),s=t(67294),l=t(49517);let u=i().create();(0,a.ZP)(u,{retries:3,retryDelay:e=>2e3*e});let d=i().CancelToken;function useUploadFileToS3(){let e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,n.pm)(),{onUploadStart:o,onUploadComplete:a}=r,[c,g]=s.useState(!1),[p,m]=s.useState(!1),[x,h]=s.useState(void 0),[y,E]=s.useState(void 0),[v,f]=s.useState(0),resetHookState=()=>{g(!1),f(e=>e-1),m(!1),h(void 0),E(void 0),e=void 0},uploadFileToS3=async function(r){let{file:n,presignedS3Url:s,metadataHeaders:c={}}=r;try{g(!0),f(e=>e+1),h(0),null==o||o(),await u.put(s,n,{headers:{...c,"Content-Type":"Content-Type"in c?c["Content-Type"]:""},onUploadProgress:e=>{h(e.loaded/e.total*100)},cancelToken:new d(function(r){e=()=>{r(),resetHookState(),m(!0)}})}).then(()=>{resetHookState(),h(100),null==a||a()})}catch(e){if((0,l.H)(e),!i().isCancel(e))throw resetHookState(),E(e),t({title:"An error occurred while uploading your file, please try again.",status:"error",duration:null,isClosable:!0}),e}};return[uploadFileToS3,{isUploading:c,isCanceled:p,uploadProgress:x,error:y,cancelUpload:e,numUploading:v}]}},19598:function(e,r,t){"use strict";t.d(r,{Z:function(){return o}});var n=t(38655);let o=(0,n.m$)("div",{baseStyle:{borderRadius:"8px",backgroundColor:"white",shadow:"base"}})},52670:function(e,r,t){"use strict";t.d(r,{Z:function(){return n.Z}});var n=t(19598)},83781:function(e,r,t){"use strict";t.d(r,{S:function(){return ErrorBoundary},e:function(){return ErrorComponentGears}});var n=t(85893),o=t(67294),i=t(49517);let ErrorComponentGears=()=>(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"error_component_gears",children:[(0,n.jsx)("h1",{children:"Unexpected Error"}),(0,n.jsx)("h2",{children:"We are working on a fix"})]})});let ErrorBoundary=class ErrorBoundary extends o.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,r){(0,i.qS)(e,{errorInfo:r})}render(){return this.state.hasError?this.props.renderNothing?null:this.props.fallbackContent?this.props.fallbackContent:(0,n.jsx)(ErrorComponentGears,{}):this.props.children}constructor(e){super(e),this.state={hasError:!1}}}},99597:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return D}});var n=t(82729),o=t(85893),i=t(50456),a=t(50319),s=t(37887),l=t(53079),u=t(80419),d=t(48641),c=t(83234),g=t(20979),p=t(82415),m=t(47741),x=t(67294),h=t(24198),y=t(87536),E=t(85200),v=t(28349),f=t(47503),_=t(52670),I=t(69171),C=t(48076),j=t(83781),R=t(96317),A=t(6491),S=t(55750);let O=[255,255,255];function converHexToRgb(e){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return r?[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)]:null}function getLuminosity(e){let r=[];for(let[t,n]of e.entries()){let e=n/255;r[t]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]}function getContrast(e,r){let t=getLuminosity(e),n=getLuminosity(r);return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)}let AccessibilityChecker=e=>{let{hex:r,...t}=e,n=(0,S.r)(r),i=converHexToRgb(n[500]),a=converHexToRgb(n[600]),s=i?getContrast(i,O):null,l=a?getContrast(a,O):null;return s&&l?(0,o.jsx)(d.xu,{...t,children:s>3&&l>4.5?(0,o.jsxs)(d.Kq,{direction:"row",alignItems:"center",children:[(0,o.jsx)(A.rE2,{color:"green.500"}),(0,o.jsx)(d.xv,{children:"This color is AA compliant."})]}):(0,o.jsxs)(d.Kq,{direction:"row",alignItems:"center",children:[(0,o.jsx)(A.go2,{color:"red.500"}),(0,o.jsx)(d.xv,{children:"This color not AA compliant. It may be hard to read for those with visual impairments."})]})}):null};
1function _templateObject(){let e=(0,n._)(['\n mutation BrandingPageContent_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n displayName\n acronym\n primaryColor\n logo {\n _id\n imageProxy(input: { h: 80, w: 416 })\n }\n\n logoIcon {\n _id\n imageProxy(input: { h: 80, w: 80, fit: "fill", fill: "solid" })\n }\n }\n }\n }\n']);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,n._)(['\n query BrandingPage_Query {\n tenant {\n result {\n _id\n displayName\n acronym\n logo {\n _id\n imageProxy(input: { h: 80, w: 416 })\n }\n logoIcon {\n _id\n imageProxy(input: { h: 80, w: 80, fit: "fill", fill: "solid" })\n }\n primaryColor\n }\n }\n }\n']);return _templateObject1=function(){return e},e}let T=(0,i.Ps)(_templateObject()),b=(0,i.Ps)(_templateObject1()),BrandingPageContent=e=>{let r=x.useMemo(()=>{var r,t,n,o,i,a,s;return{displayName:null!==(n=e.tenant.displayName)&&void 0!==n?n:"",acronym:null!==(o=e.tenant.acronym)&&void 0!==o?o:"",primaryColor:null!==(i=e.tenant.primaryColor)&&void 0!==i?i:l.rS.colors.blue[500],logoImageId:null!==(a=null===(r=e.tenant.logo)||void 0===r?void 0:r._id)&&void 0!==a?a:"",logoIconImageId:null!==(s=null===(t=e.tenant.logoIcon)||void 0===t?void 0:t._id)&&void 0!==s?s:""}},[e.tenant]),t=(0,u.pm)(),n=["#526B87","#6D5EC5","#5E67C5","#3B65DC","#1780CC","#3593C2","#539287","#516E1A","#D27226","#3B4959","#5647B2","#4750B2","#2145AD","#236FA7","#266584","#3E7B76","#406D13","#C02B22","#2C353A","#1C0778","#111A7F","#053084","#0A4773","#2B4E5F","#30616C","#1E4422","#671F37"],i=(0,y.cI)({defaultValues:r}),[s]=(0,a.D)(T),{handleSubmit:I,reset:C,formState:{isSubmitting:R},control:A,watch:S}=i;x.useEffect(()=>{C(r)},[r,C]);let O=I(async r=>{try{await s({variables:{input:{id:e.tenant._id,data:{displayName:r.displayName,acronym:r.acronym,primaryColor:r.primaryColor,logoImageId:r.logoImageId,logoIconImageId:r.logoIconImageId}}}}),t({status:"success",description:"Successfully updated the branding."})}catch(e){t({status:"error",description:"Failed to update the branding."})}}),b=S("primaryColor");return(0,o.jsxs)(E.DY,{maxWidth:"container.md",marginX:"auto",children:[(0,o.jsx)(E.yG,{children:(0,o.jsx)(E.lm,{children:"Branding"})}),(0,o.jsx)(E.hb,{children:(0,o.jsxs)(d.Kq,{spacing:"6",children:[(0,o.jsx)(_.Z,{p:"6",children:(0,o.jsxs)(d.Kq,{spacing:"6",children:[(0,o.jsx)(y.Qr,{name:"displayName",control:A,rules:{required:"Community Name is required"},render:e=>{let{field:{onChange:r,value:t,ref:n},fieldState:{error:i}}=e;return(0,o.jsxs)(c.NI,{isInvalid:!!i,children:[(0,o.jsx)(c.lX,{children:"Community Name"}),(0,o.jsx)(g.II,{value:t,onChange:r,placeholder:"Enter a name for this Community.",ref:n}),(0,o.jsx)(c.J1,{children:null==i?void 0:i.message})]})}}),(0,o.jsx)(y.Qr,{name:"acronym",control:A,rules:{required:"Association Acronym is required"},render:e=>{let{field:{onChange:r,value:t,ref:n},fieldState:{error:i}}=e;return(0,o.jsxs)(c.NI,{isInvalid:!!i,children:[(0,o.jsx)(c.lX,{children:"Association Acronym"}),(0,o.jsx)(g.II,{value:t,onChange:r,placeholder:"Enter the acronym used for this Association.",ref:n}),(0,o.jsx)(c.J1,{children:null==i?void 0:i.message})]})}}),(0,o.jsx)(y.Qr,{name:"primaryColor",control:A,render:e=>{let{field:{onChange:r,value:t}}=e;return(0,o.jsxs)(c.NI,{children:[(0,o.jsx)(c.lX,{children:"Primary Color"}),(0,o.jsxs)(p.J2,{placement:"bottom-start",children:[(0,o.jsx)(p.xo,{children:(0,o.jsx)(m.zx,{backgroundColor:b,w:"20",_hover:{backgroundColor:b},_active:{backgroundColor:b}})}),(0,o.jsxs)(p.yk,{width:"full",sx:{".sketch-picker":{boxShadow:"none!"}},children:[(0,o.jsx)(h.xS,{width:"224px",disableAlpha:!0,presetColors:n,color:t,onChangeComplete:e=>r(e.hex)}),(0,o.jsx)(j.S,{renderNothing:!0,children:(0,o.jsx)(AccessibilityChecker,{textStyle:"compact",width:"224px",p:"10px",pt:"0",hex:b})})]})]})]})}})]})}),(0,o.jsx)(_.Z,{p:"6",children:(0,o.jsxs)(d.Kq,{spacing:"6",children:[(0,o.jsx)(d.xv,{textStyle:"xlBodyStrong",mb:"4",children:"Logo"}),(0,o.jsx)(y.Qr,{name:"logoImageId",control:A,render:r=>{var t,n;
1let{field:{onChange:i,value:a}}=r;return(0,o.jsx)(v.d,{onChange:i,value:a,"aria-label":"logo",source:f.s3.TENANT_LOGO,imageInput:{w:416,h:80},imageProps:{maxH:"10",maxW:"52",w:"auto"},nonDraftImageProxy:null!==(n=null===(t=e.tenant.logo)||void 0===t?void 0:t.imageProxy)&&void 0!==n?n:null})}}),(0,o.jsx)(d.M5,{w:"full",mt:"6",children:(0,o.jsx)(d.xv,{color:"gray.500",children:"The image size is 80px by 416px"})}),(0,o.jsx)(d.xv,{textStyle:"xlBodyStrong",mb:"4",children:"Icon Logo"}),(0,o.jsx)(y.Qr,{name:"logoIconImageId",control:A,render:r=>{var t,n;let{field:{onChange:i,value:a}}=r;return(0,o.jsx)(v.d,{onChange:i,value:a,"aria-label":"icon logo",source:f.s3.TENANT_LOGO,imageInput:{h:80,w:80,fit:"fill",fill:"solid"},imageProps:{maxH:"10",maxW:"10",w:"auto"},nonDraftImageProxy:null!==(n=null===(t=e.tenant.logoIcon)||void 0===t?void 0:t.imageProxy)&&void 0!==n?n:null})}}),(0,o.jsx)(d.M5,{w:"full",mt:"6",children:(0,o.jsx)(d.xv,{color:"gray.500",children:"The image size is 80px by 80px"})})]})}),(0,o.jsxs)(d.Ug,{children:[(0,o.jsx)(d.LZ,{}),(0,o.jsx)(m.zx,{isLoading:R,onClick:O,children:"Save"})]})]})})]})};var P=t(93064),D=(0,t(52609).z)(()=>{var e;let r=(0,s.a)(b);return(0,o.jsx)(R.C,{children:r.loading?(0,o.jsx)(I.g,{}):(null===(e=r.data)||void 0===e?void 0:e.tenant.result)?(0,o.jsx)(BrandingPageContent,{tenant:r.data.tenant.result}):(0,o.jsx)(C.S,{})})},{requiresEvery:[P.lj.ADMIN_ROLE]})},52609:function(e,r,t){"use strict";t.d(r,{z:function(){return restrictedRoute}});var n=t(85893),o=t(11163),i=t(67294),a=t(39174),s=t(63205),l=t(62893),u=t(69171),d=t(47503),c=t(45893),g=t(93064);let p=new Map([[g.lj.AUTHENTICATION,e=>{var r;return!!(null===(r=e.user)||void 0===r?void 0:r._id)}],[g.lj.ADMIN_ROLE,e=>{var r,t;return(null===(r=e.user)||void 0===r?void 0:r.role)===d.uA.ADMIN||(null===(t=e.user)||void 0===t?void 0:t.role)===d.uA.MORGOTH}],[g.lj.MORGOTH_ROLE,e=>{var r;return(null===(r=e.user)||void 0===r?void 0:r.role)===d.uA.MORGOTH}],[g.lj.COMMUNITY_ACCESS,e=>{var r;return(null==e?void 0:null===(r=e.tenant)||void 0===r?void 0:r.communityAccessConfig)===d.iX.PUBLIC?!e.user||e.user.canAccessCommunity:!!e.user&&e.user.canAccessCommunity}],[g.lj.COMMUNITY_READ_ONLY_ACCESS,e=>{var r;return!!(null===(r=e.user)||void 0===r?void 0:r.canAccessCommunityReadOnly)}],[g.lj.SPONSOR_DASHBOARD_ACCESS,e=>{var r,t;return!!(null===(t=e.user)||void 0===t?void 0:null===(r=t.rosterOrganization)||void 0===r?void 0:r.currentUserOrganizationPermission.canManageOrganizationSponsorship)}],[g.lj.SPONSOR_DIRECTORY_ACCESS,e=>{var r,t,n;switch(null===(r=e.tenant)||void 0===r?void 0:r.sponsorDirectoryAccessConfig){case d.pZ.PUBLIC:return!0;case d.pZ.LOGGED_IN_USERS:return!!(null===(t=e.user)||void 0===t?void 0:t._id);case d.pZ.HIDDEN:return!1;default:throw Error("unknown sponsorDirectoryAccessConfig: ".concat(null===(n=e.tenant)||void 0===n?void 0:n.sponsorDirectoryAccessConfig))}}],[g.lj.MEMBER_DIRECTORY_ACCESS,e=>{var r;return!!(null===(r=e.tenant)||void 0===r?void 0:r.currentUserPermissions.canAccessMemberDirectory)}],[g.lj.EVENTS_FEED_ACCESS,e=>{var r;return!!(null===(r=e.tenant)||void 0===r?void 0:r.currentUserPermissions.canAccessEventsFeed)}],[g.lj.ORGANIZATION_DASHBOARD_ACCESS,e=>{var r,t;return!!(null===(t=e.user)||void 0===t?void 0:null===(r=t.rosterOrganization)||void 0===r?void 0:r.currentUserOrganizationPermission.canManageOrganizationProfile)}],[g.lj.DM_PAGE_ACCESS,e=>{var r;return!!(null===(r=e.user)||void 0===r?void 0:r.canAccessDMPage)}],[g.lj.ORGANIZATION_MEMBERSHIP_ACCESS,e=>{var r,t;return!!(null===(t=e.user)||void 0===t?void 0:null===(r=t.rosterOrganization)||void 0===r?void 0:r.currentUserOrganizationPermission.canManageOrganizationMembership)}],[g.lj.FEATURE_FLAG_CMS,e=>{var r,t;return!!(null===(t=e.tenant)||void 0===t?void 0:null===(r=t.featureFlags)||void 0===r?void 0:r.cms)}],[g.lj.FEATURE_FLAG_CONFERENCES,e=>{var r,t;return!!(null===(t=e.tenant)||void 0===t?void 0:null===(r=t.featureFlags)||void 0===r?void 0:r.conferences)}],[g.lj.FEATURE_FLAG_WEBFLOW,e=>{var r,t;return!!(null===(t=e.tenant)||void 0===t?void 0:null===(r=t.featureFlags)||void 0===r?void 0:r.webflow)}],[g.lj.PAID_MODULE_WEBSITE_BUILDER,e=>{var r,t;return!!(null===(t=e.tenant)||void 0===t?void 0:null===(r=t.paidModules)||void 0===r?void 0:r.websiteBuilder)}]]),useRequiredPermission=e=>{let r=(0,c.x)();if(!e.requiresEvery&&!e.requiresSome)return{hasPermission:!0,loading:!1};if(r.loading)return{hasPermission:!1,loading:!0};let t=null==e||!e.requiresEvery||(null==e?void 0:e.requiresEvery.map(e=>p.get(e)).every(e=>!e||e(r))),n=null==e||!e.requiresSome||(null==e?void 0:e.requiresSome.map(e=>p.get(e)).some(e=>!!e&&e(r)));return{hasPermission:t&&n,loading:!1}},restrictedRoute=(e,r,t)=>d=>{let c=(0,o.useRouter)(),g=useRequiredPermission(r),p=(0,l.T)(),m=(0,s.U)(),x=g.loading||p.isLoading||m.loading,h=!!t&&!!t.requiresMemberManagement&&!m.isActive;return(i.useEffect(()=>{x||g.hasPermission&&!h||p.isAuthenticated||!c.isReady||c.replace({pathname:"/login",query:{redirect:c.asPath}})},[x,c,h,p.isAuthenticated,g.hasPermission]),x)?(0,n.jsx)(u.g,{}):!g.hasPermission||h?p.isAuthenticated?(0,n.jsx)(a.A,{}):(0,n.jsx)(u.g,{}):(0,n.jsx)(e,{...d})}},28662:function(e,r,t){"use strict";t.d(r,{ZP:function(){return axiosRetry}});var n=t(1691);function asyncGeneratorStep(e,r,t,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){t(e);return}s.done?r(l):Promise.resolve(l).then(n,o)}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,o){var i=e.apply(r,t);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};
1r%2?ownKeys(Object(t),!0).forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var o="axios-retry";function isNetworkError(e){return!e.response&&!!e.code&&"ECONNABORTED"!==e.code&&n(e)}var i=["get","head","options"],a=i.concat(["put","delete"]);function isRetryableError(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function isIdempotentRequestError(e){return!!e.config&&isRetryableError(e)&&-1!==a.indexOf(e.config.method)}function isNetworkOrIdempotentRequestError(e){return isNetworkError(e)||isIdempotentRequestError(e)}function noDelay(){return 0}function getCurrentState(e){var r=e[o]||{};return r.retryCount=r.retryCount||0,e[o]=r,r}function _shouldRetry(){return(_shouldRetry=_asyncToGenerator(function*(e,r,t,n){var o=t.retryCount<e&&r(n);if("object"==typeof o)try{var i=yield o;return!1!==i}catch(e){return!1}return o})).apply(this,arguments)}function axiosRetry(e,r){var t;e.interceptors.request.use(e=>(getCurrentState(e).lastRequestTime=Date.now(),e)),e.interceptors.response.use(null,(t=_asyncToGenerator(function*(t){var{config:n}=t;if(!n)return Promise.reject(t);var{retries:i=3,retryCondition:a=isNetworkOrIdempotentRequestError,retryDelay:s=noDelay,shouldResetTimeout:l=!1,onRetry:u=()=>{}}=_objectSpread(_objectSpread({},r),n[o]),d=getCurrentState(n);if(yield function(e,r,t,n){return _shouldRetry.apply(this,arguments)}(i,a,d,t)){d.retryCount+=1;var c=s(d.retryCount,t);if(e.defaults.agent===n.agent&&delete n.agent,e.defaults.httpAgent===n.httpAgent&&delete n.httpAgent,e.defaults.httpsAgent===n.httpsAgent&&delete n.httpsAgent,!l&&n.timeout&&d.lastRequestTime){var g=Date.now()-d.lastRequestTime;n.timeout=Math.max(n.timeout-g-c,1)}return n.transformRequest=[e=>e],u(d.retryCount,t,n),new Promise(r=>setTimeout(()=>r(e(n)),c))}return Promise.reject(t)}),function(e){return t.apply(this,arguments)}))}axiosRetry.isNetworkError=isNetworkError,axiosRetry.isSafeRequestError=function(e){return!!e.config&&isRetryableError(e)&&-1!==i.indexOf(e.config.method)},axiosRetry.isIdempotentRequestError=isIdempotentRequestError,axiosRetry.isNetworkOrIdempotentRequestError=isNetworkOrIdempotentRequestError,axiosRetry.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=100*Math.pow(2,e);return r+.2*r*Math.random()},axiosRetry.isRetryableError=isRetryableError}},function(e){e.O(0,[9669,32512,19702,24198,64986,96317,49774,92888,40179],function(){return e(e.s=68075)}),_N_E=e.O()}]); 2//# sourceMappingURL=branding-88aaec2813b8e50b.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.