PageSourceSearch

https://safmagazine.com/_next/static/chunks/pages/directory/purchase-db4dbe07846ac74a.js

js safmagazine.com collected 2026-09-29 09:20:21 UTC 29,326 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8070],{4995:function(e,t,n){"use strict";n.d(t,{g:function(){return c}});var a=n(7294),r=n(3234),i=n(5818),o=n(4520),s=(...e)=>e.filter(Boolean).join(" "),l=["h","minH","height","minHeight"],c=(0,i.Gp)((e,t)=>{let n=(0,i.mq)("Textarea",e),{className:c,rows:u,...d}=(0,o.Lr)(e),p=(0,r.Yp)(d),f=u?function(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}(n,l):n;return a.createElement(i.m$.textarea,{ref:t,rows:u,...p,className:s("chakra-textarea",c),__css:f})});c.displayName="Textarea"},3027:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/directory/purchase",function(){return n(8961)}])},8632:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var a=n(5893),r=n(8641);function i(e){let{zoneId:t}=e;return(0,a.jsxs)(r.gC,{justifyContent:"center",marginBottom:"32px",zIndex:"1",children:[(0,a.jsx)(r.xv,{fontWeight:"bold",fontSize:"10px",color:"#C9C9C9",children:"Advertisement"}),(0,a.jsx)(r.kC,{backgroundColor:"brandPrimaryDark",justifyContent:"center",alignItems:"center",maxH:"600px",maxW:"300px",children:(0,a.jsx)("ins",{"data-revive-zoneid":t,"data-revive-id":"727bec5e09208690b050ccfc6a45d384"})})]})}},30:function(e,t,n){"use strict";n.d(t,{Z:function(){return p},n:function(){return r}});var a,r,i=n(5893),o=n(3234),s=n(4995),l=n(8641),c=n(979),u=n(1469),d=n(9583);function p(e){let{isRequired:t=!1,isInvalid:n=!1,label:a,inputType:p=r.text,value:f,onChange:m,errorMessage:h,formHelperText:v,gridColumn:x}=e;return(0,i.jsxs)(o.NI,{isRequired:t,isInvalid:n,gridColumn:null!=x?x:{base:"1/-1"},children:[(0,i.jsx)(o.lX,{children:a}),p===r.textarea?(0,i.jsx)(s.g,{variant:"bbiFilled",value:f,onChange:m,rows:10}):p===r.file?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.xu,{layerStyle:"bbiFileInputWraper",children:[(0,i.jsx)(c.II,{variant:"bbiFile",type:"file",onChange:m,accept:"image/*",multiple:!1}),(0,i.jsx)(d.Jh6,{fontSize:"42px",color:"#4299E1"}),(0,i.jsx)(u.di,{below:"lg",children:(0,i.jsxs)(l.xv,{fontSize:"24px",children:["Tap to ",(0,i.jsx)("span",{style:{color:"#4299E1"},children:"Browse"})]})}),(0,i.jsx)(u.di,{above:"lg",children:(0,i.jsxs)(l.xv,{fontSize:"24px",children:["Drag & Drop or",(0,i.jsx)("br",{}),"Click to ",(0,i.jsx)("span",{style:{color:"#4299E1"},children:"Browse"})]})})]}),(0,i.jsxs)(l.xv,{color:"#DADADA",children:["File Selected: ",f]})]}):(0,i.jsx)(c.II,{variant:"bbiFilled",type:p,value:f,onChange:m}),(0,i.jsx)(o.J1,{textTransform:"capitalize",children:h}),(0,i.jsx)(o.Q6,{children:v})]})}(a=r||(r={})).text="text",a.password="password",a.email="email",a.number="number",a.textarea="textarea",a.file="file"},4279:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var a=n(5893),r=n(8641);function i(e){let{title:t,removeTopPadding:n=!1,removeBottomMargin:i=!1,gridColumn:o={base:"1/-1"},headingType:s="h2"}=e;return(0,a.jsxs)(r.xu,{width:"100%",gridColumn:o,position:"relative",mb:i?0:"h2"===s?10:5,pt:n?0:20,children:[(0,a.jsx)(r.xu,{layerStyle:"roundedBorder",backgroundColor:"lightgrey"}),(0,a.jsxs)(r.X6,{as:s,width:"fit-content",size:"h2"===s?"lg":"md",position:"relative",paddingBottom:4,color:"brandBlack",textTransform:"capitalize",children:[t,(0,a.jsx)(r.xu,{layerStyle:"roundedBorder",backgroundColor:"brandBlack"})]})]})}},3766:function(e,t,n){"use strict";n.d(t,{Z:function(){return m},_:function(){return r}});var a,r,i=n(5893),o=n(3382),s=n(8641),l=n(7741),c=n(979),u=n(4e3),d=n(8632),p=n(1664),f=n.n(p);function m(e){let{type:t=r.HOME,minHeight:n=!1,publication:a}=e;return(0,i.jsxs)(s.W2,{maxW:"350px",height:n?"auto":"100%",pos:"relative",zIndex:"5",pt:"8",pb:"8",px:"0",backgroundColor:"white",children:[(t===r.HOME||t===r.DIRECTORY)&&(0,i.jsx)(l.zx,{as:f(),href:"/newsletter",w:"100%",mb:4,children:"Sign up for our e-newsletter!"}),t===r.JOBS&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.xv,{fontSize:"xs",fontWeight:"bold",children:"Search All Jobs"}),(0,i.jsxs)(c.BZ,{mb:"3",maxW:"100%",children:[(0,i.jsx)(c.II,{}),(0,i.jsx)(c.xH,{children:(0,i.jsx)(o.W1,{})})]})]}),(0,i.jsx)(d.Z,{zoneId:a.adZoneIds.DefaultSkyscraperAdZone}),(0,i.jsx)(u.Z,{makePlain:!0,zoneId:t===r.DIRECTORY?a.adZoneIds.DirectoryMedRectAdZ
1one:a.adZoneIds.DefaultMedRectAdZone})]})}(a=r||(r={})).HOME="HOME",a.JOBS="JOBS",a.ARTICLES="ARTICLES",a.DIRECTORY="DIRECTORY"},9959:function(e,t,n){"use strict";n.d(t,{$h:function(){return k},Np:function(){return x},Nq:function(){return l},OU:function(){return v},PR:function(){return w},Ty:function(){return h},a$:function(){return s},e5:function(){return d},gK:function(){return u},gb:function(){return j},j:function(){return g},j1:function(){return p},mv:function(){return C},n0:function(){return y},oQ:function(){return S},pQ:function(){return c},x2:function(){return b},x4:function(){return m}});var a=n(7484),r=n.n(a);async function i(e,t,n){return await fetch("".concat("https://cms.bbiinternational.com","/api/").concat(t),{method:e,headers:{"Content-Type":"application/json"},body:n})}async function o(e,t,n,a){return await fetch("".concat("https://cms.bbiinternational.com","/api/").concat(t),{method:e,headers:{Authorization:"Bearer ".concat(a),"Content-Type":"application/json"},mode:"cors",credentials:"include",body:n})}async function s(e,t,n,a){let r=await i("POST","auth/local/register",JSON.stringify({username:e,email:t,password:n,name:a,registrationPublicationId:"6"})),o=await r.json();return o}async function l(e,t,n,a){if(a){let r=await o("PUT","user/me",JSON.stringify({data:{username:e,email:t,name:n}}),a),i=await r.json();return i}}async function c(e,t,n,a,r,i,s,l,c){let u=await o("POST","job-postings",JSON.stringify({data:{title:e,location:t,salary:a,description:n,requirements:r,benefits:i,applicationInstructions:s,publicationId:l}}),c),d=await u.json();return d}async function u(e,t,n,a,r,i,s,l,c){let u=await o("PUT","job-postings/".concat(e),JSON.stringify({data:{title:t,location:n,salary:r,description:a,requirements:i,benefits:s,applicationInstructions:l}}),c),d=await u.json();return d}async function d(e,t,n,a,r,i,s,l,c,u,d,p,m,h){let v=await o("POST","companies",JSON.stringify({data:{name:n,description:a,address:r,address2:i,city:s,stateOrProvince:l,zip:c,country:u,phone:d,email:p,website:m,users:{id:t}}}),e),x=await v.json();return h&&x.data.id&&await f(e,x.data.id,h),x}async function p(e,t,n,a,r,i,s,l,c,u,d,p,m,h){h&&await f(e,t,h);let v=await o("PUT","companies/".concat(t),JSON.stringify({data:{name:n,description:a,address:r,address2:i,city:s,stateOrProvince:l,zip:c,country:u,phone:d,email:p,website:m}}),e),x=await v.json();return x}async function f(e,t,n){let a=new FormData;a.append("files",n),a.append("ref","api::company.company"),a.append("refId",t),a.append("field","logo");let r=await fetch("".concat("https://cms.bbiinternational.com","/api/upload"),{method:"POST",headers:{Authorization:"Bearer ".concat(e)},mode:"cors",credentials:"include",body:a}),i=await r.json();return i}async function m(e,t){let n=await i("POST","auth/local",JSON.stringify({identifier:e,password:t})),a=await n.json(),r=await k(a.jwt);return a.user.isInvoiced=r.isInvoiced,a.user.jobsAccess=r.jobsAccess,a}async function h(e){let t=await i("POST","user/reset-password",JSON.stringify({email:e,publicationId:"6"})),n=await t.json();return n}async function v(e,t,n){let a=await i("POST","auth/reset-password",JSON.stringify({code:e,password:t,passwordConfirmation:n})),r=a?await a.json():null;return r}async function x(e){let t=await o("GET","dashboard-jobs/".concat("6"),null,e),n=await t.json();return n}async function g(e,t){let n=await o("GET","dashboard-job/".concat(t),null,e),a=await n.json();return a}async function b(e){let t=await o("GET","user-company",null,e);if(204===t.status)return null;let n=await t.json();return n}async function y(e){let t=await o("GET","discount-check?publicationId=".concat("6"),null,e);if(204===t.status)return null;let n=await t.json();return n}async function j(e,t){let n=await o("PUT","job-postings/".concat(t),JSON.stringify({data:{publishedAt:null}}),e),a=await n.json();return a}async function w(e,t){let n=await o("PUT","job-postings/".concat(t),JSON.stringify({data:{publishedAt:r()().format("YYYY-MM-DD")}}),e),a=await n.json();return a}async function C(e,t,n,a,r){let o=await i("POST","feedbacks",JSON.stringify({data:{name:e,ipAddress:t,email:n,message:a,captcha:r}})),s=await o.json();return s}async function S(e,t,n,a,r,i,s,l,c,u,d,p,f,m,h){try{let v=[],x={companyName:n,address1:a,address2:r,city:i,stateOrProvince:s,zip:l,country:c,companyWebsite:u,companyDescription:d,contacts:f,directory_subcategories:h,publication:{id:t}};if(h.length>0){let t=await o("POST","directory-listings",JSON.stringify({data:{...x,directory_subcategories:h}}),e),n=await t.json();v.push(n)}if(m.length>0){let t=await o("POST","directory-listings",JSON.stringify({data:{...x,directory_subcategories:m}}),e),n=await t.json();v.push(n);let a=new FormData;a.append("files",p),a.append("ref","api::directory-listing.directory-listing"),a.append("refId",n.id),a.append("field","companyLogo"),await fetch("".concat("https://cms.bbiinternational.com","/api/upload"),{method:"POST",headers:{Authorization:"Bearer ".concat(e)},mode:"cors",credentials:"include",body:a})}return v}catch(e){return console.error(e),e}}async function k(e){let t=await o("GET","user/me/permissions/".concat("6"),null,e),n=await t.json();return n}},3757:function(e,t,n){"use strict";async function a(e,t,n){let a=[];for(let t of e){let e=await fetch("".concat("https://cms.bbiinternational.com","/strapi-stripe/getProduct/").concat(t.id),{method:"get",mode:"cors",headers:new Headers({"Content-Type":"application/json"})}),n=await e.json();n.quantity=t.count,a.push(n)}let r=await fetch("".concat("https://cms.bbiinternational.com","/api/create-checkout"),{method:"post",body:JSON.stringify({products:a,metadata:{id:t},publicationId:"6"}),mode:"cors",credentials:"include",headers:new Headers({"Content-Type":"application/json",Authorization:"Bearer ".concat(n)})}),i=await r.json();return i.id&&window.location.replace(i.url),r}async function r(e,t,n){let a=await fetch("".concat("https://cms.bbiinternational.com","/strapi-stripe/retrieve
1CheckoutSession/").concat(e),{method:"get",mode:"cors",headers:new Headers({"Content-Type":"application/json"})}),r=await a.json();if("paid"===r.payment_status){if(window.performance.getEntriesByType("navigation").map(e=>e.type).includes("reload"))console.info("site reloaded");else if("subscription"===r.mode)await fetch("".concat("https://cms.bbiinternational.com","/api/subscription-transactions"),{method:"post",body:JSON.stringify({data:{customerId:r.customer,subscriptionId:r.subscription,purchaseDate:new Date,message:JSON.stringify(r),subscriptionType:"Jobs",user:t,publication:"6"}}),mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)}});else if("payment"===r.mode){let e=r.metadata.id.split(",");await i(e,r,n),await o(t,r.customer,n)}}}async function i(e,t,n){for(let a of e)await fetch("".concat("https://cms.bbiinternational.com","/api/directory-listings/").concat(a),{method:"put",body:JSON.stringify({data:{purchasedAt:new Date,discountApplied:t.metadata.discountApplied,customerId:t.customer,transactionId:t.id,transactionAmount:t.amount_total,transactionCurrency:t.currency}}),mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)}})}async function o(e,t,n){await fetch("".concat("https://cms.bbiinternational.com","/api/users/").concat(e),{method:"put",body:JSON.stringify({stripeCustomerId:t}),mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)}})}n.d(t,{PI:function(){return a},io:function(){return i},sB:function(){return r}})},8961:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return el},default:function(){return ec}});var a=n(5893),r=n(7294),i=n(419),o=n(5818),s=n(4520),l=n(8387),c=n(1179),u=n(3926),d=()=>"undefined"!=typeof window,p=e=>d()&&e.test(navigator.vendor),f=e=>d()&&e.test(function(){let e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),m=()=>f(/mac|iphone|ipad|ipod/i),h=()=>m()&&p(/apple/i),v=n(6181),x=n(9755),g=n(3907),b=n(6734),y=n(2359),j=n(5868),w=n(5814),C=(...e)=>e.filter(Boolean).join(" "),S=e=>"function"==typeof e;function k(...e){return function(t){e.some(e=>(null==e||e(t),null==t?void 0:t.defaultPrevented))}}var[T,P]=(0,l.k)({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[E,N]=(0,l.k)({name:"PopoverStylesContext",errorMessage:"usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Popover />\" "}),O={click:"click",hover:"hover"};function _(e,t){return e===t||(null==e?void 0:e.contains(t))}function I(e){let t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function R(e){let t=(0,o.jC)("Popover",e),{children:n,...a}=(0,s.Lr)(e),i=(0,o.Fg)(),l=function(e={}){let{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:a,id:i,returnFocusOnClose:o=!0,autoFocus:s=!0,arrowSize:l,arrowShadowColor:d,trigger:p=O.click,openDelay:f=200,closeDelay:m=200,isLazy:j,lazyBehavior:w="unmount",computePositionOnMount:C,...S}=e,{isOpen:T,onClose:P,onOpen:E,onToggle:N}=(0,x.q)(e),R=(0,r.useRef)(null),A=(0,r.useRef)(null),Z=(0,r.useRef)(null),D=(0,r.useRef)(!1),M=(0,r.useRef)(!1);T&&(M.current=!0);let[z,B]=(0,r.useState)(!1),[J,L]=(0,r.useState)(!1),q=(0,r.useId)(),F=i??q,[$,U,H,Y]=["popover-trigger","popover-content","popover-header","popover-body"].map(e=>`${e}-${F}`),{referenceRef:G,getArrowProps:W,getPopperProps:X,getArrowInnerProps:K,forceUpdate:Q}=(0,g.D)({...S,enabled:T||!!C}),V=(0,c.h)({isOpen:T,ref:Z});!function(e){let{ref:t,elements:n,enabled:a}=e,r=()=>{var e;return(null==(e=t.current)?void 0:e.ownerDocument)??document};(0,u.O)(r,"pointerdown",e=>
1{if(!h()||!a)return;let i=e.target,o=(n??[t]).some(e=>{let t="current"in e?e.current:e;return(null==t?void 0:t.contains(i))||t===i});r().activeElement!==i&&o&&(e.preventDefault(),i.focus())})}({enabled:T,ref:A}),(0,v.C)(Z,{focusRef:A,visible:T,shouldFocus:o&&p===O.click}),(0,v.G)(Z,{focusRef:a,visible:T,shouldFocus:s&&p===O.click});let ee=(0,y.k)({wasSelected:M.current,enabled:j,mode:w,isSelected:V.present}),et=(0,r.useCallback)((e={},a=null)=>{let r={...e,style:{...e.style,transformOrigin:g.j.transformOrigin.varRef,[g.j.arrowSize.var]:l?`${l}px`:void 0,[g.j.arrowShadowColor.var]:d},ref:(0,b.lq)(Z,a),children:ee?e.children:null,id:U,tabIndex:-1,role:"dialog",onKeyDown:k(e.onKeyDown,e=>{n&&"Escape"===e.key&&P()}),onBlur:k(e.onBlur,e=>{let n=I(e),a=_(Z.current,n),r=_(A.current,n);T&&t&&!a&&!r&&P()}),"aria-labelledby":z?H:void 0,"aria-describedby":J?Y:void 0};return p===O.hover&&(r.role="tooltip",r.onMouseEnter=k(e.onMouseEnter,()=>{D.current=!0}),r.onMouseLeave=k(e.onMouseLeave,e=>{null!==e.nativeEvent.relatedTarget&&(D.current=!1,setTimeout(()=>P(),m))})),r},[ee,U,z,H,J,Y,p,n,P,T,t,m,d,l]),en=(0,r.useCallback)((e={},t=null)=>X({...e,style:{visibility:T?"visible":"hidden",...e.style}},t),[T,X]),ea=(0,r.useCallback)((e,t=null)=>({...e,ref:(0,b.lq)(t,R,G)}),[R,G]),er=(0,r.useRef)(),ei=(0,r.useRef)(),eo=(0,r.useCallback)(e=>{null==R.current&&G(e)},[G]),es=(0,r.useCallback)((e={},n=null)=>{let a={...e,ref:(0,b.lq)(A,n,eo),id:$,"aria-haspopup":"dialog","aria-expanded":T,"aria-controls":U};return p===O.click&&(a.onClick=k(e.onClick,N)),p===O.hover&&(a.onFocus=k(e.onFocus,()=>{void 0===er.current&&E()}),a.onBlur=k(e.onBlur,e=>{let n=I(e),a=!_(Z.current,n);T&&t&&a&&P()}),a.onKeyDown=k(e.onKeyDown,e=>{"Escape"===e.key&&P()}),a.onMouseEnter=k(e.onMouseEnter,()=>{D.current=!0,er.current=window.setTimeout(()=>E(),f)}),a.onMouseLeave=k(e.onMouseLeave,()=>{D.current=!1,er.current&&(clearTimeout(er.current),er.current=void 0),ei.current=window.setTimeout(()=>{!1===D.current&&P()},m)})),a},[$,T,U,p,eo,N,E,t,P,f,m]);(0,r.useEffect)(()=>()=>{er.current&&clearTimeout(er.current),ei.current&&clearTimeout(ei.current)},[]);let el=(0,r.useCallback)((e={},t=null)=>({...e,id:H,ref:(0,b.lq)(t,e=>{B(!!e)})}),[H]),ec=(0,r.useCallback)((e={},t=null)=>({...e,id:Y,ref:(0,b.lq)(t,e=>{L(!!e)})}),[Y]);return{forceUpdate:Q,isOpen:T,onAnimationComplete:V.onComplete,onClose:P,getAnchorProps:ea,getArrowProps:W,getArrowInnerProps:K,getPopoverPositionerProps:en,getPopoverProps:et,getTriggerProps:es,getHeaderProps:el,getBodyProps:ec}}({...a,direction:i.direction});return r.createElement(T,{value:l},r.createElement(E,{value:t},function(e,...t){return S(e)?e(...t):e}(n,{isOpen:l.isOpen,onClose:l.onClose,forceUpdate:l.forceUpdate})))}function A(e){let{bg:t,bgColor:n,backgroundColor:a}=e,{getArrowProps:i,getArrowInnerProps:s}=P(),l=N(),c=t??n??a;return r.createElement(o.m$.div,{...i(),className:"chakra-popover__arrow-positioner"},r.createElement(o.m$.div,{className:C("chakra-popover__arrow",e.className),...s(e),__css:{...l.arrow,"--popper-arrow-bg":c?`colors.${c}, ${c}`:void 0}}))}R.displayName="Popover",A.displayName="PopoverArrow";var Z=(0,o.Gp)(function(e,t){let{getBodyProps:n}=P(),a=N();return r.createElement(o.m$.div,{...n(e,t),className:C("chakra-popover__body",e.className),__css:a.body})});Z.displayName="PopoverBody";var D=(0,o.Gp)(function(e,t){let{onClose:n}=P(),a=N();return r.createElement(j.P,{size:"sm",onClick:n,className:C("chakra-popover__close-btn",e.className),__css:a.closeButton,ref:t,...e})});D.displayName="PopoverCloseButton";var M={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},z=(0,o.m$)(w.E.section),B=(0,o.Gp)(function(e,t){let{variants:n=M,...a}=e,{isOpen:i}=P();return r.createElement(z,{ref:t,variants:function(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}(n),initial:!1,animate:i?"enter":"exit",...a})});B.displayName="PopoverTransition";var J=(0,o.Gp)(function(e,t){let{rootProps:n,motionProps:a,...i}=e,{getPopoverProps:s,getPopoverPositionerProps:l,onAnimationComplete:c}=P(),u=N(),d={position:"relative",display:"flex",flexDirection:"column",...u.content};return r.createElement(o.m$.div,{...l(n),__css:u.popper,className:"chakra-
1popover__popper"},r.createElement(B,{...a,...s(i,t),onAnimationComplete:function(...e){return function(t){e.forEach(e=>{null==e||e(t)})}}(c,i.onAnimationComplete),className:C("chakra-popover__content",e.className),__css:d}))});function L(e){let t=N();return r.createElement(o.m$.footer,{...e,className:C("chakra-popover__footer",e.className),__css:t.footer})}J.displayName="PopoverContent",L.displayName="PopoverFooter";var q=(0,o.Gp)(function(e,t){let{getHeaderProps:n}=P(),a=N();return r.createElement(o.m$.header,{...n(e,t),className:C("chakra-popover__header",e.className),__css:a.header})});function F(e){let t=r.Children.only(e.children),{getTriggerProps:n}=P();return(0,r.cloneElement)(t,n(t.props,t.ref))}q.displayName="PopoverHeader",F.displayName="PopoverTrigger";var $=n(8641),U=n(3038),H=n(3234),Y=n(7741),G=n(3887),W=n(1469),X=n(7754),K=n(4279),Q=n(9878),V=n(30),ee=n(6315),et=n(9959),en=n(3757),ea=n(9583),er=n(3766),ei=n(1664),eo=n.n(ei),es=n(1163),el=!0;function ec(e){var t,n;let{tags:o,publication:s,publications:l,categories:c}=e,{state:u,dispatch:d}=(0,ee.Og)(),p=(0,i.pm)(),f=(0,es.useRouter)(),[m,h]=(0,r.useState)(!1),[v,x]=(0,r.useState)(""),[g,b]=(0,r.useState)(""),[y,w]=(0,r.useState)(""),[C,S]=(0,r.useState)(""),[k,T]=(0,r.useState)(""),[P,E]=(0,r.useState)(""),[N,O]=(0,r.useState)(""),[_,I]=(0,r.useState)(""),[M,z]=(0,r.useState)(""),[B,ei]=(0,r.useState)(null),[el,ec]=(0,r.useState)([{name:"",title:"",phone:"",email:""}]),[eu,ed]=(0,r.useState)([]),[ep,ef]=(0,r.useState)([]),[em,eh]=(0,r.useState)(""),[ev,ex]=(0,r.useState)(""),[eg,eb]=(0,r.useState)(""),[ey,ej]=(0,r.useState)(""),[ew,eC]=(0,r.useState)(""),[eS,ek]=(0,r.useState)(""),[eT,eP]=(0,r.useState)(""),[eE,eN]=(0,r.useState)(""),[eO,e_]=(0,r.useState)("");async function eI(e){if(e.preventDefault(),eh(""),ej(""),eC(""),eN(""),e_(""),eb(""),ek(""),eP(""),""===v){eh("Please enter a company name.");return}if(null===_.match(/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/g)){eb("Please enter a valid website URL.");return}if(0===eu.length&&0===ep.length){e_("Please select at least one category.");return}if(""===M){ex("Please enter a description.");return}if(ep.length>0&&null===B){eN("Please upload a logo.");return}if(el.some(e=>""===e.name)){ej("Please add a contact name.");return}if(el.some(e=>""===e.email)){eC("Please add a contact email.");return}if(el.some(e=>""===e.title)){ek("Please add a contact title.");return}if(el.some(e=>""===e.phone)){eP("Please add a contact phone number.");return}try{if(!u.user)throw Error("Missing User");if(!u.token)throw Error("Missing Token");h(!0);let e=await (0,et.oQ)(u.token,s.id.toString(),v,g,y,C,k,N,P,_,M,B,el,ep.flat().map(e=>{if(null==e?void 0:e.value)return e.value}),eu.flat().map(e=>{if(null==e?void 0:e.value)return e.value})),n=e.map(e=>e.id),a=[],r=eu.flat().filter(e=>e).length,i=ep.flat().filter(e=>e).length;r&&a.push({id:"13",count:r}),i&&a.push({id:"14",count:i});let o=await (0,en.PI)(a,n.toString(),u.token);if(201===o.status)await (0,en.io)(n,{metadata:{discountApplied:!0}},u.token),x(""),b(""),w(""),S(""),T(""),E(""),O(""),I(""),z(""),ei(null),ec([{name:"",title:"",phone:"",email:""}]),ed([]),ef([]),p({title:"Success",description:"Your listing has been submitted for review.",status:"success",duration:5e3,isClosable:!0,position:"top"}),h(!1);else{var t;if(200===o.status)return;throw Error("Checkout Failed - ".concat(null==o?void 0:null===(t=o.error)||void 0===t?void 0:t.message))}}catch(e){console.warn(e),p({title:"Error",description:"An error occured.",status:"error",duration:5e3,isClosable:!0,position:"top"}),h(!1)}}return(0,r.useEffect)(()=>{let e=async()=>{var e;if(u.token&&(null===(e=u.user)||void 0===e?void 0:e.hasCompany)===!0){let e=await (0,et.x2)(u.token);x(e.name),z(e.description),b(e.address),w(e.address2),S(e.city),T(e.stateOrProvince),E(e.country),O(e.zip),I(e.website)}};e()},[u.token,u.user]),(0,r.useEffect)(()=>{u.user&&ec([{name:u.user.name,title:"",phone:"",email:u.user.email}])},[u.user]),(0,a.jsxs)(X.Z,{tags:o,publication:s,publications:l,templateColumns:{base:"1fr",lg:"2fr 1fr"},hideStickySkyscraper:!0,children:[(0,a.jsxs)(R,{placement:"left",autoFocus:!1,children:[(0,a.jsx)(F,{children:(0,a.jsxs)($.kC,{justifyContent:"center",alignItems:"center",gap:2,pos:"fixed",bottom:20,right:0,w:20,h:12,borderRadius:"10px 0 0 10px",bgColor:"brandPrimaryDark",color:"white",style:{cursor:"pointer"},children:[(0,a.jsx)($.xv,{children:ep.flat().filter(e=>e).length+eu.flat().filter(e=>e).length}),(0,a.jsx)(ea.FeP,{color:"white"})]})}),(0,a.jsxs)(J,{children:[(0,a.jsx)(A,{}),(0,a.jsx)(D,{}),(0,a.jsx)(q,{children:"Cart"}),(0,a.jsxs)(Z,{children:[ep.flat().filter(e=>e).map(e=>(0,a.jsxs)($.xv,{children:[null==e?void 0:e.label," - $",240]},e.value)),eu.flat().filter(e=>e).map(e=>(0,a.jsxs)($.xv,{children:[null==e?void 0:e.label," - $",95]},e.value)),(0,a.jsxs)(L,{children:[(0,a.jsxs)($.xv,{children:["Total: $",240*ep.flat().filter(e=>e).length+95*eu.flat().length]}),(0,a.jsx)($.xv,{children:"Receive ONE FREE Text-Only Listing per year. Discount applied upon checkout."})]})]})]})]}),(0,a.jsxs)($.P4,{as:"form",pt:16,zIndex:"5",backgroundColor:"white",mb:{base:"100vh",md:"0"},minH:{base:"100vh",md:"0"},children:[(0,a.jsx)(K.Z,{removeTopPadding:!0,title:"Signup"}),!u.user&&(0,a.jsxs)(U.bZ,{status:"warning",mb:8,pos:"sticky",top:{base:"100px",md:"100px"},zIndex:10,onClick:()=>{d({type:"setFeaturePath",value:ee.tN.DIRECTORY_PURCHASE_FORM}),f.push("/login")},children:[(0,a.jsx)(U.zM,{}),(0,a.jsxs)($.xv,{children:["You must log in to purchase a directory listing."," ",(0,a.jsx)($.rU,{as:eo(),href:"/login",children:"Click here to continue."})]})]}),!(null===(t=u.user)||void 0===t?void 0:t.hasCompany)&&u.user&&(0,a.jsxs)(U.bZ,{status:"warning",mb:8,pos:"sticky",top:{base:"100px",md:"100px"},zIndex:10,children:[(0,a.jsx)(U.zM,{}),(0,a.jsxs)($.xv,{children:["You must set up a company profile before purchasing a directory listing."," ",(0,a.jsx)($.rU,{as:eo(),href:"/dashboard/company",children:"Click here to continue."})]})]}),(0,a.jsxs)($.xu,{mb:4,children:[(0,a.jsx)($.X6,{children:"Purchase Directory Listing"}),(0,a.jsx)($.xu,{className:"content",dangerouslySetInnerHTML:{__html:s.directoryPurchasePageCopy}})]}),eO&&(0,a.jsxs)(U.bZ,{status:"warning",children:[(0,a.jsx)(U.zM,{}),eO]}),c.map((e,t)=>(0,a.jsxs)($.xu,{my:8,children:[(0,a.jsx)(K.Z,{title:e.title,removeTopPadding:!0}),(0,a.jsxs)($.rj,{gridTemplateColumns:"1fr 1fr",gap:4,children:[(0,a.jsxs)($.xu,{children:[(0,a.jsx)(H.lX,{children:"No Logo"}),(0,a.jsx)(Q.Z,{isMulti:!0,useBasicStyles:!0,value:eu[t],isOptionDisabled:e=>eu.flat().some(t=>t&&t.value===e.value)||ep.flat().some(t=>t&&t.value===e.value),onChange:e=>{let n=[...eu],a=n.map(e=>Array.isArray(e)?e:[]);a[t]=e,ed(a)},options:e.directory_subcategories.map(e=>({value:e.id,label:"".concat(e.title," - Non Logo")}))})]}),(0,a.jsxs)($.xu,{children:[(0,a.jsx)(H.lX,{children:"Logo"}),(0,a.jsx)(Q.Z,{isMulti:!0,useBasicStyles:!0,value:ep[t],isOptionDisabled:e=>eu.flat().some(t=>t&&t.value===e.value)||ep.flat().some(t=>t&&t.value===e.value),onChange:e=>{let n=[...ep],a=n.map(e=>Array.isArray(e)?e:[]);a[t]=e,ef(a)},options:e.directory_subcategories.map(e=>({value:e.id,label:"".concat(e.title," - Logo")}))})]})]})]},t)),(0,a.jsxs)($.xu,{mb:4,children:[(0,a.jsx)(K.Z,{title:"Listing Information",removeTopPadding:!0}),(0,a.jsx)(V.Z,{isRequired:!0,label:"Company Name",value:v,isInvalid:!!em,errorMessage:em,onChange:e=>x(e.target.value)}),(0,a.jsx)(V.Z,{isRequired:!0,isInvalid:!!eg,errorMessage:eg,formHelperText:"Must begin with http:// or https://. Example: https://example.com",label:"Website",value:_,onCh
1ange:e=>I(e.target.value)}),(0,a.jsx)(V.Z,{isRequired:!0,label:"Description",value:M,isInvalid:!!ev,errorMessage:ev,inputType:V.n.textarea,onChange:e=>z(e.target.value)}),(0,a.jsx)(V.Z,{isRequired:!0,label:"Address 1",value:g,onChange:e=>b(e.target.value)}),(0,a.jsx)(V.Z,{label:"Address 2",value:y,onChange:e=>w(e.target.value)}),(0,a.jsx)(V.Z,{isRequired:!0,label:"City",value:C,onChange:e=>S(e.target.value)}),(0,a.jsx)(V.Z,{isRequired:!0,label:"State/Province/Region",value:k,onChange:e=>T(e.target.value)}),(0,a.jsx)(V.Z,{isRequired:!0,label:"Country",value:P,onChange:e=>E(e.target.value)}),(0,a.jsx)(V.Z,{isRequired:!0,label:"Postal/Zip Code",value:N,onChange:e=>O(e.target.value)})]}),(0,a.jsxs)($.xu,{mb:4,children:[(0,a.jsx)(K.Z,{title:"Contacts"}),el.map((e,t)=>(0,a.jsxs)($.xu,{mb:8,children:[(0,a.jsxs)($.Ug,{children:[(0,a.jsxs)($.X6,{children:["Contact ",t+1]}),(0,a.jsx)($.LZ,{}),t>0&&(0,a.jsx)(j.P,{onClick:()=>ec(el.slice(0,-1))})]}),(0,a.jsx)(V.Z,{label:"Name",isRequired:!0,isInvalid:!!ey,errorMessage:ey,value:null==e?void 0:e.name,onChange:e=>{let n=[...el];n[t].name=e.target.value,ec(n)}}),(0,a.jsx)(V.Z,{label:"Title",isRequired:!0,errorMessage:eS,isInvalid:!!eS,value:null==e?void 0:e.title,onChange:e=>{let n=[...el];n[t].title=e.target.value,ec(n)}}),(0,a.jsx)(V.Z,{label:"Email",isRequired:!0,isInvalid:!!ew,errorMessage:ew,inputType:V.n.email,value:null==e?void 0:e.email,onChange:e=>{let n=[...el];n[t].email=e.target.value,ec(n)}}),(0,a.jsx)(V.Z,{label:"Phone",isRequired:!0,isInvalid:!!eT,errorMessage:eT,value:null==e?void 0:e.phone,onChange:e=>{let n=[...el];n[t].phone=e.target.value,ec(n)}})]},t)),(0,a.jsx)(Y.zx,{onClick:()=>ec([...el,{name:"",title:"",phone:"",email:""}]),isDisabled:el.length>3,children:"Add Additional Contact"})]}),ep.flat().length>0&&(0,a.jsxs)($.xu,{mb:4,children:[(0,a.jsx)($.X6,{children:"Logo Upload"}),(0,a.jsx)(V.Z,{gridColumn:{base:"1/-1",lg:"1/3"},isInvalid:!!eE,label:"Company Logo",value:null!==(n=null==B?void 0:B.name)&&void 0!==n?n:"none",inputType:V.n.file,onChange:e=>ei(e.target.files[0]),errorMessage:eE}),B&&(0,a.jsx)(G.Ee,{alt:"Uploaded logo preview",src:URL.createObjectURL(B)})]}),(0,a.jsx)($.xv,{children:(0,a.jsx)("strong",{children:"Need additional help?"})}),(0,a.jsxs)($.xv,{children:["Please contact us at ",(0,a.jsx)("a",{href:"tel:866-746-8385",children:"866-746-8385"})," or"," ",(0,a.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),(0,a.jsx)("br",{}),ep.flat().filter(e=>e).map(e=>(0,a.jsxs)($.xv,{children:[null==e?void 0:e.label," - $",240]},e.value)),eu.flat().filter(e=>e).map(e=>(0,a.jsxs)($.xv,{children:[null==e?void 0:e.label," - $",95]},e.value)),(0,a.jsxs)($.xv,{fontWeight:"bold",children:["Total: $",240*ep.flat().filter(e=>e).length+95*eu.flat().length]}),(0,a.jsx)($.xv,{children:"Receive ONE FREE Text-Only Listing per year. Discount applied upon checkout."}),(0,a.jsx)("br",{}),(0,a.jsx)(Y.zx,{type:"submit",onClick:e=>eI(e),isLoading:m,isDisabled:!u.user||!u.user.hasCompany,children:"Submit"})]}),(0,a.jsx)(W.di,{above:"lg",children:(0,a.jsx)($.P4,{gridColumn:"2/-1",children:(0,a.jsx)(er.Z,{publication:s})})})]})}}},function(e){e.O(0,[3415,1778,5445,1228,8941,8641,7396,4310,9878,7754,9774,2888,179],function(){return e(e.s=3027)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.