1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[459],{36429:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return n(12169)}])},12169:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return x},default:function(){return g}});var r=n(85893),l=n(96486),o=n(67294),s=n(2589),a=n(11163),i=n(48966),c=n.n(i);let d=e=>{let t={},n={};e.username=(0,l.isEmpty)(e.username)?"":e.username,e.password=(0,l.isEmpty)(e.password)?"":e.password;let r=function(r,l,o,s){arguments.length>4&&void 0!==arguments[4]&&arguments[4];let a=arguments.length>5?arguments[5]:void 0;c().isLength(e[r],{min:o,max:s})||(t[r]="".concat(l," must be ").concat(o," to ").concat(s," characters")),a&&c().isEmpty(e[r])&&(t[r]="".concat(l," is required")),t[r]||(n[r]=e[r])};return r("username","Username",2,50,"string",!0),r("password","Password",2,50,"string",!0),{sanitizedData:n,errors:t,isValid:(0,l.isEmpty)(t)}};var u=n(9669),p=n.n(u),v=n(70469),m=n(83820),h=n(48500),f=n(1436),x=!0;function g(e){var t;let{data:n}=e,l=(0,a.useRouter)(),[i,c]=(0,o.useState)({username:"",password:""}),[u,x]=(0,o.useState)(null),[g,w]=(0,o.useState)(!1),{postType:y,previewPostId:j}=null!==(t=null==l?void 0:l.query)&&void 0!==t?t:{},b=e=>{var t,n,r,o,a,c;e.preventDefault(),x("");let u=d({username:null!==(t=null==i?void 0:i.username)&&void 0!==t?t:"",password:null!==(n=null==i?void 0:i.password)&&void 0!==n?n:""});if(u.isValid)return w(!0),p()({data:{username:null!==(a=null==u?void 0:null===(r=u.sanitizedData)||void 0===r?void 0:r.username)&&void 0!==a?a:"",password:null!==(c=null==u?void 0:null===(o=u.sanitizedData)||void 0===o?void 0:o.password)&&void 0!==c?c:""},method:"post",url:"/api/login"}).then(e=>{var t,n,r,o,a;let i=null==e?void 0:null===(t=e.data)||void 0===t?void 0:null===(n=t.errors)||void 0===n?void 0:null===(r=n[0])||void 0===r?void 0:r.message,{success:c}=null!==(a=null==e?void 0:e.data)&&void 0!==a?a:{};if(("invalid_username"===i||"incorrect_password"===i||"invalid_password"===i)&&x("Invalid username or password"),c&&y&&j){let e=(0,s.QE)(y,j);l.push(e)}return null==e?void 0:null===(o=e.data)||void 0===o?void 0:o.success}).catch(e=>(w(!1),x(e),!1));N(u)},N=e=>{e.errors.password&&x(e.errors.password),e.errors.username&&x(e.errors.username)},_=e=>{c({...i,[e.target.name]:e.target.value})},{username:S,password:Z}=i;return(0,r.jsx)(v.Z,{data:n,children:(0,r.jsx)(h.Z,{children:(0,r.jsxs)("div",{className:"bg-white-alt shadow-lg p-8 md:ml-auto mt-10 md:mt-12 mb-12 w-5/12 m-auto",children:[(0,r.jsx)("div",{className:"w-full flex justify-center",children:(0,r.jsx)("h4",{className:"gl-content-h4 my-4 text-black",children:"Please Login to PREVIEW CONTENT"})}),"tab"==y||"quote"==y?(0,r.jsx)(f.Z,{className:"text-red-500",content:"This content type cannot be previewed, please view it on the page where it is added!"}):null,(0,r.jsx)(f.Z,{className:"text-red-500",content:u}),(0,r.jsxs)("form",{onSubmit:b,className:"flex flex-col mb-4",children:[(0,r.jsx)("label",{className:"gl-content-title text-first mb-2 mt-4",children:"Username:"}),(0,r.jsx)("input",{type:"text",className:"font-secondary transition-all transform shadow-sm focus:shadow-inner focus:translate-y-0.5 outline-none focus:outline-none py-2 px-2 border border-gray-100",name:"username",value:S,onChange:_}),(0,r.jsx)("label",{className:"gl-content-title text-first mb-2 mt-4",children:"Password:"}),(0,r.jsx)("input",{type:"password",className:"font-secondary transition-all transform shadow-sm focus:shadow-inner focus:translate-y-0.5 outline-none focus:outline-none py-2 px-2 border border-gray-100",name:"password",value:Z,onChange:_}),(0,r.jsx)("div",{className:"flex w-full justify-end mt-8",children:(0,r.jsx)(m.Z,{title:"Login",type:"submit",disabled:"tab"==y||"quote"==y})}),g?(0,r.jsx)("p",{children:"Loading..."}):null]})]})})})}},70469:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(85893),l=n(96486),o=n(9008),s=n.n(o),a=n(4298),i=n.n(a),c=n(2962),d=n(11163),u=n(2589),p=n(45697),v=n.n(p);let m=e=>{let{seo:t,uri:n,tags:l}=e,o=(0,d.useRouter)(),s=null==l?void 0:l.map(e=>e.name).join(", "),{title:a,metaDesc:p,metaRobotsNoindex:v,metaRobotsNofollow:m,opengraphDescription:h,opengraphTitle:f,opengraphImage:x,opengraphSiteName:g}=t,w=o.asPath.includes("index")?"":o.asPath;window.location.origin;let y="https://www.cavalieridellavoro.it"+w;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.PB,{title:a,description:h||p,canonical:y,noindex:"index"!==v,nofollow:"follow"!==m,additionalMetaTags:[{name:"keywords",content:s}],openGraph:{type:"website",locale:"en_US",url:y,title:f,description:h,images:[{url:null==x?void 0:x.sourceUrl,width:1280,height:720}],site_name:g}}),(0,r.jsx)(i(),{id:"yoastSchema",type:"application/ld+json",className:"yoast-schema-graph",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:(0,u.Nw)(null==t?void 0:t.schemaDetail
1s)}},"yoastSchema")]})};m.propTypes={seo:v().object},m.defaultProps={seo:{canonical:"",title:"",metaDesc:"",metaRobotsNoindex:"",metaRobotsNofollow:"",opengraphDescription:"",opengraphTitle:"",opengraphImage:{sourceUrl:""},opengraphUrl:"",opengraphSiteName:""}};var h=n(5152),f=n.n(h),x=n(67294);let g=f()(Promise.all([n.e(675),n.e(664),n.e(490)]).then(n.bind(n,3490)),{loadableGenerated:{webpack:()=>[3490]}}),w=f()(Promise.all([n.e(675),n.e(720)]).then(n.bind(n,90720)),{loadableGenerated:{webpack:()=>[90720]}});function y(e){var t,n,o,a,c,d,p,v;let h,{data:f,children:y,previewMode:j}=e;h=(0,l.isEmpty)(null==f?void 0:f.page)?null==f?void 0:f.post:null==f?void 0:f.page;let[b,N]=(0,x.useState)(!1),_=(e=>{if(!e)return"";let t=e.match(/<script[^>]*>([\s\S]*?)<\/script>/i);return t?t[1].trim():""})(null==f?void 0:null===(t=f.siteSettings)||void 0===t?void 0:t.gtmScriptInit);return(0,r.jsxs)(r.Fragment,{children:[_&&(0,r.jsx)(i(),{id:"gtm-init",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:_}}),(0,r.jsx)(m,{seo:(null==h?void 0:h.seo)||(null==f?void 0:f.seo),tags:null==h?void 0:null===(n=h.tags)||void 0===n?void 0:n.nodes}),(0,r.jsxs)(s(),{children:[(0,r.jsx)("link",{rel:"shortcut icon",href:null==f?void 0:null===(o=f.siteSettings)||void 0===o?void 0:null===(a=o.companyIcon)||void 0===a?void 0:a.sourceUrl}),(0,r.jsx)("meta",{name:"google-site-verification",content:null==f?void 0:null===(c=f.siteSettings)||void 0===c?void 0:c.googleSearchConsoleVerification}),(null==f?void 0:null===(d=f.siteSettings)||void 0===d?void 0:d.cookieJsEmbedHead)?(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,u.Nw)(null==f?void 0:null===(p=f.siteSettings)||void 0===p?void 0:p.cookieJsEmbedHead)}}):null]}),(null==f?void 0:null===(v=f.siteSettings)||void 0===v?void 0:v.gtmScript)&&(0,r.jsx)("noscript",{dangerouslySetInnerHTML:{__html:f.siteSettings.gtmScript}}),(0,r.jsx)(g,{data:{...f,scroll:b,setScroll:N},scroll:b,setScroll:N}),(0,r.jsx)("main",{className:"".concat(b?"lg:pt-16":""),children:(0,r.jsx)("div",{className:"bg-white overflow-hidden ",children:y})}),(0,r.jsx)(w,{data:f})]})}},74189:function(e,t,n){"use strict";var r=n(85893);let l=e=>(0,r.jsx)("svg",{width:16,height:13,stroke:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m15.718 6.087-4.84-5.034c-.4-.391-1.034-.391-1.41 0-.4.416-.4 1.075 0 1.466l3.149 3.274H.987C.447 5.793 0 6.258 0 6.82c0 .586.446 1.05.987 1.05h11.606l-3.125 3.25c-.4.416-.4 1.076 0 1.466.376.416 1.01.416 1.41 0l4.84-5.033c.376-.391.376-1.05 0-1.466Z"})});t.Z=l},83820:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(85893),l=n(2589);n(67294);var o=n(1436),s=n(74189);function a(e){let{title:t,color:n}=e;return(0,r.jsxs)("div",{className:"relative px-6 items-center justify-center group flex",children:[(0,r.jsx)(o.Z,{type:"body_1",className:"text-md ".concat(n?"text-third":"text-first"," group-hover:-translate-x-4 transition-all"),content:t}),(0,r.jsx)(s.Z,{className:"absolute right-0 overflow-visible fill-current transition-all group-hover:-translate-x-1 -translate-x-4 transform ".concat(n?"text-third":"text-first"," ml-4 opacity-0 group-hover:opacity-100 mr-2")})]})}function i(e){let{title:t,color:n}=e;return(0,r.jsxs)("div",{className:"relative px-6 py-1 ".concat(n?"bg-third border-third":"bg-first border-second"," rounded items-center justify-center group flex"),children:[(0,r.jsx)(o.Z,{type:"body_1",className:"text-second group-hover:-translate-x-4 transition-all text-md",content:t}),(0,r.jsx)(s.Z,{className:"absolute right-0 overflow-visible fill-current transition-all group-hover:-translate-x-1 -translate-x-4 transform text-second ml-4 opacity-0 group-hover:opacity-100 mr-2"})]})}function c(e){let{title:t,color:n}=e;return(0,r.jsxs)("div",{className:"relative px-6 flex py-[2px] border-2 ".concat(n?"border-second":"border-first"," transition-all rounded items-center justify-center group"),children:[(0,r.jsx)(o.Z,{type:"body_1",className:"".concat(n?"text-second":"text-first"," text-md group-hover:-translate-x-4 transition-all"),content:t}),(0,r.jsx)(s.Z,{className:"absolute right-0 transition-all fill-current group-hover:-translate-x-1 transform ".concat(n?"text-second":"text-first"," ml-4 opacity-0 group-hover:opacity-100 mr-2 -translate-x-4 ")})]})}function d(e){let{title:t,target:n,url:o,variant:s,type:d,color:u,contentTypeMap:p}=e,v={default:(0,r.jsx)(i,{title:t,color:u}),outline:(0,r.jsx)(c,{title:t,color:u}),fill:(0,r.jsx)(i,{title:t,color:u}),basic:(0,r.jsx)(a,{title:t,color:u})};return(0,r.jsx)("div",{className:"flex",children:o?(0,r.jsx)("a",{"aria-label":"Leggi di pi\xf9 su ".concat(o),href:(0,l.yr)((0,l._o)(o),p),target:n,children:(0,r.jsx)("button",{children:v[s||"default"]})}):(0,r.jsx)("button",{type:d,children:v[s||"default"]})})}n(81367)},81367:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(85893);
1function l(e){let{orientation:t="row",space:n="0",children:l,wrap:o,position:s="",className:a=""}=e;return(0,r.jsx)("div",{className:"".concat(a," \n ").concat(o?"flex-wrap":""," \n ").concat(s," \n flex-col space-y-4 flex lg:flex-").concat(t," \n ").concat(t.includes("reverse")?t.includes("row")?"lg:space-x-reverse":"lg:space-y-reverse":""," \n ").concat("row"===t||"row-reverse"===t?"lg:space-y-0":"lg:space-x-0"," \n lg:space-").concat("row"===t||"row-reverse"===t?"x":"y","-").concat(n||0),children:l})}},1436:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893),l=n(2589);function o(e){let{content:t,type:n,tag:o,orientation:s,className:a="",color:i,allowEmbeds:c}=e,d=c?(0,l.MZ)(t):(0,l.Nw)(t);return(0,r.jsx)(r.Fragment,{children:t?(0,r.jsx)("".concat(o||"div"),{style:{color:i},className:"".concat(a," gl-content-").concat(n||"body_1"," ").concat(s||"text-left"," gl-formatter"),dangerouslySetInnerHTML:{__html:d}}):null})}},48500:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(85893);function l(e){let{color:t,children:n,className:l,wrapperClassName:o,id:s}=e;return(0,r.jsx)("section",{id:s,className:"gl-container-".concat(t||"white"," ").concat(l||""),children:(0,r.jsx)("div",{className:"gl-wrapper ".concat(o||""),children:n})})}},2589:function(e,t,n){"use strict";n.d(t,{MZ:function(){return a},Nw:function(){return s},QE:function(){return u},_o:function(){return i},bZ:function(){return c},yr:function(){return d}});var r=n(27856),l=n.n(r);n(76489);var o=n(96486);let s=e=>l().sanitize(e),a=e=>l().sanitize(e,{ADD_TAGS:["iframe"],ADD_ATTR:["allow","allowfullscreen","frameborder","src","title","width","height","style","class"]}),i=e=>e?e.includes("/app/uploads")?e:e.includes("https://api.cavalieridellavoro.it")||e.includes("https://www.cavalieridellavoro.it")?e.replace("".concat("https://api.cavalieridellavoro.it"),"").replace("https://www.cavalieridellavoro.it","").toLowerCase():e:null,c=(e,t)=>t?e?e.replace("<p>","").replace("</p>","").split(" ").slice(0,t).join(" ")+"...":void 0:e,d=(e,t)=>{let n=e;return Array.isArray(t)&&t.map(t=>{(null==e?void 0:e.includes("/".concat(t.wordpress_cpt.name,"/")))&&(n=null==e?void 0:e.replace(t.wordpress_cpt.name,t.g_name))}),n},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,o.isEmpty)(e)||(0,o.isEmpty)(t)?"":"/preview/".concat(t,"/?postType=").concat(e,"&postId=").concat(t)}}},function(e){e.O(0,[662,476,669,966,774,888,179],function(){return e(e.s=36429)}),_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.