PageSourceSearch

https://www.iotforall.com/_next/static/chunks/pages/dashboard/webinar-8d60820da5ee72c2.js

js iotforall.com collected 2026-10-02 02:30:13 UTC 12,883 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5397],{8711:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/webinar",function(){return s(54676)}])},87167:function(e,a,s){"use strict";s.d(a,{Z:function(){return u}});var i=s(85893),t=s(58278),r=s(58140),l=s(62583),n=s(37113),o=s(51318),c=s(9303);function d(e){let{children:a}=e,[s,{toggle:d}]=(0,n.q)();return(0,i.jsxs)(t.x,{id:"dashboard-layout",children:[(0,i.jsx)(r.Z,{drawerOpened:s,drawerToggle:d}),(0,i.jsx)(c.Z,{drawerToggle:d,drawerOpened:s}),(0,i.jsx)(t.x,{children:a}),(0,i.jsx)(o.Z,{drawerOpened:s,drawerToggle:d}),(0,i.jsx)(l.q,{})]})}function u(e){return(0,i.jsx)(d,{children:e})}},54676:function(e,a,s){"use strict";s.r(a),s.d(a,{default:function(){return M}});var i=s(85893),t=s(62975),r=s(356),l=s(43078),n=s(28008),o=s(54410),c=s(60967),d=s(54680),u=s(34124),p=s(3119),b=s(95429),m=s(86651),x=s(58278),h=s(86414),j=s(13334),g=s(84731),y=s(24920),f=s(48006),w=s(14896),v=s.n(w),N=s(70868),S=s.n(N),L=s(67294),k=s(10090),C=s(11163),T=s(9008),I=s.n(T),P=s(41462),E=s(4951),Z=s(54929),U=s(71284),q=s(50601),W=s(48510),_=s(96279),D=s(41705),A=s(18151),F=s(99404);s(90578);var R=s(11383),O=s(95360),z=s(87167),B=s(81758),H=s(90695);function X(e){let[a,s]=e.split(":").map(Number);if(Number.isInteger(a)&&a>=0&&a<24&&Number.isInteger(s)&&s>=0&&s<60)return{hours:a,minutes:s};throw Error("Invalid time format: ".concat(e))}function M(){let[e,a]=(0,L.useState)(null),[s,w]=(0,L.useState)(!1),[N,T]=(0,L.useState)(!1),[z,M]=(0,L.useState)([{}]),[G,Y]=(0,L.useState)(!1),[J,V]=(0,L.useState)(""),[K,Q]=(0,L.useState)(!1),[$,ee]=(0,L.useState)(""),[ea,es]=(0,L.useState)(null),[ei,et]=(0,L.useState)(0),[er,el]=(0,L.useState)(null),[en,eo]=(0,L.use
1State)(null),ec=(0,C.useRouter)(),{data:ed,error:eu}=(0,B.ZP)("/api/auth",H._),ep=()=>{let e=J.replace(/<[^>]*>?/gm,""),a=(e=(e=e.replace(/\n/g," ")).replace(/\s\s+/g," ")).split(" ");return(a=a.filter(e=>""!==e)).length};(0,L.useEffect)(()=>{if(ed){es(ed.user),el(ed.authors);let e={};ed.authors.forEach(a=>{e[a.id]=(0,i.jsx)(t.q,{size:24,src:a.icon,alt:a.name,radius:100})}),eo(e)}},[ed]),(0,L.useEffect)(()=>{et(ep())},[J]);let eb=["partner","team_member"],em=(0,U.jE)({extensions:[Z.Z,W.Z,D.Z,F.ZP,A.Z,q.ZP,_.Z.configure({types:["heading","paragraph"]})],immediatelyRender:!1,onUpdate(e){let{editor:a}=e;V(a.getHTML())}}),ex=(0,O.c)({initialValues:{title:"",excerpt:"",content:"",url:"",canonical:"",registrationUrl:"",webinarDate:"",webinarStartTime:"",webinarEndTime:"",timeZone:""},validate:{title:e=>e.length>3&&e.length<111?null:"Title must be at least 3 characters long",excerpt:e=>e.length>20&&e.length<142?null:"Excerpt must be at least 20 characters long",url:e=>(""===e||new URL(e),null),webinarDate:e=>null,webinarStartTime:e=>!s||e.length>4?null:"Please enter a valid time",webinarEndTime:e=>!s||e.length>4?null:"Please enter a valid time",timeZone:e=>!s||e.length>0?null:"Please enter a valid time zone"}}),eh=async a=>{if(a.preventDefault(),Q(!0),ex.validate(),!ex.isValid()){Q(!1);return}ex.getValues();let i=new FormData;if(i.append("title",ex.values.title),i.append("excerpt",ex.values.excerpt),i.append("content",J),i.append("url",ex.values.url),s){i.append("registrationUrl",ex.values.registrationUrl),i.append("webinarDate",ex.values.webinarDate);let e=new Date(ex.values.webinarDate),a=new Date(e);try{let s=X(ex.values.webinarStartTime);e.setHours(s.hours,s.minutes);let i=X(ex.values.webinarEndTime);a.setHours(i.hours,i.minutes)}catch(e){ee("Invalid time format"),Q(!1);return}i.append("webinarStartTime",e.toISOString()),i.append("webinarEndTime",a.toISOString()),i.append("timeZone",ex.values.timeZone)}i.append("canonical",ex.values.canonical),i.append("gate",N.toString()),i.append("speakers",JSON.stringify(z)),e&&i.append("files",e);let t=await fetch("/api/webinar",{method:"POST",body:i});t.ok?(alert("Webinar submitted successfully"),ec.push("/dashboard")):(ee((await t.json()).error),Q(!1)),Q(!1)};return(0,i.jsxs)(l.W,{size:"sm",pb:160,children:[(0,i.jsx)(I(),{children:(0,i.jsx)("meta",{name:"robots",content:"noindex"})}),(0,i.jsx)(n.D,{order:1,className:v().ih1,mt:32,children:"Webinar Submission"}),(0,i.jsxs)(o.x,{className:v().ibody2,mt:24,children:["Submit your Webinar to be featured on IoT For All. Please fill out the form below to submit your Webinar. ",(0,i.jsx)(c.e,{target:"_blank",href:"https://cdn.ai-forall.com/ifa_dev_media/guidelines_2024_2025_16cf6d3b0f.pdf",children:"Read our guidelines"}),"."]}),!ea||!eb.includes(ea.role)&&(0,i.jsx)(d.b,{my:24,title:"You are not authorized to submit content",color:"yellow",children:"Your account is not authorized to submit this content. Please contact the IoT For All Editorial Team if you believe this is an error."}),$&&(0,i.jsx)(d.b,{my:24,title:"Error submitting content",color:"red",withCloseButton:!0,onClose:()=>ee(""),children:$}),(0,i.jsxs)(u.X,{withBorder:!0,mt:48,py:{base:32,sm:48},px:{base:24,sm:40},bg:"#F9FAFB",radius:16,pos:"relative",children:[(0,i.jsx)(p.f,{visible:K,zIndex:1e3,overlayProps:{radius:"sm",blur:2}}),(0,i.jsx)("form",{onSubmit:eh,children:(0,i.jsxs)(b.k,{direction:"column",gap:24,children:[(0,i.jsx)(m.P,{required:!0,label:"Select Author",description:"Who are you submitting this article on behalf of?",classNames:{label:v().ibody2bold,description:v().icaption},placeholder:"Select Author",data:er?er.map(e=>({value:e.id.toString(),label:e.name})):[],mb:24,renderOption:e=>{let{option:a,checked:s}=e;return(0,i.jsxs)(r.Z,{flex:"1",gap:"xs",children:[en[a.value],a.label,s&&(0,i.jsx)(k.Z,{style:{marginInlineStart:"auto"}})]})}}),(0,i.jsxs)(x.x,{children:[(0,i.jsx)(h.o,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Webinar Title",description:"Title must be under 110 characters",required:!0,...ex.getInputProps("title")}),(0,i.jsxs)(o.x,{mt:8,className:v().icaption,c:"#95A2B2",children:[ex.getInputProps("title").value.length," of 110 max characters"]})]}),(0,i.jsxs)(x.x,{children:[(0,i.jsx)(j.g,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Webinar Excerpt",description:"In 141 characters or less, summarize your Webinar using key words to provide more of a synopsis of your Article.",required:!0,rows:3,...ex.getInputProps("excerpt")}),(0,i.jsxs)(o.x,{mt:8,className:v().icaption,c:"#95A2B2",children:[ex.getInputProps("excerpt").value.length," of 141 max characters"]})]}),(0,i.jsxs)(x.x,{children:[(0,i.jsxs)(R.L,{editor:em,children:[(0,i.jsxs)(R.L.Toolbar,{sticky:!0,stickyOffset:60,children:[(0,i.jsxs)(R.L.ControlsGroup,{children:[(0,i.jsx)(R.L.Bold,{}),(0,i.jsx)(R.L.Italic,{}),(0,i.jsx)(R.L.Underline,{}),(0,i.jsx)(R.L.Strikethrough,{}),(0,i.jsx)(R.L.ClearFormatting,{}),(0,i.jsx)(R.L.Highlight,{}),(0,i.jsx)(R.L.Code,{})]}),(0,i.jsxs)(R.L.ControlsGroup,{children:[(0,i.jsx)(R.L.H1,{}),(0,i.jsx)(R.L.H2,{}),(0,i.jsx)(R.L.H3,{}),(0,i.jsx)(R.L.H4,{})]}),(0,i.jsxs)(R.L.ControlsGroup,{children:[(0,i.jsx)(R.L.Blockquote,{}),(0,i.jsx)(R.L.Hr,{}),(0,i.jsx)(R.L.BulletList,{}),(0,i.jsx)(R.L.OrderedList,{}),(0,i.jsx)(R.L.Subscript,{}),(0,i.jsx)(R.L.Superscript,{})]}),(0,i.jsxs)(R.L.ControlsGroup,{children:[(0,i.jsx)(R.L.Link,{}),(0,i.jsx)(R.L.Unlink,{})]}),(0,i.jsxs)(R.L.ControlsGroup,{children:[(0,i.jsx)(R.L.AlignLeft,{}),(0,i.jsx)(R.L.AlignCenter,{}),(0,i.jsx)(R.L.AlignJustify,{}),(0,i.jsx)(R.L.AlignRight,{})]}),(0,i.jsxs)(R.L.ControlsGroup,{children:[(0,i.jsx)(R.L.Undo,{}),(0,i.jsx)(R.L.Redo,{})]})]}),(0,i.jsx)(R.L.Content,{})]}),(0,i.jsxs)(o.x,{mt:8,className:v().icaption,c:"#95A2B2",children:["Min: 500 words, Max: 2000 words | ",ei," words"]})]}),(0,i.jsx)(x.x,{children:(0,i.jsx)(h.o,{mt:24,classNames:{label:v().ibody2bold,description:v().icaption},label:"Webinar URL",required:!0,...ex.getInputProps("url")})}),(0,i.jsxs)(x.x,{mt:24,children:[(0,i.jsx)(o.x,{className:v().ibody2bold,mb:4,children:"Featured Image"}),(0,i.jsxs)(r.Z,{gap:8,align:"center",justify:"start",mt:8,children:[(0,i.jsx)(g.S,{onChange:a,accept:"image/png,image/jpeg,image/webp",children:e=>(0,i.jsx)(y.z,{...e,color:"#FFFFFF",variant:"filled",styles:{root:{borderRadius:100,border:"1px solid #CED6DE",padding:"0px 8px"},inner:{padding:"8px 8px"},label:{textAlign:"center",fontSize:15,fontWeight:500,lineHeight:"24px",color:"#096D75"}},children:"Select Files"})}),(0,i.jsx)(o.x,{className:v().icaption,c:"#394756",children:(null==e?void 0:e.name)||"No file selected"})]}),(0,i.jsx)(o.x,{mt:8,className:v().icaption,c:"#95A2B2",children:"Accepted file types: png, jpg, webp, Max. file size: 256 MB."})]}),(0,i.jsxs)(x.x,{children:[(0,i.jsxs)(o.x,{className:v().ibody2bold,mb:4,children:["Is it an upcoming Webinar or recorded Webinar?"," ",(0,i.jsx)("span",{style:{color:"var(--input-asterisk-color, var(--mantine-color-error))"},children:"*"})]}),(0,i.jsx)(f.X,{label:"Upcoming",checked:s,onChange:()=>w(!s),classNames:{label:v().ibody3},mt:13}),(0,i.jsx)(f.X,{label:"Recorded",checked:!s,onChange:()=>w(!s),classNames:{label:v().ibody3},mt:13}),s&&(0,i.jsxs)(b.k,{mt:24,gap:24,direction:"column",children:[(0,i.jsx)(h.o,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Registration URL",required:!0,...ex.getInputProps("registrationUrl")}),(0,i.jsx)(P.W,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Webinar Date",required:!0,...ex.getInputProps("webinarDate")}),(0,i.jsx)(E.M,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Webinar Start Time",required:!0,...ex.getInputProps("webinarStartTime")}),(0,i.jsx)(E.M,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Webinar End Time",required:!0,...ex.getInputProps("webinarEndTime")}
1),(0,i.jsx)(h.o,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Time Zone",required:!0,...ex.getInputProps("timeZone")})]})]}),(0,i.jsxs)(x.x,{mt:24,children:[(0,i.jsx)(o.x,{className:v().ih4,mb:4,children:"Speakers"}),(0,i.jsx)(o.x,{className:v().ibody2,mb:16,children:"Add the speakers for this Webinar."}),z.map((e,a)=>(0,i.jsxs)(x.x,{mt:24,children:[(0,i.jsxs)(o.x,{className:v().ih5,mb:4,children:["Speaker ",a+1]}),(0,i.jsx)(h.o,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Speaker Name",required:!0,value:e.name,onChange:e=>{z[a].name=e.target.value,M([...z])}}),(0,i.jsx)(h.o,{mt:24,classNames:{label:v().ibody2bold,description:v().icaption},label:"Speaker Job Title",required:!0,value:e.jobTitle,onChange:e=>{z[a].jobTitle=e.target.value,M([...z])}}),(0,i.jsx)(h.o,{mt:24,classNames:{label:v().ibody2bold,description:v().icaption},label:"Speaker Company",required:!0,value:e.company,onChange:e=>{z[a].company=e.target.value,M([...z])}}),(0,i.jsx)(h.o,{mt:24,classNames:{label:v().ibody2bold,description:v().icaption},label:"Speaker Company URL",required:!0,value:e.companyUrl,onChange:e=>{z[a].companyUrl=e.target.value,M([...z])}}),(0,i.jsx)(h.o,{mt:24,classNames:{label:v().ibody2bold,description:v().icaption},label:"Speaker LinkedIn URL",required:!0,value:e.linkedinUrl,onChange:e=>{z[a].linkedinUrl=e.target.value,M([...z])}}),(0,i.jsx)(j.g,{mt:24,classNames:{label:v().ibody2bold,description:v().icaption},label:"Speaker Description",required:!0,rows:3,value:e.description,onChange:e=>{z[a].description=e.target.value,M([...z])}})]},a)),z.length<5&&(0,i.jsx)(y.z,{color:"#096D75",radius:100,className:S().button,onClick:()=>M([...z,{name:"",jobTitle:"",company:"",companyUrl:"",linkedinUrl:"",description:""}]),mt:24,children:"Add Speaker"})]}),(0,i.jsxs)(x.x,{children:[(0,i.jsxs)(o.x,{className:v().ibody2bold,mb:4,children:["Do you want to gate your webinar on our site?"," ",(0,i.jsx)("span",{style:{color:"var(--input-asterisk-color, var(--mantine-color-error))"},children:"*"})]}),(0,i.jsx)(f.X,{label:"Yes",checked:N,onChange:()=>T(!N),classNames:{label:v().ibody3},mt:13}),(0,i.jsx)(f.X,{label:"No",checked:!N,onChange:()=>T(!N),classNames:{label:v().ibody3},mt:13})]}),(0,i.jsxs)(b.k,{gap:24,direction:{base:"column",sm:"row"},children:[(0,i.jsxs)(x.x,{children:[(0,i.jsxs)(o.x,{className:v().ibody2bold,mb:4,children:["Has this Webinar been published somewhere else?"," ",(0,i.jsx)("span",{style:{color:"var(--input-asterisk-color, var(--mantine-color-error))"},children:"*"})]}),(0,i.jsx)(f.X,{label:"Yes",checked:G,onChange:()=>Y(!G),classNames:{label:v().ibody3},mt:13}),(0,i.jsx)(f.X,{label:"No",checked:!G,onChange:()=>Y(!G),classNames:{label:v().ibody3},mt:13})]}),G&&(0,i.jsx)(x.x,{w:{base:"100%",sm:"calc(50% - 12px)"},children:(0,i.jsx)(h.o,{classNames:{label:v().ibody2bold,description:v().icaption},label:"Original Webinar URL",required:!0,...ex.getInputProps("canonical")})})]}),(0,i.jsx)(x.x,{children:(0,i.jsx)(y.z,{mt:32,color:"#096D75",radius:100,type:"submit",disabled:K||!ea||!eb.includes(ea.role),children:"Submit"})})]})})]})]})}s(33334),M.getLayout=e=>(0,z.Z)(e)}},function(e){e.O(0,[6911,1509,5360,6948,3946,3155,7215,4746,2888,9774,179],function(){return e(e.s=8711)}),_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.