{"version":3,"file":"PodcastPage-7TvhRhNY.mjs","names":[],"sources":["../src/components/display/podcasts/PodcastModuleBox.vue","../src/components/display/podcasts/PodcastModuleBox.vue","../src/components/pages/PodcastPage.vue","../src/components/pages/PodcastPage.vue"],"sourcesContent":["<template>\n    <section v-if=\"podcast\" class=\"module-box\">\n        <slot\n            v-if=\"!!podcastConference && isLiveReadyToRecord && isOctopusAndAnimator\"\n            name=\"recording-item-button\"\n            :podcast=\"podcast\"\n            :live=\"true\"\n            :recording=\"podcastConference\"\n            :on-delete-item=\"removeDeleted\"\n            :on-validate-podcast=\"(p) => emit('updatePodcast', p)\"\n        />\n        <slot\n            v-else-if=\"editRight && isEditBox\"\n            name=\"edit-box\"\n            :podcast=\"podcast\"\n            :display-studio-access=\"isDebriefing\"\n            :on-update-transcription=\"resetTranscription\"\n            :on-validate-podcast=\"(p) => emit('updatePodcast', p)\"\n        />\n        <div class=\"mb-2 w-100\">\n            <PodcastImage\n                :class=\"[\n                    isLiveReadyToRecord &&\n                        podcastConference &&\n                        'null' !== podcastConference &&\n                        podcastConference.status\n                        ? podcastConference.status.toLowerCase() + '-shadow'\n                        : '',\n                ]\"\n                class=\"me-3\"\n                show-processing\n                :hide-play=\"isLiveReadyToRecord\"\n                :podcast=\"podcast\"\n                :playing-podcast=\"playingPodcast\"\n                :fetch-conference=\"podcastConference\"\n                :is-animator-live=\"isOctopusAndAnimator\"\n            />\n            <div class=\"d-flex justify-content-between flex-wrap mb-2\">\n                <time \n                    v-if=\"0 !== date.length\"\n                    :class=\"!isLiveReady ? 'me-5' : ''\"\n                    :datetime=\"podcast.pubDate\"\n                >\n                    {{ date }}\n                </time>\n                <div v-if=\"isLiveReady\" class=\"text-danger\">\n                    {{ t(\"Episode record in live\") }}\n                </div>\n                <div class=\"d-flex flex-column align-items-end\">\n                    <time :datetime=\"durationIso\">\n                        {{ duration }}\n                    </time>\n                    <ShareAnonymous\n                        v-if=\"!editRight\"\n                        :podcast=\"podcast\"\n                        :organisation-id=\"podcast.organisation.id\"\n                    />\n                </div>\n            </div>\n            <h2 :class=\"{ 'mb-3': !showSubtitle }\">\n                <RightsIndicator\n                    :podcast=\"podcast\"\n                    action=\"edit\"\n                    inline\n                />\n                {{ podcast.title }}\n            </h2>\n            <h3 v-if=\"showSubtitle\" class=\"mb-3 text-secondary\">\n                {{ podcast.annotations.subtitle }}\n            </h3>\n      \n            <PodcastPlannedSpinner v-if=\"isPlannedInProcessor\" />\n            <Countdown v-if=\"isCounter\" :time-remaining=\"timeRemaining\" />\n            <!-- eslint-disable vue/no-v-html -->\n            <div\n                v-if=\"showSummary\"\n                class=\"description-text html-wysiwyg-content\"\n                :class=\"{ 'mb-4': showSummary && showDescription }\"\n                v-html=\"urlify(podcast.summary)\"\n            />\n            <div\n                v-if=\"showDescription\"\n                class=\"description-text html-wysiwyg-content\"\n                v-html=\"urlify(podcast.description)\"\n            />\n            <!-- eslint-enable -->\n            <div class=\"my-3\">\n                <div class=\"mb-1\">\n                    {{ t(\"Emission\") + \" : \" }}\n                    <router-link\n                        :to=\"{\n                            name: 'emission',\n                            params: { emissionId: podcast.emission.emissionId },\n                        }\"\n                        :title=\"t('Series name page', { name: podcast.emission.name })\"\n                    >\n                        {{ podcast.emission.name }}\n                    </router-link>\n                </div>\n                <ParticipantDescription :participants=\"podcast.animators\" />\n                <ParticipantDescription\n                    :participants=\"podcast.guests\"\n                    :is-guest=\"true\"\n                />\n                <div v-if=\"!isPodcastmaker\" class=\"mb-1\">\n                    {{ t(\"Producted by : \") }}\n                    <router-link\n                        :to=\"{\n                            name: 'productor',\n                            params: { productorId: podcast.organisation.id },\n                        }\"\n                    >\n                        {{ podcast.organisation.name }}\n                    </router-link>\n                </div>\n                <div v-if=\"showSeasonNumber\" class=\"mb-1\">\n                    {{ `${t('Podcast - Season')} : ${podcast.seasonNumber}` }}\n                </div>\n                <div v-if=\"showSeasonEpisodeNumber\" class=\"mb-1\">\n                    {{ `${t('Podcast - Episode number')} : ${podcast.seasonEpisodeNumber}` }}\n                </div>\n                <div v-if=\"'' !== photoCredit\" class=\"mb-1\">\n                    {{ t(\"Photo credits\") + \" : \" + photoCredit }}\n                </div>\n                <div v-if=\"'' !== audioCredit\" class=\"mb-1\">\n                    {{ t(\"Audio credits\") + \" : \" + audioCredit }}\n                </div>\n                <div v-if=\"'' !== authorCredit\" class=\"mb-1\">\n                    {{ t(\"Author credits\") + \" : \" + authorCredit }}\n                </div>\n                <a\n                    v-if=\"podcast.article && !authStore.isGarRole\"\n                    class=\"btn d-flex align-items-center my-2 w-fit-content mb-1\"\n                    :href=\"podcast.article\"\n                    rel=\"noreferrer noopener\"\n                    target=\"_blank\"\n                    :title=\"t('New window', {text : t('See associated article')})\"\n                >\n                    <NewspaperVariantOutlineIcon class=\"me-1\" />\n                    <div>{{ t(\"See associated article\") }}</div>\n                </a>\n                <PodcastPlayBar\n                    v-if=\"state.emissionsPage.progressBar\"\n                    :podcast=\"podcast\"\n                />\n                <div v-if=\"editRight && !isPodcastmaker\">\n                    <div\n                        v-if=\"\n                            podcast.annotations && 'RSS' === podcast.annotations.SOURCE_KIND\n                        \"\n                        class=\"me-5 text-secondary\"\n                    >\n                        {{ t(\"From RSS\") }}\n                    </div>\n                    <ClassicAlert\n                        v-if=\"alert\"\n                        :type=\"alert.type\"\n                        style=\"width: fit-content\"\n                    >\n                        {{ alert.message }}\n                    </ClassicAlert>\n                </div>\n                <div class=\"d-flex align-items-center flex-wrap\">\n                    <LikeSection :edit-right=\"editRight\" :podcast=\"podcast\" />\n                    <DownloadPodcastButton v-if=\"state.podcastPage.downloadButton\" :podcast=\"podcast\" />\n                </div>\n            </div>\n        </div>\n        <TagList\n            v-if=\"showTags\"\n            :tag-list=\"tags\"\n            :orga-id=\"podcast.organisation.id\"\n            :podcast-annotations=\"podcast.annotations\"\n            :max=\"state.podcastPage.maxTags\"\n        />\n        <PodcastRubriqueList\n            v-if=\"podcastRubriques?.length\"\n            :orga-id=\"podcast.organisation.id\"\n            :rubrique-ids=\"podcastRubriques\"\n        />\n        <PodcastRawTranscript\n            ref=\"podcastRawTranscript\"\n            :podcast-id=\"podcast.podcastId\"\n        />\n        <SubscribeButtons\n            v-if=\"isPodcastmaker\"\n            class=\"mt-4\"\n            :content=\"podcast.emission\"\n            :window-width=\"1000\"\n            :justify-center=\"false\"\n        />\n    </section>\n</template>\n\n<script setup lang=\"ts\">\nimport NewspaperVariantOutlineIcon from \"vue-material-design-icons/NewspaperVariantOutline.vue\";\nimport PodcastImage from \"./PodcastImage.vue\";\nimport ParticipantDescription from \"./ParticipantDescription.vue\";\nimport PodcastRawTranscript from \"./PodcastRawTranscript.vue\";\nimport { state } from \"../../../stores/ParamSdkStore\";\nimport { useAuthStore } from \"../../../stores/AuthStore\";\nimport displayHelper from \"../../../helper/displayHelper\";\nimport {usePodcastView} from \"../../composable/podcasts/usePodcastView\";\nimport { Podcast } from \"../../../stores/class/general/podcast\";\nimport { Conference } from \"../../../stores/class/conference/conference\";\nimport { useI18n } from \"vue-i18n\";\nimport { useRouter } from \"vue-router\";\nimport { useSeasonsManagement } from \"../../composable/useSeasonsManagement\";\nimport { SeasonMode } from \"../../../stores/class/general/emission\";\nimport RightsIndicator from \"../RightsIndicator.vue\"; \nimport ClassicAlert from \"@/components/misc/ClassicAlert.vue\"; \n\nimport { defineAsyncComponent, toRefs, computed, useTemplateRef } from \"vue\";\nconst PodcastPlayBar = defineAsyncComponent(\n    () => import(\"./PodcastPlayBar.vue\"),\n);\nconst SubscribeButtons = defineAsyncComponent(\n    () => import(\"../sharing/SubscribeButtons.vue\"),\n);\nconst LikeSection = defineAsyncComponent(\n    () => import(\"../comments/like/LikeSection.vue\"),\n);\nconst DownloadPodcastButton = defineAsyncComponent(\n    () => import(\"./DownloadPodcastButton.vue\"),\n);\nconst PodcastPlannedSpinner = defineAsyncComponent(\n    () => import(\"./PodcastPlannedSpinner.vue\"),\n);\nconst Countdown = defineAsyncComponent(() => import(\"../live/CountDown.vue\"));\nconst TagList = defineAsyncComponent(() => import(\"./TagList.vue\"));\nconst ShareAnonymous = defineAsyncComponent(() => import(\"../sharing/ShareAnonymous.vue\"));\nconst PodcastRubriqueList = defineAsyncComponent(() => import(\"./PodcastRubriqueList.vue\"));\n\n//Props \nconst props = defineProps<{\n    podcast: Podcast;\n    playingPodcast?: Podcast;\n    podcastConference?: Conference;\n}>();\n\n//Emits\nconst emit = defineEmits([\"updatePodcast\"]);\n\n//Composables\nconst { t } = useI18n();\nconst propsRef = toRefs(props);\nconst { \n    isLiveReadyToRecord,\n    isCounter,\n    timeRemaining,\n    isPlannedInProcessor,\n    date,\n    duration,\n    durationIso,\n    isPodcastmaker,\n    editRight\n} = usePodcastView(propsRef.podcast, propsRef.podcastConference);\nconst authStore = useAuthStore();\nconst router = useRouter();\nconst { areSeasonsEnabled } = useSeasonsManagement();\n\n/** Reference to the PodcastRqwTranscript */\nconst podcastRawTranscript = useTemplateRef('podcastRawTranscript');\n\n//Computed\nconst podcastRubriques = computed(() => {\n    let rubriques = props.podcast?.rubriqueIds ?? [];\n    if(props.podcast?.emission?.rubriqueIds){\n        rubriques = [...new Set(rubriques.concat(props.podcast?.emission?.rubriqueIds))];\n    }\n    return rubriques;\n});\n\nconst alert = computed((): { type: 'error'|'warning'|'info'; message: string }|null => {\n    if (\"ERROR\" === props.podcast?.processingStatus) {\n        return {\n            type: 'error',\n            message: t(\"Podcast in ERROR, please contact Saooti\")\n        };\n    }\n    const appleVideoStatus = props.podcast?.annotations.appleVideoStatus;\n    if (appleVideoStatus && appleVideoStatus !== 'UPDATED' && appleVideoStatus !== 'CREATED' && appleVideoStatus !== 'HLS_NOT_READY') {\n        return {\n            type: 'error',\n            message: t('Apple podcast - Error - Undefined')\n        };\n    }\n    if (podcastNotValid.value) {\n        return {\n            type: 'error',\n            message: t(\"Podcast not validated\")\n        };\n    }\n    if (appleVideoStatus === 'HLS_NOT_READY') {\n        return {\n            type: 'info',\n            message: t('Apple podcast - Info - HLS_NOT_READY')\n        };\n    }\n    if (!props.podcast?.availability.visibility) {\n        return {\n            type: 'warning',\n            message: t(\"Podcast is not visible for listeners\")\n        };\n    }\n    return null;\n});\n\nconst isLiveReady = computed(() => {\n    return (\n        undefined !== props.podcast?.conferenceId &&\n        0 !== props.podcast?.conferenceId &&\n        \"READY\" === props.podcast?.processingStatus\n    );\n});\nconst isDebriefing = computed(() => {\n    return (\n        undefined !== props.podcastConference &&\n        \"DEBRIEFING\" === props.podcastConference.status\n    );\n});\nconst isOctopusAndAnimator = computed(() => {\n    return !isPodcastmaker.value && editRight.value && authStore.isRoleLive;\n});\nconst podcastNotValid = computed(() => {\n    return (\n        undefined !== props.podcast?.availability &&\n        false === props.podcast?.valid\n    );\n});\nconst photoCredit = computed(() => formatCredits(props.podcast?.annotations?.photoCredit as string|undefined));\nconst audioCredit = computed(() => formatCredits(props.podcast?.annotations?.audioCredit as string|undefined));\nconst authorCredit = computed(() => formatCredits(props.podcast?.annotations?.authorCredit as string|undefined));\nconst isEditBox = computed(() => !((state.generalParameters.podcastmaker as boolean) ?? false));\n/** The tags to display */\nconst tags = computed(() => {\n    const tags = [];\n    if(props.podcast.tags) {\n        tags.push(...props.podcast.tags);\n    }\n    // Also display tags defined on emission\n    if(props.podcast.emission.tags) {\n        tags.push(...props.podcast.emission.tags);\n    }\n    return tags;\n});\n\nconst showSeasonNumber = computed((): boolean => {\n    return areSeasonsEnabled(props.podcast.emission) && props.podcast.seasonNumber !== undefined;\n});\n\nconst showSeasonEpisodeNumber = computed((): boolean => {\n    return props.podcast.emission.seasonMode === SeasonMode.SEASON_WITH_PODCAST_NUMBERING && props.podcast.seasonEpisodeNumber !== undefined;\n});\n\n/** Indicates whether to show subtitle */\nconst showSubtitle = computed((): boolean => {\n    return props.podcast.annotations?.subtitle && state.podcastPage?.hideSubtitle !== true;\n});\n\n/** Indicates whether to show description */\nconst showDescription = computed((): boolean => {\n    return state.podcastPage?.descriptionOrSummary !== 'summary';\n});\n\n/** Indicates whether to show summary */\nconst showSummary = computed((): boolean => {\n    return props.podcast.summary && state.podcastPage?.descriptionOrSummary !== 'description' && state.podcastPage?.descriptionOrSummary !== undefined;\n});\n\n//Methods\nfunction formatCredits(credits: string|undefined): string {\n    if (credits === undefined) {\n        return '';\n    }\n    return credits.split(',').map(s => s.trim()).join(', ');\n}\nfunction urlify(text:string|undefined){\n    return displayHelper.urlify(text);\n}\nfunction removeDeleted(): void {\n    if (isLiveReadyToRecord.value) {\n        router.push(\"/main/pub/lives\");\n    } else if (window.history.length > 1) {\n        router.go(-1);\n    } else {\n        router.push(\"/\");\n    }\n}\n\nfunction resetTranscription(): void {\n    podcastRawTranscript.value.reset();\n}\n\nconst showTags = computed((): boolean => {\n    if (state.podcastPage.hideTags === true) {\n        return false;\n    }\n\n    return undefined !== tags.value && 0 !== tags.value.length;\n});\n</script>\n","<template>\n    <section v-if=\"podcast\" class=\"module-box\">\n        <slot\n            v-if=\"!!podcastConference && isLiveReadyToRecord && isOctopusAndAnimator\"\n            name=\"recording-item-button\"\n            :podcast=\"podcast\"\n            :live=\"true\"\n            :recording=\"podcastConference\"\n            :on-delete-item=\"removeDeleted\"\n            :on-validate-podcast=\"(p) => emit('updatePodcast', p)\"\n        />\n        <slot\n            v-else-if=\"editRight && isEditBox\"\n            name=\"edit-box\"\n            :podcast=\"podcast\"\n            :display-studio-access=\"isDebriefing\"\n            :on-update-transcription=\"resetTranscription\"\n            :on-validate-podcast=\"(p) => emit('updatePodcast', p)\"\n        />\n        <div class=\"mb-2 w-100\">\n            <PodcastImage\n                :class=\"[\n                    isLiveReadyToRecord &&\n                        podcastConference &&\n                        'null' !== podcastConference &&\n                        podcastConference.status\n                        ? podcastConference.status.toLowerCase() + '-shadow'\n                        : '',\n                ]\"\n                class=\"me-3\"\n                show-processing\n                :hide-play=\"isLiveReadyToRecord\"\n                :podcast=\"podcast\"\n                :playing-podcast=\"playingPodcast\"\n                :fetch-conference=\"podcastConference\"\n                :is-animator-live=\"isOctopusAndAnimator\"\n            />\n            <div class=\"d-flex justify-content-between flex-wrap mb-2\">\n                <time \n                    v-if=\"0 !== date.length\"\n                    :class=\"!isLiveReady ? 'me-5' : ''\"\n                    :datetime=\"podcast.pubDate\"\n                >\n                    {{ date }}\n                </time>\n                <div v-if=\"isLiveReady\" class=\"text-danger\">\n                    {{ t(\"Episode record in live\") }}\n                </div>\n                <div class=\"d-flex flex-column align-items-end\">\n                    <time :datetime=\"durationIso\">\n                        {{ duration }}\n                    </time>\n                    <ShareAnonymous\n                        v-if=\"!editRight\"\n                        :podcast=\"podcast\"\n                        :organisation-id=\"podcast.organisation.id\"\n                    />\n                </div>\n            </div>\n            <h2 :class=\"{ 'mb-3': !showSubtitle }\">\n                <RightsIndicator\n                    :podcast=\"podcast\"\n                    action=\"edit\"\n                    inline\n                />\n                {{ podcast.title }}\n            </h2>\n            <h3 v-if=\"showSubtitle\" class=\"mb-3 text-secondary\">\n                {{ podcast.annotations.subtitle }}\n            </h3>\n      \n            <PodcastPlannedSpinner v-if=\"isPlannedInProcessor\" />\n            <Countdown v-if=\"isCounter\" :time-remaining=\"timeRemaining\" />\n            <!-- eslint-disable vue/no-v-html -->\n            <div\n                v-if=\"showSummary\"\n                class=\"description-text html-wysiwyg-content\"\n                :class=\"{ 'mb-4': showSummary && showDescription }\"\n                v-html=\"urlify(podcast.summary)\"\n            />\n            <div\n                v-if=\"showDescription\"\n                class=\"description-text html-wysiwyg-content\"\n                v-html=\"urlify(podcast.description)\"\n            />\n            <!-- eslint-enable -->\n            <div class=\"my-3\">\n                <div class=\"mb-1\">\n                    {{ t(\"Emission\") + \" : \" }}\n                    <router-link\n                        :to=\"{\n                            name: 'emission',\n                            params: { emissionId: podcast.emission.emissionId },\n                        }\"\n                        :title=\"t('Series name page', { name: podcast.emission.name })\"\n                    >\n                        {{ podcast.emission.name }}\n                    </router-link>\n                </div>\n                <ParticipantDescription :participants=\"podcast.animators\" />\n                <ParticipantDescription\n                    :participants=\"podcast.guests\"\n                    :is-guest=\"true\"\n                />\n                <div v-if=\"!isPodcastmaker\" class=\"mb-1\">\n                    {{ t(\"Producted by : \") }}\n                    <router-link\n                        :to=\"{\n                            name: 'productor',\n                            params: { productorId: podcast.organisation.id },\n                        }\"\n                    >\n                        {{ podcast.organisation.name }}\n                    </router-link>\n                </div>\n                <div v-if=\"showSeasonNumber\" class=\"mb-1\">\n                    {{ `${t('Podcast - Season')} : ${podcast.seasonNumber}` }}\n                </div>\n                <div v-if=\"showSeasonEpisodeNumber\" class=\"mb-1\">\n                    {{ `${t('Podcast - Episode number')} : ${podcast.seasonEpisodeNumber}` }}\n                </div>\n                <div v-if=\"'' !== photoCredit\" class=\"mb-1\">\n                    {{ t(\"Photo credits\") + \" : \" + photoCredit }}\n                </div>\n                <div v-if=\"'' !== audioCredit\" class=\"mb-1\">\n                    {{ t(\"Audio credits\") + \" : \" + audioCredit }}\n                </div>\n                <div v-if=\"'' !== authorCredit\" class=\"mb-1\">\n                    {{ t(\"Author credits\") + \" : \" + authorCredit }}\n                </div>\n                <a\n                    v-if=\"podcast.article && !authStore.isGarRole\"\n                    class=\"btn d-flex align-items-center my-2 w-fit-content mb-1\"\n                    :href=\"podcast.article\"\n                    rel=\"noreferrer noopener\"\n                    target=\"_blank\"\n                    :title=\"t('New window', {text : t('See associated article')})\"\n                >\n                    <NewspaperVariantOutlineIcon class=\"me-1\" />\n                    <div>{{ t(\"See associated article\") }}</div>\n                </a>\n                <PodcastPlayBar\n                    v-if=\"state.emissionsPage.progressBar\"\n                    :podcast=\"podcast\"\n                />\n                <div v-if=\"editRight && !isPodcastmaker\">\n                    <div\n                        v-if=\"\n                            podcast.annotations && 'RSS' === podcast.annotations.SOURCE_KIND\n                        \"\n                        class=\"me-5 text-secondary\"\n                    >\n                        {{ t(\"From RSS\") }}\n                    </div>\n                    <ClassicAlert\n                        v-if=\"alert\"\n                        :type=\"alert.type\"\n                        style=\"width: fit-content\"\n                    >\n                        {{ alert.message }}\n                    </ClassicAlert>\n                </div>\n                <div class=\"d-flex align-items-center flex-wrap\">\n                    <LikeSection :edit-right=\"editRight\" :podcast=\"podcast\" />\n                    <DownloadPodcastButton v-if=\"state.podcastPage.downloadButton\" :podcast=\"podcast\" />\n                </div>\n            </div>\n        </div>\n        <TagList\n            v-if=\"showTags\"\n            :tag-list=\"tags\"\n            :orga-id=\"podcast.organisation.id\"\n            :podcast-annotations=\"podcast.annotations\"\n            :max=\"state.podcastPage.maxTags\"\n        />\n        <PodcastRubriqueList\n            v-if=\"podcastRubriques?.length\"\n            :orga-id=\"podcast.organisation.id\"\n            :rubrique-ids=\"podcastRubriques\"\n        />\n        <PodcastRawTranscript\n            ref=\"podcastRawTranscript\"\n            :podcast-id=\"podcast.podcastId\"\n        />\n        <SubscribeButtons\n            v-if=\"isPodcastmaker\"\n            class=\"mt-4\"\n            :content=\"podcast.emission\"\n            :window-width=\"1000\"\n            :justify-center=\"false\"\n        />\n    </section>\n</template>\n\n<script setup lang=\"ts\">\nimport NewspaperVariantOutlineIcon from \"vue-material-design-icons/NewspaperVariantOutline.vue\";\nimport PodcastImage from \"./PodcastImage.vue\";\nimport ParticipantDescription from \"./ParticipantDescription.vue\";\nimport PodcastRawTranscript from \"./PodcastRawTranscript.vue\";\nimport { state } from \"../../../stores/ParamSdkStore\";\nimport { useAuthStore } from \"../../../stores/AuthStore\";\nimport displayHelper from \"../../../helper/displayHelper\";\nimport {usePodcastView} from \"../../composable/podcasts/usePodcastView\";\nimport { Podcast } from \"../../../stores/class/general/podcast\";\nimport { Conference } from \"../../../stores/class/conference/conference\";\nimport { useI18n } from \"vue-i18n\";\nimport { useRouter } from \"vue-router\";\nimport { useSeasonsManagement } from \"../../composable/useSeasonsManagement\";\nimport { SeasonMode } from \"../../../stores/class/general/emission\";\nimport RightsIndicator from \"../RightsIndicator.vue\"; \nimport ClassicAlert from \"@/components/misc/ClassicAlert.vue\"; \n\nimport { defineAsyncComponent, toRefs, computed, useTemplateRef } from \"vue\";\nconst PodcastPlayBar = defineAsyncComponent(\n    () => import(\"./PodcastPlayBar.vue\"),\n);\nconst SubscribeButtons = defineAsyncComponent(\n    () => import(\"../sharing/SubscribeButtons.vue\"),\n);\nconst LikeSection = defineAsyncComponent(\n    () => import(\"../comments/like/LikeSection.vue\"),\n);\nconst DownloadPodcastButton = defineAsyncComponent(\n    () => import(\"./DownloadPodcastButton.vue\"),\n);\nconst PodcastPlannedSpinner = defineAsyncComponent(\n    () => import(\"./PodcastPlannedSpinner.vue\"),\n);\nconst Countdown = defineAsyncComponent(() => import(\"../live/CountDown.vue\"));\nconst TagList = defineAsyncComponent(() => import(\"./TagList.vue\"));\nconst ShareAnonymous = defineAsyncComponent(() => import(\"../sharing/ShareAnonymous.vue\"));\nconst PodcastRubriqueList = defineAsyncComponent(() => import(\"./PodcastRubriqueList.vue\"));\n\n//Props \nconst props = defineProps<{\n    podcast: Podcast;\n    playingPodcast?: Podcast;\n    podcastConference?: Conference;\n}>();\n\n//Emits\nconst emit = defineEmits([\"updatePodcast\"]);\n\n//Composables\nconst { t } = useI18n();\nconst propsRef = toRefs(props);\nconst { \n    isLiveReadyToRecord,\n    isCounter,\n    timeRemaining,\n    isPlannedInProcessor,\n    date,\n    duration,\n    durationIso,\n    isPodcastmaker,\n    editRight\n} = usePodcastView(propsRef.podcast, propsRef.podcastConference);\nconst authStore = useAuthStore();\nconst router = useRouter();\nconst { areSeasonsEnabled } = useSeasonsManagement();\n\n/** Reference to the PodcastRqwTranscript */\nconst podcastRawTranscript = useTemplateRef('podcastRawTranscript');\n\n//Computed\nconst podcastRubriques = computed(() => {\n    let rubriques = props.podcast?.rubriqueIds ?? [];\n    if(props.podcast?.emission?.rubriqueIds){\n        rubriques = [...new Set(rubriques.concat(props.podcast?.emission?.rubriqueIds))];\n    }\n    return rubriques;\n});\n\nconst alert = computed((): { type: 'error'|'warning'|'info'; message: string }|null => {\n    if (\"ERROR\" === props.podcast?.processingStatus) {\n        return {\n            type: 'error',\n            message: t(\"Podcast in ERROR, please contact Saooti\")\n        };\n    }\n    const appleVideoStatus = props.podcast?.annotations.appleVideoStatus;\n    if (appleVideoStatus && appleVideoStatus !== 'UPDATED' && appleVideoStatus !== 'CREATED' && appleVideoStatus !== 'HLS_NOT_READY') {\n        return {\n            type: 'error',\n            message: t('Apple podcast - Error - Undefined')\n        };\n    }\n    if (podcastNotValid.value) {\n        return {\n            type: 'error',\n            message: t(\"Podcast not validated\")\n        };\n    }\n    if (appleVideoStatus === 'HLS_NOT_READY') {\n        return {\n            type: 'info',\n            message: t('Apple podcast - Info - HLS_NOT_READY')\n        };\n    }\n    if (!props.podcast?.availability.visibility) {\n        return {\n            type: 'warning',\n            message: t(\"Podcast is not visible for listeners\")\n        };\n    }\n    return null;\n});\n\nconst isLiveReady = computed(() => {\n    return (\n        undefined !== props.podcast?.conferenceId &&\n        0 !== props.podcast?.conferenceId &&\n        \"READY\" === props.podcast?.processingStatus\n    );\n});\nconst isDebriefing = computed(() => {\n    return (\n        undefined !== props.podcastConference &&\n        \"DEBRIEFING\" === props.podcastConference.status\n    );\n});\nconst isOctopusAndAnimator = computed(() => {\n    return !isPodcastmaker.value && editRight.value && authStore.isRoleLive;\n});\nconst podcastNotValid = computed(() => {\n    return (\n        undefined !== props.podcast?.availability &&\n        false === props.podcast?.valid\n    );\n});\nconst photoCredit = computed(() => formatCredits(props.podcast?.annotations?.photoCredit as string|undefined));\nconst audioCredit = computed(() => formatCredits(props.podcast?.annotations?.audioCredit as string|undefined));\nconst authorCredit = computed(() => formatCredits(props.podcast?.annotations?.authorCredit as string|undefined));\nconst isEditBox = computed(() => !((state.generalParameters.podcastmaker as boolean) ?? false));\n/** The tags to display */\nconst tags = computed(() => {\n    const tags = [];\n    if(props.podcast.tags) {\n        tags.push(...props.podcast.tags);\n    }\n    // Also display tags defined on emission\n    if(props.podcast.emission.tags) {\n        tags.push(...props.podcast.emission.tags);\n    }\n    return tags;\n});\n\nconst showSeasonNumber = computed((): boolean => {\n    return areSeasonsEnabled(props.podcast.emission) && props.podcast.seasonNumber !== undefined;\n});\n\nconst showSeasonEpisodeNumber = computed((): boolean => {\n    return props.podcast.emission.seasonMode === SeasonMode.SEASON_WITH_PODCAST_NUMBERING && props.podcast.seasonEpisodeNumber !== undefined;\n});\n\n/** Indicates whether to show subtitle */\nconst showSubtitle = computed((): boolean => {\n    return props.podcast.annotations?.subtitle && state.podcastPage?.hideSubtitle !== true;\n});\n\n/** Indicates whether to show description */\nconst showDescription = computed((): boolean => {\n    return state.podcastPage?.descriptionOrSummary !== 'summary';\n});\n\n/** Indicates whether to show summary */\nconst showSummary = computed((): boolean => {\n    return props.podcast.summary && state.podcastPage?.descriptionOrSummary !== 'description' && state.podcastPage?.descriptionOrSummary !== undefined;\n});\n\n//Methods\nfunction formatCredits(credits: string|undefined): string {\n    if (credits === undefined) {\n        return '';\n    }\n    return credits.split(',').map(s => s.trim()).join(', ');\n}\nfunction urlify(text:string|undefined){\n    return displayHelper.urlify(text);\n}\nfunction removeDeleted(): void {\n    if (isLiveReadyToRecord.value) {\n        router.push(\"/main/pub/lives\");\n    } else if (window.history.length > 1) {\n        router.go(-1);\n    } else {\n        router.push(\"/\");\n    }\n}\n\nfunction resetTranscription(): void {\n    podcastRawTranscript.value.reset();\n}\n\nconst showTags = computed((): boolean => {\n    if (state.podcastPage.hideTags === true) {\n        return false;\n    }\n\n    return undefined !== tags.value && 0 !== tags.value.length;\n});\n</script>\n","<template>\n  <section class=\"page-box\">\n    <template v-if=\"loaded && !error && podcast\">\n      <PodcastmakerHeader\n        v-if=\"isPodcastmaker\"\n        :page-title=\"useEmissionTitle ? podcast.emission.name : titlePage\"\n        :img-url=\"podcast.imageUrl\"\n      />\n      <div\n        class=\"d-flex flex-column page-element\"\n        :class=\"isPodcastmaker ? 'page-element-podcastmaker' : ''\"\n      >\n        <PodcastModuleBox\n          :playing-podcast=\"playingPodcast\"\n          :podcast=\"podcast\"\n          :podcast-conference=\"fetchConference\"\n          @update-podcast=\"updatePodcast\"\n        >\n          <template #recording-item-button=\"slotProps\">\n            <slot name=\"recording-item-button\" v-bind=\"slotProps\" />\n          </template>\n          <template #edit-box=\"slotProps\">\n            <slot name=\"edit-box\" v-bind=\"slotProps\" />\n          </template>\n        </PodcastModuleBox>\n        <ShareSocialsButtons\n          v-if=\"state.podcastPage.ShareButtons\"\n          :organisation-id=\"podcast.organisation.id\"\n        />\n        <SharePlayer\n          v-if=\"!isPodcastmaker && editRight && !youtubeId\"\n          :podcast=\"podcast\"\n          :emission=\"podcast?.emission\"\n          :organisation-id=\"authOrgaId\"\n        />\n        <CommentSection :podcast=\"podcast\" />\n\n        <!-- Suggestions -->\n        <PodcastInlineList\n          :emission-id=\"podcast.emission.emissionId\"\n          :href=\"'/main/pub/emission/' + podcast.emission.emissionId\"\n          :title=\"t('More episodes of this emission')\"\n          :button-text=\"t('All podcast emission button')\"\n          title-tag=\"h3\"\n        />\n        <section v-if=\"!hideSuggestions\">\n          <ClassicLazy :min-height=\"550\">\n            <PodcastInlineList\n              class=\"mt-4\"\n              title-tag=\"h3\"\n              :organisation-id=\"[podcast.organisation.id]\"\n              :podcast-id=\"podcastId\"\n              :title=\"t('Suggested listening')\"\n            />\n          </ClassicLazy>\n          <ClassicLazy v-for=\"c in categories\" :key=\"c.id\" :min-height=\"550\">\n            <PodcastInlineList\n              class=\"mt-4\"\n              title-tag=\"h3\"\n              :iab-id=\"c.id\"\n              :href=\"'/main/pub/category/' + c.id\"\n              :title=\"t('More episodes of this category : ', { name: c.name })\"\n              :button-text=\"t('All podcast button', { name: c.name })\"\n              :organisation-id=\"[podcast.organisation.id]\"\n            />\n          </ClassicLazy>\n        </section>\n      </div>\n    </template>\n    <ClassicLoading\n      :loading-text=\"!loaded ? t('Loading content ...') : undefined\"\n      :error-text=\"\n        error\n          ? t(`This episode is not available for (re)listening`)\n          : undefined\n      \"\n    />\n  </section>\n</template>\n\n<script setup lang=\"ts\">\nimport youtubeVideoHelper from \"../../helper/youtubeVideoHelper\";\nimport {useOrgaComputed} from \"../composable/useOrgaComputed\";\nimport PodcastInlineList from \"../display/podcasts/PodcastInlineList.vue\";\nimport PodcastModuleBox from \"../display/podcasts/PodcastModuleBox.vue\";\nimport ClassicLazy from \"../misc/ClassicLazy.vue\";\nimport ClassicLoading from \"../form/ClassicLoading.vue\";\nimport classicApi from \"../../api/classicApi\";\nimport { state } from \"../../stores/ParamSdkStore\";\nimport { useFilterStore } from \"../../stores/FilterStore\";\nimport { Podcast } from \"@/stores/class/general/podcast\";\nimport {\n  Conference,\n  ConferencePublicInfo,\n} from \"@/stores/class/conference/conference\";\nimport {useErrorHandler} from \"../composable/useErrorHandler\";\nimport {useSeoTitleUrl} from \"../composable/route/useSeoTitleUrl\";\nimport { computed, defineAsyncComponent, onBeforeUnmount, ref, Ref, watch } from \"vue\";\nimport { Category } from \"@/stores/class/general/category\";\nimport { useAuthStore } from \"../../stores/AuthStore\";\nimport { useGeneralStore } from \"../../stores/GeneralStore\";\nimport { AxiosError } from \"axios\";\nimport { useCommentStore } from \"../../stores/CommentStore\";\nimport { useI18n } from \"vue-i18n\";\nimport { useRoute } from \"vue-router\";\nimport { podcastApi } from \"../../api/podcastApi\";\n\nconst ShareSocialsButtons = defineAsyncComponent(\n  () => import(\"../display/sharing/ShareSocialsButtons.vue\"),\n);\nconst SharePlayer = defineAsyncComponent(\n  () => import(\"../display/sharing/SharePlayer.vue\"),\n);\nconst CommentSection = defineAsyncComponent(\n  () => import(\"../display/comments/CommentSection.vue\"),\n);\nconst PodcastmakerHeader = defineAsyncComponent(\n  () => import(\"../display/podcastmaker/PodcastmakerHeader.vue\"),\n);\n\n//Props \nconst props = defineProps<{\n  updateStatus?: string;\n  playingPodcast?: Podcast;\n  podcastId: number;\n  /** When true, display emission title in podcastmaker header */\n  useEmissionTitle?: boolean;\n}>();\n\n\n//Data \nconst loaded = ref(false);\nconst error = ref(false);\nconst podcast: Ref<Podcast | undefined> = ref(undefined);\nconst fetchConference: Ref<Conference | undefined> = ref(undefined);\nconst infoReload: Ref<ReturnType<typeof setTimeout>| undefined> = ref(undefined);\nconst youtubeId: Ref<string| undefined> = ref(undefined);\n\n//Composables\nconst route = useRoute();\nconst { t } = useI18n();\nconst { isPodcastmaker, isEditRights, authOrgaId } = useOrgaComputed();\nconst { updatePathParams } = useSeoTitleUrl();\nconst {handle403} = useErrorHandler();\nconst authStore = useAuthStore();\nconst generalStore = useGeneralStore();\nconst filterStore = useFilterStore();\nconst commentStore = useCommentStore();\n\n//Computed\nconst hideSuggestions = computed(() =>{\n  return (\n      \"true\" ===\n      (podcast.value?.emission?.annotations?.[\"HIDE_SUGGESTIONS\"] as\n        | string\n        | undefined)\n    );\n});\nconst emissionMainCategory = computed(() =>{\n  if (!podcast.value) {\n    return 0;\n  }\n  if (podcast.value.emission.annotations?.mainIabId) {\n    return parseInt(\n      podcast.value.emission.annotations.mainIabId as string,\n      10,\n    );\n  } else if(podcast.value.emission.iabIds?.length) {\n    return podcast.value.emission.iabIds[0];\n  }\n  return 0;\n});\n\nconst categories = computed(() =>{\n  if (\"undefined\" === typeof podcast.value) return [];\n  return generalStore.storedCategories\n    .filter((item: Category) => {\n      return (\n        podcast.value?.emission.iabIds &&\n        -1 !== podcast.value.emission.iabIds.indexOf(item.id)\n      );\n    })\n    .sort((a: Category, b: Category) => {\n      if (a.id === emissionMainCategory.value) return -1;\n      if (b.id === emissionMainCategory.value) return 1;\n      return 0;\n    });\n});\n\nconst editRight = computed(() =>{\n  return isEditRights(podcast.value?.organisation.id);\n});\n\nconst isLiveReadyToRecord = computed(() =>{\n  return (\n    undefined !== podcast.value?.conferenceId &&\n    0 !== podcast.value?.conferenceId &&\n    \"READY_TO_RECORD\" === podcast.value?.processingStatus\n  );\n});\n\nconst isOctopusAndAnimator = computed(() =>{\n  return !isPodcastmaker.value && editRight.value && authStore.isRoleLive;\n});\n\nconst titlePage = computed(() =>{\n  return isLiveReadyToRecord.value? t(\"Live episode\"): t(\"Episode\");\n});\n\n\n//Watch\nwatch(()=>props.updateStatus, () => {\n  if (fetchConference.value && null !== fetchConference.value) {\n    fetchConference.value.status = props.updateStatus;\n  }\n});\nwatch(()=>props.podcastId, async () => {\n  await getPodcastDetails();\n  if (!podcast.value || error.value) {\n    return;\n  }\n  commentStore.initCommentUser();\n}, {immediate: true});\n\n\nonBeforeUnmount(() => {\n  generalStore.contentToDisplayUpdate(null);\n  clearTimeout(infoReload.value);\n});\n\n\n//Methods\nasync function initConference() {\n  if (!podcast.value || undefined == podcast.value.conferenceId || \"READY_TO_RECORD\" !== podcast.value.processingStatus) return;\n  fetchConference.value = { conferenceId: podcast.value.conferenceId, title: \"\" };\n  if (isOctopusAndAnimator.value) {\n    try {\n      fetchConference.value = await classicApi.fetchData<Conference>({\n        api: 9,\n        path: \"conference/\" + podcast.value.conferenceId,\n      });\n    } catch {\n      await fetchConferenceStatus();\n    }\n  } else {\n    await fetchConferenceStatus();\n  }\n  if (\n    fetchConference.value &&\n    -1 !== fetchConference.value.conferenceId &&\n    \"PUBLISHING\" !== fetchConference.value.status &&\n    \"DEBRIEFING\" !== fetchConference.value.status\n  ) {\n    fetchConferenceStatusLoop();\n  }\n}\n\nasync function fetchConferenceStatusLoop() {\n  if(\"PUBLISHING\" ===fetchConference.value?.status){\n    return;\n  }\n  infoReload.value = setTimeout(async () => {\n    await fetchConferenceStatus();\n    fetchConferenceStatusLoop();\n  }, 3000);\n}\nasync function fetchConferenceStatus() {\n  try {\n    const data = await classicApi.fetchData<ConferencePublicInfo>({\n      api: 9,\n      path: \"conference/info/\" + podcast.value?.conferenceId,\n    });\n    fetchConference.value = {...fetchConference.value, ...data};\n  } catch {\n    //Do nothing\n  }\n}\nfunction updatePodcast(podcastUpdated: Podcast): void {\n  podcast.value = podcastUpdated;\n  filterStore.updateOrgaIfNecessary(podcastUpdated.organisation.id);\n}\nfunction initError(): void {\n  error.value = true;\n  loaded.value = true;\n}\n\nasync function getPodcastDetails(): Promise<void> {\n  loaded.value = false;\n  error.value = false;\n  try {\n    const data = await classicApi.fetchData<Podcast>({\n      api: 0,\n      path: \"podcast/\" + props.podcastId,\n    });\n    if (\n      \"PUBLIC\" !== data.organisation.privacy &&\n      filterStore.filterOrgaId !== data.organisation.id &&\n      route.query.productor !== data.organisation.id\n    ) {\n      initError();\n      return;\n    }\n    updatePodcast(data);\n    generalStore.contentToDisplayUpdate(data);\n    if (\n      (!podcast.value.availability.visibility ||\n        (\"READY_TO_RECORD\" !== podcast.value.processingStatus &&\n          \"READY\" !== podcast.value.processingStatus &&\n          \"PROCESSING\" !== podcast.value.processingStatus) ||\n        false === podcast.value.valid) &&\n      !editRight.value\n    ) {\n      error.value = true;\n      loaded.value = true;\n      return;\n    }\n    podcastInProcessing();\n    updatePathParams(podcast.value.title);\n    await commentStore.getCommentsConfig(podcast.value);\n    if((fetchConference.value?.videoProfile?.includes(\"video_\") && \"READY_TO_RECORD\" === podcast.value.processingStatus) || undefined !== podcast.value.video?.videoId){\n      youtubeId.value = youtubeVideoHelper.getYoutubeId(podcast.value?.tags ?? []);\n    }\n    loaded.value = true;\n  } catch (error) {\n    handle403(error as AxiosError);\n    initError();\n  }\n}\n\nfunction podcastInProcessing(){\n  if(\"PLANNED\" !== podcast.value?.processingStatus){\n    initConference();\n    return;\n  }\n  infoReload.value = setTimeout(async () => {\n    const podcast = await podcastApi.get(props.podcastId);\n    updatePodcast(podcast);\n    podcastInProcessing();\n  }, 2000);\n}\n</script>\n","<template>\n  <section class=\"page-box\">\n    <template v-if=\"loaded && !error && podcast\">\n      <PodcastmakerHeader\n        v-if=\"isPodcastmaker\"\n        :page-title=\"useEmissionTitle ? podcast.emission.name : titlePage\"\n        :img-url=\"podcast.imageUrl\"\n      />\n      <div\n        class=\"d-flex flex-column page-element\"\n        :class=\"isPodcastmaker ? 'page-element-podcastmaker' : ''\"\n      >\n        <PodcastModuleBox\n          :playing-podcast=\"playingPodcast\"\n          :podcast=\"podcast\"\n          :podcast-conference=\"fetchConference\"\n          @update-podcast=\"updatePodcast\"\n        >\n          <template #recording-item-button=\"slotProps\">\n            <slot name=\"recording-item-button\" v-bind=\"slotProps\" />\n          </template>\n          <template #edit-box=\"slotProps\">\n            <slot name=\"edit-box\" v-bind=\"slotProps\" />\n          </template>\n        </PodcastModuleBox>\n        <ShareSocialsButtons\n          v-if=\"state.podcastPage.ShareButtons\"\n          :organisation-id=\"podcast.organisation.id\"\n        />\n        <SharePlayer\n          v-if=\"!isPodcastmaker && editRight && !youtubeId\"\n          :podcast=\"podcast\"\n          :emission=\"podcast?.emission\"\n          :organisation-id=\"authOrgaId\"\n        />\n        <CommentSection :podcast=\"podcast\" />\n\n        <!-- Suggestions -->\n        <PodcastInlineList\n          :emission-id=\"podcast.emission.emissionId\"\n          :href=\"'/main/pub/emission/' + podcast.emission.emissionId\"\n          :title=\"t('More episodes of this emission')\"\n          :button-text=\"t('All podcast emission button')\"\n          title-tag=\"h3\"\n        />\n        <section v-if=\"!hideSuggestions\">\n          <ClassicLazy :min-height=\"550\">\n            <PodcastInlineList\n              class=\"mt-4\"\n              title-tag=\"h3\"\n              :organisation-id=\"[podcast.organisation.id]\"\n              :podcast-id=\"podcastId\"\n              :title=\"t('Suggested listening')\"\n            />\n          </ClassicLazy>\n          <ClassicLazy v-for=\"c in categories\" :key=\"c.id\" :min-height=\"550\">\n            <PodcastInlineList\n              class=\"mt-4\"\n              title-tag=\"h3\"\n              :iab-id=\"c.id\"\n              :href=\"'/main/pub/category/' + c.id\"\n              :title=\"t('More episodes of this category : ', { name: c.name })\"\n              :button-text=\"t('All podcast button', { name: c.name })\"\n              :organisation-id=\"[podcast.organisation.id]\"\n            />\n          </ClassicLazy>\n        </section>\n      </div>\n    </template>\n    <ClassicLoading\n      :loading-text=\"!loaded ? t('Loading content ...') : undefined\"\n      :error-text=\"\n        error\n          ? t(`This episode is not available for (re)listening`)\n          : undefined\n      \"\n    />\n  </section>\n</template>\n\n<script setup lang=\"ts\">\nimport youtubeVideoHelper from \"../../helper/youtubeVideoHelper\";\nimport {useOrgaComputed} from \"../composable/useOrgaComputed\";\nimport PodcastInlineList from \"../display/podcasts/PodcastInlineList.vue\";\nimport PodcastModuleBox from \"../display/podcasts/PodcastModuleBox.vue\";\nimport ClassicLazy from \"../misc/ClassicLazy.vue\";\nimport ClassicLoading from \"../form/ClassicLoading.vue\";\nimport classicApi from \"../../api/classicApi\";\nimport { state } from \"../../stores/ParamSdkStore\";\nimport { useFilterStore } from \"../../stores/FilterStore\";\nimport { Podcast } from \"@/stores/class/general/podcast\";\nimport {\n  Conference,\n  ConferencePublicInfo,\n} from \"@/stores/class/conference/conference\";\nimport {useErrorHandler} from \"../composable/useErrorHandler\";\nimport {useSeoTitleUrl} from \"../composable/route/useSeoTitleUrl\";\nimport { computed, defineAsyncComponent, onBeforeUnmount, ref, Ref, watch } from \"vue\";\nimport { Category } from \"@/stores/class/general/category\";\nimport { useAuthStore } from \"../../stores/AuthStore\";\nimport { useGeneralStore } from \"../../stores/GeneralStore\";\nimport { AxiosError } from \"axios\";\nimport { useCommentStore } from \"../../stores/CommentStore\";\nimport { useI18n } from \"vue-i18n\";\nimport { useRoute } from \"vue-router\";\nimport { podcastApi } from \"../../api/podcastApi\";\n\nconst ShareSocialsButtons = defineAsyncComponent(\n  () => import(\"../display/sharing/ShareSocialsButtons.vue\"),\n);\nconst SharePlayer = defineAsyncComponent(\n  () => import(\"../display/sharing/SharePlayer.vue\"),\n);\nconst CommentSection = defineAsyncComponent(\n  () => import(\"../display/comments/CommentSection.vue\"),\n);\nconst PodcastmakerHeader = defineAsyncComponent(\n  () => import(\"../display/podcastmaker/PodcastmakerHeader.vue\"),\n);\n\n//Props \nconst props = defineProps<{\n  updateStatus?: string;\n  playingPodcast?: Podcast;\n  podcastId: number;\n  /** When true, display emission title in podcastmaker header */\n  useEmissionTitle?: boolean;\n}>();\n\n\n//Data \nconst loaded = ref(false);\nconst error = ref(false);\nconst podcast: Ref<Podcast | undefined> = ref(undefined);\nconst fetchConference: Ref<Conference | undefined> = ref(undefined);\nconst infoReload: Ref<ReturnType<typeof setTimeout>| undefined> = ref(undefined);\nconst youtubeId: Ref<string| undefined> = ref(undefined);\n\n//Composables\nconst route = useRoute();\nconst { t } = useI18n();\nconst { isPodcastmaker, isEditRights, authOrgaId } = useOrgaComputed();\nconst { updatePathParams } = useSeoTitleUrl();\nconst {handle403} = useErrorHandler();\nconst authStore = useAuthStore();\nconst generalStore = useGeneralStore();\nconst filterStore = useFilterStore();\nconst commentStore = useCommentStore();\n\n//Computed\nconst hideSuggestions = computed(() =>{\n  return (\n      \"true\" ===\n      (podcast.value?.emission?.annotations?.[\"HIDE_SUGGESTIONS\"] as\n        | string\n        | undefined)\n    );\n});\nconst emissionMainCategory = computed(() =>{\n  if (!podcast.value) {\n    return 0;\n  }\n  if (podcast.value.emission.annotations?.mainIabId) {\n    return parseInt(\n      podcast.value.emission.annotations.mainIabId as string,\n      10,\n    );\n  } else if(podcast.value.emission.iabIds?.length) {\n    return podcast.value.emission.iabIds[0];\n  }\n  return 0;\n});\n\nconst categories = computed(() =>{\n  if (\"undefined\" === typeof podcast.value) return [];\n  return generalStore.storedCategories\n    .filter((item: Category) => {\n      return (\n        podcast.value?.emission.iabIds &&\n        -1 !== podcast.value.emission.iabIds.indexOf(item.id)\n      );\n    })\n    .sort((a: Category, b: Category) => {\n      if (a.id === emissionMainCategory.value) return -1;\n      if (b.id === emissionMainCategory.value) return 1;\n      return 0;\n    });\n});\n\nconst editRight = computed(() =>{\n  return isEditRights(podcast.value?.organisation.id);\n});\n\nconst isLiveReadyToRecord = computed(() =>{\n  return (\n    undefined !== podcast.value?.conferenceId &&\n    0 !== podcast.value?.conferenceId &&\n    \"READY_TO_RECORD\" === podcast.value?.processingStatus\n  );\n});\n\nconst isOctopusAndAnimator = computed(() =>{\n  return !isPodcastmaker.value && editRight.value && authStore.isRoleLive;\n});\n\nconst titlePage = computed(() =>{\n  return isLiveReadyToRecord.value? t(\"Live episode\"): t(\"Episode\");\n});\n\n\n//Watch\nwatch(()=>props.updateStatus, () => {\n  if (fetchConference.value && null !== fetchConference.value) {\n    fetchConference.value.status = props.updateStatus;\n  }\n});\nwatch(()=>props.podcastId, async () => {\n  await getPodcastDetails();\n  if (!podcast.value || error.value) {\n    return;\n  }\n  commentStore.initCommentUser();\n}, {immediate: true});\n\n\nonBeforeUnmount(() => {\n  generalStore.contentToDisplayUpdate(null);\n  clearTimeout(infoReload.value);\n});\n\n\n//Methods\nasync function initConference() {\n  if (!podcast.value || undefined == podcast.value.conferenceId || \"READY_TO_RECORD\" !== podcast.value.processingStatus) return;\n  fetchConference.value = { conferenceId: podcast.value.conferenceId, title: \"\" };\n  if (isOctopusAndAnimator.value) {\n    try {\n      fetchConference.value = await classicApi.fetchData<Conference>({\n        api: 9,\n        path: \"conference/\" + podcast.value.conferenceId,\n      });\n    } catch {\n      await fetchConferenceStatus();\n    }\n  } else {\n    await fetchConferenceStatus();\n  }\n  if (\n    fetchConference.value &&\n    -1 !== fetchConference.value.conferenceId &&\n    \"PUBLISHING\" !== fetchConference.value.status &&\n    \"DEBRIEFING\" !== fetchConference.value.status\n  ) {\n    fetchConferenceStatusLoop();\n  }\n}\n\nasync function fetchConferenceStatusLoop() {\n  if(\"PUBLISHING\" ===fetchConference.value?.status){\n    return;\n  }\n  infoReload.value = setTimeout(async () => {\n    await fetchConferenceStatus();\n    fetchConferenceStatusLoop();\n  }, 3000);\n}\nasync function fetchConferenceStatus() {\n  try {\n    const data = await classicApi.fetchData<ConferencePublicInfo>({\n      api: 9,\n      path: \"conference/info/\" + podcast.value?.conferenceId,\n    });\n    fetchConference.value = {...fetchConference.value, ...data};\n  } catch {\n    //Do nothing\n  }\n}\nfunction updatePodcast(podcastUpdated: Podcast): void {\n  podcast.value = podcastUpdated;\n  filterStore.updateOrgaIfNecessary(podcastUpdated.organisation.id);\n}\nfunction initError(): void {\n  error.value = true;\n  loaded.value = true;\n}\n\nasync function getPodcastDetails(): Promise<void> {\n  loaded.value = false;\n  error.value = false;\n  try {\n    const data = await classicApi.fetchData<Podcast>({\n      api: 0,\n      path: \"podcast/\" + props.podcastId,\n    });\n    if (\n      \"PUBLIC\" !== data.organisation.privacy &&\n      filterStore.filterOrgaId !== data.organisation.id &&\n      route.query.productor !== data.organisation.id\n    ) {\n      initError();\n      return;\n    }\n    updatePodcast(data);\n    generalStore.contentToDisplayUpdate(data);\n    if (\n      (!podcast.value.availability.visibility ||\n        (\"READY_TO_RECORD\" !== podcast.value.processingStatus &&\n          \"READY\" !== podcast.value.processingStatus &&\n          \"PROCESSING\" !== podcast.value.processingStatus) ||\n        false === podcast.value.valid) &&\n      !editRight.value\n    ) {\n      error.value = true;\n      loaded.value = true;\n      return;\n    }\n    podcastInProcessing();\n    updatePathParams(podcast.value.title);\n    await commentStore.getCommentsConfig(podcast.value);\n    if((fetchConference.value?.videoProfile?.includes(\"video_\") && \"READY_TO_RECORD\" === podcast.value.processingStatus) || undefined !== podcast.value.video?.videoId){\n      youtubeId.value = youtubeVideoHelper.getYoutubeId(podcast.value?.tags ?? []);\n    }\n    loaded.value = true;\n  } catch (error) {\n    handle403(error as AxiosError);\n    initError();\n  }\n}\n\nfunction podcastInProcessing(){\n  if(\"PLANNED\" !== podcast.value?.processingStatus){\n    initConference();\n    return;\n  }\n  infoReload.value = setTimeout(async () => {\n    const podcast = await podcastApi.get(props.podcastId);\n    updatePodcast(podcast);\n    podcastInProcessing();\n  }, 2000);\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqNA,MAAM,iBAAiB,2BACb,OAAO,gCACjB;EACA,MAAM,mBAAmB,2BACf,OAAO,mCAAA,MAAA,MAAA,EAAA,CAAA,CACjB;EACA,MAAM,cAAc,2BACV,OAAO,6BACjB;EACA,MAAM,wBAAwB,2BACpB,OAAO,uCACjB;EACA,MAAM,wBAAwB,2BACpB,OAAO,uCACjB;EACA,MAAM,YAAY,2BAA2B,OAAO,2BAAwB;EAC5E,MAAM,UAAU,2BAA2B,OAAO,yBAAgB;EAClE,MAAM,iBAAiB,2BAA2B,OAAO,gCAAgC;EACzF,MAAM,sBAAsB,2BAA2B,OA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