1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4726],{4726:function(e,t,r){r.d(t,{Z:function(){return x}});var a=r(85893),s=r(25675),i=r.n(s),l=r(67294),n=r(31955),o=r(41664),c=r.n(o),m=r(54322),d=r(59685),h=r(76582),p=r(28128),u=r(11163),f=function(e){let{setValues:t,values:r}=e,[s,i]=(0,l.useState)([{text:"A Specific Region",isActive:!1},{text:"A Specific Market Segment",isActive:!1},{text:"Key suppliers, customers, or other market players",isActive:!1},{text:"Other",isActive:!1}]);var n=s.filter(e=>!!e.isActive&&e.text).map(e=>e.text).toString()||"Select customization type";return(0,l.useEffect)(()=>{n=s.filter(e=>!!e.isActive&&e.text).map(e=>e.text).toString()||"Select Customization Type",t({...r,customizationTypes:n})},[s]),(0,a.jsxs)(m.Z,{onSelect:e=>{console.log("change=>",e),i(t=>(t[e].isActive=!t[e].isActive,[...t]))},className:"multiselect-dropdown",children:[(0,a.jsx)(m.Z.Toggle,{children:n}),(0,a.jsxs)(m.Z.Menu,{children:[(0,a.jsx)(m.Z.Item,{eventKey:0,active:s[0].isActive,as:"div",children:s[0].text}),(0,a.jsx)(m.Z.Item,{eventKey:1,active:s[1].isActive,as:"div",children:s[1].text}),(0,a.jsx)(m.Z.Item,{eventKey:2,active:s[2].isActive,as:"div",children:s[2].text}),(0,a.jsx)(m.Z.Item,{eventKey:3,active:s[3].isActive,as:"div",children:s[3].text})]})]})},g=r(95446);function x(e){var t,r;let{requestType:s,report:o,reportId:x}=e,y=(0,u.useRouter)(),v=localStorage.getItem("country")||n.Z.get("country")||"IN",[j,_]=(0,l.useState)(!1),b=(0,l.useRef)(!1),[C,k]=(0,l.useState)(!1),[N,S]=(0,l.useState)({fname:"",lname:"",phone:"",email:"",company_name:"",sub_type:"",image:v?h.Lr.filter(e=>e.code===v)[0].image:"",message:"",country:v?h.Lr.filter(e=>e.code===v)[0].name:"",forReport:o.name,termCheck:!1,guestPassword:Math.floor(9e7*Math.random())+1e7});(0,l.useEffect)(()=>{S({fname:"",lname:"",phone:"",email:"",company_name:"",sub_type:"",image:v?h.Lr.filter(e=>e.code===v)[0].image:"",message:"",country:v?h.Lr.filter(e=>e.code===v)[0].name:"",forReport:o.name,termCheck:!1,guestPassword:Math.floor(9e7*Math.random())+1e7}),_(!0)},[]);let[A,E]=(0,l.useState)({fname:!1,lname:!1,phone:!1,email:!1,company_name:!1,sub_type:!1,message:!1,termCheck:!1,country:!1}),R=e=>{let{name:t,value:r}=e.target;if("termCheck"===e.target.name)S({...N,[e.target.name]:e.target.checked}),E(t=>({...t,termCheck:!e.target.checked}));else if("country"===e.target.name)S({...N,[e.target.name]:e.target.options[e.target.selectedIndex].textContent+"("+e.target.value+")"}),E(e=>({...e,country:!1}));else if("phone"===t)S(e=>({...e,phone:r})),r.length>=7&&/^\d+$/.test(N.phone)?E(e=>({...e,phone:!1})):E(e=>({...e,phone:!0}));else if("email"===t){S({...N,email:r});let e=r.split("@")[1];e&&"gmail"!==e.split(".")[0]&&"rediffmail"!==e.split(".")[0]&&"yahoo"!==e.split(".")[0]&&"live"!==e.split(".")[0]&&"hotmail"!==e.split(".")[0]&&"msn"!==e.split(".")[0]&&"outlook"!==e.split(".")[0]?E(e=>({...e,email:!1})):E(e=>({...e,email:!0}))}else S({...N,[e.target.name]:e.target.value,forReport:o.name}),e.target.value?E(t=>({...t,[e.target.name]:!1})):E(t=>({...t,[e.target.name]:!0}))},w=(e,t,r)=>{S({...N,country:r,image:t})},T=async e=>{if(e.preventDefault(),b.current)return;let{email:t,fname:r,lname:a,phone:i,country:l,termCheck:n,company_name:c,sub_type:m}=N;if(t&&r&&a&&i&&l&&n&&c){if(o){let e=N.email.split("@")[1];if("gmail"===e.split(".")[0]||"rediffmail"===e.split(".")[0]||"yahoo"===e.split(".")[0]||"live"===e.split(".")[0]||"hotmail"===e.split(".")[0]||"msn"===e.split(".")[0]||"outlook"===e.split(".")[0]){E(e=>({...e,email:!0}));return}if(!(N.phone.length>=7)||!/^\d+$/.test(N.phone)){E(e=>({...e,phone:!0}));return}b.current=!0,k(!0);try{"customize"==s?(await (0,p.te)(N,o),S({fname:"",lname:"",phone:"",email:"",company_name:"",sub_type:"",country:"",message:"",forReport:"",termCheck:!1})):(await (0,p.NV)({...N,type:(null==o?void 0:o.isDatacenterReport)==!0?"report-datacenter":"report"},()=>{S({fname:"",lname:"",phone:"",email:"",company_name:"",country:"",message:"",forReport:""})}),await (0,p.LH)(o.id,N.email,o.sample_report_pdf,o.name,o.about_short_desc,o.slug,()=>{},e=>{console.log(e)}),await (0,p.Ex)(N,null==o?void 0:o.name,o.image,(null==o?void 0:o.isDatacenterReport)==1?null==o?void 0:o.onetimesubscription:null==o?void 0:o.single_price,o.slug,()=>{S({fname:"",lname:"",phone:"",email:"",country:"",message:"",forReport:"",termCheck:""})},e=>{console.log(e)})),"customize"==s?y.push("/thank-you-for-customize?report-id=".concat(x)):y.push("/thank-you?report-id=".concat(x))}catch(e){console.log(e)}finally{b.current=!1,k(!1)}}}else E({email:!t,fname:!r,lname:!a,phone:!i,country:!l,company_name:!c,termCheck:!n})};return!0==j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"report-request__main-head",children:"sample"===s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{children:"Sample request"}),(0,a.jsx)("p",{children:"Fill the form below and get the sample in your email"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{children:"Customize This Report"}),(0,a.jsx)("p",{children:"Fill the form below to customize this report"})]})}),(0,a.jsxs)("div",{className:"report-request__main-report",children:[(0,a.jsx)("div",{className:"report-request__main-report-img",children:(0,a.jsx)(i(),{src:(null==(r=o)?void 0:r.image)&&(r.image.startsWith("http://")||r.image.startsWith("https://"))?r.image:"/report-slug/report-image.png",alt:(null==o?void 0:o.image_alt)||"Report image",height:95,width:82})}),(0,a.jsxs)("div",{className:"report-request__main-report-txt",children:[(0,a.jsx)("h2",{children:(0,a.jsx)(c(),{href:"/market-reports/".concat(null==o?void 0:o.slug),children:o&&(null==o?void 0:o.name)?null==o?void 0:o.name:null==o?void 0:o.title})}),(0,a.jsxs)("div",{className:"specifications",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Published Date: "}),o&&o.publishedDate&&function(e){let[t,r]=e.split("-"),a=parseInt(r,10)-1;return"".concat(["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"][a]," ").concat(t)}(o.publishedDate)]}),(0,a.jsx)("span",{className:"specifications__divider"}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Price:"})," $ ",o&&(null==o?void 0:o.isDatacenterReport)==1?null==o?void 0:o.onetimesubscription:null==o?void 0:o.single_price]})]})]})]}),(0,a.jsx)("div",{className:"ctform__form request--form",children:(0,a.jsxs)("form",{action:"",className:"request--form-main",children:[(0,a.jsxs)("div",{className:"ct-form__row",children:[(0,a.jsxs)("div",{className:"ct-form__group",children:[(0,a.jsx)("input",{onChange:R,name:"fname",id:"fname",type:"text",placeholder:"",required:!0,style:{backgroundColor:"#fff"}}),(0,a.jsx)("label",{htmlFor:"fname",style:{backgroundColor:"#fff"},children:"Enter your first name *"}),A.fname&&(0,a.jsx)("p",{className:"error",children:"This field is required"})]}),(0,a.jsxs)("div",{className:"ct-form__group",children:[(0,a.jsx)("input",{onChange:R,name:"lname",id:"lname",type:"text",placeholder:"",required:!0,style:{backgroundColor:"#fff"}}),(0,a.jsx)("label",{htmlFor:"lname",style:{backgroundColor:"#fff"},children:"Enter your last name *"}),A.lname&&(0,a.jsx)("p",{className:"error",children:"This field is required"})]})]}),(0,a.jsxs)("div",{className:"ct-form__group",children:[(0,a.jsx)("input",{onChange:R,name:"email",id:"email",type:"email",placeholder:"",required:!0,style:{backgroundColor:"#fff"}}),(0,a.jsx)("label",{htmlFor:"email",style:{backgroundColor:"#fff"},children:"Enter your corporate email address *"}),A.email&&(0,a.jsx)("p",{className:"error",children:"Please enter a valid bussiness email"})]}),(0,a.jsxs)("div",{className:"ct-form__group",children:[(0,a.jsxs)("div",{className:"phone",children:[(0,a.jsxs)(m.Z,{children:[(0,a.jsx)(m.Z.Toggle,{id:"dropdownSearchCate",children:(0,a.jsx)("div",{className:"image",children:(0,a.jsx)(i(),{src:"/country/svg/".concat(null==N?void 0:null===(t=N.image)||void 0===t?void 0:t.toLowerCase()),width:20,height:20})})}),(0,a.jsx)(m.Z.Menu,{children:h.Lr.map((e,t)=>(0,a.jsx)(m.Z.Item,{onClick:()=>w(e.dial_code,e.image,e.name),children:(0,a.jsx)(g.Z,{country:e.name,flagImage:e.image,code:e.dial_code})},t))})]}),(0,a.jsx)("input",{onChange:R,name:"phone",id:"phone",type:"tel",placeholder:"",required:!0,style:{backgroundColor:"#fff"}}),(0,a.jsx)("label",{htmlFor:"phone",style:{backgroundColor:"#fff"},children:"Enter your phone number *"})]}),A.phone&&(0,a.jsx)("p",{className:"error",children:"Enter a valid mobile number"})]}),(0,a.jsxs)("div",{className:"ct-form__group",children:[(0,a.jsx)("input",{onChange:R,name:"company_name",id:"company",type:"text",placeholder:"",required:!0,style:{backgroundColor:"#fff"}}),(0,a.jsx)("label",{htmlFor:"company",style:{backgroundColor:"#fff"},children:"Enter your company name *"}),A.company_name&&(0,a.jsx)("p",{className:"error",children:"Please enter your company name"})]}),"customize"==s?(0,a.jsx)("div",{className:"ct-form__group",children:(0,a.jsx)(f,{setValues:e=>S({...N,sub_type:e.customizationTypes}),values:N})}):null,(0,a.jsxs)("div",{className:"ct-form__group",children:[(0,a.jsx)("textarea",{onChange:R,name:"message",id:"message",type:"text",placeholder:"",style:{backgroundColor:"#fff"}}),(0,a.jsx)("label",{htmlFor:"message",style:{backgroundColor:"#fff"},children:"Write your message, if any"})]}),(0,a.jsxs)("div",{className:"ct-form-accept",children:[(0,a.jsx)(d.Z.Check,{type:"checkbox",className:"ct-form-accept__checkbox d-flex-chck",label:"",name:"termCheck",onChange:R}),(0,a.jsxs)("div",{className:"ct-form-accept__txt checkbox",children:["I agree to the",(0,a.jsx)(c(),{href:"/terms-use",children:" Terms and Conditions"})," &",(0,a.jsx)(c(),{href:"/privacyandpolicy",children:" Privacy Policy"}),".",(0,a.jsx)("div",{children:A.termCheck&&(0,a.jsx)("p",{className:"error",children:"Please Check the terms and conditon policy before proceeding"})})]})]}),(0,a.jsx)("div",{className:"ct-form__group request--form-main-btn",children:(0,a.jsx)("button",{type:"submit",className:"primary--btn",onClick:T,disabled:C,children:C?"SUBMITTING...":"customize"==s?"REQUEST CUSTOMIZATION":"REQUEST SAMPLE"})})]})})]})}}}]);
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.