1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a84ba926-74f2-5c15-a5a7-5525eab4c732")}catch(e){}}(); 3import{s as e,t}from"./jsx-runtime-D4ePz0Hl.js";import{t as n}from"./react-BXH-GOAS.js";import{O as r,P as i,c as a,f as o}from"./components-CDo3yjgw.js";import{t as s}from"./useTranslation-xRzBcOIb.js";import{r as c}from"./dist-DaRpaGs2.js";import{L as l,f as u,p as d,t as f}from"./StaticPage-BpUCEhHL.js";import{t as p}from"./useTypedLoaderData-Ds8C8hPk.js";import{d as m,u as h}from"./PricingSkeleton-b9VHjB7R.js";import{t as g}from"./shouldRevalidateLoaderData-CgSrcqeZ.js";import{Ct as _,St as v,Tt as y,wt as b,xt as x}from"./PostContent-B0cbW90M.js";import{o as S}from"./ActionForm-ubtCpxTm.js";import{n as C,t as w}from"./getMergedMetaData-W0YEAho6.js";import{t as T}from"./esm-kfzYxcTC.js";import{n as E}from"./BottomSheetDialog-DcPGSOIu.js";function D(e,t){return t.isPremium&&e.platform!==`spotify`?null:t.platformLinks?.[e.platform]||null}var O=[{id:`spotify`,platform:`spotify`,name:`Spotify`,Logo:x,urlScheme:e=>`spotify:addfeed:${encodeURIComponent(e)}`,helpUrl:`https://support.spotify.com/article/add-podcasts/`,disabled:!0},{id:`apple`,platform:`apple`,name:`Apple Podcasts`,Logo:y,urlScheme:e=>`podcast://${e.replace(/^https?:\/\//,``)}`,helpUrl:`https://support.apple.com/guide/podcasts/add-shows-by-url-podde6c1288/mac`},{id:`overcast`,platform:`overcast`,name:`Overcast`,Logo:_,urlScheme:e=>`overcast://x-callback-url/add?url=${encodeURIComponent(e)}`,helpUrl:`https://support.overcast.fm/hc/en-us/articles/16931601843732-Adding-podcasts-by-URL`},{id:`pocketcasts`,platform:`pocket_casts`,name:`Pocket Casts`,Logo:v,urlScheme:e=>`pktc://subscribe/${e.replace(/^https?:\/\//,``)}`,helpUrl:`https://support.pocketcasts.com/article/adding-a-podcast-by-rss-url/`},{id:`castro`,platform:`castro`,name:`Castro`,Logo:b,urlScheme:e=>`castro://subscribe/${encodeURIComponent(e)}`,helpUrl:`https://castro.fm/support/episodes/add-a-podcast`}],k=e(t(),1);function A({rssUrl:e,subscriberEmail:t,translations:n,isMobile:r,isSendingEmail:i,isPremium:a,platformLinks:o,spotifyOAuthHref:s,spotifyConnected:c,onAppClick:u,onCopyUrl:d,onSendEmail:f,onBack:p}){let m=e=>e.platform===`spotify`&&c?(0,k.jsx)(l,{type:`success`,size:`sm`,children:n[`manage.podcasts.add_to_app.connected_badge`]||`Connected`}):null;return(0,k.jsxs)(`div`,{className:`max-w-3xl px-8 py-8 mx-auto sm:px-12 lg:px-16`,children:[(0,k.jsxs)(`div`,{className:`mb-8`,children:[(0,k.jsxs)(`button`,{onClick:p,className:`flex items-center gap-2 mb-4 text-gray-600 hover:text-gray-900`,children:[`â `,n[`manage.podcasts.add_to_app.back_button`]||`Back`]}),(0,k.jsx)(`h1`,{className:`mb-2 text-3xl font-bold`,children:n[`manage.podcasts.add_to_app.page_title`]||`Add to podcast app`}),(0,k.jsx)(`p`,{className:`text-gray-600`,children:n[`manage.podcasts.add_to_app.page_description`]||`Choose your favorite podcast app to start listening`})]}),(0,k.jsx)(`div`,{className:`mb-8 space-y-3`,children:O.map(e=>{let t=e.platform===`spotify`?s:void 0,r=t?null:D(e,{isPremium:a,platformLinks:o}),i=!r&&!t&&(e.disabled||a&&e.premiumOnly);return t?(0,k.jsxs)(`a`,{href:t,className:`flex items-center justify-between w-full p-4 transition-colors border border-gray-200 rounded-lg hover:border-gray-300 hover:bg-gray-50`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,k.jsx)(e.Logo,{"aria-hidden":`true`,className:`w-6 h-6 shrink-0 rounded`}),(0,k.jsx)(`span`,{className:`font-medium`,children:e.name}),m(e)]}),(0,k.jsx)(`span`,{className:`shrink-0 text-gray-400`,children:`â`})]},e.id):r?(0,k.jsxs)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,className:`flex items-center justify-between w-full p-4 transition-colors border border-gray-200 rounded-lg hover:border-gray-300 hover:bg-gray-50`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,k.jsx)(e.Logo,{"aria-hidden":`true`,className:`w-6 h-6 shrink-0 rounded`}),(0,k.jsx)(`span`,{className:`font-medium`,children:e.name}),m(e)]}),(0,k.jsx)(`span`,{className:`shrink-0 text-gray-400`,children:`â`})]},e.id):(0,k.jsxs)(`button`,{onClick:i?void 0:()=>u(e),disabled:i,className:`flex items-center justify-between w-full p-4 transition-colors border border-gray-200 rounded-lg ${i?`cursor-not-allowed`:`hover:border-gray-300 hover:bg-gray-50`}`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,k.jsx)(e.Logo,{"aria-hidden":`true`,className:`w-6 h-6 shrink-0 rounded ${i?`grayscale`:``}`}),(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-col items-start`,children:[(0,k.jsx)(`span`,{className:`font-medium ${i?`text-gray-500`:``}`,children:e.name}),i&&(0,k.jsx)(`span`,{className:`break-words text-left text-xs text-gray-500`,children:n[`manage.podcasts.add_to_app.spotify_unavailable_note`]})]})]}),(0,k.jsx)(`span`,{className:`shrink-0 text-gray-400`,children:`â`})]},e.id)})}),(0,k.jsxs)(`div`,{className:`relative my-8`,children:[(0,k.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,k.jsx)(`div`,{className:`w-full border-t border-gray-300`})}),(0,k.jsx)(`div`,{className:`relative flex justify-center text-sm`,children:(0,k.jsx)(`span`,{className:`px-2 text-gray-500 bg-white`,children:n[`manage.podcasts.add_to_app.divider`]||`OR`})})]}),(0,k.jsxs)(`div`,{className:`mb-8`,children:[(0,k.jsx)(`h3`,{className:`mb-2 font-semibold`,children:n[`manage.podcasts.add_to_app.email.title`]||`Send yourself an email`}),(0,k.jsx)(`p`,{className:`mb-3 text-sm text-gray-600`,children:n[`manage.podcasts.add_to_app.email.description`]||`We'll send you a link to add this podcast to your preferred a
3pp`}),(0,k.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),f(t||``)},className:`flex gap-2`,children:[(0,k.jsx)(`input`,{type:`email`,value:t||``,readOnly:!0,placeholder:`[email protected]`,className:`flex-1 px-4 py-2 border border-gray-300 rounded-lg bg-gray-50`,required:!0}),(0,k.jsx)(`button`,{type:`submit`,disabled:i,className:`px-6 py-2 font-medium transition-opacity rounded-lg bg-[var(--pt-background-color)] text-[var(--pt-text-on-background-color)] hover:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed`,children:i?n[`manage.podcasts.add_to_app.email.button_sending`]||`Sending...`:n[`manage.podcasts.add_to_app.email.button`]||`Send email`})]})]}),(0,k.jsxs)(`div`,{className:`relative my-8`,children:[(0,k.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,k.jsx)(`div`,{className:`w-full border-t border-gray-300`})}),(0,k.jsx)(`div`,{className:`relative flex justify-center text-sm`,children:(0,k.jsx)(`span`,{className:`px-2 text-gray-500 bg-white`,children:n[`manage.podcasts.add_to_app.divider`]||`OR`})})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h3`,{className:`mb-2 font-semibold`,children:n[`manage.podcasts.add_to_app.manual.title`]||`Manually add RSS feed`}),(0,k.jsx)(`p`,{className:`mb-3 text-sm text-gray-600`,children:n[`manage.podcasts.add_to_app.manual.description`]||`Paste this link into your preferred podcast app.`}),(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[(0,k.jsx)(`input`,{type:`text`,value:e,readOnly:!0,className:`flex-1 px-4 py-2 font-mono text-sm border border-gray-300 rounded-lg bg-gray-50`}),(0,k.jsx)(`button`,{onClick:d,className:`px-6 py-2 font-medium transition-colors border border-gray-300 rounded-lg hover:bg-gray-50`,children:n[`manage.podcasts.add_to_app.manual.copy_button`]||`Copy link`})]})]})]})}function j({isOpen:e,onClose:t,title:n,description:r,children:i}){return(0,k.jsx)(S,{isOpen:e,onClose:()=>t(),className:`shadow-lg rounded-lg overflow-hidden`,style:{"--overlay-background-color":`#00000050`,"--modal-close-button-placement-right":`1rem`,"--modal-close-button-placement-top":`1rem`},shouldCloseOnOutsideClick:!0,showCloseButton:!0,children:(0,k.jsxs)(`div`,{className:`bg-white w-full sm:w-[460px] p-6`,children:[n&&(0,k.jsx)(`h2`,{className:`text-xl font-bold mb-4`,children:n}),(0,k.jsx)(`div`,{className:`flex items-center justify-center p-8 mb-4 bg-gray-100 rounded-lg`,children:(0,k.jsx)(`div`,{className:`p-4 bg-white rounded`,children:i})}),r&&(0,k.jsx)(`p`,{className:`text-sm text-center text-gray-600`,children:r})]})})}var M=e(n(),1),N=({site:e,subscription:t,rssUrl:n,platformLinks:o,showTitle:l,isPremium:p,isLoggedIn:g,subscriberId:_,showId:v,spotifyConnected:y})=>{let{t:b}=s(),x=E(),S=(0,M.useMemo)(()=>u({spotifyUrl:o.spotify,isPremium:p,spotifyConnected:y,subscriberId:_,redirectPath:d({showId:v,subscriberId:_})}),[o.spotify,p,y,_,v]),C=S?.startsWith(`/oauth/spotify/authorize`)?S:void 0,w={...o,spotify:C?o.spotify:S},[O,N]=(0,M.useState)(null),P=a(),F=r(),I=i().state===`submitting`;(0,M.useEffect)(()=>{P?.success?c.success(b(`manage.podcasts.add_to_app.email.success_toast`)):P?.error&&c.error(P.error)},[P,b]);let L=e=>D(e,{isPremium:p,platformLinks:w})||e.urlScheme(n);return(0,k.jsx)(`div`,{style:{"--pt-background-color":e.primary_theme.primary_color,"--pt-text-on-background-color":m(e.primary_theme.background_color,e.primary_theme.primary_color)?e.primary_theme.background_color:h(e.primary_theme.primary_color)},children:(0,k.jsxs)(f,{site:e,children:[(0,k.jsx)(A,{rssUrl:n,showTitle:l,subscriberEmail:t.email||``,isMobile:x,isSendingEmail:I,isPremium:p,platformLinks:w,spotifyOAuthHref:C,spotifyConnected:y,translations:{"manage.podcasts.add_to_app.back_button":b(`manage.podcasts.add_to_app.back_button`),"manage.podcasts.add_to_app.page_title":b(`manage.podcasts.add_to_app.page_title`),"manage.podcasts.add_to_app.page_description":b(`manage.podcasts.add_to_app.page_description`),"manage.podcasts.add_to_app.divider":b(`manage.podcasts.add_to_app.divider`),"manage.podcasts.add_to_app.email.title":b(`manage.podcasts.add_to_app.email.title`),"manage.podcasts.add_to_app.email.description":b(`manage.podcasts.add_to_app.email.description`),"manage.podcasts.add_to_app.email.button":b(`manage.podcasts.add_to_app.email.button`),"manage.podcasts.add_to_app.email.button_sending":b(`manage.podcasts.add_to_app.email.button_sending`),"manage.podcasts.add_to_app.manual.title":b(`manage.podcasts.add_to_app.manual.title`),"manage.podcasts.add_to_app.manual.description":b(`manage.podcasts.add_to_app.manual.description`),"manage.podcasts.add_to_app.manual.copy_button":b(`manage.podcasts.add_to_app.manual.copy_button`),"manage.podcasts.add_to_app.spotify_unavailable_note":b(`manage.podcasts.add_to_app.spotify_unavailable_note`,`Coming soon to Spotify`),"manage.podcasts.add_to_app.connected_badge":b(`manage.podcasts.add_to_app.connected_badge`,`Connected`)},onAppClick:e=>{x?window.location.href=L(e):N(e)},onCopyUrl:()=>{navigator.clipboard.writeText(n),c.success(b(`manage.podcasts.add_to_app.manual.copy_success_toast`))},onSendEmail:e=>{g&&F({email:e},{method:`post`})},onBack:()=>window.history.back()}),(0,k.jsx)(j,{isOpen:!!O,onClose:()=>N(null),title:b(`manage.podcasts.add_to_app.qr_modal.title`),description:b(`manage.podcasts.add_to_app.qr_modal.description`),children:(0,k.jsx)(T,{value:O&&L(O)||n,size:192,level:`H`})})]})})},P=({data:e,matches:t})=>{let n=(t?.find(e=>e?.id===`root`))?.data?.publication,r=e?.metaTitle;return!n||!r?[{robots:`noindex`}]:w({canonicalUrl:C(e?.requestUrl),matches:t,returnEarlyCheck:!r,overrides:{robots:`noindex`,title:r,de
3scription:`Add ${n.name} podcast to your favorite podcast app.`}})},F=()=>{let e=p(),{site:t,isLoggedIn:n}=o(`root`);if(!t||!e.subscription)throw Error(`RefreshPageError`);return(0,k.jsx)(N,{site:t,subscription:e.subscription,showId:e.showId,subscriberId:e.subscriberId,rssUrl:e.rssUrl,platformLinks:e.platformLinks,showTitle:e.showTitle,isPremium:e.isPremium,spotifyConnected:e.spotifyConnected,isLoggedIn:n})},I=g;export{F as default,P as meta,I as shouldRevalidate}; 4//# sourceMappingURL=podcasts._showId-B9MLX_sV.js.map 5//# debugId=a84ba926-74f2-5c15-a5a7-5525eab4c732
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.