1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];if(null!=a)for(var n in a)a.hasOwnProperty(n)&&(e[n]=a[n])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:mentortools-frontend":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c9917065-7a84-40ea-ace0-465d55e0d548",e._sentryDebugIdIdentifier="sentry-dbid-c9917065-7a84-40ea-ace0-465d55e0d548")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3187],{10801:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/landing-page/[id]",function(){return a(73251)}])},22068:(e,t,a)=>{"use strict";a.d(t,{V:()=>i});var n=a(37876),r=a(5236),s=a(67020);let i=()=>(0,n.jsx)(s.default,{"data-sentry-element":"Error500","data-sentry-component":"ServerSideError","data-sentry-source-file":"ServerSideError.tsx"});i.getLayout=e=>(0,n.jsx)(r.A,{children:e})},53047:(e,t,a)=>{"use strict";a.d(t,{H:()=>i});var n=a(74359),r=a(11313),s=a(18446);let i=(e,t=!0)=>{let a=(0,s.A)(),{isLoading:i,data:l,isError:o,isPending:d,isSuccess:c}=(0,n.I)({queryKey:r.Ay.landings.settings(e).queryKey,queryFn:()=>a.getOne(e),select:e=>e.data.result,enabled:t});return{landing:l,isLandingsLoading:i,isLandingsError:o,isLandingsPending:d,isLandingsSuccess:c}}},67020:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>g});var n=a(37876),r=a(48230),s=a.n(r),i=a(22208),l=a(64713),o=a(31941),d=a(66950),c=a(5236),u=a(30942);let y=(0,l.Ay)(d.A)(({theme:e})=>({[e.breakpoints.down("md")]:{width:"90vw"}})),m=()=>{let{t:e}=(0,u.o)();return(0,n.jsx)(d.A,{className:"content-center","data-sentry-element":"Box","data-sentry-component":"Error500","data-sentry-source-file":"500.tsx",children:(0,n.jsx)(d.A,{sx:{p:5,display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"},"data-sentry-element":"Box","data-sentry-source-file":"500.tsx",children:(0,n.jsxs)(y,{"data-sentry-element":"BoxWrapper","data-sentry-source-file":"500.tsx",children:[(0,n.jsx)(o.A,{variant:"h2",sx:{mb:1.5},"data-sentry-element":"Typography","data-sentry-source-file":"500.tsx",children:e("ALERT.ERROR.STATUS.500.issue")}),(0,n.jsx)(o.A,{sx:{mb:6,color:"text.secondary"},"data-sentry-element":"Typography","data-sentry-source-file":"500.tsx",children:e("ALERT.ERROR.STATUS.500.description")}),(0,n.jsx)(i.A,{href:"/",component:s(),variant:"contained","data-sentry-element":"Button","data-sentry-source-file":"500.tsx",children:e("ACTION.back_home")})]})})})};m.getLayout=e=>(0,n.jsx)(c.A,{children:e});let g=m},73251:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>z});var n=a(37876),r=a(89099),s=a(62902),i=a(74234),l=a(12772),o=a(5157),d=a(22068),c=a(30942),u=a(53047),y=a(99399),m=a(69884),g=a(68010),x=a(29171),T=a(21372),A=a(14958),p=a(25481),S=a(26530),_=a(67768),h=a(40097),b=a(87785),I=a(11313),f=a(16361),N=a(18446),F=a(27345),j=a(68954),G=a(61210),E=a(6498),L=a(60880),v=a(58390),O=a(66950),P=a(76587),R=a(31941),C=a(25875),M=a(88992),k=a(75542),w=a(89144),D=a(82867);let q=({control:e})=>{let t=(0,i.A)(),{t:a}=(0,c.o)("translation",{keyPrefix:"PAGE.LANDING_PAGE.SETTINGS"});return(0,n.jsxs)(s.A,{marginTop:t.spacing(12),gap:t.spacing(8),"data-sentry-element":"Stack","data-sentry-component":"SeoFormTab","data-sentry-source-file":"SeoFormTab.tsx",children:[(0,n.jsxs)(s.A,{gap:t.spacing(4),"data-sentry-element":"Stack","data-sentry-source-file":"SeoFormTab.tsx",children:[(0,n.jsx)(M.xI,{name:"meta_title",control:e,render:({field:{value:e,onChange:t}})=>(0,n.jsx)(k.Ay,{label:a("FORM_SETTINGS.meta_title"),placeholder:a("FORM_SETTINGS.meta_title_placeholder"),value:e??"",onChange:t,fullWidth:!0,helperText:a("FORM_SETTINGS.meta_title_hint")}),"data-sentry-element":"Controller","data-sentry-source-file":"SeoFormTab.tsx"}),(0,n.jsx)(M.xI,{name:"meta_description",control:e,render:({field:{value:e,onChange:t}})=>(0,n.jsx)(k.Ay,{label:a("FORM_SETTINGS.meta_description"),placeholder:a("FORM_SETTINGS.meta_description_placeholder"),value:e??"",onChange:t,fullWidth:!0,multiline:!0,minRows:3,helperText:a("FORM_SETTINGS.meta_description_hint")}),"data-sentry-element":"Controller","data-sentry-source-file":"SeoFormTab.tsx"})]}),(0,n.jsxs)(s.A,{gap:t.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"SeoFormTab.tsx",children:[(0,n.jsxs)(s.A,{gap:t.spacing(3),"data-sentry-element":"Stack","data-sentry-source-file":"SeoFormTab.tsx",children:[(0,n.jsx)(R.A,{variant:"h5","data-sentry-element":"Typography","data-sentry-source-file":"SeoFormTab.tsx",children:a("FORM_SETTINGS.noindex")}),(0,n.jsx)(R.A,{variant:"body1","data-sentry-element":"Typography","data-sentry-source-file":"SeoFormTab.tsx",children:a("FORM_SETTINGS.noindex_description")})]}),(0,n.jsx)(M.xI,{control:e,name:"noindex",render:({field:{value:e,onCh
1ange:t}})=>(0,n.jsx)(P.A,{onChange:t,checked:e,control:(0,n.jsx)(C.A,{}),label:a("FORM_SETTINGS.noindex_label")}),"data-sentry-element":"Controller","data-sentry-source-file":"SeoFormTab.tsx"})]}),(0,n.jsxs)(s.A,{gap:t.spacing(4),"data-sentry-element":"Stack","data-sentry-source-file":"SeoFormTab.tsx",children:[(0,n.jsxs)(s.A,{gap:t.spacing(3),"data-sentry-element":"Stack","data-sentry-source-file":"SeoFormTab.tsx",children:[(0,n.jsx)(R.A,{variant:"h5","data-sentry-element":"Typography","data-sentry-source-file":"SeoFormTab.tsx",children:a("FORM_SETTINGS.social_image")}),(0,n.jsx)(R.A,{variant:"body1","data-sentry-element":"Typography","data-sentry-source-file":"SeoFormTab.tsx",children:a("FORM_SETTINGS.social_image_description")})]}),(0,n.jsx)(M.xI,{control:e,name:"social_image_id",render:({field:{value:e,onChange:t}})=>(0,n.jsx)(w.A,{existingImageId:e||null,formSetterFn:e=>t(e||null),requirementsLabel:a("FORM_SETTINGS.social_image_constraints"),aspectRatio:1200/630,actionCode:D.Qi.EDIT_LANDING_PAGE}),"data-sentry-element":"Controller","data-sentry-source-file":"SeoFormTab.tsx"}),(0,n.jsx)(M.xI,{name:"social_image_alt",control:e,render:({field:{value:e,onChange:t}})=>(0,n.jsx)(k.Ay,{label:a("FORM_SETTINGS.social_image_alt"),placeholder:a("FORM_SETTINGS.social_image_alt_placeholder"),value:e??"",onChange:t,fullWidth:!0}),"data-sentry-element":"Controller","data-sentry-source-file":"SeoFormTab.tsx"})]}),(0,n.jsx)(O.A,{"aria-hidden":!0,sx:{flexShrink:0,minHeight:t.spacing(10)},"data-sentry-element":"Box","data-sentry-source-file":"SeoFormTab.tsx"})]})};var V=a(14232),B=a(82179),$=a(29608),K=a(47692);let Q=({control:e,languages:t})=>{let{t:a}=(0,c.o)("translations",{keyPrefix:"PAGE.GENERAL_SETTINGS"}),{t:r}=(0,c.o)("translation",{keyPrefix:"PAGE.LANDING_PAGE.SETTINGS"}),s=(0,i.A)(),l=(0,V.useMemo)(()=>t.map(e=>({...e,label:a(`FORM.languages.${e.code}`)})),[t,a]);return 0===t.length?null:(0,n.jsxs)(B.A,{spacing:s.spacing(6),minHeight:{xs:0,md:600},"data-sentry-element":"Stack","data-sentry-component":"LanguageFromTab","data-sentry-source-file":"LanguageFromTab.tsx",children:[(0,n.jsx)(B.A,{"data-sentry-element":"Stack","data-sentry-source-file":"LanguageFromTab.tsx",children:(0,n.jsx)(R.A,{variant:"body1","data-sentry-element":"Typography","data-sentry-source-file":"LanguageFromTab.tsx",children:a("language_tab_text")})}),(0,n.jsx)(M.xI,{control:e,name:"language_id",render:({field:{value:e,onChange:t}})=>(0,n.jsx)($.A,{value:e,onChange:e=>t(Number(e.target.value)),children:(0,n.jsx)(B.A,{spacing:s.spacing(1.5),maxWidth:600,useFlexGap:!0,children:l.map(({id:e,label:t})=>(0,n.jsx)(P.A,{value:e,control:(0,n.jsx)(K.A,{}),label:t},e))})}),"data-sentry-element":"Controller","data-sentry-source-file":"LanguageFromTab.tsx"}),(0,n.jsxs)(B.A,{gap:s.spacing(4),"data-sentry-element":"Stack","data-sentry-source-file":"LanguageFromTab.tsx",children:[(0,n.jsx)(R.A,{variant:"h5","data-sentry-element":"Typography","data-sentry-source-file":"LanguageFromTab.tsx",children:r("visibility")}),(0,n.jsx)(M.xI,{name:"is_listed",control:e,render:({field:{value:e,onChange:t}})=>(0,n.jsx)(P.A,{onChange:t,checked:e,control:(0,n.jsx)(C.A,{}),label:e?r("visibility_description_visible"):r("visibility_description_invisible")}),"data-sentry-element":"Controller","data-sentry-source-file":"LanguageFromTab.tsx"})]})]})};var W=a(92468),H=a(52987);let U={sx:{"& .MuiTabPanel-root":{height:"auto !important"},"& .MuiTabPanel-root > div":{height:"auto !important"}}},X=({landing:e})=>{let{t}=(0,c.o)("translation",{keyPrefix:"PAGE.LANDING_PAGE.SETTINGS"}),{data:a=[]}=(0,T.J)(),s=(0,r.useRouter)(),{control:i,handleSubmit:l}=(0,x.L)(e),{mutateAsync:o,isPending:d}=(()=>{let e=(0,_.jE)(),{notify:t}=(0,f.A)(),a=(0,r.useRouter)(),n=(0,N.A)();return(0,h.n)({mutationFn:n.updateOne,onSuccess:async()=>{await e.invalidateQueries({queryKey:I.Ay.landings.allNewLandings.queryKey}),await e.invalidateQueries({queryKey:I.Ay.landings.allNewLandingsCount.queryKey}),await e.invalidateQueries({queryKey:b.v._def}),await e.invalidateQueries({queryKey:I.Ay.landings.settings(parseInt(`${a.query?.id}`)).queryKey}),t("LANDING.update",{type:"success"})},onError:()=>t("LANDING.update",{type:"error"})})})(),u=l(t=>o({...e,...t})),y=l(async t=>{await o({...e,...t}),s.push(`${m.C.landingPage}?${(0,L.O)(s.query)}`)}),{data:g,isLoading:O}=(0,p.j)(),{data:P,isLoading:R}=(0,S.S)(),{user:C}=(0,A.A)();return(0,n.jsxs)("form",{"data-sentry-component":"LandingSettingsForm","data-sentry-source-file":"LandingSettingsForm.tsx",children:[(0,n.jsxs)(F.A,{title:t("title"),contentBoxProps:U,"data-sentry-element":"FormLayout","data-sentry-source-file":"LandingSettingsForm.tsx",children:[(0,n.jsx)(G.A,{menuIcon:"tabler:settings",menuTitle:t
1("NAVIGATION.settings"),menuSubTitle:t("NAVIGATION.settings_description"),tabTitle:t("NAVIGATION.settings"),tabSubtitle:t("FORM_SETTINGS.description"),"data-sentry-element":"FormTab","data-sentry-source-file":"LandingSettingsForm.tsx",children:(0,n.jsx)(v.r,{landing_id:e.id,isSettings:!0,control:i,published_at:e.published_at,"data-sentry-element":"SettingsFormTab","data-sentry-source-file":"LandingSettingsForm.tsx"})}),(0,n.jsx)(G.A,{menuIcon:"tabler:world-search",menuTitle:t("NAVIGATION.seo"),menuSubTitle:t("NAVIGATION.seo_description"),tabTitle:t("NAVIGATION.seo"),"data-sentry-element":"FormTab","data-sentry-source-file":"LandingSettingsForm.tsx",children:(0,n.jsx)(q,{control:i,"data-sentry-element":"SeoFormTab","data-sentry-source-file":"LandingSettingsForm.tsx"})}),(0,n.jsx)(G.A,{menuIcon:"tabler:key",menuTitle:t("NAVIGATION.analytics_pixels"),menuSubTitle:t("NAVIGATION.analytics_pixels_description"),tabTitle:t("NAVIGATION.analytics_pixels"),"data-sentry-element":"FormTab","data-sentry-source-file":"LandingSettingsForm.tsx",children:(0,n.jsx)(W.A,{control:i,"data-sentry-element":"AnalyticsFormTab","data-sentry-source-file":"LandingSettingsForm.tsx"})}),(0,n.jsx)(G.A,{menuIcon:"tabler:code",menuTitle:t("NAVIGATION.custom_scripts"),menuSubTitle:t("NAVIGATION.custom_scripts_description"),tabTitle:t("NAVIGATION.custom_scripts"),"data-sentry-element":"FormTab","data-sentry-source-file":"LandingSettingsForm.tsx",children:(0,n.jsx)(H.A,{control:i,categories:g,placements:P,isCategoriesLoading:O,isPlacementsLoading:R,"data-sentry-element":"CustomScriptsFormTab","data-sentry-source-file":"LandingSettingsForm.tsx"})}),C?.role===E.Pe.ADMIN&&(0,n.jsx)(G.A,{menuIcon:"tabler:world-cog",menuTitle:t("NAVIGATION.template_settings"),tabTitle:t("NAVIGATION.language"),children:(0,n.jsx)(Q,{control:i,languages:a})})]}),(0,n.jsx)(j.A,{cancelButton:{onSubmit:()=>{s.push(`${m.C.landingPage}?${(0,L.O)(s.query)}`)}},saveButton:{onSubmit:u,actionCode:D.Qi.EDIT_LANDING_PAGE,isSubmitting:d},saveAndCloseButton:{onSubmit:y,actionCode:D.Qi.EDIT_LANDING_PAGE,isSubmitting:d},"data-sentry-element":"FormFooter","data-sentry-source-file":"LandingSettingsForm.tsx"})]})};var J=a(69348);let z=()=>{let{t:e}=(0,c.o)("translation",{keyPrefix:"PAGE.LANDING_PAGE"}),t=(0,i.A)(),a=(0,r.useRouter)(),{hasAccess:x}=(0,y.D)(),{landing:T,isLandingsError:A,isLandingsLoading:p}=(0,u.H)(parseInt(`${a.query.id}`),x(D.Qi.EDIT_LANDING_PAGE));return x(D.Qi.EDIT_LANDING_PAGE)?p?(0,n.jsx)(l.A,{}):A||!T?(0,n.jsx)(d.V,{}):(0,n.jsxs)(s.A,{direction:"column",gap:t.spacing(6.5),"data-sentry-element":"Stack","data-sentry-component":"Settings","data-sentry-source-file":"index.tsx",children:[(0,n.jsx)(g.A,{separator:(0,n.jsx)(o.A,{icon:"tabler:chevron-right"}),data:[{text:e("home"),isActive:!0},{href:`${m.C.landingPage}?${(0,L.O)(a.query)}`,text:e("title")},{href:m.C.addNewCourse,text:`${e("SETTINGS.title")} "${T?.title}"`,isActive:!0}],"data-sentry-element":"BreadCrumbs","data-sentry-source-file":"index.tsx"}),(0,n.jsx)(X,{landing:T,"data-sentry-element":"LandingSettingsForm","data-sentry-source-file":"index.tsx"})]}):(0,n.jsx)(J.default,{isTeamMember:!0})}}},e=>{e.O(0,[6862,3220,2909,636,6593,8792],()=>e(e.s=10801)),_N_E=e.O()}]); 2//# sourceMappingURL=[id]-23e2f860a42d932b.js.map
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.