PageSourceSearch

https://www.libertychambernc.com/assets/RobotsRedirect-CIU1CAsc.js

js libertychambernc.com collected 2026-10-04 13:34:26 UTC 136,857 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BusinessLandingLayout-C048BWuq.js","assets/index-ClmBgQw8.js","assets/loadWebsiteStyles-BHJM90_g.js","assets/getDayName-BlYa9-_H.js"])))=>i.map(i=>d[i]);
2var Qt=Object.defineProperty;var Zt=(a,o,t)=>o in a?Qt(a,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[o]=t;var i=(a,o,t)=>Zt(a,typeof o!="symbol"?o+"":o,t);import{R as N,ai as Le,aj as Be,ak as Ue,I as Te,al as tt,am as Jt,r as E,an as Xt,ao as es,ap as ts,aq as ss,j as e,Q as _e,ar as as,H as L,as as Ve,at as rs,au as Ot,av as le,n as F,aw as ns,ax as is,ay as os,L as re,az as R,z as se,aA as ls,aB as ds,aC as cs,g as hs,aD as us,aE as ms,aF as B,aG as ps,aH as Re,D as Ie,aI as st,aJ as at,a0 as Ke,aK as mt,aL as He,aM as H,aN as K,aO as G,aP as Ge,aQ as Ye,a1 as Qe,aR as Ze,aS as Je,Z as Xe,J as y,K as x,ag as rt,aT as gs,aU as pt,O as gt,aV as ft,aW as fs,W as Dt,aX as bs,aY as xs,aZ as vs,a_ as de,a$ as ce,b0 as he,a8 as Ft,b1 as ys,b2 as js,b3 as be,b4 as xe,b5 as ve,b6 as O,b7 as k,b8 as W,b9 as fe,ba as A,bb as ge,bc as ye,bd as nt,be as ke,bf as Ss,bg as Cs,bh as bt,_ as Is,bi as Ts,bj as xt,bk as Lt,bl as Ae,bm as te,bn as V,bo as Ee,a6 as vt,bp as ks,bq as it,br as Bt,bs as Ut,bt as Ht,bu as Me,bv as Wt,bw as Ns,bx as $t,by as Ps,bz as ws,bA as Rs,ac as As,bB as yt,bC as Es,bD as ot,bE as qt,bF as Ms,bG as Oe,bH as De,bI as Os,bJ as Ds,bK as Fs,bL as Ls,bM as Bs,bN as We,bO as jt,bP as Us,G as Hs,bQ as Ws,bR as $s,bS as St,bT as qs,bU as zs,bV as _s,bW as Vs,bX as Ks,bY as Gs,af as Ys}from"./index-ClmBgQw8.js";import{g as Qs,M as Zs,T as Js,W as Xs,a as ea,F as ta,S as sa,b as aa}from"./getDayName-BlYa9-_H.js";const ra="Facebook",na="Twitter",ia="LinkedIn",oa="Instagram",la="Threads",da="Youtube",ca="TikTok",ie={FACEBOOK:ra,TWITTER:na,LINKEDIN:ia,INSTAGRAM:oa,THREADS:la,YOUTUBE:da,TIKTOK:ca},ha="CUST",ua="PROD",ma="MEMB",pa="MEMBLEVEL",ga="COMP",fa="INVC",ba="SERV",xa="PAYM",va="EVENT",ya="EVENTREG",ja="SPON",Sa="SPONLEVEL",Ca="DEPO",Ia="DONA",Ta="JE",_={CUSTOMER:ha,PRODUCT:ua,MEMBERSHIP:ma,MEMBERSHIPLEVEL:pa,COMPANY:ga,INVOICE:fa,SERVICE:ba,PAYMENT:xa,EVENT:va,EVENTREG:ya,SPONSORSHIP:ja,SPONSORSHIPLEVEL:Sa,DEPOSIT:Ca,DONATION:Ia,JOURNALENTRY:Ta},ka="ALL",Na="ONLYDEPOSITS",Ct={ALL:ka,ONLYDEPOSITS:Na},Ce="PUBLISHED",Pa="UNPUBLISHED",wa="CREATE",It="UPDATE",Fr="OPEN",Lr="REDEEMED",Br="VOIDED",Ur="EXPIRED",Ra="POST",Hr="KBARTICLE";var Aa=["bsPrefix","className","as"],zt=N.forwardRef(function(a,o){var t=a.bsPrefix,s=a.className,r=a.as,n=Le(a,Aa);t=Be(t,"navbar-brand");var l=r||(n.href?"a":"span");return N.createElement(l,Ue({},n,{ref:o,className:Te(s,t)}))});zt.displayName="NavbarBrand";var Ea=["children","bsPrefix"],_t=N.forwardRef(function(a,o){var t=a.children,s=a.bsPrefix,r=Le(a,Ea);return s=Be(s,"navbar-collapse"),N.createElement(tt.Consumer,null,function(n){return N.createElement(Jt,Ue({in:!!(n&&n.expanded)},r),N.createElement("div",{ref:o,className:s},t))})});_t.displayName="NavbarCollapse";var Ma=["bsPrefix","className","children","label","as","onClick"],Oa={label:"Toggle navigation"},lt=N.forwardRef(function(a,o){var t=a.bsPrefix,s=a.className,r=a.children,n=a.label,l=a.as,d=l===void 0?"button":l,p=a.onClick,m=Le(a,Ma);t=Be(t,"navbar-toggler");var c=E.useContext(tt)||{},b=c.onToggle,u=c.expanded,C=Xt(function(I){p&&p(I),b&&b()});return d==="button"&&(m.type="button"),N.createElement(d,Ue({},m,{ref:o,onClick:C,"aria-label":n,className:Te(s,t,!u&&"collapsed")}),r||N.createElement("span",{className:t+"-icon"}))});lt.displayName="NavbarToggle";lt.defaultProps=Oa;var Da=["bsPrefix","expand","variant","bg","fixed","sticky","className","children","as","expanded","onToggle","onSelect","collapseOnSelect"],Fa=es("navbar-text",{Component:"span"}),La={expand:!0,variant:"light",collapseOnSelect:!1},$=N.forwardRef(function(a,o){var t=ts(a,{expanded:"onToggle"}),s=t.bsPrefix,r=t.expand,n=t.variant,l=t.bg,d=t.fixed,p=t.sticky,m=t.className,c=t.children,b=t.as,u=b===void 0?"nav":b,C=t.expanded,I=t.onToggle,P=t.onSelect,S=t.collapseOnSelect,h=Le(t,Da),g=Be(s,"navbar"),v=E.useCallback(function(){P&&P.apply(void 0,arguments),S&&C&&I&&I(!1)},[P,S,C,I]);h.role===void 0&&u!=="nav"&&(h.role="navigation");var f=g+"-expand";typeof r=="string"&&(f=f+"-"+r);var j=E.useMemo(function(){return{onToggle:function(){return I&&I(!C)},bsPrefix:g,expanded:!!C}},[g,C,I]);return N.createElement(tt.Provider,{value:j},N.createElement(ss.Provider,{value:v},N.createElement(u,Ue({ref:o},h,{className:Te(m,g,r&&f,n&&g+"-"+n,l&&"bg-"+l,p&&"sticky-"+p,d&&"fixed-"+d)}),c)))});$.defaultProps=La;$.displayName="Navbar";$.Brand=zt;$.Toggle=lt;$.Collapse=_t;$.Text=Fa;const Wr=({message:a})=>e.jsx("span",{className:"remark-message",children:a}),Ba=a=>a.linkToExternalPage||a.linkToAnotherPage,Vt=a=>{const{linkToExternalPage:o,anotherPageOption:t,externalUrl:s,internalUrl:r,option:n,url:l,formId:d,subOption:p,openNewPage:m}=a;if(!Ba(a))return null;const c=n||t||(o?"externalPage":null),b={url:"",isInternal:!1,option:c,openNewPage:m??!0,customDataAttributes:{}};switch(c){case"externalPage":b.url=l||s,b.url=_e(b.url);break;case"internalPage":b.url=l||r,b.isInternal=!0,b.customDataAttributes={"data-internal-page-id":b.url,"data-option":"internalPage","data-url":b.url};break;case"publishedForm":b.url="#",b.customDataAttributes={"data-formid":d,"data-option":"publishedForm"};break;case"eventLanding":b.url=l,b.customDataAttributes={"data-option":"eventLanding","data-url":b.url};break;case"eventRegistration":b.url=l,b.customDataAttributes={"data-option":"eventRegistration","data-sub-option":p,"data-url":b.url};break;default:o&&(b.url=_e(s));break}return b},Ua=(a,o,t=!0)=>{const s=`${as}?standaloneContentTypeCode=${a}&entityKey=${o}`;return t?`${window.location.protocol}//${window.env.PSX_WEBSITE_HOST}${s}`:s},Ha=a=>a.includes("://")||a.startsWith("//")?!1:/^\/[A-Za-z0-9\-._~!$&'()*+,;=:@%]*((\/[A-Za-z0-9\-._~!$&'()*+,;=:@%]*)*)?$/.test(a),$e=a=>(a==null?void 0:a.length)>1&&a.endsWith("/")?a.slice(0,-1):a,Kt=(a,o,t,s="")=>{var l;const r=$e(s+o.path),n=$e(t);return o.id!==a&&(r===n||(l=o.redirectSlugs)!=null&&l.some(d=>$e(d)===n))?!0:o.hasSubPages?o.pages.some(d=>Kt(a,d,t,o.path)):!1}
2,$r=(a,o,t,s,r=0,n=0)=>{if(!o)return s;const{subTotal:l,taxableSubtotal:d}=a.filter(c=>!c.removed).reduce((c,b)=>{const u=b.upgradeCostAmt??b.costAmt;return c.subTotal+=u,b.isTaxable&&(c.taxableSubtotal+=u),c},{subTotal:0,taxableSubtotal:0}),p=l>0?r*(d/l):0,m=Math.max(0,d-p)+n;return Math.round(m*((t||0)/100)*100)/100},qr=(a,o,t,s,r,n,l,d,p)=>{if(!a)return 0;const m=r.filter(c=>!c.removed).reduce((c,b)=>c+(b.upgradeCostAmt??b.costAmt),0)-n+l+p+s-d;return m<t?0:parseFloat((m*(o/100)).toFixed(2))},zr=(a,o,t,s,r,n,l)=>a.filter(p=>!p.removed).reduce((p,m)=>p+(m.upgradeCostAmt??m.costAmt),0)-s+r+l+t-n+o,Wa=a=>{const o=s=>e.jsxs("div",{className:"d-flex align-items-center",children:[s.type==="card"&&e.jsx("img",{src:`/images/stripe/${s.brand}.png`,alt:"payment-method"}),s.type==="us_bank_account"&&e.jsx("img",{src:"/images/stripe/bank.png",alt:"payment-method"})," ",e.jsx("span",{className:"ml-2",children:" •••• "}),e.jsxs("span",{className:`ml-1 ${s.selected?"text-bold":""}`,children:[s.last4,s.expMonth&&s.expYear&&` (${s.expMonth}/${s.expYear})`]}),s.default&&e.jsx(Ve,{variant:"primary",className:"ml-1 mt-1",children:"Default"})]}),t=s=>{const r=[{text:" Delete",icon:rs,onClick:()=>{a.onDetach&&a.onDetach(s)}},...s.default?[]:[{text:" Set as Default",icon:Ot,onClick:()=>{a.onDefault&&a.onDefault(s.id)}}]];return e.jsxs(le,{drop:"down",children:[e.jsx(le.Toggle,{className:"h-100",variant:"light",disabled:a.disabled}),e.jsx(le.Menu,{children:r.map((n,l)=>e.jsx(le.Item,{onClick:n.onClick,children:e.jsxs("span",{children:[n.icon&&e.jsx(F,{icon:n.icon,className:"mr-1"}),n.text]})},`${s.id}_${l}_option`))})]},`${s.id}_dropdown`)};return e.jsxs("div",{children:[a.paymentMethods.length===0&&e.jsx("span",{children:"No payment methods."}),a.paymentMethods.length>0&&a.paymentMethods.map(s=>e.jsxs("div",{style:{border:`${s.selected?"2px solid":"2px"}`},className:`d-flex align-items-stretch shadow-sm mt-3 rounded ${s.selected?"border-success shadow-sm":""}`,children:[e.jsx(L,{"data-testid":`btn-stripePaymentMethods-${s}`,variant:"light",className:"w-100 text-left",disabled:a.disabled,onClick:()=>a.onSelect&&a.onSelect(s.id),children:o(s)},s.id),a.enableOptions&&t(s)]},`payment_${s.id}`))]})},$a=a=>{const o=ns(),t=is(),[s,r]=E.useState(!1),n=async l=>{if(l.preventDefault(),!o||!t)return;r(!0);const{error:d}=await t.submit();if(d){r(!1),R(d.message);return}const{setupIntent:p,error:m}=await o.confirmSetup({elements:t,clientSecret:a.clientSecret,redirect:"if_required",confirmParams:{return_url:a.returnUrl??window.location.href}});if(m){r(!1),R(m.message);return}p&&(se("Payment method Added Successfully."),a.onConfirm&&a.onConfirm(p))};return e.jsxs("form",{onSubmit:n,children:[e.jsx(os,{onReady:l=>{l.focus()}}),e.jsxs(L,{disabled:s||!o||!t,variant:"primary",type:"submit",className:"mt-2 w-100 text-bold","data-testid":"btn-stripeSetupIntent",children:[!s&&e.jsx("div",{className:"py-1 total-amount",children:"Add"}),s&&e.jsx(re,{})]})]})},qa=a=>{const o=ls(a.stripePublishableKey,{stripeAccount:a.stripeAccountId}),t={clientSecret:a.clientSecret},s=r=>{a.onConfirm&&a.onConfirm(r)};return e.jsxs(e.Fragment,{children:[e.jsx(ds,{stripe:o,options:t,children:e.jsx($a,{clientSecret:a.clientSecret,onConfirm:s})}),e.jsx("div",{className:"d-flex justify-content-center",children:e.jsx("img",{src:"/images/powered-by-stripe.svg",alt:"stripe-logo",style:{height:"3em",marginTop:"1rem"}})})]})},_r=a=>({type:cs,flag:a}),Vr="layout-top-nav",Kr="content-wrapper",Gr="suppress-sidebar",Yr="knowledge-base-category-summary",Qr="sidebar-collapse",Zr=992;var Gt={},za=a=>encodeURIComponent(a).replace(/[!'()*]/g,o=>`%${o.charCodeAt(0).toString(16).toUpperCase()}`),Yt="%[a-f0-9]{2}",Tt=new RegExp("("+Yt+")|([^%]+?)","gi"),kt=new RegExp("("+Yt+")+","gi");function et(a,o){try{return[decodeURIComponent(a.join(""))]}catch{}if(a.length===1)return a;o=o||1;var t=a.slice(0,o),s=a.slice(o);return Array.prototype.concat.call([],et(t),et(s))}function _a(a){try{return decodeURIComponent(a)}catch{for(var o=a.match(Tt)||[],t=1;t<o.length;t++)a=et(o,t).join(""),o=a.match(Tt)||[];return a}}function Va(a){for(var o={"%FE%FF":"��","%FF%FE":"��"},t=kt.exec(a);t;){try{o[t[0]]=decodeURIComponent(t[0])}catch{var s=_a(t[0]);s!==t[0]&&(o[t[0]]=s)}t=kt.exec(a)}o["%C2"]="�";for(var r=Object.keys(o),n=0;n<r.length;n++){var l=r[n];a=a.replace(new RegExp(l,"g"),o[l])}return a}
2var Ka=function(a){if(typeof a!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof a+"`");try{return a=a.replace(/\+/g," "),decodeURIComponent(a)}catch{return Va(a)}},Ga=(a,o)=>{if(!(typeof a=="string"&&typeof o=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(o==="")return[a];const t=a.indexOf(o);return t===-1?[a]:[a.slice(0,t),a.slice(t+o.length)]},Ya=function(a,o){for(var t={},s=Object.keys(a),r=Array.isArray(o),n=0;n<s.length;n++){var l=s[n],d=a[l];(r?o.indexOf(l)!==-1:o(l,d,a))&&(t[l]=d)}return t};(function(a){const o=za,t=Ka,s=Ga,r=Ya,n=h=>h==null;function l(h){switch(h.arrayFormat){case"index":return g=>(v,f)=>{const j=v.length;return f===void 0||h.skipNull&&f===null||h.skipEmptyString&&f===""?v:f===null?[...v,[m(g,h),"[",j,"]"].join("")]:[...v,[m(g,h),"[",m(j,h),"]=",m(f,h)].join("")]};case"bracket":return g=>(v,f)=>f===void 0||h.skipNull&&f===null||h.skipEmptyString&&f===""?v:f===null?[...v,[m(g,h),"[]"].join("")]:[...v,[m(g,h),"[]=",m(f,h)].join("")];case"comma":case"separator":return g=>(v,f)=>f==null||f.length===0?v:v.length===0?[[m(g,h),"=",m(f,h)].join("")]:[[v,m(f,h)].join(h.arrayFormatSeparator)];default:return g=>(v,f)=>f===void 0||h.skipNull&&f===null||h.skipEmptyString&&f===""?v:f===null?[...v,m(g,h)]:[...v,[m(g,h),"=",m(f,h)].join("")]}}function d(h){let g;switch(h.arrayFormat){case"index":return(v,f,j)=>{if(g=/\[(\d*)\]$/.exec(v),v=v.replace(/\[\d*\]$/,""),!g){j[v]=f;return}j[v]===void 0&&(j[v]={}),j[v][g[1]]=f};case"bracket":return(v,f,j)=>{if(g=/(\[\])$/.exec(v),v=v.replace(/\[\]$/,""),!g){j[v]=f;return}if(j[v]===void 0){j[v]=[f];return}j[v]=[].concat(j[v],f)};case"comma":case"separator":return(v,f,j)=>{const w=typeof f=="string"&&f.includes(h.arrayFormatSeparator),T=typeof f=="string"&&!w&&c(f,h).includes(h.arrayFormatSeparator);f=T?c(f,h):f;const q=w||T?f.split(h.arrayFormatSeparator).map(M=>c(M,h)):f===null?f:c(f,h);j[v]=q};default:return(v,f,j)=>{if(j[v]===void 0){j[v]=f;return}j[v]=[].concat(j[v],f)}}}function p(h){if(typeof h!="string"||h.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function m(h,g){return g.encode?g.strict?o(h):encodeURIComponent(h):h}function c(h,g){return g.decode?t(h):h}function b(h){return Array.isArray(h)?h.sort():typeof h=="object"?b(Object.keys(h)).sort((g,v)=>Number(g)-Number(v)).map(g=>h[g]):h}function u(h){const g=h.indexOf("#");return g!==-1&&(h=h.slice(0,g)),h}function C(h){let g="";const v=h.indexOf("#");return v!==-1&&(g=h.slice(v)),g}function I(h){h=u(h);const g=h.indexOf("?");return g===-1?"":h.slice(g+1)}function P(h,g){return g.parseNumbers&&!Number.isNaN(Number(h))&&typeof h=="string"&&h.trim()!==""?h=Number(h):g.parseBooleans&&h!==null&&(h.toLowerCase()==="true"||h.toLowerCase()==="false")&&(h=h.toLowerCase()==="true"),h}function S(h,g){g=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},g),p(g.arrayFormatSeparator);const v=d(g),f=Object.create(null);if(typeof h!="string"||(h=h.trim().replace(/^[?#&]/,""),!h))return f;for(const j of h.split("&")){if(j==="")continue;let[w,T]=s(g.decode?j.replace(/\+/g," "):j,"=");T=T===void 0?null:["comma","separator"].includes(g.arrayFormat)?T:c(T,g),v(c(w,g),T,f)}for(const j of Object.keys(f)){const w=f[j];if(typeof w=="object"&&w!==null)for(const T of Object.keys(w))w[T]=P(w[T],g);else f[j]=P(w,g)}return g.sort===!1?f:(g.sort===!0?Object.keys(f).sort():Object.keys(f).sort(g.sort)).reduce((j,w)=>{const T=f[w];return T&&typeof T=="object"&&!Array.isArray(T)?j[w]=b(T):j[w]=T,j},Object.create(null))}a.extract=I,a.parse=S,a.stringify=(h,g)=>{if(!h)return"";g=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},g),p(g.arrayFormatSeparator);const v=T=>g.skipNull&&n(h[T])||g.skipEmptyString&&h[T]==="",f=l(g),j={};for(const T of Object.keys(h))v(T)||(j[T]=h[T]);const w=Object.keys(j);return g.sort!==!1&&w.sort(g.sort),w.map(T=>{const q=h[T];return q===void 0?"":q===null?m(T,g):Array.isArray(q)?q.reduce(f(T),[]).join("&"):m(T,g)+"="+m(q,g)}).filter(T=>T.length>0).join("&")},a.parseUrl=(h,g)=>
2{g=Object.assign({decode:!0},g);const[v,f]=s(h,"#");return Object.assign({url:v.split("?")[0]||"",query:S(I(h),g)},g&&g.parseFragmentIdentifier&&f?{fragmentIdentifier:c(f,g)}:{})},a.stringifyUrl=(h,g)=>{g=Object.assign({encode:!0,strict:!0},g);const v=u(h.url).split("?")[0]||"",f=a.extract(h.url),j=a.parse(f,{sort:!1}),w=Object.assign(j,h.query);let T=a.stringify(w,g);T&&(T=`?${T}`);let q=C(h.url);return h.fragmentIdentifier&&(q=`#${m(h.fragmentIdentifier,g)}`),`${v}${T}${q}`},a.pick=(h,g,v)=>{v=Object.assign({parseFragmentIdentifier:!0},v);const{url:f,query:j,fragmentIdentifier:w}=a.parseUrl(h,v);return a.stringifyUrl({url:f,query:r(j,g),fragmentIdentifier:w},v)},a.exclude=(h,g,v)=>{const f=Array.isArray(g)?j=>!g.includes(j):(j,w)=>!g(j,w);return a.pick(h,f,v)}})(Gt);const Jr=hs(Gt),Xr=(a,o,t,s=!1)=>{us.raw(a,o,{success:r=>{var n;(n=r.data)!=null&&n.massReportNeeded&&ms(`The report you are trying to generate is too big. It will be generated in the background and sent to your email (${r.data.massReportRecipientEmail})`),t&&t.success&&t.success(r)},error:r=>{t&&t.error?t.error(r):R(r.error.errorMessage)}},{block:!0,includeToken:!0,downloadFile:s})},en=()=>B().qboIntegration&&B().qboAuthorized,tn=a=>B().qboSyncCode===Ct.ALL||B().qboSyncCode===Ct.ONLYDEPOSITS&&(a===_.DEPOSIT||a===_.PRODUCT||a===_.SERVICE||a===_.MEMBERSHIP||a===_.MEMBERSHIPLEVEL||a===_.SPONSORSHIP||a===_.SPONSORSHIPLEVEL||a===_.EVENT||a===_.EVENTREG||a===_.DONATION||a===_.JOURNALENTRY),sn=()=>B().qboSyncCode,Qa=(a,o,t="")=>{for(let s=0;s<a.length;s++){const r=a[s];if(t+r.path===o)return r;if(r.pages.length>0){const l=Qa(r.pages,o,r.path);if(l)return l}}return null},Za=(a,o)=>{const t=String(o);for(let s=0;s<a.length;s++){const r=a[s];if(String(r.id)===t)return r;if(r.pages.length>0){const n=Za(r.pages,o);if(n)return n}}return null},an="FAQ",rn="HEADERBANNER",nn="FULLWIDTH",on="TWOCOLUMNS",ln="THREECOLUMNSWITHIMAGES",dn="FOURCOLUMNSWITHIMAGES",cn="TESTIMONIALSSECTION",hn="EVENTS",un="MEMBERSHIPDIRECTORY",mn="SPONSORSHIPDIRECTORY",pn="POSTS",gn="TEAMMEMBERS",fn="WEBBLOCK",bn="MULTIIMAGE",xn="COMMUNITYLOGOS",vn="COLUMNS",yn="IMAGEGALLERY",jn="IMAGESCROLL",Sn="CUSTOMBLOCK",Cn="PDFFLIPBOOK",In="HEROWITHBLOCKSANDIMAGES",Tn="CUSTOMERDIRECTORY",kn="PRODUCTOFFERING",Nn="EVENTSHIGHLIGHT",Pn="LINESEPARATOR",wn="HEROBANNER",Rn="EVENTTICKER",Ja=({name:a,children:o,className:t="mega-menu",onClose:s})=>{const[r,n]=E.useState(!1),l=E.useRef(null),d=()=>{l.current&&(clearTimeout(l.current),l.current=null),n(!0)},p=()=>{l.current=setTimeout(()=>n(!1),150)},m=()=>{n(!1),typeof s=="function"&&s()};return e.jsx(ps,{title:a,as:"div",className:t,show:r,onMouseEnter:d,onMouseLeave:p,children:o(m)})},Xa=(a,o)=>{const t=Vt(a);return t?t.option==="externalPage"?e.jsx("a",{className:"nav-link quick-link-button",style:{cursor:"pointer"},target:t.openNewPage?"_blank":"_self",rel:"noopener noreferrer",href:t.url,children:a.name}):e.jsx("a",{className:"quick-link-button nav-link",href:t.url||a.path,...t.customDataAttributes,...t.openNewPage&&{target:"_blank"},onClick:o,children:a.name},a.path):e.jsx(st,{className:"quick-link-button nav-link",to:a.path,onClick:o,children:a.name},a.path)},Q=({brandName:a,width:o,onToggleMenu:t})=>a?e.jsx(Re,{to:"/",className:o<441?"brand-name-in-menu":"",children:e.jsx($.Brand,{as:"a",className:"text-decoration-none",href:"#",onClick:o<441?t:null,children:a})}):null,Nt=(a,o)=>e.jsx("img",{className:o?"tenantWebsite-navbar-logo clickable":"tenantWebsite-navbar-logo-alone clickable",alt:at()||"Header Thumbnail",src:a}),Z=({brandName:a,logoInfo:o,logoData:t,redirectLogoToOtherURL:s,redirectLogoURL:r})=>{if(!t&&!(o!=null&&o.isValid))return null;let n=null;return o?n=Ie({storageKey:o.avatarStorageKey}):t&&(n=t),s&&r?e.jsx("a",{href:_e(r),target:"_blank",rel:"noopener noreferrer",children:Nt(n,a)}):e.jsx(st,{to:"/",children:Nt(n,a)})}
2,oe=({key:a,href:o,icon:t,ariaLabel:s,onToggleMenu:r})=>!o||!t?null:e.jsx("a",{className:"socials-icon",href:o,target:"_blank","aria-label":s,rel:"noopener noreferrer",onClick:r,children:e.jsx(F,{icon:t})},a),ne=({facebookSet:a,facebook:o,twitterSet:t,twitter:s,instagramSet:r,instagram:n,linkedInSet:l,linkedIn:d,threadsSet:p,threads:m,youtubeSet:c,youtube:b,tikTokSet:u,tikTok:C,onToggleMenu:I})=>{const P=at();return e.jsxs(e.Fragment,{children:[a&&o&&oe({key:"facebook",href:`https://www.facebook.com/${o}`,icon:Ge,ariaLabel:`${P} on Facebook`,onToggleMenu:I}),t&&s&&oe({key:"twitter",href:`https://www.twitter.com/${s}`,icon:Ye,ariaLabel:`${P} on X`,onToggleMenu:I}),r&&n&&oe({key:"instagram",href:`https://www.instagram.com/${n}`,icon:Qe,ariaLabel:`${P} on Instagram`,onToggleMenu:I}),l&&d&&oe({key:"linkedIn",href:d.startsWith("http")?d:d.includes("/")?`https://www.linkedin.com/${d}`:`https://www.linkedin.com/in/${d}`,icon:Ke,ariaLabel:`${P} on LinkedIn`,onToggleMenu:I}),p&&m&&oe({key:"threads",href:`https://www.threads.net/${m}`,icon:Ze,ariaLabel:`${P} on Threads`,onToggleMenu:I}),c&&b&&oe({key:"youtube",href:`https://www.youtube.com/${b}`,icon:Je,ariaLabel:`${P} on Youtube`,onToggleMenu:I}),u&&C&&oe({key:"tiktok",href:`https://www.tiktok.com/@${C}`,icon:Xe,ariaLabel:`${P} on TikTok`,onToggleMenu:I})]})},ae=({path:a,name:o,parentRoute:t,rootParentRoute:s,forceMainPathUrl:r,isMemberPortal:n,hasPages:l,onOpenCustomerPortal:d,collapseHeaderOnClick:p,onToggleMenu:m,closeMegaMenu:c,...b})=>{let u;n&&(u=d),p&&(u=()=>{c==null||c(),m==null||m()});const C=Vt(b);if(l)return e.jsx("span",{children:o});if((C==null?void 0:C.option)==="externalPage")return e.jsx("div",{className:"nav-item external-link",children:e.jsx("a",{className:"nav-link text-center",style:{cursor:"pointer"},href:C.url,target:C.openNewPage?"_blank":"_self",rel:"noopener noreferrer",onClick:P=>{P.stopPropagation()},children:o})},a);let I;return C?I=C.url:!t||r?I=a:s?I=`${s.path}${t.path}${a}`:I=`${t.path}${a}`,!I||typeof I!="string"?null:C?t?e.jsx("a",{href:"#",...C.customDataAttributes,...C.openNewPage&&{target:"_blank"},children:o}):e.jsx("div",{className:"nav-item",children:e.jsx("a",{className:"nav-link text-center",href:I,style:{cursor:"pointer"},...C.customDataAttributes,...C.openNewPage&&{target:"_blank"},children:o})}):e.jsx(Re,{activeClassName:"nav-link-active",to:I,onClick:u,children:t?e.jsx("a",{href:"#",children:o}):e.jsx("div",{className:"nav-item",children:e.jsx("a",{className:"nav-link text-center",href:I,style:{cursor:"pointer"},children:o})})},a)},er=({pages:a,parentRoute:o,onOpenCustomerPortal:t,onToggleMenu:s,closeMegaMenu:r})=>e.jsxs(y,{className:"mega-menu-content justify-content-center d-flex",children:[o.navImage&&e.jsx("div",{className:"flex-grow-0",children:e.jsx("img",{alt:o.name,src:Ie({storageKey:o.navImage}),className:"nav-image"})}),e.jsx(y,{className:`mega-menu-links-container g-3 ${o.navImage?"justify-content-start":"justify-content-center"}`,children:a.filter(n=>n.active).map(n=>{var l;return e.jsxs(x,{className:"mega-menu-column",children:[e.jsx("div",{className:"mega-menu-category",children:ae({...n,parentRoute:o,hasPages:((l=n.pages)==null?void 0:l.length)>0,collapseHeaderOnClick:!0,onOpenCustomerPortal:t,onToggleMenu:s,closeMegaMenu:r})}),n.pages.length>0&&e.jsx("ul",{className:"mega-menu-sublist",children:n.pages.filter(d=>d.active).map(d=>e.jsx("li",{className:"mega-menu-subitem",children:ae({...d,parentRoute:n,rootParentRoute:o,collapseHeaderOnClick:!0,onOpenCustomerPortal:t,onToggleMenu:s,closeMegaMenu:r})},d.id||d.path))})]},n.id||n.path)})})]}),dt=a=>{const{id:o,path:t,name:s,pages:r,hasContent:n,history:l,isMemberPortal:d,collapseHeaderOnClick:p,onOpenCustomerPortal:m,onToggleMenu:c,megaMenu:b}=a;return d?e.jsxs("div",{className:"dropdown nav-item",children:[e.jsxs(st,{className:"dropdown-button nav-link",to:t,onClick:m,children:[s,e.jsx(F,{icon:mt,className:"margin-left-5"})]}),e.jsx("div",{className:"dropdown-content",children:r.filter(u=>u.active).map(u=>ae({path:u.path,name:u.name,linkToExternalPage:u.linkToExternalPage,linkToAnotherPage:u.linkToAnotherPage,anotherPageOption:u.anotherPageOption,externalUrl:u.externalUrl,internalUrl:u.internalUrl,option:u.option,url:u.url,formId:u.formId,eventId:u.eventId,subOption:u.subOption,openNewPage:u.openNewPage,forceMainPathUrl:u.forceMainPathUrl,isMemberPortal:u.isMemberPortal,parentRoute:a,collapseHeaderOnClick:p,onOpenCustomerPortal:m,onToggleMenu:c}))})]},o):b?e.jsx(Ja,{name:s,className:"mega-menu",children:u=>er({pages:r,parentRoute:a,collapseHeaderOnClick:p,onOpenCustomerPortal:m,onToggleMenu:c,closeMegaMenu:u})}):e.jsxs(le,{className:"dropdown nav-item",drop:"down",onToggle:u=>{u&&n&&(l==null||l.push(t))}
2,children:[e.jsx(le.Toggle,{className:"dropdown-button nav-link",children:s}),e.jsx(le.Menu,{className:"dropdown-menu text-center",children:e.jsx("div",{className:"dropdown-content",children:e.jsx(He,{alwaysOpen:!0,defaultActiveKey:r.map((u,C)=>C.toString()),children:r.filter(u=>u.active).map((u,C)=>{const I=u.pages&&u.pages.length>0,P=C.toString();return e.jsx("div",{children:I?e.jsxs(e.Fragment,{children:[e.jsxs(He.Toggle,{as:"div",eventKey:P,className:"nav-link accordion-link cursor-pointer",children:[u.name,e.jsx(F,{icon:mt,className:"ml-3"})]}),e.jsx(He.Collapse,{eventKey:P,children:e.jsx("div",{className:"accordion-child",children:u.pages.filter(S=>S.active).map(S=>ae({path:S.path,name:S.name,linkToExternalPage:S.linkToExternalPage,linkToAnotherPage:S.linkToAnotherPage,anotherPageOption:S.anotherPageOption,externalUrl:S.externalUrl,internalUrl:S.internalUrl,option:S.option,url:S.url,formId:S.formId,eventId:S.eventId,subOption:S.subOption,openNewPage:S.openNewPage,forceMainPathUrl:S.forceMainPathUrl,isMemberPortal:S.isMemberPortal,parentRoute:u,rootParentRoute:a,collapseHeaderOnClick:a.collapseHeaderOnClick,onOpenCustomerPortal:a.onOpenCustomerPortal,onToggleMenu:a.onToggleMenu}))})})]}):ae({path:u.path,name:u.name,linkToExternalPage:u.linkToExternalPage,linkToAnotherPage:u.linkToAnotherPage,anotherPageOption:u.anotherPageOption,externalUrl:u.externalUrl,internalUrl:u.internalUrl,option:u.option,url:u.url,formId:u.formId,eventId:u.eventId,subOption:u.subOption,openNewPage:u.openNewPage,forceMainPathUrl:u.forceMainPathUrl,isMemberPortal:u.isMemberPortal,parentRoute:a,collapseHeaderOnClick:a.collapseHeaderOnClick,onOpenCustomerPortal:a.onOpenCustomerPortal,onToggleMenu:a.onToggleMenu})},u.name)})})})})]},o)},J=({routes:a,collapseHeaderOnClick:o,history:t,onOpenCustomerPortal:s,onToggleMenu:r,megaMenu:n})=>a?a.map(l=>l.visibility==="member"||!l.active||l.isQuickLink||l.isLandingPage?null:l.hasSubPages&&l.pages.some(d=>d.active)?dt({id:l.id,path:l.path,name:l.name,navImage:l==null?void 0:l.navImage,isMemberPortal:l.isMemberPortal,pages:l.pages,hasContent:l.contents!==null&&l.contents!==void 0&&l.contents.length>0,history:t,collapseHeaderOnClick:o,onOpenCustomerPortal:s,onToggleMenu:r,megaMenu:n}):ae({path:l.path,name:l.name,linkToExternalPage:l.linkToExternalPage,linkToAnotherPage:l.linkToAnotherPage,anotherPageOption:l.anotherPageOption,externalUrl:l.externalUrl,internalUrl:l.internalUrl,option:l.option,url:l.url,formId:l.formId,eventId:l.eventId,subOption:l.subOption,openNewPage:l.openNewPage,forceMainPathUrl:l.forceMainPathUrl,isMemberPortal:l.isMemberPortal,parentRoute:null,history:t,collapseHeaderOnClick:o,onOpenCustomerPortal:s,onToggleMenu:r})):null,X=({routes:a,collapseHeaderOnClick:o,onToggleMenu:t,onOpenCustomerPortal:s,separator:r})=>a?a.map((n,l,d)=>{if(n.visibility==="member"||!n.active||!n.isQuickLink||n.isLandingPage)return null;let p;n.isMemberPortal?p=s:o&&(p=t);const m=r&&n.order>0&&d.slice(0,l).filter(c=>c.visibility!=="member"&&c.active&&c.isQuickLink&&!c.isLandingPage).length>0;return e.jsxs(N.Fragment,{children:[m&&e.jsx("span",{className:"quick-link-separator nav-link",children:"|"}),Xa(n,p)]},l)}):null,ue=({routes:a,defaults:o,width:t,history:s,onOpenCustomerPortal:r,onToggleMenu:n,containerClass:l,showSocials:d})=>(l=l??"mobile-header-1",d=d??!0,e.jsx(H,{className:`mobile-header ${l} smaller`,children:e.jsxs("div",{className:"main-nav-container",children:[Z({...o}),t>440&&Q({brandName:o.brandName,width:t,onToggleMenu:n}),e.jsx($.Toggle,{"aria-controls":"basic-navbar-nav",onClick:n}),e.jsx($.Collapse,{id:"basic-navbar-nav",children:e.jsxs(K,{className:"me-auto",children:[t<441&&Q({brandName:o.brandName,width:t,onToggleMenu:n}),e.jsx("div",{className:"quick-link-container",children:X({routes:a,collapseHeaderOnClick:!0,onOpenCustomerPortal:r,onToggleMenu:n})}),J({routes:a,collapseHeaderOnClick:!0,history:s,onOpenCustomerPortal:r,onToggleMenu:n}),o.enableCtaButton&&o.ctaButton&&e.jsx("div",{className:"button-container py-2",children:G(o.ctaButton)}),d&&e.jsx("div",{className:"socials-container",children:ne({...o}
2)})]})})]})})),je=({routes:a,defaults:o,width:t,history:s,onOpenCustomerPortal:r,onToggleMenu:n,containerClass:l,showSocials:d,quickLinksSeparator:p})=>(l=l??"mobile-header-1 smaller",d=d??!0,e.jsxs(H,{className:`mobile-header ${l}`,children:[e.jsxs("div",{className:"quick-link-socials-container",children:[e.jsx("div",{className:"quick-link-container",children:X({routes:a,collapseHeaderOnClick:!1,onOpenCustomerPortal:r,onToggleMenu:n,separator:p})}),e.jsxs("div",{className:"d-flex align-items-center justify-content-end mr-2",children:[d&&e.jsx("div",{className:"socials-container mr-0 align-items-center",children:ne({...o})}),o.enableCtaButton&&o.ctaButton&&e.jsx("div",{className:"pl-3",children:G(o.ctaButton)})]})]}),e.jsxs("div",{className:"main-nav-container",children:[Z({...o}),Q({brandName:o.brandName,width:t,onToggleMenu:n}),e.jsx($.Toggle,{"aria-controls":"basic-navbar-nav",onClick:n}),e.jsx($.Collapse,{id:"basic-navbar-nav",children:e.jsx(K,{className:"me-auto",children:J({routes:a,collapseHeaderOnClick:!0,history:s,onOpenCustomerPortal:r,onToggleMenu:n})})})]})]}));function tr(){const[a,o]=E.useState(window.innerWidth);return E.useEffect(()=>{const t=()=>o(window.innerWidth);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),a}const D=a=>{const{routes:o,defaults:t}=a;return t!=null&&t.hideHome?o.filter(s=>!s.home):o};class sr extends N.Component{constructor(t){super(t);i(this,"handleResize",t=>{t!=null&&t.isTrusted&&this.setState({availableWidth:window.innerWidth})});i(this,"renderBrandName",()=>Q({brandName:this.props.defaults.brandName,width:this.state.availableWidth,onToggleMenu:this.props.onToggleMenu}));i(this,"renderBrandLogo",()=>Z({...this.props.defaults}));i(this,"renderSocials",()=>ne({facebookSet:this.props.defaults.facebookSet,facebook:this.props.defaults.facebook,twitterSet:this.props.defaults.twitterSet,twitter:this.props.defaults.twitter,instagramSet:this.props.defaults.instagramSet,instagram:this.props.defaults.instagram,linkedInSet:this.props.defaults.linkedInSet,linkedIn:this.props.defaults.linkedIn,threadsSet:this.props.defaults.threadsSet,threads:this.props.defaults.threads,youtubeSet:this.props.defaults.youtubeSet,youtube:this.props.defaults.youtube,tikTokSet:this.props.defaults.tikTokSet,tikTok:this.props.defaults.tikTok,onToggleMenu:this.props.defaults.onToggleMenu}));i(this,"renderRouteLink",(t,s,r)=>ae({path:t.path,name:t.name,linkToExternalPage:t.linkToExternalPage,linkToAnotherPage:t.linkToAnotherPage,anotherPageOption:t.anotherPageOption,externalUrl:t.externalUrl,internalUrl:t.internalUrl,forceMainPathUrl:t.forceMainPathUrl,isMemberPortal:t.isMemberPortal,parentRoute:s,collapseHeaderOnClick:r,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu}));i(this,"renderRouteDropdownLink",(t,s)=>dt({id:t.id,path:t.path,name:t.name,isMemberPortal:t.isMemberPortal,pages:t.pages,collapseHeaderOnClick:s,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu}));i(this,"renderRoutes",t=>J({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history}));i(this,"renderQuicklinks",t=>X({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu}));i(this,"renderSmallResolution",()=>ue({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-1",showSocials:!0}));i(this,"renderMediumResolution",()=>je({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-1",showSocials:!0}));i(this,"renderLargeResolution",()=>e.jsxs(e.Fragment,{children:[e.jsx(H,{className:"socials-quick-links-container",children:e.jsxs("div",{className:"ml-auto d-flex align-items-center",children:[e.jsx("div",{className:"quick-link-container",children:this.renderQuicklinks()}),this.renderSocials()]})}
2),e.jsxs(H,{className:"main-nav-container",role:"header",children:[this.renderBrandLogo(),this.renderBrandName(),e.jsxs(K,{className:"ml-auto",children:[this.renderRoutes(!1),this.props.defaults.enableCtaButton&&this.props.defaults.ctaButton&&e.jsx("div",{className:"px-3",children:G(this.props.defaults.ctaButton)})]})]})]}));this.state={availableWidth:window.screen.width}}componentDidMount(){window.addEventListener("resize",this.handleResize),this.handleResize({isTrusted:!0})}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}render(){return this.state.availableWidth<768?this.renderSmallResolution():this.state.availableWidth>767&&this.state.availableWidth<992?this.renderMediumResolution():this.renderLargeResolution()}}class ar extends N.Component{constructor(t){super(t);i(this,"handleResize",t=>{t!=null&&t.isTrusted&&this.setState({availableWidth:window.innerWidth})});i(this,"renderBrandName",()=>Q({brandName:this.props.defaults.brandName,width:this.state.availableWidth,onToggleMenu:this.props.onToggleMenu}));i(this,"renderBrandLogo",()=>Z({...this.props.defaults}));i(this,"renderSocials",()=>ne({facebookSet:this.props.defaults.facebookSet,facebook:this.props.defaults.facebook,twitterSet:this.props.defaults.twitterSet,twitter:this.props.defaults.twitter,instagramSet:this.props.defaults.instagramSet,instagram:this.props.defaults.instagram,linkedInSet:this.props.defaults.linkedInSet,linkedIn:this.props.defaults.linkedIn,threadsSet:this.props.defaults.threadsSet,threads:this.props.defaults.threads,youtubeSet:this.props.defaults.youtubeSet,youtube:this.props.defaults.youtube,tikTokSet:this.props.defaults.tikTokSet,tikTok:this.props.defaults.tikTok,onToggleMenu:this.props.defaults.onToggleMenu}));i(this,"renderRouteLink",(t,s,r)=>ae({path:t.path,name:t.name,linkToExternalPage:t.linkToExternalPage,linkToAnotherPage:t.linkToAnotherPage,anotherPageOption:t.anotherPageOption,externalUrl:t.externalUrl,internalUrl:t.internalUrl,forceMainPathUrl:t.forceMainPathUrl,isMemberPortal:t.isMemberPortal,parentRoute:s,collapseHeaderOnClick:r,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu}));i(this,"renderRouteDropdownLink",(t,s)=>dt({id:t.id,path:t.path,name:t.name,isMemberPortal:t.isMemberPortal,pages:t.pages,collapseHeaderOnClick:s,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu}));i(this,"renderRoutes",t=>J({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history}));i(this,"renderQuicklinks",t=>X({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu}));i(this,"renderSmallResolution",()=>ue({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-1",showSocials:!0}));i(this,"renderMediumResolution",()=>je({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-1",showSocials:!0}));i(this,"renderLargeResolution",()=>e.jsxs(e.Fragment,{children:[e.jsx(H,{className:"nav-container-v2",children:e.jsxs("div",{className:"main-brand-container",role:"header",children:[this.renderBrandLogo(),e.jsx("div",{className:"main-brand-divider-v2",children:e.jsx("div",{className:"right-container-v2",children:e.jsxs("div",{className:"top-container",children:[e.jsx("div",{className:"quick-link-container-v2",children:this.renderQuicklinks()}),e.jsx("div",{className:"socials-container",children:this.renderSocials()})]})})}),this.renderBrandName()]})}),e.jsx("div",{className:"main-nav-container v2-navbar-container",children:e.jsxs(K,{className:"ml-auto v2-navbar",children:[this.renderRoutes(),this.props.defaults.enableCtaButton&&this.props.defaults.ctaButton&&e.jsx("div",{className:"px-3",children:G(this.props.defaults.ctaButton)})]})})]}));this.state={availableWidth:window.screen.width}}componentDidMount(){window.addEventListener("resize",this.handleResize),this.handleResize({isTrusted:!0})}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}render(){return this.state.availableWidth<768?this.renderSmallResolution():this.state.availableWidth>767&&this.state.availableWidth<992?this.renderMediumResolution():this.renderLargeResolution()}}class rr extends N.Component{constructor(t){super(t);i(this,"handleResize",t=>{t.isTrusted&&this.setState({availableWidth:window.innerWidth})});i(this,"renderBrandName",()=>Q({brandName:this.props.defaults.brandName,width:this.state.availableWidth,onToggleMenu:this.props.onToggleMenu}));i(this,"renderBrandLogo",()=>Z({...this.props.defaults}));i(this,"renderQuicklinks",t=>X({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu}));i(this,"renderRoutes",t=>J({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history}));i(this,"renderSmallResolution",()=>ue({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-3 smaller",showSocials:!1}));i(this,"renderMediumResolution",()=>e.jsx(H,{className:"mobile-header-3",children:e.jsxs("div",{className:"main-nav-container",role:"header",children:[this.renderBrandLogo(),this.renderBrandName(),e.jsxs("div",{className:"quick-link-container",children:[this.renderQuicklinks(!1),this.props.defaults.enableCtaButton&&this.props.defaults.ctaButton&&e.jsx("div",{className:"pl-3",children:G(this.props.defaults.ctaButton)})]}),e.jsx($.Toggle,{"aria-controls":"basic-navbar-nav",onClick:this.props.onToggleMenu}),e.jsx($.Collapse,{id:"basic-navbar-nav",children:e.jsx(K,{className:"me-auto",children:this.renderRoutes(!0)})})]})}));i(this,"renderLargeResolution",()=>
2e.jsxs(H,{className:"main-nav-container-v3",children:[this.renderBrandLogo(),this.renderBrandName(),e.jsxs(K,{className:"ml-auto",children:[this.renderRoutes(),this.props.defaults.enableCtaButton&&this.props.defaults.ctaButton&&e.jsx("div",{className:"px-3",children:G(this.props.defaults.ctaButton)}),e.jsx("div",{className:"quick-link-container-v3",children:this.renderQuicklinks(!1)})]})]}));this.state={availableWidth:window.screen.width}}componentDidMount(){window.addEventListener("resize",this.handleResize),this.handleResize({isTrusted:!0})}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}render(){return this.state.availableWidth<768?this.renderSmallResolution():this.state.availableWidth<992&&this.state.availableWidth>767?this.renderMediumResolution():this.renderLargeResolution()}}class nr extends N.Component{constructor(t){super(t);i(this,"handleResize",t=>{t.isTrusted&&this.setState({availableWidth:window.innerWidth})});i(this,"renderBrandName",()=>Q({brandName:this.props.defaults.brandName,width:this.state.availableWidth,onToggleMenu:this.props.onToggleMenu}));i(this,"renderBrandLogo",()=>Z({...this.props.defaults}));i(this,"renderSocials",()=>ne({facebookSet:this.props.defaults.facebookSet,facebook:this.props.defaults.facebook,twitterSet:this.props.defaults.twitterSet,twitter:this.props.defaults.twitter,instagramSet:this.props.defaults.instagramSet,instagram:this.props.defaults.instagram,linkedInSet:this.props.defaults.linkedInSet,linkedIn:this.props.defaults.linkedIn,threadsSet:this.props.defaults.threadsSet,threads:this.props.defaults.threads,youtubeSet:this.props.defaults.youtubeSet,youtube:this.props.defaults.youtube,tikTokSet:this.props.defaults.tikTokSet,tikTok:this.props.defaults.tikTok,onToggleMenu:this.props.defaults.onToggleMenu}));i(this,"renderQuicklinks",t=>X({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu}));i(this,"renderRoutes",t=>J({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history}));i(this,"renderSmallResolution",()=>ue({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-4",showSocials:!0}));i(this,"renderMediumResolution",()=>je({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-4",showSocials:!0}));i(this,"renderLargeResolution",()=>e.jsxs(H,{className:"main-nav-container-v4",children:[e.jsxs("header",{className:"main-brand-container",children:[this.renderBrandLogo(),this.renderBrandName()]}),e.jsxs("div",{className:"right-container",children:[e.jsxs("div",{className:"socials-container",children:[this.renderSocials(),this.props.defaults.enableCtaButton&&this.props.defaults.ctaButton&&e.jsx("div",{className:"pl-3 pr-1",children:G(this.props.defaults.ctaButton)})]}),e.jsx("div",{children:e.jsxs(K,{className:"ml-auto",children:[this.renderRoutes(),e.jsx("div",{className:"quick-link-container-v4",children:this.renderQuicklinks(!1)})]})})]})]}));this.state={availableWidth:window.screen.width}}componentDidMount(){window.addEventListener("resize",this.handleResize),this.handleResize({isTrusted:!0})}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}render(){return this.state.availableWidth<768?this.renderSmallResolution():this.state.availableWidth<992&&this.state.availableWidth>767?this.renderMediumResolution():this.renderLargeResolution()}}class ir extends N.Component{constructor(t){super(t);i(this,"getRoutes",()=>{const{routes:t,defaults:s}=this.props;return s!=null&&s.hideHome?t.filter(r=>!r.home):t});i(this,"handleResize",t=>{t.isTrusted&&this.setState({availableWidth:window.innerWidth})});i(this,"renderBrandName",()=>Q({brandName:this.props.defaults.brandName,width:this.state.availableWidth,onToggleMenu:this.props.onToggleMenu}));i(this,"renderBrandLogo",()=>Z({...this.props.defaults}));i(this,"renderSocials",()=>ne({facebookSet:this.props.defaults.facebookSet,facebook:this.props.defaults.facebook,twitterSet:this.props.defaults.twitterSet,twitter:this.props.defaults.twitter,instagramSet:this.props.defaults.instagramSet,instagram:this.props.defaults.instagram,linkedInSet:this.props.defaults.linkedInSet,linkedIn:this.props.defaults.linkedIn,threadsSet:this.props.defaults.threadsSet,threads:this.props.defaults.threads,youtubeSet:this.props.defaults.youtubeSet,youtube:this.props.defaults.youtube,tikTokSet:this.props.defaults.tikTokSet,tikTok:this.props.defaults.tikTok,onToggleMenu:this.props.defaults.onToggleMenu}));i(this,"renderQuicklinks",t=>X({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,separator:!0}));i(this,"renderRoutes",t=>J({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history}));i(this,"renderSmallResolution",()=>ue({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-5",showSocials:!0}));i(this,"renderMediumResolution",()=>je({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-5",showSocials:!0,quickLinksSeparator:!0}));i(this,"renderLargeResolution",()=>e.jsxs(e.Fragment,{children:[e.jsx(H,{className:"socials-quick-links-container-v5",children:e.jsxs("div",{className:"d-flex",children:[e.jsxs("header",{className:"top-left-header",children:[this.renderBrandLogo(),this.renderBrandName()]}),e.jsxs("div",{className:"top-right-header",children:[e.jsxs("div",{className:"socials-l
2ink-container",children:[this.renderSocials(),this.props.defaults.enableCtaButton&&this.props.defaults.ctaButton&&e.jsx("div",{className:"px-3",children:G(this.props.defaults.ctaButton)})]}),e.jsx("div",{className:"quick-link-container-v5",children:this.renderQuicklinks(!1)})]})]})}),e.jsx(H,{className:"main-nav-container-v5",children:e.jsx(K,{children:this.renderRoutes(!1)})})]}));this.state={availableWidth:window.screen.width}}componentDidMount(){window.addEventListener("resize",this.handleResize),this.handleResize({isTrusted:!0})}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}render(){return this.state.availableWidth<768?this.renderSmallResolution():this.state.availableWidth<992&&this.state.availableWidth>767?this.renderMediumResolution():this.renderLargeResolution()}}class or extends N.Component{constructor(t){super(t);i(this,"getRoutes",()=>{const{routes:t,defaults:s}=this.props;return s!=null&&s.hideHome?t.filter(r=>!r.home):t});i(this,"handleResize",t=>{t.isTrusted&&this.setState({availableWidth:window.innerWidth})});i(this,"renderBrandName",()=>Q({brandName:this.props.defaults.brandName,width:this.state.availableWidth,onToggleMenu:this.props.onToggleMenu}));i(this,"renderBrandLogo",()=>Z({...this.props.defaults}));i(this,"renderSocials",()=>ne({facebookSet:this.props.defaults.facebookSet,facebook:this.props.defaults.facebook,twitterSet:this.props.defaults.twitterSet,twitter:this.props.defaults.twitter,instagramSet:this.props.defaults.instagramSet,instagram:this.props.defaults.instagram,linkedInSet:this.props.defaults.linkedInSet,linkedIn:this.props.defaults.linkedIn,threadsSet:this.props.defaults.threadsSet,threads:this.props.defaults.threads,youtubeSet:this.props.defaults.youtubeSet,youtube:this.props.defaults.youtube,tikTokSet:this.props.defaults.tikTokSet,tikTok:this.props.defaults.tikTok,onToggleMenu:this.props.defaults.onToggleMenu}));i(this,"renderQuicklinks",t=>X({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,separator:!0}));i(this,"renderRoutes",t=>J({routes:D(this.props),collapseHeaderOnClick:t,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history}));i(this,"renderSmallResolution",()=>ue({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-6",showSocials:!0}));i(this,"renderMediumResolution",()=>je({routes:D(this.props),defaults:this.props.defaults,width:this.state.availableWidth,onOpenCustomerPortal:this.props.onOpenCustomerPortal,onToggleMenu:this.props.onToggleMenu,history:this.props.history,containerClass:"mobile-header-6",showSocials:!0,quickLinksSeparator:!0}));i(this,"renderLargeResolution",()=>e.jsxs(e.Fragment,{children:[e.jsx(H,{className:"socials-quick-links-container-v6",children:e.jsxs("div",{className:"d-flex",children:[e.jsxs("header",{className:"top-left-header",children:[this.renderBrandLogo(),this.renderBrandName()]}),e.jsxs("div",{className:"top-right-header",children:[e.jsxs("div",{className:"socials-link-container",children:[this.renderSocials(),this.props.defaults.enableCtaButton&&this.props.defaults.ctaButton&&e.jsx("div",{className:"px-3",children:G(this.props.defaults.ctaButton)})]}),e.jsx("div",{className:"quick-link-container-v6",children:this.renderQuicklinks()})]})]})}),e.jsx(H,{className:"main-nav-container-v6",children:e.jsx(K,{children:this.renderRoutes(!1)})})]}));this.state={availableWidth:window.screen.width}}componentDidMount(){window.addEventListener("resize",this.handleResize),this.handleResize({isTrusted:!0})}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}render(){return this.state.availableWidth<768?this.renderSmallResolution():this.state.availableWidth<992&&this.state.availableWidth>767?this.renderMediumResolution():this.renderLargeResolution()}}const lr=a=>{const o=tr(),t=()=>Z({...a.defaults}),s=()=>ne({facebookSet:a.defaults.facebookSet,facebook:a.defaults.facebook,twitterSet:a.defaults.twitterSet,twitter:a.defaults.twitter,instagramSet:a.defaults.instagramSet,instagram:a.defaults.instagram,linkedInSet:a.defaults.linkedInSet,linkedIn:a.defaults.linkedIn,threadsSet:a.defaults.threadsSet,threads:a.defaults.threads,youtubeSet:a.defaults.youtubeSet,youtube:a.defaults.youtube,tikTokSet:a.defaults.tikTokSet,tikTok:a.defaults.tikTok,onToggleMenu:a.defaults.onToggleMenu}),r=m=>
2J({routes:D(a),collapseHeaderOnClick:m,onOpenCustomerPortal:a.onOpenCustomerPortal,onToggleMenu:a.onToggleMenu,history:a.history,megaMenu:!0,hideHome:a.defaults.hideHome}),n=m=>X({routes:D(a),collapseHeaderOnClick:m,onOpenCustomerPortal:a.onOpenCustomerPortal,onToggleMenu:a.onToggleMenu}),l=()=>ue({routes:D(a),defaults:a.defaults,width:o,onOpenCustomerPortal:a.onOpenCustomerPortal,onToggleMenu:a.onToggleMenu,history:a.history,containerClass:"mobile-header-1 mobile-header-7",showSocials:!0}),d=()=>je({routes:D(a),defaults:a.defaults,width:o,onOpenCustomerPortal:a.onOpenCustomerPortal,onToggleMenu:a.onToggleMenu,history:a.history,containerClass:"mobile-header-1 mobile-header-7",showSocials:!0}),p=()=>e.jsx("div",{className:"header-7-container w-100 d-flex flex-column align-items-center",children:e.jsxs("div",{className:"header-7-inner d-flex align-items-center",children:[t(),e.jsxs("div",{className:"w-100 overflow-auto",children:[e.jsx(H,{className:"socials-quick-links-container d-flex justify-content-end px-0 pr-2",children:e.jsxs("div",{className:"d-flex align-items-center",children:[e.jsx("div",{className:"quick-link-container",children:n()}),s()]})}
2),e.jsxs(H,{className:"main-nav-container header-7-wrapper justify-content-end flex-nowrap pr-0",role:"header",children:[e.jsx(K,{className:"pr-0 gap-1",children:r(!1)}),a.defaults.enableCtaButton&&a.defaults.ctaButton&&e.jsx("div",{className:"px-3",children:G(a.defaults.ctaButton)})]})]})]})});return o<768?l():o<992&&o>=768?d():p()},An=[{name:"Design 1",icon:"/images/tenant-website/HeaderDesign1.png",value:"version1",quickLinks:3,hasSocials:!0,logo:"rectangle",comp:sr},{name:"Design 2",icon:"/images/tenant-website/HeaderDesign2.png",value:"version2",quickLinks:3,hasSocials:!0,logo:"square",comp:ar},{name:"Design 3",icon:"/images/tenant-website/HeaderDesign3.png",value:"version3",quickLinks:1,hasSocials:!1,logo:"rectangle",comp:rr},{name:"Design 4",icon:"/images/tenant-website/HeaderDesign4.png",value:"version4",quickLinks:1,hasSocials:!0,logo:"square",comp:nr},{name:"Design 5",icon:"/images/tenant-website/HeaderDesign5.png",value:"version5",quickLinks:2,hasSocials:!0,logo:"rectangle",comp:ir},{name:"Design 6",icon:"/images/tenant-website/HeaderDesign6.png",value:"version6",quickLinks:4,hasSocials:!0,logo:"square",comp:or},{name:"Design 7 (Mega Menu)",icon:"/images/tenant-website/HeaderDesign1.png",value:"version",quickLinks:4,hasSocials:!0,logo:"rectangle",comp:lr}],we=a=>{const o=(a||"").trim();return!o||/^\s*(javascript|data|vbscript):/i.test(o)?null:/^(\/|#|mailto:|tel:)/i.test(o)||/^https?:\/\//i.test(o)?o:`https://${o}`};class En extends N.Component{constructor(t){super(t);i(this,"onClickFormLink",t=>{t.target!==document.querySelector("html")&&gs({params:{visible:!0,formId:t.target.closest("a").dataset.formid}})});i(this,"initialState",t=>({email:t.contactInfo.email,address:t.contactInfo.address,phone:t.contactInfo.phone,loading:!0,sitemapScrollable:{}}));i(this,"renderAddress",()=>{var r;const t=this.state.address.address;let s=`${t.Street1}`;return t.Street2&&(s+=`, ${t.Street2}`),s+=`, ${t.City}, ${((r=t.State)==null?void 0:r.StateCode)||t.Province} ${t.Zip}`,s});i(this,"renderContactText",()=>{var u,C,I;if(this.state.loading)return null;const{textColor:t,iconColor:s,contactIcons:r}=this.props,n=s||t;if(this.props.preview){const{email:P,address:S,phone:h}=this.state,{contactInfo:g}=this.props,v=g.address.active&&S?`${S==null?void 0:S.street1}, ${S==null?void 0:S.city}, ${(S==null?void 0:S.stateName)||(S==null?void 0:S.province)}, ${S==null?void 0:S.zip}`:null,f=(u=g.phone)!=null&&u.active?h==null?void 0:h.number:null,j=g.email.active?P:null;return e.jsxs(e.Fragment,{children:[v&&e.jsxs("p",{style:{color:t},className:r?"d-flex align-items-start tenantWebsite-footer-contact-item":"",children:[r&&e.jsx(F,{icon:pt,className:"tenantWebsite-footer-contact-icon",style:{color:n}}),v]}),f&&e.jsxs("p",{style:{color:t},className:r?"d-flex align-items-center tenantWebsite-footer-contact-item":"",children:[r&&e.jsx(F,{icon:gt,className:"tenantWebsite-footer-contact-icon",style:{color:n}}),e.jsx("a",{style:{color:t},href:`tel:${f}`,children:f})]}),j&&e.jsxs("p",{style:{color:t},className:r?"d-flex align-items-center tenantWebsite-footer-contact-item":"",children:[r&&e.jsx(F,{icon:ft,className:"tenantWebsite-footer-contact-icon",style:{color:n}}),e.jsx("span",{style:{color:t},children:j})]})]})}const{address:l,phone:d,email:p}=this.state,m=(l==null?void 0:l.active)&&l.address,c=d==null?void 0:d.active,b=p==null?void 0:p.active;return e.jsxs(e.Fragment,{children:[m&&e.jsxs("p",{style:{color:t},className:r?"d-flex align-items-start tenantWebsite-footer-contact-item":"",children:[r&&e.jsx(F,{icon:pt,className:"tenantWebsite-footer-contact-icon",style:{color:n}}),this.renderAddress()]}),c&&e.jsxs("p",{style:{color:t},className:r?"d-flex align-items-center tenantWebsite-footer-contact-item":"",children:[r&&e.jsx(F,{icon:gt,className:"tenantWebsite-footer-contact-icon",style:{color:n}}),e.jsx("a",{style:{color:t},href:`tel:${(C=d.phone)==null?void 0:C.Number}`,children:(I=d.phone)==null?void 0:I.Number})]}),b&&e.jsxs("p",{style:{color:t},className:r?"d-flex align-items-center tenantWebsite-footer-contact-item":"",children:[r&&e.jsx(F,{icon:ft,className:"tenantWebsite-footer-contact-icon",style:{color:n}}),p.email]})]})});i(this,"renderSocialIcon",(t,s,r)=>{const n=at();return e.jsx("a",{className:"tenantWebsite-footer-social-icon",href:t,target:"_blank","aria-label":r||`${n} social`,rel:"noopener noreferrer",style:{color:this.props.iconColor||this.props.textColor},children:e.jsx(F,{icon:s})},t)});i(this,"renderSocials",()=>{const{socials:t}=this.props;if(!t)return null;const s=we;return[{href:s(t.facebook),icon:Ge,label:"Facebook"},{href:s(t.instagram),icon:Qe,label:"Instagram"},{href:s(t.linkedIn),icon:Ke,label:"LinkedIn"},{href:s(t.threads),icon:Ze,label:"Threads"},{href:s(t.tikTok),icon:Xe,label:"TikTok"},{href:s(t.twitter),icon:Ye,label:"X"},{href:s(t.youtube),icon:Je,label:"YouTube"}].filter(n=>n.href).map(n=>this.renderSocialIcon(n.href,n.icon,n.label))});i(this,"renderLogoColumn",()=>{const{showLogo:t,showAccreditationLogo:s,accreditationLogo:r,textColor:n}=this.props,l=this.props.defaults||{},{logoInfo:d,logoData:p,brandName:m}=l;if(!t)return null;
2let c=null;d!=null&&d.isValid?c=Ie({storageKey:d.avatarStorageKey}):p&&(c=p);let b=null;if(s&&r){const u=r.storageKey||r.avatarStorageKey;u&&(b=Ie({storageKey:u}))}return!c&&!m&&!b?null:e.jsxs("div",{className:"tenantWebsite-footer-col",children:[c&&e.jsx("img",{src:c,alt:m||"Logo",className:"tenantWebsite-footer-logo"}),!c&&m&&e.jsx("span",{style:{color:n},className:"tenantWebsite-footer-brandname",children:m}),b&&e.jsx("img",{src:b,alt:"Accreditation",className:"tenantWebsite-footer-accreditation-logo"})]},"logo")});i(this,"renderLinksColumn",()=>{var r;const{links:t,textColor:s}=this.props;return!(t!=null&&t.active)||!((r=t.items)!=null&&r.length)?null:e.jsxs("div",{className:"tenantWebsite-footer-col",children:[t.title&&e.jsx("p",{className:"tenantWebsite-footer-col-title",style:{color:s},children:t.title}),e.jsx("ul",{className:"tenantWebsite-footer-links-list",children:t.items.map(n=>{const l=we(n.url);return n.label&&l?e.jsx("li",{children:e.jsx("a",{href:l,style:{color:s},children:n.label})},n.id||n.url):null})})]},"links")});i(this,"renderContactColumn",()=>{var p;if(this.state.loading)return null;const{contactInfo:t,contactTitle:s,textColor:r,contactIcons:n}=this.props;if(!(t.email.active||t.address.active||((p=t.phone)==null?void 0:p.active)))return null;const d=e.jsxs(e.Fragment,{children:[s&&e.jsx("p",{className:"tenantWebsite-footer-col-title",style:{color:r},children:s}),this.renderContactText()]});return e.jsx("div",{className:"tenantWebsite-footer-col",children:n?e.jsx("div",{className:"tenantWebsite-footer-contact-inner",children:d}):d},"contact")});i(this,"renderSocialsColumn",()=>{const{socials:t,newsletter:s,textColor:r}=this.props;if(!(t!=null&&t.active))return null;const n=we(s==null?void 0:s.url);return e.jsxs("div",{className:"tenantWebsite-footer-col",children:[t.title&&e.jsx("p",{className:"tenantWebsite-footer-col-title",style:{color:r},children:t.title}),e.jsx("div",{className:"tenantWebsite-footer-socials-icons",children:this.renderSocials()}),(s==null?void 0:s.active)&&n&&e.jsx("a",{href:n,style:{color:r},className:"tenantWebsite-footer-newsletter-link",target:"_blank",rel:"noopener noreferrer",children:s.label||"Join Our Email Newsletter"})]},"socials")});i(this,"renderLegacyContact",()=>{var t,s,r,n,l,d,p,m,c,b,u,C,I,P,S;if(this.state.loading)return null;if(this.props.preview){if(this.state.email||this.state.address||this.state.phone)return e.jsxs(x,{className:"text-center tenantWebsite-footer-socials",children:[e.jsx("p",{style:{color:this.props.textColor},children:this.props.contactInfo.address.active&&this.state.address&&`${(t=this.state.address)==null?void 0:t.street1}, ${(s=this.state.address)==null?void 0:s.city}, ${((r=this.state.address)==null?void 0:r.stateName)||((n=this.state.address)==null?void 0:n.province)}, ${(l=this.state.address)==null?void 0:l.zip}`}),((d=this.state.phone)==null?void 0:d.active)&&e.jsx("a",{style:{color:this.props.textColor},href:`tel:${(m=(p=this.state.phone)==null?void 0:p.phone)==null?void 0:m.Number}`,children:(b=(c=this.state.phone)==null?void 0:c.phone)==null?void 0:b.Number}),e.jsx("p",{style:{color:this.props.textColor},children:this.props.contactInfo.email.active&&this.state.email})]})}else return this.state.email||this.state.address||this.state.phone?e.jsxs(x,{className:"text-center tenantWebsite-footer-socials",children:[e.jsx("p",{style:{color:this.props.textColor},children:((u=this.state.address)==null?void 0:u.active)&&this.state.address.address&&this.renderAddress()}),((C=this.state.phone)==null?void 0:C.active)&&e.jsx("a",{style:{color:this.props.textColor},href:`tel:${(I=this.state.phone.phone)==null?void 0:I.Number}`,children:(P=this.state.phone.phone)==null?void 0:P.Number}),e.jsx("p",{style:{color:this.props.textColor},children:((S=this.state.email)==null?void 0:S.active)&&this.state.email.email})]}):null;return null});i(this,"footerSocialLinksRender",()=>{const{socials:t}=this.props;if(!(t!=null&&t.active))return null;const s=we,r=[{key:"facebook",href:s(t.facebook),icon:Ge,label:"Facebook"},{key:"instagram",href:s(t.instagram),icon:Qe,label:"Instagram"},{key:"linkedIn",href:s(t.linkedIn),icon:Ke,label:"LinkedIn"},{key:"threads",href:s(t.threads),icon:Ze,label:"Threads"},{key:"tikTok",href:s(t.tikTok),icon:Xe,label:"TikTok"},{key:"twitter",href:s(t.twitter),icon:Ye,label:"X"},{key:"youtube",href:s(t.youtube),icon:Je,label:"YouTube"}].filter(n=>n.href);return r.length===0?null:e.jsx("div",{className:"d-flex justify-content-center py-1",style:{columnGap:"8px"},children:r.map(({key:n,href:l,icon:d,label:p})=>e.jsx("a",{href:l,target:"_blank",title:`Go to ${p}`,rel:"noopener noreferrer","aria-label":p,style:{color:this.props.iconColor||this.props.textColor},children:e.jsx(F,{icon:d,size:"lg"})},n))})});i(this,"footerCopyrightsRender",()=>this.props.copyright||this.props.activePrivacyPolicy||this.props.activeTerms?e.jsxs(x,{className:"text-center tenantWebsite-footer-copyright mt-4",children:[this.props.copyright.active&&e.jsxs("p",{className:"tenantWebsite-footer-copyright-text",children:[e.jsx(F,{style:{color:this.props.textColor},icon:fs,className:"mr-2"}),e.jsx("span",{dangerouslySetInnerHTML:{__html:Dt.sanitize(this.props.copyright.text,{ADD_ATTR:["target"]})}}),e.jsx("br",{})]}),this.props.activePrivacyPolicy&&e.jsx(Re,{style:{color:this.props.textColor},to:"/privacyPolicy",children:e.jsx("a",{href:"#",children:"Privacy Policy"})}),this.props.activePrivacyPolicy&&this.props.activeTerms&&e.jsx("span",{style:{color:this.props.textColor},children:" | "}),this.props.activeTerms&&e.jsx(Re,{style:{color:this.props.textColor},to:"/termsOfUse",children:e.jsx("a",{href:"#",children:"Terms Of Use"})})]}):null);i(this,"hasColumnContent",()=>{const{showLogo:t,links:s,socials:r,contactIcons:n,contactTitle:l,activeSitemapLinks:d,sitemapPaths:p}=this.props;return t||(s==null?void 0:s.active)||(r==null?void 0:r.active)||n||!!l||d&&(p==null?void 0:p.length)>0});i(this,"handleSitemapScrollUpdate",t=>s=>{var n;const r=s.scrollHeight>s.clientHeight+1;(((n=this.state.sitemapScrollable)==null?void 0:n[t])||!1)!==r&&this.setState(l=>({sitemapScrollable:{...l.sitemapScrollable,[t]:r}}))});i(this,"renderSitemapColumn",(t,s)=>{var d;const{textColor:r}=this.props,l=`tenantWebsite-footer-sitemap-scroll-mask${((d=this.state.sitemapScrollable)==null?void 0:d[t])||!1?" tenantWebsite-footer-sitemap-scroll-mask--scrollable":""}`;return e.jsxs("div",{className:"tenantWebsite-footer-col tenantWebsite-footer-sitemap-col",children:[e.jsx("p",{className:"tenantWebsite-footer-col-title",style:{color:r},children:t}),e.jsx("div",{className:l,children:e.jsx(bs.Scrollbars,{autoHeight:!0,autoHeightMax:200,hideTracksWhenNotNeeded:!0,onUpdate:this.handleSitemapScrollUpdate(t),renderTrackVertical:p=>e.jsx("div",{...p,className:"tenantWebsite-footer-sitemap-track"}),renderThumbVertical:p=>e.jsx("div",{...p,className:"tenantWebsite-footer-sitemap-thumb"}),children:e.jsx("ul",{className:"tenantWebsite-footer-links-list",children:s.map(({url:p,name:m})=>e.jsx("li",{children:e.jsx("a",{href:p,style:{color:r},children:m})},p))})})})]},t)});i(this,"renderSitemapColumns",()=>{const{activeSitemapLinks:t,sitemapPaths:s}=this.props;if(!t||!(s!=null&&s.length))return[];const r=s.filter(({url:l})=>l.startsWith("/event-detail")),n=s.filter(({url:l})=>!l.startsWith("/event-detail"));return[r.length>0?this.renderSitemapColumn("Events",r):null,n.length>
20?this.renderSitemapColumn("Our Members",n):null].filter(Boolean)});this.state=this.initialState(t)}componentDidMount(){this.props.preview?rt.get("/webPresence/getFooterInfo",null,{success:t=>{this.setState({email:t.data.accountEmail,address:t.data.accountAddress,phone:t.data.accountPhone,loading:!1})},error:t=>{R(t.error.errorMessage)}}):this.setState({loading:!1})}render(){if(Object.keys(this.props).length===0)return null;const t=this.hasColumnContent(),s=[this.renderLogoColumn(),this.renderLinksColumn(),...this.renderSitemapColumns(),this.renderContactColumn(),this.renderSocialsColumn()].filter(Boolean),n=`tenantWebsite-footer-columns${s.length>1?" tenantWebsite-footer-columns--left":""}`;return e.jsx("footer",{style:{backgroundColor:this.props.backgroundColor},className:"tenantWebsite-footer",children:e.jsxs(H,{fluid:this.props.fullWidth||!1,children:[t?e.jsx("div",{className:n,children:s}):e.jsx(e.Fragment,{children:this.renderLegacyContact()}),this.footerCopyrightsRender()]})})}}const Mn=({preFooter:a,homeContents:o,pages:t,membershipEnabled:s,sponsorshipEnabled:r,websiteShorthand:n,websiteDomain:l,preview:d})=>{const p=window.location.pathname==="/"||window.location.pathname==="";if(!a||!a.active||p)return null;const m=o.find(u=>u.home===!0),c=m&&Array.isArray(m.contents)?m.contents.find(u=>u.guid===a.preFooterBlockGuid):null;if(!c)return null;const b=xs[c.version];return e.jsx("div",{className:"tenantWebsite-prefooter",children:e.jsx(b,{...c,membershipEnabled:s,sponsorshipEnabled:r,pages:t,websiteShorthand:n,websiteDomain:l,preview:d,fullPreviewMode:d})})},dr=250,pe=a=>{const o=E.useRef(null),t=E.useCallback(()=>{switch(a.socialName){case ie.TWITTER:return"https://www.twitter.com/";case ie.INSTAGRAM:return"https://www.instagram.com/";case ie.LINKEDIN:return a.isCompany?"https://www.linkedin.com/":"https://www.linkedin.com/in/";case ie.THREADS:return"https://www.threads.net/";case ie.YOUTUBE:return"https://www.youtube.com/";case ie.TIKTOK:return"https://www.tiktok.com/@";case ie.FACEBOOK:default:return"https://www.facebook.com/"}},[a.socialName,a.isCompany]),s=r=>{a.onDirt&&a.onDirt(void 0);const n=r.target.value.replace(/\s/g,"");a.formControl?a.onFieldChange(n,a.name,()=>a.onChangeCallback(n)):a.onChangeCallback(n)};return e.jsxs("div",{className:`form-control socials-box d-flex align-items-center p-0${a.disabled?" disabled":""}`,style:{cursor:a.disabled?"default":"text"},onClick:()=>{var r;return!a.disabled&&((r=o.current)==null?void 0:r.focus())},children:[e.jsx("span",{style:{paddingLeft:"0.75rem",paddingRight:"2px",whiteSpace:"nowrap",userSelect:"none",pointerEvents:"none"},children:t()}),e.jsx("input",{ref:o,id:`socials-${a.name}`,"data-testid":a["data-testid"],type:"text",style:{border:"none",outline:"none",boxShadow:"none",padding:"0 0.75rem 0 0",background:"transparent",flex:1,minWidth:0,fontSize:"inherit",lineHeight:"inherit",color:"inherit"},value:a.value??"",onChange:s,name:a.name,disabled:a.disabled,maxLength:dr,required:a.required})]})};pe.defaultProps={formControl:!1};const cr=a=>{const o=a?`custom-color ${a.includes("badge")?a:`badge-${a}`}`:"custom-color";return Te("membership-badge-top",o)},hr=a=>{var o,t,s,r;return a.membership.active&&e.jsxs("div",{className:"membership-badge",onClick:()=>!a.isPortal&&a.history.push(`${vs}/${a.membership.currentOrderId}`),children:[e.jsx(de,{trigger:["hover","focus"],overlay:e.jsxs(ce,{children:[(o=a.membership.status)==null?void 0:o.label,a.membership.levelName?` - ${(t=a.membership)==null?void 0:t.levelName}`:""]}),children:e.jsx("div",{className:cr((s=a.membership.status)==null?void 0:s.color),children:e.jsxs("span",{className:"pl-2 d-flex align-items-center",children:[a.membership.membershipName,e.jsx(F,{icon:Ot,className:"ml-2 mr-2 membership-active-icon"})]})})}),e.jsx("div",{className:"membership-badge-bottom",children:he(a.membership.endDate)}),a.membership.pendingRenewalAmount!=null&&e.jsxs("div",{className:"membership-badge-pending",children:[e.jsx(F,{icon:Ft,className:"mr-2"}),`Renewal ${(r=B().nomenclatures)==null?void 0:r.invoices.singularTerm} pending - ${ys(a.membership.pendingRenewalAmount)} due`]})]})},ur="/customers/customer/getMemberSubscriptionInfo",mr="/customers/customer/getMemberSubscriptionInfo",On=({memberId:a,memberTypeCode:o,isPortal:t=!1,history:s,refreshToken:r,containerClassName:n="membership-badges-container"})=>{const[l,d]=E.useState([]),[p,m]=E.useState(!1);return E.useEffect(()=>{if(!a)return;let c=!1;d([]),m(!1);const b=t?js:rt,u=t?mr:ur;return b.post(u,{memberId:a,memberTypeCode:o},{success:C=>{c||d(C.data.items??[])},error:()=>{c||m(!0)}},{block:!1}),()=>{c=!0}},[a,o,t,r]),p?e.jsx("div",{className:n,children:e.jsx("span",{className:"small text-muted",children:"Unable to load memberships"})}):l.length>0?e.jsx("div",{className:n,children:l.map((c,b)=>e.jsx(hr,{membership:c,history:s,isPortal:t},b))}):null};class Dn extends N.Component{constructor(t){super(t);i(this,"open",t=>{this.setState({visible:!0,companyInfo:this.props.companyInfo,onClose:t.onClose},this.handleCompanyStripeInfo)});i(this,"close",()=>{this.setState({...this.initialState()})});i(this,"initialState",()=>({visible:!1,loading:!0,saving:!1,paymentMethods:[],newPaymentMethod:!1,companyUpdated:!1,rowVersion:null,onClose:null}));i(this,"handleCancel",()=>{this.state.onClose&&this.state.onClose(this.state.companyUpdated),this.close()});i(this,"handleCompanyStripeInfo",()=>{this.API.Biz.get("/customers/company/getCompanyStripeInfo",{companyId:this.state.companyInfo.companyId},{success:t=>{this.setState(s=>({loading:!1,accountName:t.data.accountName,accountAutoPayEnabled:t.data.accountAutoPayEnabled,companyAutoPayEnabled:t.data.companyAutoPayEnabled,stripePublishableKey:t.data.stripePublishableKey,stripeAccountId:t.data.stripeAccountId,str
2ipeConnectCustomerId:t.data.stripeConnectCustomerId,paymentMethods:t.data.paymentMethods,companyInfo:{...s.companyInfo,rowVersion:t.data.rowVersion}}))},error:t=>{R(t.error.errorMessage),this.setState(()=>({loading:!1}))}})});i(this,"handleConfirm",t=>{this.setState({saving:!0},()=>{const s={companyId:this.state.companyInfo.companyId,stripePaymentMethodId:t.payment_method};this.API.Biz.post("/customers/company/confirmCustomerPaymentMethod",s,{success:()=>{this.setState({newPaymentMethod:!1,paymentMethods:[],loading:!0,saving:!1},()=>{this.handleCompanyStripeInfo()})},error:r=>{this.setState({saving:!1}),R(r.error.errorMessage)}},{block:!1})})});i(this,"handleDetach",t=>{if(this.state.companyAutoPayEnabled&&t.default){R("To remove your default payment method, Auto-Pay must be disabled.");return}this.setState({saving:!0},()=>{const s={companyId:this.state.companyInfo.companyId,stripePaymentMethodId:t.id};this.API.Biz.post("/customers/company/detachCustomerPaymentMethod",s,{success:()=>{se("Payment method Deleted Successfully."),this.setState(r=>({saving:!1,paymentMethods:r.paymentMethods.filter(n=>n.id!==t.id)}))},error:r=>{this.setState({saving:!1}),R(r.error.errorMessage)}},{block:!1})})});i(this,"handleDefault",t=>{this.setState({saving:!0},()=>{const s={stripePaymentMethodId:t,companyId:this.state.companyInfo.companyId,stripeConnectCustomerId:this.state.stripeConnectCustomerId};this.API.Biz.post("/customers/company/defaultCustomerPaymentMethod",s,{success:()=>{se("Payment method Set as Default Successfully."),this.setState(r=>({saving:!1,paymentMethods:r.paymentMethods.map(n=>({...n,default:n.id===t}))}))},error:r=>{this.setState({saving:!1}),R(r.error.errorMessage)}},{block:!1})})});i(this,"handleNewPaymentMethod",t=>{if(t){const s={stripeConnectCustomerId:this.state.stripeConnectCustomerId};this.API.Security.get("/stripe/getSetupIntentClientSecret",s,{success:r=>{this.setState({newPaymentMethod:t,clientSecret:r.data.clientSecret})},error:r=>{R(r.error.errorMessage)}},{block:!1})}else this.setState({newPaymentMethod:t})});i(this,"handleAutoPay",t=>{if(t&&!this.state.paymentMethods.some(s=>s.default)){R("Before enabling Auto-Pay you must set a payment method as Default, then you can activate it to process your payments automatically.");return}this.setState({saving:!0},()=>{const s={companyId:this.state.companyInfo.companyId,rowVersion:this.state.companyInfo.rowVersion,companyAutoPayEnabled:t,hasDefaultPaymentMethod:this.state.paymentMethods.some(r=>r.default)};this.API.Biz.post("/customers/company/saveCompanyAutoPay",s,{success:r=>{se(r.message),this.setState(n=>({saving:!1,companyAutoPayEnabled:t,companyUpdated:!0,companyInfo:{...n.companyInfo,rowVersion:r.data.rowVersion}}))},error:r=>{this.setState({saving:!1}),R(r.error.errorMessage)}},{block:!1})})});this.state=this.initialState(),this.API=t.isPortal?be:xe}render(){if(!this.state.visible)return null;const t=B().readOnlySession||B().previewSession;return e.jsxs(ve,{show:this.state.visible,onHide:this.handleCancel,size:"md","data-testid":"modal-stripePaymentMethodSetup",children:[e.jsx(O.Header,{closeButton:!0,children:e.jsx(O.Title,{children:"Payments On File"})}),e.jsxs(O.Body,{children:[this.state.loading&&e.jsx(re,{}),!this.state.loading&&e.jsxs(e.Fragment,{children:[!this.state.newPaymentMethod&&e.jsx(Wa,{paymentMethods:this.state.paymentMethods,disabled:this.state.saving||t,onDetach:this.handleDetach,onDefault:this.handleDefault,enableOptions:!0}),this.state.newPaymentMethod&&this.state.clientSecret&&e.jsx(qa,{clientSecret:this.state.clientSecret,stripePublishableKey:this.state.stripePublishableKey,stripeAccountId:this.state.stripeAccountId,onConfirm:this.handleConfirm}),e.jsxs(L,{variant:"link",className:"p-0 mt-3",disabled:this.state.saving||t,onClick:()=>this.handleNewPaymentMethod(!this.state.newPaymentMethod),"data-testid":"btn-stripePaymentMethodSetup-addPaymentMethod",children:[!this.state.newPaymentMethod&&"Add a new payment method",this.state.newPaymentMethod&&"Use a saved payment method"]},"btnNewPaymentMethod"),!this.state.newPaymentMethod&&this.state.accountAutoPayEnabled&&e.jsx(y,{children:e.jsx(x,{children:e.jsxs(k,{children:[e.jsx(W,{value:this.state.companyAutoPayEnabled,label:"Enable Auto-Pay for Future Renewal Subscriptions",formControl:!1,className:"mt-1 ml-2",disabled:this.state.saving||t,onChange:this.handleAutoPay,"data-testid":"switch-stripePaymentMethodSetup-enableAutoPay"}),e.jsx("div",{className:"ml-5",children:`By enrolling in Auto-Pay, you allow ${this.state.accountName} to process future subscription payments automatically
3														 using your default payment method in accordance with their terms.`})]})})})]})]}),e.jsx(O.Footer,{children:e.jsx(L,{variant:"default",onClick:this.handleCancel,"data-testid":"btn-stripePaymentMethodSetup-close",children:"Close"})})]})}}const qe={facebook:null,twitter:null,linkedIn:null,instagram:null,tiktok:null},ze={facebook:[],twitter:[],linkedIn:[],instagram:[],tiktok:[]},pr=E.forwardRef((a,o)=>{const[t,s]=E.useState(!1),[r,n]=E.useState(!0),[l,d]=E.useState(""),[p,m]=E.useState(!1),[c,b]=E.useState(ze),[u,C]=E.useState(qe),I=E.useRef(null),P=E.useRef(null),S=(M=[])=>{if(!Array.isArray(M)||M.length===0)return ze;const U={facebook:/facebook\.com\/(.+?)(?:\?|#|$)/i,twitter:/(?:twitter\.com\/(.+?)(?:\?|#|$)|x\.com\/(.+?)(?:\?|#|$))/i,linkedIn:/linkedin\.com\/((?:in|company)\/.+?)(?:\?|#|$)/i,instagram:/instagram\.com\/(.+?)(?:\?|#|$)/i,tiktok:/(?:vm\.|m\.|www\.)?tiktok\.com\/@(.+?)(?:\?|#|\/|$)/i},ee=Object.keys(U).reduce((z,Y)=>(z[Y]=new Set,z),{});return M.forEach(z=>{if(!z)return;const Y=String(z).trim();
3Object.entries(U).forEach(([Ne,Pe])=>{Pe.test(Y)&&ee[Ne].add(Y)})}),Object.fromEntries(Object.entries(ee).map(([z,Y])=>[z,Array.from(Y)]))},h=()=>[...u.facebook?[u.facebook]:[],...u.twitter?[u.twitter]:[],...u.linkedIn?[u.linkedIn]:[],...u.instagram?[u.instagram]:[],...u.tiktok?[u.tiktok]:[]],g=M=>{if(!M){R("Please complete the search field to search.");return}n(!0),ye.get("/webScraping/searchSocialMedia",{searchText:M},{success:({data:U})=>{b(S(U.socialMediaLinks)),C(qe),n(!1)},error:({error:U})=>{R(U.errorMessage),n(!1)}})},v=(M,U={})=>{s(!0),g(M==null?void 0:M.searchText),d(M==null?void 0:M.searchText),I.current=M,P.current=U},f=()=>{s(!1),n(!0),d(null),m(!1),b(ze),C(qe),I.current=null,P.current=null},j=()=>{var M;(M=P.current)!=null&&M.onConfirm&&P.current.onConfirm(h()),f()};E.useImperativeHandle(o,()=>({open:v,close:f,confirm:j}));const w=M=>e.jsx("div",{className:"d-flex flex-column",children:c==null?void 0:c[M].map(U=>{const ee=u[M]===U;return e.jsxs("div",{className:"d-flex align-items-center justify-content-between",children:[e.jsx("a",{href:U,target:"_blank",rel:"noreferrer",style:{textDecoration:ee?"underline":null},children:U}),e.jsx(W,{"data-testid":`switch-socialsModal-${U}`,value:ee,onChange:Se=>C(z=>({...z,[M]:Se?U:null}))})]},U)})}),T=()=>{var U,ee,Se,z,Y,Ne,Pe,ct,ht,ut;const M=((U=c==null?void 0:c.facebook)==null?void 0:U.length)===0&&((ee=c==null?void 0:c.twitter)==null?void 0:ee.length)===0&&((Se=c==null?void 0:c.linkedIn)==null?void 0:Se.length)===0&&((z=c==null?void 0:c.instagram)==null?void 0:z.length)===0&&((Y=c==null?void 0:c.tiktok)==null?void 0:Y.length)===0;return r?e.jsx(re,{className:"mt-4 mb-4"}):M?e.jsx("div",{className:"d-flex justify-content-center mt-3 mb-3",children:"No links for social media were found"}):e.jsxs("div",{className:"d-flex flex-column",children:[((Ne=c==null?void 0:c.facebook)==null?void 0:Ne.length)>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h5",{className:"border-bottom",children:"Facebook"}),w("facebook")]}),((Pe=c==null?void 0:c.twitter)==null?void 0:Pe.length)>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h5",{className:"border-bottom",children:"Twitter"}),w("twitter")]}),((ct=c==null?void 0:c.linkedIn)==null?void 0:ct.length)>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h5",{className:"border-bottom",children:"LinkedIn"}),w("linkedIn")]}),((ht=c==null?void 0:c.instagram)==null?void 0:ht.length)>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h5",{className:"border-bottom",children:"Instagram"}),w("instagram")]}),((ut=c==null?void 0:c.tiktok)==null?void 0:ut.length)>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h5",{className:"border-bottom",children:"TikTok"}),w("tiktok")]})]})};if(!t)return null;const q=!u.facebook&&!u.twitter&&!u.linkedIn&&!u.instagram&&!u.tiktok;return e.jsxs(O,{backdrop:"static",show:t,onHide:f,size:"md",className:"socials-suggestion-modal",dialogClassName:"modal-dialog-scrollable","data-testid":"modal-socialsSuggestion",children:[e.jsx(O.Header,{closeButton:!0,children:e.jsx(O.Title,{children:"Social media suggestions"})}),e.jsxs(O.Body,{children:[T(),p?e.jsxs(k,{className:"d-flex mt-4 mb-3 w-100",children:[e.jsx(fe,{value:l,onChange:M=>d(M),"data-testid":"input-socialsModal"}),e.jsx(A,{htmlFor:"searchText",helpText:'Write the name of the company or the name plus the social media name to get better results. (e.g "Company name" Facebook)',children:"Search text"}),e.jsx(ge,{className:"ml-4",disabled:!l,onClick:()=>g(l),"data-testid":"btn-socialsModal-search",children:"Search"})]}):e.jsx("div",{className:"d-flex justify-content-center mt-4",children:e.jsx(ge,{variant:"link",onClick:()=>m(!0),"data-testid":"btn-socialsModal-2",children:"Not happy with the results? Try different search terms"})})]}),e.jsxs(O.Footer,{children:[e.jsx(ge,{variant:"danger",onClick:f,"data-testid":"btn-socialsSuggestion-cancel",children:"Cancel"}),e.jsx(ge,{variant:"success",disabled:q,onClick:j,"data-testid":"btn-socialsSuggestion-confirm",children:"Confirm selection"})]})]})});class Fn extends N.Component{constructor(t){super(t);i(this,"open",t=>{this.setState({visible:!0,modalTitle:t.modalTitle,url:t.url,onSave:t.onSave,form:this.props.form,saving:!1,isCompany:t.isCompany,isPortal:t.isPortal})});i(this,"close",()=>{this.setState({visible:!1,saving:!1,dirty:!1})});i(this,"_initialState",()=>({params:{},callbacks:{},visible:!1,form:{},saving:!1,dirty:!1}));i(this,"onChange",t=>{this.props.onChange&&this.props.onChange(t)}
3);i(this,"_handleChange",t=>{this.setState({form:t})});i(this,"_handleCancel",()=>{this.close()});i(this,"_handleSave",()=>{if(this.state.saving)return;let t=xe;this.state.isPortal&&(t=be),this.setState({saving:!0},()=>{const{url:s}=this.state,r=this.saveRequest();t.Biz.post(s,r,{success:n=>{this.state.onSave&&this.state.onSave(n.data.entityId),se(n.message),this.close()},error:n=>{R(n.error.errorMessage),this.setState({saving:!1})}},{block:!0})})});i(this,"_handleDirt",()=>{this.setState({dirty:!0})});i(this,"saveRequest",()=>({entityId:this.props.selectedId,facebookSet:this.state.form.facebookSet,facebook:this.state.form.facebook,linkedInSet:this.state.form.linkedInSet,linkedIn:this.state.form.linkedIn,twitterSet:this.state.form.twitterSet,twitter:this.state.form.twitter,instagramSet:this.state.form.instagramSet,instagram:this.state.form.instagram,tikTokSet:this.state.form.tikTokSet,tikTok:this.state.form.tikTok,rowVersion:this.state.form.rowVersion}));i(this,"parseSocialMediaLinks",t=>{if(!(t!=null&&t.length))return{};const s={facebook:/facebook\.com\/(.+?)(?:\?|#|$)/i,twitter:/(?:twitter\.com\/(.+?)(?:\?|#|$)|x\.com\/(.+?)(?:\?|#|$))/i,linkedIn:/linkedin\.com\/((?:in|company)\/.+?)(?:\?|#|$)/i,instagram:/instagram\.com\/(.+?)(?:\?|#|$)/i,tiktok:/(?:vm\.|m\.|www\.)?tiktok\.com\/@(.+?)(?:\?|#|\/|$)/i},r={};return Object.keys(s).forEach(n=>{r[n]=null}),t.forEach(n=>{Object.keys(s).forEach(l=>{const d=n.match(s[l]);d&&(l==="twitter"?r[l]=d[1]||d[2]:r[l]=d[1])})}),r});i(this,"confirmSocialsSelection",t=>{const s=this.parseSocialMediaLinks(t);this.setState(r=>{const n={...r.form};return s.facebook&&(n.facebook=s.facebook,n.facebookSet=!0),s.twitter&&(n.twitter=s.twitter,n.twitterSet=!0),s.linkedIn&&(n.linkedIn=s.linkedIn,n.linkedInSet=!0),s.instagram&&(n.instagram=s.instagram,n.instagramSet=!0),s.tiktok&&(n.tikTok=s.tiktok,n.tikTokSet=!0),{form:n,dirty:!0}})});i(this,"handleSearchSocialMedia",()=>{this.socialsSuggestionModalRef.current.open({searchText:this.state.form.companyName},{onConfirm:this.confirmSocialsSelection})});i(this,"handleChangeFacebook",t=>{this.setState(s=>({form:{...s.form,facebook:t},dirty:!0}))});i(this,"handleChangeTwitter",t=>{this.setState(s=>({form:{...s.form,twitter:t},dirty:!0}))});i(this,"handleChangeLinkedIn",t=>{this.setState(s=>({form:{...s.form,linkedIn:t},dirty:!0}))});i(this,"handleChangeInstagram",t=>{this.setState(s=>({form:{...s.form,instagram:t},dirty:!0}))});i(this,"handleChangeTikTok",t=>{this.setState(s=>({form:{...s.form,tikTok:t},dirty:!0}))});this.state=this._initialState(),this.socialsSuggestionModalRef=N.createRef()}render(){if(!this.state.visible)return null;let t=!0;B().userActive==null?t=!B().accountActive:t=!B().userActive;const s=!this.state.dirty||this.state.saving;return e.jsxs(e.Fragment,{children:[e.jsx(pr,{ref:this.socialsSuggestionModalRef}),e.jsxs(ve,{show:this.state.visible,size:"md",centered:"false",onEnterKey:this._handleSave,onHide:this._handleCancel,enterDisabled:s,"data-testid":"modal-socials",children:[e.jsx(O.Header,{closeButton:!0,children:e.jsx(O.Title,{children:this.state.modalTitle})}),e.jsx(O.Body,{children:e.jsx(nt,{onChange:this._handleChange,onDirt:this._handleDirt,values:this.state.form,disabled:this.state.saving,children:e.jsx(y,{children:e.jsxs(x,{md:12,children:[e.jsx(y,{hidden:!B().standardAISolutionsEnabled||!this.state.isCompany,children:e.jsx(ke,{tooltip:"Search social media on the web using the name of the company",style:{to
3p:"0px",right:"-5px"},tooltipPlacement:"top",onClick:this.handleSearchSocialMedia})}),e.jsxs(y,{children:[e.jsx(k,{children:e.jsx(W,{className:"mt-2",name:"facebookSet","data-testid":"switch-socialsModal-1"})}),e.jsxs(k,{className:"w-75",children:[e.jsx(pe,{"data-testid":"input-socialsModal-facebook",name:"facebook",onChangeCallback:this.handleChangeFacebook,socialName:"Facebook",required:!0,disabled:t,value:this.state.form.facebook,isCompany:this.state.isCompany}),e.jsx(A,{htmlFor:"facebook",children:"Facebook"})]})]}),e.jsxs(y,{children:[e.jsx(k,{children:e.jsx(W,{className:"mt-2",name:"twitterSet","data-testid":"switch-socialsModal-2"})}),e.jsxs(k,{className:"w-75",children:[e.jsx(pe,{"data-testid":"input-socialsModal-twitter",name:"twitter",onChangeCallback:this.handleChangeTwitter,socialName:"Twitter",required:!0,disabled:t,value:this.state.form.twitter,isCompany:this.state.isCompany}),e.jsx(A,{htmlFor:"twitter",children:"Twitter"})]})]}),e.jsxs(y,{children:[e.jsx(k,{children:e.jsx(W,{className:"mt-2",name:"linkedInSet","data-testid":"switch-socialsModal-3"})}),e.jsxs(k,{className:"w-75",children:[e.jsx(pe,{"data-testid":"input-socialsModal-linkedIn",name:"linkedIn",onChangeCallback:this.handleChangeLinkedIn,socialName:"LinkedIn",required:!0,disabled:t,value:this.state.form.linkedIn,isCompany:this.state.isCompany}),e.jsx(A,{htmlFor:"linkedIn",children:"LinkedIn"})]})]}),e.jsxs(y,{children:[e.jsx(k,{children:e.jsx(W,{className:"mt-2",name:"instagramSet","data-testid":"switch-socialsModal-4"})}),e.jsxs(k,{className:"w-75",children:[e.jsx(pe,{"data-testid":"input-socialsModal-instagram",name:"instagram",onChangeCallback:this.handleChangeInstagram,socialName:"Instagram",required:!0,disabled:t,value:this.state.form.instagram,isCompany:this.state.isCompany}),e.jsx(A,{htmlFor:"instagram",children:"Instagram"})]})]}),e.jsxs(y,{children:[e.jsx(k,{children:e.jsx(W,{className:"mt-2",name:"tikTokSet","data-testid":"switch-socialsModal-5"})}),e.jsxs(k,{className:"w-75",children:[e.jsx(pe,{"data-testid":"input-socialsModal-tiktok",name:"tikTok",onChangeCallback:this.handleChangeTikTok,socialName:"TikTok",required:!0,disabled:t,value:this.state.form.tikTok,isCompany:this.state.isCompany}),e.jsx(A,{htmlFor:"tikTok",children:"TikTok"})]})]})]})})})}),e.jsxs(O.Footer,{children:[e.jsx(L,{variant:"danger",onClick:this._handleCancel,"data-testid":"btn-socials-cancel",children:"Cancel"}),e.jsx(L,{variant:"success",onClick:this._handleSave,disabled:s,"data-testid":"btn-socials-save",children:"Save"})]})]})]})}}class Ln extends N.Component{constructor(t){super(t);i(this,"handleEdit",()=>{this.setState(t=>({editMode:!t.editMode}))});i(this,"handleSave",()=>{this.setState({editMode:!1},()=>this.props.onSave&&this.props.onSave())});this.state={editMode:!1}}render(){if(!this.state.editMode){const t=this.props.businessCategory.businessCategories.map(s=>s.label);return e.jsxs("div",{className:"d-flex flex-row align-items-center",children:[e.jsx("div",{className:"font-weight-bold align-self-start mr-1",children:`${this.props.businessCategory.label}: `}),t.join(", "),!this.props.readOnly&&e.jsx(L,{"data-testid":"btn-businessCategories",variant:"link",size:"xs",className:`p-0 align-self-start ${t.length===0?"":"pl-1"}`,onClick:this.handleEdit,children:t.length===0?"Add":"Modify"})]})}return e.jsx(y,{"data-testid":"businessCategories-editor",children:e.jsx(x,{md:12,lg:6,children:e.jsx(Ss,{entityId:this.props.entityId,systemFieldCode:Cs.BC,includeHiddenOptions:!0,autoSave:!0,sortOptions:(t,s)=>t.label.localeCompare(s.label),onSave:this.handleSave})})})}}class me extends N.Component{constructor(t){super(t);i(this,"tabWillChange",async()=>new Promise(t=>{if(this.state.dirty&&!this.disableSave()&&!this.disableAutoSave()){this._handleSubmit(!1,t);return}t()}));i(this,"initialState",()=>({}));i(this,"initialForm",()=>({}));i(this,"renderForm",()=>null);i(this,"urls",()=>({}));i(this,"getRequest",()=>null);i(this,"saveRequest",()=>null);i(this,"ready",()=>null);i(this,"beforeSave",t=>{t()});i(this,"disableSave",()=>!1);i(this,"disableAutoSave",()=>!1);i(this,"_get",()=>{if(!this.props.active)return;const t=this.urls().get;t&&this.setState({loading:!0},()=>
3{const s=this.getRequest();new bt().get(t,s,{success:r=>{const n=this.formatGetData?this.formatGetData(r.data):r.data;this.setState({form:n,dirty:!1,loading:!1,originalForm:n},this.ready)},error:r=>{R(r.error.errorMessage),this.setState({loading:!1})}})})});i(this,"_save",(t,s)=>{const r=this.saveRequest();new bt().post(t,r,{success:n=>{se(n.message),s&&s(!0)},error:n=>{R(n.error.errorMessage),s&&s(!1)}})});i(this,"_handleChange",(t,s)=>{this.setState({form:t,dirty:!0},s)});i(this,"_handleSubmit",(t=!0,s=null)=>{this.beforeSave(()=>{const r=this.urls().save;if(!r){s&&s();return}this.setState({loading:!0},()=>{this._save(r,n=>{n&&t?this._get():this.setState({loading:!1,dirty:!1}),s&&s()})})})});i(this,"_handleCancel",()=>{this.setState(t=>({form:t.originalForm,dirty:!1}),()=>{this.props.onCancel&&this.props.onCancel()})});this.API=t.isPortal?be:xe,this.nomenclatures=t.isPortal?B().nomenclatures:B().nomenclatures,this.state={...this.initialState(),loading:!1,form:this.initialForm()}}componentDidMount(){this._get()}componentDidUpdate(t){this.props.active!==t.active&&this.props.active&&this._get()}componentWillUnmount(){this.props.active&&this.state.dirty&&!this.disableSave()&&!this.disableAutoSave()&&this._save(this.urls().save)}render(){return this.props.active?e.jsx(nt,{values:this.state.form,onChange:this._handleChange,onSubmit:()=>this._handleSubmit(),children:this.state.loading?e.jsx(re,{}):e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsx(x,{children:this.renderForm()})}),e.jsxs(y,{className:"mt-3 d-flex justify-content-end",children:[e.jsx(L,{variant:"danger",className:"margin-right-5",onClick:this._handleCancel,"data-testid":"btn-customBaseTab-cancel",children:"Cancel"}),e.jsx(L,{className:"ml-1",variant:"success",onClick:()=>this._handleSubmit(),disabled:!this.state.dirty||this.disableSave(),"data-testid":"btn-customBaseTab-saveChanges",children:"Save Changes"})]})]})}):null}}const gr=N.lazy(()=>Is(()=>import("./BusinessLandingLayout-C048BWuq.js"),__vite__mapDeps([0,1,2,3])));class fr extends N.Component{constructor(t){super(t);i(this,"open",t=>{this.setState({visible:!0,loading:!0,entityName:t.entityName,customerId:t.customerId,companyId:t.companyId},this.getBusinessPageInfo)});i(this,"close",()=>{this.setState(this._initialState())});i(this,"getBusinessPageInfo",()=>{const t={customerId:this.state.customerId,companyId:this.state.companyId};this.API.Biz.get("/businessPage/getBusinessPage",t,{success:s=>{this.setState({businessPageInfo:s.data,loading:!1})},error:s=>{R(s.error.errorMessage),this.close()}})});i(this,"_initialState",()=>({visible:!1,loading:!1,customerId:null,companyId:null,businessPageInfo:null}));this.state=this._initialState(),this.API=t.isPortal?be:xe}render(){return this.state.visible?e.jsxs(ve,{show:this.state.visible,backdrop:"static",onHide:this.close,size:"xl","data-testid":"modal-businessPagePreview",children:[e.jsx(O.Header,{closeButton:!0,children:e.jsx(O.Title,{children:"Business Page Preview"})}),e.jsx(O.Body,{className:"p-0",children:this.state.loading?e.jsx(re,{}):e.jsx(gr,{businessPage:this.state.businessPageInfo,isPreview:!0})})]}):null}}class br extends me{constructor(){super(...arguments);i(this,"urls",()=>({get:this.API.Biz.url("/businessPage/getDesign"),save:this.API.Biz.url("/businessPage/saveDesign")}));i(this,"getRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId}));i(this,"saveRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId,templateColor:this.state.form.templateColor,buttonFontColor:this.state.form.buttonFontColor,submissionsEmail:this.state.form.submissionsEmail,subdomain:this.state.form.subdomain,businessPageStatusCode:this.state.form.businessPageStatusCode,rowVersion:this.state.form.rowVersion}));i(this,"handleTemplateColorChange",t=>{this.setState(s=>({form:{...s.form,templateColor:t},dirty:!0}))});i(this,"handleButtonFontColorChange",t=>{this.setState(s=>({form:{...s.form,buttonFontColor:t},dirty:!0}))});i(this,"handlePreviewPage",()=>{if(this.state.originalForm.businessPageStatusCode===Ce&&this.state.form.active){window.open(Ts(this.state.form.businessPageUrl),"_blank","noopener,noreferrer");return}this._businessPagePreviewModalRef.open({customerId:this.props.customerId,companyId:this.props.companyId})});i(this,"handleToggleStatus",()=>{this.setState(t=>({form:{...t.form,businessPageStatusCode:t.form.businessPageStatusCode===Ce?Pa:Ce},dirty:!0}))});i(this,"getColorsSuggestion",()=>{var s;const t={storageKey:(s=this.props.entityData)==null?void 0:s.avatarStorageKey};t.storageKey&&ye.post("/suggestion/SuggestPageColors",t,{success:({data:r})=>{this.setState(n=>({form:{...n.form,templateColor:r.templateColor,buttonFontColor:r.buttonFontColor},dirty:!0}))},error:r=>{R(r.error.errorMessage)}})});i(this,"renderForm",()=>{var r,n;const t=((r=this.state.originalForm)==null?void 0:r.businessPageStatusCode)===Ce,s=this.state.form.businessPageStatusCode===Ce;return e.jsxs(e.Fragment,{children:[e.jsxs(y,{className:"d-flex align-items-center",children:[e.jsx(x,{md:4,children:e.jsxs(k,{children:[e.jsx(fe,{name:"subdomain","data-testid":"input-designTab-subdomain"}),e.jsx(A,{required:!0,children:"Subdomain"})]})}),e.jsx(x,{md:2,children:e.jsx(k,{children:e.jsx(L,{variant:"link",onClick:this.handlePreviewPage,"data-testid":"btn-designTab-previewPage",children:t&&this.state.form.active?"Go to Page":"Preview Page"})})}),e.jsx(x,{children:e.jsxs(k,{children:["Your page is currently"," ",this.state.form.active?e.jsxs(e.Fragment,{children:[e.jsx("b",{className:Te("body-medium",{"text-green":s,"text-red":!s}),children:s?"PUBLISHED":"UNPUBLISHED"}),e.jsx(L,{className:"ml-3",variant:s?"danger":"success",onClick:this.handleToggleStatus,"data-testid":"btn-designTab-togglePublish",children:s?"Unpublish":"Publish"})]}):e.jsxs("span",{children:[e.jsx("b",{children:"inactive"}),".",e.jsx("br",{}),"Before publishing it, you need to enable it in the Membership Directory tab."]})]})})]}),e.jsx(y,{children:e.jsx(x,{md:4,children:e.jsxs(k,{children:[e.jsx(fe,{name:"submissionsEmail","data-testid":"input-designTab-submissionsEmail"}),e.jsx(A,{children:"Submissions Email"})]})})}),e.jsx(y,{className:"mt-2",children:e.jsx(x,{md:4,className:"d-flex flex-row align-items-center",children:e.jsxs(ke,{tooltip:"Suggest colors with AI based on the Logo",onClick:this.getColorsSuggestion,style:{to
3p:"0px",right:"-10px"},hidden:this.props.isPortal||!((n=this.props.entityData)!=null&&n.avatarStorageKey),children:[e.jsx(A,{className:"mr-4",required:!0,children:"Template Color"}),e.jsx(xt,{"data-testid":"input-designTab-templateColor",value:this.state.form.templateColor,placement:"right",onChange:this.handleTemplateColorChange})]})})}),e.jsx(y,{className:"mt-2",children:e.jsxs(x,{md:4,className:"d-flex flex-row align-items-center",children:[e.jsx(A,{className:"mr-4",required:!0,children:"Button Font Color"}),e.jsx(xt,{"data-testid":"input-designTab-buttonFontColor",value:this.state.form.buttonFontColor,placement:"right",onChange:this.handleButtonFontColorChange})]})}),e.jsx(fr,{ref:l=>this._businessPagePreviewModalRef=l,isPortal:this.props.isPortal})]})})}}class xr extends me{constructor(){super(...arguments);i(this,"urls",()=>({get:this.API.Biz.url("/businessPage/getDetailedDescription"),save:this.API.Biz.url("/businessPage/saveDetailedDescription")}));i(this,"getRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId}));i(this,"saveRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId,descriptionHeader:this.state.form.includeDetailedDescription?this.state.form.descriptionHeader:null,descriptionBody:this.state.form.includeDetailedDescription?this.state.form.descriptionBody:null,rowVersion:this.state.form.rowVersion}));i(this,"parseMarkdownToHtml",t=>t.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*?)\*\*/gim,"<strong>$1</strong>").replace(/\*(.*?)\*/gim,"<em>$1</em>").replace(/!\[(.*?)\]\((.*?)\)/gim,"<img alt='$1' src='$2' />").replace(/\[(.*?)\]\((.*?)\)/gim,"<a href='$2'>$1</a>").replace(/\n$/gim,"<br />"));i(this,"getDetailedDescriptionAISuggestion",()=>{var r,n,l,d,p,m,c,b;const t=this.props.entityData,s={companyName:t.companyName,companyWebsite:t.companyWebsite,companyAddress:{city:(r=t.companyAddress)==null?void 0:r.city,countryName:(n=t.companyAddress)==null?void 0:n.countryName,county:(l=t.companyAddress)==null?void 0:l.county,stateName:(d=t.companyAddress)==null?void 0:d.state,province:(p=t.companyAddress)==null?void 0:p.province,street1:(m=t.companyAddress)==null?void 0:m.street1,street2:(c=t.companyAddress)==null?void 0:c.street2,zip:(b=t.companyAddress)==null?void 0:b.zip}};ye.post("/suggestion/suggestCompanyDetailedDescription",s,{success:({data:u})=>{this.setState(C=>({dirty:!0,form:{...C.form,descriptionBody:{html:this.parseMarkdownToHtml(u.response),editorState:null}}}))},error:u=>{R(u.error.errorMessage)}})});i(this,"renderForm",()=>e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsx(x,{md:10,children:e.jsx(W,{name:"includeDetailedDescription",label:"Include Detailed Description","data-testid":"switch-detailedDescription"})})}),this.state.form.includeDetailedDescription&&e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsx(x,{md:10,children:e.jsxs(k,{children:[e.jsx(fe,{name:"descriptionHeader","data-testid":"input-detailedDescriptionTab-header"}),e.jsx(A,{required:!0,children:"Description Header"})]})})}),e.jsx(y,{className:"mt-2",children:e.jsx(x,{md:10,children:e.jsx(k,{children:e.jsx(ke,{tooltip:"Create description with AI",onClick:this.getDetailedDescriptionAISuggestion,hidden:this.props.isPortal,children:e.jsx(Lt,{"data-testid":"input-detailedDescriptionTab-body",name:"descriptionBody",formControl:!0,imageUploaderDigitalResourceTargetName:"content of the Description Body",enablePastingImages:!0,enableFontBackgroundColor:!0})})})})})]})]}))}}const vr=({dayCode:a,form:o,isPortal:t,onChange:s})=>{const r=m=>{s({...o,isClosed:m,...m&&{startTime:null,endTime:null}})},n=(m,c)=>{s({...o,[m]:(c==null?void 0:c.value)||null})},{startTime:l,endTime:d,isClosed:p}=o;return e.jsxs(y,{children:[e.jsx(x,{md:2,className:"mt-2 text-center",children:e.jsx(A,{className:"mb-0",children:Qs(a)})}),e.jsx(x,{children:e.jsxs(y,{children:[e.jsx(x,{md:6,children:e.jsxs(k,{children:[e.jsx(Ae,{value:l,disabled:p,isPortal:t,onChange:m=>n("startTime",m)}),e.jsx(A,{required:!p,children:"Start Time"})]})}),e.jsx(x,{md:6,children:e.jsxs(k,{children:[e.jsx(Ae,{value:d,disabled:p,isPortal:t,onChange:m=>n("endTime",m)}),e.jsx(A,{required:!p,children:"End Time"})]})})]})}),e.jsx(x,{className:"mt-2",children:e.jsx(k,{children:e.jsx(W,{"data-testid":"switch-businessOpeningHours",value:p,label:"Is Closed",labelClassName:"mb-0",onChange:r})})})]})};class yr extends me{constructor(){super(...arguments);i(this,"initialForm",()=>({businessOpeningHours:{}}));i(this,"urls",()=>({get:this.API.Biz.url("/businessPage/getBusinessOpeningHours"),save:this.API.Biz.url("/businessPage/saveBusinessOpeningHours")}));i(this,"getRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId}));i(this,"formatGetData",t=>({...t,businessOpeningHours:Object.keys(t.businessOpeningHours).reduce((s,r)=>{const n=t.businessOpeningHours[r],l=te(n.startTime),d=te(n.endTime);return{...s,[n.dayCode]:{...n,startTime:V(l),endTime:V(d)}}},{})}));i(this,"saveRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId,includeBusinessOpeningHours:this.state.form.includeBusinessOpeningHours,businessOpeningHours:Object.keys(this.state.form.businessOpeningHours).reduce((t,s)=>{const r=this.state.form.businessOpeningHours[s];return{...t,[r.dayCode]:{...r,startTime:Ee(r.startTime),endTime:Ee(r.endTime)}}},{}),rowVersion:this.state.form.rowVersion}));i(this,"handleDayItemChange",(t,s)=>{this.setState(r=>({form:{...r.form,businessOpeningHours:{...r.form.businessOpeningHours,[t]:{...r.form.businessOpeningHours[t],...s}}},dirty:!0}))});i(this,"applyAISuggestions",()=>
3{Object.keys(this.state.aiSuggestedHours).forEach(t=>{const s=this.state.aiSuggestedHours[t],r=t.toUpperCase();if(s.isClosed)this.handleDayItemChange(r,{isClosed:!0,startTime:null,endTime:null});else{const n=te(s.startTime),l=te(s.endTime);this.handleDayItemChange(r,{isClosed:!1,startTime:V(n),endTime:V(l)})}})});i(this,"searchCompanyHours",()=>{var r,n,l,d,p,m,c,b;const t=this.props.entityData,s={companyName:t.companyName,companyWebsite:t.companyWebsite,companyAddress:{city:(r=t.companyAddress)==null?void 0:r.city,countryName:(n=t.companyAddress)==null?void 0:n.countryName,county:(l=t.companyAddress)==null?void 0:l.county,stateName:(d=t.companyAddress)==null?void 0:d.state,province:(p=t.companyAddress)==null?void 0:p.province,street1:(m=t.companyAddress)==null?void 0:m.street1,street2:(c=t.companyAddress)==null?void 0:c.street2,zip:(b=t.companyAddress)==null?void 0:b.zip}};ye.post("/webSearch/searchCompanyHours",s,{success:({data:u})=>{this.setState({aiSuggestedHours:u})},error:u=>{R(u.error.errorMessage)}})});i(this,"renderDayItem",t=>{if(!this.state.form.businessOpeningHours)return null;const s=this.state.form.businessOpeningHours[t];return e.jsx(vr,{dayCode:s.dayCode,form:s,isPortal:this.props.isPortal,onChange:r=>this.handleDayItemChange(t,r)})});i(this,"renderAISuggestions",()=>this.state.aiSuggestedHours?e.jsxs(e.Fragment,{children:[e.jsx("h6",{children:"AI suggested hours:"}),e.jsx("div",{className:"d-flex flex-column",children:Object.keys(this.state.aiSuggestedHours).map((t,s)=>{const r=this.state.aiSuggestedHours[t];return e.jsxs("div",{className:"d-flex mb-2",children:[e.jsxs(x,{md:4,className:"mr-1 text-bold",children:[t.charAt(0).toUpperCase()+t.slice(1),":"]}),e.jsx(x,{className:"d-flex flex-column",children:r.isClosed?e.jsx("span",{className:"text-bold",children:"Closed"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("span",{className:"mr-1 text-bold",children:"Start time:"}),vt(r.startTime)]}),e.jsxs("div",{children:[e.jsx("span",{className:"mr-1 text-bold",children:"End time:"}),vt(r.endTime)]})]})})]},s)})}),e.jsx("div",{className:"d-flex justify-content-end",children:e.jsx(ge,{className:"mt-2 w-50",variant:"outline-primary",size:"sm",onClick:this.applyAISuggestions,"data-testid":"btn-applyAISuggestions",children:"Apply suggestions"})})]}):null);i(this,"renderForm",()=>e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsx(x,{children:e.jsx(W,{name:"includeBusinessOpeningHours",label:"Include Opening Hours","data-testid":"switch-businessOpeningHours"})})}),this.state.form.includeBusinessOpeningHours&&e.jsxs(y,{children:[e.jsxs(x,{md:8,children:[this.renderDayItem(Zs),this.renderDayItem(Js),this.renderDayItem(Xs),this.renderDayItem(ea),this.renderDayItem(ta),this.renderDayItem(sa),this.renderDayItem(aa)]}),B().standardAISolutionsEnabled&&e.jsx(x,{children:e.jsxs("div",{className:"d-flex flex-column pb-4",children:[e.jsx("div",{children:e.jsx(de,{placement:"top",overlay:e.jsx(ce,{children:"The suggestions are based on AI web search, which can be wrong due to the AI not finding the correct information on the web."}),children:e.jsxs(ge,{className:"p-0 pb-2",variant:"link",onClick:this.searchCompanyHours,"data-testid":"btn-businessOpeningHours",children:[e.jsx(F,{icon:ks}),e.jsx("span",{className:"ms-2",children:"Suggest hours with AI"})]})})}),this.renderAISuggestions()]})})]})]}))}}const Pt=[{value:3/1,label:"3:1"}];class jr extends N.Component{constructor(){super(...arguments);i(this,"handleRemove",()=>{this.props.onRemove&&this.props.onRemove(this.props.index)});i(this,"handleReCrop",()=>{const t=this.props.value.proportionsType===it.HORIZONTALRECTANGLE;this._avatarUploader._avatarCropperModal.open({visible:!0,src:Ie({storageKey:this.props.value.originalImageStorageKey}),crop:{unit:"px",...t?{width:0,height:100,aspect:Pt[0].value}:{width:100,height:100,aspect:1}},cropMessage:"To crop the image, drag the corner handles and move the crop box to the area you wish to keep.",proportionsType:this.props.value.proportionsType,setProportions:!0,customProportions:!0,forceCustomProportions:!0,horizontalRectangleOptions:Pt})});i(this,"handleOriginalAvatarSelected",t=>{const s={businessPageMediaItemId:this.props.value.businessPageMediaItemId,croppedImageInfo:Bt(null,null),originalImageStorageKey:t,proportionsType:this.props.value.proportionsType};this.props.onChange&&this.props.onChange(s,this.props.index)});i(this,"handleAvatarChange",(t,s)=>{const r={businessPageMediaItemId:this.props.value.businessPageMediaItemId,croppedImageInfo:t,originalImageStorageKey:this.props.value.originalImageStorageKey,proportionsType:s};this.props.onChange&&this.props.onChange(r,this.props.index)})}render(){const t=this.props.isPortal?Ut:Ht;return e.jsx("div",{...this.props.draggableProps,ref:this.props.innerRef,style:this.props.style,children:e.jsx(Me,{children:e.jsx(Me.Body,{className:"p-1",children:e.jsxs(y,{className:"align-items-center",children:[e.jsx(x,{md:2,className:"text-center",children:e.jsx(F,{icon:Wt})}),e.jsx(x,{className:"text-center",children:e.jsx(t,{ref:s=>{this._avatarUploader=s},size:"sm",value:this.props.value.croppedImageInfo,crop:{aspect:0,width:100,height:100}
3,targetName:"a Media Item",onChange:this.handleAvatarChange,onOriginalAvatarSelected:this.handleOriginalAvatarSelected})}),e.jsx(x,{md:2,className:"flex-0",children:e.jsx(y,{children:e.jsxs(x,{children:[!this.props.isPortal&&this.props.value.portalUserName&&e.jsx(Ns,{classNameIcon:"cursor-pointer",prependText:e.jsx(e.Fragment,{children:" "}),helpText:`Uploaded by ${this.props.value.portalUserName} (Portal User)`}),e.jsx(de,{placement:"right",overlay:e.jsx(ce,{id:"tooltip-top",children:"Delete"}),children:e.jsx(L,{disabled:this.props.disableDelete,className:"border-0 bg-transparent",variant:"light",size:"xs",onClick:this.handleRemove,"data-testid":"btn-media-1",children:e.jsx(F,{icon:$t})})}),this.props.value.croppedImageInfo.isValid&&e.jsx(de,{placement:"right",overlay:e.jsx(ce,{id:"tooltip-top",children:"Re-Crop"}),children:e.jsx(L,{className:"border-0 bg-transparent pl-1",variant:"light",onClick:this.handleReCrop,"data-testid":"btn-media-2",children:e.jsx(F,{icon:Ps})})})]})})})]})})})})}}class Sr extends N.Component{constructor(){super(...arguments);i(this,"handleChange",t=>{const s={...this.props.value,videoUrl:t};this.props.onChange&&this.props.onChange(s,this.props.index)});i(this,"handleRemove",()=>{this.props.onRemove&&this.props.onRemove(this.props.index)});i(this,"handleTestVideo",()=>{ws({params:{videoUrl:this.props.value.videoUrl}})})}render(){return e.jsx("div",{...this.props.draggableProps,ref:this.props.innerRef,style:this.props.style,children:e.jsx(Me,{children:e.jsx(Me.Body,{className:"p-1",children:e.jsxs(y,{className:"align-items-center",children:[e.jsx(x,{md:1,className:"text-center",children:e.jsx(F,{icon:Wt})}),e.jsx(x,{children:e.jsx(fe,{value:this.props.value.videoUrl||"",onChange:this.handleChange,placeholder:"Enter Video URL","data-testid":`input-videoUrl-${this.props.index}`})}),e.jsxs(x,{md:"auto",className:"flex-0",children:[e.jsx(de,{placement:"right",overlay:e.jsx(ce,{id:"tooltip-top",children:"Delete"}),children:e.jsx(L,{className:"border-0 bg-transparent ml-1",variant:"light",size:"sm",onClick:this.handleRemove,"data-testid":`btn-deleteVideo-${this.props.index}`,children:e.jsx(F,{icon:$t})})}),e.jsx(de,{placement:"right",overlay:e.jsx(ce,{id:"tooltip-top",children:"Test"}),children:e.jsx(L,{className:"border-0 bg-transparent ml-1",variant:"light",size:"sm",onClick:this.handleTestVideo,disabled:!this.props.value.videoUrl,"data-testid":`btn-testVideo-${this.props.index}`,children:e.jsx(F,{icon:Rs})})})]})]})})})})}}class Cr extends me{constructor(){super(...arguments);i(this,"initialForm",()=>({mediaItems:[],videoUrls:[]}));i(this,"urls",()=>({get:this.API.Biz.url("/businessPage/getMedia"),save:this.API.Biz.url("/businessPage/saveMedia")}));i(this,"getRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId}));i(this,"saveRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId,mediaItems:this.state.form.mediaItems,videoUrls:this.state.form.videoUrls,rowVersion:this.state.form.rowVersion}));i(this,"beforeSave",async t=>{const s=this.state.form.videoUrls.filter(n=>n.videoUrl);if((await Promise.all(s.map(n=>As(n.videoUrl)))).some(n=>!n)){R("One or more Video URLs are invalid.");return}t()});i(this,"disableSave",()=>this.state.form.mediaItems.some(t=>!t.croppedImageInfo.isValid||!t.originalImageStorageKey)||this.state.form.videoUrls.some(t=>!t.videoUrl));i(this,"getNewMediaImageInfoItem",()=>({businessPageMediaItemId:null,croppedImageInfo:Bt(null,null),originalImageStorageKey:null,proportionsType:it.SQUARE}));i(this,"hasReachedMaxImagesAmount",t=>t.length===6);i(this,"shouldDisableAddButton",t=>t.some(s=>!s.croppedImageInfo.isValid||!s.originalImageStorageKey)||this.hasReachedMaxImagesAmount(t));i(this,"getNewVideoUrlItem",()=>({businessPageVideoUrlId:null,videoUrl:""}));i(this,"hasReachedMaxVideoUrlsAmount",t=>t.length===3);i(this,"shouldDisableAddVideoUrlButton",t=>t.some(s=>!s.videoUrl)||this.hasReachedMaxVideoUrlsAmount(t));i(this,"handleModifyLogo",t=>{t.preventDefault(),this.props.onClose({modifyLogo:!0})});i(this,"renderForm",()=>this.state.form.mediaItems?e.jsxs(y,{children:[e.jsxs(x,{md:3,children:[e.jsx(A,{children:"Media Images"}),e.jsx(yt,{name:"mediaItems",comp:jr,addItemLegend:"Add Media Image",noItemsLegend:"No images found.",props:{isPortal:this.props.isPortal},newItemGetter:this.getNewMediaImageInfoItem,shouldDisableAddButton:this.shouldDisableAddButton}),this.hasReachedMaxImagesAmount(this.state.form.mediaItems)&&e.jsx("p",{className:"text-center text-red",children:"You cannot upload more images because you reached the limit."})]}),e.jsxs(x,{md:5,className:"ml-3",children:[e.jsx(A,{children:"Video URLs"}),e.jsx(yt,{name:"videoUrls",comp:Sr,addItemLegend:"Add Video URL",noItemsLegend:"No video URLs foun
3d.",newItemGetter:this.getNewVideoUrlItem,shouldDisableAddButton:this.shouldDisableAddVideoUrlButton}),this.hasReachedMaxVideoUrlsAmount(this.state.form.videoUrls)&&e.jsx("p",{className:"text-center text-red",children:"You cannot add more video URLs because you reached the limit."})]}),this.props.editEntityAllowed&&e.jsxs(x,{children:[e.jsx(y,{children:e.jsx(x,{children:e.jsx(A,{children:this.props.entityTypeCode===Es.COMPANY?this.nomenclatures.companies.singularTerm:this.nomenclatures.contacts.singularTerm})})}),e.jsx(y,{children:e.jsx(x,{children:e.jsxs("span",{children:["To modify your logo, please"," ",e.jsx("a",{href:"#",onClick:this.handleModifyLogo,style:{cursor:"pointer"},children:"click here"})]})})})]})]}):null)}}class Ir extends me{constructor(){super(...arguments);i(this,"initialForm",()=>({spotlights:[]}));i(this,"urls",()=>({get:this.API.Biz.url("/businessPage/getSpotlights"),save:this.API.Biz.url("/businessPage/saveSpotlights")}));i(this,"getRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId}));i(this,"formatGetData",t=>({...t,spotlights:t.spotlights.map(s=>({value:s,label:s}))}));i(this,"saveRequest",()=>{var t;return{customerId:this.props.customerId,companyId:this.props.companyId,spotlights:((t=this.state.form.spotlights)==null?void 0:t.map(s=>s.value))||[],rowVersion:this.state.form.rowVersion}});i(this,"getSpotlightsAISuggestions",()=>{var r,n,l,d,p,m,c,b,u,C;const t=this.props.entityData,s={companyName:t.companyName,companyWebsite:t.companyWebsite,companyDescription:(n=(r=this.props)==null?void 0:r.membershipDirectoryData)==null?void 0:n.websiteDescription,companyAddress:{city:(l=t.companyAddress)==null?void 0:l.city,countryName:(d=t.companyAddress)==null?void 0:d.countryName,county:(p=t.companyAddress)==null?void 0:p.county,stateName:(m=t.companyAddress)==null?void 0:m.state,province:(c=t.companyAddress)==null?void 0:c.province,street1:(b=t.companyAddress)==null?void 0:b.street1,street2:(u=t.companyAddress)==null?void 0:u.street2,zip:(C=t.companyAddress)==null?void 0:C.zip}};ye.post("/webSearch/suggestSpotlights",s,{success:({data:I})=>{this.setState(P=>({dirty:!0,form:{...P.form,spotlights:[...P.form.spotlights||[],...I.spotlights.map(S=>({value:S,label:S,__isNew__:!0}))]}}))},error:I=>{R(I.error.errorMessage)}})});i(this,"renderForm",()=>e.jsx(y,{children:e.jsx(x,{md:4,children:e.jsx(k,{children:e.jsxs(ke,{tooltip:"Suggest Spotlights with AI",onClick:this.getSpotlightsAISuggestions,hidden:this.props.isPortal,children:[e.jsx(ot,{"data-testid":"combo-spotlightsTab-spotlights",name:"spotlights"}),e.jsx(A,{children:"Spotlights"})]})})})}))}}class Tr extends me{constructor(){super(...arguments);i(this,"initialForm",()=>({seoTags:[]}));i(this,"urls",()=>({get:this.API.Biz.url("/businessPage/getSEOTags"),save:this.API.Biz.url("/businessPage/saveSEOTags")}));i(this,"getRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId}));i(this,"formatGetData",t=>({...t,seoTags:t.seoTags.map(s=>({value:s,label:s}))}));i(this,"saveRequest",()=>{var t;return{customerId:this.props.customerId,companyId:this.props.companyId,seoTags:((t=this.state.form.seoTags)==null?void 0:t.map(s=>s.value))||[],rowVersion:this.state.form.rowVersion}});i(this,"getSEOTagsAISuggestions",()=>{const t={companyName:this.props.entityData.companyName,companyDescription:this.props.membershipDirectoryData.websiteDescription,tags:this.state.form.seoTags?this.state.form.seoTags.map(s=>s.label):[]};ye.post("/suggestion/suggestSEOTags",t,{success:({data:s})=>{this.setState(r=>({dirty:!0,form:{...r.form,seoTags:[...r.form.seoTags||[],...s.tags.map(n=>({value:n,label:n,__isNew__:!0}))]}}))},error:s=>{R(s.error.errorMessage)}})});i(this,"renderForm",()=>e.jsx(y,{children:e.jsx(x,{md:4,children:e.jsx(k,{children:e.jsxs(ke,{tooltip:"Suggest SEO tags with AI",onClick:this.getSEOTagsAISuggestions,hidden:this.props.isPortal,children:[e.jsx(ot,{"data-testid":"combo-seoTagsTab-seoTags",name:"seoTags"}),e.jsx(A,{children:"SEO Tags"})]})})})}))}}class kr extends me{constructor(){super(...arguments);i(this,"initialForm",()=>({redirectSlugs:[]}));i(this,"urls",()=>({get:this.API.Biz.url("/businessPage/getRedirectSlugs"),save:this.API.Biz.url("/businessPage/saveRedirectSlugs")}));i(this,"getRequest",()=>({customerId:this.props.customerId,companyId:this.props.companyId}));i(this,"formatGetData",t=>({...t,sitePages:JSON.parse(t.websiteSettings).sitePages,redirectSlugs:t.redirectSlugs.map(s=>({value:s,label:s}))}));i(this,"validate",()=>{var t;for(let s=0;s<((t=this.state.form.redirectSlugs)==null?void 0:t.length);s++){const r=this.state.form.redirectSlugs[s].value.toLowerCase();if(!Ha(r))return`Redirect Slugs must be valid path names (${r}).`;if(r==="/forms")return'"forms" is a reserved name.';if(r==="/resetcache")return'"resetcache" is a reserved name.';if(r==="/memberportal")return'"memberPortal" is a reserved name.';const n=d=>Kt(null,d,r);if(this.state.form.sitePages.pages.some(n)||this.state.form.sitePages.archivedPages.some(n))return"This redirect slug is already in use."}return null});i(this,"beforeSave",t=>{const s=this.validate();if(s){R(s);return}t()});i(this,"disableAutoSave",()=>this.validate()!==null);i(this,"saveRequest",()=>{var t;return{customerId:this.props.customerId,companyId:this.props.companyId,redirectSlugs:((t=this.state.form.redirectSlugs)==null?void 0:t.map(s=>s.value.toLowerCase()))||[],rowVersion:this.state.form.rowVersion}});i(this,"renderForm",()=>e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsx(x,{className:"d-flex justify-content-center",children:e.jsxs(qt,{variant:"primary",className:"text-center",children:["If you have historical URLs to this page that you would like to be redirected to this page, enter the historical URLs here.",e.jsx("br",{}),"Do not include the domain. Example:"," ",e.jsx("i",{children:"/page/about-us"})," ","or"," ",e.jsx("i",{children:"/page/contact.abc"})]})})}),e.jsx(y,{children:e.jsx(x,{md:4,children:e.jsxs(k,{children:[e.jsx(ot,{"data-testid":"combo-redirectSlugsTab-redirectSlugs",name:"redirectSlugs"}),e.jsx(A,{children:"Redirect Slugs"})]})})})]}))}}const wt=[{key:"design",title:"Design",comp:br},{key:"detailedDescription",title:"Detailed Description",comp:xr},{key:"businessOpeningHours",title:"Opening Hours",comp:yr},{key:"media",title:"Media",comp:Cr},{key:"spotlights",title:"Spotlights",comp:Ir},{key:"SEOTags",title:"SEO Tags",comp:Tr},{key:"RedirectSlugs",title:"Slug Redirect",comp:kr}];class Bn extends N.Component{constructor(t){super(t);i(this,"open",t=>{const s=t.enableFullPage?wt:wt.filter(r=>r.key==="SEOTags");this.setState({visible:!0,entityName:t.entityName,customerId:t.customerId,companyId:t.companyId,activeTabKey:s[0].key,tabs:s,onClose:t.onClose})});i(this,"close",(t={})=>{this.state.onClose&&this.state.onClose(t),t.modifyLogo&&this.props.history&&this.props.history.replace(`${this.props.history.location.pathname}#edit`),this.setState(this._initialState())});i(this,"_initialState",()=>({visible:!1,loading:!1,entityName:null,customerId:null,companyId:null,activeTabKey:null}));i(this,"handleTabSelect",t=>{this.setState({activeTabKey:t})});this.state=this._initialState()}render(){return this.state.visible?e.jsxs(ve,{show:this.state.visible,backdrop:"static",onHide:this.close,size:"xl","data-testid":"modal-manageFullPageContent",children:[e.jsx(O.Header,{closeButton:!0,children:e.jsxs(O.Title,{children:[this.state.entityName," ","Landing Page settings"]})}),e.jsx(O.Body,{children:this.state.loading?e.jsx(re,{}):e.jsx(Ms,{tabContentClassName:"pb-0",disableNavigation:!0,tabs:this.state.tabs,activeTabKey:this.state.activeTabKey,customerId:this.state.customerId,companyId:this.state.companyId,isPortal:this.props.isPortal,editEntityAllowed:this.props.editEntityAllowed,entityTypeCode:this.props.entityTypeCode,entityData:this.props.entityData,membershipDirectoryData:this.props.membershipDirectoryData,onSelect:this.handleTabSelect,onCancel:this.close,onClose:this.close})})]}):null}}const Nr={ADD_TAGS:["iframe"],ADD_ATTR:["src","allow","allowFullScreen","frameborder","scrolling","width","height"],KEEP_CONTENT:!1},Pr=()=>{const a=new Date;return`${new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),0)).toISOString().split(".")[0]}Z`};class Fe extends N.Component{constructor(){super(...arguments);i(this,"onChange",(t,s)=>{this.props.onChange&&this.props.onChange(t,s)});i(this,"handleFormChange",t=>{const s="postForm";this.props.onDirt&&this.props.onDirt(),this.props.formControl?this.props.onFieldChange(t,s,()=>{this.onChange(s,t)}):this.onChange(s,t)});i(this,"handleFieldChange",(t,s)=>{const r={...this.props.form,[t]:s};this.handleFormChange(r)});i(this,"handleChangePublish",t=>{let s=this.props.form.startDate,r=this.props.form.startTime,n=this.props.form.endDate,l=this.props.form.endTime;const d=Pr();if(s=d,r=d,this.props.form.board.autoExpireForced){const m=Oe(De(s));n=he(m.add(this.props.form.board.autoExpireDays,"day")),l=r}const p={...this.props.form,active:t,scheduled:!t,startDate:s,startTime:r,endDate:n,endTime:l};this.handleFormChange(p)});i(this,"handleStartDateChange",t=>{let s=this.props.form.endDate;if(this.props.form.board.autoExpireForced){const n=Oe(De(t));s=he(n.add(this.props.form.board.autoExpireDays,"day"))}const r={...this.props.form,startDate:t,endDate:s};this.handleFormChange(r)});i(this,"handleStartTimeChange",t=>{const s={...this.props.form,startTime:t.value,endTime:this.props.form.board.autoExpireForced?t.value:this.props.form.endTime};this.handleFormChange(s)});i(this,"handleAvatarChange",(t,s)=>{const r={...this.props.form,avatarInfo:t,avatarProportionsType:s};this.handleFormChange(r)});i(this,"handleCopyStandaloneBlockLink",()=>{const t=Ua(Ra,this.props.form.postKey);navigator.clipboard.writeText(t)}
3)}render(){var r,n,l;const t=((r=this.props.form)==null?void 0:r.avatarProportionsType)===it.HORIZONTALRECTANGLE,s=this.props.isPortal?B().menuItems.find(d=>d.menuCode==="UserBoards").text:"Board";return e.jsxs(e.Fragment,{children:[this.props.form.postKey&&!this.props.hideCopyLinkButton&&e.jsx(y,{children:e.jsx(x,{className:"d-flex justify-content-end",children:e.jsx(Os,{"data-testid":"btn-postForm-copyStandaloneLink",hoverTooltipText:"Click to copy standalone content link for 3rd party applications",clickedTooltipText:"Standalone content link copied!",onClick:this.handleCopyStandaloneBlockLink,children:e.jsx(F,{icon:Ds})})})}),e.jsxs(y,{children:[e.jsxs(x,{sm:12,md:12,lg:4,className:"order-2",children:[this.props.form.board&&e.jsx(y,{children:e.jsx(x,{children:e.jsxs(k,{children:[e.jsx(Fs,{"data-testid":"combo-postForm-boardId",value:this.props.form.board.boardId,formControl:!1,isPortal:this.props.isPortal,boardIds:this.props.boardIds,disabled:this.props.disabled,onChange:this.props.onChangeBoard}),e.jsx(A,{htmlFor:"boardId",required:!0,children:s})]})})}),this.props.form.board&&this.props.form.board.categories&&e.jsx(y,{children:e.jsx(x,{children:e.jsxs(k,{children:[e.jsx(Ls,{"data-testid":"combo-postForm-categories",value:this.props.form.categories,items:this.props.form.board.categories,disabled:this.props.disabled,onChange:d=>this.handleFieldChange("categories",d)}),e.jsx(A,{htmlFor:"categories",required:this.props.form.board.categoriesRequired,children:"Categories"})]})})}),this.props.form.board.companyRequired&&e.jsx(y,{children:e.jsx(x,{children:e.jsxs(k,{children:[e.jsx(Bs,{"data-testid":"auto-postForm-companyId",value:this.props.form.companyId,text:this.props.form.companyName,onlyCompanies:!0,hasNoLabel:!0,clearable:!0,disabled:this.props.disabled||this.props.isPortal,onChange:d=>this.handleFieldChange("companyId",d==null?void 0:d.value)}),e.jsx(A,{htmlFor:"companyId",required:!0,children:(n=B().nomenclatures)==null?void 0:n.companies.singularTerm})]})})}),e.jsx(y,{children:e.jsx(x,{children:e.jsxs(k,{children:[e.jsx(A,{children:" "}),e.jsx(W,{"data-testid":"switch-postForm-publish",value:this.props.form.active,label:"Publish",formControl:!1,disabled:this.props.disabled,onChange:this.handleChangePublish})]})})}),this.props.form.active&&e.jsx(y,{children:e.jsx(x,{md:6,children:e.jsx(k,{className:"mt-0",children:e.jsx(We,{"data-testid":"date-postForm-postDate",value:this.props.form.startDate,label:"Post Date",required:!0,formControl:!1,disabled:this.props.disabled,onChange:this.handleStartDateChange})})})}),!this.props.form.active&&e.jsxs("div",{children:[e.jsx(y,{children:e.jsx(x,{children:e.jsxs(k,{children:[e.jsx(A,{children:" "}),e.jsx(W,{"data-testid":"switch-postForm-scheduled",value:this.props.form.scheduled,label:"Schedule Go Live",disabled:this.props.disabled,onChange:d=>this.handleFieldChange("scheduled",d)})]})})}),this.props.form.scheduled&&e.jsxs(e.Fragment,{children:[this.props.isPendingPostReview&&new Date(this.props.form.startDate)<new Date&&e.jsx(x,{className:"d-flex align-items-center mt-2",children:e.jsx(qt,{variant:"info",children:"This Post was scheduled for a date that has already passed. If you approve it, it'll be published immediately."})}),e.jsxs(y,{children:[e.jsx(x,{md:6,children:e.jsx(k,{className:"mt-0",children:e.jsx(We,{"data-testid":"date-postForm-startDate",value:this.props.form.startDate,label:"Start Date",required:!0,formControl:!1,disabled:this.props.disabled,onChange:this.handleStartDateChange})})}),e.jsx(x,{md:6,children:e.jsxs(k,{children:[e.jsx(Ae,{"data-testid":"time-postForm-startTime",name:"startTime",value:this.props.form.startTime,interval:1,formControl:!1,isPortal:this.props.isPortal,disabled:this.props.disabled,onChange:d=>this.handleStartTimeChange(d)}),e.jsx(A,{htmlFor:"startTime",required:!0,children:"Start Time"})]})})]})]})]}),e.jsx(y,{children:e.jsx(x,{children:e.jsxs(k,{children:[e.jsx(A,{children:" "}),e.jsx(W,{"data-testid":"switch-postForm-autoExpired",value:this.props.form.autoExpired,label:"Auto-Expire (Unpublish)",disabled:this.props.disabled||this.props.form.board.autoExpireForced,onChange:d=>this.handleFieldChange("autoExpired",d)})]})})}),this.props.form.autoExpired&&e.jsxs(y,{children:[e.jsx(x,{md:12,sm:12,lg:6,children:e.jsx(k,{className:"mt-0",children:e.jsx(We,{"data-testid":"date-postForm-endDate",value:this.props.form.endDate,label:"End Date",required:!0,disabled:this.props.disabled||this.props.form.board.autoExpireForced&&this.props.form.startDate!==null,onChange:d=>this.handleFieldChange("endDate",d)})})}),e.jsx(x,{md:12,sm:12,lg:6,children:e.jsxs(k,{children:[e.jsx(Ae,{"data-testid":"time-postForm-endTime",value:this.props.form.endTime,interval:1,disabled:this.props.disabled||this.props.form.board.autoExpireForced&&this.props.form.startTime!==null,isPortal:this.props.isPortal,onChange:d=>this.handleFieldChange("endTime",d==null?void 0:d.value)}),e.jsx(A,{htmlFor:"endTime",required:!0,children:"End Time"})]})})]}),this.props.form.board.imageAllowed&&!this.props.form.board.companyRequired&&e.jsxs(y,{className:"align-items-center",children:[e.jsx(x,{className:"d-flex mt-3 align-items-center w-auto flex-grow-0",children:this.props.isPortal?e.jsx(Ut,{targetName:"avatar",value:this.props.form.avatarInfo,rectangle:t,size:"sm",setProportions:!0,customProportions:!0,forceCustomProportions:!0,disabledVerticalRectangle:!0,customCanvasSize:!0,horizontalRectangleOptions:[{value:3/1,label:"3:1"}],crop:{aspect:1,width:100,height:100},useDigitalResources:!1,folder:"CustomerPortalAvatars",disabled:this.props.disabled,onChange:this.handleAvatarChange}):e.jsx(Ht,{targetName:"avatar",value:this.props.form.avatarInfo,rectangle:t,size:"sm",setProportions:!0,customProportions:!0,forceCustomProportions:!0,disabledVerticalRectangle:!0,customCanvasSize:!0,horizontalRectangleOptions:[{value:3/1,label:"3:1"}],crop:{aspect:1,width:100,height:100},disabled:this.props.disabled,onChange:this.handleAvatarChange})}),e.jsxs(x,{className:"h-100 d-flex w-100 flex-column pt-3 justify-content-end",children:[e.jsx("strong",{className:"mb-2",children:"Upload Photo"}),e.jsx("em",{className:"small w-100 mb-1",style:{height:"fit-content"},children:"Click on the picture to upload. A square image will work best."})]})]})]}),e.jsxs(x,{sm:12,md:12,lg:8,className:"order-1",children:[e.jsx(y,{children:e.jsx(x,{children:e.jsxs(k,{children:[e.jsx(fe,{"data-testid":"input-postForm-title",value:this.props.form.title,maxLength:75,required:!0,disabled:this.props.disabled,onChange:d=>this.handleFieldChange("title",d)}),e.jsx(A,{htmlFor:"title",required:!0,children:"Title"})]})})}),e.jsx(y,{children:e.jsx(x,{children:this.props.disabled?e.jsx("div",{className:"post-body-container",dangerouslySetInnerHTML:{__html:Dt.sanitize((l=this.props.form.postHtml)==null?void 0:l.html,Nr)}}):e.jsx(k,{children:e.jsx(Lt,{"data-testid":"input-postForm-postHtml",value:this.props.form.postHtml,isTenantWebsiteHyperlink:!0,isEmailHyperlink:!0,formControl:!1,disabled:this.props.disabled,onChange:d=>
3this.handleFieldChange("postHtml",d),enableFontBackgroundColor:!0})})})})]})]})]})}}Fe.defaultProps={formControl:!0,managed:!1,hideCopyLinkButton:!1};const Rt=()=>{const a=new Date;return`${new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),0)).toISOString().split(".")[0]}Z`};class Un extends N.Component{constructor(t){super(t);i(this,"initialState",()=>({visible:!1,postId:null,boardId:null,loading:!1,saving:!1,dirty:!1,form:{postForm:{title:null,active:!0,scheduled:!1,autoExpired:!1,postHtml:null,avatarInfo:null,categories:[],categoriesIds:[],companyId:null,companyName:null,startDate:null,startTime:null,endDate:null,endTime:null,timeZoneIANAId:null,board:{name:"Board Name",autoExpireForced:!1,autoExpireDays:0,imageAllowed:!1,companyRequired:!1,categoriesRequired:!1,rowVersion:null}}},onClose:null}));i(this,"open",t=>{this.setState({visible:!0,loading:!0,postId:t.postId,boardId:t.boardId,onClose:t.onClose},()=>{!t.postId?this.getBoardInfo(this.state.boardId):this.getPostInfo(this.state.postId)})});i(this,"save",()=>{this.setState({saving:!0},()=>{const t=this.state.form.postForm,s={postId:this.state.postId,title:t.title,active:t.active,postHtml:t.postHtml,avatarInfo:t.avatarInfo,avatarProportionsType:t.avatarProportionsType,categoryIds:(t.categories??[]).map(r=>r.value??r),companyId:t.companyId,scheduled:t.scheduled,startDate:this.getServerParsedStartDate(t.startDate,t.startTime,t.scheduled,t.active,t.timeZoneIANAId),autoExpired:t.autoExpired,endDate:this.getServerParsedEndDate(t.endDate,t.endTime,t.autoExpired,t.timeZoneIANAId),rowVersion:t.rowVersion,boardId:t.board.boardId,boardRowVersion:t.board.rowVersion};this.API.Biz.post("/contents/post/savePost",s,{success:r=>{se(r.message),this.close(!0)},error:r=>{R(r.error.errorMessage),this.setState({saving:!1})}},{block:!1})})});i(this,"close",t=>{this.state.onClose&&this.state.onClose(t===!0),this.setState(this.initialState())});i(this,"getBoardInfo",t=>{this.API.Biz.get("/contents/board/getBoard",{boardId:t},{success:s=>{const r=Rt();this.setState(n=>{const l=n.form.postForm.autoExpired||s.data.autoExpireForced,d={...n.form.postForm,active:!0,scheduled:!1,categories:[],categoriesIds:[],companyId:null,companyName:null,startDate:r,startTime:r,endDate:l?he(Oe(De(r)).add(s.data.autoExpireDays,"day")):null,endTime:l?r:null,autoExpired:l,board:s.data,timeZoneIANAId:s.data.timeZoneIANAId,...this.props.isPortal&&{companyId:B().currentCompanyInfo.companyId,companyName:B().currentCompanyInfo.companyName}};if(this.props.adding&&d.active&&d.autoExpired){const p=Rt();d.startDate=p,d.startTime=p;const m=Oe(De(d.startDate)),c=he(m.add(d.board.autoExpireDays,"day"));d.endDate=c,d.endTime=d.startTime}return{form:{...n.form,postForm:{...d}},loading:!1}})},error:s=>{R(s.error.errorMessage)}},{block:!1})});i(this,"getPostInfo",t=>{this.API.Biz.get("/contents/post/getPost",{postId:t},{success:s=>{const{startDate:r,startTime:n,endDate:l,endTime:d}=this.getClientFormattedDates(s.data.startDate,s.data.endDate,s.data.timeZoneIANAId),p={...s.data,startDate:r,startTime:n,endDate:l,endTime:d};this.setState({form:{postForm:{...p}},loading:!1})},error:s=>{R(s.error.errorMessage)}},{block:!1})});i(this,"getClientFormattedDates",(t,s,r)=>{const n=te(t,{timeZoneIANAId:r}),l=te(s,{timeZoneIANAId:r});return{startDate:n,endDate:l,startTime:V(n),endTime:V(l)}});i(this,"getServerParsedStartDate",(t,s,r,n,l)=>{if(!t||!s||!r&&!n)return null;const d=jt(t,s);return Ee(d,{timeZoneIANAId:l})});i(this,"getServerParsedEndDate",(t,s,r,n)=>{if(!t||!s||!r)return null;const l=jt(t,s);return Ee(l,{timeZoneIANAId:n})});i(this,"handleChangeBoard",t=>{this.getBoardInfo(t.value)});i(this,"handleFormChange",t=>{this.setState({form:t,dirty:!0})});this.state=this.initialState(),this.API=t.isPortal?be:xe}render(){return this.state.visible?e.jsxs(ve,{show:this.state.visible,size:"xl",onHide:this.close,"data-testid":"modal-post",children:[e.jsx(O.Header,{children:e.jsx(O.Title,{children:"Post"})}),e.jsxs(O.Body,{children:[this.state.loading&&e.jsx(re,{}),!this.state.loading&&e.jsx(nt,{values:this.state.form,disabled:this.state.saving,onChange:this.handleFormChange,children:e.jsx(Fe,{name:"eventForm",form:this.state.form.postForm,isPortal:this.props.isPortal,boardIds:this.props.boardIds,onChangeBoard:this.handleChangeBoard})})]}),e.jsxs(O.Footer,{children:[e.jsx(L,{variant:"danger",onClick:this.close,"data-testid":"btn-post-cancel",children:"Cancel"}),e.jsx(L,{variant:"success",disabled:!this.state.dirty||this.state.saving,onClick:this.save,"data-testid":"btn-post-save",children:"Save"})]})]}):null}}class Hn extends N.Component{render(){const{websiteName:o}=this.props;return o!=null&&Us(`${o} | Not Found`),e.jsxs(e.Fragment,{children:[e.jsx(Hs,{children:e.jsx("meta",{name:"prerender-status-code",content:"404"})}),e.jsxs("div",{className:"not-found text-center",children:[e.jsx("strong",{style:{fontSize:"48px"},className:"mt-0 pt-3",children:"404"}),e.jsx("strong",{className:"lead pb-2",children:"PAGE NOT FOUND"}),e.jsx("p",{children:"The page you are looking for might have been removed, had its name changed or is temporarily unavailable."}),e.jsx("p",{children:"Try going back to the main page."}),e.jsx(Ws,{to:"/",children:e.jsx(L,{variant:"primary","data-testid":"btn-notFound-goBack",children:"Go back"})})]})]})}}const wr=a=>({type:$s,approvalRequestInfo:a}),At="dddd, MMMM DD yyyy",Et=a=>{if(!a)return null;const{clientStartDateTime:o,clientEndDateTime:t}=qs(a),s={startTime:V(o),endTime:a.noEndTime?null:V(t)};return a.multiDay?{...a,...s,eventDateRange:{start:o,end:t}}:{...a,...s,startDate:he(o),endDate:he(t)}},Rr=({pendingEntityInfo:a,showCurrentForm:o,isPortal:t})=>{const[s,r]=E.useState(Et(a.newInfo)),[n,l]=E.useState(Et(a.oldInfo)),d=(m,c)=>{r(c)},p=(m,c)=>{l(c)};return e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsxs(x,{children:[e.jsx("h4",{children:"New Information"}),e.jsx(St,{formControl:!1,form:s,dateFormat:At,isPortal:t,forceDisplayWebsiteInfo:!0,disabled:!0,onChange:d})]})}),o&&e.jsx(y,{className:"mt-3",children:e.jsxs(x,{children:[e.jsx("h4",{children:"Current Information"}),e.jsx(St,{formControl:!1,form:n,dateFormat:At,isPortal:t,forceDisplayWebsiteInfo:!0,disabled:!0,onChange:p})]})})]})},Ar=(a,o,t)=>{const s=te(a,{timeZoneIANAId:t}),r=te(o,{timeZoneIANAId:t});return{startDate:s,endDate:r,startTime:V(s),endTime:V(r)}},Mt=a=>{const{startDate:o,startTime:t,endDate:s,endTime:r}=Ar(a.startDate,a.endDate,a.timeZoneIANAId);return{...a,startDate:o,startTime:t,endDate:s,endTime:r}},Er=({pendingEntityInfo:a,showCurrentForm:o,isPortal:t})=>{const s=E.useMemo(()=>Mt(a.newInfo),[a.newInfo]),r=E.useMemo(()=>a.oldInfo?Mt(a.oldInfo):null,[a.oldInfo]);return e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsxs(x,{children:[e.jsx("h4",{children:"New Information"}),e.jsx(Fe,{formControl:!1,isPortal:t,form:s,disabled:!0,hideCopyLinkButton:!0,isPendingPostReview:!0})]})}),o&&e.jsx(y,{className:"mt-3",children:e.jsxs(x,{children:[e.jsx("h4",{children:"Current Information"}),e.jsx(Fe,{formControl:!1,isPortal:t,form:r,disabled:!0,hideCopyLinkButton:!0,isPendingPostReview:!0})]})})]})};class Wn extends N.Component{constructor(t){super(t);i(this,"initialState",()=>({visible:!1,loading:!1,showCurrentForm:!1,approvalRequestListInfo:null,approvalRequestInfo:null}));i(this,"open",t=>{this.setState({visible:!0,loading:!0,approvalRequestListInfo:t.approvalRequestListInfo,onClose:t.onClose},()=>{const s={approvalRequestId:t.approvalRequestId};this.API.Biz.get("/approvalRequest/getApprovalRequestInfo",s,{success:r=>{this.setState({loading:!1,approvalRequestInfo:{approvalRequestTypeCode:r.data.approvalRequestTypeCode,approvalRequestActionTypeCode:r.data.approvalRequestActionTypeCode,portalCustomerId:r.data.portalCustomerId,portalCustomerName:r.data.portalCustomerName,entityInfo:r.data.entity
3Info}})},error:r=>{R(r.error.errorMessage)}},{block:!1})})});i(this,"close",()=>{this.state.onClose&&this.state.onClose(),this.setState(this.initialState())});i(this,"handleCancel",()=>{this.close()});i(this,"handleToggleOriginalForm",()=>{this.setState(t=>({showCurrentForm:!t.showCurrentForm}))});i(this,"handleResolveApprovalRequest",t=>{this.setState({loading:!0},()=>{const s={approvalRequestId:this.state.approvalRequestListInfo.approvalRequestId,resolvedStatusCode:t};this.API.Biz.post("/approvalRequest/resolveApprovalRequest",s,{success:r=>{se(r.message),zs.dispatch(wr({...this.state.approvalRequestInfo,approvalRequestId:this.state.approvalRequestListInfo.approvalRequestId,resolvedStatusCode:t})),this.close()},error:r=>{R(r.error.errorMessage),this.setState({loading:!1})}})})});i(this,"handleReject",()=>this.handleResolveApprovalRequest(_s));i(this,"handleApprove",()=>this.handleResolveApprovalRequest(Vs));i(this,"renderApprovalRequestActionType",()=>{switch(this.state.approvalRequestInfo.approvalRequestActionTypeCode){case wa:return e.jsx(Ve,{variant:"primary",children:"Create"});case It:return e.jsx(Ve,{variant:"info",children:"Update"});default:return null}});i(this,"renderForm",()=>{const t={showCurrentForm:this.state.showCurrentForm,isPortal:this.props.isPortal};switch(this.state.approvalRequestInfo.approvalRequestTypeCode){case Gs:return e.jsx(Rr,{pendingEntityInfo:this.state.approvalRequestInfo.entity
3Info.event,...t});case Ks:return e.jsx(Er,{pendingEntityInfo:this.state.approvalRequestInfo.entityInfo.post,...t});default:return null}});this.API=t.isPortal?be:xe,this.state=this.initialState()}render(){return this.state.visible?e.jsxs(ve,{show:this.state.visible,size:"xl",backdrop:"static",onHide:this.handleCancel,"data-testid":"modal-approvalRequestInfo",children:[e.jsx(O.Header,{closeButton:!0,children:e.jsx(O.Title,{children:this.state.approvalRequestListInfo.title})}),e.jsx(O.Body,{children:this.state.loading?e.jsx(re,{}):e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsxs(x,{className:"d-flex justify-content-end align-items-center",children:[this.renderApprovalRequestActionType(),this.state.approvalRequestInfo.approvalRequestActionTypeCode===It&&e.jsx(de,{trigger:["hover","focus"],placement:"right",overlay:e.jsx(ce,{id:"tooltip-1",children:"Toggle current form"}),children:e.jsx(L,{size:"sm",className:"ml-3",variant:"default",onClick:this.handleToggleOriginalForm,"data-testid":"btn-approvalRequestInfoModal",children:e.jsx(F,{icon:Ft,size:"sm"})})})]})}),e.jsx(y,{children:e.jsx(x,{children:this.renderForm()})})]})}),!this.state.loading&&e.jsxs(O.Footer,{children:[e.jsx(L,{className:"mr-auto",variant:"info",onClick:this.close,"data-testid":"btn-approvalRequestInfo-close",children:"Close"}),!this.props.isPortal&&e.jsxs(e.Fragment,{children:[e.jsx(L,{variant:"danger",onClick:this.handleReject,"data-testid":"btn-approvalRequestInfo-reject",children:"Reject"}),e.jsx(L,{variant:"success",onClick:this.handleApprove,"data-testid":"btn-approvalRequestInfo-approve",children:"Approve"})]})]})]}):null}}const $n=()=>(E.useEffect(()=>{const{websiteShorthand:a,websiteDomain:o}=Ys(),t=new URLSearchParams;a&&t.set("websiteShorthand",a),t.set("websiteDomain",o),window.location.replace(`${rt.url("/publicAccess/getRobots")}?${t}`)},[]),null);export{Kt as $,Wn as A,Ln as B,wa as C,nn as D,hn as E,En as F,on as G,An as H,ln as I,jn as J,Hr as K,bn as L,On as M,$ as N,Fr as O,Un as P,_ as Q,Wr as R,Dn as S,Vr as T,It as U,xn as V,fn as W,In as X,gn as Y,vn as Z,Tn as _,qr as a,Ha as a0,rn as a1,wn as a2,yn as a3,an as a4,cn as a5,Nn as a6,Rn as a7,mn as a8,pn as a9,Sn as aa,Cn as ab,Pn as ac,kn as ad,dn as ae,Yr as af,Lr as ag,Ur as ah,Br as ai,Ra as aj,zr as b,Fn as c,Bn as d,Xr as e,pe as f,$r as g,Qr as h,Zr as i,Kr as j,Gr as k,Jr as l,Vt as m,$n as n,Hn as o,Ba as p,tn as q,un as r,Za as s,_r as t,Qa as u,Mn as v,en as w,sn as x,Ct as y,Ua as z};

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.