1import{aW as Z,i as ee,jg as se,jh as oe,iB as te,a2 as re,ji as ae,eO as ne,j as e,S as K,l as x,V as B,U as _,n as F,m as h,o as P,G as ie,bG as de,w as g,d$ as le,c as E,b0 as ce,a7 as T,u as O,ai as w,ak as me,eE as ue,jj as pe,r as he,d as fe,h as je,f0 as ge,C as j,k as p,W as N,br as C,a8 as S,ew as k,aa as v,be as xe,R as $,T as L,a$ as _e,g2 as R,ac as be,F as y,a3 as Se,bk as ve,bi as we,ax as ye,aP as Fe,B as M,Q as Ie,g3 as We,p as Q,ad as Ke,t as z,Z as Ee,jk as Te,aD as Ne,L as Ce,jl as ke}from"./index-DUWMLp_A.js";import{U as Ae}from"./UnsavedFormModal-B_TIUpd1.js";import{T as A}from"./TooltipIcon-B0mCTkiG.js";import{B as De}from"./BackgroundUploader-DmGNLzKt.js";import{c as qe}from"./file-BZ30gCWE.js";import"./commonMessageService-BKyuinJt.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"03512784fd78c0db53b8a0e370b452e2333ce80d"};var s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="bdee006e-c50d-429a-ad5b-e9ae5a312f3f",o._sentryDebugIdIdentifier="sentry-dbid-bdee006e-c50d-429a-ad5b-e9ae5a312f3f")}catch{}})();const Be=async({showId:o,payload:s})=>{if(s.cover&&s.cover instanceof File&&await oe(o,s.cover,"cover_page"),s.cover===null)try{await te(o,"cover_page")}catch{console.log("No image to delete")}const n=re.decamelizeKeys(s,{process:(u,f,c)=>u==="recommendedShows"?u:f(u,c)}),{data:l}=await ae(o,n);return l},Pe=()=>{const o=Z();return ee({mutationFn:Be,onSuccess:()=>{o.invalidateQueries({queryKey:se.all()})}})};function $e({formatPage:o,type:s,coverSize:n,control:l,name:u,...f}){const{field:c,fieldState:b}=ne({name:u,control:l});return e.jsxs(K,{$gap:"0.5rem",children:[e.jsxs(K,{$gap:"0.5rem",children:[e.jsxs(K,{$gap:"0.25rem",children:[e.jsx(x,{children:B("4EgDcv",{description:"Background image",default:"Image d'arrière-plan"})}),e.jsx(_,{color:"--neutral500",children:B("ozy69/",{description:"This image will be applied to the header of your {type}.",default:"Ce fond sera appliqué à l'en-tête de votre {type}.",variables:{type:s}})})]}),e.jsx(De,{align:"flex-start",objectFit:"cover",formatPage:o,value:c.value,name:c.name,onChange:c.onChange,onBlur:c.onBlur,...f})]}),e.jsx(_,{color:"--neutral500",children:e.jsx(F,{i18nKey:"lejsu8BS",default:"Taille idéale : {coverSize} <linebreak /> Format : JPG ou PNG <linebreak /> Poids max : 10 Mo",description:"Ideal size : {coverSize} <linebreak /> Format : JPG or PNG <linebreak /> Max weight : 10 MB",components:{linebreak:e.jsx("p",{})},variables:{coverSize:n}})}),b.error?.message&&e.jsx(h,{children:b.error.message})]})}const Le=({locale:o="en"})=>{const s=["image/jpg","image/jpeg","image/png"],n=/^#([0-9A-F]{3}|[0-9A-F]{6})$/i;return P({isPublished:T(),multiShow:T(),displayTranscript:T(),recommendedShows:ce(P({value:g()})).optional().nullable(),googleAnalytics:g().max(15).optional().nullable(),facebookPixel:g().max(16).optional().nullable(),color:g().regex(n,{message:E.color()}).optional(),cover:g().or(le(File).refine(l=>l===null?!0:s.includes(l.type),{message:E.acceptedMimes({acceptedMimes:s.join(", ")})}).refine(l=>typeof l=="string"||l===null?!0:qe(o,l,10),{message:E.imgMaxSize({max:10})})).optional().nullable(),featuredEpisode:ie().or(de(["none","latest"]))})},Re="Form__Form__form__jDhK-SKq",Me="Form__Form__formSection__jDhK-SKq",ze="Form__Form__title__jDhK-SKq",Oe="Form__Form__subTitle__jDhK-SKq",Qe="Form__Form__infoIcon__jDhK-SKq",Ge="Form__Form__recommendedShowWrapper__jDhK-SKq",Ue="Form__Form__recommendedShowFields__jDhK-SKq",Ve="Form__Form__recommendedShowField__jDhK-SKq",Je="Form__Form__removeButton__jDhK-SKq",Ye="Form__Form__addRecommendedShowButton__jDhK-SKq",He="Form__Form__ctaWrapper__jDhK-SKq",Xe="Form__Form__label__jDhK-SKq",Ze="Form__Form__description__jDhK-SKq",es="Form__Form__submitWrapper__jDhK-SKq",ss="Form__Form__buttonIcon__jDhK-SKq",os="Form__Form__trashIcon__jDhK-SKq",a={form:Re,formSection:Me,title:ze,subTitle:Oe,infoIcon:Qe,recommendedShowWrapper:Ge,recommendedShowFields:Ue,recommendedShowField:Ve,removeButton:Je,addRecommendedShowButton:Ye,ctaWrapper:He,label:Xe,description:Ze,submitWrapper:es,buttonIcon:ss,trashIcon:os},ts=Q("/_authenticated/app/channel/$channelId/show/$showId/communication/website"),rs=({values:o})=>{const{t:s}=O(),{showId:n,channelId:l}=ts.useParams(),{data:u}=w(me),f=Pe(),{data:c}=w(ue(Number(n))),b=Le({locale:u.language}),{data:q}=w(pe(Number(n))),G=he.useMemo(()=>q.map(t=>({id:t.id,name:t.name}))||[],[q]),{control:m,handleSubmit:U,formState:I,reset:V}=fe({mode:"onChange",resolver:je(b),values:o}),{fields:W,append:J,remove:Y}=ge({name:"recommendedShows",control:m}),H=t=>{const i=t.featuredEpisode==="none"?null:t.featuredEpisode==="latest"?"latest":"specific",d={...t,featuredEpisodeType:i,featuredEpisodeId:i==="specific"&&typeof t.featuredEpisode=="number"?t.featuredEpisode:null,recommendedShows:t.recommendedShows?.map(r=>r.value)??[]};f.mutate({showId:Number(n),payload:d},{onError:()=>{z.alert(s("5MwVg8",{description:"Something went wrong, data has not been saved.",default:"Une erreur est survenue, les données n'ont pas été enregistrées."}))},onSuccess:()=>{Ke("Website Activated"),z.success(s("lmVpO/",{description:"Your changes will appear on your Ausha website in just a few minutes. ð",default:"Vos modifications seront visibles sur votre site web Ausha d'ici quelques minutes. ð"})),V(t)}})};return e.jsxs(e.Fragment,{children:[e.jsx(Ae,{shouldBlockNavigation:I.isDirty}),e.jsxs("form",{className:a.form,onSubmit:U(H),children:[e.jsxs("div",{className:a.formSection,children:[e.jsx("div",{className:a.title,children:s("qlUtsB",{description:"Settings",default:"Paramètres"})}
1),e.jsx(j,{control:m,name:"isPublished",render:({field:{onChange:t,value:i,...d},fieldState:r})=>e.jsxs(p,{children:[e.jsxs(N,{$gap:"0.25rem",$align:"start",children:[e.jsx(C,{...d,isSelected:i,onChange:t,children:s("Npbvte",{description:"Activate Website",default:"Activer le Site Web"})}),e.jsxs(S,{children:[e.jsx(k,{children:e.jsx("span",{role:"tooltip",children:e.jsx(A,{})})}),e.jsx(v,{placement:"top",children:s("np75x3",{description:"Enable your show's Website",default:"Le Site Web de votre émission est en ligne."})})]})]}),r.error&&e.jsx(h,{children:r.error.message})]})}),e.jsxs(p,{children:[e.jsx(x,{children:s("6B+Lhx",{description:"Link to your website",default:"Lien de votre site web"})}),e.jsx(xe,{children:e.jsx(F,{i18nKey:"J60rPW",description:"Permalink can be modified in your show's {settings}.",default:"Ce permalien peut-être modifié dans les <settings>paramètres</settings> de votre émission.",components:{settings:e.jsx($,{to:"/app/channel/$channelId/show/$showId/settings/info",params:{channelId:l,showId:n},variant:"primary"})}})}),e.jsx(L,{value:c.slug,startElement:e.jsx(R,{children:"https://podcast.ausha.co/"}),isReadOnly:!0,endElement:e.jsx(_e,{valueToCopy:`https://podcast.ausha.co/${c.slug}`})})]}),e.jsx(j,{control:m,name:"multiShow",render:({field:{onChange:t,value:i,...d},fieldState:r})=>e.jsxs(p,{children:[e.jsxs(N,{$gap:"0.25rem",$align:"start",children:[e.jsx(C,{...d,isSelected:i,onChange:t,children:s("YYzGb2",{description:"Multiple shows",default:"Multi-émission"})}),e.jsxs(S,{children:[e.jsx(k,{children:e.jsx("span",{role:"tooltip",children:e.jsx(A,{})})}),e.jsx(v,{placement:"top",children:s("wDVRsB",{description:"Allow visitors to your page to see the different shows in your account",default:"Permettre aux visiteurs de votre page de voir les différentes émissions de votre compte."})})]})]}),r.error&&e.jsx(h,{children:r.error.message})]})}),e.jsx(j,{control:m,name:"displayTranscript",render:({field:{onChange:t,value:i,...d},fieldState:r})=>e.jsxs(p,{children:[e.jsxs(N,{$gap:"0.25rem",$align:"start",children:[e.jsx(C,{...d,isSelected:i,onChange:t,children:s("WXrISI",{description:"Transcription",default:"Transcription"})}),e.jsxs(S,{children:[e.jsx(k,{children:e.jsx("span",{role:"tooltip",children:e.jsx(A,{})})}),e.jsx(v,{placement:"top",children:s("U3t8un",{description:"Display transcripts of your episodes (transcripts must be activated and generated for each episode)",default:"Afficher la transcription de vos épisodes (nécessite que la transcription soit activée et générée par épisode)."})})]})]}),r.error&&e.jsx(h,{children:r.error.message})]})}),e.jsx(j,{control:m,name:"featuredEpisode",render:({field:{onChange:t,value:i,...d},fieldState:r})=>e.jsxs(p,{children:[e.jsx(x,{tooltip:e.jsxs(S,{children:[e.jsx(be,{children:e.jsx(y,{icon:Se,className:a.infoIcon})}),e.jsx(v,{placement:"top",children:s("4QBhfw",{description:"Choose an episode to feature at the top of your Ausha website.",default:"Choisissez un épisode que vous souhaitez mettre en avant en haut de votre site web Ausha"})})]}),children:s("gl0oOS",{description:"Featured episode",default:"Episode à la une"})}),e.jsx(ve,{...d,value:i,onChange:t,items:[{id:"none",name:s("2cU2Uf",{description:"Don't display a featured episode",default:"Ne pas afficher d'épisode à la une"})},{id:"latest",name:s("pZRCJd",{description:"Always display the most recent episode",default:"Toujours afficher l'épisode le plus récent"}),hasSeparator:!0},...G||[]],children:X=>e.jsx(we,{...X})}),r.error&&e.jsx(h,{children:r.error.message})]})}),e.jsxs("div",{className:a.recommendedShowWrapper,children:[e.jsx("div",{className:a.subTitle,children:s("vKRLRfxy",{description:"Recommander des émissions (4 maximum) ",default:"Recommander des émissions (4 maximum) "})}),e.jsx("ul",{className:a.recommendedShowFields,children:W.map((t,i)=>e.jsxs("li",{className:a.recommendedShowField,children:[e.jsx(j,{control:m,name:`recommendedShows.${i}.value`,render:({field:d,fieldState:r})=>e.jsxs(p,{children:[e.jsx(x,{children:s("V4+oX7",{description:"Link for show recommendation",default:"Lien de l'émission à recommander"})}),e.jsx(L,{...d,startElement:e.jsx(R,{children:"https://podcast.ausha.co/"})}),r.error&&e.jsx(h,{children:r.error.message})]})}),W.length>1&&e.jsx(ye,{className:a.removeButton,"aria-label":s("jTJesD",{description:"Delete",default:"Supprimer"}),variant:"link-danger",onPress:()=>Y(i),icon:e.jsx(y,{icon:Fe,className:a.trashIcon})})]},t.id))}),W.length<4&&e.jsx(M,{className:a.addRecommendedShowButton,isDisabled:!1,startIcon:e.jsx(y,{icon:Ie,className:a.buttonIcon}),variant:"ghost",onPress:()=>J({value:""}),children:s("2DguGC",{description:"Add show",default:"Ajouter une émission"})})]})]}),e.jsxs("div",{className:a.formSection,children:[e.jsx("div",{className:a.title,children:s("o6numm",{description:"Style",default:"Apparence"})}
1),e.jsx(j,{control:m,name:"color",render:({field:{onChange:t,...i},fieldState:d})=>e.jsxs(p,{children:[e.jsx(x,{children:s("KFktCx",{description:"Accent color",default:"Couleur principale"})}),e.jsx(We,{...i,onChange:r=>{t(r.toString("hex"))}}),d.error&&e.jsx(h,{children:d.error.message})]})}),e.jsx($e,{control:m,name:"cover",formatPage:"cover_page",type:s("CO9mqW",{description:"Website",default:"Site Web"}),coverSize:"2000*800px"}),e.jsxs("div",{className:a.ctaWrapper,children:[e.jsx(_,{className:a.label,children:s("2joTvt",{description:"Custom buttons",default:"Boutons personnalisés"})}),e.jsx(_,{className:a.description,children:e.jsx(F,{i18nKey:"OLJzrl",description:"These buttons will be displayed on the header of your website and can be managed via the {link} tab of the Configuration menu",default:"Ces boutons seront affichés sur l'en-tête de votre site web et peuvent être gérés via l'onglet <link>Call to Action</link> du menu Configuration",components:{link:e.jsx($,{to:"/app/channel/$channelId/show/$showId/communication/settings/call-to-action",params:{channelId:l,showId:n},variant:"primary"})}})})]})]}),e.jsx("div",{className:a.submitWrapper,children:e.jsx(M,{type:"submit",isDisabled:!I.isValid||!I.isDirty,isLoading:f.isPending,children:s("8pmblh",{description:"Save",default:"Enregistrer"})})})]})]})},as="WebsiteSettings__WebsiteSettings__pageWrapper__9NmADa7R",ns="WebsiteSettings__WebsiteSettings__formWrapper__9NmADa7R",is="WebsiteSettings__WebsiteSettings__headerIcon__9NmADa7R",D={pageWrapper:as,formWrapper:ns,headerIcon:is},ds=Q("/_authenticated/app/channel/$channelId/show/$showId/communication/website"),ls=o=>{const s=o.recommendedShows.map(n=>({value:n}));return{isPublished:o.isPublished,multiShow:o.multiShow,displayTranscript:o.displayTranscript,recommendedShows:s?.length&&s.length>0?s:[{value:""}],color:o.color??"#751CBF",cover:o.coverPageUrl,featuredEpisode:o.featuredEpisodeType==="specific"&&o.featuredEpisodeId?o.featuredEpisodeId:o.featuredEpisodeType===null?"none":"latest"}},cs=()=>{Ee("Website Tab Viewed");const{showId:o}=ds.useParams(),{data:s}=w(Te(Number(o))),{t:n}=O();return e.jsxs("div",{className:D.pageWrapper,children:[e.jsx(Ne,{title:n("CO9mqW",{description:"Website",default:"Site Web"}),icon:e.jsx(y,{icon:ke,className:D.headerIcon}),children:e.jsx(_,{color:"--neutral500",children:e.jsx(F,{i18nKey:"2DQHu/",description:"Customize your automatically generated and search-engine optimized podcast website. <articleLink>Learn more</articleLink>.",default:"Personnalisez le site web de votre podcast, généré automatiquement par Ausha et optimisé pour les moteurs de recherche. <articleLink>En savoir plus</articleLink>.",components:{articleLink:e.jsx(Ce,{href:n("Sg08li",{description:"https://help.ausha.co/en/articles/5127429-what-is-the-website-feature-on-ausha",default:"https://help.ausha.co/fr/articles/5127429-qu-est-ce-que-le-site-web-ausha"}),target:"_blank",rel:"noopener noreferrer"})}})})}),e.jsx("div",{className:D.formWrapper,children:e.jsx(rs,{values:ls(s)})})]})},gs=cs;export{gs as component}; 2//# sourceMappingURL=website-lKYRXA-v.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.