1import{j as e,M as G}from"./markdown-vendor-DSSb6Tvp.js";import{S as R,b as Z,B as g,m as V}from"./index-Db_eonQz.js";import{r as l,c as K,d as W,M as X,A as ee}from"./ui-vendor-DgvRiMnD.js";import{c as te,a as v,f as O,g as ae,b as ne}from"./eventTime-Cx-kU9yP.js";import{c as se,u as ie}from"./react-vendor-C8PsbclT.js";import{b as re,u as oe,a as H}from"./apollo-vendor-lel7ZoNK.js";const le=H` 2 mutation Mutation($data: EventRegistrationInput!) { 3 createEventRegistration(data: $data) { 4 Name 5 BusinessEmail 6 Organization 7 Phone 8 Jobtitle 9 howDidYouHear 10 DiscountCode 11 optIn 12 } 13 } 14`,ce=H` 15 query Query($filters: EventFiltersInput) { 16 events_connection(filters: $filters) { 17 nodes { 18 Title 19 cardImage { 20 alternativeText 21 url 22 } 23 coverImage { 24 alternativeText 25 url 26 } 27 eventDate 28 eventEndTime 29 eventStartTime 30 timezone 31 month { 32 monthName 33 } 34 event_categories { 35 CategoryName 36 } 37 documentId 38 location 39 Logo { 40 alternativeText 41 url 42 } 43 EventDetails 44 speakers { 45 AboutSpeaker 46 Avatar { 47 alternativeText 48 url 49 } 50 SpeakerDesignation 51 SpeakerName 52 documentId 53 } 54 slug 55 } 56 } 57 } 58`,ve=()=>{var C,S,I,z,A;const{slug:x}=se(),P=ie(),[a,b]=l.useState({name:"",businessEmail:"",phone:"",Organization:"",jobTitle:"",country:"",howDidYouHear:"",DiscountCode:"",optIn:!1}),[_,L]=l.useState(0),[j,F]=l.useState(""),[Y,{loading:E,error:$,data:J}]=re(le),{data:m,loading:q,error:N}=oe(ce,{variables:{filters:{slug:{eq:x}}}}),t=(C=m==null?void 0:m.events_connection)==null?void 0:C.nodes[0];l.useEffect(()=>{L(Date.now())},[]);const[u,y]=l.useState(null),[d,f]=l.useState("unknown"),{eventDate:h,eventStartTime:D,eventEndTime:w,timezone:k}=t||{};l.useEffect(()=>{if(!h){y(null),f("unknown");return}const n={eventDate:h,eventStartTime:D,eventEndTime:w,timezone:k},s=()=>{const i=Date.now();f(ae(n,i)),y(ne(n,i))};s();const r=setInterval(s,1e3);return()=>clearInterval(r)},[h,D,w,k]);const B=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,U=n=>["tempmail","mailinator","10minmail","guerrillamail","trashmail","fakeinbox","yopmail","dispostable","sharklasers","guerrillamailblock","getairmail","moakt","pokemail","grr","mailexpire","harakirimail"].some(r=>n.toLowerCase().includes(r)),o=n=>{const{id:s,value:r,type:i,checked:c}=n.target;b(Q=>({...Q,[s]:i==="checkbox"?c:r}))},M=async n=>{var r;if(n.preventDefault(),j!=="")return console.warn("Bot detected via honeypot.");if((Date.now()-_)/1e3<3){alert("Form submitted too quickly. Please take a moment to review.");return}if(!B.test(a.businessEmail)){alert("Please enter a valid email address.");return}if(U(a.businessEmail)){alert("Disposable email addresses are not allowed.");return}try{await Y({variables:{data:{Name:a.name,BusinessEmail:a.businessEmail,EventTitle:(t==null?void 0:t.Title)||"Unknown Event",Phone:a.phone?Number(a.phone):null,Organization:a.Organization,Jobtitle:a.jobTitle,howDidYouHear:a.howDidYouHear,DiscountCode:a.DiscountCode,optIn:a.optIn}}});try{await fetch("https://smtp-backend-website-gch3h3hrevcpgrdv.eastus-01.azurewebsites.net/send-email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a.name,phone:a.phone,email:a.businessEmail,form:"events-book-page-form",titile:(t==null?void 0:t.Title)||"Unknown Event",date:O(t==null?void 0:t.eventDate),time:`${v(t==null?void 0:t.eventStartTime)} ${(t==null?void 0:t.timezone)||""}`.trim(),organization:a.Organization,job_title:a.jobTitle,howDidYouHear:a.howDidYouHear,discount_code:a.DiscountCode,optIn:a.optIn})}),await fetch("https://smtp-backend-website-gch3h3hrevcpgrdv.eastus-01.azurewebsites.net/event-registration",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({Name:a.name,BusinessEmail:a.businessEmail,EventTitle:(t==null?void 0:t.Title)||"Unknown Event",Phone:a.phone,Organization:a.Organization,Jobtitle:a.jobTitle,howDidYouHear:a.howDidYouHear,DiscountCode:a.DiscountCode,optIn:a.optIn})})}catch(i){console.error("Email backend error:",i)}
58P("/appreciation-hub"),b({name:"",businessEmail:"",phone:"",Organization:"",jobTitle:"",country:"",howDidYouHear:"",DiscountCode:"",optIn:!1})}catch(i){console.error("GraphQL error:",i),(r=i.graphQLErrors)!=null&&r.length&&i.graphQLErrors.forEach(c=>console.error("GraphQL Error:",c.message)),alert("Failed to submit the form. Please try again.")}};if(q)return e.jsxs(e.Fragment,{children:[e.jsx(R,{title:"Event | iLink Digital",description:"Join iLink Digital for exclusive events exploring cloud, data, and AI innovation. Connect with industry leaders and practitioners.",path:`/insights/events/${x}`}),e.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"80vh",backgroundColor:"#000"},children:e.jsx("img",{src:"../echo-logo-svg.svg",alt:"Loading...",style:{width:"80px",height:"auto",animation:"spin 2s linear infinite"}})})]});if(N)return console.error("Event loading error:",N),e.jsx("p",{children:"Error loading event data. Please refresh or try again later."});if(!t)return e.jsx("p",{children:"Event not found."});const T=te(t),p=`/insights/events/${t.slug}`;return e.jsxs("div",{className:"main-content page-main",children:[e.jsx(R,{title:t.Title||"Event",titleSuffix:"iLink Digital Events",description:t.snippet||`Join iLink Digital for ${t.Title}. Connect with industry leaders and explore the latest in cloud, data, and AI innovation.`,path:p,image:(S=t.cardImage)==null?void 0:S.url,schemas:[{"@context":"https://schema.org","@type":"Event",name:t.Title,startDate:T.startDate||t.eventDate,endDate:T.endDate||t.eventDate,eventStatus:"https://schema.org/EventScheduled",organizer:{"@type":"Organization",name:"iLink Digital",url:"https://www.ilink-digital.com"},image:(I=t.cardImage)!=null&&I.url?[t.cardImage.url]:[],url:`https://www.ilink-digital.com${p}`,location:t.location?{"@type":"Place",name:t.location}:{"@type":"VirtualLocation",url:"https://www.ilink-digital.com"}},Z([{name:"Home",path:"/"},{name:"Insights",path:"/insights"},{name:"Events",path:"/insights/events"},{name:t.Title,path:p}])]}),e.jsxs("div",{className:"side-bar page-side",children:[e.jsx("div",{className:"events-detail",children:e.jsxs("div",{className:"events-banner",children:[e.jsxs("div",{className:"events-banner-details",children:[e.jsxs("div",{className:"course-info",children:[e.jsxs("div",{className:"course-info__item",children:[e.jsx(K,{})," ",e.jsxs("span",{children:[v(t.eventStartTime)||"N/A"," -"," ",v(t.eventEndTime)||"N/A"," ",t.timezone]})]}),e.jsxs("div",{className:"course-info__item",children:[e.jsx(W,{})," ",e.jsx("span",{children:O(t.eventDate)||"Date N/A"})]}),t.location&&e.jsxs("div",{className:"course-info__item",children:[e.jsx(X,{})," ",e.jsx("span",{children:t.location})]})]}),t.Title&&e.jsx("h1",{className:"cource-banner-title",children:t.Title}),d==="upcoming"&&u&&e.jsx("div",{className:"detail-remaining-container",children:["days","hours","minutes","seconds"].map(n=>e.jsxs("div",{className:"detail-remaining",children:[e.jsx("h2",{className:"detail-days-number",children:u[n]}),e.jsx("p",{className:"detail-days-label",children:n.toUpperCase()})]},n))}),d==="live"&&e.jsx("span",{className:"event-live-badge",children:"Happening Now"}),d==="ended"&&e.jsx("span",{className:"event-ended-badge",children:"Event Ended"}),d!=="ended"&&e.jsx("a",{href:"#register",children:"Register Now"})]}),e.jsx("div",{className:"events-banner-image",children:(z=t.coverImage)!=null&&z.url?e.jsx("img",{src:g+t.coverImage.url,alt:t.coverImage.alternativeText||"Event Image"}):e.jsx("img",{src:"./Img-Fabric Analyst in a Day 01.png",alt:"Default Event"})})]})}),e.jsxs("div",{className:"speaker-container",children:[e.jsx("p",{children:"Speaker(s):"}),(A=t.speakers)!=null&&A.length?t.speakers.map((n,s)=>{var r,i;return e.jsxs("div",{className:"speaker-details",children:[e.jsx("div",{className:"speaker-avatar",children:e.jsx("img",{src:(r=n.Avatar)!=null&&r.url?g+n.Avatar.url:"./speakeravatar.jpg",alt:((i=n.Avatar)==null?void 0:i.alternativeText)||"Speaker Avatar"})}),e.jsxs("div",{className:"speaker-name",children:[e.jsx("p",{className:"speakers-names",children:n.SpeakerName||"Unknown"}),e.jsx("p",{className:"speakers-designation",children:n.SpeakerDesignation||""})]})]},s)}):e.jsx("p",{children:"No speakers listed."})]}),e.jsxs("div",{className:"event-description",children:[e.jsx("p",{className:"event-decription-info",children:"Event Overview"}
58),e.jsx("div",{className:"event-decription-details",children:e.jsx(G,{components:{...V(t.EventDetails),img:({node:n,...s})=>{var c;const i=((c=s.src)==null?void 0:c.includes("/uploads"))?`${g}/uploads${s.src.split("/uploads")[1]}`:s.src;return e.jsx("img",{...s,src:i,style:{width:"100%",height:"auto",aspectRatio:"auto 16 / 9"},alt:s.alt||""})},a:({node:n,...s})=>e.jsx("a",{...s,style:{color:"#f80000"},target:"_blank",rel:"noopener noreferrer"})},children:t.EventDetails||"No event details provided."})})]}),u&&e.jsxs("div",{className:"training-registration",id:"register",children:[e.jsx("p",{className:"training-registration-heading",children:"Register Now"}),e.jsxs("form",{className:"events-book-page-form",onSubmit:M,children:[e.jsx("input",{type:"text",name:"honeypot",style:{display:"none"},tabIndex:"-1",autoComplete:"off",value:j,onChange:n=>F(n.target.value)}),e.jsxs("div",{className:"contact-us-form-input",children:[e.jsxs("label",{className:"cnt cnt-name",htmlFor:"name",children:["Name*",e.jsx("input",{type:"text",id:"name",placeholder:"Enter your name",value:a.name,onChange:o,required:!0})]}),e.jsxs("label",{className:"cnt cnt-email",htmlFor:"phone",children:["Phone*",e.jsx("input",{type:"Number",id:"phone",placeholder:"Enter your Phone Number",value:a.phone,onChange:o})]})]}),e.jsxs("div",{className:"contact-us-form-input",children:[e.jsxs("label",{className:"cnt cnt-org",htmlFor:"Organization",children:["Organization",e.jsx("input",{type:"text",id:"Organization",placeholder:"Enter your organization name",value:a.Organization,onChange:o})]}),e.jsxs("label",{className:"cnt cnt-email",htmlFor:"businessEmail",children:["Business Email*",e.jsx("input",{type:"email",id:"businessEmail",placeholder:"Enter your business email",value:a.businessEmail,onChange:o,required:!0})]})]}),e.jsxs("div",{className:"contact-us-form-input",children:[e.jsxs("label",{className:"cnt cnt-org",htmlFor:"jobTitle",children:["Job title/Your Role",e.jsx("input",{type:"text",id:"jobTitle",placeholder:"Enter your Job title",value:a.jobTitle,onChange:o})]}),e.jsxs("label",{className:"cnt cnt-email",htmlFor:"country",children:["Country*",e.jsx("input",{type:"text",id:"country",placeholder:"Enter your Country ",value:a.country,onChange:o,required:!0})]})]}),e.jsx("div",{className:"contact-us-form-input",children:e.jsxs("label",{className:"cnt cnt-org",htmlFor:"howDidYouHear",children:["How did you hear about us?",e.jsx("input",{type:"text",id:"howDidYouHear",placeholder:"How did you hear about us?",value:a.howDidYouHear,onChange:o})]})}),e.jsx("div",{className:"contact-us-form-input",children:e.jsxs("label",{className:"cnt cnt-email",htmlFor:"DiscountCode",children:["Discount Code",e.jsx("input",{type:"text",id:"DiscountCode",placeholder:"Enter your Discount Code ",value:a.DiscountCode,onChange:o})]})}),e.jsxs("label",{className:"cnt-checkbox",children:[e.jsx("input",{type:"checkbox",id:"optIn",name:"optIn",checked:a.optIn,onChange:o,required:!0}),e.jsx("span",{children:"I agree to receive business communications and promotional messages (such as event invitations, emails, and company updates) whenever relevant."})]}),e.jsxs("button",{className:"explore-btn",type:"submit",disabled:E,children:[E?"Submitting...":"Submit"," ",e.jsx(ee,{className:"exp-icon"})]}),$&&e.jsx("p",{className:"error-message",children:"Error submitting form. Please try again."}),J&&e.jsx("p",{className:"success-message",children:"Response submitted successfully!"})]})]})]})]})};export{ve as default};
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.