PageSourceSearch

https://arena-streams.com/3.0.0.3/chunk-O3XY7JZW.js

js arena-streams.com collected 2026-10-07 13:20:45 UTC 1,245,876 bytes, 48 lines download raw bytes

1import{a as F,b as ve,c as nh,f as Vt}from"./chunk-25N2FLV6.js";var hn=class{constructor(i){this.client=i}};var ms=(function(t){return t.SUBTITLES="SUBTITLES",t.AUDIO_DESCRIPTION="AUDIO_DESCRIPTION",t.SIGN_LANGUAGE="SIGN_LANGUAGE",t})(ms||{});function Pu(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{pageType:t.pageType,properties:t.properties}}var Gy=(function(t){return t.DETAIL="DETAIL",t.PLAY="PLAY",t.PLAY_TRAILER="PLAY_TRAILER",t})(Gy||{});function ow(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{campaignId:t.campaignId,campaignReportingId:t.campaignReportingId,advertisementId:t.advertisementId,advertisementReportingId:t.advertisementReportingId}}function sw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{imageType:t.imageType,imageUrl:t.imageUrl,skipTime:t.skipTime}}function ih(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{type:t.type,id:t.id,method:t.method,extra:Pu(t.extra,!1)}}function aw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{adIdentifier:ow(t.adIdentifier,!0),image:sw(t.image,!0),action:ih(t.action,!1)}}var Wy=(function(t){return t.FULLSCREEN="FULLSCREEN",t})(Wy||{});var Me=(function(t){return t._TRUE="TRUE",t._FALSE="FALSE",t.ANY="ANY",t})(Me||{});var wL=(function(t){return t.ASSET="ASSET",t.SEASON="SEASON",t.SERIES="SERIES",t})(wL||{});var he=(function(t){return t.VOD="VOD",t.PROGRAM="PROGRAM",t.SERIES="SERIES",t.CHANNEL="CHANNEL",t.SCHEDULE="SCHEDULE",t.RECORDING="RECORDING",t.ARTICLE="ARTICLE",t.BUNDLE="BUNDLE",t.PRODUCT="PRODUCT",t.SUBSCRIPTION="SUBSCRIPTION",t.PAGE="PAGE",t})(he||{});function lw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,image:t.image}}function jr(t){let i=t.getTime()/1e3;return Math.floor(i)}function wt(t){if(t)return typeof t=="number"?new Date(t*1e3):new Date(t)}function cw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,name:t.name,avatar:t.avatar}}function dw(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{catalogs:(e=t.catalogs)===null||e===void 0?void 0:e.map(n=>cw(n)),defaultCatalogId:t.defaultCatalogId,defaultProfileId:t.defaultProfileId,defaultEntitlementId:t.defaultEntitlementId}}function gs(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{name:t.name,value:t.value}}function uw(t,i=!0){var e,n,r,o,s,a,l;if(!t){if(i)throw new Error("data is undefined");return}return{locale:t.locale,globalSettings:(e=t.globalSettings)===null||e===void 0?void 0:e.map(c=>gs(c)),appTranslations:(n=t.appTranslations)===null||n===void 0?void 0:n.map(c=>gs(c)),genreTranslations:(r=t.genreTranslations)===null||r===void 0?void 0:r.map(c=>gs(c)),parentalRatingTranslations:(o=t.parentalRatingTranslations)===null||o===void 0?void 0:o.map(c=>gs(c)),contentDescriptionTranslations:(s=t.contentDescriptionTranslations)===null||s===void 0?void 0:s.map(c=>gs(c)),legalTexts:(a=t.legalTexts)===null||a===void 0?void 0:a.map(c=>gs(c)),externalLinks:(l=t.externalLinks)===null||l===void 0?void 0:l.map(c=>gs(c)),anonymousConfig:dw(t.anonymousConfig,!0)}}function pw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{poster:t.poster,detail:t.detail}}function fw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{resolutionId:t.resolutionId,resolution:t.resolution}}function hw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{title:t.title,description:t.description}}function mw(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{bundleId:t.bundleId,text:hw(t.text,!0),image:pw(t.image,!0),adult:t.adult,minimumAge:t.minimumAge,resolutions:(e=t.resolutions)===null||e===void 0?void 0:e.map(n=>fw(n)),validFrom:wt(t.validFrom),validUntil:wt(t.validUntil),singleAssetSeriesId:t.singleAssetSeriesId}}function gw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,type:t.type,identifier:t.identifier,name:t.name}}function _w(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,name:t.name,age:t.age,languages:t.languages}}function vw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{title:t.title}}function Ou(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{tag:t.tag,text:vw(t.text,!0),adult:t.adult,activeCount:t.activeCount,categories:(e=t.categories)===null||e===void 0?void 0:e.map(n=>Ou(n))}}function yw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{catalogId:t.catalogId,channelNumber:t.channelNumber}}function bw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{defaultLogo:t.defaultLogo,squareLogo:t.squareLogo,posterLogo:t.posterLogo}}function al(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{type:t.type,from:wt(t.from),until:wt(t.until),options:t.options}}function Cw(t,i=!0){var e,n;if(!t){if(i)throw new Error("data is undefined");return}return{currentRights:(e=t.currentRights)===null||e===void 0?void 0:e.map(r=>al(r)),maxReplayHours:t.maxReplayHours,maximumRights:(n=t.maximumRights)===null||n===void 0?void 0:n.map(r=>al(r))}}function Sw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}
1return{title:t.title,shortDescription:t.shortDescription,longDescription:t.longDescription}}function Ew(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{liveImage:t.liveImage,liveRefresh:t.liveRefresh}}function Iw(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{adult:t.adult,audioOnly:t.audioOnly,catalogs:(e=t.catalogs)===null||e===void 0?void 0:e.map(n=>yw(n)),channelId:t.channelId,dvbId:t.dvbId,enabled:t.enabled,image:bw(t.image,!0),minimumAge:t.minimumAge,resolution:t.resolution,rights:Cw(t.rights,!1),text:Sw(t.text,!0),thumbnail:Ew(t.thumbnail,!1)}}function rh(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{role:t.role,name:t.name,character:t.character}}function ww(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{country:t.country,raceDate:wt(t.raceDate),raceTypes:t.raceTypes,trackName:t.trackName}}function Tw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{rikstoto:ww(t.rikstoto,!1)}}function Dw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{poster:t.poster,detail:t.detail}}function Aw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{title:t.title,episodeTitle:t.episodeTitle,shortDescription:t.shortDe
1scription,longDescription:t.longDescription}}function Ks(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{adult:t.adult,categoryTags:t.categoryTags,credits:(e=t.credits)===null||e===void 0?void 0:e.map(n=>rh(n)),customData:Tw(t.customData,!1),episodeNumber:t.episodeNumber,genres:t.genres,image:Dw(t.image,!0),minimumAge:t.minimumAge,parentalRatings:t.parentalRatings,productionYear:t.productionYear,programId:t.programId,seasonId:t.seasonId,text:Aw(t.text,!0)}}function bc(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{start:wt(t.start),end:wt(t.end)}}function ea(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{accessibilityOptions:t.accessibilityOptions,blackouts:t.blackouts,channelId:t.channelId,programId:t.programId,published:bc(t.published,!0),scheduleId:t.scheduleId,rights:(e=t.rights)===null||e===void 0?void 0:e.map(n=>al(n))}}function Rw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{title:t.title}}function ta(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{seasonId:t.seasonId,seriesId:t.seriesId,seasonNumber:t.seasonNumber,text:Rw(t.text,!0),adult:t.adult}}function xw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{poster:t.poster,detail:t.detail}}function Mw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}
1return{title:t.title,shortDescription:t.shortDescription,longDescription:t.longDescription}}function na(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{adult:t.adult,image:xw(t.image,!0),minimumAge:t.minimumAge,parentalRatings:t.parentalRatings,seriesId:t.seriesId,text:Mw(t.text,!0)}}function Pw(t,i=!0){var e,n,r,o;if(!t){if(i)throw new Error("data is undefined");return}return{schedules:(e=t.schedules)===null||e===void 0?void 0:e.map(s=>ea(s)),programs:(n=t.programs)===null||n===void 0?void 0:n.map(s=>Ks(s)),seasons:(r=t.seasons)===null||r===void 0?void 0:r.map(s=>ta(s)),series:(o=t.series)===null||o===void 0?void 0:o.map(s=>na(s))}}var TL=(function(t){return t.PENDING="PENDING",t.SUCCESS="SUCCESS",t.FAILED="FAILED",t})(TL||{});var zy=(function(t){return t.SCHEDULE="SCHEDULE",t})(zy||{});var Hr=(function(t){return t.ASC="ASC",t.DESC="DESC",t})(Hr||{});var Cc=(function(t){return t.TITLE="TITLE",t.EPISODE="EPISODE",t})(Cc||{});var DL=(function(t){return t.ACTOR="ACTOR",t.DIRECTOR="DIRECTOR",t.ANCHOR="ANCHOR",t.ART_DIRECTOR="ART_DIRECTOR",t.PERFORMER="PERFORMER",t.REPORTER="REPORTER",t.PRODUCER="PRODUCER",t.SCENARIST="SCENARIST",t.VOICE_OVER_ARTIST="VOICE_OVER_ARTIST",t.COMMENTATOR="COMMENTATOR",t.CO_COMMENTATOR="CO_COMMENTATOR",t.LINE_REPORTERS="LINE_REPORTERS",t.WRITER="WRITER",t})(DL||{});var ll=(function(t){return t.NO_ADULT="NO_ADULT",t.NO_RENT="NO_RENT",t.NO_UPSELL="NO_UPSELL",t.ALLOW_PROFILES="ALLOW_PROFILES",t.REQUIRE_PIN_18PLUS="REQUIRE_PIN_18PLUS",t})(ll||{});function oh(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{name:t.name,avatar:t.avatar,catalog:t.catalog}}function qy(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,profile:oh(t.profile,!0),image:t.image,master:t.master,fallback:t.fallback}}var In=(function(t){return t.SD="SD",t.HD="HD",t.UHD_4K="UHD_4K",t})(In||{});var AL=(function(t){return t.ANY="ANY",t.FUTURE="FUTURE",t.PAST="PAST",t})(AL||{});function Ow(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{driver:t.driver,horse:t.horse,position:t.position}}function Nw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{category:t.category,subcategories:t.subcategories}}function kw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,features:t.features,loginName:t.loginName,displayName:t.displayName}}function Lw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,type:t.type,entitlementId:t.entitlementId}}function Fw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id}}function Vw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,type:t.type,entitlementId:t.entitlementId,serial:t.serial}}function Uw(t,i=!0){var e,n;if(!t){if(i)throw new Error("data is undefined");return}return{analytics:(e=t.analytics)===null||e===void 0?void 0:e.map(r=>Nw(r)),customer:kw(t.customer,!0),device:Lw(t.device,!0),npvr:Fw(t.npvr,!1),pushTopics:t.pushTopics,sessionId:t.sessionId,stbs:(n=t.stbs)===null||n===void 0?void 0:n.map(r=>Vw(r))}}var ia=(function(t){return t.VIOLENCE="VIOLENCE",t.SEX="SEX",t.FEAR="FEAR",t.DRUGS="DRUGS",t.DISCRIMINATION="DISCRIMINATION",t.COARSELANGUAGE="COARSELANGUAGE",t})(ia||{});var ra=(function(t){return t.IOS="IOS",t.ANDROID="ANDROID",t.WEB="WEB",t.STB="STB",t.CHROMECAST="CHROMECAST",t.ANDROIDTV="ANDROIDTV",t.ANDROIDTV_STB="ANDROIDTV_STB",t.ANDROIDTV_HOTEL_STB="ANDROIDTV_HOTEL_STB",t.TVOS="TVOS",t.SMARTTV_TIZEN="SMARTTV_TIZEN",t.SMARTTV_WEBOS="SMARTTV_WEBOS",t.SMARTTV_TITANOS="SMARTTV_TITANOS",t.WEB_EMBEDDED="WEB_EMBEDDED",t})(ra||{});function sh(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,profile:oh(t.profile,!0),image:t.image,master:t.master}}function Bw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{program:Ks(t.program,!0),season:ta(t.season,!1),series:na(t.series,!1)}}function jw(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{schedules:(e=t.schedules)===null||e===void 0?void 0:e.map(n=>ea(n))}}function oa(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{original:t.original,customer:t.customer,validity:t.validity}}function Hw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{resolutionId:t.resolutionId,resolution:t.resolution,contentType:t.contentType,price:oa(t.price,!1)}}function $w(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{resolutions:(e=t.resolutions)===null||e===void 0?void 0:e.map(n=>Hw(n))}}function Gw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{poster:t.poster,icon:t.icon,logo:t.logo}}function Ww(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}
1return{title:t.title,description:t.description}}function zw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{productId:t.productId,text:Ww(t.text,!0),image:Gw(t.image,!0),price:oa(t.price,!1)}}function qw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{streamId:t.streamId,streamType:t.streamType,resolution:t.resolution,contentType:t.contentType,options:t.options,price:oa(t.price,!1)}}function Yw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{poster:t.poster,detail:t.detail}}function Qw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{resolutionId:t.resolutionId,resolution:t.resolution}}function Zw(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{title:t.title,description:t.description}}function Jw(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{bundleId:t.bundleId,text:Zw(t.text,!0),image:Yw(t.image,!0),resolutions:(e=t.resolutions)===null||e===void 0?void 0:e.map(n=>Qw(n))}}function Xw(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{streamId:t.streamId,resolution:t.resolution,products:(e=t.products)===null||e===void 0?void 0:e.map(n=>zw(n))}}function Kw(t,i=!0){var e,n;if(!t){if(i)throw new Error("data is undefined");return}return{bundles:(e=t.bundles)===null||e===void 0?void 0:e.map(r=>Jw(r)),products:(n=t.products)===null||n===void 0?void 0:n.map(r=>Xw(r))}}function eT(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{streams:(e=t.streams)===null||e===void 0?void 0:e.map(n=>qw(n)),upsell:Kw(t.upsell,!1)}}function tT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{itemId:t.itemId,price:oa(t.price,!0)}}function Sc(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{purchaseId:t.purchaseId,purchaseType:t.purchaseType,purchaseStatus:t.purchaseStatus,resourceId:t.resourceId,deviceId:t.deviceId,validFrom:wt(t.validFrom),validUntil:wt(t.validUntil),items:(e=t.items)===null||e===void 0?void 0:e.map(n=>tT(n))}}var cl=(function(t){return t.TVOD="TVOD",t.BUNDLE="BUNDLE",t.CHANNEL_PPV="CHANNEL_PPV",t.VOD_PPV="VOD_PPV",t})(cl||{});function nT(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,programId:t.programId,published:bc(t.published,!0),blackouts:t.blackouts,accessibilityOptions:t.accessibilityOptions,rights:(e=t.rights)===null||e===void 0?void 0:e.map(n=>al(n))}}function iT(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id,schedules:(e=t.schedules)===null||e===void 0?void 0:e.map(n=>nT(n))}}function Yy(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{type:t.type,subType:t.subType,id:t.id,season:t.season,episode:t.episode,image:t.image,title:t.title,adult:t.adult,seriesId:t.seriesId,episodeTitle:t.episodeTitle,synopsis:t.synopsis,productionYear:t.productionYear,minimumAge:t.minimumAge,score:t.score,operatorScore:t.operatorScore,resolution:t.resolution,duration:t.duration,detailImage:t.detailImage,genres:t.genres,actionExtra:Pu(t.actionExtra,!1)}}function ah(t,i=!0){var e,n;if(!t){if(i)throw new Error("data is undefined");return}return{asset:Yy(t.asset,!0),method:t.method,channels:(e=t.channels)===null||e===void 0?void 0:e.map(r=>iT(r)),resources:(n=t.resources)===null||n===void 0?void 0:n.map(r=>Yy(r))}}function pi(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{type:t.type,nextPage:t.nextPage,items:(e=t.items)===null||e===void 0?void 0:e.map(n=>ah(n))}}var nt=(function(t){return t.PORTRAIT="PORTRAIT",t.LANDSCAPE="LANDSCAPE",t})(nt||{});var _s=(function(t){return t.NONE="NONE",t.MINI="MINI",t})(_s||{});function rT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{schedule:ea(t.schedule,!0),program:Ks(t.program,!0),season:ta(t.season,!1),series:na(t.series,!1)}}function oT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{type:t.type,elements:pi(t.elements,!0)}}var Bi=(function(t){return t.CATEGORY="CATEGORY",t.DATE="DATE",t.TEXT="TEXT",t})(Bi||{});function sT(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{results:(e=t.results)===null||e===void 0?void 0:e.map(n=>oT(n)),completions:t.completions}}var $r=(function(t){return t.ARTICLE="ARTICLE",t.BUNDLE="BUNDLE",t.LINEAR="LINEAR",t.RECORDING="RECORDING",t.REPLAY="REPLAY",t.VOD="VOD",t})($r||{});function aT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{series:na(t.series,!0)}}function lT(t,i=!0){var e,n,r;if(!t){if(i)throw new Error("data is undefined");return}return{schedules:(e=t.schedules)===null||e===void 0?void 0:e.map(o=>ea(o)),programs:(n=t.programs)===null||n===void 0?void 0:n.map(o=>
1Ks(o)),seasons:(r=t.seasons)===null||r===void 0?void 0:r.map(o=>ta(o))}}function lh(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{mid:t.mid,bookmarkOffset:t.bookmarkOffset,event:bc(t.event,!1),vastUrl:t.vastUrl,streamEndTime:wt(t.streamEndTime),sessionLifetime:t.sessionLifetime}}var fi=(function(t){return t.PLAYREADY="PLAYREADY",t.FAIRPLAY="FAIRPLAY",t.WIDEVINE="WIDEVINE",t})(fi||{});var Qy=(function(t){return t.MAIN="MAIN",t.PIP="PIP",t.AD="AD",t.DOWNLOAD="DOWNLOAD",t})(Qy||{});function cT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{hideAudioSelection:t.hideAudioSelection,hideVideoSelection:t.hideVideoSelection,hideSubtitleSelection:t.hideSubtitleSelection}}function dT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{url:t.url,drm:t.drm,assetId:t.assetId,drmSessionId:t.drmSessionId,drmAuthToken:t.drmAuthToken,drmUserId:t.drmUserId,playerPolicy:cT(t.playerPolicy,!1)}}function uT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{assetType:t.assetType,assetId:t.assetId}}function pT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{streamType:t.streamType,resourceId:t.resourceId,quoteId:t.quoteId}}function fT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{play:pT(t.play,!0),detail:uT(t.detail,!0)}}var ch=(function(t){return t.RESUME_FROM_LIVE="RESUME_FROM_LIVE",t.AIRPLAY_ACTIVE="AIRPLAY_ACTIVE",t})(ch||{});var Nu=(function(t){return t.DASH="DASH",t.MSS="MSS",t.HLS="HLS",t})(Nu||{});function hT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{sid:t.sid,keepalive:t.keepalive,lifetime:t.lifetime,asset:lh(t.asset,!1)}}var Ec=(function(t){return t.IDLE="IDLE",t.PLAYING="PLAYING",t.PAUSED="PAUSED",t})(Ec||{});var q=(function(t){return t.LINEAR="LINEAR",t.REPLAY="REPLAY",t.SVOD="SVOD",t.TVOD="TVOD",t.FVOD="FVOD",t.NPVR="NPVR",t.DVBC="DVBC",t})(q||{});function mT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{id:t.id}}function gT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{status:t.status,errorCode:t.errorCode}}function _T(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{time:wt(t.time)}}function vT(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{estimate:t.estimate,items:(e=t.items)===null||e===void 0?void 0:e.map(n=>ah(n)),nextToken:t.nextToken,page:t.page,type:t.type}}function yT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return Object.assign({},t)}function bT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{clientId:t.clientId,configurationEndpoint:t.configurationEndpoint,issuer:t.issuer,parameters:yT(t.parameters,!0),scope:t.scope}}function CT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{openIdConfig:bT(t.openIdConfig,!1),providerId:t.providerId,providerName:t.providerName,providerType:t.providerType}}var Zy=(function(t){return t.LOCAL="LOCAL",t.OPENID="OPENID",t})(Zy||{});function ST(t,i=!0){var e;if(!t){if(i)throw new Error("data is undefined");return}return{legs:t.legs,lineup:(e=t.lineup)===null||e===void 0?void 0:e.map(n=>Ow(n)),raceName:t.raceName,startTime:wt(t.startTime)}}function ET(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{rikstoto:ST(t.rikstoto,!1)}}function IT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{poster:t.poster,detail:t.detail}}function wT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{streamId:t.streamId,streamType:t.streamType,resolution:t.resolution,manifestURL:t.manifestURL}}function TT(t,i=!0){if(!t){if(i)throw new Error("data is undefined");return}return{title:t.title,originalTitle:t.originalTitle,shortDescription:t.shortDe
1scription,longDescription:t.longDescription}}function ku(t,i=!0){var e,n;if(!t){if(i)throw new Error("data is undefined");return}return{adult:t.adult,assetId:t.assetId,assetType:t.assetType,categoryTags:t.categoryTags,credits:(e=t.credits)===null||e===void 0?void 0:e.map(r=>rh(r)),customData:ET(t.customData,!1),duration:t.duration,episodeNumber:t.episodeNumber,genres:t.genres,image:IT(t.image,!0),minimumAge:t.minimumAge,operatorScore:t.operatorScore,parentalRatings:t.parentalRatings,productionYear:t.productionYear,score:t.score,seasonId:t.seasonId,seasonNumber:t.seasonNumber,seriesId:t.seriesId,streams:(n=t.streams)===null||n===void 0?void 0:n.map(r=>wT(r)),text:TT(t.text,!0),validFrom:wt(t.validFrom),validUntil:wt(t.validUntil)}}var lr=(function(t){return t.FULL="FULL",t.TRAILER="TRAILER",t})(lr||{});var PL=(function(t){return t.ASSET="ASSET",t.SERIES="SERIES",t})(PL||{});var Gr=function(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})},dh=class extends hn{createProfile(i){return Gr(this,void 0,void 0,function*(){let e="/aa/v1/profile",n=new Headers;n.append("Accept","application/vnd.nebula-v2+json"),n.append("Content-Type","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return o.body=i,this.client.postJson(o).then(s=>sh(s))})}deleteProfile(i){return Gr(this,void 0,void 0,function*(){let e=`/aa/v1/profile/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return this.client.delete(o)})}getAllAvatars(){return Gr(this,void 0,void 0,function*(){let i="/aa/v1/avatar",e=new Headers;e.append("Accept","application/vnd.nebula-v2+json");let n={url:i,headers:e};return this.client.get(n).then(r=>r.map(o=>lw(o)))})}getAllCatalogs(){return Gr(this,void 0,void 0,function*(){let i="/aa/v1/catalog",e=new Headers;e.append("Accept","application/vnd.nebula-v2+json");let n=this.client.getTokenProvider();e.append("Authorization",`Bearer ${yield n.provideSessionToken()}`);let r={url:i,headers:e};return this.client.get(r).then(o=>o.map(s=>_w(s)))})}getAllIdentityProviders(i){return Gr(this,void 0,void 0,function*(){let e=new URLSearchParams;e.append("platformType",i);let n=`/aa/v1/identity/provider?${e.toString()}`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json");let o={url:n,headers:r};return this.client.get(o).then(s=>s.map(a=>CT(a)))})}getAllProfiles(){return Gr(this,void 0,void 0,function*(){let i="/aa/v1/profile",e=new Headers;e.append("Accept","application/vnd.nebula-v2+json");let n=this.client.getTokenProvider();e.append("Authorization",`Bearer ${yield n.provideSessionToken()}`);let r={url:i,headers:e};return this.client.get(r).then(o=>o.map(s=>sh(s)))})}getDeviceProfile(i){return Gr(this,void 0,void 0,function*(){let e=`/aa/v1/device/${encodeURIComponent(String(i))}/profile`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return this.client.get(o).then(s=>qy(s))})}loginDevice(i){return Gr(this,void 0,void 0,function*(){let e="/aa/v1/login/device",n=new Headers;n.append("Accept","application/vnd.nebula-v2+json"),n.append("Content-Type","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return o.body=i,this.client.postJson(o)})}registerCastDevice(i){return Gr(this,void 0,void 0,function*(){let e="/aa/v1/cast-device",n=new Headers;n.append("Accept","application/vnd.nebula-v2+json"),n.append("Content-Type","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return o.body=i,this.client.postJson(o).then(s=>gw(s))})}switchProfile(i,e){return Gr(this,void 0,void 0,function*(){let n=`/aa/v1/device/${encodeURIComponent(String(i))}/profile/${encodeURIComponent(String(e))}`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json");let o=this.client.getTokenProvider();r.append("Authorization",`Bearer ${yield o.provideSessionToken()}`);let s={url:n,headers:r};return this.client.put(s).then(a=>qy(a))})}updateProfile(i,e){return Gr(this,void 0,void 0,function*(){let n=`/aa/v1/profile/${encodeURIComponent(String(i))}`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o=this.client.getTokenProvider();r.append("Authorization",`Bearer ${yield o.provideSessionToken()}`);let s={url:n,headers:r};return s.body=e,this.client.put(s).then(a=>sh(a))})}};var vs=function(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}
1catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})},Ic=class extends hn{changePincode(i){return vs(this,void 0,void 0,function*(){let e="/api/v1/pincode",n=new Headers;n.append("Accept","application/vnd.nebula-v2+json"),n.append("Content-Type","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return o.body=i,this.client.put(o)})}deleteSession(){return vs(this,void 0,void 0,function*(){let i="/api/v3/session",e=new Headers;e.append("Accept","application/vnd.nebula-v2+json");let n=this.client.getTokenProvider();e.append("Authorization",`Bearer ${yield n.provideSessionToken()}`);let r={url:i,headers:e};return this.client.delete(r)})}getConfig(i){return vs(this,void 0,void 0,function*(){let e=`/api/v2/bootstrap/config/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r={url:e,headers:n};return this.client.get(r).then(o=>uw(o))})}getSession(i){return vs(this,void 0,void 0,function*(){let e="/api/v5/session",n=new Headers;n.append("Accept","application/vnd.nebula-v2+json"),n.append("Content-Type","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideLoginToken()}`);let o={url:e,headers:n};return o.body=i,this.client.postJson(o).then(s=>Uw(s))})}getSwipeResponse(i){return vs(this,void 0,void 0,function*(){let e=`/api/v1/swipe/response/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return this.client.get(o).then(s=>gT(s))})}getTime(){return vs(this,void 0,void 0,function*(){let i="/api/v1/time",e=new Headers;e.append("Accept","application/vnd.nebula-v2+json");let n={url:i,headers:e};return this.client.get(n).then(r=>_T(r))})}pincode(i){return vs(this,void 0,void 0,function*(){let e="/api/v1/pincode",n=new Headers;n.append("Accept","application/vnd.nebula-v2+json"),n.append("Content-Type","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return o.body=i,this.client.postJson(o)})}postClientEvents(i){return vs(this,void 0,void 0,function*(){let e="/api/v1/log",n=new Headers;n.append("Accept","application/vnd.nebula-v2+json"),n.append("Content-Type","application/vnd.nebula-v2+json");let r={url:e,headers:n};return r.body=i,this.client.postJson(r)})}swipe(i,e){return vs(this,void 0,void 0,function*(){let n=`/api/v1/swipe/action/${encodeURIComponent(String(i))}`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o=this.client.getTokenProvider();r.append("Authorization",`Bearer ${yield o.provideSessionToken()}`);let s={url:n,headers:r};return s.body=e,this.client.postJson(s).then(a=>mT(a))})}};var So=function(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})},uh=class extends hn{filterChannels(i,e,n,r,o){return So(this,void 0,void 0,function*(){let s=new URLSearchParams;n?.forEach(d=>{s.append("categoryTag",d)}),r?.forEach(d=>{s.append("accessibilityOption",d)}),o!=null&&s.append("catalogId",o),s.append("from",jr(i)),s.append("until",jr(e));let a=`/epg/v5/channel-filter?${s.toString()}`,l=new Headers;l.append("Accept","application/vnd.nebula-v2+json");let c={url:a,headers:l};return this.client.get(c)})}getAllChannels(i,e,n){return So(this,void 0,void 0,function*(){let r=new URLSearchParams;r.append("platform",i),r.append("entitlementId",e),r.append("upsell",n);let o=`/epg/v6/channel?${r.toString()}`,s=new Headers;s.append("Accept","application/vnd.nebula-v2+json");let a={url:o,headers:s};return this.client.get(a).then(l=>l.map(c=>Iw(c)))})}getChannelLineup(i,e,n,r,o,s){return So(this,void 0,void 0,function*(){let a=new URLSearchParams;o!=null&&a.append("channelId",o),s!=null&&a.append("catalogId",s),a.append("platform",i),a.append("entitlementId",e),a.append("from",jr(n)),a.append("until",jr(r));let l=`/epg/v6/lineup?${a.toString()}`,c=new Headers;c.append("Accept","application/vnd.nebula-v2+json");let d={url:l,headers:c};return this.client.get(d).then(p=>Pw(p))})}getChannelLineupRibbon(i){return So(this,arguments,void 0,function*(e,n=0,r,o,s,a,l,c,d,p,y,b,T,W){let j=new URLSearchParams;p!=null&&j.append("adult",p),j.append("page",n),y!=null&&j.append("catalogId",y),b?.forEach(Se=>{j.append("categoryTag",Se)}),T?.forEach(Se=>{j.append("accessibilityOption",Se)}),W!=null&&j.append("filterPastReplay",W),j.append("extraData",r),j.append("sortBy",o),j.append("sortDir",s),j.append("platform",a),j.append("entitlementId",l),j.append("from",jr(c)),j.append("until",jr(d));let ee=`/epg/v5/cms/channel/${encodeURIComponent(String(e))}/lineup?${j.toString()}`,De=new Headers;De.append("Accept","application/vnd.nebula-v2+json");let tt={url:ee,headers:De};return this.client.get(tt).then(Se=>pi(Se))})}getEpgCategories(){return So(this,void 0,void 0,function*(){let i="/epg/v5/category",e=new Headers;e.append("Accept","application/vnd.nebula-v2+json");let n={url:i,headers:e};return this.client.get(n).then(r=>r.map(o=>Ou(o)))})}getProgram(i){return So(this,void 0,void 0,function*(){let e=`/epg/v5/program/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r={url:e,headers:n};return this.client.get(r).then(o=>Bw(o))})}getProgramLineup(i,e,n,r,o,s,a){return So(this,void 0,void 0,function*(){let l=new URLSearchParams;s!=null&&l.append("channelId",s),a!=null&&l.append("catalogId",a),l.append("platform",e),l.append("entitlementId",n),l.append("from",jr(r)),l.append("until",jr(o));let c=`/epg/v6/program/${encodeURIComponent(String(i))}/lineup?${l.toString()}`,d=new Headers;d.append("Accept","application/vnd.nebula-v2+json");let p={url:c,headers:d};return this.client.get(p).then(y=>jw(y))})}getSchedule(i,e,n){return So(this,void 0,void 0,function*(){let r=new URLSearchParams;r.append("platform",e),r.append("entitlementId",n);let o=`/epg/v6/schedule/${encodeURIComponent(String(i))}?${r.toString()}`,s=new Headers;s.append("Accept","application/vnd.nebula-v2+json");let a={url:o,headers:s};return this.client.get(a).then(l=>rT(l))})}getSeries(i){return So(this,void 0,void 0,function*(){let e=`/epg/v5/series/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r={url:e,headers:n};return this.client.get(r).then(o=>aT(o))})}getSeriesLineup(i,e,n,r,o,s,a){return So(this,void 0,void 0,function*(){let l=new URLSearchParams;s!=null&&l.append("channelId",s),a!=null&&l.append("catalogId",a),l.append("platform",e),l.append("entitlementId",n),l.append("from",jr(r)),l.append("until",jr(o));let c=`/epg/v6/series/${encodeURIComponent(String(i))}/lineup?${l.toString()}`,d=new Headers;d.append("Accept","application/vnd.nebula-v2+json");let p={url:c,headers:d};return this.client.get(p).then(y=>lT(y))})}};var sa=function(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}
1catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})},ph=class extends hn{cancelPurchase(i){return sa(this,void 0,void 0,function*(){let e=`/price/v5/purchase/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return this.client.delete(o)})}commitPurchase(i,e){return sa(this,void 0,void 0,function*(){let n=`/price/v5/purchase/${encodeURIComponent(String(i))}/commit`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o=this.client.getTokenProvider();r.append("Authorization",`Bearer ${yield o.provideSessionToken()}`);let s={url:n,headers:r};return s.body=e,this.client.postJson(s).then(a=>Sc(a))})}getProposedBundlePrice(i,e,n){return sa(this,void 0,void 0,function*(){let r=new URLSearchParams;r.append("platformType",e),r.append("entitlementId",n);let o=`/price/v5/bundle/${encodeURIComponent(String(i))}?${r.toString()}`,s=new Headers;s.append("Accept","application/vnd.nebula-v2+json");let a={url:o,headers:s};return this.client.get(a).then(l=>$w(l))})}getProposedVodPrice(i,e,n,r){return sa(this,void 0,void 0,function*(){let o=new URLSearchParams;o.append("platformType",e),o.append("entitlementId",n),o.append("catalogId",r);let s=`/price/v5/vod/${encodeURIComponent(String(i))}?${o.toString()}`,a=new Headers;a.append("Accept","application/vnd.nebula-v2+json");let l={url:s,headers:a};return this.client.get(l).then(c=>eT(c))})}getPurchases(i){return sa(this,void 0,void 0,function*(){let e=new URLSearchParams;i?.forEach(a=>{e.append("purchaseType",a)});let n=`/price/v5/purchase?${e.toString()}`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json");let o=this.client.getTokenProvider();r.append("Authorization",`Bearer ${yield o.provideSessionToken()}`);let s={url:n,headers:r};return this.client.get(s).then(a=>a.map(l=>Sc(l)))})}startBundlePurchase(i,e){return sa(this,void 0,void 0,function*(){let n=`/price/v5/bundle/${encodeURIComponent(String(i))}/rent`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o=this.client.getTokenProvider();r.append("Authorization",`Bearer ${yield o.provideSessionToken()}`);let s={url:n,headers:r};return s.body=e,this.client.postJson(s).then(a=>Sc(a))})}startVodPurchase(i,e){return sa(this,void 0,void 0,function*(){let n=`/price/v5/vod/${encodeURIComponent(String(i))}/rent`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o=this.client.getTokenProvider();r.append("Authorization",`Bearer ${yield o.provideSessionToken()}`);let s={url:n,headers:r};return s.body=e,this.client.postJson(s).then(a=>Sc(a))})}updatePurchase(i,e){return sa(this,void 0,void 0,function*(){let n=`/price/v5/purchase/${encodeURIComponent(String(i))}/update`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o=this.client.getTokenProvider();r.append("Authorization",`Bearer ${yield o.provideSessionToken()}`);let s={url:n,headers:r};return s.body=e,this.client.postJson(s).then(a=>Sc(a))})}};var fh=function(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})},DT=class extends hn{othersLikedEpg(i,e){return fh(this,arguments,void 0,function*(n,r,o=0,s,a,l,c,d){let p=new URLSearchParams;p.append("page",o),p.append("catalogId",s),p.append("platform",a),p.append("entitlementId",l),p.append("focusType",c),d!=null&&p.append("extraData",d);let y=`/srs/v2/recommendations/epg/othersliked/${encodeURIComponent(String(n))}/${encodeURIComponent(String(r))}?${p.toString()}`,b=new Headers;b.append("Accept","application/vnd.nebula-v2+json");let T={url:y,headers:b};return this.client.get(T).then(W=>pi(W))})}othersLikedVod(i,e){return fh(this,arguments,void 0,function*(n,r,o=0,s,a,l){let c=new URLSearchParams;c.append("page",o),c.append("catalogId",s),c.append("platform",a),l!=null&&c.append("extraData",l);let d=`/srs/v2/recommendations/vod/othersliked/${encodeURIComponent(String(n))}/${encodeURIComponent(String(r))}?${c.toString()}`,p=new Headers;p.append("Accept","application/vnd.nebula-v2+json");let y={url:d,headers:p};return this.client.get(y).then(b=>pi(b))})}similarEpg(i,e){return fh(this,arguments,void 0,function*(n,r,o=0,s,a,l,c,d){let p=new URLSearchParams;p.append("page",o),p.append("catalogId",s),p.append("platform",a),p.append("entitlementId",l),p.append("focusType",c),d!=null&&p.append("extraData",d);let y=`/srs/v2/recommendations/epg/similar/${encodeURIComponent(String(n))}/${encodeURIComponent(String(r))}?${p.toString()}`,b=new Headers;b.append("Accept","application/vnd.nebula-v2+json");let T={url:y,headers:b};return this.client.get(T).then(W=>pi(W))})}similarVod(i,e){return fh(this,arguments,void 0,function*(n,r,o=0,s,a,l){let c=new URLSearchParams;c.append("page",o),c.append("catalogId",s),c.append("platform",a),l!=null&&c.append("extraData",l);let d=`/srs/v2/recommendations/vod/similar/${encodeURIComponent(String(n))}/${encodeURIComponent(String(r))}?${c.toString()}`,p=new Headers;p.append("Accept","application/vnd.nebula-v2+json");let y={url:d,headers:p};return this.client.get(y).then(b=>pi(b))})}};var Jy=function(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}
1catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})},hh=class extends hn{getCompletions(i,e,n,r,o,s){return Jy(this,void 0,void 0,function*(){let a=new URLSearchParams;r!=null&&a.append("adult",r),a.append("catalogId",i),a.append("searchField",e),a.append("searchTerm",n),o?.forEach(y=>{a.append("filterField",y)}),s?.forEach(y=>{a.append("filterTerm",y)});let l=`/search/v5/vod/asset/complete?${a.toString()}`,c=new Headers;c.append("Accept","application/vnd.nebula-v2+json");let d=this.client.getTokenProvider();c.append("Authorization",`Bearer ${yield d.provideSessionToken()}`);let p={url:l,headers:c};return this.client.get(p)})}search(i,e,n,r){return Jy(this,arguments,void 0,function*(o,s,a,l,c=!0,d=0,p,y,b){let T=new URLSearchParams;T.append("term",o),y!=null&&T.append("adult",y),T.append("catalogId",s),T.append("platform",a),T.append("entitlementId",l),T.append("completions",c),T.append("page",d),T.append("extraData",p),b?.forEach(tt=>{T.append("type",tt)});let W=`/search/v3/search?${T.toString()}`,j=new Headers;j.append("Accept","application/vnd.nebula-v2+json");let ee=this.client.getTokenProvider();j.append("Authorization",`Bearer ${yield ee.provideSessionToken()}`);let De={url:W,headers:j};return this.client.get(De).then(tt=>sT(tt))})}vodSearch(i,e,n,r,o,s,a,l,c,d){return Jy(this,void 0,void 0,function*(){let p=new URLSearchParams;o!=null&&p.append("adult",o),p.append("catalogId",i),p.append("platform",e),p.append("entitlementId",n),p.append("extraData",r),s!=null&&p.append("searchTerm",s),a?.forEach(j=>{p.append("filterField",j)}),l?.forEach(j=>{p.append("filterTerm",j)}),c!=null&&p.append("sort",c),d!=null&&p.append("pageToken",d);let y=`/search/v5/vod/asset/cms/search?${p.toString()}`,b=new Headers;b.append("Accept","application/vnd.nebula-v2+json");let T=this.client.getTokenProvider();b.append("Authorization",`Bearer ${yield T.provideSessionToken()}`);let W={url:y,headers:b};return this.client.get(W).then(j=>vT(j))})}};var Wr=function(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})},mh=class extends hn{addWatchListStream(i,e){return Wr(this,void 0,void 0,function*(){let n=`/stream/v2/stream/${encodeURIComponent(String(i))}/asset/${encodeURIComponent(String(e))}/watchlist`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o={url:n,headers:r};return this.client.put(o)})}getBreakvertisement(i,e,n,r){return Wr(this,void 0,void 0,function*(){let o=new URLSearchParams;o.append("actionFilter",n),r!=null&&o.append("tzOffset",r);let s=`/stream/v3/stream/${encodeURIComponent(String(i))}/asset/${encodeURIComponent(String(e))}/break?${o.toString()}`,a=new Headers;a.append("Accept","application/vnd.nebula-v2+json");let l={url:s,headers:a};return this.client.get(l).then(c=>c.map(d=>aw(d)))})}getManifest(i,e){return Wr(this,void 0,void 0,function*(){let n=`/stream/v3/stream/${encodeURIComponent(String(i))}/asset/${encodeURIComponent(String(e))}/manifest`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json");let o={url:n,headers:r};return this.client.get(o).then(s=>dT(s))})}getStreamNextAsset(i,e){return Wr(this,void 0,void 0,function*(){let n=`/stream/v3/stream/${encodeURIComponent(String(i))}/asset/${encodeURIComponent(String(e))}/next-asset`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json");let o={url:n,headers:r};return this.client.get(o).then(s=>fT(s))})}keepAliveStream(i,e){return Wr(this,void 0,void 0,function*(){let n=`/stream/v3/stream/${encodeURIComponent(String(i))}/keepalive`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o={url:n,headers:r};return o.body=e,this.client.put(o)})}setBookmarkStream(i,e,n){return Wr(this,void 0,void 0,function*(){let r=`/stream/v2/stream/${encodeURIComponent(String(i))}/asset/${encodeURIComponent(String(e))}/bookmark`,o=new Headers;o.append("Accept","application/vnd.nebula-v2+json"),o.append("Content-Type","application/vnd.nebula-v2+json");let s={url:r,headers:o};return s.body=n,this.client.put(s)})}startReserved(i,e,n){return Wr(this,void 0,void 0,function*(){let r=`/stream/v2/stream/${encodeURIComponent(String(i))}/asset/${encodeURIComponent(String(e))}/commit`,o=new Headers;o.append("Accept","application/vnd.nebula-v2+json"),o.append("Content-Type","application/vnd.nebula-v2+json");let s={url:r,headers:o};return s.body=n,this.client.put(s)})}startStream(i){return Wr(this,void 0,void 0,function*(){let e="/stream/v3/stream",n=new Headers;n.append("Accept","application/vnd.nebula-v2+json"),n.append("Content-Type","application/vnd.nebula-v2+json");let r=this.client.getTokenProvider();n.append("Authorization",`Bearer ${yield r.provideSessionToken()}`);let o={url:e,headers:n};return o.body=i,this.client.postJson(o).then(s=>hT(s))})}stopStream(i){return Wr(this,void 0,void 0,function*(){let e=`/stream/v2/stream/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r={url:e,headers:n};return this.client.delete(r)})}updateStreamAsset(i,e){return Wr(this,void 0,void 0,function*(){let n=`/stream/v3/stream/${encodeURIComponent(String(i))}/asset`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json"),r.append("Content-Type","application/vnd.nebula-v2+json");let o={url:n,headers:r};return o.body=e,this.client.postJson(o).then(s=>lh(s))})}updateStreamOptions(i,e,n){return Wr(this,void 0,void 0,function*(){let r=`/stream/v2/stream/${encodeURIComponent(String(i))}/asset/${encodeURIComponent(String(e))}/option`,o=new Headers;o.append("Accept","application/vnd.nebula-v2+json"),o.append("Content-Type","application/vnd.nebula-v2+json");let s={url:r,headers:o};return s.body=n,this.client.put(s)})}};var Eo=function(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}
1catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})},gh=class extends hn{getBundleCmsAssets(i){return Eo(this,arguments,void 0,function*(e,n=0,r,o,s,a){let l=new URLSearchParams;a!=null&&l.append("adult",a),l.append("page",n),l.append("platformType",r),l.append("catalogId",o),l.append("extraData",s);let c=`/vod/v5/cms/bundle/${encodeURIComponent(String(e))}/asset?${l.toString()}`,d=new Headers;d.append("Accept","application/vnd.nebula-v2+json");let p={url:c,headers:d};return this.client.get(p).then(y=>pi(y))})}getProductionYears(i,e,n){return Eo(this,void 0,void 0,function*(){let r=new URLSearchParams;r.append("catalogId",i),e?.forEach(l=>{r.append("categoryTag",l)}),n!=null&&r.append("adult",n);let o=`/vod/v5/vod-production-year?${r.toString()}`,s=new Headers;s.append("Accept","application/vnd.nebula-v2+json");let a={url:o,headers:s};return this.client.get(a)})}getVodAsset(i){return Eo(this,void 0,void 0,function*(){let e=`/vod/v5/vod/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r={url:e,headers:n};return this.client.get(r).then(o=>ku(o))})}getVodBundle(i){return Eo(this,void 0,void 0,function*(){let e=`/vod/v5/bundle/${encodeURIComponent(String(i))}`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r={url:e,headers:n};return this.client.get(r).then(o=>mw(o))})}getVodCategories(i){return Eo(this,void 0,void 0,function*(){let e=new URLSearchParams;e.append("catalogId",i);let n=`/vod/v5/vod-category?${e.toString()}`,r=new Headers;r.append("Accept","application/vnd.nebula-v2+json");let o={url:n,headers:r};return this.client.get(o).then(s=>s.map(a=>Ou(a)))})}getVodCmsAssets(){return Eo(this,arguments,void 0,function*(i=0,e,n,r,o,s,a,l,c,d,p){let y=new URLSearchParams;a?.forEach(j=>{y.append("categoryTag",j)}),l!=null&&y.append("adult",l),y.append("page",i),y.append("platformType",e),y.append("catalogId",n),y.append("extraData",r),c!=null&&y.append("productionYear",c),d!=null&&y.append("minOperatorScore",d),p!=null&&y.append("maxOperatorScore",p),y.append("sortBy",o),y.append("sortDir",s);let b=`/vod/v5/cms/vod?${y.toString()}`,T=new Headers;T.append("Accept","application/vnd.nebula-v2+json");let W={url:b,headers:T};return this.client.get(W).then(j=>pi(j))})}getVodCmsEpisodes(i){return Eo(this,arguments,void 0,function*(e,n=0,r,o,s,a,l,c){let d=new URLSearchParams;l!=null&&d.append("adult",l),d.append("page",n),d.append("platformType",r),d.append("catalogId",o),c!=null&&d.append("extraData",c),d.append("sortBy",s),d.append("sortDir",a);let p=`/vod/v5/cms/${encodeURIComponent(String(e))}/episode?${d.toString()}`,y=new Headers;y.append("Accept","application/vnd.nebula-v2+json");let b={url:p,headers:y};return this.client.get(b).then(T=>pi(T))})}getVodEpisodes(i){return Eo(this,void 0,void 0,function*(){let e=`/vod/v5/vod/${encodeURIComponent(String(i))}/episode`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r={url:e,headers:n};return this.client.get(r).then(o=>o.map(s=>ku(s)))})}getVodNextAsset(i,e,n){return Eo(this,void 0,void 0,function*(){let r=new URLSearchParams;n!=null&&r.append("adult",n),r.append("catalogId",e);let o=`/vod/v5/vod/${encodeURIComponent(String(i))}/next-asset?${r.toString()}`,s=new Headers;s.append("Accept","application/vnd.nebula-v2+json");let a={url:o,headers:s};return this.client.get(a).then(l=>ku(l))})}getVodSeasons(i){return Eo(this,void 0,void 0,function*(){let e=`/vod/v5/vod/${encodeURIComponent(String(i))}/season`,n=new Headers;n.append("Accept","application/vnd.nebula-v2+json");let r={url:e,headers:n};return this.client.get(r).then(o=>o.map(s=>ku(s)))})}};var _h=class{constructor(i){this.bootstrapApp=i}fetchDiscovery(){let i=new Headers,e=new URLSearchParams;e.append("platform",this.bootstrapApp.platform),e.append("appVersion",this.bootstrapApp.appVersion),i.append("Accept","application/vnd.nebula-v2+json"),i.append("Content-Type","application/vnd.nebula-v2+json");let r={url:`${this.bootstrapApp.discoveryUrl}?${e.toString()}`,headers:i};return this.bootstrapApp.httpClient.get(r).then(o=>{this.discovery=o})}get environment(){var i,e;return(e=(i=this.discovery)===null||i===void 0?void 0:i.enviroment)!==null&&e!==void 0?e:""}get imageLocation(){var i,e;return(e=(i=this.discovery)===null||i===void 0?void 0:i.imageLocation)!==null&&e!==void 0?e:""}get location(){var i,e;return(e=(i=this.discovery)===null||i===void 0?void 0:i.location)!==null&&e!==void 0?e:""}get thumbnailLocation(){var i,e;return(e=(i=this.discovery)===null||i===void 0?void 0:i.thumbnailLocation)!==null&&e!==void 0?e:""}};var vh=class{constructor(i){this.settings=i}get httpClient(){return this.settings.httpClient}
1get discoveryUrl(){return this.settings.discoveryUrl}get platform(){return this.settings.platform}get appVersion(){return this.settings.appVersion}get fallbackConfig(){return this.settings.fallbackConfig}};var yh=class{constructor(i){this.bootstrapApp=i,this.settings=new Map,this.translations=new Map,this.genres=new Map,this.parentalRatings=new Map,this.contentDescriptions=new Map,this.apiApi=new Ic(this.bootstrapApp.httpClient),this.config=this.bootstrapApp.fallbackConfig,this.parseResponse(this.config)}fetchConfig(){return this.apiApi.getConfig(this.bootstrapApp.platform).then(i=>{this.config=i,this.parseResponse(i)}).catch(()=>{this.config=this.bootstrapApp.fallbackConfig,this.parseResponse(this.config)})}parseResponse(i){this.convert(i.globalSettings,this.settings),this.convert(i.appTranslations,this.translations),this.convert(i.genreTranslations,this.genres),this.convert(i.parentalRatingTranslations,this.parentalRatings),this.convert(i.contentDescriptionTranslations,this.contentDescriptions)}convert(i,e){e.clear(),i?.forEach(n=>e.set(n.name,n.value))}get anonymousSettings(){return this.config.anonymousConfig}genre(i){return this.genres.get(i)}get locale(){return this.config.locale}settingArray(i,e,n){let r=this.settingString(i,"");return r?r.split(",").map(e):n}settingBoolean(i,e){var n;let r=(n=this.settings.get(i))===null||n===void 0?void 0:n.toLowerCase();return r==="true"?!0:r==="false"?!1:e}settingNumber(i,e){let n=Number(this.settings.get(i));return isNaN(n)?e:n}settingString(i,e){var n;return(n=this.settings.get(i))!==null&&n!==void 0?n:e}translation(i,e){let n=this.translations.get(i);return n!==void 0||e&&(n=this.translations.get(e),n!==void 0)?n:`*${i}*`}contentDescription(i){let e=this.contentDescriptions.get(i);return e!==void 0?e:`*${i}*`}};var x=(function(t){return t.startupTimeDifference="startupTimeDifference",t.allowProfileSwitching="allowProfileSwitching",t.reminderBeforeTimes="reminderBeforeTimes",t.reminderDefaultBeforeTime="reminderDefaultBeforeTime",t.maxAllowedProfiles="maxAllowedProfiles",t.maxLengthProfileName="maxLengthProfileName",t.showAdultPage="showAdultPage",t.playerBreakvertisingTime="playerBreakvertisingTime",t.analyticsFlushPeriod="analyticsFlushPeriod",t.analyticsPostBatchSize="analyticsPostBatchSize",t.maxNrOfFailedAnalytics="maxNrOfFailedAnalytics",t.stackTraceMaximumLines="stackTraceMaximumLines",t.settingCacheExpiration="settingCacheExpiration",t.settingCacheErrorExpiration="settingCacheErrorExpiration",t.favoriteCacheExpiration="favoriteCacheExpiration",t.favoriteCacheErrorExpiration="favoriteCacheErrorExpiration",t.reminderCacheExpiration="reminderCacheExpiration",t.reminderCacheErrorExpiration="reminderCacheErrorExpiration",t.quoteCacheExpiration="quoteCacheExpiration",t.quoteCacheErrorExpiration="quoteCacheErrorExpiration",t.bookmarkCacheExpiration="bookmarkCacheExpiration",t.bookmarkCacheErrorExpiration="bookmarkCacheErrorExpiration",t.bookmarksMaximumPercent="bookmarksMaximumPercent",t.recordingCacheExpiration="recordingCacheExpiration",t.recordingCacheErrorExpiration="recordingCacheErrorExpiration",t.recordingAfterTimes="recordingAfterTimes",t.recordingBeforeTimes="recordingBeforeTimes",t.recordingDefaultBeforeTime="recordingDefaultBeforeTime",t.recordingDefaultAfterTime="recordingDefaultAfterTime",t.recordingDefaultDeleteProtection="recordingDefaultDeleteProtection",t.epgPastDays="epgPastDays",t.epgFutureDays="epgFutureDays",t.epgLiveThumbnailMaxDuration="epgLiveThumbnailMaxDuration",t.npvrRecordingAboutToExpireInterval="npvrRecordingAboutToExpireInterval",t.maxResolutionV2="maxResolutionV2",t.playerLivePauseResumeCompensation="playerLivePauseResumeCompensation",t.playerPauseStopPlayerTime="playerPauseStopPlayerTime",t.playerStillPlayingTime="playerStillPlayingTime",t.playerBookmarkTime="playerBookmarkTime",t.playerWatchlistTime="playerWatchlistTime",t.playerWatchlistTimeRandomMs="playerWatchlistTimeRandomMs",t.playerHideControlsPeriod="playerHideControlsPeriod",t.defaultKeepaliveTimeout="defaultKeepaliveTimeout",t.maxKeepAliveErrors="maxKeepAliveErrors",t.playerToLinearConfirmation="playerToLinearConfirmation",t.playerFastForwardVod="playerFastForwardVod",t.playerRewindVod="playerRewindVod",t.playerQualityHideFps="playerQualityHideFps",t.seekThumbnailsEnabled="seekThumbnailsEnabled",t.drmTodayUseStagingLicense="drmTodayUseStagingLicense",t.playerZapChannelRateLimit="playerZapChannelRateLimit",t.broadpeakAnalyticsEnabled="broadpeakAnalyticsEnabled",t.broadpeakAnalyticsServer="broadpeakAnalyticsServer",t.swipePollTimeout="swipePollTimeout",t.swipePollIncrement="swipePollIncrement",t.searchMinChars="searchMinChars",t.searchKeyTimeout="searchKeyTimeout",t.searchMaxSuggestionLength="searchMaxSuggestionLength",t.searchCompletionsKeyTimeout="searchCompletionsKeyTimeout",t.searchCompletionsMinChars="searchCompletionsMinChars",t.decimalCount="decimalCount",t.decimalDivi
1der="decimalDivider",t.showSeriesWatchButton="showSeriesWatchButton",t.showVodTitles="showVodTitles",t.showMiniDetailInsideDetail="showMiniDetailInsideDetail",t.showParentalIcons="showParentalIcons",t.showAccessibilityIcons="showAccessibilityIcons",t.useOldEpgCards="useOldEpgCards",t.allowUnauthenticatedUse="allowUnauthenticatedUse",t.chromeCast4kDevices="chromeCast4kDevices",t.displaySubtitleTeletextId="displaySubtitleTeletextId",t.broadpeakAnalyticsDomain="broadpeakAnalyticsDomain",t.airPlayEnabled="airPlayEnabled",t.chromeCastEnabled="chromeCastEnabled",t.unauthorizedAnalytics="unauthorizedAnalytics",t.playerInitialBitrate="playerInitialBitrate",t.playerInitialBitrate4K="playerInitialBitrate4K",t.defaultMaxLinearStreamTime="defaultMaxLinearStreamTime",t.restartLinearStreams="restartLinearStreams",t.restartLinearStreamFraction="restartLinearStreamFraction",t.continueWatchingBeforeStreamEndTime="continueWatchingBeforeStreamEndTime",t.continueWatchingPopupDuration="continueWatchingPopupDuration",t.propertiesRemindersRibbon="propertiesRemindersRibbon",t.propertiesListRibbon="propertiesListRibbon",t.propertiesEpgDetailEpisodesRibbon="propertiesEpgDetailEpisodesRibbon",t.propertiesEpgDetailSimilarRibbon="propertiesEpgDetailSimilarRibbon",t.propertiesEpgDetailOthersLikedRibbon="propertiesEpgDetailOthersLikedRibbon",t.propertiesRecordingEpisodesRibbon="propertiesRecordingEpisodesRibbon",t.propertiesRecordingsRibbon="propertiesRecordingsRibbon",t.propertiesVodFilteredRibbon="propertiesVodFilteredRibbon",t.propertiesVodDetailEpisodesRibbon="propertiesVodDetailEpisodesRibbon",t.propertiesVodDetailSimilarRibbon="propertiesVodDetailSimilarRibbon",t.propertiesVodDetailOthersLikedRibbon="propertiesVodDetailOthersLikedRibbon",t.propertiesBundleRibbon="propertiesBundleRibbon",t.propertiesBundleEpisodesRibbon="propertiesBundleEpisodesRibbon",t.clientAreaChangePasswordUrl="clientAreaChangePasswordUrl",t.clientAreaCustomerInvoicesUrl="clientAreaCustomerInvoicesUrl",t.clientAreaFaqUrl="clientAreaFaqUrl",t.privacyUrl="privacy_url",t.autoplayWatchingEnabledVod="autoplayWatchingEnabledVod",t.autoplayCustomerDefault="autoplayCustomerDefault",t.autoplayNextAssetInDetailPercent="autoplayNextAssetInDetailPercent",t.autoplayStartNextAssetTime="autoplayStartNextAssetTime",t.autoplayWatchingEnabledEpg="autoplayWatchingEnabledEpg",t.autoplayAutoStartInterval="autoplayAutoStartInterval",t.languageAudioOptions="languageAudioOptions",t.languageSubtitleOptions="languageSubtitleOptions",t.defaultAudioOption1="defaultAudioOption1",t.defaultAudioOption2="defaultAudioOption2",t.defaultSubtitleOption1="defaultSubtitleOption1",t.defaultSubtitleOption2="defaultSubtitleOption2",t.loginAllowedGrantTypes="loginAllowedGrantTypes",t.defaultIdentityProviderId="defaultIdentityProviderId",t.logoutRedirectParameter="logoutRedirectParameter",t.recentBookmarkCacheWindowMs="recentBookmarkCacheWindowMs",t.playerProgressUpdatePeriod="playerProgressUpdatePeriod",t.seekTimeout="seekTimeout",t.fastForwardStopTime="fastForwardStopTime",t.playerEpgBookmarkEndOffset="playerEpgBookmarkEndOffset",t.autoCloseMenuDelayV2="autoCloseMenuDelayV2",t.epgShowMiniGuideSeasonAndEpisode="epgShowMiniGuideSeasonAndEpisode",t.enablePurchases="enablePurchases",t.preferredDrmProvider="preferredDrmProvider",t.maxLinearStreamTimeOptions="maxLinearStreamTimeOptions",t.maxBackStackSize="maxBackStackSize",t.searchSettings="searchSettings",t.appAutoReloadAfterSeconds="appAutoReloadAfterSeconds",t})(x||{});var Nn=(function(t){return t.profile_new="profile_new",t.profile_add_title="profile_add_title",t.profile_edit_title="profile_edit_title",t.profile_property_name="profile_property_name",t.profile_property_avatar="profile_property_avatar",t.profile_property_catalog="profile_property_catalog",t.profile_delete_btn="profile_delete_btn",t.profile_cancel_btn="profile_cancel_btn",t.profile_create_btn="profile_create_btn",t.profile_save_btn="profile_save_btn",t.profile_delete_confirm="profile_delete_confirm",t.profile_error_name="profile_error_name",t.profile_error_name_length="profile_error_name_length",t.profiles_manage="profiles_manage",t.profile_login_request_popup_title="profile_login_request_popup_title",t.profile_logout_request_popup_title="profile_logout_request_popup_title",t.profile_property_name_placeholder="profile_property_name_placeholder",t.profile_select_title="profile_select_title",t.catalog_select_title="catalog_select_title",t})(Nn||{}),bh=(function(t){return t.login_login="login_login",t.login_logout="login_logout",t.login_name="login_name",t.login_password="login_password",t.login_extra_information="login_extra_information",t.login_btn_switch_to_credentials="login_btn_switch_to_credentials",t.login_btn_switch_to_qr_code="login_btn_switch_to_qr_code",t.login_btn_retry_qr_code="login_btn_retry_qr_code",t.login_hint_switch_to_credentials="login_hint_switch_to_credentials",t.login_activation_code_description="login_activation_code_description",t.login_user_code_popup_title="login_user_code_popup_title",t.login_user_code_popup_body="login_user_code_popup_body",t.login_user_code_page_title="login_user_code_page_title",t.login_user_code_success_page_title="login_user_code_success_page_title",t.login_user_code_success_page_body="login_user_code_success_page_body",t})(bh||{}),$t=(function(t){return t.settings_title_recording_npvr="settings_title_recording_npvr",t.settings_title_recordingdevice="settings_title_recordingdevice",t.settings_saved="settings_saved",t.settings_logout="settings_logout",t.settings_allow_adult_androidtv_title="settings_allow_adult_androidtv_title",t.setting_save_failed="setting_save_failed",t.settings_title_reminder="settings_title_reminder",t.settings_title_reminder_ott="settings_title_reminder_ott",t.settings_reminder_before_time="settings_reminder_before_time",t.settings_autoplay_title="settings_autoplay_title",t.settings_autoplay="settings_autoplay",t.settings_title_player="settings_title_player",t.settings_player_linear_session_max_duration="settings_player_linear_session_max_duration",t.settings_toggle_on="settings_toggle_on",t.settings_toggle_off="settings_toggle_off",t.settings_application_customer="settings_application_customer",t.settings_title_pincode="settings_title_pincode",t.settings_title_sub="settings_title_sub",t.settings_language_sub_1="settings_language_sub_1",t.settings_language_sub_2="settings_language_sub_2",t.settings_title_audio="settings_title_audio",t.settings_language_audio_1="settings_language_audio_1",t.settings_language_audio_2="settings_language_audio_2",t.settings_title_build_info="settings_title_build_info",t.settings_build_info_version_name="settings_build_info_version_name",t.settings_build_info_version_code="settings_build_info_version_code",t.settings_build_info_git_hash="settings_build_info_git_hash",t.settings_build_info_timestamp="settings_build_info_timestamp",t.settings_application_backend_env="settings_application_backend_env",t})($t||{}),dl=(function(t){return t.search_placeholder="search_placeholder",t.search_filter_time_range="search_filter_time_range",t})(dl||{}),ji=(function(t){return t.recordings_npvr_settopbox_name="recordings_npvr_settopbox_name",t.recordings_delete_all="recordings_delete_all",t.recordings_cancel_all="recordings_cancel_all",t.recordings_delete_all_confirm="recordings_delete_all_confirm",t.recordings_cancel_all_confirm="recordings_cancel_all_confirm",t.recordings_free_space_stb="recordings_free_space_stb",t.recordings_hours_available="recordings_hours_available",t.recordings_minutes_available="recordings_minutes_available",t.recordings_will_expire="recordings_will_expire",t})(ji||{}),Mt=(function(t){return t.player_ad_skip_seconds_ott="player_ad_skip_seconds_ott",t.player_ad_title="player_ad_title",t.player_ad_advertisement_count="player_ad_advertisement_count",t.player_ad_skip_now_ott="player_ad_skip_now_ott",t.player_ad_action_method_play_ott="player_ad_action_method_play_ott",t.player_ad_action_method_play_trailer_ott="player_ad_action_method_play_trailer_ott",t.player_ad_action_method_detail_ott="player_ad_action_method_detail_ott",t.player_quality_unit="player_quality_unit",t.player_quality_unit_fps="player_quality_unit_fps",t.player_quality_auto="player_quality_auto",t.player_subtitle_none="player_subtitle_none",t.live_indicator_text="live_indicator_text",t.player_controls_skip_button_seconds="player_controls_skip_button_seconds",t.player_controls_skip_button_minutes="player_controls_skip_button_minutes",t.player_controls_skip_button_minutes_and_seconds="player_controls_skip_button_minutes_and_seconds",t.player_settings_title="player_settings_title",t.player_settings_quality="player_settings_quality",t.player_settings_audio="player_settings_audio",t.player_settings_subtitle="player_settings_subtitle",t.player_settings_quality_title="player_settings_quality_title",t.player_settings_audio_title="player_settings_audio_title",t.player_settings_subtitles_title="player_settings_subtitles_title",t.player_audio_channels_2="player_audio_channels_2",t.player_audio_channels_6="player_audio_channels_6",t.player_language_xx="player_language_xx",t.player_subtitle_language_xx="player_subtitle_language_xx",t.player_audio_language_xx="player_audio_language_xx",t.player_subtitle_language_unknown="player_subtitle_language_unknown",t.player_audio_language_unknown="player_audio_language_unknown",t.player_disable_add_block="player_disable_add_block",t})(Mt||{}),Ye=(function(t){return t.mystuff_rec_no_planned_recordings="mystuff_rec_no_planned_recordings",t.mystuff_rec_no_expired="mystuff_rec_no_expired",t.mystuff_change_adult_pincode="mystuff_change_adult_pincode",t.mystuff_change_vod_pincode="mystuff_change_vod_pincode",t.mystuff_old_pincode="mystuff_old_pincode",t.mystuff_new_pincode="mystuff_new_pincode",t.mystuff_confirm_pincode="mystuff_confirm_pincode",t.mystuff_change_pincode="mystuff_change_pincode",t.mystuff_pincodes_must_match="mystuff_pincodes_must_match",t.mystuff_pincodechange_failed="mystuff_pincodechange_failed",t.mystuff_pincodechange_succes="mystuff_pincodechange_succes",t.mystuff_adult_settings="mystuff_adult_settings",t.mystuff_adultmode="mystuff_adultmode",t.mystuff_adultmode_save_btn="mystuff_adultmode_save_btn",t.mystuff_adultmode_successfully_saved="mystuff_adultmode_successfully_saved",t.mystuff_adultmode_stop="mystuff_adultmode_stop",t.mystuff_adultmode_activate="mystuff_adultmode_activate",t.mystuff_minutes="mystuff_minutes",t.mystuff_hour="mystuff_hour",t.mystuff_hours="mystuff_hours",t.mystuff_adultmode_never="mystuff_adultmode_never",t.mystuff_privacy="mystuff_privacy",t.mystuff_privacy_analytics="mystuff_privacy_analytics",t})(Ye||{}),Lu=(function(t){return t.client_area_change_password="client_area_change_password",t.client_area_customer_invoices="client_area_customer_invoices",t.client_area_faq="client_area_faq",t.client_area_title_privacy="client_area_title_privacy",t})(Lu||{}),Ch=(function(t){return t.android_tv_check_adult_mode_enabled="android_tv_check_adult_mode_enabled",t.android_tv_check_adult_mode_disabled="android_tv_check_adult_mode_disabled",t})(Ch||{}),Xy=(function(t){return t.cast_general_failure="cast_general_failure",t.casting_to_title_web="casting_to_title_web",t})(Xy||{}),ge=(function(t){return t.error_search_no_results="error_search_no_results",t.error_search_no_completions="error_search_no_completions",t.error_filter_no_results="error_filter_no_results",t.error_streaming="error_streaming",t.error_general="error_general",t.error_load_details="error_load_details",t.error_vod_expired="error_vod_expired",t.error_blackout="error_blackout",t.error_no_rights="error_no_rights",t.error_streaming_notsupported_os_browser_combination="error_streaming_notsupported_os_browser_combination",t.error_recording_start_failed="error_recording_start_failed",t.error_no_reminders="error_no_reminders",t.AA_INVALID_PINCODE="AA_INVALID_PINCODE",t.error_recording_no_recordings="error_recording_no_recordings",t.error_recording_no_conflicts="error_recording_no_conflicts",t.error_recording_edit_failed="error_recording_edit_failed",t.error_recording_delete_failed="error_recording_delete_failed",t.error_recording_cancel_failed="error_recording_cancel_failed",t.error_swipe="error_swipe",t.error_device_time="error_device_time",t.error_in_future="error_in_future",t.error_no_rentoptions="error_no_rentoptions",t.PRICING_COUPON_NOT_FOUND="PRICING_COUPON_NOT_FOUND",t.error_bundle_expired="error_bundle_expired",t.error_no_play_rights_vod="error_no_play_rights_vod",t.error_no_rights_detail_description="error_no_rights_detail_description",t.error_authentication_failed="error_authentication_failed",t.error_adult_mode_required="error_adult_mode_required",t.error_title="error_title",t.error_blackout_npvr_ott="error_blackout_npvr_ott",t.error_blackout_linear_ott="error_blackout_linear_ott",t.error_blackout_replay_ott="error_blackout_replay_ott",t.error_anonymous_stream_not_allowed="error_anonymous_stream_not_allowed",t.error_connectivity_lost="error_connectivity_lost",t.API_UNSUPPORTED_APP_VERSION="API_UNSUPPORTED_APP_VERSION",t.API_UNSUPPORTED_OS_VERSION="API_UNSUPPORTED_OS_VERSION",t.error_user="error_user",t.AA_PROFILE_IN_USE="AA_PROFILE_IN_USE",t.error_invalid_pin="error_invalid_pin",t.browser_not_supported_title="browser_not_supported_title",t.error_registration_expired="error_registration_expired",t.error_registration_access_de
1nied="error_registration_access_denied",t.error_identity_providers="error_identity_providers",t})(ge||{}),Hn=(function(t){return t.menu_lists="menu_lists",t.menu_guide="menu_guide",t.menu_settings="menu_settings",t.menu_recordings_recorded="menu_recordings_recorded",t.menu_recordings_planned="menu_recordings_planned",t.menu_recordings_conflicts="menu_recordings_conflicts",t.menu_recordings_expire="menu_recordings_expire",t.menu_reminders="menu_reminders",t.menu_clientarea="menu_clientarea",t.menu_item_more_info_title="menu_item_more_info_title",t})(Hn||{}),Io=(function(t){return t.ribbon_filter_category="ribbon_filter_category",t.ribbon_filter_year="ribbon_filter_year",t.ribbon_filter_rating="ribbon_filter_rating",t.ribbon_season_episode="ribbon_season_episode",t.ribbon_episode="ribbon_episode",t.ribbon_no_content_ott="ribbon_no_content_ott",t})(Io||{}),cr=(function(t){return t.lists_filter_day="lists_filter_day",t.lists_filter_channel="lists_filter_channel",t.lists_filter_category="lists_filter_category",t.lists_filter_accessibility="lists_filter_accessibility",t.lists_filter_all_value="lists_filter_all_value",t.lists_btn_clearfilters="lists_btn_clearfilters",t.error_filter_no_channel_for_filter="error_filter_no_channel_for_filter",t})(cr||{}),wo=(function(t){return t.guide_filter_title="guide_filter_title",t.guide_adult_title="guide_adult_title",t.guide_no_information="guide_no_information",t})(wo||{}),pe=(function(t){return t.detail_duration_min="detail_duration_min",t.detail_actors="detail_actors",t.detail_directors="detail_directors",t.detail_season="detail_season",t.detail_episode="detail_episode",t.detail_tab_episodes="detail_tab_episodes",t.detail_tab_related="detail_tab_related",t.detail_watch_from_beginning="detail_watch_from_beginning",t.detail_watch_from_bookmark="detail_watch_from_bookmark",t.detail_imdb_rating="detail_imdb_rating",t.detail_available_until="detail_available_until",t.detail_gratis="detail_gratis",t.detail_episode_short="detail_episode_short",t.detail_btn_rent_now="detail_btn_rent_now",t.detail_btn_series="detail_btn_series",t.detail_recommended_others_watched="detail_recommended_others_watched",t.detail_recommended_more_like_this="detail_recommended_more_like_this",t.detail_enter_pincode="detail_enter_pincode",t.detail_enter_pincode_adult="detail_enter_pincode_adult",t.detail_btn_trailer="detail_btn_trailer",t.detail_watch_live="detail_watch_live",t.detail_share_using="detail_share_using",t.detail_tab_recordings="detail_tab_recordings",t.detail_recording_start="detail_recording_start",t.detail_recording_delete="detail_recording_delete",t.detail_recording_cancel="detail_recording_cancel",t.detail_recording_delete_protected="detail_recording_delete_protected",t.detail_recording_this_episode="detail_recording_this_episode",t.detail_recording_this_season="detail_recording_this_season",t.detail_recording_this_series="detail_recording_this_series",t.detail_recording_episodes="detail_recording_episodes",t.detail_recording_stb="detail_recording_stb",t.detail_recording_change_rec_option_before="detail_recording_change_rec_option_before",t.detail_recording_change_rec_option_after="detail_recording_change_rec_option_after",t.detail_planned_on="detail_planned_on",t.detail_recorded_on="detail_recorded_on",t.detail_btn_recording_edit="detail_btn_recording_edit",t.detail_btn_record_record="detail_btn_record_record",t.detail_recording_delete_confirm="detail_recording_delete_confirm",t.detail_swipe_this_device="detail_swipe_this_device",t.detail_adult_warning="detail_adult_warning",t.detail_vouchercoupon="detail_vouchercoupon",t.detail_claimvoucher_title="detail_claimvoucher_title",t.detail_price="detail_price",t.detail_stb_fallback_name="detail_stb_fallback_name",t.detail_included_in_subscriptions="detail_included_in_subscriptions",t.detail_available_in_subscription="detail_available_in_subscription",t.detail_included_in_subscriptions_on_stb="detail_included_in_subscriptions_on_stb",t.detail_included_in_bundle="detail_included_in_bundle",t.detail_btn_bundle="detail_btn_bundle",t.detail_succes_swipe="detail_succes_swipe",t.detail_succes_rent_bundle="detail_succes_rent_bundle",t.detail_tab_included_in_bundle="detail_tab_included_in_bundle",t.detail_free_to_watch="detail_free_to_watch",t.detail_recording_cancel_popup_title="detail_recording_cancel_popup_title",t.detail_recording_cancel_program="detail_recording_cancel_program",t.detail_recording_cancel_season="detail_recording_cancel_season",t.detail_recording_cancel_series="detail_recording_cancel_series",t.detail_recording_record_popup_t
1itle="detail_recording_record_popup_title",t.detail_recording_delete_popup_title="detail_recording_delete_popup_title",t.detail_btn_purchase="detail_btn_purchase",t.detail_btn_watch_now="detail_btn_watch_now",t.detail_btn_all_episodes="detail_btn_all_episodes",t.detail_recording_edit_popup_title="detail_recording_edit_popup_title",t.detail_watch_popup_title="detail_watch_popup_title",t.detail_season_short="detail_season_short",t.detail_favorite="detail_favorite",t.detail_unfavorite="detail_unfavorite",t.detail_favorite_channel="detail_favorite_channel",t.detail_unfavorite_channel="detail_unfavorite_channel",t.detail_btn_show_details="detail_btn_show_details",t.detail_btn_set_reminder="detail_btn_set_reminder",t.detail_btn_remove_reminder="detail_btn_remove_reminder",t.detail_btn_more_info="detail_btn_more_info",t.detail_lineup_header_position="detail_lineup_header_position",t.detail_lineup_header_horse="detail_lineup_header_horse",t.detail_lineup_header_rider="detail_lineup_header_rider",t.detail_tab_more_info="detail_tab_more_info",t.detail_upsell_information="detail_upsell_information",t.detail_extra_information="detail_extra_information",t.detail_legs="detail_legs",t})(pe||{}),ni=(function(t){return t.popup_btn_cancel="popup_btn_cancel",t.popup_btn_ok="popup_btn_ok",t.popup_btn_confirm="popup_btn_confirm",t.popup_reminder_text="popup_reminder_text",t.popup_reminder_title="popup_reminder_title",t.popup_pincode_stayinadultmode="popup_pincode_stayinadultmode",t.popup_still_watching_body="popup_still_watching_body",t.popup_still_watching_btn_continue="popup_still_watching_btn_continue",t.popup_exit_title="popup_exit_title",t.popup_reminder_option_details="popup_reminder_option_details",t.popup_qr_code_instructions="popup_qr_code_instructions",t})(ni||{}),Fe=(function(t){return t.time_day_short_mon="time_day_short_mon",t.time_day_short_tue="time_day_short_tue",t.time_day_short_wed="time_day_short_wed",t.time_day_short_thu="time_day_short_thu",t.time_day_short_fri="time_day_short_fri",t.time_day_short_sat="time_day_short_sat",t.time_day_short_sun="time_day_short_sun",t.time_month_short_january="time_month_short_january",t.time_month_short_february="time_month_short_february",t.time_month_short_march="time_month_short_march",t.time_month_short_april="time_month_short_april",t.time_month_short_may="time_month_short_may",t.time_month_short_june="time_month_short_june",t.time_month_short_july="time_month_short_july",t.time_month_short_august="time_month_short_august",t.time_month_short_september="time_month_short_september",t.time_month_short_october="time_month_short_october",t.time_month_short_november="time_month_short_november",t.time_month_short_december="time_month_short_december",t.time_today="time_today",t.time_tomorrow="time_tomorrow",t.time_yesterday="time_yesterday",t.time_day_monday="time_day_monday",t.time_day_tuesday="time_day_tuesday",t.time_day_wednesday="time_day_wednesday",t.time_day_thursday="time_day_thursday",t.time_day_friday="time_day_friday",t.time_day_saturday="time_day_saturday",t.time_day_sunday="time_day_sunday",t.time_minutes_short="time_minutes_short",t.time_duration_hours="time_duration_hours",t.time_day="time_day",t.time_month="time_month",t.time_year="time_year",t})(Fe||{}),Sh=(function(t){return t.autoplay_start_in_seconds="autoplay_start_in_seconds",t.autoplay_start_manually="autoplay_start_manually",t})(Sh||{}),Fu=(function(t){return t.accessibility_audio_description="accessibility_audio_description",t.accessibility_sign_language="accessibility_sign_language",t.accessibility_subtitles="accessibility_subtitles",t})(Fu||{});var Vu=(function(t){return t.date_picker_type_dialog_title="date_picker_type_dialog_title",t.date_picker_type_date="date_picker_type_date",t.date_picker_type_period="date_picker_type_period",t.date_picker_from_date="date_picker_from_date",t.date_picker_to_date="date_picker_to_date",t})(Vu||{});var OL=(function(t){return t.action_checkbox_toggled_off="action_checkbox_toggled_off",t.action_checkbox_toggled_on="action_checkbox_toggled_on",t.action_favorite_added="action_favorite_added",t.action_favorite_removed="action_favorite_removed",t.action_password_hidden="action_password_hidden",t.action_password_shown="action_password_shown",t.action_reminder_added="action_reminder_added",t.action_reminder_removed="action_reminder_removed",t.autoplay_poster="autoplay_poster",t.banner="banner",t.btn_clear_filter="btn_clear_filter",t.btn_clear_filters="btn_clear_filters",t.btn_close="btn_close",t.btn_favorite_add="bt
1n_favorite_add",t.btn_favorite_remove="btn_favorite_remove",t.btn_general="btn_general",t.btn_reminder_add="btn_reminder_add",t.btn_reminder_remove="btn_reminder_remove",t.btn_share="btn_share",t.btn_swipe_stb="btn_swipe_stb",t.btn_watch="btn_watch",t.channel_number_and_name="channel_number_and_name",t.checkbox_general="checkbox_general",t.checkbox_value_off="checkbox_value_off",t.checkbox_value_on="checkbox_value_on",t.date_picker_end_date="date_picker_end_date",t.date_picker_start_date="date_picker_start_date",t.focus_position_column="focus_position_column",t.focus_position_general="focus_position_general",t.focus_position_row="focus_position_row",t.focus_position_row_column="focus_position_row_column",t.icon_age="icon_age",t.icon_audio_description="icon_audio_description",t.icon_parental_rating_coarse_language="icon_parental_rating_coarse_language",t.icon_parental_rating_discrimination="icon_parental_rating_discrimination",t.icon_parental_rating_drugs="icon_parental_rating_drugs",t.icon_parental_rating_fear="icon_parental_rating_fear",t.icon_parental_rating_sex="icon_parental_rating_sex",t.icon_parental_rating_violence="icon_parental_rating_violence",t.icon_play="icon_play",t.icon_play_swipe="icon_play_swipe",t.icon_recording_conflict="icon_recording_conflict",t.icon_recording_delete_all="icon_recording_delete_all",t.icon_recording_error="icon_recording_error",t.icon_recording_folder="icon_recording_folder",t.icon_recording_in_progress="icon_recording_in_progress",t.icon_recording_in_progress_conflict="icon_recording_in_progress_conflict",t.icon_recording_locked="icon_recording_locked",t.icon_recording_planned="icon_recording_planned",t.icon_recording_recorded="icon_recording_recorded",t.icon_replay="icon_replay",t.icon_replay_swipe="icon_replay_swipe",t.icon_resolution_4k="icon_resolution_4k",t.icon_resolution_hd="icon_resolution_hd",t.icon_sign_language="icon_sign_language",t.icon_subtitles="icon_subtitles",t.includes="includes",t.input_field_characters_amount="input_field_characters_amount",t.input_field_description="input_field_description",t.input_field_general="input_field_general",t.keyboard="keyboard",t.keyboard_btn_backspace="keyboard_btn_backspace",t.keyboard_btn_done="keyboard_btn_done",t.keyboard_btn_lowercase="keyboard_btn_lowercase",t.keyboard_btn_numbers="keyboard_btn_numbers",t.keyboard_btn_space="keyboard_btn_space",t.keyboard_btn_symbols="keyboard_btn_symbols",t.keyboard_btn_uppercase="keyboard_btn_uppercase",t.login_btn_hide_password="login_btn_hide_password",t.login_btn_show_password="login_btn_show_password",t.login_qrcode="login_qrcode",t.main_navigation="main_navigation",t.menu="menu",t.menu_item_catalog="menu_item_catalog",t.menu_item_profile="menu_item_profile",t.mini_guide="mini_guide",t.operator_score="operator_score",t.player_btn_next_event="player_btn_next_event",t.player_btn_pause="player_btn_pause",t.player_btn_play="player_btn_play",t.player_btn_previous_event="player_btn_previous_event",t.player_btn_settings="player_btn_settings",t.player_btn_skip_backward="player_btn_skip_backward",t.player_btn_skip_forward="player_btn_skip_forward",t.profile_avatar="profile_avatar",t.profile_btn_create="profile_btn_create",t.profile_btn_edit="profile_btn_edit",t.profile_icon="profile_icon",t.profile_switch="profile_switch",t.progress_bookmark_value="progress_bookmark_value",t.progress_live_value="progress_live_value",t.progress_value_completed="progress_value_completed",t.reminder="reminder",t.remote_control_select_activate="remote_control_select_activate",t.schedule_start_and_end_time="schedule_start_and_end_time",t.score="score",t.seekbar="seekbar",t.seekbar_progress_value="seekbar_progress_value",t.sub_navigation="sub_navigation",t.symbol_and="symbol_and",t.symbol_arrow_down="symbol_arrow_down",t.symbol_arrow_up="symbol_arrow_up",t.symbol_at="symbol_at",t.symbol_backtick="symbol_backtick",t.symbol_backward_slash="symbol_backward_slash",t.symbol_caret="symbol_caret",t.symbol_colon="symbol_colon",t.symbol_comma="symbol_comma",t.symbol_dash="symbol_dash",t.symbol_dollar="symbol_dollar",t.symbol_double_quotation_mark="symbol_double_quotation_mark",t.symbol_equals="symbol_equals",t.symbol_exclamation_mark="symbol_exclamation_mark",t.symbol_forward_slash="symbol_forward_slash",t.symbol_greater_than="symbol_greater_than",t.symbol_hashtag="symbol_hashtag",t.symbol_left_curly_bracket="symbol_left_curly_bracket",t.symbol_left_parenthesis="symbol_left_parenthesis",t.symbol_left_square_bracket="symbol_left_square_bracket",t.symbol_less_than="symbol_less_than",t.symbol_percent="symbol_percent",t.symbol_period="symbol_period",t.symbol_plus="symbol_plus",t.symbol_question_mark="symbol_question_mark",t.symbol_right_curly_bracket="symbol_right_curly_bracket",t.symbol_right_parenthesis="symbol_right_parenthesis",t.symbol_right_square_bracket="symbol_right_square_bracket",t.symbol_semicolon="symbol_semicolon",t.symbol_single_quotation_mark="symbol_single_quotation_mark",t.symbol_star="symbol_star",t.symbol_tilde="symbol_tilde",t.symbol_underscore="symbol_underscore",t.symbol_vertical_line="symbol_vertical_line",t.top_10_number="top_10_number",t.value_general="value_general",t.value_none="value_none",t.zapping_bar="zapping_bar",t})(OL||{});function AT(t){let i=new vh(t),e=new _h(i),n=new yh(i);return{app:i,discovery:e,config:n}}var Eh=class{constructor(i){this.pricingApi=new ph(i)}cancelPurchase(i){return this.pricingApi.cancelPurchase(i)}commitPurchase(i,e){return this.pricingApi.commitPurchase(i,e)}getProposedBundlePrice(i,e,n){return this.pricingApi.getProposedBundlePrice(i,e,n)}getProposedVodPrice(i,e,n,r){return this.pricingApi.getProposedVodPrice(i,e,n,r)}getPurchases(i){return this.pricingApi.getPurchases(i)}startBundlePurchase(i,e){return this.pricingApi.startBundlePurchase(i,e)}startVodPurchase(i,e){return this.pricingApi.startVodPurchase(i,e)}updatePurchase(i,e){return this.pricingApi.updatePurchase(i,e)}};function RT(t){return{pricing:new Eh(t)}}function Ih(t){let i=Date.now();return t.filter(e=>e.validFrom.getTime()<=i&&i<e.validUntil.getTime())}function wh(t){let i;
1return t.forEach(e=>{(!i||i.validUntil<e.validUntil)&&(i=e)}),i}var Th=class{constructor(i){this.config=i,this._cache=[],this.cacheExpiration=0,this.lastUpdate=0,this.activePromise=void 0,this.reloadingCache=!1,this.defaultExpiration=6e5,this.errorExpiration=3e5}updateExpirations(i,e){this.defaultExpiration=this.config.settingNumber(i,6e5),this.errorExpiration=this.config.settingNumber(e,3e5)}checkCache(i){return new Date().getTime()>this.lastUpdate+this.cacheExpiration||i?this.activePromise||this.fillCache():Promise.resolve(this._cache)}addToCache(i){this._cache.push(i)}fillCache(){return this.activePromise=this._fillCache().then(i=>(this.clearCache(),this._cache=i,this.lastUpdate=new Date().getTime(),this.cacheExpiration=this.defaultExpiration,i)).catch(i=>{throw this.lastUpdate=new Date().getTime(),this.cacheExpiration=this.errorExpiration,i}).finally(()=>{this.reloadingCache=!1,this.activePromise=void 0}),this.activePromise}clearCache(){this.reloadingCache||(this._cache=[],this.lastUpdate=0,this.cacheExpiration=0,this.reloadingCache=!0)}};var Dh=class extends Th{constructor(i,e){super(i),this.pricingApi=e,this.resetSettings()}resetSettings(){this.updateExpirations(x.quoteCacheExpiration,x.quoteCacheErrorExpiration)}_fillCache(){return this.resetSettings(),this.pricingApi.getPurchases()}list(i=!1){return this.checkCache(i)}};function xT(t,i){return{purchase:new Dh(t.config,i.pricing)}}function wc(t){switch(t){case In.SD:return 0;case In.HD:return 1;case In.UHD_4K:return 2}}function PT(t){let i=Date.now();return t.validFrom&&i<t.validFrom.getTime()?!1:!t.validUntil||i<t.validUntil.getTime()}var ul=class{constructor(i,e){this.stream=i,this.purchases=e}get purchaseId(){var i,e;return(e=(i=this.purchases)===null||i===void 0?void 0:i[0])===null||e===void 0?void 0:e.purchaseId}get purchasePrice(){return this.stream.price}get streamId(){return this.stream.streamId}get streamType(){return this.stream.contentType}get resolution(){return this.stream.resolution}get isTrailer(){return this.stream.streamType===lr.TRAILER}get hasBundlePurchase(){return!!this.purchases&&this.purchases.some(i=>i.purchaseType===cl.BUNDLE)}purchasesForType(i){var e,n;return(n=(e=this.purchases)===null||e===void 0?void 0:e.filter(r=>r.purchaseType===i))!==null&&n!==void 0?n:[]}},Ah=class{constructor(i,e,n,r){this.price=i,this.trailerStreams=e,this.fullStreams=n,this._upsell=r}updateStreams(i,e,n){this.reset(),this.trailerStreams=i,this.fullStreams=e,this._upsell=n}updateFullStreams(i){this.fullStreams=i}reset(){this.trailerStreams=[],this.fullStreams=void 0,this._upsell=void 0}hasWatchableOttSVOD(){var i,e,n;return this.canWatch()&&((n=(e=(i=this.fullStreams)===null||i===void 0?void 0:i.watchable)===null||e===void 0?void 0:e.some(r=>r.streamType===q.SVOD))!==null&&n!==void 0?n:!1)}hasWatchableOttTVOD(){var i,e,n;return this.canWatch()&&((n=(e=(i=this.fullStreams)===null||i===void 0?void 0:i.watchable)===null||e===void 0?void 0:e.some(r=>r.streamType===q.TVOD))!==null&&n!==void 0?n:!1)}hasWatchableOttFVOD(){var i,e,n;return this.canWatch()&&((n=(e=(i=this.fullStreams)===null||i===void 0?void 0:i.watchable)===null||e===void 0?void 0:e.some(r=>r.streamType===q.FVOD))!==null&&n!==void 0?n:!1)}hasTrailer(){return this.trailerStreams.length>0}canRent(){return this.ottStreamsLeftToRent()}canWatch(){var i;return!!(!((i=this.fullStreams)===null||i===void 0)&&i.watchable)&&this.fullStreams.watchable.length>0}get watchableOttStream(){var i,e;return(e=(i=this.fullStreams)===null||i===void 0?void 0:i.watchable)===null||e===void 0?void 0:e[0]}ottStreamsLeftToRent(){return this.rentableOttStreams.length>0}get rentableOttStreams(){var i,e;let n=(e=(i=this.fullStreams)===null||i===void 0?void 0:i.rentable)!==null&&e!==void 0?e:[],r=this.highestWatchableResolution;return r?n.filter(o=>wc(o.resolution)>wc(r)):n}get highestWatchableResolution(){var i,e;return MT((e=(i=this.fullStreams)===null||i===void 0?void 0:i.watchable)!==null&&e!==void 0?e:[])}get highestRentableResolution(){var i,e;return MT((e=(i=this.fullStreams)===null||i===void 0?void 0:i.rentable)!==null&&e!==void 0?e:[])}get canWatchBecauseOfBundle(){var i,e,n;return(n=(e=(i=this.fullStreams)===null||i===void 0?void 0:i.watchable)===null||e===void 0?void 0:e.some(r=>r.hasBundlePurchase))!==null&&n!==void 0?n:!1}getLongestPurchaseForType(i){var e,n;let r=[];return(n=(e=this.fullStreams)===null||e===void 0?void 0:e.watchable)===null||n===void 0||n.forEac
1h(o=>{r.push(...o.purchasesForType(i))}),wh(r)}getBundle(i){var e,n;return(n=(e=this.price.upsell)===null||e===void 0?void 0:e.bundles)===null||n===void 0?void 0:n.find(r=>r.bundleId===i)}get upsell(){return this._upsell}get bundles(){var i,e;return(e=(i=this.price.upsell)===null||i===void 0?void 0:i.bundles)!==null&&e!==void 0?e:[]}};function pl(t,i){return wc(i)-wc(t)}function MT(t){if(t.length!==0)return t.reduce((i,e)=>wc(e.resolution)>wc(i)?e.resolution:i,In.SD)}var Rh=class{constructor(i,e,n){this.pricingApi=i,this.purchaseCache=e,this.app=n}createRightsForVod(i,e,n,r){let o=r?this.purchaseCache.list():Promise.resolve([]);return Promise.all([this.pricingApi.getProposedVodPrice(i.assetId,this.app.platform,n,e),o]).then(([s,a])=>this.checkRights(i,s,a))}refreshPurchases(i,e,n){return this.purchaseCache.list(n).then(r=>{var o,s,a,l;let c=this.checkTrailerStreams(e.price),d=this.checkFullStreams(i,e.price,r),p=(l=(a=(s=(o=e.price.upsell)===null||o===void 0?void 0:o.products)===null||s===void 0?void 0:s[0])===null||a===void 0?void 0:a.products)===null||l===void 0?void 0:l[0];e.updateStreams(c,d,p)})}refreshForRecentPurchase(i,e,n){let r=this.checkFullStreams(i,e.price,[n]);e.updateFullStreams(r)}checkRights(i,e,n){var r,o,s,a;let l=this.checkTrailerStreams(e),c=this.checkFullStreams(i,e,n),d=(a=(s=(o=(r=e.upsell)===null||r===void 0?void 0:r.products)===null||o===void 0?void 0:o[0])===null||s===void 0?void 0:s.products)===null||a===void 0?void 0:a[0];return new Ah(e,l,c,d)}checkTrailerStreams(i){var e;let n=[];return(e=i.streams)===null||e===void 0||e.forEach(r=>{r.streamType===lr.TRAILER&&n.push(new ul(r))}),n.sort((r,o)=>pl(r.resolution,o.resolution))}checkFullStreams(i,e,n){var r,o;let s=(o=(r=e.streams)===null||r===void 0?void 0:r.filter(y=>y.streamType===lr.FULL))!==null&&o!==void 0?o:[];if(s.length===0)return;let a=[],l=[],c=[],d=PT(i);return s.forEach(y=>{var b;let T=this.getPurchasesForStream(i.assetId,y,(b=e.upsell)===null||b===void 0?void 0:b.bundles,n);T.length>0?l.push(new ul(y,T)):d&&(y.contentType===q.TVOD?a.push(new ul(y)):c.push(new ul(y)))}),{watchable:l.length>0?l.sort((y,b)=>pl(y.resolution,b.resolution)):c.sort((y,b)=>pl(y.resolution,b.resolution)),rentable:a.sort((y,b)=>pl(y.resolution,b.resolution))}}getPurchasesForStream(i,e,n,r){let o=Ih(r),s=o.filter(a=>{var l;return a.purchaseType===cl.TVOD&&a.resourceId===i&&((l=a.items)===null||l===void 0?void 0:l.some(c=>c.itemId===e.streamId))});return n&&n.forEach(a=>{a.resolutions&&s.push(...o.filter(l=>{var c;return l.resourceId===a.bundleId&&((c=l.items)===null||c===void 0?void 0:c.some(d=>{var p;return(p=a.resolutions)===null||p===void 0?void 0:p.some(y=>d.itemId===y.resolutionId)}))}))}),s.sort((a,l)=>l.validUntil.getTime()-a.validUntil.getTime())}};var xh=class{constructor(i,e){this.purchaseCache=i,this.pricingApi=e}startVodPurchase(i,e,n){let r={catalogId:e,deviceId:n};return this.pricingApi.startVodPurchase(i,r).then(o=>(this._pendingPurchase=o,o))}startBundlePurchase(i,e,n){let r={catalogId:e,deviceId:n};return this.pricingApi.startBundlePurchase(i,r).then(o=>(this._pendingPurchase=o,o))}activateCoupon(i){if(!this._pendingPurchase)throw new Error("No pending purchase");let e={code:i};return this.pricingApi.updatePurchase(this._pendingPurchase.purchaseId,e).then(n=>(this._pendingPurchase=n,n))}cancel(){return this._pendingPurchase?this.pricingApi.cancelPurchase(this._pendingPurchase.purchaseId).then(()=>{this._pendingPurchase=void 0}):Promise.resolve(void 0)}commit(i,e){if(!this._pendingPurchase)throw new Error("No pending purchase");let n={itemId:i,pinCode:e};return this.pricingApi.commitPurchase(this._pendingPurchase.purchaseId,n).then(r=>(this._pendingPurchase=void 0,this.purchaseCache.addToCache(r),r))}vodRentOptions(i){if(!this._pendingPurchase)return[];let e=this._pendingPurchase,n=[];return i.forEach(r=>{var o;let s=(o=e.items)===null||o===void 0?void 0:o.find(a=>a.itemId===r.streamId);s&&n.push({itemId:s.itemId,resolution:r.resolution,purchaseType:e.purchaseType,price:s.price,resourceId:r.streamId,allowDiscount:s.price.customer>0})}),n}
1bundleRentOptions(i){if(!this._pendingPurchase)return[];let e=this._pendingPurchase,n=[];return i.forEach(r=>{var o;let s=(o=e.items)===null||o===void 0?void 0:o.find(a=>a.itemId===r.resolutionId);s&&n.push({itemId:s.itemId,resolution:r.resolution,purchaseType:e.purchaseType,price:s.price,resourceId:r.resolutionId,allowDiscount:s.price.customer>0})}),n}get pendingPurchase(){return this._pendingPurchase}};var Tc=class{constructor(i,e,n){this._resolution=i,this._purchases=e,this._price=n}get resolution(){return this._resolution.resolution}get streamType(){return this._resolution.contentType}get purchases(){return this._purchases}get price(){return this._price}get resolutionId(){return this._resolution.resolutionId}},Uu=class{constructor(i,e,n){this.price=i,this.rentable=e,this.watchable=n}updateRights(i,e){this.rentable=i,this.watchable=e}get hasSvodResolution(){return this.watchable.some(i=>i.streamType===q.SVOD)}get hasFvodResolution(){return this.watchable.some(i=>i.streamType===q.FVOD)}get hasStreamsToRent(){return this.rentable.length>0}get longestPurchase(){let i=[];return this.watchable.forEach(e=>i.push(...e.purchases)),wh(i)}get rentableResolutions(){return this.rentable}};function OT(t){let i=Date.now();return t.validFrom&&i<t.validFrom.getTime()?!1:!t.validUntil||i<t.validUntil.getTime()}var Mh=class{constructor(i,e,n){this.pricingApi=i,this.purchaseCache=e,this.app=n}createRightsForBundle(i,e){return Promise.all([this.pricingApi.getProposedBundlePrice(i.bundleId,this.app.platform,e),this.purchaseCache.list()]).then(([n,r])=>this.checkRights(i,n,r))}refreshPurchases(i,e,n){return this.purchaseCache.list(n).then(r=>{var o;let s=this.groupResolutions(i,(o=e.price.resolutions)!==null&&o!==void 0?o:[],r);e.updateRights(s.rentable,s.watchable)})}checkRights(i,e,n){var r;if(e.resolutions){let o=this.groupResolutions(i,(r=e.resolutions)!==null&&r!==void 0?r:[],n);return new Uu(e,o.rentable,o.watchable)}return new Uu(e,[],[])}groupResolutions(i,e,n){let r=e.sort((c,d)=>pl(c.resolution,d.resolution)),o=Ih(n).filter(c=>c.purchaseType===cl.BUNDLE),s=OT(i),a=[],l=[];return r.forEach(c=>{if(c.contentType===q.TVOD){let d=this.matchingPurchases(o,i.bundleId,c.resolutionId);d.length>0?a.push(new Tc(c,d,c.price)):s&&a.length===0&&c.price&&l.push(new Tc(c,[],c.price))}else(c.contentType===q.SVOD||c.contentType===q.FVOD)&&a.push(new Tc(c,[]))}),{watchable:a,rentable:l}}matchingPurchases(i,e,n){return i.filter(r=>{var o;return r.resourceId===e&&((o=r.items)===null||o===void 0?void 0:o.some(s=>s.itemId===n))})}};function NT(t,i,e){return{vod:new Rh(i.pricing,e.purchase,t.app),purchase:new xh(e.purchase,i.pricing),bundle:new Mh(i.pricing,e.purchase,t.app)}}var Ph=class{constructor(i){this.bootstrap=AT(i)}get api(){return this._api||(this._api=RT(this.bootstrap.app.httpClient)),this._api}get cache(){return this._cache||(this._cache=xT(this.bootstrap,this.api)),this._cache}get rights(){return this._rights||(this._rights=NT(this.bootstrap,this.api,this.cache)),this._rights}};var ii=null,Oh=!1,Ky=1,NL=null,mn=Symbol("SIGNAL");function Ie(t){let i=ii;return ii=t,i}function Nh(){return ii}var aa={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function la(t){if(Oh)throw new Error("");if(ii===null)return;ii.consumerOnSignalRead(t);let i=ii.producersTail;if(i!==void 0&&i.producer===t)return;let e,n=ii.recomputing;if(n&&(e=i!==void 0?i.nextProducer:ii.producers,e!==void 0&&e.producer===t)){ii.producersTail=e,e.lastReadVersion=t.version;return}let r=t.consumersTail;if(r!==void 0&&r.consumer===ii&&(!n||LL(r,ii)))return;let o=Ac(ii),s={producer:t,consumer:ii,nextProducer:e,prevConsumer:r,lastReadVersion:t.version,nextConsumer:void 0};ii.producersTail=s,i!==void 0?i.nextProducer=s:ii.producers=s,o&&VT(t,s)}function kT(){Ky++}function ml(t){if(!(Ac(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===Ky)){if(!t.producerMustRecompute(t)&&!Bu(t)){Dc(t);return}t.producerRecomputeValue(t),Dc(t)}}function e0(t){if(t.consumers===void 0)return;let i=Oh;Oh=!0;try{for(let e=t.consumers;e!==void 0;e=e.nextConsumer){let n=e.consumer;n.dirty||kL(n)}}finally{Oh=i}}function t0(){return ii?.consumerAllowSignalWrites!==!1}function kL(t){t.dirty=!0,e0(t),t.consumerMarkedDirty?.(t)}function Dc(t){t.dirty=!1,t.lastCleanEpoch=Ky}function ca(t){return t&&LT(t),Ie(t)}function LT(t){t.producersTail=void 0,t.recomputing=!0}function gl(t,i){Ie(i),t&&FT(t)}function FT(t){t.recomputing=!1;let i=t.producersTail,e=i!==void 0?i.nextProducer:t.producers;if(e!==void 0){if(Ac(t))do e=n0(e);while(e!==void 0);i!==void 0?i.nextProducer=void 0:t.producers=void 0}}function Bu(t){for(let i=t.producers;i!==void 0;i=i.nextProducer){let e=i.producer,n=i.lastReadVersion;if(n!==e.version||(ml(e),n!==e.version))return!0}return!1}function _l(t){if(Ac(t)){let i=t.producers;for(;i!==void 0;)i=n0(i)}t.producers=void 0,t.producersTail=void 0,t.consumers=void 0,t.consumersTail=void 0}function VT(t,i){let e=t.consumersTail,n=Ac(t);if(e!==void 0?(i.nextConsumer=e.nextConsumer,e.nextConsumer=i):(i.nextConsumer=void 0,t.consumers=i),i.prevConsumer=e,t.consumersTail=i,!n)for(let r=t.producers;r!==void 0;r=r.nextProducer)VT(r.producer,r)}function n0(t){let i=t.producer,e=t.nextProducer,n=t.nextConsumer,r=t.prevConsumer;if(t.nextConsumer=void 0,t.prevConsumer=void 0,n!==void 0?n.prevConsumer=r:i.consumersTail=r,r!==void 0)r.nextConsumer=n;else if(i.consumers=n,!Ac(i)){let o=i.producers;for(;o!==void 0;)o=n0(o)}return e}function Ac(t){return t.consumerIsAlwaysLive||t.consumers!==void 0}function ju(t){NL?.(t)}function LL(t,i){let e=i.producersTail;if(e!==void 0){let n=i.producers;do{if(n===t)return!0;
vendor: 5,084 bytes, lines 1-3
1if(n===e)break;n=n.nextProducer}while(n!==void 0)}return!1}function Hu(t,i){return Object.is(t,i)}function $u(t,i){let e=Object.create(FL);e.computation=t,i!==void 0&&(e.equal=i);let n=()=>{if(ml(e),la(e),e.value===To)throw e.error;return e.value};return n[mn]=e,ju(e),n}var fl=Symbol("UNSET"),hl=Symbol("COMPUTING"),To=Symbol("ERRORED"),FL=ve(F({},aa),{value:fl,dirty:!0,error:null,equal:Hu,kind:"computed",producerMustRecompute(t){return t.value===fl||t.value===hl},producerRecomputeValue(t){if(t.value===hl)throw new Error("");let i=t.value;t.value=hl;let e=ca(t),n,r=!1;try{n=t.computation(),Ie(null),r=i!==fl&&i!==To&&n!==To&&t.equal(i,n)}catch(o){n=To,t.error=o}finally{gl(t,e)}if(r){t.value=i;return}t.value=n,t.version++}});function VL(){throw new Error}var UT=VL;function BT(t){UT(t)}function i0(t){UT=t}var UL=null;function r0(t,i){let e=Object.create(Lh);e.value=t,i!==void 0&&(e.equal=i);let n=()=>jT(e);return n[mn]=e,ju(e),[n,s=>da(e,s),s=>kh(e,s)]}function jT(t){return la(t),t.value}function da(t,i){t0()||BT(t),t.equal(t.value,i)||(t.value=i,BL(t))}function kh(t,i){t0()||BT(t),da(t,i(t.value))}var Lh=ve(F({},aa),{equal:Hu,value:void 0,kind:"signal"});function BL(t){t.version++,kT(),e0(t),UL?.(t)}var o0=ve(F({},aa),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function s0(t){if(t.dirty=!1,t.version>0&&!Bu(t))return;t.version++;let i=ca(t);try{t.cleanup(),t.fn()}finally{gl(t,i)}}function xe(t){return typeof t=="function"}function Rc(t){let e=t(n=>{Error.call(n),n.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Fh=Rc(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:
2${e.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
3  `)}`:"",this.name="UnsubscriptionError",this.errors=e});function vl(t,i){if(t){let e=t.indexOf(i);0<=e&&t.splice(e,1)}}var gn=class t{constructor(i){this.initialTeardown=i,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let i;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:n}=this;if(xe(n))try{n()}catch(o){i=o instanceof Fh?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{HT(o)}catch(s){i=i??[],s instanceof Fh?i=[...i,...s.errors]:i.push(s)}}if(i)throw new Fh(i)}}add(i){var e;if(i&&i!==this)if(this.closed)HT(i);else{if(i instanceof t){if(i.closed||i._hasParent(this))return;i._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(i)}}_hasParent(i){let{_parentage:e}=this;return e===i||Array.isArray(e)&&e.includes(i)}_addParent(i){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(i),e):e?[e,i]:i}_removeParent(i){let{_parentage:e}=this;e===i?this._parentage=null:Array.isArray(e)&&vl(e,i)}remove(i){let{_finalizers:e}=this;e&&vl(e,i),i instanceof t&&i._removeParent(this)}};gn.EMPTY=(()=>{let t=new gn;return t.closed=!0,t})();var a0=gn.EMPTY;function Vh(t){return t instanceof gn||t&&"closed"in t&&xe(t.remove)&&xe(t.add)&&xe(t.unsubscribe)}function HT(t){xe(t)?t():t.unsubscribe()}var zr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var xc={setTimeout(t,i,...e){let{delegate:n}=xc;return n?.setTimeout?n.setTimeout(t,i,...e):setTimeout(t,i,...e)},clearTimeout(t){let{delegate:i}=xc;return(i?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Uh(t){xc.setTimeout(()=>{let{onUnhandledError:i}=zr;if(i)i(t);else throw t})}function yl(){}var $T=l0("C",void 0,void 0);function GT(t){return l0("E",void 0,t)}function WT(t){return l0("N",t,void 0)}function l0(t,i,e){return{kind:t,value:i,error:e}}var bl=null;function Mc(t){if(zr.useDeprecatedSynchronousErrorHandling){let i=!bl;if(i&&(bl={errorThrown:!1,error:null}),t(),i){let{errorThrown:e,error:n}=bl;if(bl=null,e)throw n}}else t()}function zT(t){zr.useDeprecatedSynchronousErrorHandling&&bl&&(bl.errorThrown=!0,bl.error=t)}var Cl=class extends gn{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,Vh(i)&&i.add(this)):this.destination=$L}static create(i,e,n){return new qr(i,e,n)}next(i){this.isStopped?d0(WT(i),this):this._next(i)}error(i){this.isStopped?d0(GT(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?d0($T,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(i){this.destination.next(i)}_error(i){try{this.destination.error(i)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},jL=Function.prototype.bind;function c0(t,i){return jL.call(t,i)}var u0=class{constructor(i){this.partialObserver=i}next(i){let{partialObserver:e}=this;if(e.next)try{e.next(i)}catch(n){Bh(n)}}error(i){let{partialObserver:e}=this;if(e.error)try{e.error(i)}catch(n){Bh(n)}else Bh(i)}complete(){let{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(e){Bh(e)}}}
vendor: 5,963 bytes, line 3
3,qr=class extends Cl{constructor(i,e,n){super();let r;if(xe(i)||!i)r={next:i??void 0,error:e??void 0,complete:n??void 0};else{let o;this&&zr.useDeprecatedNextContext?(o=Object.create(i),o.unsubscribe=()=>this.unsubscribe(),r={next:i.next&&c0(i.next,o),error:i.error&&c0(i.error,o),complete:i.complete&&c0(i.complete,o)}):r=i}this.destination=new u0(r)}};function Bh(t){zr.useDeprecatedSynchronousErrorHandling?zT(t):Uh(t)}function HL(t){throw t}function d0(t,i){let{onStoppedNotification:e}=zr;e&&xc.setTimeout(()=>e(t,i))}var $L={closed:!0,next:yl,error:HL,complete:yl};var Pc=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Hi(t){return t}function p0(...t){return f0(t)}function f0(t){return t.length===0?Hi:t.length===1?t[0]:function(e){return t.reduce((n,r)=>r(n),e)}}var Re=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let n=new t;return n.source=this,n.operator=e,n}subscribe(e,n,r){let o=WL(e)?e:new qr(e,n,r);return Mc(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return n=qT(n),new n((r,o)=>{let s=new qr({next:a=>{try{e(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)}[Pc](){return this}pipe(...e){return f0(e)(this)}toPromise(e){return e=qT(e),new e((n,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>n(o))})}}return t.create=i=>new t(i),t})();function qT(t){var i;return(i=t??zr.Promise)!==null&&i!==void 0?i:Promise}function GL(t){return t&&xe(t.next)&&xe(t.error)&&xe(t.complete)}function WL(t){return t&&t instanceof Cl||GL(t)&&Vh(t)}function zL(t){return xe(t?.lift)}function Ge(t){return i=>{if(zL(i))return i.lift(function(e){try{return t(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function je(t,i,e,n,r){return new h0(t,i,e,n,r)}var h0=class extends Cl{constructor(i,e,n,r,o,s){super(i),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(l){i.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){i.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){i.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((i=this.onFinalize)===null||i===void 0||i.call(this))}}};var YT=Rc(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Ot=(()=>{class t extends Re{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let n=new jh(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new YT}next(e){Mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(e)}})}error(e){Mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){Mc(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:n,isStopped:r,observers:o}=this;return n||r?a0:(this.currentObservers=null,o.push(e),new gn(()=>{this.currentObservers=null,vl(o,e)}))}_checkFinalizedStatuses(e){let{hasError:n,thrownError:r,isStopped:o}=this;n?e.error(r):o&&e.complete()}asObservable(){let e=new Re;return e.source=this,e}}return t.create=(i,e)=>new jh(i,e),t})(),jh=class extends Ot{constructor(i,e){super(),this.destination=i,this.source=e}next(i){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.next)===null||n===void 0||n.call(e,i)}error(i){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.error)===null||n===void 0||n.call(e,i)}complete(){var i,e;(e=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||e===void 0||e.call(i)}_subscribe(i){var e,n;return(n=(e=this.source)===null||e===void 0?void 0:e.subscribe(i))!==null&&n!==void 0?n:a0}};var qt=class extends Ot{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){let e=super._subscribe(i);return!e.closed&&i.next(this._value),e}getValue(){let{hasError:i,thrownError:e,_value:n}=this;if(i)throw e;return this._throwIfClosed(),n}next(i){super.next(this._value=i)}};var Gu={now(){return(Gu.delegate||Date).now()},delegate:void 0};var wn=class extends Ot{constructor(i=1/0,e=1/0,n=Gu){super(),this._bufferSize=i,this._windowTime=e,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,i),this._windowTime=Math.max(1,e)}next(i){let{isStopped:e,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;e||(n.push(i),!r&&n.push(o.now()+s)),this._trimBuffer(),super.next(i)}_subscribe(i){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(i),{_infiniteTimeWindow:n,_buffer:r}=this,o=r.slice();for(let s=0;s<o.length&&!i.closed;s+=n?1:2)i.next(o[s]);return this._checkFinalizedStatuses(i),e}_trimBuffer(){let{_bufferSize:i,_timestampProvider:e,_buffer:n,_infiniteTimeWindow:r}=this,o=(r?1:2)*i;if(i<1/0&&o<n.length&&n.splice(0,n.length-o),!r){let s=e.now(),a=0;for(let l=1;l<n.length&&n[l]<=s;l+=2)a=l;a&&n.splice(0,a+1)}}};var Hh=class extends gn{constructor(i,e){super()}schedule(i,e=0){return this}};
vendor: 4,291 bytes, line 3
3var Wu={setInterval(t,i,...e){let{delegate:n}=Wu;return n?.setInterval?n.setInterval(t,i,...e):setInterval(t,i,...e)},clearInterval(t){let{delegate:i}=Wu;return(i?.clearInterval||clearInterval)(t)},delegate:void 0};var $h=class extends Hh{constructor(i,e){super(i,e),this.scheduler=i,this.work=e,this.pending=!1}schedule(i,e=0){var n;if(this.closed)return this;this.state=i;let r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,e)),this.pending=!0,this.delay=e,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(o,this.id,e),this}requestAsyncId(i,e,n=0){return Wu.setInterval(i.flush.bind(i,this),n)}recycleAsyncId(i,e,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return e;e!=null&&Wu.clearInterval(e)}execute(i,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(i,e);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(i,e){let n=!1,r;try{this.work(i)}catch(o){n=!0,r=o||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:i,scheduler:e}=this,{actions:n}=e;this.work=this.state=this.scheduler=null,this.pending=!1,vl(n,this),i!=null&&(this.id=this.recycleAsyncId(e,i,null)),this.delay=null,super.unsubscribe()}}};var Oc=class t{constructor(i,e=t.now){this.schedulerActionCtor=i,this.now=e}schedule(i,e=0,n){return new this.schedulerActionCtor(this,i).schedule(n,e)}};Oc.now=Gu.now;var Gh=class extends Oc{constructor(i,e=Oc.now){super(i,e),this.actions=[],this._active=!1}flush(i){let{actions:e}=this;if(this._active){e.push(i);return}let n;this._active=!0;do if(n=i.execute(i.state,i.delay))break;while(i=e.shift());if(this._active=!1,n){for(;i=e.shift();)i.unsubscribe();throw n}}};var ys=new Gh($h),QT=ys;var kn=new Re(t=>t.complete());function Wh(t){return t&&xe(t.schedule)}function m0(t){return t[t.length-1]}function zh(t){return xe(m0(t))?t.pop():void 0}function Do(t){return Wh(m0(t))?t.pop():void 0}function ZT(t,i){return typeof m0(t)=="number"?t.pop():i}function XT(t,i,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(p){s(p)}}function l(d){try{c(n.throw(d))}catch(p){s(p)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(t,i||[])).next())})}function JT(t){var i=typeof Symbol=="function"&&Symbol.iterator,e=i&&t[i],n=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function Sl(t){return this instanceof Sl?(this.v=t,this):new Sl(t)}function KT(t,i,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(t,i||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(b){return function(T){return Promise.resolve(T).then(b,p)}}function a(b,T){n[b]&&(r[b]=function(W){return new Promise(function(j,ee){o.push([b,W,j,ee])>1||l(b,W)})},T&&(r[b]=T(r[b])))}function l(b,T){try{c(n[b](T))}catch(W){y(o[0][3],W)}}function c(b){b.value instanceof Sl?Promise.resolve(b.value.v).then(d,p):y(o[0][2],b)}function d(b){l("next",b)}function p(b){l("throw",b)}function y(b,T){b(T),o.shift(),o.length&&l(o[0][0],o[0][1])}}function eD(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t[Symbol.asyncIterator],e;return i?i.call(t):(t=typeof JT=="function"?JT(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(o){e[o]=t[o]&&function(s){return new Promise(function(a,l){s=t[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var Nc=t=>t&&typeof t.length=="number"&&typeof t!="function";function qh(t){return xe(t?.then)}function Yh(t){return xe(t[Pc])}function Qh(t){return Symbol.asyncIterator&&xe(t?.[Symbol.asyncIterator])}function Zh(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invali
3d object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function qL(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Jh=qL();function Xh(t){return xe(t?.[Jh])}function Kh(t){return KT(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:n,done:r}=yield Sl(e.read());if(r)return yield Sl(void 0);yield yield Sl(n)}}finally{e.releaseLock()}})}function em(t){return xe(t?.getReader)}function at(t){if(t instanceof Re)return t;if(t!=null){if(Yh(t))return YL(t);if(Nc(t))return QL(t);if(qh(t))return ZL(t);if(Qh(t))return tD(t);if(Xh(t))return JL(t);if(em(t))return XL(t)}throw Zh(t)}function YL(t){return new Re(i=>{let e=t[Pc]();if(xe(e.subscribe))return e.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function QL(t){return new Re(i=>{for(let e=0;e<t.length&&!i.closed;e++)i.next(t[e]);i.complete()})}function ZL(t){return new Re(i=>{t.then(e=>{i.closed||(i.next(e),i.complete())},e=>i.error(e)).then(null,Uh)})}function JL(t){return new Re(i=>{for(let e of t)if(i.next(e),i.closed)return;i.complete()})}function tD(t){return new Re(i=>{KL(t,i).catch(e=>i.error(e))})}function XL(t){return tD(Kh(t))}function KL(t,i){var e,n,r,o;return XT(this,void 0,void 0,function*(){try{for(e=eD(t);n=yield e.next(),!n.done;){let s=n.value;if(i.next(s),i.closed)return}}catch(s){r={error:s}}finally{try{n&&!n.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}i.complete()})}function wi(t,i,e,n=0,r=!1){let o=i.schedule(function(){e(),r?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!r)return o}function tm(t,i=0){return Ge((e,n)=>{e.subscribe(je(n,r=>wi(n,t,()=>n.next(r),i),()=>wi(n,t,()=>n.complete(),i),r=>wi(n,t,()=>n.error(r),i)))})}function nm(t,i=0){return Ge((e,n)=>{n.add(t.schedule(()=>e.subscribe(n),i))})}function nD(t,i){return at(t).pipe(nm(i),tm(i))}function iD(t,i){return at(t).pipe(nm(i),tm(i))}function rD(t,i){return new Re(e=>{let n=0;return i.schedule(function(){n===t.length?e.complete():(e.next(t[n++]),e.closed||this.schedule())})})}function oD(t,i){return new Re(e=>{let n;return wi(e,i,()=>{n=t[Jh](),wi(e,i,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(s){e.error(s);return}o?e.complete():e.next(r)},0,!0)}),()=>xe(n?.return)&&n.return()})}function im(t,i){if(!t)throw new Error("Iterable cannot be null");return new Re(e=>{wi(e,i,()=>{let n=t[Symbol.asyncIterator]();wi(e,i,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function sD(t,i){return im(Kh(t),i)}function aD(t,i){if(t!=null){if(Yh(t))return nD(t,i);if(Nc(t))return rD(t,i);if(qh(t))return iD(t,i);if(Qh(t))return im(t,i);if(Xh(t))return oD(t,i);if(em(t))return sD(t,i)}throw Zh(t)}function re(t,i){return i?aD(t,i):at(t)}function C(...t){let i=Do(t);return re(t,i)}function g0(t,i){let e=xe(t)?t:()=>t,n=r=>r.error(e());return new Re(i?r=>i.schedule(n,0,r):n)}function rm(t){return!!t&&(t instanceof Re||xe(t.lift)&&xe(t.subscribe))}var bs=Rc(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Cs(t,i){let e=typeof i=="object";return new Promise((n,r)=>{let o=new qr({next:s=>{n(s),o.unsubscribe()},error:r,complete:()=>{e?n(i.defaultValue):r(new bs)}});t.subscribe(o)})}function lD(t){return t instanceof Date&&!isNaN(t)}function P(t,i){return Ge((e,n)=>{let r=0;e.subscribe(je(n,o=>{n.next(t.call(i,o,r++))}))})}var{isArray:eF}=Array;function tF(t,i){return eF(i)?t(...i):t(i)}function kc(t){return P(i=>tF(t,i))}var{isArray:nF}=Array,{getPrototypeOf:iF,prototype:rF,keys:oF}=Object;function om(t){if(t.length===1){let i=t[0];if(nF(i))return{args:i,keys:null};if(sF(i)){let e=oF(i);return{args:e.map(n=>i[n]),keys:e}}}return{args:t,keys:null}}function sF(t){return t&&typeof t=="object"&&iF(t)===rF}function sm(t,i){return t.reduce((e,n,r)=>(e[n]=i[r],e),{})}function am(...t){let i=Do(t),e=zh(t),{args:n,keys:r}=om(t);if(n.length===0)return re([],i);let o=new Re(aF(n,i,r?s=>sm(r,s):Hi));return e?o.pipe(kc(e)):o}function aF(t,i,e=Hi){return n=>{cD(i,()=>{let{length:r}=t,o=new Array(r),s=r,a=r;for(let l=0;l<r;l++)cD(i,()=>{let c=re(t[l],i),d=!1;c.subscribe(je(n,p=>{o[l]=p,d||(d=!0,a--),a||n.next(e(o.slice()))},()=>{--s||n.complete()}
vendor: 4,678 bytes, line 3
3))},n)},n)}}function cD(t,i,e){t?wi(e,t,i):i()}function dD(t,i,e,n,r,o,s,a){let l=[],c=0,d=0,p=!1,y=()=>{p&&!l.length&&!c&&i.complete()},b=W=>c<n?T(W):l.push(W),T=W=>{o&&i.next(W),c++;let j=!1;at(e(W,d++)).subscribe(je(i,ee=>{r?.(ee),o?b(ee):i.next(ee)},()=>{j=!0},void 0,()=>{if(j)try{for(c--;l.length&&c<n;){let ee=l.shift();s?wi(i,s,()=>T(ee)):T(ee)}y()}catch(ee){i.error(ee)}}))};return t.subscribe(je(i,b,()=>{p=!0,y()})),()=>{a?.()}}function _n(t,i,e=1/0){return xe(i)?_n((n,r)=>P((o,s)=>i(n,o,r,s))(at(t(n,r))),e):(typeof i=="number"&&(e=i),Ge((n,r)=>dD(n,r,t,e)))}function Ao(t=1/0){return _n(Hi,t)}function uD(){return Ao(1)}function ua(...t){return uD()(re(t,Do(t)))}function zu(t){return new Re(i=>{at(t()).subscribe(i)})}function We(...t){let i=zh(t),{args:e,keys:n}=om(t),r=new Re(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d<s;d++){let p=!1;at(e[d]).subscribe(je(o,y=>{p||(p=!0,c--),a[d]=y},()=>l--,void 0,()=>{(!l||!p)&&(c||o.next(n?sm(n,a):a),o.complete())}))}});return i?r.pipe(kc(i)):r}var lF=["addListener","removeListener"],cF=["addEventListener","removeEventListener"],dF=["on","off"];function Gt(t,i,e,n){if(xe(e)&&(n=e,e=void 0),n)return Gt(t,i,e).pipe(kc(n));let[r,o]=fF(t)?cF.map(s=>a=>t[s](i,a,e)):uF(t)?lF.map(pD(t,i)):pF(t)?dF.map(pD(t,i)):[];if(!r&&Nc(t))return _n(s=>Gt(s,i,e))(at(t));if(!r)throw new TypeError("Invalid event target");return new Re(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return r(a),()=>o(a)})}function pD(t,i){return e=>n=>t[e](i,n)}function uF(t){return xe(t.addListener)&&xe(t.removeListener)}function pF(t){return xe(t.on)&&xe(t.off)}function fF(t){return xe(t.addEventListener)&&xe(t.removeEventListener)}function $i(t=0,i,e=QT){let n=-1;return i!=null&&(Wh(i)?e=i:n=i),new Re(r=>{let o=lD(t)?+t-e.now():t;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=n?this.schedule(void 0,n):r.complete())},o)})}function qu(t=0,i=ys){return t<0&&(t=0),$i(t,t,i)}function Yr(...t){let i=Do(t),e=ZT(t,1/0),n=t;return n.length?n.length===1?at(n[0]):Ao(e)(re(n,i)):kn}var{isArray:hF}=Array;function fD(t){return t.length===1&&hF(t[0])?t[0]:t}function ke(t,i){return Ge((e,n)=>{let r=0;e.subscribe(je(n,o=>t.call(i,o,r++)&&n.next(o)))})}function lm(...t){return t=fD(t),t.length===1?at(t[0]):new Re(mF(t))}function mF(t){return i=>{let e=[];for(let n=0;e&&!i.closed&&n<t.length;n++)e.push(at(t[n]).subscribe(je(i,r=>{if(e){for(let o=0;o<e.length;o++)o!==n&&e[o].unsubscribe();e=null}i.next(r)})))}}function z(t){return Ge((i,e)=>{let n=null,r=!1,o;n=i.subscribe(je(e,void 0,void 0,s=>{o=at(t(s,z(t)(i))),n?(n.unsubscribe(),n=null,o.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(e))})}function dr(t,i){return xe(i)?_n(t,i,1):_n(t,1)}function Ti(t,i=ys){return Ge((e,n)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,n.next(c)}};function l(){let c=s+t,d=i.now();if(d<c){r=this.schedule(void 0,c-d),n.add(r);return}a()}e.subscribe(je(n,c=>{o=c,s=i.now(),r||(r=i.schedule(l,t),n.add(r))},()=>{a(),n.complete()},void 0,()=>{o=r=null}))})}function Di(t){return Ge((i,e)=>{let n=!1;i.subscribe(je(e,r=>{n=!0,e.next(r)},()=>{n||e.next(t),e.complete()}))})}function hi(t){return t<=0?()=>kn:Ge((i,e)=>{let n=0;i.subscribe(je(e,r=>{++n<=t&&(e.next(r),t<=n&&e.complete())}))})}function hD(){return Ge((t,i)=>{t.subscribe(je(i,yl))})}function mD(t){return P(()=>t)}function _0(t,i){return i?e=>ua(i.pipe(hi(1),hD()),e.pipe(_0(t))):_n((e,n)=>at(t(e,n)).pipe(hi(1),mD(e)))}function v0(t,i=ys){let e=$i(t,i);return _0(()=>e)}function ur(t,i=Hi){return t=t??gF,Ge((e,n)=>{let r,o=!0;e.subscribe(je(n,s=>{let a=i(s);(o||!t(r,a))&&(o=!1,r=a,n.next(s))}))})}function gF(t,i){return t===i}function gD(t=_F){return Ge((i,e)=>{let n=!1;i.subscribe(je(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(t())))})}function _F(){return new bs}function Gi(t){return Ge((i,e)=>{try{i.subscribe(e)}finally{e.add(t)}})}function Ss(t,i){let e=arguments.length>=2;return n=>n.pipe(t?ke((r,o)=>t(r,o,n)):Hi,hi(1),e?Di(i):gD(()=>new bs))}function cm(t){return t<=0?()=>kn:Ge((i,e)=>{let n=[];i.subscribe(je(e,r=>{n.push(r),t<n.length&&n.shift()},()=>{for(let r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function _D(t={}){let{connector:i=()=>new Ot,resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=t;return o=>{let s,a,l,c=0,d=!1,p=!1,y=()=>{a?.unsubscribe(),a=void 0},b=()=>{y(),s=l=void 0,d=p=!1},T=()=>{let W=s;b(),W?.unsubscribe()};return Ge((W,j)=>{c++,!p&&!d&&y();let ee=l=l??i();j.add(()=>{c--,c===0&&!p&&!d&&(a=y0(T,r))}),ee.subscribe(j),!s&&c>0&&(s=new qr({next:De=>ee.next(De),error:De=>{p=!0,y(),a=y0(b,e,De),ee.error(De)}
vendor: 16,395 bytes, lines 3-4
3,complete:()=>{d=!0,y(),a=y0(b,n),ee.complete()}}),at(W).subscribe(s))})(o)}}function y0(t,i,...e){if(i===!0){t();return}if(i===!1)return;let n=new qr({next:()=>{n.unsubscribe(),t()}});return at(i(...e)).subscribe(n)}function Ai(t,i,e){let n,r=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:i=1/0,refCount:r=!1,scheduler:e}=t:n=t??1/0,_D({connector:()=>new wn(n,i,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function b0(...t){let i=Do(t);return Ge((e,n)=>{(i?ua(t,e,i):ua(t,e)).subscribe(n)})}function fe(t,i){return Ge((e,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();e.subscribe(je(n,l=>{r?.unsubscribe();let c=0,d=o++;at(t(l,d)).subscribe(r=je(n,p=>n.next(i?i(l,p,d,c++):p),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function El(t){return Ge((i,e)=>{at(t).subscribe(je(e,()=>e.complete(),yl)),!e.closed&&i.subscribe(e)})}function C0(t,i=!1){return Ge((e,n)=>{let r=0;e.subscribe(je(n,o=>{let s=t(o,r++);(s||i)&&n.next(o),!s&&n.complete()}))})}function we(t,i,e){let n=xe(t)||i||e?{next:t,error:i,complete:e}:t;return n?Ge((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(je(o,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),o.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),o.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Hi}function vD(t,i){return Ge((e,n)=>{let{leading:r=!0,trailing:o=!1}=i??{},s=!1,a=null,l=null,c=!1,d=()=>{l?.unsubscribe(),l=null,o&&(b(),c&&n.complete())},p=()=>{l=null,c&&n.complete()},y=T=>l=at(t(T)).subscribe(je(n,d,p)),b=()=>{if(s){s=!1;let T=a;a=null,n.next(T),!c&&y(T)}};e.subscribe(je(n,T=>{s=!0,a=T,!(l&&!l.closed)&&(r?b():y(T))},()=>{c=!0,!(o&&s&&l&&!l.closed)&&n.complete()}))})}function S0(t,i=ys,e){let n=$i(t,i);return vD(()=>n,e)}var E0;function dm(){return E0}function Ro(t){let i=E0;return E0=t,i}var yD=Symbol("NotFound");function Lc(t){return t===yD||t?.name==="\u0275NotFound"}function I0(t,i,e){let n=Object.create(vF);n.source=t,n.computation=i,e!=null&&(n.equal=e);let o=()=>{if(ml(n),la(n),n.value===To)throw n.error;return n.value};return o[mn]=n,ju(n),o}function bD(t,i){ml(t),da(t,i),Dc(t)}function CD(t,i){if(ml(t),t.value===To)throw t.error;kh(t,i),Dc(t)}var vF=ve(F({},aa),{value:fl,dirty:!0,error:null,equal:Hu,kind:"linkedSignal",producerMustRecompute(t){return t.value===fl||t.value===hl},producerRecomputeValue(t){if(t.value===hl)throw new Error("");let i=t.value;t.value=hl;let e=ca(t),n,r=!1;try{let o=t.source(),s=i!==fl&&i!==To,a=s?{source:t.sourceValue,value:i}:void 0;n=t.computation(o,a),t.sourceValue=o,Ie(null),r=s&&n!==To&&t.equal(i,n)}catch(o){n=To,t.error=o}finally{gl(t,e)}if(r){t.value=i;return}t.value=n,t.version++}});function SD(t){let i=Ie(null);try{return t()}finally{Ie(i)}}var _m="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Z=class extends Error{code;constructor(i,e){super(fr(i,e)),this.code=i}};function yF(t){return`NG0${Math.abs(t)}`}function fr(t,i){return`${yF(t)}${i?": "+i:""}`}var Fn=globalThis;function Tt(t){for(let i in t)if(t[i]===Tt)return i;throw Error("")}function DD(t,i){for(let e in i)i.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=i[e])}function ep(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(ep).join(", ")}]`;if(t==null)return""+t;let i=t.overriddenName||t.name;if(i)return`${i}`;let e=t.toString();if(e==null)return""+e;let n=e.indexOf(`
4`);return n>=0?e.slice(0,n):e}function vm(t,i){return t?i?`${t} ${i}`:t:i||""}var bF=Tt({__forward_ref__:Tt});function Is(t){return t.__forward_ref__=Is,t}function Xn(t){return F0(t)?t():t}function F0(t){return typeof t=="function"&&t.hasOwnProperty(bF)&&t.__forward_ref__===Is}function w(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ri(t){return{providers:t.providers||[],imports:t.imports||[]}}function tp(t){return CF(t,ym)}function V0(t){return tp(t)!==null}function CF(t,i){return t.hasOwnProperty(i)&&t[i]||null}function SF(t){let i=t?.[ym]??null;return i||null}function T0(t){return t&&t.hasOwnProperty(pm)?t[pm]:null}var ym=Tt({\u0275prov:Tt}),pm=Tt({\u0275inj:Tt}),le=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(i,e){this._desc=i,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=w({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function U0(t){return t&&!!t.\u0275providers}var B0=Tt({\u0275cmp:Tt}),j0=Tt({\u0275dir:Tt}),H0=Tt({\u0275pipe:Tt}),$0=Tt({\u0275mod:Tt}),Qu=Tt({\u0275fac:Tt}),Al=Tt({__NG_ELEMENT_ID__:Tt}),ED=Tt({__NG_ENV_ID__:Tt});function G0(t){return bm(t,"@NgModule"),t[$0]||null}function Mo(t){return bm(t,"@Component"),t[B0]||null}function W0(t){return bm(t,"@Directive"),t[j0]||null}function AD(t){return bm(t,"@Pipe"),t[H0]||null}function bm(t,i){if(t==null)throw new Z(-919,!1)}function ma(t){return typeof t=="string"?t:t==null?"":String(t)}var RD=Tt({ngErrorCode:Tt}),EF=Tt({ngErrorMessage:Tt}),IF=Tt({ngTokenPath:Tt});function z0(t,i){return xD("",-200,i)}function Cm(t,i){throw new Z(-201,!1)}function xD(t,i,e){let n=new Z(i,t);return n[RD]=i,n[EF]=t,e&&(n[IF]=e),n}function wF(t){return t[RD]}var D0;function MD(){return D0}function mi(t){let i=D0;return D0=t,i}function q0(t,i,e){let n=tp(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(e&8)return null;if(i!==void 0)return i;Cm(t,"")}var TF={},Il=TF,DF="__NG_DI_FLAG__",A0=class{injector;constructor(i){this.injector=i}retrieve(i,e){let n=wl(e)||0;try{return this.injector.get(i,n&8?null:Il,n)}catch(r){if(Lc(r))return r;throw r}}};function AF(t,i=0){let e=dm();if(e===void 0)throw new Z(-203,!1);if(e===null)return q0(t,void 0,i);{let n=RF(i),r=e.retrieve(t,n);if(Lc(r)){if(n.optional)return null;throw r}return r}}function h(t,i=0){return(MD()||AF)(Xn(t),i)}function U(t,i){return h(t,wl(i))}function wl(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function RF(t){return{optional:!!(t&8),host:!!(t&1),self:!!(t&2),skipSelf:!!(t&4)}}function R0(t){let i=[];for(let e=0;e<t.length;e++){let n=Xn(t[e]);if(Array.isArray(n)){if(n.length===0)throw new Z(900,!1);let r,o=0;for(let s=0;s<n.length;s++){let a=n[s],l=xF(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}i.push(h(r,o))}else i.push(h(n))}return i}function xF(t){return t[DF]}function pa(t,i){let e=t.hasOwnProperty(Qu);return e?t[Qu]:null}function PD(t,i,e){if(t.length!==i.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],o=i[n];if(e&&(r=e(r),o=e(o)),o!==r)return!1}return!0}function OD(t){return t.flat(Number.POSITIVE_INFINITY)}function Sm(t,i){t.forEach(e=>Array.isArray(e)?Sm(e,i):i(e))}function Y0(t,i,e){i>=t.length?t.push(e):t.splice(i,0,e)}function np(t,i){return i>=t.length-1?t.pop():t.splice(i,1)[0]}function ND(t,i){let e=[];for(let n=0;n<t;n++)e.push(i);return e}function kD(t,i,e,n){let r=t.length;if(r==i)t.push(e,n);else if(r===1)t.push(n,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>i;){let o=r-2;t[r]=t[o],r--}t[i]=e,t[i+1]=n}}function Em(t,i,e){let n=Vc(t,i);return n>=0?t[n|1]=e:(n=~n,kD(t,n,i,e)),n}function Im(t,i){let e=Vc(t,i);if(e>=0)return t[e|1]}function Vc(t,i){return MF(t,i,1)}function MF(t,i,e){let n=0,r=t.length>>e;for(;r!==n;){let o=n+(r-n>>1),s=t[o<<e];if(i===s)return o<<e;s>i?r=o:n=o+1}return~(r<<e)}var ga={},ri=[],ws=new le(""),Q0=new le("",-1),Z0=new le(""),Zu=class{get(i,e=Il){if(e===Il){let r=xD("",-201);throw r.name="\u0275NotFound",r}return e}};function Ts(t){return{\u0275providers:t}}function LD(...t){return{\u0275providers:J0(!0,t),\u0275fromNgModule:!0}}function J0(t,...i){let e=[],n=new Set,r,o=s=>{e.push(s)};return Sm(i,s=>{let a=s;fm(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&FD(r,o),e}function FD(t,i){for(let e=0;e<t.length;e++){let{ngModule:n,providers:r}=t[e];X0(r,o=>{i(o,n)})}}function fm(t,i,e,n){if(t=Xn(t),!t)return!1;let r=null,o=T0(t),s=!o&&Mo(t);if(!o&&!s){let l=t.ngModule;if(o=T0(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=t}let a=n.has(r);if(s){if(a)return!1;if(n.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)fm(c,i,e,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;Sm(o.imports,d=>{fm(d,i,e,n)&&(c||=[],c.push(d))}),c!==void 0&&FD(c,i)}if(!a){let c=pa(r)||(()=>new r);i({provide:r,useFactory:c,deps:ri},r),i({provide:Z0,useValue:r,multi:!0},r),i({provide:ws,useValue:()=>h(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=t;X0(l,d=>{i(d,c)})}}else return!1;return r!==t&&t.providers!==void 0}function X0(t,i){for(let e of t)U0(e)&&(e=e.\u0275providers),Array.isArray(e)?X0(e,i):i(e)}var PF=Tt({provide:String,useValue:Tt});function VD(t){return t!==null&&typeof t=="object"&&PF in t}function OF(t){return!!(t&&t.useExisting)}function NF(t){return!!(t&&t.useFactory)}function Tl(t){return typeof t=="function"}function UD(t){return!!t.useClass}var ip=new le(""),um={},ID={},w0;function Uc(){return w0===void 0&&(w0=new Zu),w0}var Jt=class{},Dl=class extends Jt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(i,e,n,r){super(),this.parent=e,this.source=n,this.scopes=r,M0(i,s=>this.processProvider(s)),this.records.set(Q0,Fc(void 0,this)),r.has("environment")&&this.records.set(Jt,Fc(void 0,this));let o=this.records.get(ip);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Z0,ri,{self:!0}))}retrieve(i,e){let n=wl(e)||0;try{return this.get(i,Il,n)}catch(r){if(Lc(r))return r;throw r}}destroy(){Yu(this),this._destroyed=!0;let i=Ie(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of e)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Ie(i)}}onDestroy(i){return Yu(this),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){Yu(this);let e=Ro(this),n=mi(void 0),r;try{return i()}finally{Ro(e),mi(n)}}get(i,e=Il,n){if(Yu(this),i.hasOwnProperty(ED))return i[ED](this);let r=wl(n),o,s=Ro(this),a=mi(void 0);try{if(!(r&4)){let c=this.records.get(i);if(c===void 0){let d=UF(i)&&tp(i);d&&this.injectableDefInScope(d)?c=Fc(x0(i),um):c=null,this.records.set(i,c)}if(c!=null)return this.hydrate(i,c,r)}let l=r&2?Uc():this.parent;return e=r&8&&e===Il?null:e,l.get(i,e)}catch(l){let c=wF(l);throw c===-200||c===-201?new Z(c,null):l}finally{mi(a),Ro(s)}}resolveInjectorInitializers(){let i=Ie(null),e=Ro(this),n=mi(void 0),r;try{let o=this.get(ws,ri,{self:!0});for(let s of o)s()}finally{Ro(e),mi(n),Ie(i)}}toString(){return"R3Injector[...]"}processProvider(i){i=Xn(i);let e=Tl(i)?i:Xn(i&&i.provide),n=LF(i);if(!Tl(i)&&i.multi===!0){let r=this.records.get(e);r||(r=Fc(void 0,um,!0),r.factory=()=>R0(r.multi),this.records.set(e,r)),e=i,r.multi.push(i)}this.records.set(e,n)}hydrate(i,e,n){let r=Ie(null);try{if(e.value===ID)throw z0("");return e.value===um&&(e.value=ID,e.value=e.factory(void 0,n)),typeof e.value=="object"&&e.value&&VF(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{Ie(r)}}injectableDefInScope(i){if(!i.providedIn)return!1;let e=Xn(i.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(i){let e=this._onDestroyHooks.indexOf(i);e!==-1&&this._onDestroyHooks.splice(e,1)}};function x0(t){let i=tp(t),e=i!==null?i.factory:pa(t);if(e!==null)return e;if(t instanceof le)throw new Z(-204,!1);if(t instanceof Function)return kF(t);throw new Z(-204,!1)}function kF(t){if(t.length>0)throw new Z(-204,!1);let e=SF(t);return e!==null?()=>e.factory(t):()=>new t}function LF(t){if(VD(t))return Fc(void 0,t.useValue);{let i=K0(t);return Fc(i,um)}}function K0(t,i,e){let n;if(Tl(t)){let r=Xn(t);return pa(r)||x0(r)}else if(VD(t))n=()=>Xn(t.useValue);else if(NF(t))n=()=>t.useFactory(...R0(t.deps||[]));else if(OF(t))n=(r,o)=>h(Xn(t.useExisting),o!==void 0&&o&8?8:void 0);else{let r=Xn(t&&(t.useClass||t.provide));if(FF(t))n=()=>new r(...R0(t.deps));else return pa(r)||x0(r)}return n}function Yu(t){if(t.destroyed)throw new Z(-205,!1)}function Fc(t,i,e=!1){return{factory:t,value:i,multi:e?[]:void 0}}function FF(t){return!!t.deps}function VF(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function UF(t){return typeof t=="function"||typeof t=="object"&&t.ngMetadataName==="InjectionToken"}function M0(t,i){for(let e of t)Array.isArray(e)?M0(e,i):e&&U0(e)?M0(e.\u0275providers,i):i(e)}function Vn(t,i){let e;t instanceof Dl?(Yu(t),e=t):e=new A0(t);let n,r=Ro(e),o=mi(void 0);try{return i()}finally{Ro(r),mi(o)}}function eb(){return MD()!==void 0||dm()!=null}var Qr=0,Ae=1,Oe=2,Ln=3,hr=4,gi=5,Rl=6,Bc=7,vn=8,_i=9,Zr=10,Dt=11,jc=12,tb=13,xl=14,vi=15,_a=16,Ml=17,Po=18,Oo=19,nb=20,Es=21,wm=22,fa=23,Wi=24,Pl=25,No=26,Wt=27,BD=1,ib=6,va=7,rp=8,Ol=9,an=10;function Ds(t){return Array.isArray(t)&&typeof t[BD]=="object"}function Jr(t){return Array.isArray(t)&&t[BD]===!0}function rb(t){return(t.flags&4)!==0}function As(t){return t.componentOffset>-1}function Hc(t){return(t.flags&1)===1}function ko(t){return!!t.template}function $c(t){return(t[Oe]&512)!==0}function Nl(t){return(t[Oe]&256)===256}var ob="svg",jD="math";function mr(t){for(;Array.isArray(t);)t=t[Qr];return t}function sb(t,i){return mr(i[t])}function zi(t,i){return mr(i[t.index])}function Tm(t,i){return t.data[i]}function Dm(t,i){return t[i]}function op(t,i,e,n){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),i[e]=n}function gr(t,i){let e=i[t];return Ds(e)?e:e[Qr]}function HD(t){return(t[Oe]&4)===4}function Am(t){return(t[Oe]&128)===128}function $D(t){return Jr(t[Ln])}function qi(t,i){return i==null?null:t[i]}function ab(t){t[Ml]=0}function lb(t){t[Oe]&1024||(t[Oe]|=1024,Am(t)&&kl(t))}function GD(t,i){for(;t>0;)i=i[xl],t--;return i}function sp(t){return!!(t[Oe]&9216||t[Wi]?.dirty)}function Rm(t){t[Zr].changeDetectionScheduler?.notify(8),t[Oe]&64&&(t[Oe]|=1024),sp(t)&&kl(t)}function kl(t){t[Zr].changeDetectionScheduler?.notify(0);let i=ha(t);for(;i!==null&&!(i[Oe]&8192||(i[Oe]|=8192,!Am(i)));)i=ha(i)}function cb(t,i){if(Nl(t))throw new Z(911,!1);t[Es]===null&&(t[Es]=[]),t[Es].push(i)}function WD(t,i){if(t[Es]===null)return;let e=t[Es].indexOf(i);e!==-1&&t[Es].splice(e,1)}function ha(t){let i=t[Ln];return Jr(i)?i[Ln]:i}function db(t){return t[Bc]??=[]}function ub(t){return t.cleanup??=[]}function zD(t,i,e,n){let r=db(i);r.push(e),t.firstCreatePass&&ub(t).push(n,r.length-1)}var ze={lFrame:iA(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var P0=!1;function qD(){return ze.lFrame.elementDepthCount}function YD(){ze.lFrame.elementDepthCount++}function pb(){ze.lFrame.elementDepthCount--}function xm(){return ze.bindingsEnabled}function fb(){return ze.skipHydrationRootTNode!==null}function hb(t){return ze.skipHydrationRootTNode===t}function mb(){ze.skipHydrationRootTNode=null}function ye(){return ze.lFrame.lView}function Nt(){return ze.lFrame.tView}function k(t){return ze.lFrame.contextLView=t,t[vn]}function L(t){return ze.lFrame.contextLView=null,t}function yn(){let t=gb();for(;t!==null&&t.type===64;)t=t.parent;return t}function gb(){return ze.lFrame.currentTNode}function QD(){let t=ze.lFrame,i=t.currentTNode;return t.isParent?i:i.parent}function Ll(t,i){let e=ze.lFrame;e.currentTNode=t,e.isParent=i}function _b(){return ze.lFrame.isParent}function vb(){ze.lFrame.isParent=!1}function yb(){return ze.lFrame.contextLView}function bb(){return P0}function Ju(t){let i=P0;return P0=t,i}function Gc(){let t=ze.lFrame,i=t.bindingRootIndex;return i===-1&&(i=t.bindingRootIndex=t.tView.bindingStartIndex),i}function ZD(){return ze.lFrame.bindingIndex}function JD(t){return ze.lFrame.bindingIndex=t}function Rs(){return ze.lFrame.bindingIndex++}function Mm(t){let i=ze.lFrame,e=i.bindingIndex;return i.bindingIndex=i.bindingIndex+t,e}function XD(){return ze.lFrame.inI18n}function KD(t,i){let e=ze.lFrame;e.bindingIndex=e.bindingRootIndex=t,Pm(i)}function eA(){return ze.lFrame.currentDirectiveIndex}function Pm(t){ze.lFrame.currentDirectiveIndex=t}function tA(t){let i=ze.lFrame.currentDirectiveIndex;return i===-1?null:t[i]}
vendor: 24,995 bytes, line 4
4function Om(){return ze.lFrame.currentQueryIndex}function ap(t){ze.lFrame.currentQueryIndex=t}function BF(t){let i=t[Ae];return i.type===2?i.declTNode:i.type===1?t[gi]:null}function Cb(t,i,e){if(e&4){let r=i,o=t;for(;r=r.parent,r===null&&!(e&1);)if(r=BF(o),r===null||(o=o[xl],r.type&10))break;if(r===null)return!1;i=r,t=o}let n=ze.lFrame=nA();return n.currentTNode=i,n.lView=t,!0}function Nm(t){let i=nA(),e=t[Ae];ze.lFrame=i,i.currentTNode=e.firstChild,i.lView=t,i.tView=e,i.contextLView=t,i.bindingIndex=e.bindingStartIndex,i.inI18n=!1}function nA(){let t=ze.lFrame,i=t===null?null:t.child;return i===null?iA(t):i}function iA(t){let i={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=i),i}function rA(){let t=ze.lFrame;return ze.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Sb=rA;function km(){let t=rA();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function oA(t){return(ze.lFrame.contextLView=GD(t,ze.lFrame.contextLView))[vn]}function Xr(){return ze.lFrame.selectedIndex}function ya(t){ze.lFrame.selectedIndex=t}function lp(){let t=ze.lFrame;return Tm(t.tView,t.selectedIndex)}function Lm(){ze.lFrame.currentNamespace=ob}function Fm(){jF()}function jF(){ze.lFrame.currentNamespace=null}function sA(){return ze.lFrame.currentNamespace}var aA=!0;function Vm(){return aA}function cp(t){aA=t}function O0(t,i=null,e=null,n){let r=Eb(t,i,e,n);return r.resolveInjectorInitializers(),r}function Eb(t,i=null,e=null,n,r=new Set){let o=[e||ri,LD(t)],s;return new Dl(o,i||Uc(),s||null,r)}var Ut=class t{static THROW_IF_NOT_FOUND=Il;static NULL=new Zu;static create(i,e){if(Array.isArray(i))return O0({name:""},e,i,"");{let n=i.name??"";return O0({name:n},i.parent,i.providers,n)}}static \u0275prov=w({token:t,providedIn:"any",factory:()=>h(Q0)});static __NG_ELEMENT_ID__=-1},Yt=new le(""),$n=(()=>{class t{static __NG_ELEMENT_ID__=HF;static __NG_ENV_ID__=e=>e}return t})(),hm=class extends $n{_lView;constructor(i){super(),this._lView=i}get destroyed(){return Nl(this._lView)}onDestroy(i){let e=this._lView;return cb(e,i),()=>WD(e,i)}};function HF(){return new hm(ye())}var Ib=!1,lA=new le(""),Lo=(()=>{class t{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new qt(!1);debugTaskTracker=U(lA,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Re(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=w({token:t,providedIn:"root",factory:()=>new t})}return t})(),N0=class extends Ot{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(i=!1){super(),this.__isAsync=i,eb()&&(this.destroyRef=U($n,{optional:!0})??void 0,this.pendingTasks=U(Lo,{optional:!0})??void 0)}emit(i){let e=Ie(null);try{super.next(i)}finally{Ie(e)}}subscribe(i,e,n){let r=i,o=e||(()=>null),s=n;if(i&&typeof i=="object"){let l=i;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return i instanceof gn&&i.add(a),a}wrapInTimeout(i){return e=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{i(e)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},Y=N0;function mm(...t){}function wb(t){let i,e;function n(){t=mm;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),i!==void 0&&clearTimeout(i)}catch(r){}}return i=setTimeout(()=>{t(),n()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{t(),n()})),()=>n()}function cA(t){return queueMicrotask(()=>t()),()=>{t=mm}}var Tb="isAngularZone",Xu=Tb+"_ID",$F=0,ut=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Y(!1);onMicrotaskEmpty=new Y(!1);onStable=new Y(!1);onError=new Y(!1);constructor(i){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=Ib}=i;if(typeof Zone>"u")throw new Z(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&n,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,zF(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Tb)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new Z(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new Z(909,!1)}run(i,e,n){return this._inner.run(i,e,n)}runTask(i,e,n,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,i,GF,mm,mm);try{return o.runTask(s,e,n)}finally{o.cancelTask(s)}}runGuarded(i,e,n){return this._inner.runGuarded(i,e,n)}runOutsideAngular(i){return this._outer.run(i)}},GF={};function Db(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function WF(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function i(){wb(()=>{t.callbackScheduled=!1,k0(t),t.isCheckStableRunning=!0,Db(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{i()}):t._outer.run(()=>{i()}),k0(t)}function zF(t){let i=()=>{WF(t)},e=$F++;t._inner=t._inner.fork({name:"angular",properties:{[Tb]:!0,[Xu]:e,[Xu+e]:!0},onInvokeTask:(n,r,o,s,a,l)=>{if(qF(l))return n.invokeTask(o,s,a,l);try{return wD(t),n.invokeTask(o,s,a,l)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&i(),TD(t)}},onInvoke:(n,r,o,s,a,l,c)=>{try{return wD(t),n.invoke(o,s,a,l,c)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!YF(l)&&i(),TD(t)}},onHasTask:(n,r,o,s)=>{n.hasTask(o,s),r===o&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,k0(t),Db(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(n,r,o,s)=>(n.handleError(o,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function k0(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function wD(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function TD(t){t._nesting--,Db(t)}var Ku=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Y;onMicrotaskEmpty=new Y;onStable=new Y;onError=new Y;run(i,e,n){return i.apply(e,n)}runGuarded(i,e,n){return i.apply(e,n)}runOutsideAngular(i){return i()}runTask(i,e,n,r){return i.apply(e,n)}};function qF(t){return dA(t,"__ignore_ng_zone__")}function YF(t){return dA(t,"__scheduler_tick__")}function dA(t,i){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[i]===!0}var pr=class{_console=console;handleError(i){this._console.error("ERROR",i)}},Yi=new le("",{factory:()=>{let t=U(ut),i=U(Jt),e;return n=>{t.runOutsideAngular(()=>{i.destroyed&&!e?setTimeout(()=>{throw n}):(e??=i.get(pr),e.handleError(n))})}}}),uA={provide:ws,useValue:()=>{let t=U(pr,{optional:!0})},multi:!0};function V(t,i){let[e,n,r]=r0(t,i?.equal),o=e,s=o[mn];return o.set=n,o.update=r,o.asReadonly=dp.bind(o),o}function dp(){let t=this[mn];if(t.readonlyFn===void 0){let i=()=>this();i[mn]=t,t.readonlyFn=i}return t.readonlyFn}var up=(()=>{class t{view;node;constructor(e,n){this.view=e,this.node=n}static __NG_ELEMENT_ID__=QF}return t})();function QF(){return new up(ye(),yn())}var xo=class{},Wc=new le("",{factory:()=>!0});var Um=new le(""),zc=(()=>{class t{internalPendingTasks=U(Lo);scheduler=U(xo);errorHandler=U(Yi);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let n=this.add();e().catch(this.errorHandler).finally(n)}static \u0275prov=w({token:t,providedIn:"root",factory:()=>new t})}return t})(),Bm=(()=>{class t{static \u0275prov=w({token:t,providedIn:"root",factory:()=>new L0})}return t})(),L0=class{dirtyEffectCount=0;queues=new Map;add(i){this.enqueue(i),this.schedule(i)}schedule(i){i.dirty&&this.dirtyEffectCount++}remove(i){let e=i.zone,n=this.queues.get(e);n.has(i)&&(n.delete(i),i.dirty&&this.dirtyEffectCount--)}enqueue(i){let e=i.zone;this.queues.has(e)||this.queues.set(e,new Set);let n=this.queues.get(e);n.has(i)||n.add(i)}flush(){for(;this.dirtyEffectCount>0;){let i=!1;for(let[e,n]of this.queues)e===null?i||=this.flushQueue(n):i||=e.run(()=>this.flushQueue(n));i||(this.dirtyEffectCount=0)}}flushQueue(i){let e=!1;for(let n of i)n.dirty&&(this.dirtyEffectCount--,e=!0,n.run());return e}},gm=class{[mn];constructor(i){this[mn]=i}destroy(){this[mn].destroy()}};function bn(t,i){let e=i?.injector??U(Ut),n=i?.manualCleanup!==!0?e.get($n):null,r,o=e.get(up,null,{optional:!0}),s=e.get(xo);return o!==null?(r=XF(o.view,s,t),n instanceof hm&&n._lView===o.view&&(n=null)):r=KF(t,e.get(Bm),s),r.injector=e,n!==null&&(r.onDestroyFns=[n.onDestroy(()=>r.destroy())]),new gm(r)}var pA=ve(F({},o0),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let t=Ju(!1);try{s0(this)}finally{Ju(t)}},cleanup(){if(!this.cleanupFns?.length)return;let t=Ie(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],Ie(t)}}}),ZF=ve(F({},pA),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(_l(this),this.onDestroyFns!==null)for(let t of this.onDestroyFns)t();this.cleanup(),this.scheduler.remove(this)}}),JF=ve(F({},pA),{consumerMarkedDirty(){this.view[Oe]|=8192,kl(this.view),this.notifier.notify(13)},destroy(){if(_l(this),this.onDestroyFns!==null)for(let t of this.onDestroyFns)t();this.cleanup(),this.view[fa]?.delete(this)}});function XF(t,i,e){let n=Object.create(JF);return n.view=t,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=i,n.fn=fA(n,e),t[fa]??=new Set,t[fa].add(n),n.consumerMarkedDirty(n),n}function KF(t,i,e){let n=Object.create(ZF);return n.fn=fA(n,t),n.scheduler=i,n.notifier=e,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.add(n),n.notifier.notify(12),n}function fA(t,i){return()=>{i(e=>(t.cleanupFns??=[]).push(e))}}function Ip(t){return{toString:t}.toString()}function o2(t){return typeof t=="function"}function XA(t,i,e,n){i!==null?i.applyValueToInputSignal(i,n):t[e]=n}var Xm=class{previousValue;currentValue;firstChange;constructor(i,e,n){this.previousValue=i,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}},Un=(()=>{let t=()=>KA;return t.ngInherit=!0,t})();function KA(t){return t.type.prototype.ngOnChanges&&(t.setInput=a2),s2}function s2(){let t=tR(this),i=t?.current;if(i){let e=t.previous;if(e===ga)t.previous=i;else for(let n in i)e[n]=i[n];t.current=null,this.ngOnChanges(i)}}function a2(t,i,e,n,r){let o=this.declaredInputs[n],s=tR(t)||l2(t,{previous:ga,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new Xm(c&&c.currentValue,e,l===ga),XA(t,i,r,e)}var eR="__ngSimpleChanges__";function tR(t){return t[eR]||null}function l2(t,i){return t[eR]=i}var hA=[];var At=function(t,i=null,e){for(let n=0;n<hA.length;n++){let r=hA[n];r(t,i,e)}},pt=(function(t){return t[t.TemplateCreateStart=0]="TemplateCreateStart",t[t.TemplateCreateEnd=1]="TemplateCreateEnd",t[t.TemplateUpdateStart=2]="TemplateUpdateStart",t[t.TemplateUpdateEnd=3]="TemplateUpdateEnd",t[t.LifecycleHookStart=4]="LifecycleHookStart",t[t.LifecycleHookEnd=5]="LifecycleHookEnd",t[t.OutputStart=6]="OutputStart",t[t.OutputEnd=7]="OutputEnd",t[t.BootstrapApplicationStart=8]="BootstrapApplicationStart",t[t.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",t[t.BootstrapComponentStart=10]="BootstrapComponentStart",t[t.BootstrapComponentEnd=11]="BootstrapComponentEnd",t[t.ChangeDetectionStart=12]="ChangeDetectionStart",t[t.ChangeDetectionEnd=13]="ChangeDetectionEnd",t[t.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",t[t.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",t[t.AfterRenderHooksStart=16]="AfterRenderHooksStart",t[t.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",t[t.ComponentStart=18]="ComponentStart",t[t.ComponentEnd=19]="ComponentEnd",t[t.DeferBlockStateStart=20]="DeferBlockStateStart",t[t.DeferBlockStateEnd=21]="DeferBlockStateEnd",t[t.DynamicComponentStart=22]="DynamicComponentStart",t[t.DynamicComponentEnd=23]="DynamicComponentEnd",t[t.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",t[t.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",t})(pt||{});function c2(t,i,e){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=i.type.prototype;if(n){let s=KA(i);(e.preOrderHooks??=[]).push(t,s),(e.preOrderCheckHooks??=[]).push(t,s)}r&&(e.preOrderHooks??=[]).push(0-t,r),o&&((e.preOrderHooks??=[]).push(t,o),(e.preOrderCheckHooks??=[]).push(t,o))}function nR(t,i){for(let e=i.directiveStart,n=i.directiveEnd;e<n;e++){let o=t.data[e].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:d}=o;s&&(t.contentHooks??=[]).push(-e,s),a&&((t.contentHooks??=[]).push(e,a),(t.contentCheckHooks??=[]).push(e,a)),l&&(t.viewHooks??=[]).push(-e,l),c&&((t.viewHooks??=[]).push(e,c),(t.viewCheckHooks??=[]).push(e,c)),d!=null&&(t.destroyHooks??=[]).push(e,d)}}function Wm(t,i,e){iR(t,i,3,e)}function zm(t,i,e,n){(t[Oe]&3)===e&&iR(t,i,e,n)}function Ab(t,i){let e=t[Oe];(e&3)===i&&(e&=16383,e+=1,t[Oe]=e)}function iR(t,i,e,n){let r=n!==void 0?t[Ml]&65535:0,o=n??-1,s=i.length-1,a=0;for(let l=r;l<s;l++)if(typeof i[l+1]=="number"){if(a=i[l],n!=null&&a>=n)break}else i[l]<0&&(t[Ml]+=65536),(a<o||o==-1)&&(d2(t,e,i,l),t[Ml]=(t[Ml]&4294901760)+l+2),l++}function mA(t,i){At(pt.LifecycleHookStart,t,i);let e=Ie(null);try{i.call(t)}finally{Ie(e),At(pt.LifecycleHookEnd,t,i)}}function d2(t,i,e,n){let r=e[n]<0,o=e[n+1],s=r?-e[n]:e[n],a=t[s];r?t[Oe]>>14<t[Ml]>>16&&(t[Oe]&3)===i&&(t[Oe]+=16384,mA(a,o)):mA(a,o)}var Yc=-1,Bl=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(i,e,n,r){this.factory=i,this.name=r,this.canSeeViewProviders=e,this.injectImpl=n}};function u2(t){return(t.flags&8)!==0}function p2(t){return(t.flags&16)!==0}function f2(t,i,e){let n=0;for(;n<e.length;){let r=e[n];if(typeof r=="number"){if(r!==0)break;n++;let o=e[n++],s=e[n++],a=e[n++];t.setAttribute(i,s,a,o)}else{let o=r,s=e[++n];h2(o)?t.setProperty(i,o,s):t.setAttribute(i,o,s),n++}}return n}function rR(t){return t===3||t===4||t===6}function h2(t){return t.charCodeAt(0)===64}function Qc(t,i){if(!(i===null||i.length===0))if(t===null||t.length===0)t=i.slice();else{let e=-1;for(let n=0;n<i.length;n++){let r=i[n];typeof r=="number"?e=r:e===0||(e===-1||e===2?gA(t,e,r,null,i[++n]):gA(t,e,r,null,null))}}return t}function gA(t,i,e,n,r){let o=0,s=t.length;if(i===-1)s=-1;else for(;o<t.length;){let a=t[o++];if(typeof a=="number"){if(a===i){s=-1;break}else if(a>i){s=o-1;break}}}for(;o<t.length;){let a=t[o];if(typeof a=="number")break;if(a===e){r!==null&&(t[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(t.splice(s,0,i),o=s+1),t.splice(o++,0,e),r!==null&&t.splice(o++,0,r)}function oR(t){return t!==Yc}function Km(t){return t&32767}function m2(t){return t>>16}function eg(t,i){let e=m2(t),n=i;for(;e>0;)n=n[xl],e--;return n}var Ub=!0;function tg(t){let i=Ub;return Ub=t,i}var g2=256,sR=g2-1,aR=5,_2=0,Fo={};function v2(t,i,e){let n;typeof e=="string"?n=e.charCodeAt(0)||0:e.hasOwnProperty(Al)&&(n=e[Al]),n==null&&(n=e[Al]=_2++);let r=n&sR,o=1<<r;i.data[t+(r>>aR)]|=o}function ng(t,i){let e=lR(t,i);if(e!==-1)return e;let n=i[Ae];n.firstCreatePass&&(t.injectorIndex=i.length,Rb(n.data,t),Rb(i,null),Rb(n.blueprint,null));let r=CC(t,i),o=t.injectorIndex;if(oR(r)){let s=Km(r),a=eg(r,i),l=a[Ae].data;for(let c=0;c<8;c++)i[o+c]=a[s+c]|l[s+c]}return i[o+8]=r,o}function Rb(t,i){t.push(0,0,0,0,0,0,0,0,i)}function lR(t,i){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||i[t.injectorIndex+8]===null?-1:t.injectorIndex}function CC(t,i){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let e=0,n=null,r=i;for(;r!==null;){if(n=fR(r),n===null)return Yc;if(e++,r=r[xl],n.injectorIndex!==-1)return n.injectorIndex|e<<16}return Yc}function Bb(t,i,e){v2(t,i,e)}function y2(t,i){if(i==="class")return t.classes;if(i==="style")return t.styles;let e=t.attrs;if(e){let n=e.length,r=0;for(;r<n;){let o=e[r];if(rR(o))break;if(o===0)r=r+2;else if(typeof o=="number")for(r++;r<n&&typeof e[r]=="string";)r++;else{if(o===i)return e[r+1];r=r+2}}}return null}function cR(t,i,e){if(e&8||t!==void 0)return t;Cm(i,"NodeInjector")}function dR(t,i,e,n){if(e&8&&n===void 0&&(n=null),(e&3)===0){let r=t[_i],o=mi(void 0);try{return r?r.get(i,n,e&8):q0(i,n,e&8)}finally{mi(o)}}return cR(n,i,e)}function uR(t,i,e,n=0,r){if(t!==null){if(i[Oe]&2048&&!(n&2)){let s=E2(t,i,e,n,Fo);if(s!==Fo)return s}let o=pR(t,i,e,n,Fo);if(o!==Fo)return o}return dR(i,e,n,r)}function pR(t,i,e,n,r){let o=C2(e);if(typeof o=="function"){if(!Cb(i,t,n))return n&1?cR(r,e,n):dR(i,e,n,r);try{let s;if(s=o(n),s==null&&!(n&8))Cm(e);else return s}finally{Sb()}}else if(typeof o=="number"){let s=null,a=lR(t,i),l=Yc,c=n&1?i[vi][gi]:null;for((a===-1||n&4)&&(l=a===-1?CC(t,i):i[a+8],l===Yc||!vA(n,!1)?a=-1:(s=i[Ae],a=Km(l),i=eg(l,i)));a!==-1;){let d=i[Ae];if(_A(o,a,d.data)){let p=b2(a,i,e,s,n,c);if(p!==Fo)return p}l=i[a+8],l!==Yc&&vA(n,i[Ae].data[a+8]===c)&&_A(o,a,i)?(s=d,a=Km(l),i=eg(l,i)):a=-1}}return r}function b2(t,i,e,n,r,o){let s=i[Ae],a=s.data[t+8],l=n==null?As(a)&&Ub:n!=s&&(a.type&3)!==0,c=r&1&&o===a,d=qm(a,s,e,l,c);return d!==null?gp(i,s,d,a,r):Fo}function qm(t,i,e,n,r){let o=t.providerIndexes,s=i.data,a=o&1048575,l=t.directiveStart,c=t.directiveEnd,d=o>>20,p=n?a:a+d,y=r?a+d:c;for(let b=p;b<y;b++){let T=s[b];if(b<l&&e===T||b>=l&&T.type===e)return b}if(r){let b=s[l];if(b&&ko(b)&&b.type===e)return l}return null}function gp(t,i,e,n,r){let o=t[e],s=i.data;if(o instanceof Bl){let a=o;if(a.resolving)throw z0("");let l=tg(a.canSeeViewProviders);a.resolving=!0;let c=s[e].type||s[e],d,p=a.injectImpl?mi(a.injectImpl):null,y=Cb(t,n,0);try{o=t[e]=a.factory(void 0,r,s,t,n),i.firstCreatePass&&e>=n.directiveStart&&c2(e,s[e],i)}finally{p!==null&&mi(p),tg(l),a.resolving=!1,Sb()}}return o}function C2(t){if(typeof t=="string")return t.charCodeAt(0)||0;let i=t.hasOwnProperty(Al)?t[Al]:void 0;return typeof i=="number"?i>=0?i&sR:S2:i}function _A(t,i,e){let n=1<<t;return!!(e[i+(t>>aR)]&n)}function vA(t,i){return!(t&2)&&!(t&1&&i)}var Vl=class{_tNode;_lView;constructor(i,e){this._tNode=i,this._lView=e}get(i,e,n){return uR(this._tNode,this._lView,i,wl(n),e)}};function S2(){return new Vl(yn(),ye())}function _r(t){return Ip(()=>{let i=t.prototype.constructor,e=i[Qu]||jb(i),n=Object.prototype,r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==n;){let o=r[Qu]||jb(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function jb(t){return F0(t)?()=>{let i=jb(Xn(t));return i&&i()}:pa(t)}function E2(t,i,e,n,r){let o=t,s=i;for(;o!==null&&s!==null&&s[Oe]&2048&&!$c(s);){let a=pR(o,s,e,n|2,Fo);if(a!==Fo)return a;let l=o.parent;if(!l){let c=s[nb];if(c){let d=c.get(e,Fo,n&-5);if(d!==Fo)return d}l=fR(s),s=s[xl]}o=l}return r}function fR(t){let i=t[Ae],e=i.type;return e===2?i.declTNode:e===1?t[gi]:null}function wp(t){return y2(yn(),t)}function I2(){return nd(yn(),ye())}function nd(t,i){return new Cn(zi(t,i))}var Cn=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=I2}return t})();function hR(t){return t instanceof Cn?t.nativeElement:t}function w2(){return this._results[Symbol.iterator]()}var ig=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Ot}constructor(i=!1){this._emitDistinctChangesOnly=i}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,e){return this._results.reduce(i,e)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,e){this.dirty=!1;let n=OD(i);(this._changesDetected=!PD(this._results,n,e))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(i){this._onDirty=i}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=w2};function mR(t){return(t.flags&128)===128}var SC=(function(t){return t[t.OnPush=0]="OnPush",t[t.Eager=1]="Eager",t[t.Default=1]="Default",t})(SC||{}),gR=new Map,T2=0;function D2(){return T2++}function A2(t){gR.set(t[Oo],t)}function Hb(t){gR.delete(t[Oo])}var yA="__ngContext__";function Zc(t,i){Ds(i)?(t[yA]=i[Oo],A2(i)):t[yA]=i}function _R(t){return yR(t[jc])}function vR(t){return yR(t[hr])}function yR(t){for(;t!==null&&!Jr(t);)t=t[hr];return t}var $b;function EC(t){$b=t}function bR(){if($b!==void 0)return $b;if(typeof document<"u")return document;throw new Z(210,!1)}var vg=new le("",{factory:()=>R2}),R2="ng";var yg=new le(""),Tp=new le("",{providedIn:"platform",factory:()=>"unknown"});var bg=new le("",{factory:()=>U(Yt).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var CR="r";var SR="di";var ER=!1,IR=new le("",{factory:()=>ER});var Cg=new le("");var x2=(t,i,e,n)=>{};function M2(t,i,e,n){x2(t,i,e,n)}function Sg(t){return(t.flags&32)===32}var P2=()=>null;function wR(t,i,e=!1){return P2(t,i,e)}function TR(t,i){let e=t.contentQueries;if(e!==null){let n=Ie(null);try{for(let r=0;r<e.length;r+=2){let o=e[r],s=e[r+1];if(s!==-1){let a=t.data[s];ap(o),a.contentQueries(2,i[s],s)}}}finally{Ie(n)}}}function Gb(t,i,e){ap(0);let n=Ie(null);try{i(t,e)}finally{Ie(n)}}function IC(t,i,e){if(rb(i)){let n=Ie(null);try{let r=i.directiveStart,o=i.directiveEnd;for(let s=r;s<o;s++){let a=t.data[s];if(a.contentQueries){let l=e[s];a.contentQueries(1,l,s)}}}finally{Ie(n)}}}var to=(function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",t})(to||{});var jm;function O2(){if(jm===void 0&&(jm=null,Fn.trustedTypes))try{jm=Fn.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return jm}function Eg(t){return O2()?.createHTML(t)||t}var Hm;function DR(){if(Hm===void 0&&(Hm=null,Fn.trustedTypes))try{Hm=Fn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return Hm}function bA(t){return DR()?.createHTML(t)||t}function CA(t){return DR()?.createScriptURL(t)||t}var xs=class{changingThisBreaksApplicationSecurity;constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${_m})`}},Wb=class extends xs{getTypeName(){return"HTML"}},zb=class extends xs{getTypeName(){return"Style"}},qb=class extends xs{getTypeName(){return"Script"}},Yb=class extends xs{getTypeName(){return"URL"}},Qb=class extends xs{getTypeName(){return"ResourceURL"}};function Qi(t){return t instanceof xs?t.changingThisBreaksApplicationSecurity:t}function Vo(t,i){let e=AR(t);if(e!=null&&e!==i){if(e==="ResourceURL"&&i==="URL")return!0;throw new Error(`Required a safe ${i}, got a ${e} (see ${_m})`)}return e===i}function AR(t){return t instanceof xs&&t.getTypeName()||null}function wC(t){return new Wb(t)}function TC(t){return new zb(t)}function DC(t){return new qb(t)}function AC(t){return new Yb(t)}function RC(t){return new Qb(t)}function N2(t){let i=new Jb(t);return k2()?new Zb(i):i}var Zb=class{inertDocumentHelper;constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i="<body><remove></remove>"+i;try{let e=new window.DOMParser().parseFromString(Eg(i),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(i):(e.f
vendor: 4,083 bytes, line 4
4irstChild?.remove(),e)}catch(e){return null}}},Jb=class{defaultDoc;inertDocument;constructor(i){this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(i){let e=this.inertDocument.createElement("template");return e.innerHTML=Eg(i),e}};function k2(){try{return!!new window.DOMParser().parseFromString(Eg(""),"text/html")}catch(t){return!1}}var L2=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Dp(t){return t=String(t),t.match(L2)?t:"unsafe:"+t}function Ms(t){let i={};for(let e of t.split(","))i[e]=!0;return i}function Ap(...t){let i={};for(let e of t)for(let n in e)e.hasOwnProperty(n)&&(i[n]=!0);return i}var RR=Ms("area,br,col,hr,img,wbr"),xR=Ms("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),MR=Ms("rp,rt"),F2=Ap(MR,xR),V2=Ap(xR,Ms("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),U2=Ap(MR,Ms("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),SA=Ap(RR,V2,U2,F2),PR=Ms("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),B2=Ms("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),j2=Ms("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),H2=Ap(PR,B2,j2),$2=Ms("script,style,template");var Xb=class{sanitizedSomething=!1;buf=[];sanitizeChildren(i){let e=i.firstChild,n=!0,r=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild){r.push(e),e=z2(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=W2(e);if(o){e=o;break}e=r.pop()}}return this.buf.join("")}startElement(i){let e=EA(i).toLowerCase();if(!SA.hasOwnProperty(e))return this.sanitizedSomething=!0,!$2.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let n=i.attributes;for(let r=0;r<n.length;r++){let o=n.item(r),s=o.name,a=s.toLowerCase();if(!H2.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;PR[a]&&(l=Dp(l)),this.buf.push(" ",s,'="',IA(l),'"')}return this.buf.push(">"),!0}endElement(i){let e=EA(i).toLowerCase();SA.hasOwnProperty(e)&&!RR.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(i){this.buf.push(IA(i))}};function G2(t,i){return(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function W2(t){let i=t.nextSibling;if(i&&t!==i.previousSibling)throw OR(i);return i}function z2(t){let i=t.firstChild;if(i&&G2(t,i))throw OR(i);return i}function EA(t){let i=t.nodeName;return typeof i=="string"?i:"FORM"}function OR(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var q2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Y2=/([^\#-~ |!])/g;function IA(t){return t.replace(/&/g,"&amp;
4").replace(q2,function(i){let e=i.charCodeAt(0),n=i.charCodeAt(1);return"&#"+((e-55296)*1024+(n-56320)+65536)+";"}).replace(Y2,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var $m;function Ig(t,i){let e=null;try{$m=$m||N2(t);let n=i?String(i):"";e=$m.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=e.innerHTML,e=$m.getInertBodyElement(n)}while(n!==o);let a=new Xb().sanitizeChildren(wA(e)||e);return Eg(a)}finally{if(e){let n=wA(e)||e;for(;n.firstChild;)n.firstChild.remove()}}}function wA(t){return"content"in t&&Q2(t)?t.content:null}function Q2(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var Z2=/^>|^->|<!--|-->|--!>|<!-$/g,J2=/(<|>)/g,X2="\u200B$1\u200B";function K2(t){return t.replace(Z2,i=>i.replace(J2,X2))}function eV(t,i){return t.createText(i)}function tV(t,i,e){t.setValue(i,e)}function nV(t,i){return t.createComment(K2(i))}function NR(t,i,e){return t.createElement(i,e)}function rg(t,i,e,n,r){t.insertBefore(i,e,n,r)}function kR(t,i,e){t.appendChild(i,e)}function TA(t,i,e,n,r){n!==null?rg(t,i,e,n,r):kR(t,i,e)}function LR(t,i,e,n){t.removeChild(null,i,e,n)}function iV(t,i,e){t.setAttribute(i,"style",e)}function rV(t,i,e){e===""?t.removeAttribute(i,"class"):t.setAttribute(i,"class",e)}function FR(t,i,e){let{mergedAttrs:n,classes:r,styles:o}=e;n!==null&&f2(t,i,n),r!==null&&rV(t,i,r),o!==null&&iV(t,i,o)}var vr=(function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t})(vr||{});function xC(t){let i=PC();return i?bA(i.sanitize(vr.HTML,t)||""):Vo(t,"HTML")?bA(Qi(t)):Ig(bR(),ma(t))}function Je(t){let i=PC();return i?i.sanitize(vr.URL,t)||"":Vo(t,"URL")?Qi(t):Dp(ma(t))}function VR(t){let i=PC();if(i)return CA(i.sanitize(vr.RESOURCE_URL,t)||"");if(Vo(t,"ResourceURL"))return CA(Qi(t));throw new Z(904,!1)}var oV={embed:{src:!0},frame:{src:!0},iframe:{src:!0},media:{src:!0},script:{src:!0,href:!0,"xlink:href":!0},base:{href:!0},link:{href:!0},object:{data:!0,codebase:!0}};function sV(t,i){return oV[t]?.[i]===!0?VR:Je}function MC(t,i,e){return sV(i,e)(t)}function PC(){let t=ye();return t&&t[Zr].sanitizer}function OC(t){return t.ownerDocument.defaultView}function Rp(t){return t.ownerDocument}function UR(t){return t instanceof Function?t():t}function aV(t,i,e){let n=t.length;for(;;){let r=t.indexOf(i,e);if(r===-1)return r;if(r===0||t.charCodeAt(r-1)<=32){let o=i.length;if(r+o===n||t.charCodeAt(r+o)<=32)return r}e=r+1}}var BR="ng-template";function lV(t,i,e,n){let r=0;if(n){for(;r<i.length&&typeof i[r]=="string";r+=2)if(i[r]==="class"&&aV(i[r+1].toLowerCase(),e,0)!==-1)return!0}else if(NC(t))return!1;if(r=i.indexOf(1,r),r>-1){let o;for(;++r<i.length&&typeof(o=i[r])=="string";)if(o.toLowerCase()===e)return!0}return!1}function NC(t){return t.type===4&&t.value!==BR}function cV(t,i,e){let n=t.type===4&&!e?BR:t.value;return i===n}function dV(t,i,e){let n=4,r=t.attrs,o=r!==null?fV(r):0,s=!1;for(let a=0;a<i.length;a++){let l=i[a];if(typeof l=="number"){if(!s&&!Kr(n)&&!Kr(l))return!1;if(s&&Kr(l))continue;s=!1,n=l|n&1;continue}if(!s)if(n&4){if(n=2|n&1,l!==""&&!cV(t,l,e)||l===""&&i.length===1){if(Kr(n))return!1;s=!0}}else if(n&8){if(r===null||!lV(t,r,l,e)){if(Kr(n))return!1;s=!0}}else{let c=i[++a],d=uV(l,r,NC(t),e);if(d===-1){if(Kr(n))return!1;s=!0;continue}if(c!==""){let p;if(d>o?p="":p=r[d+1].toLowerCase(),n&2&&c!==p){if(Kr(n))return!1;s=!0}}}}return Kr(n)||s}function Kr(t){return(t&1)===0}function uV(t,i,e,n){if(i===null)return-1;let r=0;if(n||!e){let o=!1;for(;r<i.length;){let s=i[r];if(s===t)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=i[++r];for(;typeof a=="string";)a=i[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return hV(i,t)}function jR(t,i,e=!1){for(let n=0;n<i.length;n++)if(dV(t,i[n],e))return!0;return!1}function pV(t){let i=t.attrs;if(i!=null){let e=i.indexOf(5);if((e&1)===0)return i[e+1]}return null}function fV(t){for(let i=0;i<t.length;i++){let e=t[i];if(rR(e))return i}return t.length}function hV(t,i){let e=t.indexOf(4);if(e>-1)for(e++;e<t.length;){let n=t[e];if(typeof n=="number")return-1;if(n===i)return e;e++}return-1}function mV(t,i){e:for(let e=0;e<i.length;e++){let n=i[e];if(t.length===n.length){for(let r=0;r<t.length;r++)if(t[r]!==n[r])continue e;return!0}}return!1}function DA(t,i){return t?":not("+i.trim()+")":i}function gV(t){let i=t[0],e=1,n=2,r="",o=!1;for(;e<t.length;){let s=t[e];if(typeof s=="string")if(n&2){let a=t[++e];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);
vendor: 32,123 bytes, line 4
4else r!==""&&!Kr(s)&&(i+=DA(o,r),r=""),n=s,o=o||!Kr(n);e++}return r!==""&&(i+=DA(o,r)),i}function _V(t){return t.map(gV).join(",")}function vV(t){let i=[],e=[],n=1,r=2;for(;n<t.length;){let o=t[n];if(typeof o=="string")r===2?o!==""&&i.push(o,t[++n]):r===8&&e.push(o);else{if(!Kr(r))break;r=o}n++}return e.length&&i.push(1,...e),i}var oi={};function kC(t,i,e,n,r,o,s,a,l,c,d){let p=Wt+n,y=p+r,b=yV(p,y),T=typeof c=="function"?c():c;return b[Ae]={type:t,blueprint:b,template:e,queries:null,viewQuery:a,declTNode:i,data:b.slice().fill(null,p),bindingStartIndex:p,expandoStartIndex:y,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:T,incompleteFirstPass:!1,ssrId:d}}function yV(t,i){let e=[];for(let n=0;n<i;n++)e.push(n<t?null:oi);return e}function bV(t){let i=t.tView;return i===null||i.incompleteFirstPass?t.tView=kC(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts,t.id):i}function LC(t,i,e,n,r,o,s,a,l,c,d){let p=i.blueprint.slice();return p[Qr]=r,p[Oe]=n|4|128|8|64|1024,(c!==null||t&&t[Oe]&2048)&&(p[Oe]|=2048),ab(p),p[Ln]=p[xl]=t,p[vn]=e,p[Zr]=s||t&&t[Zr],p[Dt]=a||t&&t[Dt],p[_i]=l||t&&t[_i]||null,p[gi]=o,p[Oo]=D2(),p[Rl]=d,p[nb]=c,p[vi]=i.type==2?t[vi]:p,p}function CV(t,i,e){let n=zi(i,t),r=bV(e),o=t[Zr].rendererFactory,s=FC(t,LC(t,r,null,HR(e),n,i,null,o.createRenderer(n,e),null,null,null));return t[i.index]=s}function HR(t){let i=16;return t.signals?i=4096:t.onPush&&(i=64),i}function $R(t,i,e,n){if(e===0)return-1;let r=i.length;for(let o=0;o<e;o++)i.push(n),t.blueprint.push(n),t.data.push(null);return r}function FC(t,i){return t[jc]?t[tb][hr]=i:t[jc]=i,t[tb]=i,i}function u(t=1){GR(Nt(),ye(),Xr()+t,!1)}function GR(t,i,e,n){if(!n)if((i[Oe]&3)===3){let o=t.preOrderCheckHooks;o!==null&&Wm(i,o,e)}else{let o=t.preOrderHooks;o!==null&&zm(i,o,0,e)}ya(e)}var wg=(function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t})(wg||{});function Kb(t,i,e,n){let r=Ie(null);try{let[o,s,a]=t.inputs[e],l=null;(s&wg.SignalBased)!==0&&(l=i[o][mn]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):a!==null&&(n=a.call(i,n)),t.setInput!==null?t.setInput(i,l,n,e,o):XA(i,l,o,n)}finally{Ie(r)}}var no=(function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t})(no||{}),SV;function VC(t,i){return SV(t,i)}var WR=new le("",{factory:()=>!1});var EV=!1,xp=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function zR(t){return t[_i].get(WR,EV)}function IV(t,i,e){let n=Jc.get(t);if(n){for(let r of i)n.classList.push(r);for(let r of e)n.cleanupFns.push(r)}else Jc.set(t,{classList:i,cleanupFns:e})}function UC(t){let i=Jc.get(t);if(i){for(let e of i.cleanupFns)e();Jc.delete(t)}Ul.delete(t)}var Jc=new WeakMap,Ul=new WeakMap,_p=new WeakMap,fp=new WeakSet;function AA(t,i){let e=_p.get(t);if(e&&e.length>0){let n=e.findIndex(r=>r===i);n>-1&&e.splice(n,1)}e?.length===0&&_p.delete(t)}function wV(t,i){let e=_p.get(t);if(!e||e.length===0)return;let n=i.parentNode,r=i.previousSibling;for(let o=e.length-1;o>=0;o--){let s=e[o],a=s.parentNode;s===i?(e.splice(o,1),fp.add(s),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):(r&&s===r||a&&n&&a!==n)&&(e.splice(o,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function qR(t,i){let e=_p.get(t);e?e.includes(i)||e.push(i):_p.set(t,[i])}function RA(t){let i=t[No]??={};return i.enter??=new Map}function Tg(t){let i=t[No]??={};return i.leave??=new Map}function YR(t){let i=typeof t=="function"?t():t,e=Array.isArray(i)?i:null;return typeof i=="string"&&(e=i.trim().split(/\s+/).filter(n=>n)),e}function TV(t,i){if(!xp)return;let e=Jc.get(t);if(e&&e.classList.length>0&&DV(t,e.classList))for(let n of e.classList)i.removeClass(t,n);UC(t)}function DV(t,i){for(let e of i)if(t.classList.contains(e))return!0;return!1}function vp(t){return t.composedPath?t.composedPath()[0]:t.target}function BC(t,i){let e=Ul.get(i);return e===void 0?!0:i===vp(t)&&(e.animationName!==void 0&&t.animationName===e.animationName||e.propertyName!==void 0&&(e.propertyName==="all"||t.propertyName===e.propertyName))}function QR(t,i,e){let n=t.get(i.index)??{animateFns:[]};n.animateFns.push(e),t.set(i.index,n)}function xA(t,i){if(t)for(let e of t)e();for(let e of i)e()}function MA(t,i){let e=Tg(t).get(i.index);e&&(e.resolvers=void 0)}function og(t){if(!t)return 0;let i=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*i}function Fl(t,i){return t.getPropertyValue(i).split(",").map(n=>n.trim())}function AV(t){let i=Fl(t,"transition-property"),e=Fl(t,"transition-duration"),n=Fl(t,"transition-delay"),r={propertyName:"",duration:0,animationName:void 0};for(let o=0;o<i.length;o++){let s=og(n[o])+og(e[o]);s>r.duration&&(r.propertyName=i[o],r.duration=s)}return r}function RV(t){let i=Fl(t,"animation-name"),e=Fl(t,"animation-delay"),n=Fl(t,"animation-duration"),r=Fl(t,"animation-iteration-count"),o={animationName:"",propertyName:void 0,duration:0};for(let s=0;s<i.length;s++){let a=og(e[s])+og(n[s]),l=r[s];a>o.duration&&l!=="infinite"&&(o.animationName=i[s],o.duration=a)}return o}function ZR(t,i){return t!==void 0&&t.duration>i.duration}function JR(t){return(t.animationName!=null||t.propertyName!=null)&&t.duration>0}function xV(t,i){let e=getComputedStyle(t),n=RV(e),r=AV(e),o=n.duration>r.duration?n:r;ZR(i.get(t),o)||JR(o)&&i.set(t,o)}function XR(t,i,e){if(!e)return;let n=t.getAnimations();return n.length===0?xV(t,i):MV(t,i,n)}function MV(t,i,e){let n={animationName:void 0,propertyName:void 0,duration:0};for(let r of e){let o=r.effect?.getTiming();if(o?.iterations===1/0)continue;let s=typeof o?.duration=="number"?o.duration:0,a=(o?.delay??0)+s,l=r.playbackRate;l!==void 0&&l!==0&&l!==1&&(a/=Math.abs(l));let c,d;r.animationName?d=r.animationName:c=r.transitionProperty,a>=n.duration&&(n={animationName:d,propertyName:c,duration:a})}ZR(i.get(t),n)||JR(n)&&i.set(t,n)}var ba=new Set,Dg=(function(t){return t[t.CHANGE_DETECTION=0]="CHANGE_DETECTION",t[t.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",t})(Dg||{}),Uo=new le(""),PA=new Set;function Mi(t){PA.has(t)||(PA.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var jC=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=w({token:t,providedIn:"root",factory:()=>new t})}return t})(),KR=[0,1,2,3],ex=(()=>{class t{ngZone=U(ut);scheduler=U(xo);errorHandler=U(pr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){U(Uo,{optional:!0})}execute(){let e=this.sequences.size>0;e&&At(pt.AfterRenderHooksStart),this.executing=!0;for(let n of KR)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[n];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&At(pt.AfterRenderHooksEnd)}register(e){let{view:n}=e;n!==void 0?((n[Pl]??=[]).push(e),kl(n),n[Oe]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,n){return n?n.run(Dg.AFTER_NEXT_RENDER,e):e()}static \u0275prov=w({token:t,providedIn:"root",factory:()=>new t})}return t})(),sg=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(i,e,n,r,o,s=null){this.impl=i,this.hooks=e,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let i=this.view?.[Pl];i&&(this.view[Pl]=i.filter(e=>e!==this))}};function id(t,i){let e=i?.injector??U(Ut);return Mi("NgAfterNextRender"),OV(t,e,i,!0)}function PV(t){return t instanceof Function?[void 0,void 0,t,void 0]:[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function OV(t,i,e,n){let r=i.get(jC);r.impl??=i.get(ex);let o=i.get(Uo,null,{optional:!0}),s=e?.manualCleanup!==!0?i.get($n):null,a=i.get(up,null,{optional:!0}),l=new sg(r.impl,PV(t),a?.view,n,s,o?.snapshot(null));return r.impl.register(l),l}var Ag=new le("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:U(Jt)})});function tx(t,i,e){let n=t.get(Ag);if(Array.isArray(i))for(let r of i)n.queue.add(r),e?.detachedLeaveAnimationFns?.push(r);else n.queue.add(i),e?.detachedLeaveAnimationFns?.push(i);n.scheduler&&n.scheduler(t)}function NV(t,i){let e=t.get(Ag);if(i.detachedLeaveAnimationFns){for(let n of i.detachedLeaveAnimationFns)e.queue.delete(n);i.detachedLeaveAnimationFns=void 0}}function kV(t){let i=t.get(Ag);i.isScheduled||(id(()=>{i.isScheduled=!1;for(let e of i.queue)e();i.queue.clear()},{injector:i.injector}),i.isScheduled=!0)}function nx(t){let i=t.get(Ag);i.scheduler=kV,i.scheduler(t)}function ix(t,i){for(let[e,n]of i)tx(t,n.animateFns)}function OA(t,i,e,n){let r=t?.[No]?.enter;i!==null&&r&&r.has(e.index)&&ix(n,r)}function qc(t,i,e,n,r,o,s,a){if(r!=null){let l,c=!1;Jr(r)?l=r:Ds(r)&&(c=!0,r=r[Qr]);let d=mr(r);t===0&&n!==null?(OA(a,n,o,e),s==null?kR(i,n,d):rg(i,n,d,s||null,!0)):t===1&&n!==null?(OA(a,n,o,e),rg(i,n,d,s||null,!0),wV(o,d)):t===2?(a?.[No]?.leave?.has(o.index)&&qR(o,d),fp.delete(d),NA(a,o,e,p=>{if(fp.has(d)){fp.delete(d);return}LR(i,d,c,p)})):t===3&&(fp.delete(d),NA(a,o,e,()=>{i.destroyNode(d)})),l!=null&&zV(i,t,e,l,o,n,s)}}function LV(t,i){rx(t,i),i[Qr]=null,i[gi]=null}function FV(t,i,e,n,r,o){n[Qr]=r,n[gi]=i,xg(t,n,e,1,r,o)}function rx(t,i){i[Zr].changeDetectionScheduler?.notify(9),xg(t,i,i[Dt],2,null,null)}function VV(t){let i=t[jc];if(!i)return xb(t[Ae],t);for(;i;){let e=null;if(Ds(i))e=i[jc];else{let n=i[an];n&&(e=n)}if(!e){for(;i&&!i[hr]&&i!==t;)Ds(i)&&xb(i[Ae],i),i=i[Ln];i===null&&(i=t),Ds(i)&&xb(i[Ae],i),e=i&&i[hr]}i=e}}function HC(t,i){let e=t[Ol],n=e.indexOf(i);e.splice(n,1)}function Rg(t,i){if(Nl(i))return;let e=i[Dt];e.destroyNode&&xg(t,i,e,3,null,null),VV(i)}function xb(t,i){if(Nl(i))return;let e=Ie(null);try{i[Oe]&=-129,i[Oe]|=256,i[Wi]&&_l(i[Wi]),jV(t,i),BV(t,i),i[Ae].type===1&&i[Dt].destroy();let n=i[_a];if(n!==null&&Jr(i[Ln])){n!==i[Ln]&&HC(n,i);let r=i[Po];r!==null&&r.detachView(t)}Hb(i)}finally{Ie(e)}}function NA(t,i,e,n){let r=t?.[No];if(r==null||r.leave==null||!r.leave.has(i.index))return n(!1);t&&ba.add(t[Oo]),tx(e,()=>{if(r.leave&&r.leave.has(i.index)){let s=r.leave.get(i.index),a=[];if(s){for(let l=0;l<s.animateFns.length;l++){let c=s.animateFns[l],{promise:d}=c();a.push(d)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),UV(t,n)}else t&&ba.delete(t[Oo]),n(!1)},r)}function UV(t,i){let e=t[No]?.running;if(e){e.then(()=>{t[No].running=void 0,ba.delete(t[Oo]),i(!0)});return}i(!1)}function BV(t,i){let e=t.cleanup,n=i[Bc];if(e!==null)for(let s=0;s<e.length-1;s+=2)if(typeof e[s]=="string"){let a=e[s+3];a>=0?n[a]():n[-a].unsubscribe(),s+=2}else{let a=n[e[s+1]];e[s].call(a)}n!==null&&(i[Bc]=null);let r=i[Es];if(r!==null){i[Es]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=i[fa];if(o!==null){i[fa]=null;for(let s of o)s.destroy()}}function jV(t,i){let e;if(t!=null&&(e=t.destroyHooks)!=null)for(let n=0;n<e.length;n+=2){let r=i[e[n]];if(!(r instanceof Bl)){let o=e[n+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];At(pt.LifecycleHookStart,a,l);try{l.call(a)}finally{At(pt.LifecycleHookEnd,a,l)}}else{At(pt.LifecycleHookStart,r,o);try{o.call(r)}finally{At(pt.LifecycleHookEnd,r,o)}}}}}function ox(t,i,e){return HV(t,i.parent,e)}function HV(t,i,e){let n=i;for(;n!==null&&n.type&168;)i=n,n=i.parent;if(n===null)return e[Qr];if(As(n)){let{encapsulation:r}=t.data[n.directiveStart+n.componentOffset];if(r===to.None||r===to.Emulated)return null}return zi(n,e)}function sx(t,i,e){return GV(t,i,e)}function $V(t,i,e){return t.type&40?zi(t,e):null}var GV=$V,kA;function $C(t,i,e,n){let r=ox(t,n,i),o=i[Dt],s=n.parent||i[gi],a=sx(s,n,i);if(r!=null)if(Array.isArray(e))for(let l=0;l<e.length;l++)TA(o,r,e[l],a,!1);else TA(o,r,e,a,!1);kA!==void 0&&kA(o,n,i,e,r)}function hp(t,i){if(i!==null){let e=i.type;if(e&3)return zi(i,t);if(e&4)return eC(-1,t[i.index]);if(e&8){let n=i.child;if(n!==null)return hp(t,n);{let r=t[i.index];return Jr(r)?eC(-1,r):mr(r)}}else{if(e&128)return hp(t,i.next);if(e&32)return VC(i,t)()||mr(t[i.index]);{let n=ax(t,i);if(n!==null){if(Array.isArray(n))return n[0];let r=ha(t[vi]);return hp(r,n)}else return hp(t,i.next)}}}return null}function ax(t,i){if(i!==null){let n=t[vi][gi],r=i.projection;return n.projection[r]}return null}function eC(t,i){let e=an+t+1;if(e<i.length){let n=i[e],r=n[Ae].firstChild;if(r!==null)return hp(n,r)}return i[va]}function GC(t,i,e,n,r,o,s){for(;e!=null;){let a=n[_i];if(e.type===128){e=e.next;continue}let l=n[e.index],c=e.type;if(s&&i===0&&(l&&Zc(mr(l),n),e.flags|=2),!Sg(e))if(c&8)GC(t,i,e.child,n,r,o,!1),qc(i,t,a,r,l,e,o,n);else if(c&32){let d=VC(e,n),p;for(;p=d();)qc(i,t,a,r,p,e,o,n);qc(i,t,a,r,l,e,o,n)}else c&16?lx(t,i,n,e,r,o):qc(i,t,a,r,l,e,o,n);e=s?e.projectionNext:e.next}}function xg(t,i,e,n,r,o){GC(e,n,t.firstChild,i,r,o,!1)}function WV(t,i,e){let n=i[Dt],r=ox(t,e,i),o=e.parent||i[gi],s=sx(o,e,i);lx(n,0,i,e,r,s)}function lx(t,i,e,n,r,o){let s=e[vi],l=s[gi].projection[n.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];qc(i,t,e[_i],r,d,n,o,e)}else{let c=l,d=s[Ln];mR(n)&&(c.flags|=128),GC(t,i,c,d,r,o,!0)}}function zV(t,i,e,n,r,o,s){let a=n[va],l=mr(n);a!==l&&qc(i,t,e,o,a,r,s);for(let c=an;c<n.length;c++){let d=n[c];xg(d[Ae],d,t,i,o,a)}}function qV(t,i,e,n,r){if(i)r?t.addClass(e,n):t.removeClass(e,n);else{let o=n.indexOf("-")===-1?void 0:no.DashCase;r==null?t.removeStyle(e,n,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=no.Important),t.setStyle(e,n,r,o))}}function cx(t,i,e,n,r){let o=Xr(),s=n&2;try{ya(-1),s&&i.length>Wt&&GR(t,i,Wt,!1);let a=s?pt.TemplateUpdateStart:pt.TemplateCreateStart;At(a,r,e),e(n,r)}finally{ya(o);let a=s?pt.TemplateUpdateEnd:pt.TemplateCreateEnd;At(a,r,e)}}function Mg(t,i,e){KV(t,i,e),(e.flags&64)===64&&eU(t,i,e)}function Mp(t,i,e=zi){let n=i.localNames;if(n!==null){let r=i.index+1;for(let o=0;o<n.length;o+=2){let s=n[o+1],a=s===-1?e(i,t):t[s];t[r++]=a}}}function YV(t,i,e,n){let o=n.get(IR,ER)||e===to.ShadowDom||e===to.ExperimentalIsolatedShadowDom,s=t.selectRootElement(i,o);return QV(s),s}function QV(t){ZV(t)}var ZV=()=>null;function JV(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function dx(t,i,e,n,r,o){let s=i[Ae];if(YC(t,s,i,e,n)){As(t)&&XV(i,t.index);return}t.type&3&&(e=JV(e)),ux(t,i,e,n,r,o)}function ux(t,i,e,n,r,o){if(t.type&3){let s=zi(t,i);n=o!=null?o(n,t.value||"",e):n,r.setProperty(s,e,n)}else t.type&12}function XV(t,i){let e=gr(i,t);e[Oe]&16||(e[Oe]|=64)}function KV(t,i,e){let n=e.directiveStart,r=e.directiveEnd;As(e)&&CV(i,e,t.data[n+e.componentOffset]),t.firstCreatePass||ng(e,i);let o=e.initialInputs;for(let s=n;s<r;s++){let a=t.data[s],l=gp(i,t,s,e);if(Zc(l,i),o!==null&&rU(i,s-n,l,a,e,o),ko(a)){let c=gr(e.index,i);c[vn]=gp(i,t,s,e)}}}function eU(t,i,e){let n=e.directiveStart,r=e.directiveEnd,o=e.index,s=eA();try{ya(o);for(let a=n;a<r;a++){let l=t.data[a],c=i[a];Pm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&tU(l,c)}}finally{ya(-1),Pm(s)}}function tU(t,i){t.hostBindings!==null&&t.hostBindings(1,i)}function WC(t,i){let e=t.directiveRegistry,n=null;if(e)for(let r=0;r<e.length;r++){let o=e[r];jR(i,o.selectors,!1)&&(n??=[],ko(o)?n.unshift(o):n.push(o))}return n}function nU(t,i,e,n,r,o){let s=zi(t,i);iU(i[Dt],s,o,t.value,e,n,r)}function iU(t,i,e,n,r,o,s){if(o==null)t.removeAttribute(i,r,e);else{let a=s==null?ma(o):s(o,n||"",r);t.setAttribute(i,r,a,e)}}function rU(t,i,e,n,r,o){let s=o[i];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];Kb(n,e,l,c)}}function zC(t,i,e,n,r){let o=Wt+e,s=i[Ae],a=r(s,i,t,n,e);i[o]=a,Ll(t,!0);let l=t.type===2;return l?(FR(i[Dt],a,t),(qD()===0||Hc(t))&&Zc(a,i),YD()):Zc(a,i),Vm()&&(!l||!Sg(t))&&$C(s,i,a,t),t}function qC(t){let i=t;return _b()?vb():(i=i.parent,Ll(i,!1)),i}function oU(t,i){let e=t[_i];if(!e)return;let n;try{n=e.get(Yi,null)}catch(r){n=null}n?.(i)}function YC(t,i,e,n,r){let o=t.inputs?.[n],s=t.hostDirectiveInputs?.[n],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],d=s[l+1],p=i.data[c];Kb(p,e[c],d,r),a=!0}if(o)for(let l of o){let c=e[l],d=i.data[l];Kb(d,c,n,r),a=!0}return a}function sU(t,i){let e=gr(i,t),n=e[Ae];aU(n,e);let r=e[Qr];r!==null&&e[Rl]===null&&(e[Rl]=wR(r,e[_i])),At(pt.ComponentStart);try{QC(n,e,e[vn])}finally{At(pt.ComponentEnd,e[vn])}}function aU(t,i){for(let e=i.length;e<t.blueprint.length;e++)i.push(t.blueprint[e])}function QC(t,i,e){Nm(i);try{let n=t.viewQuery;n!==null&&Gb(1,n,e);let r=t.template;r!==null&&cx(t,i,r,1,e),t.firstCreatePass&&(t.firstCreatePass=!1),i[Po]?.finishViewCreation(t),t.staticContentQueries&&TR(t,i),t.staticViewQueries&&Gb(2,t.viewQuery,e);let o=t.components;o!==null&&lU(i,o)}catch(n){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),n}finally{i[Oe]&=-5,km()}}function lU(t,i){for(let e=0;e<i.length;e++)sU(t,i[e])}function Pp(t,i,e,n){let r=Ie(null);try{let o=i.tView,a=t[Oe]&4096?4096:16,l=LC(t,o,e,a,null,i,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),c=t[i.index];l[_a]=c;let d=t[Po];return d!==null&&(l[Po]=d.createEmbeddedView(o)),QC(o,l,e),l}finally{Ie(r)}}function Xc(t,i){return!i||i.firstChild===null||mR(t)}function yp(t,i,e,n,r=!1){for(;e!==null;){if(e.type===128){e=r?e.projectionNext:e.next;continue}let o=i[e.index];o!==null&&n.push(mr(o)),Jr(o)&&px(o,n);let s=e.type;if(s&8)yp(t,i,e.child,n);else if(s&32){let a=VC(e,i),l;for(;l=a();)n.push(l)}else if(s&16){let a=ax(i,e);if(Array.isArray(a))n.push(...a);else{let l=ha(i[vi]);yp(l[Ae],l,a,n,!0)}}e=r?e.projectionNext:e.next}return n}function px(t,i){for(let e=an;e<t.length;e++){let n=t[e],r=n[Ae].firstChild;r!==null&&yp(n[Ae],n,r,i)}t[va]!==t[Qr]&&i.push(t[va])}function fx(t){if(t[Pl]!==null){for(let i of t[Pl])i.impl.addSequence(i);t[Pl].length=0}}var hx=[];function cU(t){return t[Wi]??dU(t)}function dU(t){let i=hx.pop()??Object.create(pU);return i.lView=t,i}function uU(t){t.lView[Wi]!==t&&(t.lView=null,hx.push(t))}var pU=ve(F({},aa),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{kl(t.lView)},consumerOnSignalRead(){this.lView[Wi]=this}});function fU(t){let i=t[Wi]??Object.create(hU);return i.lView=t,i}var hU=ve(F({},aa),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let i=ha(t.lView);for(;i&&!mx(i[Ae]);)i=ha(i);i&&lb(i)},consumerOnSignalRead(){this.lView[Wi]=this}});function mx(t){return t.type!==2}function gx(t){if(t[fa]===null)return;let i=!0;for(;i;){let e=!1;for(let n of t[fa])n.dirty&&(e=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));i=e&&!!(t[Oe]&8192)}}var mU=100;function _x(t,i=0){let n=t[Zr].rendererFactory,r=!1;r||n.begin?.();try{gU(t,i)}finally{r||n.end?.()}}function gU(t,i){let e=bb();try{Ju(!0),tC(t,i);let n=0;for(;sp(t);){if(n===mU)throw new Z(103,!1);n++,tC(t,1)}}finally{Ju(e)}}function _U(t,i,e,n){if(Nl(i))return;let r=i[Oe],o=!1,s=!1;Nm(i);let a=!0,l=null,c=null;o||(mx(t)?(c=cU(i),l=ca(c)):Nh()===null?(a=!1,c=fU(i),l=ca(c)):i[Wi]&&(_l(i[Wi]),i[Wi]=null));try{ab(i),JD(t.bindingStartIndex),e!==null&&cx(t,i,e,2,n);let d=(r&3)===3;if(!o)if(d){let b=t.preOrderCheckHooks;b!==null&&Wm(i,b,null)}else{let b=t.preOrderHooks;b!==null&&zm(i,b,0,null),Ab(i,0)}if(s||vU(i),gx(i),vx(i,0),t.contentQueries!==null&&TR(t,i),!o)if(d){let b=t.contentCheckHooks;b!==null&&Wm(i,b)}else{let b=t.contentHooks;b!==null&&zm(i,b,1),Ab(i,1)}bU(t,i);let p=t.components;p!==null&&bx(i,p,0);let y=t.viewQuery;if(y!==null&&Gb(2,y,n),!o)if(d){let b=t.viewCheckHooks;b!==null&&Wm(i,b)}else{let b=t.viewHooks;b!==null&&zm(i,b,2),Ab(i,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),i[wm]){for(let b of i[wm])b();i[wm]=null}o||(fx(i),i[Oe]&=-73)}catch(d){throw o||kl(i),d}finally{c!==null&&(gl(c,l),a&&uU(c)),km()}}function vx(t,i){for(let e=_R(t);e!==null;e=vR(e))for(let n=an;n<e.length;n++){let r=e[n];yx(r,i)}}function vU(t){for(let i=_R(t);i!==null;i=vR(i)){if(!(i[Oe]&2))continue;let e=i[Ol];for(let n=0;n<e.length;n++){let r=e[n];lb(r)}}}function yU(t,i,e){At(pt.ComponentStart);let n=gr(i,t);try{yx(n,e)}finally{At(pt.ComponentEnd,n[vn])}}function yx(t,i){Am(t)&&tC(t,i)}function tC(t,i){let n=t[Ae],r=t[Oe],o=t[Wi],s=!!(i===0&&r&16);if(s||=!!(r&64&&i===0),s||=!!(r&1024),s||=!!(o?.dirty&&Bu(o)),s||=!1,o&&(o.dirty=!1),t[Oe]&=-9217,s)_U(n,t,n.template,t[vn]);else if(r&8192){let a=Ie(null);try{gx(t),vx(t,1);let l=n.components;l!==null&&bx(t,l,1),fx(t)}finally{Ie(a)}}}function bx(t,i,e){for(let n=0;n<i.length;n++)yU(t,i[n],e)}function bU(t,i){let e=t.hostBindingOpCodes;if(e!==null)try{for(let n=0;n<e.length;n++){let r=e[n];if(r<0)ya(~r);else{let o=r,s=e[++n],a=e[++n];KD(s,o);let l=i[o];At(pt.HostBindingsUpdateStart,l);try{a(2,l)}finally{At(pt.HostBindingsUpdateEnd,l)}}}}finally{ya(-1)}}function ZC(t,i){let e=bb()?64:1088;for(t[Zr].changeDetectionScheduler?.notify(i);t;){t[Oe]|=e;let n=ha(t);if($c(t)&&!n)return t;t=n}return null}function Cx(t,i,e,n){return[t,!0,0,i,null,n,null,e,null,null]}function Sx(t,i){let e=an+i;if(e<t.length)return t[e]}function Op(t,i,e,n=!0){let r=i[Ae];if(CU(r,i,t,e),n){let s=eC(e,t),a=i[Dt],l=a.parentNode(t[va]);l!==null&&FV(r,t[gi],a,i,l,s)}let o=i[Rl];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function Ex(t,i){let e=bp(t,i);return e!==void 0&&Rg(e[Ae],e),e}function bp(t,i){if(t.length<=an)return;let e=an+i,n=t[e];if(n){let r=n[_a];r!==null&&r!==t&&HC(r,n),i>0&&(t[e-1][hr]=n[hr]);let o=np(t,an+i);LV(n[Ae],n);let s=o[Po];s!==null&&s.detachView(o[Ae]),n[Ln]=null,n[hr]=null,n[Oe]&=-129}return n}function CU(t,i,e,n){let r=an+n,o=e.length;n>0&&(e[r-1][hr]=i),n<o-an?(i[hr]=e[r],Y0(e,an+n,i)):(e.push(i),i[hr]=null),i[Ln]=e;let s=i[_a];s!==null&&e!==s&&Ix(s,i);let a=i[Po];a!==null&&a.insertView(t),Rm(i),i[Oe]|=128}function Ix(t,i){let e=t[Ol],n=i[Ln];if(Ds(n))t[Oe]|=2;else{let r=n[Ln][vi];i[vi]!==r&&(t[Oe]|=2)}e===null?t[Ol]=[i]:e.push(i)}var Ca=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let i=this._lView,e=i[Ae];return yp(e,i,e.firstChild,[])}constructor(i,e){this._lView=i,this._cdRefInjectingView=e}get context(){return this._lView[vn]}set context(i){this._lView[vn]=i}get destroyed(){return Nl(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let i=this._lView[Ln];if(Jr(i)){let e=i[rp],n=e?e.indexOf(this):-1;n>-1&&(bp(i,n),np(e,n))}this._attachedToViewContainer=!1}Rg(this._lView[Ae],this._lView)}onDestroy(i){cb(this._lView,i)}markForCheck(){ZC(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Oe]&=-129}reattach(){Rm(this._lView),this._lView[Oe]|=128}detectChanges(){this._lView[Oe]|=1024,_x(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Z(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let i=$c(this._lView),e=this._lView[_a];e!==null&&!i&&HC(e,this._lView),rx(this._lView[Ae],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new Z(902,!1);this._appRef=i;let e=$c(this._lView),n=this._lView[_a];n!==null&&!e&&Ix(n,this._lView),Rm(this._lView)}};var Kc=(()=>{class t{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=SU;constructor(e,n,r){this._declarationLView=e,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,n){return this.createEmbeddedViewImpl(e,n)}createEmbeddedViewImpl(e,n,r){let o=Pp(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:n,dehydratedView:r});return new Ca(o)}}return t})();function SU(){return Pg(yn(),ye())}function Pg(t,i){return t.type&4?new Kc(i,t,nd(t,i)):null}function Gl(t,i,e,n,r){let o=t.data[i];if(o===null)o=EU(t,i,e,n,r),XD()&&(o.flags|=32);else if(o.type&64){o.type=e,o.value=n,o.attrs=r;let s=QD();o.injectorIndex=s===null?-1:s.injectorIndex}return Ll(o,!0),o}function EU(t,i,e,n,r){let o=gb(),s=_b(),a=s?o:o&&o.parent,l=t.data[i]=wU(t,a,e,i,n,r);return IU(t,l,o,s),l}function IU(t,i,e,n){t.firstChild===null&&(t.firstChild=i),e!==null&&(n?e.child==null&&i.parent!==null&&(e.child=i):e.next===null&&(e.next=i,i.prev=e))}function wU(t,i,e,n,r,o){let s=i?i.injectorIndex:-1,a=0;return fb()&&(a|=128),{type:e,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:i,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function TU(t){let i=t[ib]??[],n=t[Ln][Dt],r=[];for(let o of i)o.data[SR]!==void 0?r.push(o):DU(o,n);t[ib]=r}function DU(t,i){let e=0,n=t.firstChild;if(n){let r=t.data[CR];for(;e<r;){let o=n.nextSibling;LR(i,n,!1),n=o,e++}}}var AU=()=>null,RU=()=>null;function ag(t,i){return AU(t,i)}function wx(t,i,e){return RU(t,i,e)}var Tx=class{},Og=class{},nC=class{resolveComponentFactory(i){throw new Z(917,!1)}},Np=class{static NULL=new nC},jl=class{},Zi=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>xU()}return t})();function xU(){let t=ye(),i=yn(),e=gr(i.index,t);return(Ds(e)?e:t)[Dt]}var Dx=(()=>{class t{static \u0275prov=w({token:t,providedIn:"root",factory:()=>null})}return t})();var Ym={},iC=class{injector;parentInjector;constructor(i,e){this.injector=i,this.parentInjector=e}get(i,e,n){let r=this.injector.get(i,Ym,n);return r!==Ym||e===Ym?r:this.parentInjector.get(i,e,n)}};function lg(t,i,e){let n=e?t.styles:null,r=e?t.classes:null,o=0;if(i!==null)for(let s=0;s<i.length;s++){let a=i[s];if(typeof a=="number")o=a;else if(o==1)r=vm(r,a);else if(o==2){let l=a,c=i[++s];n=vm(n,l+": "+c+";")}}e?t.styles=n:t.stylesWithoutHost=n,e?t.classes=r:t.classesWithoutHost=r}function f(t,i=0){let e=ye();if(e===null)return h(t,i);let n=yn();return uR(n,e,Xn(t),i)}function JC(){let t="invalid";throw new Error(t)}function Ax(t,i,e,n,r){let o=n===null?null:{"":-1},s=r(t,e);if(s!==null){let a=s,l=null,c=null;for(let d of s)if(d.resolveHostDirectives!==null){[a,l,c]=d.resolveHostDirectives(s);break}OU(t,i,e,a,o,l,c)}o!==null&&n!==null&&MU(e,n,o)}function MU(t,i,e){let n=t.localNames=[];for(let r=0;r<i.length;r+=2){let o=e[i[r+1]];if(o==null)throw new Z(-301,!1);n.push(i[r],o)}}function PU(t,i,e){i.componentOffset=e,(t.components??=[]).push(i.index)}function OU(t,i,e,n,r,o,s){let a=n.length,l=null;for(let y=0;y<a;y++){let b=n[y];l===null&&ko(b)&&(l=b,PU(t,e,y)),Bb(ng(e,i),t,b.type)}UU(e,t.data.length,a),l?.viewProvidersResolver&&l.viewProvidersResolver(l);for(let y=0;y<a;y++){let b=n[y];b.providersResolver&&b.providersResolver(b)}let c=!1,d=!1,p=$R(t,i,a,null);a>0&&(e.directiveToIndex=new Map);for(let y=0;y<a;y++){let b=n[y];if(e.mergedAttrs=Qc(e.mergedAttrs,b.hostAttrs),kU(t,e,i,p,b),VU(p,b,r),s!==null&&s.has(b)){let[W,j]=s.get(b);e.directiveToIndex.set(b.type,[p,W+e.directiveStart,j+e.directiveStart])}else(o===null||!o.has(b))&&e.directiveToIndex.set(b.type,p);b.contentQueries!==null&&(e.flags|=4),(b.hostBindings!==null||b.hostAttrs!==null||b.hostVars!==0)&&(e.flags|=64);let T=b.type.prototype;!c&&(T.ngOnChanges||T.ngOnInit||T.ngDoCheck)&&((t.preOrderHooks??=[]).push(e.index),c=!0),!d&&(T.ngOnChanges||T.ngDoCheck)&&((t.preOrderCheckHooks??=[]).push(e.index),d=!0),p++}NU(t,e,o)}function NU(t,i,e){for(let n=i.directiveStart;n<i.directiveEnd;n++){let r=t.data[n];if(e===null||!e.has(r))LA(0,i,r,n),LA(1,i,r,n),VA(i,n,!1);else{let o=e.get(r);FA(0,i,o,n),FA(1,i,o,n),VA(i,n,!0)}}}function LA(t,i,e,n){let r=t===0?e.inputs:e.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;t===0?s=i.inputs??={}:s=i.outputs??={},s[o]??=[],s[o].push(n),Rx(i,o)}}function FA(t,i,e,n){let r=t===0?e.inputs:e.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;t===0?a=i.hostDirectiveInputs??={}:a=i.hostDirectiveOutputs??={},a[s]??=[],a[s].push(n,o),Rx(i,s)}}function Rx(t,i){i==="class"?t.flags|=8:i==="style"&&(t.flags|=16)}function VA(t,i,e){let{attrs:n,inputs:r,hostDirectiveInputs:o}=t;if(n===null||!e&&r===null||e&&o===null||NC(t)){t.initialInputs??=[],t.initialInputs.push(null);return}let s=null,a=0;for(;a<n.length;){let l=n[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!e&&r.hasOwnProperty(l)){let c=r[l];for(let d of c)if(d===i){s??=[],s.push(l,n[a+1]);break}}else if(e&&o.hasOwnProperty(l)){let c=o[l];for(let d=0;d<c.length;d+=2)if(c[d]===i){s??=[],s.push(c[d+1],n[a+1]);break}}a+=2}t.initialInputs??=[],t.initialInputs.push(s)}function kU(t,i,e,n,r){t.data[n]=r;let o=r.factory||(r.factory=pa(r.type,!0)),s=new Bl(o,ko(r),f,null);t.blueprint[n]=s,e[n]=s,LU(t,i,n,$R(t,e,r.hostVars,oi),r)}function LU(t,i,e,n,r){let o=r.hostBindings;if(o){let s=t.hostBindingOpCodes;s===null&&(s=t.hostBindingOpCodes=[]);let a=~i.index;FU(s)!=a&&s.push(a),s.push(e,n,o)}}function FU(t){let i=t.length;for(;i>0;){let e=t[--i];if(typeof e=="number"&&e<0)return e}return 0}function VU(t,i,e){if(e){if(i.exportAs)for(let n=0;n<i.exportAs.length;n++)e[i.exportAs[n]]=t;ko(i)&&(e[""]=t)}}function UU(t,i,e){t.flags|=1,t.directiveStart=i,t.directiveEnd=i+e,t.providerIndexes=i}function XC(t,i,e,n,r,o,s,a){let l=i[Ae],c=l.consts,d=qi(c,s),p=Gl(l,t,e,n,d);return o&&Ax(l,i,p,qi(c,a),r),p.mergedAttrs=Qc(p.mergedAttrs,p.attrs),p.attrs!==null&&lg(p,p.attrs,!1),p.mergedAttrs!==null&&lg(p,p.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,p),p}function KC(t,i){nR(t,i),rb(i)&&t.queries.elementEnd(i)}function BU(t,i,e,n,r,o){let s=i.consts,a=qi(s,r),l=Gl(i,t,e,n,a);if(l.mergedAttrs=Qc(l.mergedAttrs,l.attrs),o!=null){let c=qi(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&lg(l,l.attrs,!1),l.mergedAttrs!==null&&lg(l,l.mergedAttrs,!0),i.queries!==null&&i.queries.elementStart(i,l),l}function eS(t){return t!==null&&(typeof t=="function"||typeof t=="object")}function Ng(t,i,e){return t[i]=e}function xx(t,i){return t[i]}function xi(t,i,e){if(e===oi)return!1;let n=t[i];return Object.is(n,e)?!1:(t[i]=e,!0)}function Cp(t,i,e,n){let r=xi(t,i,e);return xi(t,i+1,n)||r}function jU(t,i,e,n,r){let o=Cp(t,i,e,n);return xi(t,i+2,r)||o}function HU(t,i,e,n,r,o){let s=Cp(t,i,e,n);return Cp(t,i+2,r,o)||s}function Qm(t,i,e){return function n(r){let o=As(t)?gr(t.index,i):i;ZC(o,5);let s=i[vn],a=UA(i,s,e,r),l=n.__ngNextListenerFn__;for(;l;)a=UA(i,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function UA(t,i,e,n){let r=Ie(null);try{return At(pt.OutputStart,i,e),e(n)!==!1}catch(o){return oU(t,o),!1}finally{At(pt.OutputEnd,i,e),Ie(r)}}function Mx(t,i,e,n,r,o,s,a){let l=Hc(t),c=!1,d=null;if(!n&&l&&(d=GU(i,e,o,t.index)),d!==null){let p=d.__ngLastListenerFn__||d;p.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}
4else{let p=zi(t,e),y=n?n(p):p;M2(e,y,o,a);let b=r.listen(y,o,a);if(!$U(o)){let T=n?W=>n(mr(W[t.index])):t.index;Px(T,i,e,o,a,b,!1)}}return c}function $U(t){return t.startsWith("animation")||t.startsWith("transition")}function GU(t,i,e,n){let r=t.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===e&&r[o+1]===n){let a=i[Bc],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function Px(t,i,e,n,r,o,s){let a=i.firstCreatePass?ub(i):null,l=db(e),c=l.length;l.push(r,o),a&&a.push(n,t,c,(c+1)*(s?-1:1))}function BA(t,i,e,n,r,o){let s=i[e],a=i[Ae],c=a.data[e].outputs[n],p=s[c].subscribe(o);Px(t.index,a,i,r,o,p,!0)}var rC=Symbol("BINDING");function Ox(t){return t.debugInfo?.className||t.type.name||null}var cg=class extends Np{ngModule;constructor(i){super(),this.ngModule=i}resolveComponentFactory(i){let e=Mo(i);return new Sa(e,this.ngModule)}};function WU(t){return Object.keys(t).map(i=>{let[e,n,r]=t[i],o={propName:e,templateName:i,isSignal:(n&wg.SignalBased)!==0};return r&&(o.transform=r),o})}function zU(t){return Object.keys(t).map(i=>({propName:t[i],templateName:i}))}function qU(t,i,e){let n=i instanceof Jt?i:i?.injector;return n&&t.getStandaloneInjector!==null&&(n=t.getStandaloneInjector(n)||n),n?new iC(e,n):e}function YU(t){let i=t.get(jl,null);if(i===null)throw new Z(407,!1);let e=t.get(Dx,null),n=t.get(xo,null),r=t.get(Uo,null,{optional:!0});return{rendererFactory:i,sanitizer:e,changeDetectionScheduler:n,ngReflect:!1,tracingService:r}}function QU(t,i){let e=Nx(t);return NR(i,e,e==="svg"?ob:e==="math"?jD:null)}function Nx(t){return(t.selectors[0][0]||"div").toLowerCase()}var Sa=class extends Og{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=WU(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=zU(this.componentDef.outputs),this.cachedOutputs}constructor(i,e){super(),this.componentDef=i,this.ngModule=e,this.componentType=i.type,this.selector=_V(i.selectors),this.ngContentSelectors=i.ngContentSelectors??[],this.isBoundToModule=!!e}create(i,e,n,r,o,s){At(pt.DynamicComponentStart);let a=Ie(null);try{let l=this.componentDef,c=qU(l,r||this.ngModule,i),d=YU(c),p=d.tracingService;return p&&p.componentCreate?p.componentCreate(Ox(l),()=>this.createComponentRef(d,c,e,n,o,s)):this.createComponentRef(d,c,e,n,o,s)}finally{Ie(a)}}createComponentRef(i,e,n,r,o,s){let a=this.componentDef,l=ZU(r,a,s,o),c=i.rendererFactory.createRenderer(null,a),d=r?YV(c,r,a.encapsulation,e):QU(a,c),p=s?.some(jA)||o?.some(T=>typeof T!="function"&&T.bindings.some(jA)),y=LC(null,l,null,512|HR(a),null,null,i,c,e,null,w
vendor: 4,971 bytes, line 4
4R(d,e,!0));y[Wt]=d,Nm(y);let b=null;try{let T=XC(Wt,y,2,"#host",()=>l.directiveRegistry,!0,0);FR(c,d,T),Zc(d,y),Mg(l,y,T),IC(l,T,y),KC(l,T),n!==void 0&&XU(T,this.ngContentSelectors,n),b=gr(T.index,y),y[vn]=b[vn],QC(l,y,null)}catch(T){throw b!==null&&Hb(b),Hb(y),T}finally{At(pt.DynamicComponentEnd),km()}return new dg(this.componentType,y,!!p)}};function ZU(t,i,e,n){let r=t?["ng-version","21.2.8"]:vV(i.selectors[0]),o=null,s=null,a=0;if(e)for(let d of e)a+=d[rC].requiredVars,d.create&&(d.targetIdx=0,(o??=[]).push(d)),d.update&&(d.targetIdx=0,(s??=[]).push(d));if(n)for(let d=0;d<n.length;d++){let p=n[d];if(typeof p!="function")for(let y of p.bindings){a+=y[rC].requiredVars;let b=d+1;y.create&&(y.targetIdx=b,(o??=[]).push(y)),y.update&&(y.targetIdx=b,(s??=[]).push(y))}}let l=[i];if(n)for(let d of n){let p=typeof d=="function"?d:d.type,y=W0(p);l.push(y)}return kC(0,null,JU(o,s),1,a,l,null,null,null,[r],null)}function JU(t,i){return!t&&!i?null:e=>{if(e&1&&t)for(let n of t)n.create();if(e&2&&i)for(let n of i)n.update()}}function jA(t){let i=t[rC].kind;return i==="input"||i==="twoWay"}var dg=class extends Tx{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(i,e,n){super(),this._rootLView=e,this._hasInputBindings=n,this._tNode=Tm(e[Ae],Wt),this.location=nd(this._tNode,e),this.instance=gr(this._tNode.index,e)[vn],this.hostView=this.changeDetectorRef=new Ca(e,void 0),this.componentType=i}setInput(i,e){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(i)&&Object.is(this.previousInputValues.get(i),e))return;let r=this._rootLView,o=YC(n,r[Ae],r,i,e);this.previousInputValues.set(i,e);let s=gr(n.index,r);ZC(s,1)}get injector(){return new Vl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(i){this.hostView.onDestroy(i)}};function XU(t,i,e){let n=t.projection=[];for(let r=0;r<i.length;r++){let o=e[r];n.push(o!=null&&o.length?Array.from(o):null)}}var Bo=(()=>{class t{static __NG_ELEMENT_ID__=KU}return t})();function KU(){let t=yn();return kx(t,ye())}var oC=class t extends Bo{_lContainer;_hostTNode;_hostLView;constructor(i,e,n){super(),this._lContainer=i,this._hostTNode=e,this._hostLView=n}get element(){return nd(this._hostTNode,this._hostLView)}get injector(){return new Vl(this._hostTNode,this._hostLView)}get parentInjector(){let i=CC(this._hostTNode,this._hostLView);if(oR(i)){let e=eg(i,this._hostLView),n=Km(i),r=e[Ae].data[n+8];return new Vl(r,e)}else return new Vl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){let e=HA(this._lContainer);return e!==null&&e[i]||null}get length(){return this._lContainer.length-an}createEmbeddedView(i,e,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=ag(this._lContainer,i.ssrId),a=i.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,r,Xc(this._hostTNode,s)),a}createComponent(i,e,n,r,o,s,a){let l=i&&!o2(i),c;if(l)c=e;else{let j=e||{};c=j.index,n=j.injector,r=j.projectableNodes,o=j.environmentInjector||j.ngModuleRef,s=j.directives,a=j.bindings}let d=l?i:new Sa(Mo(i)),p=n||this.parentInjector;if(!o&&d.ngModule==null){let ee=(l?p:this.parentInjector).get(Jt,null);ee&&(o=ee)}let y=Mo(d.componentType??{}),b=ag(this._lContainer,y?.id??null),T=b?.firstChild??null,W=d.create(p,r,T,o,s,a);return this.insertImpl(W.hostView,c,Xc(this._hostTNode,b)),W}insert(i,e){return this.insertImpl(i,e,!0)}insertImpl(i,e,n){let r=i._lView;if($D(r)){let a=this.indexOf(i);if(a!==-1)this.detach(a);else{let l=r[Ln],c=new t(l,l[gi],l[Ln]);c.detach(c.indexOf(i))}}let o=this._adjustIndex(e),s=this._lContainer;return Op(s,r,o,n),i.attachToViewContainerRef(),Y0(Mb(s),o,i),i}move(i,e){return this.insert(i,e)}indexOf(i){let e=HA(this._lContainer);return e!==null?e.indexOf(i):-1}remove(i){let e=this._adjustIndex(i,-1),n=bp(this._lContainer,e);n&&(np(Mb(this._lContainer),e),Rg(n[Ae],n))}detach(i){let e=this._adjustIndex(i,-1),n=bp(this._lContainer,e);return n&&np(Mb(this._lContainer),e)!=null?new Ca(n):null}_adjustIndex(i,e=0){return i??this.length+e}};function HA(t){return t[rp]}function Mb(t){return t[rp]||(t[rp]=[])}function kx(t,i){let e,n=i[t.index];return Jr(n)?e=n:(e=Cx(n,i,null,t),i[t.index]=e,FC(i,e)),tB(e,i,t,n),new oC(e,t,i)}function eB(t,i){let e=t[Dt],n=e.createComment(""),r=zi(i,t),o=e.parentNode(r);return rg(e,o,n,e.nextSibling(r),!1),n}var tB=rB,nB=()=>!1;function iB(t,i,e){return nB(t,i,e)}function rB(t,i,e,n){if(t[va])return;let r;e.type&8?r=mr(n):r=eB(i,e),t[va]=r}var sC=class t{queryList;matches=null;constructor(i){this.queryList=i}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},aC=class t{queries;constructor(i=[]){this.queries=i}createEmbeddedView(i){let e=i.queries;if(e!==null){let n=i.contentQueries!==null?i.contentQueries[0]:e.length,r=[];for(let o=0;o<n;o++){let s=e.getByIndex(o),a=this.queries[s.indexInDeclarationView];
vendor: 4,357 bytes, line 4
4r.push(a.clone())}return new t(r)}return null}insertView(i){this.dirtyQueriesWithMatches(i)}detachView(i){this.dirtyQueriesWithMatches(i)}finishViewCreation(i){this.dirtyQueriesWithMatches(i)}dirtyQueriesWithMatches(i){for(let e=0;e<this.queries.length;e++)nS(i,e).matches!==null&&this.queries[e].setDirty()}},ug=class{flags;read;predicate;constructor(i,e,n=null){this.flags=e,this.read=n,typeof i=="string"?this.predicate=dB(i):this.predicate=i}},lC=class t{queries;constructor(i=[]){this.queries=i}elementStart(i,e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(i,e)}elementEnd(i){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(i)}embeddedTView(i){let e=null;for(let n=0;n<this.length;n++){let r=e!==null?e.length:0,o=this.getByIndex(n).embeddedTView(i,r);o&&(o.indexInDeclarationView=n,e!==null?e.push(o):e=[o])}return e!==null?new t(e):null}template(i,e){for(let n=0;n<this.queries.length;n++)this.queries[n].template(i,e)}getByIndex(i){return this.queries[i]}get length(){return this.queries.length}track(i){this.queries.push(i)}},cC=class t{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(i,e=-1){this.metadata=i,this._declarationNodeIndex=e}elementStart(i,e){this.isApplyingToNode(e)&&this.matchTNode(i,e)}elementEnd(i){this._declarationNodeIndex===i.index&&(this._appliesToNextNode=!1)}template(i,e){this.elementStart(i,e)}embeddedTView(i,e){return this.isApplyingToNode(i)?(this.crossesNgTemplate=!0,this.addMatch(-i.index,e),new t(this.metadata)):null}isApplyingToNode(i){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let e=this._declarationNodeIndex,n=i.parent;for(;n!==null&&n.type&8&&n.index!==e;)n=n.parent;return e===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(i,e){let n=this.metadata.predicate;if(Array.isArray(n))for(let r=0;r<n.length;r++){let o=n[r];this.matchTNodeWithReadOption(i,e,oB(e,o)),this.matchTNodeWithReadOption(i,e,qm(e,i,o,!1,!1))}else n===Kc?e.type&4&&this.matchTNodeWithReadOption(i,e,-1):this.matchTNodeWithReadOption(i,e,qm(e,i,n,!1,!1))}matchTNodeWithReadOption(i,e,n){if(n!==null){let r=this.metadata.read;if(r!==null)if(r===Cn||r===Bo||r===Kc&&e.type&4)this.addMatch(e.index,-2);else{let o=qm(e,i,r,!1,!1);o!==null&&this.addMatch(e.index,o)}else this.addMatch(e.index,n)}}addMatch(i,e){this.matches===null?this.matches=[i,e]:this.matches.push(i,e)}};function oB(t,i){let e=t.localNames;if(e!==null){for(let n=0;n<e.length;n+=2)if(e[n]===i)return e[n+1]}return null}function sB(t,i){return t.type&11?nd(t,i):t.type&4?Pg(t,i):null}function aB(t,i,e,n){return e===-1?sB(i,t):e===-2?lB(t,i,n):gp(t,t[Ae],e,i)}function lB(t,i,e){if(e===Cn)return nd(i,t);if(e===Kc)return Pg(i,t);if(e===Bo)return kx(i,t)}function Lx(t,i,e,n){let r=i[Po].queries[n];if(r.matches===null){let o=t.data,s=e.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let d=o[c];a.push(aB(i,d,s[l+1],e.metadata.read))}}r.matches=a}return r.matches}function dC(t,i,e,n){let r=t.queries.getByIndex(e),o=r.matches;if(o!==null){let s=Lx(t,i,r,e);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)n.push(s[a/2]);else{let c=o[a+1],d=i[-l];for(let p=an;p<d.length;p++){let y=d[p];y[_a]===y[Ln]&&dC(y[Ae],y,c,n)}if(d[Ol]!==null){let p=d[Ol];for(let y=0;y<p.length;y++){let b=p[y];dC(b[Ae],b,c,n)}}}}}return n}function tS(t,i){return t[Po].queries[i].queryList}function Fx(t,i,e){let n=new ig((e&4)===4);return zD(t,i,n,n.destroy),(i[Po]??=new aC).queries.push(new sC(n))-1}function Vx(t,i,e){let n=Nt();return n.firstCreatePass&&(Ux(n,new ug(t,i,e),-1),(i&2)===2&&(n.staticViewQueries=!0)),Fx(n,ye(),i)}function cB(t,i,e,n){let r=Nt();if(r.firstCreatePass){let o=yn();Ux(r,new ug(i,e,n),o.index),uB(r,t),(e&2)===2&&(r.staticContentQueries=!0)}return Fx(r,ye(),e)}function dB(t){return t.split(",").map(i=>i.trim())}function Ux(t,i,e){t.queries===null&&(t.queries=new lC),t.queries.track(new cC(i,e))}function uB(t,i){let e=t.contentQueries||(t.contentQueries=[]),n=e.length?e[e.length-1]:-1;i!==n&&e.push(t.queries.length-1,i)}function nS(t,i){return t.queries.getByIndex(i)}function Bx(t,i){let e=t[Ae],n=nS(e,i);return n.crossesNgTemplate?dC(e,t,i,[]):Lx(e,t,n,i)}function jx(t,i,e){let n,r=$u(()=>{n._dirtyCounter();let o=fB(n,t);if(i&&o===void 0)throw new Z(-951,!1);return o}
vendor: 4,531 bytes, line 4
4);return n=r[mn],n._dirtyCounter=V(0),n._flatValue=void 0,r}function Hx(t){return jx(!0,!1,t)}function $x(t){return jx(!0,!0,t)}function pB(t,i){let e=t[mn];e._lView=ye(),e._queryIndex=i,e._queryList=tS(e._lView,i),e._queryList.onDirty(()=>e._dirtyCounter.update(n=>n+1))}function fB(t,i){let e=t._lView,n=t._queryIndex;if(e===void 0||n===void 0||e[Oe]&4)return i?void 0:ri;let r=tS(e,n),o=Bx(e,n);return r.reset(o,hR),i?r.first:r._changesDetected||t._flatValue===void 0?t._flatValue=r.toArray():t._flatValue}var Hl=class{},kg=class{};var pg=class extends Hl{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new cg(this);constructor(i,e,n,r=!0){super(),this.ngModuleType=i,this._parent=e;let o=G0(i);this._bootstrapComponents=UR(o.bootstrap),this._r3Injector=Eb(i,e,[{provide:Hl,useValue:this},{provide:Np,useValue:this.componentFactoryResolver},...n],ep(i),new Set(["environment"])),r&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}},fg=class extends kg{moduleType;constructor(i){super(),this.moduleType=i}create(i){return new pg(this.moduleType,i,[])}};var Sp=class extends Hl{injector;componentFactoryResolver=new cg(this);instance=null;constructor(i){super();let e=new Dl([...i.providers,{provide:Hl,useValue:this},{provide:Np,useValue:this.componentFactoryResolver}],i.parent||Uc(),i.debugName,new Set(["environment"]));this.injector=e,i.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}};function rd(t,i,e=null){return new Sp({providers:t,parent:i,debugName:e,runEnvironmentInitializers:!0}).injector}var hB=(()=>{class t{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let n=J0(!1,e.type),r=n.length>0?rd([n],this._injector,""):null;this.cachedInjectors.set(e,r)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=w({token:t,providedIn:"environment",factory:()=>new t(h(Jt))})}return t})();function D(t){return Ip(()=>{let i=Gx(t),e=ve(F({},i),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===SC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&t.dependencies||null,getStandaloneInjector:i.standalone?r=>r.get(hB).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||to.Emulated,styles:t.styles||ri,_:null,schemas:t.schemas||null,tView:null,id:""});i.standalone&&Mi("NgStandalone"),Wx(e);let n=t.dependencies;return e.directiveDefs=$A(n,mB),e.pipeDefs=$A(n,AD),e.id=vB(e),e})}function mB(t){return Mo(t)||W0(t)}function Ji(t){return Ip(()=>({type:t.type,bootstrap:t.bootstrap||ri,declarations:t.declarations||ri,imports:t.imports||ri,exports:t.exports||ri,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function gB(t,i){if(t==null)return ga;let e={};for(let n in t)if(t.hasOwnProperty(n)){let r=t[n],o,s,a,l;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o,l=r[3]||null):(o=r,s=r,a=wg.None,l=null),e[o]=[n,a,l],i[o]=s}return e}function _B(t){if(t==null)return ga;let i={};for(let e in t)t.hasOwnProperty(e)&&(i[t[e]]=e);return i}function Bt(t){return Ip(()=>{let i=Gx(t);return Wx(i),i})}function kp(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function Gx(t){let i={};return{type:t.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputConfig:t.inputs||ga,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||ri,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:gB(t.inputs,i),outputs:_B(t.outputs),debugInfo:null}}function Wx(t){t.features?.forEach(i=>
vendor: 7,093 bytes, line 4
4i(t))}function $A(t,i){return t?()=>{let e=typeof t=="function"?t():t,n=[];for(let r of e){let o=i(r);o!==null&&n.push(o)}return n}:null}function vB(t){let i=0,e=typeof t.consts=="function"?"":t.consts,n=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,e,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let o of n.join("|"))i=Math.imul(31,i)+o.charCodeAt(0)<<0;return i+=2147483648,"c"+i}function yB(t){return Object.getPrototypeOf(t.prototype).constructor}function Ee(t){let i=yB(t.type),e=!0,n=[t];for(;i;){let r;if(ko(t))r=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new Z(903,!1);r=i.\u0275dir}if(r){if(e){n.push(r);let s=t;s.inputs=Pb(t.inputs),s.declaredInputs=Pb(t.declaredInputs),s.outputs=Pb(t.outputs);let a=r.hostBindings;a&&IB(t,a);let l=r.viewQuery,c=r.contentQueries;if(l&&SB(t,l),c&&EB(t,c),bB(t,r),DD(t.outputs,r.outputs),ko(r)&&r.data.animation){let d=t.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(t),a===Ee&&(e=!1)}}i=Object.getPrototypeOf(i)}CB(n)}function bB(t,i){for(let e in i.inputs){if(!i.inputs.hasOwnProperty(e)||t.inputs.hasOwnProperty(e))continue;let n=i.inputs[e];n!==void 0&&(t.inputs[e]=n,t.declaredInputs[e]=i.declaredInputs[e])}}function CB(t){let i=0,e=null;for(let n=t.length-1;n>=0;n--){let r=t[n];r.hostVars=i+=r.hostVars,r.hostAttrs=Qc(r.hostAttrs,e=Qc(e,r.hostAttrs))}}function Pb(t){return t===ga?{}:t===ri?[]:t}function SB(t,i){let e=t.viewQuery;e?t.viewQuery=(n,r)=>{i(n,r),e(n,r)}:t.viewQuery=i}function EB(t,i){let e=t.contentQueries;e?t.contentQueries=(n,r,o)=>{i(n,r,o),e(n,r,o)}:t.contentQueries=i}function IB(t,i){let e=t.hostBindings;e?t.hostBindings=(n,r)=>{i(n,r),e(n,r)}:t.hostBindings=i}function zx(t,i,e,n,r,o,s,a){if(e.firstCreatePass){t.mergedAttrs=Qc(t.mergedAttrs,t.attrs);let d=t.tView=kC(2,t,r,o,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,e.consts,null);e.queries!==null&&(e.queries.template(e,t),d.queries=e.queries.embeddedTView(t))}a&&(t.flags|=a),Ll(t,!1);let l=TB(e,i,t,n);Vm()&&$C(e,i,l,t),Zc(l,i);let c=Cx(l,i,l,t);i[n+Wt]=c,FC(i,c),iB(c,t,i)}function wB(t,i,e,n,r,o,s,a,l,c,d){let p=e+Wt,y;return i.firstCreatePass?(y=Gl(i,p,4,s||null,a||null),xm()&&Ax(i,t,y,qi(i.consts,c),WC),nR(i,y)):y=i.data[p],zx(y,t,i,e,n,r,o,l),Hc(y)&&Mg(i,t,y),c!=null&&Mp(t,y,d),y}function ed(t,i,e,n,r,o,s,a,l,c,d){let p=e+Wt,y;if(i.firstCreatePass){if(y=Gl(i,p,4,s||null,a||null),c!=null){let b=qi(i.consts,c);y.localNames=[];for(let T=0;T<b.length;T+=2)y.localNames.push(b[T],-1)}}else y=i.data[p];return zx(y,t,i,e,n,r,o,l),c!=null&&Mp(t,y,d),y}function Lg(t,i,e,n,r,o,s,a){let l=ye(),c=Nt(),d=qi(c.consts,o);return wB(l,c,t,i,e,n,r,d,void 0,s,a),Lg}function qx(t,i,e,n,r,o,s,a){let l=ye(),c=Nt(),d=qi(c.consts,o);return ed(l,c,t,i,e,n,r,d,void 0,s,a),qx}var TB=DB;function DB(t,i,e,n){return cp(!0),i[Dt].createComment("")}var Fg=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function iS(t){return typeof t=="function"&&t[mn]!==void 0}function rS(t){return iS(t)&&typeof t.set=="function"}var Vg=new le(""),Ug=new le(""),Lp=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(e,n,r){this._ngZone=e,this.registry=n,eb()&&(this._destroyRef=U($n,{optional:!0})??void 0),oS||(Qx(r),r.addToWindow(n)),this._watchAngularEvents(),e.run(()=>{this._taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){let e=this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),n=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{ut.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{e.unsubscribe(),n.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>n.updateCb&&n.updateCb(e)?(clearTimeout(n.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,r){let o=-1;n&&n>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e()},n)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,n,r){if(r&&!this._taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,r),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,r){return[]}static \u0275fac=function(n){return new(n||t)(h(ut),h(Yx),h(Ug))};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),Yx=(()=>{class t{_applications=new Map;registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return oS?.findTestabilityInTree(this,e,n)??null}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function Qx(t){oS=t}var oS;function Ea(t){return!!t&&typeof t.then=="function"}function sS(t){return!!t&&typeof t.subscribe=="function"}var aS=new le("");function Bg(t){return Ts([{provide:aS,multi:!0,useValue:t}])}var lS=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,n)=>{this.resolve=e,this.reject=n});appInits=U(aS,{optional:!0})??[];injector=U(Ut);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let r of this.appInits){let o=Vn(this.injector,r);if(Ea(o))e.push(o);else if(sS(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});e.push(s)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{n()}).catch(r=>{this.reject(r)}),e.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Fp=new le("");function Zx(){i0(()=>{let t="";throw new Z(600,t)})}function Jx(t){return t.isBoundToModule}var AB=10;var si=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=U(Yi);afterRenderManager=U(jC);zonelessEnabled=U(Wc);
4rootEffectScheduler=U(Bm);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ot;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=U(Lo);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(P(e=>!e))}constructor(){U(Uo,{optional:!0})}whenStable(){let e;return new Promise(n=>{e=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{e.unsubscribe()})}_injector=U(Jt);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,n){return this.bootstrapImpl(e,n)}bootstrapImpl(e,n,r=Ut.NULL){return this._injector.get(ut).run(()=>{At(pt.BootstrapComponentStart);let s=e instanceof Og;if(!this._injector.get(lS).done){let T="";throw new Z(405,T)}let l;s?l=e:l=this._injector.get(Np).resolveComponentFactory(e),this.componentTypes.push(l.componentType);let c=Jx(l)?void 0:this._injector.get(Hl),d=n||l.selector,p=l.create(r,[],d,c),y=p.location.nativeElement,b=p.injector.get(Vg,null);return b?.registerApplication(y),p.onDestroy(()=>{this.detachView(p.hostView),mp(this.components,p),b?.unregisterApplication(y)}),this._loadComponent(p),At(pt.BootstrapComponentEnd,p),p})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){At(pt.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(Dg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw At(pt.ChangeDetectionEnd),new Z(101,!1);let e=Ie(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Ie(e),this.afterTick.next(),At(pt.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(jl,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<AB;){At(pt.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{At(pt.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let e=!1;if(this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!n&&!sp(r))continue;let o=n&&!this.zonelessEnabled?0:1;_x(r,o),e=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}e||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:e})=>sp(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){let n=e;mp(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(e),this._injector.get(Fp,[]).forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>mp(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Z(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function mp(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function cS(){let t,i;return{promise:new Promise((n,r)=>{t=n,i=r}),resolve:t,reject:i}}function jo(t,i,e,n){let r=ye(),o=Rs();if(xi(r,o,i)){let s=Nt(),a=lp();nU(a,r,t,i,e,n)}return jo}function Zm(t){if(Mi("NgAnimateEnter"),!xp)return Zm;let i=ye();if(zR(i))return Zm;let e=yn(),n=i[_i].get(ut);return QR(RA(i),e,()=>RB(i,e,t,n)),nx(i[_i]),ix(i[_i],RA(i)),Zm}function RB(t,i,e,n){let r=zi(i,t),o=t[Dt],s=YR(e),a=[],l=!1,c=p=>{if(vp(p)!==r)return;let y=p instanceof AnimationEvent?"animationend":"transitionend";n.runOutsideAngular(()=>{o.listen(r,y,d)})},d=p=>{vp(p)===r&&(BC(p,r)&&(l=!0),xB(p,r,o))};if(s&&s.length>0){n.runOutsideAngular(()=>{a.push(o.listen(r,"animationstart",c)),a.push(o.listen(r,"transitionstart",c))}),IV(r,s,a);for(let p of s)o.addClass(r,p);n.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!l&&(XR(r,Ul,xp),!Ul.has(r))){for(let p of s)o.removeClass(r,p);UC(r)}})})}}function xB(t,i,e){let n=Jc.get(i);if(!(vp(t)!==i||!n)&&BC(t,i)){t.stopPropagation();for(let r of n.classList)e.removeClass(i,r);UC(i)}}function Jm(t){if(Mi("NgAnimateLeave"),!xp)return Jm;let i=ye();if(zR(i))return Jm;let n=yn(),r=i[_i].get(ut);return QR(Tg(i),n,()=>MB(i,n,t,r)),nx(i[_i]),Jm}function MB(t,i,e,n){let{promise:r,resolve:o}=cS(),s=zi(i,t),a=t[Dt];ba.add(t[Oo]),(Tg(t).get(i.index).resolvers??=[]).push(o);let l=YR(e);return l&&l.length>0?PB(s,i,t,l,a,n):o(),{promise:r,resolve:o}}function PB(t,i,e,n,r,o){TV(t,r);let s=[],a=Tg(e).get(i.index)?.resolvers,l,c=!1,d=p=>{if(!(vp(p)!==t&&p.type!=="animation-fallback")&&(p.type==="animation-fallback"||BC(p,t))){if(c=!0,l&&clearTimeout(l),p.type!=="animation-fallback"&&p.stopPropagation(),Ul.delete(t),AA(i,t),Array.isArray(i.projection))for(let b of n)r.removeClass(t,b);xA(a,s),MA(e,i)}};o.runOutsideAngular(()=>{s.push(r.listen(t,"animationend",d)),s.push(r.listen(t,"transitionend",d))}),qR(i,t);for(let p of n)r.addClass(t,p);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(c)return;XR(t,Ul,xp);let p=Ul.get(t);p?(l=setTimeout(()=>{d(new CustomEvent("animation-fallback"))},p.duration+50),s.push(()=>clearTimeout(l))):(AA(i,t),xA(a,s),MA(e,i))})})}var uC=class{destroy(i){}updateValue(i,e){}swap(i,e){let n=Math.min(i,e),r=Math.max(i,e),o=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,o),this.attach(r,s)}else this.attach(n,o)}move(i,e){this.attach(e,this.detach(i))}};
vendor: 9,167 bytes, line 4
4function Ob(t,i,e,n,r){return t===e&&Object.is(i,n)?1:Object.is(r(t,i),r(e,n))?-1:0}function OB(t,i,e,n){let r,o,s=0,a=t.length-1,l=void 0;if(Array.isArray(i)){Ie(n);let c=i.length-1;for(Ie(null);s<=a&&s<=c;){let d=t.at(s),p=i[s],y=Ob(s,d,s,p,e);if(y!==0){y<0&&t.updateValue(s,p),s++;continue}let b=t.at(a),T=i[c],W=Ob(a,b,c,T,e);if(W!==0){W<0&&t.updateValue(a,T),a--,c--;continue}let j=e(s,d),ee=e(a,b),De=e(s,p);if(Object.is(De,ee)){let tt=e(c,T);Object.is(tt,j)?(t.swap(s,a),t.updateValue(a,T),c--,a--):t.move(a,s),t.updateValue(s,p),s++;continue}if(r??=new hg,o??=WA(t,s,a,e),pC(t,r,s,De))t.updateValue(s,p),s++,a++;else if(o.has(De))r.set(j,t.detach(s)),a--;else{let tt=t.create(s,i[s]);t.attach(s,tt),s++,a++}}for(;s<=c;)GA(t,r,e,s,i[s]),s++}else if(i!=null){Ie(n);let c=i[Symbol.iterator]();Ie(null);let d=c.next();for(;!d.done&&s<=a;){let p=t.at(s),y=d.value,b=Ob(s,p,s,y,e);if(b!==0)b<0&&t.updateValue(s,y),s++,d=c.next();else{r??=new hg,o??=WA(t,s,a,e);let T=e(s,y);if(pC(t,r,s,T))t.updateValue(s,y),s++,a++,d=c.next();else if(!o.has(T))t.attach(s,t.create(s,y)),s++,a++,d=c.next();else{let W=e(s,p);r.set(W,t.detach(s)),a--}}}for(;!d.done;)GA(t,r,e,t.length,d.value),d=c.next()}for(;s<=a;)t.destroy(t.detach(a--));r?.forEach(c=>{t.destroy(c)})}function pC(t,i,e,n){return i!==void 0&&i.has(n)?(t.attach(e,i.get(n)),i.delete(n),!0):!1}function GA(t,i,e,n,r){if(pC(t,i,n,e(n,r)))t.updateValue(n,r);else{let o=t.create(n,r);t.attach(n,o)}}function WA(t,i,e,n){let r=new Set;for(let o=i;o<=e;o++)r.add(n(o,t.at(o)));return r}var hg=class{kvMap=new Map;_vMap=void 0;has(i){return this.kvMap.has(i)}delete(i){if(!this.has(i))return!1;let e=this.kvMap.get(i);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(i,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(i),!0}get(i){return this.kvMap.get(i)}set(i,e){if(this.kvMap.has(i)){let n=this.kvMap.get(i);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,e)}else this.kvMap.set(i,e)}forEach(i){for(let[e,n]of this.kvMap)if(i(n,e),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),i(n,e)}}};function E(t,i,e,n,r,o,s,a){Mi("NgControlFlow");let l=ye(),c=Nt(),d=qi(c.consts,o);return ed(l,c,t,i,e,n,r,d,256,s,a),dS}function dS(t,i,e,n,r,o,s,a){Mi("NgControlFlow");let l=ye(),c=Nt(),d=qi(c.consts,o);return ed(l,c,t,i,e,n,r,d,512,s,a),dS}function I(t,i){Mi("NgControlFlow");let e=ye(),n=Rs(),r=e[n]!==oi?e[n]:-1,o=r!==-1?mg(e,Wt+r):void 0,s=0;if(xi(e,n,t)){let a=Ie(null);try{if(o!==void 0&&Ex(o,s),t!==-1){let l=Wt+t,c=mg(e,l),d=gC(e[Ae],l),p=wx(c,d,e),y=Pp(e,d,i,{dehydratedView:p});Op(c,y,s,Xc(d,p))}}finally{Ie(a)}}else if(o!==void 0){let a=Sx(o,s);a!==void 0&&(a[vn]=i)}}var fC=class{lContainer;$implicit;$index;constructor(i,e,n){this.lContainer=i,this.$implicit=e,this.$index=n}get $count(){return this.lContainer.length-an}};function Vp(t){return t}function se(t,i){return i}var hC=class{hasEmptyBlock;trackByFn;liveCollection;constructor(i,e,n){this.hasEmptyBlock=i,this.trackByFn=e,this.liveCollection=n}};function X(t,i,e,n,r,o,s,a,l,c,d,p,y){Mi("NgControlFlow");let b=ye(),T=Nt(),W=l!==void 0,j=ye(),ee=a?s.bind(j[vi][vn]):s,De=new hC(W,ee);j[Wt+t]=De,ed(b,T,t+1,i,e,n,r,qi(T.consts,o),256),W&&ed(b,T,t+2,l,c,d,p,qi(T.consts,y),512)}var mC=class extends uC{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(i,e,n){super(),this.lContainer=i,this.hostLView=e,this.templateTNode=n}get length(){return this.lContainer.length-an}at(i){return this.getLView(i)[vn].$implicit}attach(i,e){let n=e[Rl];this.needsIndexUpdate||=i!==this.length,Op(this.lContainer,e,i,Xc(this.templateTNode,n)),NB(this.lContainer,i)}detach(i){return this.needsIndexUpdate||=i!==this.length-1,kB(this.lContainer,i),LB(this.lContainer,i)}create(i,e){let n=ag(this.lContainer,this.templateTNode.tView.ssrId);return Pp(this.hostLView,this.templateTNode,new fC(this.lContainer,e,i),{dehydratedView:n})}destroy(i){Rg(i[Ae],i)}updateValue(i,e){this.getLView(i)[vn].$implicit=e}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i<this.length;i++)this.getLView(i)[vn].$index=i}getLView(i){return FB(this.lContainer,i)}};function K(t){let i=Ie(null),e=Xr();try{let n=ye(),r=n[Ae],o=n[e],s=e+1,a=mg(n,s);if(o.liveCollection===void 0){let c=gC(r,s);o.liveCollection=new mC(a,n,c)}else o.liveCollection.reset();let l=o.liveCollection;if(OB(l,t,o.trackByFn,i),l.updateIndexes(),o.hasEmptyBlock){let c=Rs(),d=l.length===0;if(xi(n,c,d)){let p=e+2,y=mg(n,p);if(d){let b=gC(r,p),T=wx(y,b,n),W=Pp(n,b,void 0,{dehydratedView:T});Op(y,W,0,Xc(b,T))}else r.firstUpdatePass&&TU(y),Ex(y,0)}}}finally{Ie(i)}}function mg(t,i){return t[i]}function NB(t,i){if(t.length<=an)return;let e=an+i,n=t[e],r=n?n[No]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=n[_i];NV(o,r),ba.delete(n[Oo]),r.detachedLeaveAnimationFns=void 0}}function kB(t,i){if(t.length<=an)return;let e=an+i,n=t[e],r=n?n[No]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function LB(t,i){return bp(t,i)}function FB(t,i){return Sx(t,i)}function gC(t,i){return Tm(t,i)}function S(t,i,e){let n=ye(),r=Rs();if(xi(n,r,i)){let o=Nt(),s=lp();dx(s,n,t,i,n[Dt],e)}return S}function _C(t,i,e,n,r){YC(i,t,e,r?"class":"style",n)}function m(t,i,e,n){let r=ye(),o=r[Ae],s=t+Wt,a=o.firstCreatePass?XC(s,r,2,i,WC,xm(),e,n):o.data[s];if(As(a)){let l=r[Zr].tracingService;if(l&&l.componentCreate){let c=o.data[a.directiveStart+a.componentOffset];return l.componentCreate(Ox(c),()=>(zA(t,i,r,a,n),m))}}return zA(t,i,r,a,n),m}function zA(t,i,e,n,r){if(zC(n,e,t,i,Xx),Hc(n)){let o=e[Ae];Mg(o,e,n),IC(o,n,e)}r!=null&&Mp(e,n)}function g(){let t=Nt(),i=yn(),e=qC(i);return t.firstCreatePass&&KC(t,e),hb(e)&&mb(),pb(),e.classesWithoutHost!=null&&u2(e)&&_C(t,e,ye(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&p2(e)&&_C(t,e,ye(),e.stylesWithoutHost,!1),g}function M(t,i,e,n){return m(t,i,e,n),g(),M}function te(t,i,e,n){let r=ye(),o=r[Ae],s=t+Wt,a=o.firstCreatePass?BU(s,o,2,i,e,n):o.data[s];return zC(a,r,t,i,Xx),n!=null&&Mp(r,a),te}function J(){let t=yn(),i=qC(t);return hb(i)&&mb(),pb(),J}function Qe(t,i,e,n){return te(t,i,e,n),J(),Qe}var Xx=(t,i,e,n,r)=>(cp(!0),NR(i[Dt],n,sA()));function uS(t,i,e){let n=ye(),r=n[Ae],o=t+Wt,s=r.firstCreatePass?XC(o,n,8,"ng-container",WC,xm(),i,e):r.data[o];if(zC(s,n,t,"ng-container",VB),Hc(s)){let a=n[Ae];Mg(a,n,s),IC(a,s,n)}return e!=null&&Mp(n,s),uS}function pS(){let t=Nt(),i=yn(),e=qC(i);return t.firstCreatePass&&KC(t,e),pS}function Kx(t,i,e){return uS(t,i,e),pS(),Kx}var VB=(t,i,e,n,r)=>(cp(!0),nV(i[Dt],""));function B(){return ye()}function Gn(t,i,e){let n=ye(),r=Rs();if(xi(n,r,i)){let o=Nt(),s=lp();ux(s,n,t,i,n[Dt],e)}return Gn}var pp=void 0;function UB(t){let i=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return i===1&&e===0?1:5}var BB=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],pp,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],pp,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",pp,pp,pp],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",UB],Nb={};function Xi(t){let i=jB(t),e=qA(i);if(e)return e;let n=i.split("-")[0];if(e=qA(n),e)return e;if(n==="en")return BB;throw new Z(701,!1)}function qA(t){return t in Nb||(Nb[t]=Fn.ng&&Fn.ng.common&&Fn.ng.common.locales&&Fn.ng.common.locales[t]),Nb[t]}var Sn=(function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t})(Sn||{});function jB(t){return t.toLowerCase().replace(/_/g,"-")}var Up="en-US";var HB=Up;function eM(t){typeof t=="string"&&(HB=t.toLowerCase().replace(/_/g,"-"))}function A(t,i,e){let n=ye(),r=Nt(),o=yn();return tM(r,n,n[Dt],o,t,i,e),A}function qe(t,i,e){let n=ye(),r=Nt(),o=yn();return(o.type&3||e)&&Mx(o,r,n,e,n[Dt],t,i,Qm(o,n,i)),qe}function tM(t,i,e,n,r,o,s){let a=!0,l=null;
vendor: 4,750 bytes, line 4
4if((n.type&3||s)&&(l??=Qm(n,i,o),Mx(n,t,i,s,e,r,o,l)&&(a=!1)),a){let c=n.outputs?.[r],d=n.hostDirectiveOutputs?.[r];if(d&&d.length)for(let p=0;p<d.length;p+=2){let y=d[p],b=d[p+1];l??=Qm(n,i,o),BA(n,i,y,b,r,l)}if(c&&c.length)for(let p of c)l??=Qm(n,i,o),BA(n,i,p,r,r,l)}}function _(t=1){return oA(t)}function $B(t,i){let e=null,n=pV(t);for(let r=0;r<i.length;r++){let o=i[r];if(o==="*"){e=r;continue}if(n===null?jR(t,o,!0):mV(n,o))return r}return e}function io(t){let i=ye()[vi][gi];if(!i.projection){let e=t?t.length:1,n=i.projection=ND(e,null),r=n.slice(),o=i.child;for(;o!==null;){if(o.type!==128){let s=t?$B(o,t):0;s!==null&&(r[s]?r[s].projectionNext=o:n[s]=o,r[s]=o)}o=o.next}}}function ro(t,i=0,e,n,r,o){let s=ye(),a=Nt(),l=n?t+1:null;l!==null&&ed(s,a,l,n,r,o,null,e);let c=Gl(a,Wt+t,16,null,e||null);c.projection===null&&(c.projection=i),vb();let p=!s[Rl]||fb();s[vi][gi].projection[c.projection]===null&&l!==null?GB(s,a,l):p&&!Sg(c)&&WV(a,s,c)}function GB(t,i,e){let n=Wt+e,r=i.data[n],o=t[n],s=ag(o,r.tView.ssrId),a=Pp(t,r,void 0,{dehydratedView:s});Op(o,a,0,Xc(r,s))}function Ia(t,i,e,n){return cB(t,i,e,n),Ia}function Ve(t,i,e){return Vx(t,i,e),Ve}function be(t){let i=ye(),e=Nt(),n=Om();ap(n+1);let r=nS(e,n);if(t.dirty&&HD(i)===((r.metadata.flags&2)===2)){if(r.matches===null)t.reset([]);else{let o=Bx(i,n);t.reset(o,hR),t.notifyOnChanges()}return!0}return!1}function Ce(){return tS(ye(),Om())}function jg(t,i,e,n){return pB(t,Vx(i,e,n)),jg}function fS(t=1){ap(Om()+t)}function Ho(t){let i=yb();return Dm(i,Wt+t)}function Gm(t,i){return t<<17|i<<2}function $l(t){return t>>17&32767}function WB(t){return(t&2)==2}function zB(t,i){return t&131071|i<<17}function vC(t){return t|2}function td(t){return(t&131068)>>2}function kb(t,i){return t&-131069|i<<2}function qB(t){return(t&1)===1}function yC(t){return t|1}function YB(t,i,e,n,r,o){let s=o?i.classBindings:i.styleBindings,a=$l(s),l=td(s);t[n]=e;let c=!1,d;if(Array.isArray(e)){let p=e;d=p[1],(d===null||Vc(p,d)>0)&&(c=!0)}else d=e;if(r)if(l!==0){let y=$l(t[a+1]);t[n+1]=Gm(y,a),y!==0&&(t[y+1]=kb(t[y+1],n)),t[a+1]=zB(t[a+1],n)}else t[n+1]=Gm(a,0),a!==0&&(t[a+1]=kb(t[a+1],n)),a=n;else t[n+1]=Gm(l,0),a===0?a=n:t[l+1]=kb(t[l+1],n),l=n;c&&(t[n+1]=vC(t[n+1])),YA(t,d,n,!0),YA(t,d,n,!1),QB(i,d,t,n,o),s=Gm(a,l),o?i.classBindings=s:i.styleBindings=s}function QB(t,i,e,n,r){let o=r?t.residualClasses:t.residualStyles;o!=null&&typeof i=="string"&&Vc(o,i)>=0&&(e[n+1]=yC(e[n+1]))}function YA(t,i,e,n){let r=t[e+1],o=i===null,s=n?$l(r):td(r),a=!1;for(;s!==0&&(a===!1||o);){let l=t[s],c=t[s+1];ZB(l,i)&&(a=!0,t[s+1]=n?yC(c):vC(c)),s=n?$l(c):td(c)}a&&(t[e+1]=n?vC(r):yC(r))}function ZB(t,i){return t===null||i==null||(Array.isArray(t)?t[1]:t)===i?!0:Array.isArray(t)&&typeof i=="string"?Vc(t,i)>=0:!1}var eo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function JB(t){return t.substring(eo.key,eo.keyEnd)}function XB(t){return KB(t),nM(t,iM(t,0,eo.textEnd))}function nM(t,i){let e=eo.textEnd;return e===i?-1:(i=eo.keyEnd=ej(t,eo.key=i,e),iM(t,i,e))}function KB(t){eo.key=0,eo.keyEnd=0,eo.value=0,eo.valueEnd=0,eo.textEnd=t.length}function iM(t,i,e){for(;i<e&&t.charCodeAt(i)<=32;)i++;return i}function ej(t,i,e){for(;i<e&&t.charCodeAt(i)>32;)i++;return i}function bt(t,i,e){return rM(t,i,e,!1),bt}function H(t,i){return rM(t,i,null,!0),H}function $o(t){nj(lj,tj,t,!0)}function tj(t,i){for(let e=XB(i);e>=0;e=nM(i,e))Em(t,JB(i),!0)}function rM(t,i,e,n){let r=ye(),o=Nt(),s=Mm(2);if(o.firstUpdatePass&&sM(o,t,s,n),i!==oi&&xi(r,s,i)){let a=o.data[Xr()];aM(o,a,r,r[Dt],t,r[s+1]=dj(i,e),n,s)}}function nj(t,i,e,n){let r=Nt(),o=Mm(2);r.firstUpdatePass&&sM(r,null,o,n);let s=ye();if(e!==oi&&xi(s,o,e)){let a=r.data[Xr()];if(lM(a,n)&&!oM(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(e=vm(l,e||"")),_C(r,a,s,e,n)}else cj(r,a,s,s[Dt],s[o+1],s[o+1]=aj(t,i,e),n,o)}}function oM(t,i){return i>=t.expandoStartIndex}function sM(t,i,e,n){let r=t.data;if(r[e+1]===null){let o=r[Xr()],s=oM(t,e);lM(o,n)&&i===null&&!s&&(i=!1),i=ij(r,o,i,n),YB(r,o,i,e,s,n)}}function ij(t,i,e,n){let r=tA(t),o=n?i.residualClasses:i.residualStyles;if(r===null)(n?i.classBindings:i.styleBindings)===0&&(e=Lb(null,t,i,e,n),e=Ep(e,i.attrs,n),o=null);else{let s=i.directiveStylingLast;if(s===-1||t[s]!==r)if(e=Lb(r,t,i,e,n),o===null){let l=rj(t,i,n);l!==void 0&&Array.isArray(l)&&(l=Lb(null,t,i,l[1],n),l=Ep(l,i.attrs,n),oj(t,i,n,l))}else o=sj(t,i,n)}return o!==void 0&&(n?i.residualClasses=o:i.residualStyles=o),e}function rj(t,i,e){let n=e?i.classBindings:i.styleBindings;if(td(n)!==0)return t[$l(n)]}function oj(t,i,e,n){let r=e?i.classBindings:i.styleBindings;t[$l(r)]=n}function sj(t,i,e){let n,r=i.directiveEnd;for(let o=1+i.directiveStylingLast;o<r;o++){let s=t[o].hostAttrs;n=Ep(n,s,e)}return Ep(n,i.attrs,e)}
vendor: 6,834 bytes, line 4
4function Lb(t,i,e,n,r){let o=null,s=e.directiveEnd,a=e.directiveStylingLast;for(a===-1?a=e.directiveStart:a++;a<s&&(o=i[a],n=Ep(n,o.hostAttrs,r),o!==t);)a++;return t!==null&&(e.directiveStylingLast=a),n}function Ep(t,i,e){let n=e?1:2,r=-1;if(i!==null)for(let o=0;o<i.length;o++){let s=i[o];typeof s=="number"?r=s:r===n&&(Array.isArray(t)||(t=t===void 0?[]:["",t]),Em(t,s,e?!0:i[++o]))}return t===void 0?null:t}function aj(t,i,e){if(e==null||e==="")return ri;let n=[],r=Qi(e);if(Array.isArray(r))for(let o=0;o<r.length;o++)t(n,r[o],!0);else if(r instanceof Set)for(let o of r)t(n,o,!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&t(n,o,r[o]);else typeof r=="string"&&i(n,r);return n}function lj(t,i,e){let n=String(i);n!==""&&!n.includes(" ")&&Em(t,n,e)}function cj(t,i,e,n,r,o,s,a){r===oi&&(r=ri);let l=0,c=0,d=0<r.length?r[0]:null,p=0<o.length?o[0]:null;for(;d!==null||p!==null;){let y=l<r.length?r[l+1]:void 0,b=c<o.length?o[c+1]:void 0,T=null,W;d===p?(l+=2,c+=2,y!==b&&(T=p,W=b)):p===null||d!==null&&d<p?(l+=2,T=d):(c+=2,T=p,W=b),T!==null&&aM(t,i,e,n,T,W,s,a),d=l<r.length?r[l]:null,p=c<o.length?o[c]:null}}function aM(t,i,e,n,r,o,s,a){if(!(i.type&3))return;let l=t.data,c=l[a+1],d=qB(c)?QA(l,i,e,r,td(c),s):void 0;if(!gg(d)){gg(o)||WB(c)&&(o=QA(l,null,e,r,a,s));let p=sb(Xr(),e);qV(n,s,p,r,o)}}function QA(t,i,e,n,r,o){let s=i===null,a;for(;r>0;){let l=t[r],c=Array.isArray(l),d=c?l[1]:l,p=d===null,y=e[r+1];y===oi&&(y=p?ri:void 0);let b=p?Im(y,n):d===n?y:void 0;if(c&&!gg(b)&&(b=Im(l,n)),gg(b)&&(a=b,s))return a;let T=t[r+1];r=s?$l(T):td(T)}if(i!==null){let l=o?i.residualClasses:i.residualStyles;l!=null&&(a=Im(l,n))}return a}function gg(t){return t!==void 0}function dj(t,i){return t==null||t===""||(typeof i=="string"?t=t+i:typeof t=="object"&&(t=ep(Qi(t)))),t}function lM(t,i){return(t.flags&(i?8:16))!==0}function N(t,i=""){let e=ye(),n=Nt(),r=t+Wt,o=n.firstCreatePass?Gl(n,r,1,i,null):n.data[r],s=uj(n,e,o,i);e[r]=s,Vm()&&$C(n,e,s,o),Ll(o,!1)}var uj=(t,i,e,n)=>(cp(!0),eV(i[Dt],n));function cM(t,i,e,n=""){return xi(t,Rs(),e)?i+ma(e)+n:oi}function pj(t,i,e,n,r,o=""){let s=ZD(),a=Cp(t,s,e,r);return Mm(2),a?i+ma(e)+n+ma(r)+o:oi}function Q(t){return ce("",t),Q}function ce(t,i,e){let n=ye(),r=cM(n,t,i,e);return r!==oi&&dM(n,Xr(),r),ce}function Hg(t,i,e,n,r){let o=ye(),s=pj(o,t,i,e,n,r);return s!==oi&&dM(o,Xr(),s),Hg}function dM(t,i,e){let n=sb(i,t);tV(t[Dt],n,e)}function Rt(t,i,e){rS(i)&&(i=i());let n=ye(),r=Rs();if(xi(n,r,i)){let o=Nt(),s=lp();dx(s,n,t,i,n[Dt],e)}return Rt}function Pt(t,i){let e=rS(t);return e&&t.set(i),e}function xt(t,i){let e=ye(),n=Nt(),r=yn();return tM(n,e,e[Dt],r,t,i),xt}var uM={};function pM(t){Mi("NgLet");let i=Nt(),e=ye(),n=t+Wt,r=Gl(i,n,128,null,null);return Ll(r,!1),op(i,e,n,uM),pM}function fj(t){let i=Nt(),e=ye(),n=Xr();return op(i,e,n,t),t}function hj(t){let i=yb(),e=Dm(i,Wt+t);if(e===uM)throw new Z(314,!1);return e}function wa(t){return xi(ye(),Rs(),t)?ma(t):oi}function yr(t,i,e=""){return cM(ye(),t,i,e)}function ZA(t,i,e){let n=Nt();n.firstCreatePass&&fM(i,n.data,n.blueprint,ko(t),e)}function fM(t,i,e,n,r){if(t=Xn(t),Array.isArray(t))for(let o=0;o<t.length;o++)fM(t[o],i,e,n,r);else{let o=Nt(),s=ye(),a=yn(),l=Tl(t)?t:Xn(t.provide),c=K0(t),d=a.providerIndexes&1048575,p=a.directiveStart,y=a.providerIndexes>>20;if(Tl(t)||!t.multi){let b=new Bl(c,r,f,null),T=Vb(l,i,r?d:d+y,p);T===-1?(Bb(ng(a,s),o,l),Fb(o,t,i.length),i.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(b),s.push(b)):(e[T]=b,s[T]=b)}else{let b=Vb(l,i,d+y,p),T=Vb(l,i,d,d+y),W=b>=0&&e[b],j=T>=0&&e[T];if(r&&!j||!r&&!W){Bb(ng(a,s),o,l);let ee=_j(r?gj:mj,e.length,r,n,c,t);!r&&j&&(e[T].providerFactory=ee),Fb(o,t,i.length,0),i.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(ee),s.push(ee)}else{let ee=hM(e[r?T:b],c,!r&&n);Fb(o,t,b>-1?b:T,ee)}!r&&n&&j&&e[T].componentProviders++}}}function Fb(t,i,e,n){let r=Tl(i),o=UD(i);if(r||o){let l=(o?Xn(i.useClass):i).prototype.ngOnDestroy;if(l){let c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&i.multi){let d=c.indexOf(e);d===-1?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function hM(t,i,e){return e&&t.componentProviders++,t.multi.push(i)-1}function Vb(t,i,e,n){for(let r=e;r<n;r++)if(i[r]===t)return r;return-1}function mj(t,i,e,n,r){return bC(this.multi,[])}function gj(t,i,e,n,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=gp(n,n[Ae],this.providerFactory.index,r);s=l.slice(0,a),bC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],bC(o,s);return s}function bC(t,i){for(let e=0;e<t.length;e++){let n=t[e];i.push(n())}return i}function _j(t,i,e,n,r,o){let s=new Bl(t,e,f,null);return s.multi=[],s.index=i,s.componentProviders=0,hM(s,r,n&&!e),s}function Ta(t,i){return e=>{e.providersResolver=(n,r)=>ZA(n,r?r(t):t,!1),i&&(e.viewProvidersResolver=(n,r)=>ZA(n,r?r(i):i,!0))}}function Wl(t,i){let e=Gc()+t,n=ye();return n[e]===oi?Ng(n,e,i()):xx(n,e)}function br(t,i,e){return vj(ye(),Gc(),t,i,e)}function od(t,i,e,n){return gM(ye(),Gc(),t,i,e,n)}function hS(t,i,e,n,r,o,s,a,l){let c=Gc()+t,d=ye(),p=HU(d,c,e,n,r,o);return jU(d,c+4,s,a,l)||p?Ng(d,c+7,i(e,n,r,o,s,a,l)):xx(d,c+7)}function mM(t,i){let e=t[i];return e===oi?void 0:e}function vj(t,i,e,n,r,o){let s=i+e;return xi(t,s,r)?Ng(t,s+1,o?n.call(o,r):n(r)):mM(t,s+1)}function gM(t,i,e,n,r,o,s){let a=i+e;return Cp(t,a,r,o)?Ng(t,a+2,s?n.call(s,r,o):n(r,o)):mM(t,a+2)}function Bp(t,i){let e=Nt(),n,r=t+Wt;e.firstCreatePass?(n=yj(i,e.pipeRegistry),e.data[r]=n,n.onDestroy&&(e.destroyHooks??=[]).push(r,n.onDestroy)):n=e.data[r];let o=n.factory||(n.factory=pa(n.type,!0)),s,a=mi(f);try{let l=tg(!1),c=o();return tg(l),op(e,ye(),r,c),c}finally{mi(a)}}function yj(t,i){if(i)for(let e=i.length-1;e>=0;e--){let n=i[e];if(t===n.name)return n}}function jp(t,i,e,n){let r=t+Wt,o=ye(),s=Dm(o,r);return bj(o,r)?gM(o,Gc(),i,s.transform,e,n,s):s.transform(e,n)}function bj(t,i){return t[Ae].data[i].pure}function Cj(t,i){return Pg(t,i)}var _g=class{ngModuleFactory;componentFactories;constructor(i,e){this.ngModuleFactory=i,this.componentFactories=e}},mS=(()=>{class t{compileModuleSync(e){return new fg(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let n=this.compileModuleSync(e),r=G0(e),o=UR(r.declarations).reduce((s,a)=>{let l=Mo(a);return l&&s.push(new Sa(l)),s},[]);return new _g(n,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var _M=(()=>{class t{applicationErrorHandler=U(Yi);appRef=U(si);taskService=U(Lo);ngZone=U(ut);zonelessEnabled=U(Wc);tracing=U(Uo,{optional:!0});
4zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new gn;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Xu):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(U(Um,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let e=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(e);return}this.switchToMicrotaskScheduler(),this.taskService.remove(e)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let e=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})})}notify(e){if(!this.zonelessEnabled&&e===5)return;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let n=this.useMicrotaskScheduler?cA:wb;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>n(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>n(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Xu+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){this.applicationErrorHandler(n)}finally{this.taskService.remove(e),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function vM(){return[{provide:xo,useExisting:_M},{provide:ut,useClass:Ku},{provide:Wc,useValue:!0}]}function Sj(){return typeof $localize<"u"&&$localize.locale||Up}var Hp=new le("",{factory:()=>U(Hp,{optional:!0,skipSelf:!0})||Sj()});var $p=class{destroyed=!1;listeners=null;errorHandler=U(pr,{optional:!0});destroyRef=U($n);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(i){if(this.destroyed)throw new Z(953,!1);return(this.listeners??=[]).push(i),{unsubscribe:()=>{let e=this.listeners?.indexOf(i);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(i){if(this.destroyed){console.warn(fr(953,!1));return}if(this.listeners===null)return;let e=Ie(null);try{for(let n of this.listeners)try{n(i)}catch(r){this.errorHandler?.handleError(r)}}finally{Ie(e)}}};function lt(t){return SD(t)}function Xe(t,i){return $u(t,i?.equal)}var Ej=t=>t;function gS(t,i){if(typeof t=="function"){let e=I0(t,Ej,i?.equal);return yM(e,i?.debugName)}else{let e=I0(t.source,t.computation,t.equal);return yM(e,t.debugName)}}function yM(t,i){let e=t[mn],n=t;return n.set=r=>bD(e,r),n.update=r=>CD(e,r),n.asReadonly=dp.bind(t),n}var Wg=Symbol("InputSignalNode#UNSET"),TM=ve(F({},Lh),{transformFn:void 0,applyValueToInputSignal(t,i){da(t,i)}});function DM(t,i){let e=Object.create(TM);e.value=t,e.transformFn=i?.transform;function n(){if(la(e),e.value===Wg){let r=null;throw new Z(-950,r)}return e.value}return n[mn]=e,n}var Gg=class{attributeName;constructor(i){this.attributeName=i}__NG_ELEMENT_ID__=()=>wp(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}};function Ps(t){return new $p}function bM(t,i){return DM(t,i)}function Lj(t){return DM(Wg,t)}var Ct=(bM.required=Lj,bM);function CM(t,i){return Hx(i)}function Fj(t,i){return $x(i)}var AM=(CM.required=Fj,CM);function RM(t,i){let e=Object.create(TM),n=new $p;e.value=t;function r(){return la(e),SM(e.value),e.value}return r[mn]=e,r.asReadonly=dp.bind(r),r.set=o=>{e.equal(e.value,o)||(da(e,o),n.emit(o))},r.update=o=>{SM(e.value),r.set(o(e.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function SM(t){if(t===Wg)throw new Z(952,!1)}function EM(t,i){return RM(t,i)}function Vj(t){return RM(Wg,t)}var xM=(EM.required=Vj,EM);var Uj=(()=>{class t{zone=U(ut);
4changeDetectionScheduler=U(xo);applicationRef=U(si);applicationErrorHandler=U(Yi);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(e){this.applicationErrorHandler(e)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Bj=new le("",{factory:()=>!1});function jj({ngZoneFactory:t,scheduleInRootZone:i}){return t??=()=>new ut(ve(F({},MM()),{scheduleInRootZone:i})),[{provide:Wc,useValue:!1},{provide:ut,useFactory:t},{provide:ws,multi:!0,useFactory:()=>{let e=U(Uj,{optional:!0});return()=>e.initialize()}},{provide:ws,multi:!0,useFactory:()=>{let e=U(Hj);return()=>{e.initialize()}}},{provide:Um,useValue:i??Ib}]}function cbe(t){let i=t?.scheduleInRootZone,e=jj({ngZoneFactory:()=>{let n=MM(t);return n.scheduleInRootZone=i,n.shouldCoalesceEventChangeDetection&&Mi("NgZone_CoalesceEvent"),new ut(n)},scheduleInRootZone:i});return Ts([{provide:Bj,useValue:!0},e])}function MM(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var Hj=(()=>{class t{subscription=new gn;initialized=!1;zone=U(ut);pendingTasks=U(Lo);initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ut.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ut.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var _S=new le(""),$j=new le("");function Gp(t){return!t.moduleRef}function Gj(t){let i=Gp(t)?t.r3Injector:t.moduleRef.injector,e=i.get(ut);return e.run(()=>{Gp(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let n=i.get(Yi),r;if(e.runOutsideAngular(()=>{r=e.onError.subscribe({next:n})}),Gp(t)){let o=()=>i.destroy(),s=t.platformInjector.get(_S);s.add(o),i.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>t.moduleRef.destroy(),s=t.platformInjector.get(_S);s.add(o),t.moduleRef.onDestroy(()=>{mp(t.allPlatformModules,t.moduleRef),r.unsubscribe(),s.delete(o)})}return zj(n,e,()=>{let o=i.get(Lo),s=o.add(),a=i.get(lS);return a.runInitializers(),a.donePromise.then(()=>{let l=i.get(Hp,Up);if(eM(l||Up),!i.get($j,!0))return Gp(t)?i.get(si):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Gp(t)){let d=i.get(si);return t.rootComponent!==void 0&&d.bootstrap(t.rootComponent),d}else return Wj?.(t.moduleRef,t.allPlatformModules),t.moduleRef}).finally(()=>{o.remove(s)})})})}var Wj;function zj(t,i,e){try{let n=e();return Ea(n)?n.catch(r=>{throw i.runOutsideAngular(()=>t(r)),r}):n}catch(n){throw i.runOutsideAngular(()=>t(n)),n}}var $g=null;function qj(t=[],i){return Ut.create({name:i,providers:[{provide:ip,useValue:"platform"},{provide:_S,useValue:new Set([()=>$g=null])},...t]})}function Yj(t=[]){if($g)return $g;let i=qj(t);return $g=i,Zx(),Qj(i),i}function Qj(t){let i=t.get(yg,null);Vn(t,()=>{i?.forEach(e=>e())})}var Zj=1e4;var dbe=Zj-1e3;var Pe=(()=>{class t{static __NG_ELEMENT_ID__=Jj}return t})();function Jj(t){return Xj(yn(),ye(),(t&16)===16)}function Xj(t,i,e){if(As(t)&&!e){let n=gr(t.index,i);return new Ca(n,n)}else if(t.type&175){let n=i[vi];return new Ca(n,i)}return null}var vS=class{supports(i){return i instanceof Map||eS(i)}create(){return new yS}},yS=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(i){let e;for(e=this._mapHead;e!==null;e=e._next)i(e)}forEachPreviousItem(i){let e;for(e=this._previousMapHead;e!==null;e=e._nextPrevious)i(e)}forEachChangedItem(i){let e;for(e=this._changesHead;e!==null;e=e._nextChanged)i(e)}forEachAddedItem(i){let e;for(e=this._additionsHead;e!==null;e=e._nextAdded)i(e)}forEachRemovedItem(i){let e;for(e=this._removalsHead;e!==null;e=e._nextRemoved)i(e)}diff(i){if(!i)i=new Map;else if(!(i instanceof Map||eS(i)))throw new Z(900,!1);return this.check(i)?this:null}check(i){this._reset();let e=this._mapHead;
vendor: 2,052 bytes, line 4
4if(this._appendAfter=null,this._forEach(i,(n,r)=>{if(e&&e.key===r)this._maybeAddToChanges(e,n),this._appendAfter=e,e=e._next;else{let o=this._getOrCreateRecordForKey(r,n);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let n=e;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,e){if(i){let n=i._prev;return e._next=i,e._prev=n,i._prev=e,n&&(n._next=e),i===this._mapHead&&(this._mapHead=e),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(i,e){if(this._records.has(i)){let r=this._records.get(i);this._maybeAddToChanges(r,e);let o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}let n=new bS(i);return this._records.set(i,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;i!==null;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;i!=null;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,e){Object.is(e,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=e,this._addToChanges(i))}_addToAdditions(i){this._additionsHead===null?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){this._changesHead===null?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,e){i instanceof Map?i.forEach(e):Object.keys(i).forEac
4h(n=>e(i[n],n))}},bS=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(i){this.key=i}};function IM(){return new SS([new vS])}var SS=(()=>{class t{static \u0275prov=w({token:t,providedIn:"root",factory:IM});factories;constructor(e){this.factories=e}static create(e,n){if(n){let r=n.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let n=U(t,{optional:!0,skipSelf:!0});return t.create(e,n||IM())}}}find(e){let n=this.factories.find(r=>r.supports(e));if(n)return n;throw new Z(901,!1)}}return t})();var PM=(()=>{class t{constructor(e){}static \u0275fac=function(n){return new(n||t)(h(si))};static \u0275mod=Ji({type:t});static \u0275inj=Ri({})}return t})();function OM(t){let{rootComponent:i,appProviders:e,platformProviders:n,platformRef:r}=t;At(pt.BootstrapApplicationStart);try{let o=r?.injector??Yj(n),s=[vM(),uA,...e||[]],a=new Sp({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return Gj({r3Injector:a.injector,platformInjector:o,rootComponent:i})}catch(o){return Promise.reject(o)}finally{At(pt.BootstrapApplicationEnd)}}function zl(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function sd(t,i){let e=Mo(t),n=i.elementInjector||Uc();return new Sa(e).create(n,i.projectableNodes,i.hostElement,i.environmentInjector,i.directives,i.bindings)}function NM(t){let i=Mo(t);if(!i)return null;let e=new Sa(i);return{get selector(){return e.selector},get type(){return e.componentType},get inputs(){return e.inputs},get outputs(){return e.outputs},get ngContentSelectors(){return e.ngContentSelectors},get isStandalone(){return i.standalone},get isSignal(){return i.signals}}}var oo=(function(t){return t.BANNER="BANNER",t.RIBBON="RIBBON",t.GRID="GRID",t})(oo||{});
4var yi=class{constructor(i){Object.keys(i).forEach(e=>this[e]=i[e])}},qg=(function(t){return t.VOD="VOD",t.PROGRAM="PROGRAM",t.SERIES="SERIES",t.CHANNEL="CHANNEL",t.SCHEDULE="SCHEDULE",t.RECORDING="RECORDING",t.ARTICLE="ARTICLE",t.BUNDLE="BUNDLE",t.PAGE="PAGE",t})(qg||{});var Xt=ve(F({},Gy),{SAVE:"SAVE"}),it=(function(t){return t.SEARCH_PAGE="SEARCH_PAGE",t.TV_GUIDE_PAGE="TV_GUIDE_PAGE",t.LIST_PAGE="LIST_PAGE",t.CMS_PAGE="CMS_PAGE",t.SETTINGS_PAGE="SETTINGS_PAGE",t.REMINDERS_PAGE="REMINDERS_PAGE",t.RECORDINGS_RECORDED_PAGE="RECORDINGS_RECORDED_PAGE",t.RECORDINGS_PLANNED_PAGE="RECORDINGS_PLANNED_PAGE",t.RECORDINGS_CONFLICT_PAGE="RECORDINGS_CONFLICT_PAGE",t.RECORDINGS_EXPIRE_PAGE="RECORDINGS_EXPIRE_PAGE",t.CLIENT_AREA_PAGE="CLIENT_AREA_PAGE",t})(it||{}),Ze=(function(t){return t.MY_WORLD_ICON="MY_WORLD_ICON",t.CATCHUP_ICON="CATCHUP_ICON",t.NOW_ICON="NOW_ICON",t.ON_DEMAND_ICON="ON_DEMAND_ICON",t.SEARCH_ICON="SEARCH_ICON",t.STAR_ICON="STAR_ICON",t.HEART_ICON="HEART_ICON",t.TV_ICON="TV_ICON",t.RECENT_ICON="RECENT_ICON",t.PLAY_TV_ICON="PLAY_TV_ICON",t.LIST_ICON="LIST_ICON",t.MOVIE_ICON="MOVIE_ICON",t.SERIES_ICON="SERIES_ICON",t.RECORDED_ICON="RECORDED_ICON",t.PLANNED_ICON="PLANNED_ICON",t.EXPIRE_ICON="EXPIRE_ICON",t.REMINDERS_ICON="REMINDERS_ICON",t.LOGOUT_ICON="LOGOUT_ICON",t.CONFLICTS_ICON="CONFLICTS_ICON",t.CLIENTAREA_ICON="CLIENTAREA_ICON",t.ADULT_ICON="ADULT_ICON",t.NEW_ICON="NEW_ICON",t.SETTINGS_ICON="SETTINGS_ICON",t.HORSESHOE_ICON="HORSESHOE_ICON",t.HORSE_ICON="HORSE_ICON",t.MESSAGE_ICON="MESSAGE_ICON",t.BELL_ICON="BELL_ICON",t.DOCUMENTS_ICON="DOCUMENTS_ICON",t.SULKY_ICON="SULKY_ICON",t.PEOPLE_ICON="PEOPLE_ICON",t.VIDEOFOLDER_ICON="VIDEOFOLDER_ICON",t.HORSEHEAD_ICON="HORSEHEAD_ICON",t.HORSE_WITH_DRIVER_ICON="HORSE_WITH_DRIVER_ICON",t.BIKE_ICON="BIKE_ICON",t.HEALING_ICON="HEALING_ICON",t.MEDICAL_ICON="MEDICAL_ICON",t})(Ze||{}),oe=(function(t){return t.AUTH_REQUIRED="AUTH_REQUIRED",t.ADULT_REQUIRED="ADULT_REQUIRED",t.ALLOW_ADULT="ALLOW_ADULT",t.NPVR_REQUIRED="NPVR_REQUIRED",t.LOCAL_RECORDER_REQUIRED="LOCAL_RECORDER_REQUIRED",t.FOCUS_PAST="FOCUS_PAST",t.FOCUS_FUTURE="FOCUS_FUTURE",t.SHOWPROGRESS="SHOWPROGRESS",t.VOD_FILTER_RATING="VOD_FILTER_RATING",t.VOD_FILTER_PRODUCTIONYEAR="VOD_FILTER_PRODUCTIONYEAR",t.VOD_FILTER_CATEGORY="VOD_FILTER_CATEGORY",t.USE_BEST_SCHEDULE="USE_BEST_SCHEDULE",t.SHOW_SCHEDULE_INFO="SHOW_SCHEDULE_INFO",t.SHOW_EPISODE_INFO="SHOW_EPISODE_INFO",t.HIDE_INFO="HIDE_INFO",t.HIDE_MINI_DETAIL="HIDE_MINI_DETAIL",t.LIVE_THUMBNAIL="LIVE_THUMBNAIL",t.SHOW_COUNT="SHOW_COUNT",t.SAVE_ASSET="SAVE_ASSET",t})(oe||{}),zg=class{constructor(i){this.rows=i.rows,this.properties=i.properties,this.uniqueSearchTypes=Array.from(new Set(this.rows.map(e=>e.type)))}getUniqueSearchTypes(){return this.uniqueSearchTypes}},Da=(function(t){return t.ASPECT_RATIO_7_1="ASPECT_RATIO_7_1",t.ASPECT_RATIO_7_2="ASPECT_RATIO_7_2",t.ASPECT_RATIO_7_3="ASPECT_RATIO_7_3",t})(Da||{});var rn=(function(t){return t.SMALL="SMALL",t.MEDIUM="MEDIUM",t.NORMAL="NORMAL",t.LARGE="LARGE",t.EXTRA_LARGE="EXTRA_LARGE",t})(rn||{});function Wp(t,i){i=encodeURIComponent(i);for(let e of t.split(";")){let n=e.indexOf("="),[r,o]=n==-1?[e,""]:[e.slice(0,n),e.slice(n+1)];if(r.trim()===i)return decodeURIComponent(o)}return null}var ql=class{};var kM=null;function Pi(){return kM}function ES(t){kM??=t}var zp=class{},Os=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:()=>U(LM),providedIn:"platform"})}return t})(),IS=new le(""),LM=(()=>{class t extends Os{_location;_history;_doc=U(Yt);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Pi().getBaseHref(this._doc)}onPopState(e){let n=Pi().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){let n=Pi().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,r){this._history.pushState(e,n,r)}replaceState(e,n,r){this._history.replaceState(e,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:()=>new t,providedIn:"platform"})}return t})();var Wo=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(i){i?typeof i=="string"?this.lazyInit=()=>{this.headers=new Map,i.split(`
5`).forEach(e=>{let n=e.indexOf(":");if(n>0){let r=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();let e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){let e=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(i.name,e);let r=(i.op==="a"?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":let o=i.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}addHeaderEntry(i,e){let n=i.toLowerCase();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(i,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=i.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(i,r)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}};var Qg=class{map=new Map;set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}},Zg=class{encodeKey(i){return FM(i)}encodeValue(i){return FM(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function Kj(t,i){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[i.decodeKey(r),""]:[i.decodeKey(r.slice(0,o)),i.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}var eH=/%(\d[a-f0-9])/gi,tH={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function FM(t){return encodeURIComponent(t).replace(eH,(i,e)=>tH[e]??i)}function Yg(t){return`${t}`}var mt=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new Zg,i.fromString){if(i.fromObject)throw new Z(2805,!1);this.map=Kj(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{let n=i.fromObject[e],r=Array.isArray(n)?n.map(Yg):[Yg(n)];this.map.set(e,r)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();let e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){let e=[];
vendor: 14,713 bytes, line 5
5return Object.keys(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:r,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{let e=this.encoder.encodeKey(i);return this.map.get(i).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>i!=="").join("&")}clone(i){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":let e=(i.op==="a"?this.map.get(i.param):void 0)||[];e.push(Yg(i.value)),this.map.set(i.param,e);break;case"d":if(i.value!==void 0){let n=this.map.get(i.param)||[],r=n.indexOf(Yg(i.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}else{this.map.delete(i.param);break}}}),this.cloneFrom=this.updates=null)}};function nH(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function VM(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function UM(t){return typeof Blob<"u"&&t instanceof Blob}function BM(t){return typeof FormData<"u"&&t instanceof FormData}function iH(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var jM="Content-Type",HM="Accept",$M="text/plain",GM="application/json",rH=`${GM}, ${$M}, */*`,ad=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(i,e,n,r){this.url=e,this.method=i.toUpperCase();let o;if(nH(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new Z(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new Wo,this.context??=new Qg,!this.params)this.params=new mt,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),l=a===-1?"?":a<e.length-1?"&":"";this.urlWithParams=e+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||VM(this.body)||UM(this.body)||BM(this.body)||iH(this.body)?this.body:this.body instanceof mt?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||BM(this.body)?null:UM(this.body)?this.body.type||null:VM(this.body)?null:typeof this.body=="string"?$M:this.body instanceof mt?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?GM:null}clone(i={}){let e=i.method||this.method,n=i.url||this.url,r=i.responseType||this.responseType,o=i.keepalive??this.keepalive,s=i.priority||this.priority,a=i.cache||this.cache,l=i.mode||this.mode,c=i.redirect||this.redirect,d=i.credentials||this.credentials,p=i.referrer||this.referrer,y=i.integrity||this.integrity,b=i.referrerPolicy||this.referrerPolicy,T=i.transferCache??this.transferCache,W=i.timeout??this.timeout,j=i.body!==void 0?i.body:this.body,ee=i.withCredentials??this.withCredentials,De=i.reportProgress??this.reportProgress,tt=i.headers||this.headers,Se=i.params||this.params,ar=i.context??this.context;return i.setHeaders!==void 0&&(tt=Object.keys(i.setHeaders).reduce((hs,On)=>hs.set(On,i.setHeaders[On]),tt)),i.setParams&&(Se=Object.keys(i.setParams).reduce((hs,On)=>hs.set(On,i.setParams[On]),Se)),new t(e,n,j,{params:Se,headers:tt,context:ar,reportProgress:De,responseType:r,withCredentials:ee,transferCache:T,keepalive:o,cache:a,priority:s,timeout:W,mode:l,redirect:c,credentials:d,referrer:p,integrity:y,referrerPolicy:b})}},Yl=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(Yl||{}),ld=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(i,e=200,n="OK"){this.headers=i.headers||new Wo,this.status=i.status!==void 0?i.status:e,this.statusText=i.statusText||n,this.url=i.url||null,this.redirected=i.redirected,this.responseType=i.responseType,this.ok=this.status>=200&&this.status<300}},Jg=class t extends ld{constructor(i={}){super(i)}type=Yl.ResponseHeader;clone(i={}){return new t({headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}},qp=class t extends ld{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=Yl.Response;clone(i={}){return new t({body:i.body!==void 0?i.body:this.body,headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0,redirected:i.redirected??this.redirected,responseType:i.responseType??this.responseType})}},Go=class extends ld{name="HttpErrorResponse";message;error;ok=!1;constructor(i){super(i,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${i.url||"(unknown url)"}`:this.message=`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}},oH=200,sH=204;var aH=new le("");var lH=/^\)\]\}',?\n/;var TS=(()=>{class t{xhrFactory;tracingService=U(Uo,{optional:!0});constructor(e){this.xhrFactory=e}maybePropagateTrace(e){return this.tracingService?.propagate?this.tracingService.propagate(e):e}handle(e){if(e.method==="JSONP")throw new Z(-2800,!1);let n=this.xhrFactory;return C(null).pipe(fe(()=>new Re(o=>{let s=n.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((j,ee)=>s.setRequestHeader(j,ee.join(","))),e.headers.has(HM)||s.setRequestHeader(HM,rH),!e.headers.has(jM)){let j=e.detectContentTypeHeader();j!==null&&s.setRequestHeader(jM,j)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let j=e.responseType.toLowerCase();s.responseType=j!=="json"?j:"text"}let a=e.serializeBody(),l=null,c=()=>{if(l!==null)return l;let j=s.statusText||"OK",ee=new Wo(s.getAllResponseHeaders()),De=s.responseURL||e.url;return l=new Jg({headers:ee,status:s.status,statusText:j,url:De}),l},d=this.maybePropagateTrace(()=>{let{headers:j,status:ee,statusText:De,url:tt}=c(),Se=null;ee!==sH&&(Se=typeof s.response>"u"?s.responseText:s.response),ee===0&&(ee=Se?oH:0);let ar=ee>=200&&ee<300;if(e.responseType==="json"&&typeof Se=="string"){let hs=Se;Se=Se.replace(lH,"");try{Se=Se!==""?JSON.parse(Se):null}catch(On){Se=hs,ar&&(ar=!1,Se={error:On,text:Se})}}ar?(o.next(new qp({body:Se,headers:j,status:ee,statusText:De,url:tt||void 0})),o.complete()):o.error(new Go({error:Se,headers:j,status:ee,statusText:De,url:tt||void 0}))}),p=this.maybePropagateTrace(j=>{let{url:ee}=c(),De=new Go({error:j,status:s.status||0,statusText:s.statusText||"Unknown Error",url:ee||void 0});o.error(De)}),y=p;e.timeout&&(y=this.maybePropagateTrace(j=>{let{url:ee}=c(),De=new Go({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:ee||void 0});o.error(De)}));let b=!1,T=this.maybePropagateTrace(j=>{b||(o.next(c()),b=!0);let ee={type:Yl.DownloadProgress,loaded:j.loaded};j.lengthComputable&&(ee.total=j.total),e.responseType==="text"&&s.responseText&&(ee.partialText=s.responseText),o.next(ee)}),W=this.maybePropagateTrace(j=>{let ee={type:Yl.UploadProgress,loaded:j.loaded};j.lengthComputable&&(ee.total=j.total),o.next(ee)});return s.addEventListener("load",d),s.addEventListener("error",p),s.addEventListener("timeout",y),s.addEventListener("abort",p),e.reportProgress&&(s.addEventListener("progress",T),a!==null&&s.upload&&s.upload.addEventListener("progress",W)),s.send(a),o.next({type:Yl.Sent}),()=>{s.removeEventListener("error",p),s.removeEventListener("abort",p),s.removeEventListener("load",d),s.removeEventListener("timeout",y),e.reportProgress&&(s.removeEventListener("progress",T),a!==null&&s.upload&&s.upload.removeEventListener("progress",W)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||t)(h(ql))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function cH(t,i){return i(t)}function dH(t,i,e){return(n,r)=>Vn(e,()=>i(n,o=>t(o,r)))}var DS=new le("",{factory:()=>[]}),WM=new le(""),zM=new le("",{factory:()=>!0});var Ql=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let r=null;return n?r=new(n||t):r=h(TS),r},providedIn:"root"})}return t})();var Xg=(()=>{class t{backend;injector;chain=null;pendingTasks=U(zc);contributeToStability=U(zM);constructor(e,n){this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(DS),...this.injector.get(WM,[])]));this.chain=n.reduceRight((r,o)=>dH(r,o,this.injector),cH)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(Gi(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(h(Ql),h(Jt))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),AS=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let r=null;return n?r=new(n||t):r=h(Xg),r},providedIn:"root"})}return t})();function wS(t,i){return{body:i,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer,referrerPolicy:t.referrerPolicy}}var on=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,r={}){let o;if(e instanceof ad)o=e;else{let l;r.headers instanceof Wo?l=r.headers:l=new Wo(r.headers);let c;r.params&&(r.params instanceof mt?c=r.params:c=new mt({fromObject:r.params})),o=new ad(e,n,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=C(o).pipe(dr(l=>this.handler.handle(l)));if(e instanceof ad||r.observe==="events")return s;let a=s.pipe(ke(l=>l instanceof qp));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(P(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Z(2806,!1);return l.body}));case"blob":return a.pipe(P(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Z(2807,!1);return l.body}));case"text":return a.pipe(P(l=>{if(l.body!==null&&typeof l.body!="string")throw new Z(2808,!1);return l.body}));default:return a.pipe(P(l=>l.body))}case"response":return a;default:throw new Z(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new mt().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,r={}){return this.request("PATCH",e,wS(r,n))}post(e,n,r={}){return this.request("POST",e,wS(r,n))}put(e,n,r={}){return this.request("PUT",e,wS(r,n))}static \u0275fac=function(n){return new(n||t)(h(AS))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var uH=new le("",{factory:()=>!0}),pH="XSRF-TOKEN",fH=new le("",{factory:()=>pH}),hH="X-XSRF-TOKEN",mH=new le("",{factory:()=>hH}),gH=(()=>{class t{cookieName=U(fH);doc=U(Yt);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Wp(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),qM=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let r=null;return n?r=new(n||t):r=h(gH),r},providedIn:"root"})}return t})();function _H(t,i){if(!U(uH)||t.method==="GET"||t.method==="HEAD")return i(t);try{let r=U(Os).href,{origin:o}=new URL(r),{origin:s}=new URL(t.url,o);if(o!==s)return i(t)}catch(r){return i(t)}let e=U(qM).getToken(),n=U(mH);return e!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,e)})),i(t)}var RS=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(RS||{});function vH(t,i){return{\u0275kind:t,\u0275providers:i}}function yH(...t){let i=[on,Xg,{provide:AS,useExisting:Xg},{provide:Ql,useFactory:()=>U(aH,{optional:!0})??U(TS)},{provide:DS,useValue:_H,multi:!0}];for(let e of t)i.push(...e.\u0275providers);return Ts(i)}function bH(t){return vH(RS.Interceptors,t.map(i=>({provide:DS,useValue:i,multi:!0})))}var xS=(function(t){return t.NONE="NONE",t.MINI="MINI",t})(xS||{}),cd=(function(t){return t.ANY="ANY",t.FUTURE="FUTURE",t.PAST="PAST",t})(cd||{}),MS=(function(t){return t.IPHONE="IPHONE",t.IPAD="IPAD",t.ANDROID_PHONE="ANDROID_PHONE",t.ANDROID_TABLET="ANDROID_TABLET",t.ANDROID_TV="ANDROID_TV",t.AND
5ROIDTV="ANDROIDTV",t.ANDROID_TV_STB="ANDROID_TV_STB",t.APPLE_TV="APPLE_TV",t.STB="STB",t.WEB="WEB",t.CHROMECAST="CHROMECAST",t.SMARTTV_TIZEN="SMARTTV_TIZEN",t.SMARTTV_WEBOS="SMARTTV_WEBOS",t})(MS||{}),Kg=(function(t){return t.playing="playing",t.error="error",t.paused="paused",t})(Kg||{}),Aa=(function(t){return t.startStream="StartStream",t.stopStream="StopStream",t.player="Player",t.manifest="Manifest",t.startAssetStream="StartAssetStream",t})(Aa||{}),PS=(function(t){return t.SD="SD",t.HD="HD",t.UHD_4K="UHD_4K",t})(PS||{}),St=(function(t){return t.adult_mode="adultmode",t.recording_episodes="recording_episodes",t.recording_before_time="recording_before_time",t.recording_after_time="recording_after_time",t.recording_delete_protection="recording_delete_protection",t.reminder_before_time="reminder_before_time",t.max_linear_stream_time="max_linear_stream_time",t.player_audio_language_1="player_audio_language_1",t.player_audio_language_2="player_audio_language_2",t.player_subtitle_language_1="player_subtitle_language_1",t.player_subtitle_language_2="player_subtitle_language_2",t})(St||{}),Ns=(function(t){return t.ott_adult_mode_allowed="androidtv_adult_mode_allowed",t.autoplay_enabled="autoplay_enabled",t})(Ns||{});var Ls=class extends Error{},HS=class extends Ls{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}},$S=class extends Ls{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}},GS=class extends Ls{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}},Ma=class extends Ls{},a_=class extends Ls{constructor(i){super(`Invalid unit ${i}`)}},Wn=class extends Ls{},qo=class extends Ls{constructor(){super("Zone is an abstract class")}},de="numeric",lo="short",tr="long",l_={year:de,month:de,day:de},IP={year:de,month:lo,day:de},CH={year:de,month:lo,day:de,weekday:lo},wP={year:de,month:tr,day:de},TP={year:de,month:tr,day:de,weekday:tr},DP={hour:de,minute:de},AP={hour:de,minute:de,second:de},RP={hour:de,minute:de,second:de,timeZoneName:lo},xP={hour:de,minute:de,second:de,timeZoneName:tr},MP={hour:de,minute:de,hourCycle:"h23"},PP={hour:de,minute:de,second:de,hourCycle:"h23"},OP={hour:de,minute:de,second:de,hourCycle:"h23",timeZoneName:lo},NP={hour:de,minute:de,second:de,hourCycle:"h23",timeZoneName:tr},kP={year:de,month:de,day:de,hour:de,minute:de},LP={year:de,month:de,day:de,hour:de,minute:de,second:de},FP={year:de,month:lo,day:de,hour:de,minute:de},VP={year:de,month:lo,day:de,hour:de,minute:de,second:de},SH={year:de,month:lo,day:de,weekday:lo,hour:de,minute:de},UP={year:de,month:tr,day:de,hour:de,minute:de,timeZoneName:lo},BP={year:de,month:tr,day:de,hour:de,minute:de,second:de,timeZoneName:lo},jP={year:de,month:tr,day:de,weekday:tr,hour:de,minute:de,timeZoneName:tr},HP={year:de,month:tr,day:de,weekday:tr,hour:de,minute:de,second:de,timeZoneName:tr},Kl=class{get type(){throw new qo}get name(){throw new qo}get ianaName(){return this.name}get isUniversal(){throw new qo}offsetName(i,e){throw new qo}formatOffset(i,e){throw new qo}offset(i){throw new qo}equals(i){throw new qo}get isValid(){throw new qo}},OS=null,c_=class t extends Kl{static get instance(){return OS===null&&(OS=new t),OS}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:e,locale:n}){return KP(i,e,n)}formatOffset(i,e){return Xp(this.offset(i),e)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}},WS=new Map;function EH(t){let i=WS.get(t);return i===void 0&&(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),WS.set(t,i)),i}var IH={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function wH(t,i){let e=t.format(i).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(e),[,r,o,s,a,l,c,d]=n;return[s,r,o,a,l,c,d]}function TH(t,i){let e=t.formatToParts(i),n=[];for(let r=0;r<e.length;r++){let{type:o,value:s}=e[r],a=IH[o];o==="era"?n[a]=s:Ne(a)||(n[a]=parseInt(s,10))}return n}var NS=new Map,Na=class t extends Kl{static create(i){let e=NS.get(i);return e===void 0&&NS.set(i,e=new t(i)),e}static resetCache(){NS.clear(),WS.clear()}static isValidSpecifier(i){return this.isValidZone(i)}static isValidZone(i){if(!i)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch(e){return!1}}
5constructor(i){super(),this.zoneName=i,this.valid=t.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:e,locale:n}){return KP(i,e,n,this.name)}formatOffset(i,e){return Xp(this.offset(i),e)}offset(i){if(!this.valid)return NaN;let e=new Date(i);if(isNaN(e))return NaN;let n=EH(this.name),[r,o,s,a,l,c,d]=n.formatToParts?TH(n,e):wH(n,e);a==="BC"&&(r=-Math.abs(r)+1);let y=m_({year:r,month:o,day:s,hour:l===24?0:l,minute:c,second:d,millisecond:0}),b=+e,T=b%1e3;return b-=T>=0?T:1e3+T,(y-b)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}},YM={};function DH(t,i={}){let e=JSON.stringify([t,i]),n=YM[e];return n||(n=new Intl.ListFormat(t,i),YM[e]=n),n}var zS=new Map;function qS(t,i={}){let e=JSON.stringify([t,i]),n=zS.get(e);return n===void 0&&(n=new Intl.DateTimeFormat(t,i),zS.set(e,n)),n}var YS=new Map;function AH(t,i={}){let e=JSON.stringify([t,i]),n=YS.get(e);return n===void 0&&(n=new Intl.NumberFormat(t,i),YS.set(e,n)),n}var QS=new Map;function RH(t,i={}){let s=i,{base:e}=s,n=nh(s,["base"]),r=JSON.stringify([t,n]),o=QS.get(r);return o===void 0&&(o=new Intl.RelativeTimeFormat(t,i),QS.set(r,o)),o}var Qp=null;function xH(){return Qp||(Qp=new Intl.DateTimeFormat().resolvedOptions().locale,Qp)}var ZS=new Map;function $P(t){let i=ZS.get(t);return i===void 0&&(i=new Intl.DateTimeFormat(t).resolvedOptions(),ZS.set(t,i)),i}var JS=new Map;function MH(t){let i=JS.get(t);if(!i){let e=new Intl.Locale(t);i="getWeekInfo"in e?e.getWeekInfo():e.weekInfo,"minimalDays"in i||(i=F(F({},GP),i)),JS.set(t,i)}return i}function PH(t){let i=t.indexOf("-x-");i!==-1&&(t=t.substring(0,i));let e=t.indexOf("-u-");if(e===-1)return[t];{let n,r;try{n=qS(t).resolvedOptions(),r=t}catch(a){let l=t.substring(0,e);n=qS(l).resolvedOptions(),r=l}let{numberingSystem:o,calendar:s}=n;return[r,o,s]}}function OH(t,i,e){return(e||i)&&(t.includes("-u-")||(t+="-u"),e&&(t+=`-ca-${e}`),i&&(t+=`-nu-${i}`)),t}function NH(t){let i=[];for(let e=1;e<=12;e++){let n=ie.utc(2009,e,1);i.push(t(n))}return i}function kH(t){let i=[];for(let e=1;e<=7;e++){let n=ie.utc(2016,11,13+e);i.push(t(n))}return i}function e_(t,i,e,n){let r=t.listingMode();return r==="error"?null:r==="en"?e(i):n(i)}function LH(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||$P(t.locale).numberingSystem==="latn"}var XS=class{constructor(i,e,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let a=n,{padTo:r,floor:o}=a,s=nh(a,["padTo","floor"]);if(!e||Object.keys(s).length>0){let l=F({useGrouping:!1},n);n.padTo>0&&(l.minimumIntegerDigits=n.padTo),this.inf=AH(i,l)}}format(i){if(this.inf){let e=this.floor?Math.floor(i):i;return this.inf.format(e)}else{let e=this.floor?Math.floor(i):dE(i,3);return Tn(e,this.padTo)}}},KS=class{constructor(i,e,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){let s=-1*(i.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;i.offset!==0&&Na.create(a).valid?(r=a,this.dt=i):(r="UTC",this.dt=i.offset===0?i:i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone)}else i.zone.type==="system"?this.dt=i:i.zone.type==="iana"?(this.dt=i,r=i.zone.name):(r="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);let o=F({},this.opts);o.timeZone=o.timeZone||r,this.dtf=qS(e,o)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(e=>{if(e.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return ve(F({},e),{value:n})}else return e}):i}resolvedOptions(){return this.dtf.resolvedOptions()}},eE=class{constructor(i,e,n){this.opts=F({style:"long"},n),!e&&JP()&&(this.rtf=RH(i,n))}format(i,e){return this.rtf?this.rtf.format(i,e):i$(e,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,e){return this.rtf?this.rtf.formatToParts(i,e):[]}},GP={firstDay:1,minimalDays:4,weekend:[6,7]},jt=class t{static fromOpts(i){return t.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,e,n,r,o=!1){let s=i||Kt.defaultLocale,a=s||(o?"en-US":xH()),l=e||Kt.defaultNumberingSystem,c=n||Kt.defaultOutputCalendar,d=iE(r)||Kt.defaultWeekSettings;return new t(a,l,c,d,s)}static resetCache(){Qp=null,zS.clear(),YS.clear(),QS.clear(),ZS.clear(),JS.clear()}static fromObject({locale:i,numberingSystem:e,outputCalendar:n,weekSettings:r}={}){return t.create(i,e,n,r)}
vendor: 8,560 bytes, line 5
5constructor(i,e,n,r,o){let[s,a,l]=PH(i);this.locale=s,this.numberingSystem=e||a||null,this.outputCalendar=n||l||null,this.weekSettings=r,this.intl=OH(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=LH(this)),this.fastNumbersCached}listingMode(){let i=this.isEnglish(),e=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&e?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:t.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,iE(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone(ve(F({},i),{defaultToEN:!0}))}redefaultToSystem(i={}){return this.clone(ve(F({},i),{defaultToEN:!1}))}months(i,e=!1){return e_(this,i,nO,()=>{let n=this.intl==="ja"||this.intl.startsWith("ja-");e&=!n;let r=e?{month:i,day:"numeric"}:{month:i},o=e?"format":"standalone";if(!this.monthsCache[o][i]){let s=n?a=>this.dtFormatter(a,r).format():a=>this.extract(a,r,"month");this.monthsCache[o][i]=NH(s)}return this.monthsCache[o][i]})}weekdays(i,e=!1){return e_(this,i,oO,()=>{let n=e?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},r=e?"format":"standalone";return this.weekdaysCache[r][i]||(this.weekdaysCache[r][i]=kH(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[r][i]})}meridiems(){return e_(this,void 0,()=>sO,()=>{if(!this.meridiemCache){let i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ie.utc(2016,11,13,9),ie.utc(2016,11,13,19)].map(e=>this.extract(e,i,"dayperiod"))}return this.meridiemCache})}eras(i){return e_(this,i,aO,()=>{let e={era:i};return this.eraCache[i]||(this.eraCache[i]=[ie.utc(-40,1,1),ie.utc(2017,1,1)].map(n=>this.extract(n,e,"era"))),this.eraCache[i]})}extract(i,e,n){let r=this.dtFormatter(i,e),o=r.formatToParts(),s=o.find(a=>a.type.toLowerCase()===n);return s?s.value:null}numberFormatter(i={}){return new XS(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,e={}){return new KS(i,this.intl,e)}relFormatter(i={}){return new eE(this.intl,this.isEnglish(),i)}listFormatter(i={}){return DH(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||$P(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:XP()?MH(this.locale):GP}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},kS=null,Ir=class t extends Kl{static get utcInstance(){return kS===null&&(kS=new t(0)),kS}static instance(i){return i===0?t.utcInstance:new t(i)}static parseSpecifier(i){if(i){let e=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(g_(e[1],e[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Xp(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Xp(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,e){return Xp(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}},tE=class extends Kl{constructor(i){super(),this.zoneName=i}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function xa(t,i){if(Ne(t)||t===null)return i;if(t instanceof Kl)return t;if(HH(t)){let e=t.toLowerCase();return e==="default"?i:e==="local"||e==="system"?c_.instance:e==="utc"||e==="gmt"?Ir.utcInstance:Ir.parseSpecifier(e)||Na.create(t)}else return Pa(t)?Ir.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new tE(t)}var sE={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},QM={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},FH=sE.hanidec.replace(/[\[|\]]/g,"").split("");function VH(t){let i=parseInt(t,10);if(isNaN(i)){i="";for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);if(t[e].search(sE.hanidec)!==-1)i+=FH.indexOf(t[e]);else for(let r in QM){let[o,s]=QM[r];n>=o&&n<=s&&(i+=n-o)}}return parseInt(i,10)}else return i}var nE=new Map;function UH(){nE.clear()}function so({numberingSystem:t},i=""){let e=t||"latn",n=nE.get(e);n===void 0&&(n=new Map,nE.set(e,n));let r=n.get(i);return r===void 0&&(r=new RegExp(`${sE[e]}${i}`),n.set(i,r)),r}var ZM=()=>Date.now(),JM="system",XM=null,KM=null,eP=null,tP=60,nP,iP=null,Kt=class{static get now(){return ZM}static set now(i){ZM=i}static set defaultZone(i){JM=i}static get defaultZone(){return xa(JM,c_.instance)}static get defaultLocale(){return XM}static set defaultLocale(i){XM=i}static get defaultNumberingSystem(){return KM}static set defaultNumberingSystem(i){KM=i}static get defaultOutputCalendar(){return eP}static set defaultOutputCalendar(i){eP=i}static get defaultWeekSettings(){return iP}static set defaultWeekSettings(i){iP=iE(i)}static get twoDigitCutoffYear(){return tP}static set twoDigitCutoffYear(i){tP=i%100}static get throwOnInvalid(){return nP}static set throwOnInvalid(i){nP=i}static resetCaches(){jt.resetCache(),Na.resetCache(),ie.resetCache(),UH()}},er=class{constructor(i,e){this.reason=i,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},WP=[0,31,59,90,120,151,181,212,243,273,304,334],zP=[0,31,60,91,121,152,182,213,244,274,305,335];function Sr(t,i){return new er("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${t}, which is invalid`)}function aE(t,i,e){let n=new Date(Date.UTC(t,i-1,e));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let r=n.getUTCDay();return r===0?7:r}function qP(t,i,e){return e+(ef(t)?zP:WP)[i-1]}function YP(t,i){let e=ef(t)?zP:WP,n=e.findIndex(o=>o<i),r=i-e[n];return{month:n+1,day:r}}function lE(t,i){return(t-i+7)%7+1}function d_(t,i=4,e=1){let{year:n,month:r,day:o}=t,s=qP(n,r,o),a=lE(aE(n,r,o),e),l=Math.floor((s-a+14-i)/7),c;return l<1?(c=n-1,l=Kp(c,i,e)):l>Kp(n,i,e)?(c=n+1,l=1):c=n,F({weekYear:c,weekNumber:l,weekday:a},__(t))}function rP(t,i=4,e=1){let{weekYear:n,weekNumber:r,weekday:o}=t,s=lE(aE(n,1,i),e),a=hd(n),l=r*7+o-s-7+i,c;l<1?(c=n-1,l+=hd(c)):l>a?(c=n+1,l-=hd(n)):c=n;let{month:d,day:p}=YP(c,l);return F({year:c,month:d,day:p},__(t))}function LS(t){let{year:i,month:e,day:n}=t,r=qP(i,e,n);return F({year:i,ordinal:r},__(t))}function oP(t){let{year:i,ordinal:e}=t,{month:n,day:r}=YP(i,e);return F({year:i,month:n,day:r},__(t))}function sP(t,i){if(!Ne(t.localWeekday)||!Ne(t.localWeekNumber)||!Ne(t.localWeekYear)){if(!Ne(t.weekday)||!Ne(t.weekNumber)||!Ne(t.weekYear))throw new Ma("Cannot mix locale-based week fields with ISO-based week fields");return Ne(t.localWeekday)||(t.weekday=t.localWeekday),Ne(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Ne(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:i.getMinDaysInFirstWeek(),startOfWeek:i.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function BH(t,i=4,e=1){let n=h_(t.weekYear),r=Er(t.weekNumber,1,Kp(t.weekYear,i,e)),o=Er(t.weekday,1,7);return n?r?o?!1:Sr("weekday",t.weekday):Sr("week",t.weekNumber):Sr
5("weekYear",t.weekYear)}function jH(t){let i=h_(t.year),e=Er(t.ordinal,1,hd(t.year));return i?e?!1:Sr("ordinal",t.ordinal):Sr("year",t.year)}function QP(t){let i=h_(t.year),e=Er(t.month,1,12),n=Er(t.day,1,u_(t.year,t.month));return i?e?n?!1:Sr("day",t.day):Sr("month",t.month):Sr("year",t.year)}function ZP(t){let{hour:i,minute:e,second:n,millisecond:r}=t,o=Er(i,0,23)||i===24&&e===0&&n===0&&r===0,s=Er(e,0,59),a=Er(n,0,59),l=Er(r,0,999);return o?s?a?l?!1:Sr("millisecond",r):Sr("second",n):Sr("minute",e):Sr("hour",i)}function Ne(t){return typeof t>"u"}function Pa(t){return typeof t=="number"}function h_(t){return typeof t=="number"&&t%1===0}function HH(t){return typeof t=="string"}function $H(t){return Object.prototype.toString.call(t)==="[object Date]"}function JP(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function XP(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(t){return!1}}function GH(t){return Array.isArray(t)?t:[t]}function aP(t,i,e){if(t.length!==0)return t.reduce((n,r)=>{let o=[i(r),r];return n&&e(n[0],o[0])===n[0]?n:o},null)[1]}function WH(t,i){return i.reduce((e,n)=>(e[n]=t[n],e),{})}function gd(t,i){return Object.prototype.hasOwnProperty.call(t,i)}function iE(t){if(t==null)return null;if(typeof t!="object")throw new Wn("Week settings must be an object");if(!Er(t.firstDay,1,7)||!Er(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(i=>!Er(i,1,7)))throw new Wn("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Er(t,i,e){return h_(t)&&t>=i&&t<=e}function zH(t,i){return t-i*Math.floor(t/i)}function Tn(t,i=2){let e=t<0,n;return e?n="-"+(""+-t).padStart(i,"0"):n=(""+t).padStart(i,"0"),n}function Ra(t){if(!(Ne(t)||t===null||t===""))return parseInt(t,10)}function Zl(t){if(!(Ne(t)||t===null||t===""))return parseFloat(t)}function cE(t){if(!(Ne(t)||t===null||t==="")){let i=parseFloat("0."+t)*1e3;return Math.floor(i)}}function dE(t,i,e="round"){let n=10**i;switch(e){case"expand":return t>0?Math.ceil(t*n)/n:Math.floor(t*n)/n;case"trunc":return Math.trunc(t*n)/n;case"round":return Math.round(t*n)/n;case"floor":return Math.floor(t*n)/n;case"ceil":return Math.ceil(t*n)/n;default:throw new RangeError(`Value rounding ${e} is out of range`)}}function ef(t){return t%4===0&&(t%100!==0||t%400===0)}function hd(t){return ef(t)?366:365}function u_(t,i){let e=zH(i-1,12)+1,n=t+(i-e)/12;return e===2?ef(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][e-1]}function m_(t){let i=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(i=new Date(i),i.setUTCFullYear(t.year,t.month-1,t.day)),+i}function lP(t,i,e){return-lE(aE(t,1,i),e)+i-1}function Kp(t,i=4,e=1){let n=lP(t,i,e),r=lP(t+1,i,e);return(hd(t)-n+r)/7}function rE(t){return t>99?t:t>Kt.twoDigitCutoffYear?1900+t:2e3+t}function KP(t,i,e,n=null){let r=new Date(t),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let s=F({timeZoneName:i},o),a=new Intl.DateTimeFormat(e,s).formatToParts(r).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function g_(t,i){let e=parseInt(t,10);Number.isNaN(e)&&(e=0);let n=parseInt(i,10)||0,r=e<0||Object.is(e,-0)?-n:n;return e*60+r}function eO(t){let i=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(i))throw new Wn(`Invalid unit value ${t}`);return i}function p_(t,i){let e={};for(let n in t)if(gd(t,n)){let r=t[n];if(r==null)continue;e[i(n)]=eO(r)}return e}function Xp(t,i){let e=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(i){case"short":return`${r}${Tn(e,2)}:${Tn(n,2)}`;case"narrow":return`${r}${e}${n>0?`:${n}`:""}`;case"techie":return`${r}${Tn(e,2)}${Tn(n,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function __(t){return WH(t,["hour","minute","second","millisecond"])}var qH=["January","February","March","April","May","June","July","August","September","October","November","December"],tO=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],YH=["J","F","M","A","M","J","J","A","S","O","N","D"];function nO(t){switch(t){case"narrow":return[...YH];case"short":return[...tO];case"long":return[...qH];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}
vendor: 5,595 bytes, line 5
5var iO=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],rO=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],QH=["M","T","W","T","F","S","S"];function oO(t){switch(t){case"narrow":return[...QH];case"short":return[...rO];case"long":return[...iO];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var sO=["AM","PM"],ZH=["Before Christ","Anno Domini"],JH=["BC","AD"],XH=["B","A"];function aO(t){switch(t){case"narrow":return[...XH];case"short":return[...JH];case"long":return[...ZH];default:return null}}function KH(t){return sO[t.hour<12?0:1]}function e$(t,i){return oO(i)[t.weekday-1]}function t$(t,i){return nO(i)[t.month-1]}function n$(t,i){return aO(i)[t.year<0?0:1]}function i$(t,i,e="always",n=!1){let r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(t)===-1;if(e==="auto"&&o){let p=t==="days";switch(i){case 1:return p?"tomorrow":`next ${r[t][0]}`;case-1:return p?"yesterday":`last ${r[t][0]}`;case 0:return p?"today":`this ${r[t][0]}`}}let s=Object.is(i,-0)||i<0,a=Math.abs(i),l=a===1,c=r[t],d=n?l?c[1]:c[2]||c[1]:l?r[t][0]:t;return s?`${a} ${d} ago`:`in ${a} ${d}`}function cP(t,i){let e="";for(let n of t)n.literal?e+=n.val:e+=i(n.val);return e}var r$={D:l_,DD:IP,DDD:wP,DDDD:TP,t:DP,tt:AP,ttt:RP,tttt:xP,T:MP,TT:PP,TTT:OP,TTTT:NP,f:kP,ff:FP,fff:UP,ffff:jP,F:LP,FF:VP,FFF:BP,FFFF:HP},Ki=class t{static create(i,e={}){return new t(i,e)}static parseFormat(i){let e=null,n="",r=!1,o=[];for(let s=0;s<i.length;s++){let a=i.charAt(s);a==="'"?((n.length>0||r)&&o.push({literal:r||/^\s+$/.test(n),val:n===""?"'":n}),e=null,n="",r=!r):r||a===e?n+=a:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=a,e=a)}return n.length>0&&o.push({literal:r||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(i){return r$[i]}constructor(i,e){this.opts=e,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,e){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,F(F({},this.opts),e)).format()}dtFormatter(i,e={}){return this.loc.dtFormatter(i,F(F({},this.opts),e))}formatDateTime(i,e){return this.dtFormatter(i,e).format()}formatDateTimeParts(i,e){return this.dtFormatter(i,e).formatToParts()}formatInterval(i,e){return this.dtFormatter(i.start,e).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,e){return this.dtFormatter(i,e).resolvedOptions()}num(i,e=0,n=void 0){if(this.opts.forceSimple)return Tn(i,e);let r=F({},this.opts);return e>0&&(r.padTo=e),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(i)}formatDateTimeFromString(i,e){let n=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(b,T)=>this.loc.extract(i,b,T),s=b=>i.isOffsetFixed&&i.offset===0&&b.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,b.format):"",a=()=>n?KH(i):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(b,T)=>n?t$(i,b):o(T?{month:b}:{month:b,day:"numeric"},"month"),c=(b,T)=>n?e$(i,b):o(T?{weekday:b}:{weekday:b,month:"long",day:"numeric"},"weekday"),d=b=>{let T=t.macroTokenToFormatOpts(b);return T?this.formatWithSystemDefault(i,T):b},p=b=>n?n$(i,b):o({era:b},"era"),y=b=>{switch(b){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return a();case"d":return r?o({day:"numeric"},"day"):this.num(i.day);case"dd":return r?o({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return r?o({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return r?o({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return r?o({month:"numeric"},"month"):this.num(i.month);case"MM":return r?o({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return r?o({year:"numeric"},"year"):this.num(i.year);case"yy":return r?o({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return r?o({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return r?o({year:"numeric"},"year"):this.num(i.year,6);case"G":return p("short");case"GG":return p("long");case"GGGGG":return p("narrow");case"kk":return this.num(i.weekYear.toString().slice(-2),2);case"kkkk":return this.num(i.weekYear,4);case"W":return this.num(i.weekNumber);
5case"WW":return this.num(i.weekNumber,2);case"n":return this.num(i.localWeekNumber);case"nn":return this.num(i.localWeekNumber,2);case"ii":return this.num(i.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(i.localWeekYear,4);case"o":return this.num(i.ordinal);case"ooo":return this.num(i.ordinal,3);case"q":return this.num(i.quarter);case"qq":return this.num(i.quarter,2);case"X":return this.num(Math.floor(i.ts/1e3));case"x":return this.num(i.ts);default:return d(b)}};return cP(t.parseFormat(e),y)}formatDurationFromString(i,e){let n=this.opts.signMode==="negativeLargestOnly"?-1:1,r=d=>{switch(d[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=(d,p)=>y=>{let b=r(y);if(b){let T=p.isNegativeDuration&&b!==p.largestUnit?n:1,W;return this.opts.signMode==="negativeLargestOnly"&&b!==p.largestUnit?W="never":this.opts.signMode==="all"?W="always":W="auto",this.num(d.get(b)*T,
5y.length,W)}else return y},s=t.parseFormat(e),a=s.reduce((d,{literal:p,val:y})=>p?d:d.concat(y),[]),l=i.shiftTo(...a.map(r).filter(d=>d)),c={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return cP(s,o(l,c))}},lO=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function _d(...t){let i=t.reduce((e,n)=>e+n.source,"");return RegExp(`^${i}$`)}function vd(...t){return i=>t.reduce(([e,n,r],o)=>{let[s,a,l]=o(i,r);return[F(F({},e),s),a||n,l]},[{},null,1]).slice(0,2)}function yd(t,...i){if(t==null)return[null,null];for(let[e,n]of i){let r=e.exec(t);if(r)return n(r)}return[null,null]}function cO(...t){return(i,e)=>{let n={},r;for(r=0;r<t.length;r++)n[t[r]]=Ra(i[e+r]);return[n,null,e+r]}}var dO=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,o$=`(?:${dO.source}?(?:\\[(${lO.source})\\])?)?`,uE=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,uO=RegExp(`${uE.source}${o$}`),pE=RegExp(`(?:[Tt]${uO.source})?`),s$=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,a$=/(\d{4})-?W(\d\d)(?:-?(\d))?/,l$=/(\d{4})-?(\d{3})/,c$=cO("weekYear","weekNumber","weekDay"),d$=cO("year","ordinal"),u$=/(\d{4})-(\d\d)-(\d\d)/,pO=RegExp(`${uE.source} ?(?:${dO.source}|(${lO.source}))?`),p$=RegExp(`(?: ${pO.source})?`);function md(t,i,e){let n=t[i];return Ne(n)?e:Ra(n)}function f$(t,i){return[{year:md(t,i),month:md(t,i+1,1),day:md(t,i+2,1)},null,i+3]}function bd(t,i){return[{hours:md(t,i,0),minutes:md(t,i+1,0),seconds:md(t,i+2,0),milliseconds:cE(t[i+3])},null,i+4]}function tf(t,i){let e=!t[i]&&!t[i+1],n=g_(t[i+1],t[i+2]),r=e?null:Ir.instance(n);return[{},r,i+3]}function nf(t,i){let e=t[i]?Na.create(t[i]):null;return[{},e,i+1]}var h$=RegExp(`^T?${uE.source}$`),m$=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function g$(t){let[i,e,n,r,o,s,a,l,c]=t,d=i[0]==="-",p=l&&l[0]==="-",y=(b,T=!1)=>b!==void 0&&(T||b&&d)?-b:b;return[{years:y(Zl(e)),months:y(Zl(n)),weeks:y(Zl(r)),days:y(Zl(o)),hours:y(Zl(s)),minutes:y(Zl(a)),seconds:y(Zl(l),l==="-0"),milliseconds:y(cE(c),p)}]}var _$={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fE(t,i,e,n,r,o,s){let a={year:i.length===2?rE(Ra(i)):Ra(i),month:tO.indexOf(e)+1,day:Ra(n),hour:Ra(r),minute:Ra(o)};return s&&(a.second=Ra(s)),t&&(a.weekday=t.length>3?iO.indexOf(t)+1:rO.indexOf(t)+1),a}var v$=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function y$(t){let[,i,e,n,r,o,s,a,l,c,d,p]=t,y=fE(i,r,n,e,o,s,a),b;return l?b=_$[l]:c?b=0:b=g_(d,p),[y,new Ir(b)]}function b$(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var C$=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,S$=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,E$=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function dP(t){let[,i,e,n,r,o,s,a]=t;return[fE(i,r,n,e,o,s,a),Ir.utcInstance]}function I$(t){let[,i,e,n,r,o,s,a]=t;return[fE(i,a,e,n,r,o,s),Ir.utcInstance]}var w$=_d(s$,pE),T$=_d(a$,pE),D$=_d(l$,pE),A$=_d(uO),fO=vd(f$,bd,tf,nf),R$=vd(c$,bd,tf,nf),x$=vd(d$,bd,tf,nf),M$=vd(bd,tf,nf);function P$(t){return yd(t,[w$,fO],[T$,R$],[D$,x$],[A$,M$])}function O$(t){return yd(b$(t),[v$,y$])}function N$(t){return yd(t,[C$,dP],[S$,dP],[E$,I$])}function k$(t){return yd(t,[m$,g$])}var L$=vd(bd);function F$(t){return yd(t,[h$,L$])}var V$=_d(u$,p$),U$=_d(pO),B$=vd(bd,tf,nf);function j$(t){return yd(t,[V$,fO],[U$,B$])}var uP="Invalid Duration",hO={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},H$=F({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3}},hO),Cr=146097/400,dd=146097/4800,$$=F({years:{quarters:4,months:12,weeks:Cr/7,days:Cr,hours:Cr*24,minutes:Cr*24*60,seconds:Cr*24*60*60,milliseconds:Cr*24*60*60*1e3},quarters:{months:3,weeks:Cr/28,days:Cr/4,hours:Cr*24/4,minutes:Cr*24*60/4,seconds:Cr*24*60*60/4,milliseconds:Cr*24*60*60*1e3/4},months:{weeks:dd/7,days:dd,hours:dd*24,minutes:dd*24*60,seconds:dd*24*60*60,milliseconds:dd*24*60*60*1e3}},hO),Xl=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],G$=Xl.slice(0).reverse();function ks(t,i,e=!1){let n={values:e?i.values:F(F({},t.values),i.values||{}),loc:t.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||t.conversionAccuracy,matrix:i.matrix||t.matrix};return new zn(n)}function mO(t,i){let e=i.milliseconds??0;for(let n of G$.slice(1))i[n]&&(e+=i[n]*t[n].milliseconds);return e}function pP(t,i){let e=mO(t,i)<0?-1:1;Xl.reduceRight((n,r)=>{if(Ne(i[r]))return n;if(n){let o=i[n]*e,s=t[r][n],a=Math.floor(o/s);i[r]+=a*e,i[n]-=a*s*e}return r},null),Xl.reduce((n,r)=>{if(Ne(i[r]))return n;if(n){let o=i[n]%1;i[n]-=o,i[r]+=o*t[n][r]}return r},null)}function fP(t){let i={};for(let[e,n]of Object.entries(t))n!==0&&(i[e]=n);return i}var zn=class t{constructor(i){let e=i.conversionAccuracy==="longterm"||!1,n=e?$$:H$;
5i.matrix&&(n=i.matrix),this.values=i.values,this.loc=i.loc||jt.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(i,e){return t.fromObject({milliseconds:i},e)}static fromObject(i,e={}){if(i==null||typeof i!="object")throw new Wn(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new t({values:p_(i,t.normalizeUnit),loc:jt.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(i){if(Pa(i))return t.fromMillis(i);if(t.isDuration(i))return i;if(typeof i=="object")return t.fromObject(i);throw new Wn(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,e){let[n]=k$(i);return n?t.fromObject(n,e):t.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,e){let[n]=F$(i);return n?t.fromObject(n,e):t.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,e=null){if(!i)throw new Wn("need to specify a reason the Duration is invalid");let n=i instanceof er?i:new er(i,e);if(Kt.throwOnInvalid)throw new GS(n);return new t({invalid:n})}static normalizeUnit(i){let e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!e)throw new a_(i);return e}static isDuration(i){return i&&i.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(i,e={}){let n=ve(F({},e),{floor:e.round!==!1&&e.floor!==!1});return this.isValid?Ki.create(this.loc,n).formatDurationFromString(this,i):uP}toHuman(i={}){if(!this.isValid)return uP;let e=i.showZeros!==!1,n=Xl.map(r=>{let o=this.values[r];return Ne(o)||o===0&&!e?null:this.loc.numberFormatter(ve(F({style:"unit",unitDisplay:"long"},i),{unit:r.slice(0,-1)})).format(o)}).filter(r=>r);return this.loc.listFormatter(F({type:"conjunction",style:i.listStyle||"narrow"},i)).format(n)}toObject(){return this.isValid?F({},this.values):{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=dE(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;let e=this.toMillis();return e<0||e>=864e5?null:(i=ve(F({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},i),{includeOffset:!1}),ie.fromMillis(e,{zone:"UTC"}).toISOTime(i))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?mO(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;let e=t.fromDurationLike(i),n={};for(let r of Xl)(gd(e.values,r)||gd(this.values,r))&&(n[r]=e.get(r)+this.get(r));return ks(this,{values:n},!0)}minus(i){if(!this.isValid)return this;let e=t.fromDurationLike(i);return this.plus(e.negate())}mapUnits(i){if(!this.isValid)return this;let e={};for(let n of Object.keys(this.values))e[n]=eO(i(this.values[n],n));return ks(this,{values:e},!0)}get(i){return this[t.normalizeUnit(i)]}set(i){if(!this.isValid)return this;let e=F(F({},this.values),p_(i,t.normalizeUnit));return ks(this,{values:e})}reconfigure({locale:i,numberingSystem:e,conversionAccuracy:n,matrix:r}={}){let s={loc:this.loc.clone({locale:i,numberingSystem:e}),matrix:r,conversionAccuracy:n};return ks(this,s)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;let i=this.toObject();return pP(this.matrix,i),ks(this,{values:i},!0)}rescale(){if(!this.isValid)return this;let i=fP(this.normalize().shiftToAll().toObject());return ks(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(s=>t.normalizeUnit(s));let e={},n={},r=this.toObject(),o;for(let s of Xl)if(i.indexOf(s)>=0){o=s;let a=0;for(let c in n)a+=this.matrix[c][s]*n[c],n[c]=0;Pa(r[s])&&(a+=r[s]);let l=Math.trunc(a);e[s]=l,n[s]=(a*1e3-l*1e3)/1e3}else Pa(r[s])&&(n[s]=r[s]);for(let s in n)n[s]!==0&&(e[o]+=s===o?n[s]:n[s]/this.matrix[o][s]);return pP(this.matrix,e),ks(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let i={};for(let e of Object.keys(this.values))i[e]=this.values[e]===0?0:-this.values[e];return ks(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;let i=fP(this.values);return ks(this,{values:i},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(i){if(!this.isValid||!i.isValid||!this.loc.equals(i.loc))return!1;function e(n,r){return n===void 0||n===0?r===void 0||r===0:n===r}for(let n of Xl)if(!e(this.values[n],i.values[n]))return!1;return!0}},ud="Invalid Interval";function W$(t,i){return!t||!t.isValid?Oa.invalid("missing or invalid start"):!i||!i.isValid?Oa.invalid("missing or invalid end"):i<t?Oa.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${i.toISO()}`):null}var Oa=class t{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}
vendor: 7,250 bytes, line 5
5static invalid(i,e=null){if(!i)throw new Wn("need to specify a reason the Interval is invalid");let n=i instanceof er?i:new er(i,e);if(Kt.throwOnInvalid)throw new $S(n);return new t({invalid:n})}static fromDateTimes(i,e){let n=Yp(i),r=Yp(e),o=W$(n,r);return o??new t({start:n,end:r})}static after(i,e){let n=zn.fromDurationLike(e),r=Yp(i);return t.fromDateTimes(r,r.plus(n))}static before(i,e){let n=zn.fromDurationLike(e),r=Yp(i);return t.fromDateTimes(r.minus(n),r)}static fromISO(i,e){let[n,r]=(i||"").split("/",2);if(n&&r){let o,s;try{o=ie.fromISO(n,e),s=o.isValid}catch(c){s=!1}let a,l;try{a=ie.fromISO(r,e),l=a.isValid}catch(c){l=!1}if(s&&l)return t.fromDateTimes(o,a);if(s){let c=zn.fromISO(r,e);if(c.isValid)return t.after(o,c)}else if(l){let c=zn.fromISO(n,e);if(c.isValid)return t.before(a,c)}}return t.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static isInterval(i){return i&&i.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(i="milliseconds"){return this.isValid?this.toDuration(i).get(i):NaN}count(i="milliseconds",e){if(!this.isValid)return NaN;let n=this.start.startOf(i,e),r;return e?.useLocaleWeeks?r=this.end.reconfigure({locale:n.locale}):r=this.end,r=r.startOf(i,e),Math.floor(r.diff(n,i).get(i))+(r.valueOf()!==this.end.valueOf())}hasSame(i){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,i):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(i){return this.isValid?this.s>i:!1}isBefore(i){return this.isValid?this.e<=i:!1}contains(i){return this.isValid?this.s<=i&&this.e>i:!1}set({start:i,end:e}={}){return this.isValid?t.fromDateTimes(i||this.s,e||this.e):this}splitAt(...i){if(!this.isValid)return[];let e=i.map(Yp).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),n=[],{s:r}=this,o=0;for(;r<this.e;){let s=e[o]||this.e,a=+s>+this.e?this.e:s;n.push(t.fromDateTimes(r,a)),r=a,o+=1}return n}splitBy(i){let e=zn.fromDurationLike(i);if(!this.isValid||!e.isValid||e.as("milliseconds")===0)return[];let{s:n}=this,r=1,o,s=[];for(;n<this.e;){let a=this.start.plus(e.mapUnits(l=>l*r));o=+a>+this.e?this.e:a,s.push(t.fromDateTimes(n,o)),n=o,r+=1}return s}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;let e=this.s>i.s?this.s:i.s,n=this.e<i.e?this.e:i.e;return e>=n?null:t.fromDateTimes(e,n)}union(i){if(!this.isValid)return this;let e=this.s<i.s?this.s:i.s,n=this.e>i.e?this.e:i.e;return t.fromDateTimes(e,n)}static merge(i){let[e,n]=i.sort((r,o)=>r.s-o.s).reduce(([r,o],s)=>o?o.overlaps(s)||o.abutsStart(s)?[r,o.union(s)]:[r.concat([o]),s]:[r,s],[[],null]);return n&&e.push(n),e}static xor(i){let e=null,n=0,r=[],o=i.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),s=Array.prototype.concat(...o),a=s.sort((l,c)=>l.time-c.time);for(let l of a)n+=l.type==="s"?1:-1,n===1?e=l.time:(e&&+e!=+l.time&&r.push(t.fromDateTimes(e,l.time)),e=null);return t.merge(r)}difference(...i){return t.xor([this].concat(i)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:ud}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=l_,e={}){return this.isValid?Ki.create(this.s.loc.clone(e),i).formatInterval(this):ud}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:ud}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ud}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:ud}toFormat(i,{separator:e=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(i)}${e}${this.e.toFormat(i)}`:ud}toDuration(i,e){return this.isValid?this.e.diff(this.s,i,e):zn.invalid(this.invalidReason)}mapEndpoints(i){return t.fromDateTimes(i(this.s),i(this.e))}},fd=class{static hasDST(i=Kt.defaultZone){let e=ie.now().setZone(i).set({month:12});return!i.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(i){return Na.isValidZone(i)}static normalizeZone(i){return xa(i,Kt.defaultZone)}static getStartOfWeek({locale:i=null,locObj:e=null}={}){return(e||jt.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:e=null}={}){return(e||jt.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:e=null}={}){return(e||jt.create(i)).getWeekendDays().slice()}static months(i="long",{locale:e=null,numberingSystem:n=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||jt.create(e,n,o)).months(i)}static monthsFormat(i="long",{locale:e=null,numberingSystem:n=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||jt.create(e,n,o)).months(i,!0)}static weekdays(i="long",{locale:e=null,numberingSystem:n=null,locObj:r=null}={}){return(r||jt.create(e,n,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:e=null,numberingSystem:n=null,locObj:r=null}={}){return(r||jt.create(e,n,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return jt.create(i).meridiems()}static eras(i="short",{locale:e=null}={}){return jt.create(e,null,"gregory").eras(i)}static features(){return{relative:JP(),localeWeek:XP()}}};function hP(t,i){let e=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=e(i)-e(t);return Math.floor(zn.fromMillis(n).as("days"))}function z$(t,i,e){let n=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let d=hP(l,c);return(d-d%7)/7}],["days",hP]],r={},o=t,s,a;for(let[l,c]of n)e.indexOf(l)>=0&&(s=l,r[l]=c(t,i),a=o.plus(r),a>i?(r[l]--,t=o.plus(r),t>i&&(a=t,r[l]--,t=o.plus(r))):t=a);return[t,r,a,s]}function q$(t,i,e,n){let[r,o,s,a]=z$(t,i,e),l=i-r,c=e.filter(p=>["hours","minutes","seconds","milliseconds"].indexOf(p)>=0);c.length===0&&(s<i&&(s=r.plus({[a]:1})),s!==r&&(o[a]=(o[a]||0)+l/(s-r)));let d=zn.fromObject(o,n);return c.length>0?zn.fromMillis(l,n).shiftTo(...c).plus(d):d}var Y$="missing Intl.DateTimeFormat.formatToParts support";function Et(t,i=e=>e){return{regex:t,deser:([e])=>i(VH(e))}}var Q$="\xA0",gO=`[ ${Q$}]`,_O=new RegExp(gO,"g");function Z$(t){return t.replace(/\./g,"\\.?").replace(_O,gO)}function mP(t){return t.replace(/\./g,"").replace(_O," ").toLowerCase()}function ao(t,i){return t===null?null:{regex:RegExp(t.map(Z$).join("|")),deser:([e])=>t.findIndex(n=>mP(e)===mP(n))+i}}function gP(t,i){return{regex:t,deser:([,e,n])=>g_(e,n),groups:i}}function t_(t){return{regex:t,deser:([i])=>i}}function J$(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}
5function X$(t,i){let e=so(i),n=so(i,"{2}"),r=so(i,"{3}"),o=so(i,"{4}"),s=so(i,"{6}"),a=so(i,"{1,2}"),l=so(i,"{1,3}"),c=so(i,"{1,6}"),d=so(i,"{1,9}"),p=so(i,"{2,4}"),y=so(i,"{4,6}"),b=j=>({regex:RegExp(J$(j.val)),deser:([ee])=>ee,literal:!0}),W=(j=>{if(t.literal)return b(j);switch(j.val){case"G":return ao(i.eras("short"),0);case"GG":return ao(i.eras("long"),0);case"y":return Et(c);case"yy":return Et(p,rE);case"yyyy":return Et(o);case"yyyyy":return Et(y);case"yyyyyy":return Et(s);case"M":return Et(a);case"MM":return Et(n);case"MMM":return ao(i.months("short",!0),1);case"MMMM":return ao(i.months("long",!0),1);case"L":return Et(a);case"LL":return Et(n);case"LLL":return ao(i.months("short",!1),1);case"LLLL":return ao(i.months("long",!1),1);case"d":return Et(a);case"dd":return Et(n);case"o":return Et(l);case"ooo":return Et(r);case"HH":return Et(n);case"H":return Et(a);case"hh":return Et(n);case"h":return Et(a);case"mm":return Et(n);case"m":return Et(a);case"q":return Et(a);case"qq":return Et(n);case"s":return Et(a);case"ss":return Et(n);case"S":return Et(l);case"SSS":return Et(r);case"u":return t_(d);case"uu":return t_(a);case"uuu":return Et(e);case"a":return ao(i.meridiems(),0);case"kkkk":return Et(o);case"kk":return Et(p,rE);case"W":return Et(a);case"WW":return Et(n);case"E":case"c":return Et(e);case"EEE":return ao(i.weekdays("short",!1),1);case"EEEE":return ao(i.weekdays("long",!1),1);case"ccc":return ao(i.weekdays("short",!0),1);case"cccc":return ao(i.weekdays("long",!0),1);case"Z":case"ZZ":return gP(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return gP(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return t_(/[a-z_+-/]{1,256}?/i);case" ":return t_(/[^\S\n\r]/);default:return b(j)}})(t)||{invalidReason:Y$};return W.token=t,W}var K$={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function e3(t,i,e){let{type:n,value:r}=t;if(n==="literal"){let l=/^\s+$/.test(r);return{literal:!l,val:l?" ":r}}let o=i[n],s=n;n==="hour"&&(i.hour12!=null?s=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?s="hour12":s="hour24":s=e.hour12?"hour12":"hour24");let a=K$[s];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function t3(t){return[`^${t.map(e=>e.regex).reduce((e,n)=>`${e}(${n.source})`,"")}$`,t]}function n3(t,i,e){let n=t.match(i);if(n){let r={},o=1;for(let s in e)if(gd(e,s)){let a=e[s],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(n.slice(o,o+l))),o+=l}return[n,r]}else return[n,{}]}function i3(t){let i=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},e=null,n;return Ne(t.z)||(e=Na.create(t.z)),Ne(t.Z)||(e||(e=new Ir(t.Z)),n=t.Z),Ne(t.q)||(t.M=(t.q-1)*3+1),Ne(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Ne(t.u)||(t.S=cE(t.u)),[Object.keys(t).reduce((o,s)=>{let a=i(s);return a&&(o[a]=t[s]),o},{}),e,n]}var FS=null;function r3(){return FS||(FS=ie.fromMillis(1555555555555)),FS}function o3(t,i){if(t.literal)return t;let e=Ki.macroTokenToFormatOpts(t.val),n=bO(e,i);return n==null||n.includes(void 0)?t:n}function vO(t,i){return Array.prototype.concat(...t.map(e=>o3(e,i)))}var f_=class{constructor(i,e){if(this.locale=i,this.format=e,this.tokens=vO(Ki.parseFormat(e),i),this.units=this.tokens.map(n=>X$(n,i)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,r]=t3(this.units);this.regex=RegExp(n,"i"),this.handlers=r}}explainFromTokens(i){if(this.isValid){let[e,n]=n3(i,this.regex,this.handlers),[r,o,s]=n?i3(n):[null,null,void 0];if(gd(n,"a")&&gd(n,"H"))throw new Ma("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:n,result:r,zone:o,specificOffset:s}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invali
vendor: 14,176 bytes, line 5
5dReason:null}};function yO(t,i,e){return new f_(t,e).explainFromTokens(i)}function s3(t,i,e){let{result:n,zone:r,specificOffset:o,invalidReason:s}=yO(t,i,e);return[n,r,o,s]}function bO(t,i){if(!t)return null;let n=Ki.create(i,t).dtFormatter(r3()),r=n.formatToParts(),o=n.resolvedOptions();return r.map(s=>e3(s,t,o))}var VS="Invalid DateTime",_P=864e13;function Zp(t){return new er("unsupported zone",`the zone "${t.name}" is not supported`)}function US(t){return t.weekData===null&&(t.weekData=d_(t.c)),t.weekData}function BS(t){return t.localWeekData===null&&(t.localWeekData=d_(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Jl(t,i){let e={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new ie(ve(F(F({},e),i),{old:e}))}function CO(t,i,e){let n=t-i*60*1e3,r=e.offset(n);if(i===r)return[n,i];n-=(r-i)*60*1e3;let o=e.offset(n);return r===o?[n,r]:[t-Math.min(r,o)*60*1e3,Math.max(r,o)]}function n_(t,i){t+=i*60*1e3;let e=new Date(t);return{year:e.getUTCFullYear(),month:e.getUTCMonth()+1,day:e.getUTCDate(),hour:e.getUTCHours(),minute:e.getUTCMinutes(),second:e.getUTCSeconds(),millisecond:e.getUTCMilliseconds()}}function r_(t,i,e){return CO(m_(t),i,e)}function vP(t,i){let e=t.o,n=t.c.year+Math.trunc(i.years),r=t.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,o=ve(F({},t.c),{year:n,month:r,day:Math.min(t.c.day,u_(n,r))+Math.trunc(i.days)+Math.trunc(i.weeks)*7}),s=zn.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),a=m_(o),[l,c]=CO(a,e,t.zone);return s!==0&&(l+=s,c=t.zone.offset(l)),{ts:l,o:c}}function pd(t,i,e,n,r,o){let{setZone:s,zone:a}=e;if(t&&Object.keys(t).length!==0||i){let l=i||a,c=ie.fromObject(t,ve(F({},e),{zone:l,specificOffset:o}));return s?c:c.setZone(a)}else return ie.invalid(new er("unparsable",`the input "${r}" can't be parsed as ${n}`))}function i_(t,i,e=!0){return t.isValid?Ki.create(jt.create("en-US"),{allowZ:e,forceSimple:!0}).formatDateTimeFromString(t,i):null}function jS(t,i,e){let n=t.c.year>9999||t.c.year<0,r="";if(n&&t.c.year>=0&&(r+="+"),r+=Tn(t.c.year,n?6:4),e==="year")return r;if(i){if(r+="-",r+=Tn(t.c.month),e==="month")return r;r+="-"}else if(r+=Tn(t.c.month),e==="month")return r;return r+=Tn(t.c.day),r}function yP(t,i,e,n,r,o,s){let a=!e||t.c.millisecond!==0||t.c.second!==0,l="";switch(s){case"day":case"month":case"year":break;default:if(l+=Tn(t.c.hour),s==="hour")break;if(i){if(l+=":",l+=Tn(t.c.minute),s==="minute")break;a&&(l+=":",l+=Tn(t.c.second))}else{if(l+=Tn(t.c.minute),s==="minute")break;a&&(l+=Tn(t.c.second))}if(s==="second")break;a&&(!n||t.c.millisecond!==0)&&(l+=".",l+=Tn(t.c.millisecond,3))}return r&&(t.isOffsetFixed&&t.offset===0&&!o?l+="Z":t.o<0?(l+="-",l+=Tn(Math.trunc(-t.o/60)),l+=":",l+=Tn(Math.trunc(-t.o%60))):(l+="+",l+=Tn(Math.trunc(t.o/60)),l+=":",l+=Tn(Math.trunc(t.o%60)))),o&&(l+="["+t.zone.ianaName+"]"),l}var SO={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},a3={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},l3={ordinal:1,hour:0,minute:0,second:0,millisecond:0},o_=["year","month","day","hour","minute","second","millisecond"],c3=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],d3=["year","ordinal","hour","minute","second","millisecond"];function s_(t){let i={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!i)throw new a_(t);return i}function bP(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return s_(t)}}function u3(t){if(Jp===void 0&&(Jp=Kt.now()),t.type!=="iana")return t.offset(Jp);let i=t.name,e=oE.get(i);return e===void 0&&(e=t.offset(Jp),oE.set(i,e)),e}function CP(t,i){let e=xa(i.zone,Kt.defaultZone);if(!e.isValid)return ie.invalid(Zp(e));let n=jt.fromObject(i),r,o;if(Ne(t.year))r=Kt.now();else{for(let l of o_)Ne(t[l])&&(t[l]=SO[l]);let s=QP(t)||ZP(t);if(s)return ie.invalid(s);let a=u3(e);[r,o]=r_(t,a,e)}return new ie({ts:r,zone:e,loc:n,o})}function SP(t,i,e){let n=Ne(e.round)?!0:e.round,r=Ne(e.rounding)?"trunc":e.rounding,o=(a,l)=>(a=dE(a,n||e.calendary?0:2,e.calendary?"round":r),i.loc.clone(e).relFormatter(e).format(a,l)),s=a=>e.calendary?i.hasSame(t,a)?0:i.startOf(a).diff(t.startOf(a),a).get(a):i.diff(t,a).get(a);if(e.unit)return o(s(e.unit),e.unit);for(let a of e.units){let l=s(a);if(Math.abs(l)>=1)return o(l,a)}return o(t>i?-0:0,e.units[e.units.length-1])}function EP(t){let i={},e;return t.length>0&&typeof t[t.length-1]=="object"?(i=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[i,e]}var Jp,oE=new Map,ie=class t{constructor(i){let e=i.zone||Kt.defaultZone,n=i.invalid||(Number.isNaN(i.ts)?new er("invalid input"):null)||(e.isValid?null:Zp(e));this.ts=Ne(i.ts)?Kt.now():i.ts;let r=null,o=null;if(!n)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(e))[r,o]=[i.old.c,i.old.o];else{let a=Pa(i.o)&&!i.old?i.o:e.offset(this.ts);r=n_(this.ts,a),n=Number.isNaN(r.year)?new er("invalid input"):null,r=n?null:r,o=n?null:a}this._zone=e,this.loc=i.loc||jt.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=o,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[i,e]=EP(arguments),[n,r,o,s,a,l,c]=e;return CP({year:n,month:r,day:o,hour:s,minute:a,second:l,millisecond:c},i)}static utc(){let[i,e]=EP(arguments),[n,r,o,s,a,l,c]=e;return i.zone=Ir.utcInstance,CP({year:n,month:r,day:o,hour:s,minute:a,second:l,millisecond:c},i)}static fromJSDate(i,e={}){let n=$H(i)?i.valueOf():NaN;if(Number.isNaN(n))return t.invalid("invalid input");let r=xa(e.zone,Kt.defaultZone);return r.isValid?new t({ts:n,zone:r,loc:jt.fromObject(e)}):t.invalid(Zp(r))}static fromMillis(i,e={}){if(Pa(i))return i<-_P||i>_P?t.invalid("Timestamp out of range"):new t({ts:i,zone:xa(e.zone,Kt.defaultZone),loc:jt.fromObject(e)});throw new Wn(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,e={}){if(Pa(i))return new t({ts:i*1e3,zone:xa(e.zone,Kt.defaultZone),loc:jt.fromObject(e)});throw new Wn("fromSeconds requires a numerical input")}static fromObject(i,e={}){i=i||{};let n=xa(e.zone,Kt.defaultZone);if(!n.isValid)return t.invalid(Zp(n));let r=jt.fromObject(e),o=p_(i,bP),{minDaysInFirstWeek:s,startOfWeek:a}=sP(o,r),l=Kt.now(),c=Ne(e.specificOffset)?n.offset(l):e.specificOffset,d=!Ne(o.ordinal),p=!Ne(o.year),y=!Ne(o.month)||!Ne(o.day),b=p||y,T=o.weekYear||o.weekNumber;if((b||d)&&T)throw new Ma("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(y&&d)throw new Ma("Can't mix ordinal dates with month/day");let W=T||o.weekday&&!b,j,ee,De=n_(l,c);W?(j=c3,ee=a3,De=d_(De,s,a)):d?(j=d3,ee=l3,De=LS(De)):(j=o_,ee=SO);let tt=!1;for(let Mu of j){let IL=o[Mu];Ne(IL)?tt?o[Mu]=ee[Mu]:o[Mu]=De[Mu]:tt=!0}let Se=W?BH(o,s,a):d?jH(o):QP(o),ar=Se||ZP(o);if(ar)return t.invalid(ar);let hs=W?rP(o,s,a):d?oP(o):o,[On,th]=r_(hs,c,n),xu=new t({ts:On,zone:n,o:th,loc:r});return o.weekday&&b&&i.weekday!==xu.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${xu.toISO()}`):xu.isValid?xu:t.invalid(xu.invalid)}static fromISO(i,e={}){let[n,r]=P$(i);return pd(n,r,e,"ISO 8601",i)}static fromRFC2822(i,e={}){let[n,r]=O$(i);return pd(n,r,e,"RFC 2822",i)}static fromHTTP(i,e={}){let[n,r]=N$(i);return pd(n,r,e,"HTTP",e)}static fromFormat(i,e,n={}){if(Ne(i)||Ne(e))throw new Wn("fromFormat requires an input string and a format");let{locale:r=null,numberingSystem:o=null}=n,s=jt.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),[a,l,c,d]=s3(s,i,e);return d?t.invalid(d):pd(a,l,n,`format ${e}`,i,c)}static fromString(i,e,n={}){return t.fromFormat(i,e,n)}static fromSQL(i,e={}){let[n,r]=j$(i);return pd(n,r,e,"SQL",i)}static invalid(i,e=null){if(!i)throw new Wn("need to specify a reason the DateTime is invalid");let n=i instanceof er?i:new er(i,e);if(Kt.throwOnInvalid)throw new HS(n);return new t({invalid:n})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,e={}){let n=bO(i,jt.fromObject(e));return n?n.map(r=>r?r.val:null).join(""):null}static expandFormat(i,e={}){return vO(Ki.parseFormat(i),jt.fromObject(e)).map(r=>r.val).join("")}static resetCache(){Jp=void 0,oE.clear()}get(i){return this[i]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?US(this).weekYear:NaN}get weekNumber(){return this.isValid?US(this).weekNumber:NaN}get weekday(){return this.isValid?US(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?BS(this).weekday:NaN}get localWeekNumber(){return this.isValid?BS(this).weekNumber:NaN}get localWeekYear(){return this.isValid?BS(this).weekYear:NaN}get ordinal(){return this.isValid?LS(this.c).ordinal:NaN}get monthShort(){return this.isValid?fd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?fd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?fd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?fd.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let i=864e5,e=6e4,n=m_(this.c),r=this.zone.offset(n-i),o=this.zone.offset(n+i),s=this.zone.offset(n-r*e),a=this.zone.offset(n-o*e);if(s===a)return[this];let l=n-s*e,c=n-a*e,d=n_(l,s),p=n_(c,a);return d.hour===p.hour&&d.minute===p.minute&&d.second===p.second&&d.millisecond===p.millisecond?[Jl(this,{ts:l}),Jl(this,{ts:c})]:[this]}get isInLeapYear(){return ef(this.year)}get daysInMonth(){return u_(this.year,this.month)}get daysInYear(){return this.isValid?hd(this.year):NaN}get weeksInWeekYear(){return this.isValid?Kp(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Kp(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){let{locale:e,numberingSystem:n,calendar:r}=Ki.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:e,numberingSystem:n,outputCalendar:r}}toUTC(i=0,e={}){return this.setZone(Ir.instance(i),e)}toLocal(){return this.setZone(Kt.defaultZone)}setZone(i,{keepLocalTime:e=!1,keepCalendarTime:n=!1}={}){if(i=xa(i,Kt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let r=this.ts;if(e||n){let o=i.offset(this.ts),s=this.toObject();[r]=r_(s,o,i)}return Jl(this,{ts:r,zone:i})}else return t.invalid(Zp(i))}reconfigure({locale:i,numberingSystem:e,outputCalendar:n}={}){let r=this.loc.clone({locale:i,numberingSystem:e,outputCalendar:n});return Jl(this,{loc:r})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;let e=p_(i,bP),{minDaysInFirstWeek:n,startOfWeek:r}=sP(e,this.loc),o=!Ne(e.weekYear)||!Ne(e.weekNumber)||!Ne(e.weekday),s=!Ne(e.ordinal),a=!Ne(e.year),l=!Ne(e.month)||!Ne(e.day),c=a||l,d=e.weekYear||e.weekNumber;if((c||s)&&d)throw new Ma("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new Ma("Can't mix ordinal dates with month/day");let p;o?p=rP(F(F({},d_(this.c,n,r)),e),n,r):Ne(e.ordinal)?(p=F(F({},this.toObject()),e),Ne(e.day)&&(p.day=Math.min(u_(p.year,p.month),p.day))):p=oP(F(F({},LS(this.c)),e));let[y,b]=r_(p,this.o,this.zone);return Jl(this,{ts:y,o:b})}plus(i){if(!this.isValid)return this;let e=zn.fromDurationLike(i);return Jl(this,vP(this,e))}minus(i){if(!this.isValid)return this;let e=zn.fromDurationLike(i).negate();return Jl(this,vP(this,e))}startOf(i,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;let n={},r=zn.normalizeUnit(i);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks")if(e){let o=this.loc.getStartOfWeek(),{weekday:s}=this;s<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(r==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(i,e){return this.isValid?this.plus({[i]:1}).startOf(i,e).minus(1):this}toFormat(i,e={}){return this.isValid?Ki.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,i):VS}
5toLocaleString(i=l_,e={}){return this.isValid?Ki.create(this.loc.clone(e),i).formatDateTime(this):VS}toLocaleParts(i={}){return this.isValid?Ki.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:e=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:o=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=s_(s);let a=i==="extended",l=jS(this,a,s);return o_.indexOf(s)>=3&&(l+="T"),l+=yP(this,a,e,n,r,o,s),l}toISODate({format:i="extended",precision:e="day"}={}){return this.isValid?jS(this,i==="extended",s_(e)):null}toISOWeekDate(){return i_(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:e=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:o=!1,format:s="extended",precision:a="milliseconds"}={}){return this.isValid?(a=s_(a),(r&&o_.indexOf(a)>=3?"T":"")+yP(this,s==="extended",e,i,n,o,a)):null}toRFC2822(){return i_(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return i_(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?jS(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:e=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(e||i)&&(n&&(r+=" "),e?r+="z":i&&(r+="ZZ")),i_(this,r,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():VS}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(i={}){if(!this.isValid)return{};let e=F({},this.c);return i.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,e="milliseconds",n={}){if(!this.isValid||!i.isValid)return zn.invalid("created by diffing an invalid DateTime");let r=F({locale:this.locale,numberingSystem:this.numberingSystem},n),o=GH(e).map(zn.normalizeUnit),s=i.valueOf()>this.valueOf(),a=s?this:i,l=s?i:this,c=q$(a,l,o,r);return s?c.negate():c}diffNow(i="milliseconds",e={}){return this.diff(t.now(),i,e)}until(i){return this.isValid?Oa.fromDateTimes(this,i):this}hasSame(i,e,n){if(!this.isValid)return!1;let r=i.valueOf(),o=this.setZone(i.zone,{keepLocalTime:!0});return o.startOf(e,n)<=r&&r<=o.endOf(e,n)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;let e=i.base||t.fromObject({},{zone:this.zone}),n=i.padding?this<e?-i.padding:i.padding:0,r=["years","months","days","hours","minutes","seconds"],o=i.unit;return Array.isArray(i.unit)&&(r=i.unit,o=void 0),SP(e,this.plus(n),ve(F({},i),{numeric:"always",units:r,unit:o}))}toRelativeCalendar(i={}){return this.isValid?SP(i.base||t.fromObject({},{zone:this.zone}),this,ve(F({},i),{numeric:"auto",units:["years","months","days"],calendary:!0})):null}static min(...i){if(!i.every(t.isDateTime))throw new Wn("min requires all arguments be DateTimes");return aP(i,e=>e.valueOf(),Math.min)}static max(...i){if(!i.every(t.isDateTime))throw new Wn("max requires all arguments be DateTimes");return aP(i,e=>e.valueOf(),Math.max)}static fromFormatExplain(i,e,n={}){let{locale:r=null,numberingSystem:o=null}=n,s=jt.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return yO(s,i,e)}static fromStringExplain(i,e,n={}){return t.fromFormatExplain(i,e,n)}static buildFormatParser(i,e={}){let{locale:n=null,numberingSystem:r=null}=e,o=jt.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new f_(o,i)}static fromFormatParser(i,e,n={}){if(Ne(i)||Ne(e))throw new Wn("fromFormatParser requires an input string and a format parser");let{locale:r=null,numberingSystem:o=null}=n,s=jt.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});if(!s.equals(e.locale))throw new Wn(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${e.locale}`);let{result:a,zone:l,specificOffset:c,invalidReason:d}=e.explainFromTokens(i);return d?t.invalid(d):pd(a,l,n,`format ${e.format}`,i,c)}static get DATE_SHORT(){return l_}static get DATE_MED(){return IP}static get DATE_MED_WITH_WEEKDAY(){return CH}static get DATE_FULL(){return wP}static get DATE_HUGE(){return TP}static get TIME_SIMPLE(){return DP}static get TIME_WITH_SECONDS(){return AP}static get TIME_WITH_SHORT_OFFSET(){return RP}static get TIME_WITH_LONG_OFFSET(){return xP}static get TIME_24_SIMPLE(){return MP}static get TIME_24_WITH_SECONDS(){return PP}static get TIME_24_WITH_SHORT_OFFSET(){return OP}static get TIME_24_WITH_LONG_OFFSET(){return NP}static get DATETIME_SHORT(){return kP}static get DATETIME_SHORT_WITH_SECONDS(){return LP}static get DATETIME_MED(){return FP}static get DATETIME_MED_WITH_SECONDS(){return VP}static get DATETIME_MED_WITH_WEEKDAY(){return SH}static get DATETIME_FULL(){return UP}static get DATETIME_FULL_WITH_SECONDS(){return BP}static get DATETIME_HUGE(){return jP}static get DATETIME_HUGE_WITH_SECONDS(){return HP}};function Yp(t){if(ie.isDateTime(t))return t;if(t&&t.valueOf&&Pa(t.valueOf()))return ie.fromJSDate(t);if(t&&typeof t=="object")return ie.fromObject(t);throw new Wn(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var v_=class{static expandUrl(i,e,n,r,o,s,a,l,c,d,p){if(i.includes("${now:M1}")){let b=ie.utc().startOf("minute").toISO({suppressMilliseconds:!0,suppressSeconds:!0});i=i.replace(/\${now:M1}/g,encodeURIComponent(b))}if(i.includes("${now:M5}")){let y=ie.utc().startOf("minute"),b=Math.floor(y.minute/5)*5,T=y.set({minute:b}).toISO({suppressMilliseconds:!0,suppressSeconds:!0});i=i.replace(/\${now:M5}/g,encodeURIComponent(T))}if(i.includes("${now:M10}")){let y=ie.utc().startOf("minute"),b=Math.floor(y.minute/10)*10,T=y.set({minute:b}).toISO({suppressMilliseconds:!0,suppressSeconds:!0});i=i.replace(/\${now:M10}/g,encodeURIComponent(T))}if(i.includes("${adult}")&&(i=i.replace(/\${adult}/g,encodeURIComponent(a))),i.includes("${page}"))i=i.replace(/\${page}/g,encodeURIComponent(e.toString()));else if(e!==0)return;if(i.includes("${loggedIn}
5")){let y=n?"false":"true";i=i.replace(/\${loggedIn}/g,encodeURIComponent(y))}return i.includes("${entitlementId}")&&(i=i.replace(/\${entitlementId}/g,encodeURIComponent(r||""))),i.includes("${catalogId}")&&(i=i.replace(/\${catalogId}/g,encodeURIComponent(o||""))),i.includes("${profileId}")&&(i=i.replace(/\${profileId}/g,encodeURIComponent(s||""))),i.includes("${deviceType}")&&(i=i.replace(/\${deviceType}/g,encodeURIComponent(c||""))),i.includes("${platformType}")&&(i=i.replace(/\${platformType}/g,encodeURIComponent(d||""))),i.includes("${extraData}")&&(i=i.replace(/\${extraData}/g,encodeURIComponent(xS.NONE))),i.includes("${actionFilter}")&&(i=i.replace(/\${actionFilter}/g,encodeURIComponent(p))),i.includes("${focusType}")&&(i=i.replace(/\${focusType}/g,encodeURIComponent(l))),i}};var EO={locale:"en_US",globalSettings:[{name:"airPlayEnabled",value:"true"},{name:"allowProfileSwitching",value:"false"},{name:"allowUnauthenticatedUse",value:"true"},{name:"analyticsFlushPeriod",value:"300000"},{name:"analyticsPostBatchSize",value:"50"},{name:"autoplayWatchingEnabledEpg",value:"true"},{name:"autoplayWatchingEnabledVod",value:"true"},{name:"blackoutErrorCodes",value:"SS_LINEAR_BLACKOUT,SS_SCHEDULE_BLACKOUT"},{name:"bookmarkCacheExpiration",value:"600000"},{name:"bookmarksMaximumPercent",value:"0.95"},{name:"broadpeakAnalyticsEnabled",value:"false"},{name:"channelCacheExpiration",value:"600000"},{name:"chromeCast4kDevices",value:"Chromecast Ultra"},{name:"chromeCastEnabled",value:"true"},{name:"decimalCount",value:"2"},{name:"decimalDivider",value:"100"},{name:"defaultAudioOption1",value:"none"},{name:"defaultAudioOption2",value:"none"},{name:"defaultIdentityProviderId",value:"92fd08d1-a441-46b7-bf36-8758451f8b70"},{name:"defaultKeepaliveTimeout",value:"300000"},{name:"defaultSubtitleOption1",value:"none"},{name:"defaultSubtitleOption2",value:"none"},{name:"displaySubtitleTeletextId",value:"true"},{name:"epgFutureDays",value:"7"},{name:"epgLiveThumbnailMaxDuration",value:"600"},{name:"epgPastDays",value:"7"},{name:"fastForwardStopTime",value:"10000"},{name:"favoriteCacheExpiration",value:"600000"},{name:"languageAudioOptions",value:"en,none"},{name:"languageSubtitleOptions",value:"en,none"},{name:"logoutRedirectParameter",value:"redirect_uri"},{name:"maxAllowedProfiles",value:"5"},{name:"maxKeepAliveErrors",value:"3"},{name:"maxLengthProfileName",value:"25"},{name:"maxNrOfFailedAnalytics",value:"1"},{name:"maxResolution",value:"HD"},{name:"maxResolutionV2",value:"HD"},{name:"noAccessErrorCodes",value:"SS_ENTITLEMENTS_EMPTY"},{name:"npvrRecordingAboutToExpireInterval",value:"7"},{name:"nrOfPlayerHints",value:"3"},{name:"playerAdvertisementNotSubscribedTime",value:"-1"},{name:"playerBookmarkTime",value:"300000"},{name:"playerBreakvertisingTime",value:"2000"},{name:"playerFastForwardVod",value:"15000"},{name:"playerHideControlsPeriod",value:"5000"},{name:"playerLivePauseResumeCompensation",value:"30000"},{name:"playerPauseStopPlayerTime",value:"25000"},{name:"playerProgressUpdatePeriod",value:"1000"},{name:"playerQualityHideFps",value:"25"},{name:"playerRealtimeMultiChannelLabel",value:"realtime.multi"},{name:"playerRealtimeSingleChannelLabel",value:"realtime.single"},{name:"playerRewindVod",value:"15000"},{name:"playerStillPlayingTime",value:"300000"},{name:"playerWatchlistTime",value:"300000"},{name:"playerWatchlistTimeRandomMs",value:"300000"},{name:"quoteCacheExpiration",value:"600000"},{name:"recordingAfterTimes",value:"0,5,10,15,20,30"},{name:"recordingBeforeTimes",value:"0,5,10,15,20,30"},{name:"recordingCacheExpiration",value:"600000"},{name:"recordingDefaultAfterTime",value:"10"},{name:"recordingDefaultBeforeTime",value:"10"},{name:"recordingDefaultDeleteProtection",value:"OFF"},{name:"reminderBeforeTimes",value:"0,5,10,15,20,30"},{name:"reminderCacheExpiration",value:"600000"},{name:"searchKeyTimeout",value:"500"},{name:"searchMaxSuggestionLength",value:"20"},{name:"searchMinChars",value:"3"},{name:"seekThumbnailsEnabled",value:"false"},{name:"seekTimeout",value:"500"},{name:"showAccessibilityIcons",value:"false"},{name:"showAdultPage",value:"OFF"},{name:"showEpgListsChannelNumbers",value:"false"},{name:"showParentalIcons",value:"false"},{name:"showSeriesWatchButton",value:"true"},{name:"showVodTitles",value:"true"},{name:"stackTraceMaximumLines",value:"25"},{name:"startupTimeDifference",value:"120000"},{name:"swipePollIncrement",value:"1000"},{name:"swipePollTimeout",value:"60000"},{name:"unauthorizedAnalytics",value:'[{"category": "PLAYER","subcategories": ["PLAY_STATE","KEEP_ALIVE_ERROR","PLAY_START","PLAY_ERROR","PLAY_WARNING","PLAYING","PLAY_STOP"]}]'},{name:"useOldEpgCards",value:"false"}],appTranslations:[{name:"AA_CUSTOMER_INACTIVE_BADPAYER",value:"The customer is inactive: bad payer"},{name:"AA_CUSTOMER_INACTIVE_OTHER",value:"The customer is inactive"},{name:"AA_CUSTOMER_OR_IP_LOCKED",value:"User locked"},{name:"AA_CUSTOMER_USER_LOCKED",value:"User locked"},{name:"AA_CUSTOMER_USER_NOT_FOUND",value:"Invalid username"},{name:"AA_DEVICE_NOT_ALLOWED",value:"This device is not allowed"},{name:"AA_DEVICE_NOT_FOUND",value:"Device not found or gone."},{name:"AA_INVALID_LOGIN",value:"Invalid password"},{name:"AA_INVALID_PINCODE",value:"Invalid PIN"},{name:"AA_INVALID_REGISTRATION_VERSION",value:"Something went wrong. Please contact technical support"},{name:"AA_PINCODE_NON_DIGIT_CHAR",value:"The PIN may only contain numbers"},{name:"AA_PINCODE_TOO_LONG",value:"The PIN is too long"},{name:"AA_PINCODE_TOO_SHORT",value:"The PIN is too short"},{name:"AA_PROFILE_IN_USE",value:"Profile in use"},{name:"AA_PROFILE_NOT_FOUND",value:"Profile not found."},{name:"AA_REGISTRATION_HASH_ERROR",value:"Something went wrong. Please contact technical support"},{name:"API_UNSUPPORTED_APP_VERSION",value:"There is a new update available. Please delete this application and download Melita NexTV from the Google Play Store."},{name:"API_UNSUPPORTED_OS_VERSION",value:"Your operating system version is too old. Please try upgrading your operating system."},{name:"BTV_OTT_STREAM_LIMIT_REACHED",value:"You have exceeded the number of simultaneous streams"},{name:"COUPON_EXPIRED",value:"Coupon is expired"},{name:"COUPON_NOT_VALID",value:"Coupon not yet valid"},{name:"EPG_SCHEDULE_NOT_FOUND",value:"There is no event on this channel"},{name:"GEOIP_UNSAFE_IP",value:"The stream is unavailable in your geographic location"},{name:"NON_EU_STREAM_BLOCKED",value:"The stream is only available in the EU"},{name:"NOWO_INHOUSE_CHECK_ERROR",value:"You need to be connected to your home network in order to watch this content"},{name:"OAUTH_CLIENT_LOCKED",value:"Account temporarily locked. Try again in 15 minutes"},{name:"OAUTH_USER_CODE_NOT_FOUND",value:"Code not found"},{name:"OTT_STREAM_LIMIT_REACHED",value:"You have reached the limit of streams you can watch simultaneously"},{name:"PRICING_COUPON_ALREADY_CLAIMED",value:"Coupon already claimed"},{name:"PRICING_COUPON_EMPTY",value:"Coupon can not be empty"},{name:"PRICING_COUPON_EXPIRED",value:"Coupon has expired"},{name:"PRICING_COUPON_NOT_FOUND",value:"Invalid coupon"},{name:"PRICING_COUPON_NOT_VALID",value:"Coupon not yet valid"}
5,{name:"PRICING_EXPENDITURE_LIMIT_REACHED",value:"You have reached your expenditure limit"},{name:"PRICING_INVALID_COUPON_CLAIM",value:"Coupon not usable for a movie in this category"},{name:"PRICING_INVALID_PIN_TYPE",value:"Invalid PIN"},{name:"PRICING_QUOTE_STREAM_ALREADY_PURCHASED",value:"This video is already purchased."},{name:"SPORTV_OTT_STREAM_LIMIT_REACHED",value:"You have reached the limit of sport streams you can watch simultaneously"},{name:"SS_ANONYMOUS_STREAM_NOT_ALLOWED",value:"This stream is not available in anonymous mode"},{name:"SS_ENTITLEMENTS_AIRPLAY_EMPTY",value:"You don't have the required rights to play this content using Airplay."},{name:"SS_ENTITLEMENTS_EMPTY",value:"You don't have the required rights to play this content"},{name:"SS_ENTITLEMENTS_INHOME_FAILED",value:"You need to connect to your home network to watch this"},{name:"SS_LINEAR_BLACKOUT",value:"This event is blocked"},{name:"SS_NPVR_BLACKOUT",value:"This event is blacked out"},{name:"SS_REPLAY_BLACKOUT",value:"This event is blocked"},{name:"SS_REPLAY_WINDOW_PASSED",value:"This show is no longer available in catch up"},{name:"SS_SCHEDULE_BLACKOUT",value:"This event is blocked"},{name:"STB_STREAM_LIMIT_EXCEEDED",value:"You have exceeded the number of simultaneous streams"},{name:"STB_STREAM_LIMIT_REACHED",value:"You have reached the limit of streams you can watch simultaneously"},{name:"STREAM_LIMIT_EXCEEDED",value:"You have exceeded the number of simultaneous streams"},{name:"STREAM_NON_EU",value:"Melita TV content is only available within the EU."},{name:"STREAM_UNSAFE_IP",value:"Melita TV content is not available over VPN connections."},{name:"STREAM_VOD_3G_FORBIDDEN",value:"Streaming VOD is currently not allowed over mobile networks"},{name:"VOD_OTT_STREAM_LIMIT_REACHED",value:"You have exceeded the number of simultaneous streams"},{name:"VOD_STB_STREAM_LIMIT_REACHED",value:"You have exceeded the number of simultaneous streams"},{name:"_new",value:"New"},{name:"accessibility_audio_description",value:"Audio description"},{name:"accessibility_sign_language",value:"Sign language"},{name:"accessibility_subtitles",value:"Subtitles"},{name:"agora",value:"Now"},{name:"android_tv_check_adult_mode_disabled",value:"Please open the settings page on your AndroidTV and make sure the adult mode is disabled."},{name:"android_tv_check_adult_mode_enabled",value:"Please open the settings page on your AndroidTV and make sure the adult mode is enabled."},{name:"android_tv_player_hint_overlay_open_channel_bar",value:"Open channel bar"},{name:"android_tv_player_hint_overlay_open_mini_guide",value:"Open mini guide"},{name:"android_tv_player_hint_overlay_open_video_controls",value:"Open video controls"},{name:"android_tv_popup_not_replayable_blackout_body",value:"The current event is not available in replay."},{name:"android_tv_popup_not_replayable_blackout_title",value:"Timeshift"},{name:"android_tv_popup_not_replayable_channel_body",value:"The current channel is not available in replay."},{name:"android_tv_popup_not_replayable_channel_title",value:"Timeshift"},{name:"androidtv_ca_error_content_not_available",value:"Content not available"},{name:"androidtv_ca_error_network_timeout",value:"Network connection error 1"},{name:"androidtv_ca_error_service_class",value:"Network connection error 2"},{name:"androidtv_ca_error_trustzone_applet",value:"Network connection error 3"},{name:"androidtv_ca_error_vcas_server_connection",value:"Network connection error 4"},{name:"androidtv_ca_error_with_code",value:"Network connection error $1"},{name:"androidtv_ca_error_with_code_530226",value:"This channel is not included in your subscriptions. If you want to watch it, please subscribe to a package that contains this channel."},{name:"androidtv_ca_error_with_code_70403",value:"Network Connection in Progress Please Wait $1"},{name:"androidtv_empty_system_recommendations_title",value:"Melita $1"},{name:"androidtv_popup_button_background",value:"Download in background"},{name:"androidtv_popup_network_error_network",value:"Could not connect. Please check your internet connection"},{name:"androidtv_popup_network_error_provision",value:"Could not provision your NexTV Decoder. Please contact our support team."},{name:"androidtv_popup_notify_update_body",value:"The application will update now. After updating, the device will restart the application."},{name:"androidtv_popup_notify_update_title",value:"Update"},{name:"androidtv_popup_update_download_body",value:"Downloading update. After downloading, the device will start the update and the application will restart."},{name:"androidtv_popup_update_download_title",value:"Download update"},{name:"androidtv_popup_update_failed",value:"Installing the update failed"},{name:"androidtv_popup_update_permission_body",value:"There is a new update available. Would you like to update now?"},{name:"androidtv_popup_update_permission_title",value:"Update available"},{name:"androidtv_video_unavailable_reason_weak_signal",value:"Problem with tuner. Check your RF-cable."},{name:"apps",value:"Apps"},{name:"apps_foxplay",value:"FOX Play"},{name:"apps_foxplay_popup_body",value:"Join FOX+ in My World > Client Area > Subscriptions"}
5,{name:"apps_foxplay_popup_title",value:"FOX Play"},{name:"apps_header_available_soon",value:"Available soon"},{name:"apps_header_title",value:"Available soon"},{name:"apps_page_empty",value:"No applications available"},{name:"apps_popup_not_available_body",value:"This App will be available soon!"},{name:"apps_popup_not_available_title",value:"Apps"},{name:"apps_radio",value:"Radio"},{name:"apps_radio_empty_radios",value:"No subscribed radio channels available"},{name:"apps_youtube",value:"YouTube"},{name:"autoplay_start_in_seconds",value:"Start in $1"},{name:"autoplay_start_manually",value:"Start next episode"},{name:"browser_not_supported_download",value:"Download Chrome"},{name:"browser_not_supported_message",value:"Internet Explorer is not longer supported. For the best experience please download Google Chrome"},{name:"browser_not_supported_title",value:"This browser is not supported"},{name:"cancel",value:"Cancel"},{name:"cast_general_failure",value:"Something went wrong with screencasting. Please try again later."},{name:"casting_to_title_web",value:"Screencasting to $1"},{name:"catalog_select_title",value:"Select a catalog"},{name:"catalog_switch",value:"Switch catalog"},{name:"category_adult_content_pincode_message",value:"TBD"},{name:"cd_autoplay_poster",value:"poster image for $1"},{name:"cd_detail_favorite_asset",value:"Mark as favorite"},{name:"cd_detail_remove_reminder_asset",value:"Remove reminder"},{name:"cd_detail_set_reminder_asset",value:"Set reminder"},{name:"cd_detail_unfavorite_asset",value:"Unmark as favorite"},{name:"cd_profile_create",value:"create profile"},{name:"cd_profile_edit",value:"Edit profile $1"},{name:"cd_profile_icon",value:"Profile icon for $1"},{name:"cd_profile_switch",value:"Switch to profile $1"},{name:"cd_share_button",value:"Share with others"},{name:"chromecast_disabled_msg",value:"Chromecast is disabled by the server"},{name:"chromecast_disabled_title",value:"Chromecast disabled"},{name:"chromecast_no_name_message",value:"Chromecast device name is not personalised"},{name:"chromecast_no_name_title",value:"No chromecast name"},{name:"chromecast_not_connected",value:"Chromecast not connected"},{name:"client_area",value:"My World"},{name:"client_area_change_password",value:"Change password"},{name:"client_area_customer_invoices",value:"Invoices"},{name:"client_area_faq",value:"FAQ"},{name:"client_area_title_privacy",value:"Privacy"},{name:"continue_watching",value:"Continue watching"},{name:"date_picker_from_date",value:"From"},{name:"date_picker_to_date",value:"To"},{name:"date_picker_type_date",value:"Date"},{name:"date_picker_type_period",value:"Period"},{name:"detail_actors",value:"Actors"},{name:"detail_adult_warning",value:"This content is not available"},{name:"detail_androidtv_fallback_name",value:"My Box ($1)"},{name:"detail_available_in_subscription",value:"Available in"},{name:"detail_available_until",value:"Available until"},{name:"detail_btn_all_episodes",value:"All episodes"},{name:"detail_btn_all_episodes_stb",value:"All episodes"},{name:"detail_btn_bundle",value:"Bundle"},{name:"detail_btn_bundle_stb",value:"Bundle"},{name:"detail_btn_bundle_tv",value:"Bundle"},{name:"detail_btn_change_audio_stb",value:"Change audio"},{name:"detail_btn_change_quality",value:"Change quality"},{name:"detail_btn_change_subtitles_stb",value:"Change subtitles"},{name:"detail_btn_more",value:"More"},{name:"detail_btn_more_stb",value:"More"},{name:"detail_btn_other_episodes_stb",value:"Other episodes"},{name:"detail_btn_purchase",value:"Purchase"},{name:"detail_btn_record_cancel",value:"Cancel"},{name:"detail_btn_record_record",value:"Record"},{name:"detail_btn_recording_edit",value:"Change recording options"},{name:"detail_btn_remove_reminder",value:"Remove reminder"},{name:"detail_btn_remove_reminder_android_tv",value:"Remove reminder"},{name:"detail_btn_remove_reminder_stb",value:"Remove reminder"},{name:"detail_btn_remove_reminder_tv",value:"Remove Reminder"},{name:"detail_btn_rent_now",value:"Rent now"},{name:"detail_btn_serie_info_stb",value:"Series info"},{name:"detail_btn_serie_record",value:"Record Series"},{name:"detail_btn_series",value:"Series"},{name:"detail_btn_set_reminder",value:"Set reminder"},{name:"detail_btn_set_reminder_android_tv",value:"Set reminder"},{name:"detail_btn_set_reminder_stb",value:"Set reminder"},{name:"detail_btn_set_reminder_tv",value:"Set Reminder"},{name:"detail_btn_settings",value:"Settings"},{name:"detail_btn_show_details",value:"Show details"},{name:"detail_btn_show_details_stb",value:"Show details"},{name:"detail_btn_show_subscriptions_android_tv",value:"Subscriptions"},{name:"detail_btn_show_subscriptions_stb",value:"Subscriptions"},{name:"detail_btn_sub_and_audio_stb",value:"Subtitles & Audio"},{name:"detail_btn_subtitles",value:"Subtitles"},{name:"detail_btn_teletext_off_stb",value:"Turn off Teletext"},{name:"detail_btn_teletext_on_stb",value:"Turn on Teletext"},{name:"detail_btn_trailer",value:"Trailer"},{name:"detail_btn_trailer_stb",value:"Watch trailer"},{name:"detail_btn_watch_now",value:"Watch now"},{name:"detail_btn_watch_recording",value:"Watch recording"},{name:"detail_btn_watch_replay",value:"Watch in replay"},{name:"detail_btn_watchnow",value:"Watch now"}
5,{name:"detail_claimvoucher_title",value:"Please enter your code"},{name:"detail_directors",value:"Directors"},{name:"detail_duration_min",value:"min."},{name:"detail_enter_pincode",value:"Please enter your PIN code"},{name:"detail_enter_pincode_adult",value:"Please enter the adult PIN code"},{name:"detail_episode",value:"Episode"},{name:"detail_episode_short",value:"ep."},{name:"detail_favorite",value:"Mark as Favourite"},{name:"detail_favorite_channel",value:"Mark channel as Favourite"},{name:"detail_favorite_stb",value:"Mark as favourite"},{name:"detail_free_to_watch",value:"Free"},{name:"detail_gratis",value:"free"},{name:"detail_imdb_rating",value:"IMDb rating:"},{name:"detail_included_in_bundle",value:"Included in bundle: $1"},{name:"detail_included_in_subscriptions",value:"Included in your subscriptions"},{name:"detail_included_in_subscriptions_on_stb",value:"Included in your subscriptions on your box"},{name:"detail_legs",value:"$1"},{name:"detail_lineup_header_horse",value:"Horse"},{name:"detail_lineup_header_position",value:"No"},{name:"detail_lineup_header_rider",value:"Rider"},{name:"detail_option_audio_and_codec_stb",value:"$1 ($2)"},{name:"detail_option_sub_dvb_stb",value:"$1 (DVB)"},{name:"detail_option_sub_no_subtitles_stb",value:"No Subtitles"},{name:"detail_option_sub_txt_stb",value:"$1 (TXT)"},{name:"detail_planned_on",value:"Planned on $1"},{name:"detail_popup_sub_and_audio_no_items_stb",value:"No subtitles or audio available"},{name:"detail_popup_sub_and_audio_stb",value:"Subtitles & audio"},{name:"detail_price",value:"\u20AC $1"},{name:"detail_purchase_pincode",value:"PIN"},{name:"detail_purchase_popup_title_stb",value:"Purchase"},{name:"detail_read_more",value:"More"},{name:"detail_recommended_more_like_this",value:"More like this"},{name:"detail_recommended_more_like_this_stb",value:"More like this"},{name:"detail_recommended_others_watched",value:"People who watched this also watched..."},{name:"detail_recommended_others_watched_stb",value:"People who watched this also watched..."},{name:"detail_recommended_stb",value:"Recommended"},{name:"detail_recorded_on",value:"Recorded on $1"},{name:"detail_recording_before_after_template",value:"$1 min."},{name:"detail_recording_cancel",value:"Cancel recording"},{name:"detail_recording_cancel_current_program_stb",value:"Cancel programme"},{name:"detail_recording_cancel_current_season_stb",value:"Cancel season"},{name:"detail_recording_cancel_popup_title",value:"Cancel:"},{name:"detail_recording_cancel_popup_title_stb",value:"Cancel:"},{name:"detail_recording_cancel_program",value:"Delete programme"},{name:"detail_recording_cancel_season",value:"Delete season"},{name:"detail_recording_cancel_serie_stb",value:"Cancel series"},{name:"detail_recording_cancel_series",value:"Delete series"},{name:"detail_recording_cancel_stb",value:"Cancel recording"},{name:"detail_recording_change_rec_option_after",value:"After"},{name:"detail_recording_change_rec_option_after_stb",value:"After"},{name:"detail_recording_change_rec_option_before",value:"Before"},{name:"detail_recording_change_rec_option_before_stb",value:"Before"},{name:"detail_recording_change_rec_option_lock_stb",value:"Lock"},{name:"detail_recording_change_rec_option_what_stb",value:"What"},{name:"detail_recording_change_rec_options_popup_title_stb",value:"Change recording options:"},{name:"detail_recording_change_rec_options_stb",value:"Change recording options"},{name:"detail_recording_delete",value:"Delete recording"},{name:"detail_recording_delete_confirm",value:"Are you sure you want to delete this recording?"},{name:"detail_recording_delete_current_program_stb",value:"Delete programme"},{name:"detail_recording_delete_current_season_stb",value:"Delete season"},{name:"detail_recording_delete_popup_title",value:"Delete:"},{name:"detail_recording_delete_popup_title_stb",value:"Delete:"},{name:"detail_recording_delete_protected",value:"Delete protected"},{name:"detail_recording_delete_serie_stb",value:"Delete series"},{name:"detail_recording_delete_stb",value:"Delete recording"},{name:"detail_recording_edit_popup_title",value:"Change recording options"},{name:"detail_recording_episodes",value:"Episodes"},{name:"detail_recording_footer",value:"Recording:"},{name:"detail_recording_lock_stb",value:"Lock recording"},{name:"detail_recording_other_planned_ep_stb",value:"Other planned episodes"},{name:"detail_recording_other_rec_ep_stb",value:"Other recorded episodes"},{name:"detail_recording_program_stb",value:"Programme"},{name:"detail_recording_record_current_program_stb",value:"Record programme"},{name:"detail_recording_record_current_season_stb",value:"Record season"}
5,{name:"detail_recording_record_popup_title",value:"Record:"},{name:"detail_recording_record_popup_title_stb",value:"Record:"},{name:"detail_recording_record_serie_stb",value:"Record series"},{name:"detail_recording_season_stb",value:"Season"},{name:"detail_recording_serie_stb",value:"Series"},{name:"detail_recording_start",value:"Start recording"},{name:"detail_recording_start_stb",value:"Start recording"},{name:"detail_recording_stb",value:"NexTV Decoder"},{name:"detail_recording_stop",value:"Stop recording"},{name:"detail_recording_stop_stb",value:"Stop recording"},{name:"detail_recording_this_episode",value:"This episode"},{name:"detail_recording_this_season",value:"This season"},{name:"detail_recording_this_series",value:"This series"},{name:"detail_recording_unlock_stb",value:"Unlock recording"},{name:"detail_reminder_start_watching",value:"Press the $1 button to start watching."},{name:"detail_reminder_text",value:"$1 is about to start!"},{name:"detail_reminder_title",value:"Reminder"},{name:"detail_ribbon_recordings",value:"Recordings"},{name:"detail_season",value:"Season"},{name:"detail_season_short",value:"s."},{name:"detail_selecttrailer_trailer",value:"Trailer"},{name:"detail_share_text",value:"Like $1 using @Melita"},{name:"detail_share_text_epg",value:"Love $1 on $2 using @Melita"},{name:"detail_share_text_vod",value:"Love $1 using @Melita OnDemand"},{name:"detail_share_using",value:"Share using\u2026"},{name:"detail_stb_fallback_name",value:"My Box ($1)"},{name:"detail_succes_rent_bundle",value:"Bundle is rented"},{name:"detail_succes_swipe",value:"Swipe successful"},{name:"detail_swipe_this_device",value:"This device"},{name:"detail_tab_episodes",value:"Episodes"},{name:"detail_tab_included_in_bundle",value:"Included in this bundle"},{name:"detail_tab_more_info",value:"More info"},{name:"detail_tab_recordings",value:"Recordings"},{name:"detail_tab_related",value:"Related"},{name:"detail_trailer_popup_title_stb",value:"Watch trailer"},{name:"detail_unfavorite",value:"Unmark as Favourite"},{name:"detail_unfavorite_channel",value:"Unmark channel as Favourite"},{name:"detail_unfavorite_stb",value:"Unmark as favourite"},{name:"detail_upsell_information",value:"Available in $1"},{name:"detail_vouchercoupon",value:"Do you have a voucher or coupon?"},{name:"detail_watch_cancel",value:"Cancel"},{name:"detail_watch_from_beginning",value:"Watch from beginning"},{name:"detail_watch_from_beginning_android_tv",value:"Watch from beginning"},{name:"detail_watch_from_beginning_stb",value:"Watch from beginning"},{name:"detail_watch_from_bookmark",value:"Continue watching"},{name:"detail_watch_from_bookmark_android_tv",value:"Continue watching"},{name:"detail_watch_from_bookmark_stb",value:"Continue watching"},{name:"detail_watch_live",value:"Watch live"},{name:"detail_watch_live_android_tv",value:"Watch live"},{name:"detail_watch_live_stb",value:"Watch live"},{name:"detail_watch_pip_short_stb",value:"Split Screen"},{name:"detail_watch_pip_stb",value:"Watch Split Screen"},{name:"detail_watch_popup_title_android_tv",value:"Watch:"},{name:"detail_watch_popup_title_stb",value:"Watch:"},{name:"device_list_chromecast_indicator",value:"(Chromecast)"},{name:"error_adult_mode_required",value:"This content is not available"},{name:"error_authentication_failed",value:"Authentication failed."},{name:"error_banner_action_type_not_supported",value:"The banner action type is not supported."},{name:"error_blackout",value:"This event is blocked"},{name:"error_blackout_dvbc_ott",value:"This event is blocked"},{name:"error_blackout_dvbc_stb",value:"This event is blocked"},{name:"error_blackout_linear_ott",value:"This event is blocked"},{name:"error_blackout_linear_stb",value:"This event is blocked"},{name:"error_blackout_npvr_ott",value:"This event is blocked"},{name:"error_blackout_npvr_stb",value:"This event is blocked"},{name:"error_blackout_replay_ott",value:"This event is blocked"},{name:"error_blackout_replay_stb",value:"This event is blocked"},{name:"error_bundle_expired",value:"This bundle is no longer available"},{name:"error_connectivity_lost",value:"An error has occurred, please check your device's Internet connection."},{name:"error_device_time",value:"Your local device time is not correct. This might result in unexpected behaviour."},{name:"error_expenditure_limit_exceeded",value:"You have reached your expenditure limit"},{name:"error_filter_no_channel_for_category",value:"There are no channels that offer the selected category."},{name:"error_filter_no_channel_for_filter",value:"There are no channels that match the current filters."},{name:"error_filter_no_results",value:"No filter results"},{name:"error_general",value:"Please try again later"},{name:"error_identity_providers",value:"Something went wrong during login. Please try again later."},{name:"error_in_future",value:"This event is not yet available."},{name:"error_invalid_pin",value:"Invalid PIN"},{name:"error_jump_page_not_available",value:"The page is not available."},{name:"error_load_details",value:"Failed to load details"},{name:"error_login_confirmation_not_supported",value:"The action is not supported with the login method used"},{name:"error_missing_storage_description",value:"Some of the storage used for recording is missing. Please connect the external drive you used before to re-enable recording. Alternately, you can forget the storage in the storage settings, if it's no longer available."},{name:"error_missing_storage_title",value:"Missing storage"},{name:"error_no_browser",value:"To complete the login you need to install a browser."},{name:"error_no_cmspage_message",value:"No CMS Page found in response to custom page operation"},{name:"error_no_cmspage_title",value:"No CMS Page found"},{name:"error_no_dvbc",value:"Connect the coaxial cable to watch this event"},{name:"error_no_event_on_channel",value:"There is no event on this channel"},{name:"error_no_favorites",value:"You haven't selected any Favourties yet"},{name:"error_no_free_space_description",value:"This programme will not be recorded because there is not enough storage. Try deleting some existing recordings."},{name:"error_no_free_space_title",value:"Not enough storage"},{name:"error_no_play_rights_vod",value:"You do not have the rights to play this video"},{name:"error_no_pricinginfo",value:"Something went wrong when loading the pricing details. Please try again later."},{name:"error_no_quote",value:"You have to purchase this content before you can watch it."},{name:"error_no_reminders",value:"You don't have any reminders"},{name:"error_no_rentoptions",value:"There are no movies to rent"},{name:"error_no_rights",value:"The channel you are trying to access is not part of your channel line-up package. For more information please visit www.melita.com or call us on 27 270 270."},{name:"error_no_rights_chromecast",value:"You don't have the required rights to play this content on Chromecast"},{name:"error_no_rights_detail_description",value:"You don't have the rights to play this content"},{name:"error_no_rights_on_this_stb",value:"The channel you are trying to access is not part of your channel line-up package. For more information please visit www.melita.com or call us on 27 270 270."},{name:"error_no_tv_input_sources_found",value:"No channel sources were found."},{name:"error_no_values_for_group_by_option",value:"There are no filter options corresponding to the selected group by value."},{name:"error_non_existing_channel_number",value:"This channel number does not exist"},{name:"error_not_inhome",value:"You need to connect to your home network to wat
5ch this"},{name:"error_not_on_mobile",value:"This can only be watched on your NexTV Decoder"},{name:"error_not_replayable_on_this_stb",value:"This program is not available in replay"},{name:"error_only_on_chromecast",value:"This content is only available on Chromecast"},{name:"error_open_wifi_menu",value:"Press left to open network and internet settings."},{name:"error_out_of_replay_window",value:"This show is no longer available in Catch up"},{name:"error_reconnect",value:"Reconnect"},{name:"error_recording_box_unreachable",value:"Something went wrong while retrieving your recordings. Please try again later."},{name:"error_recording_cancel_failed",value:"Could not cancel recording."},{name:"error_recording_delete_failed",value:"Could not remove recording"},{name:"error_recording_edit_failed",value:"Could not edit recording."},{name:"error_recording_no_conflicts",value:"You have no conflicts."},{name:"error_recording_no_recordings",value:"You have no recordings"},{name:"error_recording_not_found",value:"Recording not found."},{name:"error_recording_playback",value:"Something went wrong with recording this programme. Playback is not possible."},{name:"error_recording_start_failed",value:"Could not record"},{name:"error_search_no_completions",value:"No results found with current filters"},{name:"error_search_no_results",value:"No search results"},{name:"error_server",value:"Unable to connect with the server. Please try again later."},{name:"error_small_sized_storage_description",value:"At the moment there is not enough storage on your device for DVR to work. Please connect an external drive that is $1 GB or larger and follow the steps to format it as device storage."},{name:"error_small_sized_storage_title",value:"DVR needs more storage"},{name:"error_stb_name_empty",value:"The name cannot be empty"},{name:"error_streaming",value:"Something went wrong when playing this stream. Please try again later."},{name:"error_streaming_notsupported_os_browser_combination",value:"Streaming is not possible. This operating system &  browser combination is not supported."},{name:"error_streaming_video_decryption",value:"Video decryption failed."},{name:"error_swipe",value:"Something went wrong when swiping this asset. Please try again later."},{name:"error_title",value:"Error"},{name:"error_unsupported_app_version",value:"A new update is available for NexTV with new features for you to enjoy! Just delete your current NexTV App and download it again from the Google Play Store and you're good to go!"},{name:"error_unsupported_os_version",value:"Your operating system version is too old. Please try upgrading your operating system."},{name:"error_user",value:"Invalid username or password"},{name:"error_vod_expired",value:"This is no longer available"},{name:"filter_all",value:"all"},{name:"filter_rating",value:"Rating"},{name:"filter_release_year",value:"Release year"},{name:"free",value:"free"},{name:"guide_adult_title",value:"Film"},{name:"guide_btn_clearfilters",value:"Clear filters"},{name:"guide_btn_clearfilters_android_tv",value:"Clear filters"},{name:"guide_btn_clearfilters_tv",value:"Clear filters"},{name:"guide_btn_filtercategory",value:"Filter by category"},{name:"guide_filter_category",value:"Category"},{name:"guide_filter_day",value:"Day"},{name:"guide_filter_title",value:"Filter"},{name:"guide_no_information",value:"No information"},{name:"guide_no_information_available",value:"No information available"},{name:"guide_now_bar",value:"Now"},{name:"list",value:"List"},{name:"lists_btn_clearfilters",value:"Clear filters"},{name:"lists_btn_clearfilters_android_tv",value:"Clear filters"},{name:"lists_btn_clearfilters_tv",value:"Clear filters"},{name:"lists_btn_filtercategory",value:"Filter by category"},{name:"lists_btn_filterchannel",value:"Filter by channel"},{name:"lists_btn_filterchannelgroup",value:"Filter by channel group"},{name:"lists_btn_filterday",value:"Filter by day"},{name:"lists_filter_accessibility",value:"Accessibility"},{name:"lists_filter_all_value",value:"All"},{name:"lists_filter_category",value:"Category"},{name:"lists_filter_channel",value:"Channel"},{name:"lists_filter_clear",value:"Clear"},{name:"lists_filter_close",value:"Close"},{name:"lists_filter_day",value:"Day"},{name:"lists_filter_group",value:"Group"},{name:"lists_filter_title",value:"Filter"},{name:"lists_filter_year_rating_stb",value:"Filter"},{name:"lists_season_short",value:"Seas."},{name:"live_indicator_text",value:"LIVE"},{name:"login_forgotpassword",value:"Forgot password"},{name:"login_login",value:"Login"},{name:"login_logout",value:"Logout"},{name:"login_name",value:"Username"},{name:"login_password",value:"Password"},{name:"login_reconnect",value:"Reconnect"},{name:"login_register",value:"Register"},{name:"login_showpassword",value:"Show password"},{name:"login_user_code_page_title",value:"Login device"},{name:"login_user_code_popup_body",value:"Please enter the code from your device."},{name:"login_user_code_popup_title",value:"Hi $1"},{name:"login_user_code_success_page_body",value:"Your device is now logged in. You can close this tab."},{name:"login_user_code_success_page_title",value:"Device logged in"},{name:"media_center",value:"media centre"},{name:"menu_active_subscriptions",value:"Active Subscriptions"},{name:"menu_adult",value:"Adult"},{name:"menu_apps_radio",value:"Radio"},{name:"menu_apps_stb",value:"Apps"},{name:"menu_channels",value:"Channels"},{name:"menu_clientarea",value:"Client Area"},{name:"menu_favorites",value:"Favourites"},{name:"menu_flashback",value:"Catch-up"},{name:"menu_guide",value:"Guide"},{name:"menu_item_more_info_title",value:"More"},{name:"menu_lists",value:"Lists"},{name:"menu_media_center_stb",value:"Media Centre"},{name:"menu_message_inbox",value:"Message Inbox"},{name:"menu_movies",value:"Movies"},{name:"menu_my_favorite_channels",value:"My favourite channels"},{name:"menu_my_scenes",value:"My World"},{name:"menu_new",value:"New"},{name:"menu_novo",value:"New"},{name:"menu_now",value:"Now"},{name:"menu_profiles",value:"Profiles"},{name:"menu_recent",value:"Recent"},{name:"menu_recommended",value:"Recommended"},{name:"menu_recordings",value:"Recordings"},{name:"menu_recordings_conflicts",value:"Conflicts"},{name:"menu_recordings_expire",value:"About to expire"},{name:"menu_recordings_planned",value:"Planned"},{name:"menu_recordings_planned_ott",value:"Planned"},{name:"menu_recordings_recorded",value:"Recorded"},{name:"menu_reload_button_title",value:"Reload menu"},{name:"menu_reminders",value:"Reminders"},{name:"menu_search",value:"Search"},{name:"menu_series",value:"Series"},{name:"menu_settings",value:"Settings"},{name:"menu_subscriptions",value:"Subscriptions"},{name:"menu_tv_guide",value:"TV Guide"},{name:"menu_video_club",value:"OnDemand"},{name:"mystuff_adult_settings",value:"Adult mode settings"},{name:"mystuff_adultmode",value:"When entering PIN, stay in adult mode by default for"},{name:"mystuff_adultmode_activate",value:"Activate adult mode"},{name:"mystuff_adultmode_activated",value:"Adult mode activated"},{name:"mystuff_adultmode_never",value:"never"},{name:"mystuff_adultmode_save_btn",value:"Save"},{name:"mystuff_adultmode_stop",value:"Stop adult mode"},{name:"mystuff_adultmode_stopped",value:"Adult mode deactivated"},{name:"mystuff_adultmode_successfully_saved",value:"Successfully saved"},{name:"mystuff_change_adult_pincode",value:"Change adult PIN"},{name:"mystuff_change_pincode",value:"Change PIN"},{name:"mystuff_change_pincode_option_stb",value:"Change Pincode"},{name:"mystuff_change_vod_pincode",value:"Change OnDemand PIN"},{name:"mystuff_confirm_pincode",value:"Confirm PIN"},{name:"mystuff_conflict_row_prefix",value:"Conflict"},{name:"mystuff_favorite_channels",value:"Favourite channels"},{name:"mystuff_favorite_programs",value:"Favourite programs"},{name:"mystuff_favorite_vod",value:"Favourite movies and series"},{name:"mystuff_favorites",value:"Favourites"},{name:"mystuff_filter_recording",value:"Filter"},{name:"mystuff_filter_recording_adult_off",value:"Off"},{name:"mystuff_filter_recording_adult_on",value:"On"},{name:"mystuff_filter_recording_adult_title",value:"Show adult recordings"},{name:"mystuff_hide_adult_recordings",value:"Hide adult recordings"},{name:"mystuff_hour",value:"hour"},{name:"mystuff_hours",value:"hours"},{name:"mystuff_minutes",value:"minutes"},{name:"mystuff_new_pincode",value:"New PIN"},{name:"mystuff_old_pincode",value:"Old PIN"},{name:"mystuff_pincodechange_failed",value:"PIN change failed. Please try again."},{name:"mystuff_pincodechange_succes",value:"PIN changed!"},{name:"mystuff_pincodes_must_match",value:"The new pincodes don't match"},{name:"mystuff_privacy",value:"Privacy policy"},{name:"mystuff_privacy_analytics",value:"Help improve Melita NexTV by sending analytics data about your usage."},{name:"mystuff_rec_no_conflicts",value:"There are no conflicts"},{name:"mystuff_rec_no_expired",value:"There are no recordings that will expire soon."},{name:"mystuff_rec_no_planned_recordings",value:"No planned recordings"},{name:"mystuff_rec_no_recordings",value:"No recordings"},{name:"mystuff_recording_disk_usage",value:"Disk usage"},{name:"mystuff_show_adult_recordings",value:"Show adult recordings"},{name:"others_are_watching",value:"Others are watching"},{name:"player_ad_action_method_detail_ott",value:"More details"},{name:"player_ad_action_method_detail_stb",value:"Press $1 for more details"},{name:"player_ad_action_method_play_ott",value:"Play now"},{name:"player_ad_action_method_play_stb",value:"Press $1 to play now"},{name:"player_ad_action_method_play_trailer_ott",value:"Watch trailer"},{name:"player_ad_action_method_play_trailer_stb",value:"Press $1 to wat
5ch trailer"},{name:"player_ad_advertisement_count",value:"Ad $1 of $2"},{name:"player_ad_skip_now_ott",value:"Skip ad"},{name:"player_ad_skip_now_stb",value:"Press $1 to skip ad"},{name:"player_ad_skip_seconds",value:"Can be skipped in $1 seconds"},{name:"player_ad_skip_seconds_ott",value:"Skip in $1"},{name:"player_ad_title",value:"Advertisement"},{name:"player_airplay_description",value:'This video is playing on "$1".'},{name:"player_airplay_title",value:"AirPlay"},{name:"player_audio_channels_2",value:"Stereo"},{name:"player_audio_channels_6",value:"Dolby"},{name:"player_audio_language_qad",value:"Audio description"},{name:"player_audio_language_unknown",value:"Unknown"},{name:"player_btn_close",value:"Close"},{name:"player_btn_more_details",value:"More Details"},{name:"player_btn_pause",value:"Pause"},{name:"player_btn_pause_atv",value:"Pause"},{name:"player_btn_settings_atv",value:"Settings"},{name:"player_btn_share",value:"Share"},{name:"player_controls_skip_button_minutes",value:"$1m"},{name:"player_controls_skip_button_minutes_and_seconds",value:"$1m $2s"},{name:"player_controls_skip_button_seconds",value:"$1s"},{name:"player_disable_add_block",value:"This video can not be played when an adblocker is active"},{name:"player_language_en",value:"English"},{name:"player_language_es",value:"Spanish"},{name:"player_language_fr",value:"French"},{name:"player_language_it",value:"Italian"},{name:"player_language_pt",value:"Portuguese"},{name:"player_multiview_main_source_id",value:"Main"},{name:"player_quality_auto",value:"Automatic"},{name:"player_quality_unit",value:"$1p"},{name:"player_quality_unit_fps",value:"$1p$2"},{name:"player_settings_audio",value:"Audio: $1"},{name:"player_settings_audio_title",value:"Audio"},{name:"player_settings_info_title",value:"Info"},{name:"player_settings_quality",value:"Quality: $1"},{name:"player_settings_quality_title",value:"Change quality"},{name:"player_settings_subtitle",value:"Subtitle: $1"},{name:"player_settings_subtitles_title",value:"Subtitles"},{name:"player_settings_title",value:"Settings"},{name:"player_settings_video_source",value:"Source: $1"},{name:"player_settings_video_title",value:"Video"},{name:"player_subtitle_language_qaa",value:"885"},{name:"player_subtitle_language_qab",value:"886"},{name:"player_subtitle_language_qac",value:"887"},{name:"player_subtitle_language_unknown",value:"Unknown"},{name:"player_subtitle_none",value:"None"},{name:"player_swipe_channels_title",value:"Channels"},{name:"player_swipe_info_title",value:"Info"},{name:"player_swipe_program_guide_title",value:"Program Guide"},{name:"player_to_linear_confirmation_body",value:"Are you sure you want to go back to live transmission?"},{name:"player_to_linear_confirmation_title",value:"Live"},{name:"popup_adultmode_pin_prefix_stb",value:"PIN"},{name:"popup_adultmode_title_stb",value:"Enable adult mode"},{name:"popup_adultmode_turned_off_body_stb",value:"Adult mode successfully blocked."},{name:"popup_adultmode_turned_off_title_stb",value:"Disable adult mode"},{name:"popup_app_exit_confirmation_message",value:"Press back again to exit the app"},{name:"popup_btn_cancel",value:"Cancel"},{name:"popup_btn_close",value:"Close"},{name:"popup_btn_confirm",value:"Confirm"},{name:"popup_btn_delete",value:"Delete"},{name:"popup_btn_ok",value:"OK"},{name:"popup_conflict_added_body_stb",value:"popup_conflict_added_body_stb"},{name:"popup_conflict_added_option_show_stb",value:"Show conflicts"},{name:"popup_conflict_added_title_stb",value:"Conflict added"},{name:"popup_error_provision_general",value:"Could not provision your NexTV Decoder. Please contact our support team."},{name:"popup_error_provision_network",value:"Could not connect. Please check your internet connection"},{name:"popup_exit_title",value:"Are you sure you want to exit the app?"},{name:"popup_not_replayable_blackout_body",value:"The current event is not available in Catch up."},{name:"popup_not_replayable_blackout_title",value:"Timeshift"},{name:"popup_not_replayable_channel_body",value:"The current channel is not available in Catch up"},{name:"popup_not_replayable_channel_title",value:"Timeshift"},{name:"popup_pincode_stayinadultmode",value:"Stay in adult mode for"},{name:"popup_pincode_stayinadultmode_stb",value:"Stay in adult mode for"},{name:"popup_recording_no_rights",value:"You don't have the required rights to record this content"},{name:"popup_recording_not_live",value:"You can only record live content"},{name:"popup_recording_not_possible_title",value:"Recording not possible"},{name:"popup_reminder_option_details",value:"Show details"},{name:"popup_reminder_option_details_stb",value:"Show Details"},{name:"popup_reminder_option_zap_stb",value:"Zap to $1"},{name:"popup_reminder_text",value:"$1 is about to start!"},{name:"popup_reminder_text_stb",value:'"$1" is about to start on channel "$2"!'},{name:"popup_reminder_title",value:"Reminder"},{name:"popup_still_watching_body",value:"Are you still watching?"},{name:"popup_still_watching_btn_continue",value:"Continue watching"},{name:"popup_swiped",value:"Swiped from $1"},{name:"popup_swiped_stb",value:"Swiped from $1"},{name:"popup_title_choose_option",value:"Choose option"},{name:"profile_add_title",value:"Add new profile"}
5,{name:"profile_cancel_btn",value:"Cancel"},{name:"profile_create_btn",value:"Create"},{name:"profile_delete_btn",value:"Delete profile"},{name:"profile_delete_confirm",value:"Are you sure you want to delete this profile?"},{name:"profile_delete_title",value:"Delete profile"},{name:"profile_done_btn",value:"Done"},{name:"profile_edit_title",value:"Edit profile"},{name:"profile_error_name",value:"Profile name is required"},{name:"profile_error_name_length",value:"Profile name can not be longer than 25"},{name:"profile_login_request_popup_title",value:"You need to be signed in"},{name:"profile_logout_request_popup_title",value:"Are you sure you want to log out?"},{name:"profile_new",value:"New profile"},{name:"profile_page_back_to_close_stb",value:"(press back to close this page)"},{name:"profile_property_avatar",value:"Avatar"},{name:"profile_property_catalog",value:"Catalog"},{name:"profile_property_name",value:"Name"},{name:"profile_property_name_placeholder",value:"Profile name"},{name:"profile_save_btn",value:"Save"},{name:"profile_select_title",value:"Select a profile"},{name:"profile_switch",value:"Switch profile"},{name:"profiles_manage",value:"Manage profiles"},{name:"recently_watched_channels",value:"Recently watched channels"},{name:"recommended_for_title",value:"Recommended for"},{name:"record",value:"Record"},{name:"recordings_btn_filter_stb",value:"Filter on NexTV Decoder"},{name:"recordings_cancel_all",value:"Delete all"},{name:"recordings_cancel_all_confirm",value:"Are you sure you want to delete all planned recordings from this series?"},{name:"recordings_delete_all",value:"Delete all"},{name:"recordings_delete_all_confirm",value:"Are you sure you want to delete all recordings from this series?"},{name:"recordings_free_space_npvr",value:"$1 hour(s) available"},{name:"recordings_free_space_npvr_long",value:"$1 of $2 hour(s) available"},{name:"recordings_free_space_stb",value:"$1 used"},{name:"recordings_hours_available",value:"$1 of $2 hour(s) available"},{name:"recordings_local_settopbox_name",value:"NexTV Decoder"},{name:"recordings_minutes_available",value:"$1 minutes of $2 hour(s) available"},{name:"recordings_minutes_available_stb",value:"$1 min. of $2 hour(s) available"},{name:"recordings_npvr_settopbox_name",value:"Network recordings"},{name:"recordings_will_expire",value:"Will expire on $1"},{name:"reminder",value:"Reminder"},{name:"resolution_HD",value:"HD"},{name:"resolution_SD",value:"SD"},{name:"resolution_UHD_4K",value:"4K"},{name:"ribbon_btn_filter_category",value:"Filter by category"},{name:"ribbon_btn_filter_channel",value:"Filter by channel"},{name:"ribbon_btn_filter_date",value:"Filter by day"},{name:"ribbon_btn_filter_rating",value:"Filter by rating"},{name:"ribbon_btn_filter_year",value:"Filter by year"},{name:"ribbon_episode",value:"E$1"},{name:"ribbon_filter_category",value:"Category"},{name:"ribbon_filter_rating",value:"Rating"},{name:"ribbon_filter_rating_stb",value:"Rating"},{name:"ribbon_filter_title",value:"Filter"},{name:"ribbon_filter_year",value:"Release year"},{name:"ribbon_filter_year_stb",value:"Release year"},{name:"ribbon_no_content_ott",value:"No content"},{name:"ribbon_no_content_stb",value:"No content"},{name:"ribbon_season",value:"S$1"},{name:"ribbon_season_episode",value:"S$1 E$2"},{name:"scenes",value:"Scenes"},{name:"search_filter_date",value:"Date"},{name:"search_filter_horse_name",value:"Horse name"},{name:"search_filter_race_name",value:"Race name"},{name:"search_filter_time_range",value:"$1 > $2"},{name:"search_filter_track_name",value:"Track name"},{name:"search_placeholder",value:"Search"},{name:"search_placeholder_stb",value:"Enter your search term"},{name:"search_recording_breadcrumb_folder_title",value:"Recordings"},{name:"search_results_article",value:"Article"},{name:"search_results_bundle",value:"Bundle"},{name:"search_results_flashback",value:"Catch-up"},{name:"search_results_now",value:"Now"},{name:"search_results_recording",value:"Recording"},{name:"search_results_videoclub",value:"OnDemand"},{name:"search_sort_created_asc",value:"Created \u2191"},{name:"search_sort_created_desc",value:"Created \u2193"},{name:"search_sort_race_date_asc",value:"Race date \u2191"},{name:"search_sort_race_date_desc",value:"Race date \u2193"},{name:"search_sort_race_name_asc",value:"Race name \u2191"},{name:"search_sort_race_name_desc",value:"Race name \u2193"},{name:"search_sort_race_number_asc",value:"Race number \u2191"},{name:"search_sort_race_number_desc",value:"Race number \u2193"},{name:"search_sort_rank_desc",value:"Rank \u2193"},{name:"search_sort_title_asc",value:"Title \u2191"},{name:"search_sort_title_desc",value:"Title \u2193"},{name:"search_sort_track_name_asc",value:"Track name \u2191"},{name:"search_sort_track_name_desc",value:"Track name \u2193"},{name:"set_reminder",value:"Set reminder"},{name:"setting_allow_adult_androidtv_off",value:"Adult mode is not allowed on AndroidTv"},{name:"setting_allow_adult_androidtv_on",value:"Adult mode is allowed on AndroidTv"},{name:"settings_adult_pincode_stb",value:"Adult Pincode"},{name:"settings_adult_pincode_value_stb",value:"Change adult pincode"},{name:"settings_allow_adult_androidtv_title",value:"Allow adult mode on AndroidTV"},{name:"settings_application_backend_env_stb",value:"Backend environment"},{name:"settings_application_customer",value:"Customer"},{name:"settings_application_customer_stb",value:"Customer"},{name:"settings_application_discovery_url_stb",value:"Discovery URL"},{name:"settings_application_git_stb",value:"Application Git Sha1"},{name:"settings_application_gui_git_stb",value:"Gui Git Sha1"},{name:"settings_application_gui_timestamp_stb",value:"Gui Timestamp"},{name:"settings_application_timestamp_stb",value:"Application timestamp"},{name:"settings_application_version_stb",value:"Application version"},{name:"settings_audio_output_port_stb",value:"Audio Output"},{name:"settings_audio_output_type",value:"Audio Type"},{name:"settings_audio_output_type_stb",value:"Audio Type"},{name:"settings_autoplay",value:"Autoplay next episode in a series"},{name:"settings_autoplay_title",value:"Settings for Autoplay"},{name:"settings_box_name_androidtv",value:"Name"},{name:"settings_box_name_invalid_stb",value:"Name has an invali
5d length (min. 1 and max. 40 characters)"},{name:"settings_box_name_popup_name_androidtv",value:"Name"},{name:"settings_box_name_popup_name_stb",value:"Name"},{name:"settings_box_name_popup_title_androidtv",value:"Change Nextv Decoder name"},{name:"settings_box_name_popup_title_stb",value:"Change Nextv Decoder name"},{name:"settings_box_name_stb",value:"Name"},{name:"settings_box_name_title_stb",value:"Nextv Decoder name"},{name:"settings_box_reboot_stb",value:"Manually Reboot Nextv Decoder"},{name:"settings_box_reboot_value_stb",value:"Reboot"},{name:"settings_box_shutdown_stb",value:"Manually Shutdown Nextv Decoder"},{name:"settings_box_shutdown_value_stb",value:"Shutdown"},{name:"settings_box_title_androidtv",value:"Nextv Decoder"},{name:"settings_box_title_stb",value:"Nextv Decoder"},{name:"settings_build_info_git_hash",value:"Git Hash"},{name:"settings_build_info_timestamp",value:"Timestamp"},{name:"settings_build_info_version_code",value:"version Code"},{name:"settings_build_info_version_name",value:"version Name"},{name:"settings_conax_menu",value:"Conax Menu"},{name:"settings_conax_menu_title",value:"Conax"},{name:"settings_conax_menu_value",value:"Run"},{name:"settings_customize_channels",value:"Customize channel list"},{name:"settings_firmware_version_stb",value:"Firmware version"},{name:"settings_greeting_web",value:"Hi"},{name:"settings_hardware_version",value:"Hardware version"},{name:"settings_hdmi_resolution_actual_stb",value:"Current resolution"},{name:"settings_hdmi_resolution_preferred_stb",value:"Preferred resolution"},{name:"settings_hdmi_resolution_stb",value:"Resolution"},{name:"settings_header_title_stb",value:"Settings"},{name:"settings_language_audio_1",value:"First Language Audio"},{name:"settings_language_audio_1_stb",value:"First Language Audio"},{name:"settings_language_audio_2",value:"Second Language Audio"},{name:"settings_language_audio_2_stb",value:"Second Language Audio"},{name:"settings_language_audio_stb",value:"Language Audio"},{name:"settings_language_sub",value:"Language Subtitles"},{name:"settings_language_sub_1",value:"First Language Subtitles"},{name:"settings_language_sub_1_stb",value:"First Language Subtitles"},{name:"settings_language_sub_2",value:"Second Language Subtitles"},{name:"settings_language_sub_2_stb",value:"Second Language Subtitles"},{name:"settings_language_sub_stb",value:"Language Subtitles"},{name:"settings_language_ui_stb",value:"Language Ui"},{name:"settings_loader_app_version_download_time_stb",value:"Loader Download Time"},{name:"settings_loader_app_version_long_stb",value:"Loader version (Long)"},{name:"settings_loader_app_version_short_stb",value:"Loader version (Short)"},{name:"settings_loader_keys_version_stb",value:"Loader keys version"},{name:"settings_logout",value:"Logout"},{name:"settings_network_active_stb",value:"Active"},{name:"settings_network_boot_stb",value:"Boot Protocol"},{name:"settings_network_broadcast_stb",value:"Broadcast Address"},{name:"settings_network_dns_stb",value:"DNS"},{name:"settings_network_ethernet_stb",value:"Ethernet"},{name:"settings_network_gateway_stb",value:"Gateway Address"},{name:"settings_network_inactive_stb",value:"Not Active"},{name:"settings_network_interface_stb",value:"Active Interface"},{name:"settings_network_ip_stb",value:"Ip Address"},{name:"settings_network_link_status_stb",value:"Link Status"},{name:"settings_network_mac_stb",value:"Mac Address"},{name:"settings_network_mask_stb",value:"Mask Address"},{name:"settings_network_stb",value:"Network"},{name:"settings_network_wifi_connect_btn_stb",value:"Connect"},{name:"settings_network_wifi_connect_popup_no_network",value:"No Network Found"},{name:"settings_network_wifi_connect_popup_password_option",value:"Password"},{name:"settings_network_wifi_connect_popup_security_option",value:"Security"},{name:"settings_network_wifi_connect_popup_security_option_none",value:"None"},{name:"settings_network_wifi_connect_popup_security_option_wpa2_psk",value:"Wpa2"},{name:"settings_network_wifi_connect_popup_ssid_option",value:"Network"},{name:"settings_network_wifi_connect_popup_title",value:"Connect with WiFi-network"},{name:"settings_network_wifi_connect_stb",value:"Connect To Wifi"},{name:"settings_network_wifi_connected_failed_stb",value:'Failed connecting to "$1"'},{name:"settings_network_wifi_connected_failed_wps_stb",value:"Failed connecting to WiFi-network"},{name:"settings_network_wifi_connected_success_stb",value:'Successfully connected to "$1"'},{name:"settings_network_wifi_connected_success_wps_stb",value:"Successfully connected to WiFi-network"},{name:"settings_network_wifi_connecting_body_stb",value:"Connecting"},{name:"settings_network_wifi_connecting_title_stb",value:"Connecting to $1"},{name:"settings_network_wifi_connecting_title_wps_stb",value:"Connecting to WiFi-network"},{name:"settings_network_wifi_how_option_wifi_hidden_stb",value:"Connect to hidden WiFi-network"},{name:"settings_network_wifi_how_option_wifi_stb",value:"Connect to WiFi-network"},{name:"settings_network_wifi_how_option_wps_stb",value:"Connect with WPS"},{name:"settings_network_wifi_how_title",value:"Connect to WiFi"}
5,{name:"settings_network_wifi_no_password_allowed",value:"No password required"},{name:"settings_network_wifi_password_size_popup_body",value:"Password has an invalid length (min. 8 and max. 63 characters)"},{name:"settings_network_wifi_password_size_popup_title",value:"Password invalid"},{name:"settings_network_wifi_rescan_popup_body",value:"Searching for WiFi-networks..."},{name:"settings_network_wifi_rescan_popup_title",value:"Scan WiFi-networks"},{name:"settings_network_wifi_ssid_size_popup_body",value:"SSID can be up to 32 characters"},{name:"settings_network_wifi_ssid_size_popup_title",value:"SSID invalid"},{name:"settings_network_wifi_ssid_stb",value:"Ssid"},{name:"settings_network_wifi_stb",value:"Wifi"},{name:"settings_network_wifi_wps_popup_body_stb",value:'Press the "WPS" button on the back of the box and the "WPS" button on the router'},{name:"settings_network_wifi_wps_popup_title_stb",value:"Connect with WPS"},{name:"settings_no_stb",value:"No"},{name:"settings_no_value_stb",value:"No value"},{name:"settings_player_linear_session_max_duration",value:"Maximum live stream duration"},{name:"settings_player_linear_session_max_duration_stb",value:"Maximum live stream duration"},{name:"settings_pm_compliance_stb",value:"Compliance"},{name:"settings_pm_reset_btn_stb",value:"Reset"},{name:"settings_pm_reset_stb",value:"Reset Power Management"},{name:"settings_pm_shutdown_stb",value:"Shutdown After X-hours"},{name:"settings_pm_standby_stb",value:"Go To Standby After X-hours"},{name:"settings_pm_value_1_day_stb",value:"$1 day"},{name:"settings_pm_value_1_hour_stb",value:"$1 hour"},{name:"settings_pm_value_number_day_stb",value:"$1 days"},{name:"settings_pm_value_number_hour_stb",value:"$1 hours"},{name:"settings_pm_value_off_stb",value:"Off"},{name:"settings_popup_no_value_stb",value:"No possible values available"},{name:"settings_rcu_blue_stb",value:"Blue Button"},{name:"settings_rcu_green_stb",value:"Green Button"},{name:"settings_rcu_red_stb",value:"Red Button"},{name:"settings_rcu_reset_stb",value:"Reset Shortcuts"},{name:"settings_rcu_reset_value_stb",value:"Reset"},{name:"settings_rcu_yellow_stb",value:"Yellow Button"},{name:"settings_recording_after_time_stb",value:"Recording After Time"},{name:"settings_recording_before_time_stb",value:"Recording Before Time"},{name:"settings_recording_delete_protection_stb",value:"Default Delete Protection?"},{name:"settings_recording_episodes_stb",value:"Episodes"},{name:"settings_recordingdevice",value:"Device"},{name:"settings_recordingdevice_stb",value:"DEVICE"},{name:"settings_reminder_before_time",value:"Time before"},{name:"settings_reminder_before_time_stb",value:"Reminder Before Time"},{name:"settings_reset_default_stb",value:"Reset To Default Settings"},{name:"settings_reset_default_value_stb",value:"Reset"},{name:"settings_reset_factory_default_stb",value:"Reset To Factory Default Settings"},{name:"settings_reset_factory_default_value_stb",value:"Reset"},{name:"settings_reset_hdd_error_failed_stb",value:"Reset of HDD failed!"},{name:"settings_reset_hdd_error_no_hdd_stb",value:"No HDD found!"},{name:"settings_reset_hdd_error_popup_title_stb",value:"Reset HDD Failed"},{name:"settings_reset_hdd_popup_body_stb",value:"Are you sure you want to format the disk?\\r\\nAll the information on HDD will be lost (recordings etc)!"},{name:"settings_reset_hdd_popup_confirm_stb",value:"CONFIRM"},{name:"settings_reset_hdd_popup_title_stb",value:"Reset HDD"},{name:"settings_reset_hdd_stb",value:"Reset HDD"},{name:"settings_reset_hdd_value_stb",value:"Reset"},{name:"settings_reset_title_stb",value:"Reset"},{name:"settings_resoltuion_popup_option_reset_stb",value:"Reset Resolution"},{name:"settings_resolution_popup_body_stb",value:"settings_resolution_popup_body_stb"},{name:"settings_resolution_popup_option_keep_stb",value:"Keep Resolution"},{name:"settings_resolution_popup_title_stb",value:"Confirm resolution"},{name:"settings_save_failed",value:"Something went wrong with saving. Please try again later."},{name:"settings_saved",value:"Settings saved"},{name:"settings_scan_settings_apply",value:"Apply Settings"},{name:"settings_scan_settings_apply_value",value:"Apply"},{name:"settings_scan_settings_freq",value:"Frequency (hz)"},{name:"settings_scan_settings_freq_popup_prefix",value:"Freq:"},{name:"settings_scan_settings_modulation",value:"Modulation Type"},{name:"settings_scan_settings_nid",value:"Network Id (NID)"},{name:"settings_scan_settings_nid_popup_prefix",value:"Nid:"},{name:"settings_scan_settings_reset",value:"Reset To Default Settings"},{name:"settings_scan_settings_reset_value",value:"Reset"},{name:"settings_scan_settings_sdt_nit",value:"Sdt/nit"},{name:"settings_scan_settings_signal_strength",value:"See Signal Levels"},{name:"settings_scan_settings_signal_strength_value",value:"Show"},{name:"settings_scan_settings_sr",value:"Symbol Rate (kbps)"},{name:"settings_scan_settings_sr_popup_prefix",value:"Sr:"},{name:"settings_serial_number_stb",value:"Serial Number"},{name:"settings_stb_info_chipid",value:"Chip ID"},{name:"settings_stb_info_model",value:"Hardware Model"},{name:"settings_stb_info_serial",value:"Serial Number"},{name:"settings_stb_scan_channels",value:"Scan for channels"},{name:"settings_subtitle_box_information_stb",value:"Nextv Decoder Information"},{name:"settings_subtitle_software_information_stb",value:"Software Information"},{name:"settings_system_build_version_stb",value:"Build version"},{name:"settings_system_cpu_temperature_stb",value:"CPU temperature"},{name:"settings_system_hardware_model_stb",value:"Hardware model"},{name:"settings_system_time_stb",value:"Date and time"},{name:"settings_time_before_after_template",value:"$1 min."},{name:"settings_time_before_after_template_stb",value:"$1 min."},{name:"settings_title_adult",value:"Adult"},{name:"settings_title_adult_mode_duration",value:"Adult Mode On For..."},{name:"settings_title_adult_mode_duration_stb",value:"Adult Mode On For..."},{name:"settings_title_adult_mode_turn_off",value:"Deactivate Adult Mode"},{name:"settings_title_adult_mode_turn_off_stb",value:"Deactivate Adult Mode"},{name:"settings_title_adult_mode_turn_off_value",value:"Turn Off"},{name:"settings_title_adult_mode_turn_off_value_stb",value:"Turn Off"},{name:"settings_title_adult_mode_turn_on_off",value:"Access To Adult Content"},{name:"settings_title_adult_mode_turn_on_off_stb",value:"Access To Adult Content"},{name:"settings_title_adult_mode_turn_on_stb",value:"Activate Adult Mode"},{name:"settings_title_adult_mode_turn_on_value",value:"Turn On"},{name:"settings_title_adult_mode_turn_on_value_stb",value:"Turn On"},{name:"settings_title_adult_stb",value:"Adult"},{name:"settings_title_audio",value:"Audio"},{name:"settings_title_audio_stb",value:"Audio"},{name:"settings_title_box_stb",value:"Nextv Decoder"},{name:"settings_title_build_info",value:"Build Information"},{name:"settings_title_build_info_androidtv",value:"Build Information"},{name:"settings_title_category_parental_control",value:"Settings for parental control"},{name:"settings_title_configuration",value:"Configuration"},{name:"settings_title_display_stb",value:"Display"},{name:"settings_title_hdmi_stb",value:"Hdmi"},{name:"settings_title_info_stb",value:"Information"},{name:"settings_title_language_stb",value:"Language"},{name:"settings_title_network_interface_stb",value:"Interface"},{name:"settings_title_network_stb",value:"Network"},{name:"settings_title_open_parental_control_page",value:"Parental control"},{name:"settings_title_open_tuner_page",value:"Open tuner setup"},{name:"settings_title_pincode",value:"Pincode"},{name:"settings_title_pincode_stb",value:"Pincode"},{name:"settings_title_player",value:"Settings for player"},{name:"settings_title_player_ott",value:"Settings for player"},{name:"settings_title_player_stb",value:"Player"},{name:"settings_title_power_management_stb",value:"Power Management"},{name:"settings_title_recording",value:"Recording"},{name:"settings_title_recording_local_stb",value:"Recording HDD"},{name:"settings_title_recording_npvr",value:"Settings for network recordings"},{name:"settings_title_recording_npvr_android_tv",value:"Settings for network recordings"},{name:"settings_title_recording_npvr_stb",value:"Recording network device"},{name:"settings_title_recording_stb",value:"Recording"},{name:"settings_title_recordingdevice",value:"Default recording device"},{name:"settings_title_recordingdevice_stb",value:"DEFAULT RECORDING DEVICE"},{name:"settings_title_reminder",value:"Settings for reminders"},{name:"settings_title_reminder_ott",value:"Settings for reminders"},{name:"settings_title_reminder_stb",value:"Reminder"},{name:"settings_title_scan_settings_stb",value:"Scan Settings"},{name:"settings_title_shortcut_rcu_stb",value:"Shortcuts Remote Control"},{name:"settings_title_stb_info_androidtv",value:"Nextv Decoder Information"},{name:"settings_title_sub",value:"Subtitle"},{name:"settings_title_tvinput",value:"Channel information"},{name:"settings_title_video_stb",value:"Video"},{name:"settings_toggle_off",value:"Off"},{name:"settings_toggle_on",value:"On"},{name:"settings_tuner_info_ber",value:"Bit Error Ratio (Ber)"},{name:"settings_tuner_info_ber_value",value:"$1"},{name:"settings_tuner_info_channel",value:"Channel"},{name:"settings_tuner_info_frequency",value:"Frequency"},{name:"settings_tuner_info_frequency_value",value:"$1"},{name:"settings_tuner_info_locked",value:"Locked"},{name:"settings_tuner_info_locked_value",value:"Locked"},{name:"settings_tuner_info_page_title",value:"Tuner Information"},{name:"settings_tuner_info_popup_body",value:"settings_tuner_info_popup_body"}
5,{name:"settings_tuner_info_popup_title",value:"Tuner info"},{name:"settings_tuner_info_quality",value:"Signal Quality"},{name:"settings_tuner_info_quality_value",value:"$1"},{name:"settings_tuner_info_sr",value:"S/R"},{name:"settings_tuner_info_sr_value",value:"$1"},{name:"settings_tuner_info_strength",value:"Signal Strength"},{name:"settings_tuner_info_strength_value",value:"$1"},{name:"settings_tuner_info_title",value:"Tuner $1"},{name:"settings_tuner_info_type",value:"Type"},{name:"settings_tuner_info_type_value",value:"$1"},{name:"settings_tuner_info_unlocked_value",value:"Not Locked"},{name:"settings_tvinput_setup",value:"Channel sources setup"},{name:"settings_version_web",value:"version"},{name:"settings_video_scaling_stb",value:"Video Scaling"},{name:"settings_vod_pincode_stb",value:"Vod Pincode"},{name:"settings_vod_pincode_value_stb",value:"Change rentals pincode"},{name:"settings_yes_stb",value:"Yes"},{name:"share",value:"Share"},{name:"stb_audio_codec_dolby",value:"Dolby"},{name:"stb_audio_codec_stereo",value:"Stereo"},{name:"stb_audio_sub_language_none",value:"None"},{name:"stb_cas_vmxerror.more_info",value:"For more information please visit www.melita.com or call us on 27 270 270."},{name:"stb_conax_incorrect_pin_length",value:"PIN needs to consist of 4 digits"},{name:"stb_header_title_message_inbox",value:"Message Inbox"},{name:"stb_keyboard_onscreen_clear",value:"Clear"},{name:"stb_keyboard_onscreen_done",value:"Done"},{name:"stb_message_inbox_untitled_message",value:"Untitled message"},{name:"stb_non_existing_channel_number",value:"This channel number does not exist"},{name:"stb_non_subscribed_channel",value:"Not subscribed to this channel"},{name:"stb_page_flashback",value:"Catch-Up"},{name:"stb_page_title_agora",value:"Now"},{name:"stb_page_title_apps",value:"Apps"},{name:"stb_page_title_flashback",value:"Catch-up"},{name:"stb_page_title_my_stuff",value:"My World"},{name:"stb_page_title_video_club",value:"OnDemand"},{name:"stb_pip_flip_error_body",value:"You can only flip a live channel"},{name:"stb_pip_flip_error_body_new",value:"You can only flip a live channel"},{name:"stb_pip_flip_error_title",value:"Split screen flip"},{name:"stb_pip_flip_error_title_new",value:"Split screen"},{name:"stb_player_error_content_not_found",value:"The requested content cannot be found"},{name:"stb_player_error_content_protected",value:"This content is protected"},{name:"stb_player_error_content_protected_drm",value:"This content is DRM protected"},{name:"stb_player_error_decoding",value:"Something went wrong with content decoding"},{name:"stb_player_error_drm_general",value:"Problem with DRM"},{name:"stb_player_error_drm_license",value:"Problem with DRM license"},{name:"stb_player_error_general",value:"Something went wrong during playback"},{name:"stb_player_error_network",value:"Network problem during playback"},{name:"stb_player_error_unspecified",value:"Something went wrong during playback"},{name:"stb_player_linear_zapping_failed",value:"Something went wrong during playback"},{name:"stb_popup_4k_channel_unsupported_body",value:"You need a 4K STB to watch this channel"},{name:"stb_popup_4k_channel_unsupported_title",value:"This channel is only available in 4K"},{name:"stb_popup_back_to_close",value:"(press back to close this popup)"},{name:"stb_popup_channel_not_in_catalog",value:"This channel is not visible inside the current profile"},{name:"stb_popup_disk_error",value:'Error with disk "$1"'},{name:"stb_popup_disk_error_title",value:"HDD error"},{name:"stb_popup_disk_found_body",value:'The provided disk "$1" is not initialised. Are you sure you want to initialise it?'},{name:"stb_popup_disk_found_option_initialize",value:"Initialise the disk"},{name:"stb_popup_disk_found_title",value:"HDD found"},{name:"stb_popup_disk_initialise_failed_body",value:'Initialisation of disk "$1" has failed'},{name:"stb_popup_disk_initialise_failed_title",value:"HDD error"},{name:"stb_popup_disk_invalid_name",value:'The provided disk "$1" could not be used for recording or timeshifting!'},{name:"stb_popup_disk_mounted_body",value:'Disk "$1" successfully mounted.'}
5,{name:"stb_popup_disk_mounted_title",value:"Disk"},{name:"stb_popup_disk_removed_body",value:"HDD has been disconnected!"},{name:"stb_popup_disk_removed_title",value:"HDD disconnected"},{name:"stb_popup_dvb_scan_num_radios_found",value:"Found radio channels:"},{name:"stb_popup_dvb_scan_num_tvs_found",value:"Found TV channels:"},{name:"stb_popup_dvb_scan_signal_quality",value:"Signal quality:"},{name:"stb_popup_dvb_scan_signal_quality_value",value:"$1"},{name:"stb_popup_dvb_scan_signal_strength",value:"Signal strength:"},{name:"stb_popup_dvb_scan_signal_strength_value",value:"$1"},{name:"stb_popup_dvb_scan_status",value:"Status: $1"},{name:"stb_popup_dvb_scan_status_awaiting",value:"Awaiting"},{name:"stb_popup_dvb_scan_status_canceled",value:"Cancelled"},{name:"stb_popup_dvb_scan_status_failed",value:"Failed"},{name:"stb_popup_dvb_scan_status_finished",value:"Finished"},{name:"stb_popup_dvb_scan_status_paused",value:"Paused"},{name:"stb_popup_dvb_scan_status_progress",value:"In progress"},{name:"stb_popup_dvb_scan_title",value:"DVB Scan"},{name:"stb_popup_dvbc_download_failed_body",value:"Installing the update failed"},{name:"stb_popup_dvbc_lfu_apply_failed_body",value:"Installing the update failed"},{name:"stb_popup_dvbc_upgrade_body",value:"In a moment your NexTV Decoder will perform an upgrade to a new version"},{name:"stb_popup_dvbc_upgrade_title",value:"Upgrade NexTV Decoder"},{name:"stb_popup_error_channel_body",value:"Something went wrong while receiving channel data!"},{name:"stb_popup_error_channel_title",value:"Oops!"},{name:"stb_popup_error_epg_event_body",value:"It looks like something went wrong while retrieving the guide data!"},{name:"stb_popup_error_epg_event_title",value:"Oops!"},{name:"stb_popup_frequency_error_body",value:"Entered frequency is not valid"},{name:"stb_popup_frequency_error_title",value:"Frequency error"},{name:"stb_popup_hdcp_authentication_failure",value:"HDCP authentication failure or link integrity failure"},{name:"stb_popup_hdcp_title",value:"HDCP problem"},{name:"stb_popup_hdcp_unauthenticated",value:"HDCP authentication process is not initiated"},{name:"stb_popup_hdcp_unpowered",value:"Connected sink device does not support HDCP"},{name:"stb_popup_message_inbox_mark_as_read_body",value:"Are you sure you want to mark this message as read?"},{name:"stb_popup_message_inbox_mark_as_read_title",value:"Mark as read"},{name:"stb_popup_network_error_backend",value:"Backend reported an error"},{name:"stb_popup_network_error_login",value:"Could not connect. Please check your internet connection"},{name:"stb_popup_network_error_network",value:"Could not connect. Please check your internet connection"},{name:"stb_popup_network_error_provision",value:"Could not provision your NexTV Decoder. Please contact our support team."},{name:"stb_popup_network_error_title",value:"Network problem"},{name:"stb_popup_new_conax_message_body",value:"New Conax message received. Please check your Conax Mailbox in the Conax Menu found in your settings menu."},{name:"stb_popup_new_conax_message_title",value:"New Conax message"},{name:"stb_popup_not_implemented_body",value:"This feature is not yet implemented."},{name:"stb_popup_not_implemented_title",value:"Not implemented"},{name:"stb_popup_not_replayable_blackout_body",value:"The current event is not available in replay."},{name:"stb_popup_not_replayable_blackout_title",value:"Timeshift"},{name:"stb_popup_not_replayable_channel_body",value:"The current channel is not available in replay"},{name:"stb_popup_not_replayable_channel_title",value:"Timeshift"},{name:"stb_popup_reboot_body",value:"Are you sure you want to reboot the NexTV Decoder?"},{name:"stb_popup_reboot_title",value:"Reboot NexTV Decoder?"},{name:"stb_popup_reset_default_settings",value:"Reset NexTV Decoder to default settings?"},{name:"stb_popup_reset_factory_default_settings",value:"Reset NexTV Decoder to factory settings?"},{name:"stb_popup_reset_full_factory_default_settings",value:"Full reset NexTV Decoder to factory settings?"},{name:"stb_popup_reset_title",value:"Reset"},{name:"stb_popup_scan_settings_body_failed",value:"Failed to update scan settings"},{name:"stb_popup_scan_settings_body_recording_failed",value:"Can not update scan settings now because there is a recording in progress."},{name:"stb_popup_scan_settings_body_success",value:"Scan settings updated successfully"},{name:"stb_popup_scan_settings_title",value:"Scan settings"},{name:"stb_popup_shortcut_body_run_empty",value:"No shortcut defined for the button!"},{name:"stb_popup_shortcut_body_run_failed",value:"Oops. Failed to run shortcut-action.  Please try re-setting."},{name:"stb_popup_shortcut_body_success",value:"$1 will do action:  $2"},{name:"stb_popup_shortcut_empty_title",value:"No shortcut defined"},{name:"stb_popup_shortcut_failed_title",value:"Oops. Shortcut failed please try again or reset shortcut"},{name:"stb_popup_shortcut_set_failed",value:"Setting the current page as shortcut failed. Please try again."},{name:"stb_popup_shortcut_set_not_possible",value:"The current page can not be set as a shortcut!"},{name:"stb_popup_shortcut_title_success",value:"Shortcut"},{name:"stb_popup_shutdown_body",value:"Are you sure you want to shutdown the NexTV Decoder?"},{name:"stb_popup_shutdown_title",value:"Shutdown NexTV Decoder?"},{name:"stb_popup_soft_hard_reboot_body",value:"The NexTV Decoder will reboot for maintenance."},{name:"stb_popup_soft_hard_reboot_title",value:"Maintenance"},{name:"stb_popup_standby_body",value:"Please press button on the Remote control or your NexTV Decoder will go into standby mode."},{name:"stb_popup_standby_title",value:"Standby"},{name:"stb_popup_teletext_pause_body",value:"You can not enable teletext when content is not playing live (1x speed)."},{name:"stb_popup_teletext_pause_title",value:"Teletext"},{name:"stb_popup_timeshift_no_hdd_body",value:"Timeshift is only available in Catch-Up or nPVR mode"},{name:"stb_popup_timeshift_no_hdd_title",value:"Timeshift"},{name:"stb_popup_tuner_error_body",value:"Problem with tuner. Check your RF-cable."},{name:"stb_popup_tuner_error_title",value:"Tuner error"},{name:"stb_popup_upgrade_body",value:"In a moment your NexTV Decoder will perform an upgrade to a new version ($1)"},{name:"stb_popup_upgrade_title",value:"Upgrade NexTV Decoder"},{name:"stb_popup_verimatrix_error_initialization",value:"Could not initialize CA module"},{name:"stb_popup_verimatrix_error_title",value:"CA Error"},{name:"stb_popup_wps_wifi_ne_body",value:"Please enable WiFi interface first."},{name:"stb_popup_wps_wifi_ne_title",value:"WiFi not active"},{name:"stb_radio_app_listening_to",value:"You are listening to $1"},{name:"stb_radio_app_select_channel",value:"Please select a radio channel:"},{name:"stb_radio_app_title",value:"Radio"},{name:"stb_sdt_scan_failed",value:"Failed to force SDT scan"},{name:"stb_sdt_scan_success",value:"Force SDT scan triggered successfully"},{name:"stb_sdt_scan_title",value:"SDT scan"},{name:"stb_shortcut_blue_rcu",value:"Blue button"},{name:"stb_shortcut_channel",value:'Zap to channel: "$1"'},{name:"stb_shortcut_green_rcu",value:"Green button"},{name:"stb_shortcut_page",value:'Open page: "$1"'},{name:"stb_shortcut_page_home_menu",value:"Home menu"},{name:"stb_shortcut_page_subpage",value:'Open page: "$1 - $2"'},{name:"stb_shortcut_red_rcu",value:"Red button"},{name:"stb_shortcut_yellow_rcu",value:"Yellow button"},{name:"subscriptions_active_subscriptions",value:"Active subscriptions"},{name:"subscriptions_active_subscriptions_empty",value:"No active subscriptions available"},{name:"subscriptions_available_subscriptions",value:"Available subscriptions"},{name:"subscriptions_channel_not_included_helptext",value:"This channel is not included in your subscriptions. If you want to watch it, please subscribe to a package that contains this channel."},{name:"subscriptions_channel_not_self_subscribable_text",value:"To subscribe to this channel, please visit MyMelita or call us."},{name:"subscriptions_error_general_subscribe",value:"Something went wrong during subscription."},{name:"subscriptions_error_other_subscription_pending",value:"There is currently another subscription pending. Please wait until it is completed before subscribing to another package."},{name:"subscriptions_error_product_not_found",value:"Could not find requested product"},{name:"subscriptions_included_in_following",value:"This channel is included in the following subscriptions:"},{name:"subscriptions_not_self_subscribable_text",value:"To subscribe to this package, please visit MyMelita or call us."},{name:"subscriptions_not_subscribed",value:"Not subscribed to channel"},{name:"subscriptions_packages_containing_title",value:"Packages containing $1"}
5,{name:"subscriptions_pending_subscriptions",value:"Pending subscriptions"},{name:"subscriptions_pin_to_subscribe",value:"To subscribe to this package, please enter your PIN code:"},{name:"subscriptions_pricing",value:"$1 / month"},{name:"subscriptions_product_status_available",value:"Available"},{name:"subscriptions_product_status_pending",value:"Pending"},{name:"subscriptions_product_status_subscribed",value:"Subscribed"},{name:"subscriptions_show_channel_subscriptions",value:"Show subscriptions"},{name:"subscriptions_show_channel_subscriptions_button",value:"Left"},{name:"subscriptions_show_channel_subscriptions_hint",value:"Press $1 to show subscriptions"},{name:"subscriptions_subscribe_now",value:"Subscribe now"},{name:"subscriptions_subscriptions",value:"Subscriptions"},{name:"subscriptions_subscriptions_empty",value:"No subscriptions available"},{name:"subscriptions_vod_ribbon_no_match",value:"No subscriptions available"},{name:"subscriptions_vod_ribbons_empty",value:"No subscriptions available"},{name:"subtitles",value:"Subtitles"},{name:"swipe_device",value:"Device"},{name:"swipe_playback_option",value:"Playback option"},{name:"swipe_this_device",value:"This device"},{name:"swipe_title",value:"Play $1"},{name:"swipe_title_device_selection",value:"Watch on"},{name:"tif_action_record_anyway",value:"Schedule anyway"},{name:"tif_action_record_cancel",value:"Cancel recording"},{name:"tif_action_record_instead",value:"Record this instead"},{name:"tif_action_stop",value:"Stop"},{name:"tif_action_view_schedules",value:"View recording schedule"},{name:"tif_action_watch_now",value:"Watch now"},{name:"tif_already_recorded_dialog_description",value:"This programme has already been recorded. It\u2019s available in the DVR library."},{name:"tif_already_recorded_dialog_title",value:"Already recorded"},{name:"tif_already_scheduled_dialog_description",value:"The same programme has already been scheduled to be recorded at $1."},{name:"tif_already_scheduled_dialog_title",value:"Already scheduled"},{name:"tif_cancel_button",value:"Cancel"},{name:"tif_channel_locked",value:"This channel is locked"},{name:"tif_channel_unlock_hint",value:"To watch this channel, press $1 and enter your PIN"},{name:"tif_conflict_dialog_schedule_button",value:"View recording schedule"},{name:"tif_customize_channels_description",value:`After installing the desired channel sources, you can manage them in this overview.
6
7You can decide which channels you want to display or not throughout the application. You can do this simply by selecting the desired channels and deselecting the channels you do not want.`},{name:"tif_customize_channels_select_list_message",value:"Select which channel list you want to customize."},{name:"tif_customize_channels_title",value:"Customize channel list"},{name:"tif_deselect_group_button",value:"Deselect group"},{name:"tif_display_mode_option_full",value:"Full"},{name:"tif_display_mode_option_normal",value:"Normal"},{name:"tif_display_mode_option_zoom",value:"Zoom"},{name:"tif_display_mode_selection_dialog",value:"Display mode"},{name:"tif_done_button",value:"Done"},{name:"tif_error_input_no_resource_multiple",value:"This channel can't be played until $1, because other channels are being recorded."},{name:"tif_error_input_no_resource_one",value:"This channel can't be played until $1, because another channel is being recorded."},{name:"tif_filter_button_placeholder",value:"Select filter"},{name:"tif_group_by_button_placeholder",value:"Group by"},{name:"tif_group_by_resolution",value:"Resolution"},{name:"tif_group_by_source",value:"Source"},{name:"tif_input_sources_channels_available",value:"$1 channels"},{name:"tif_input_sources_description",value:`Live channels comb
7ines the experience of traditional TV channels with streaming channels provided by apps. 
8
9Get started by setting up the channel sources already installed. Or browse Google Play Store for more apps that offer live channels.`},{name:"tif_input_sources_no_channels_available",value:"No channels available"},{name:"tif_input_sources_one_channel_available",value:"1 channel"},{name:"tif_input_sources_title",value:"Set up your sources"},{name:"tif_msg_current_program_scheduled",value:"Recording $1  from now to $2"},{name:"tif_msg_program_scheduled",value:"$1 has been scheduled to be recorded"},{name:"tif_none",value:"None"},{name:"tif_ok_button",value:"Ok"},{name:"tif_pc_block_all_channels",value:"Block all"},{name:"tif_pc_channels_blocked",value:"Channels blocked"},{name:"tif_pc_menu_description",value:"Here you can enable/disable parental control, lock complete channels and restrict programs based on age ratings."},{name:"tif_pc_menu_title",value:"Parental Control Settings"},{name:"tif_pc_othed_countries",value:"Other countries"},{name:"tif_pc_program_restrictions",value:"Program restrictions"},{name:"tif_pc_rating_systems",value:"Rating systems"},{name:"tif_pc_ratings",value:"Ratings"},{name:"tif_pc_restrictions_custom_description",value:"Manual restrictions"},{name:"tif_pc_restrictions_custom_title",value:"Custom"},{name:"tif_pc_restrictions_high_description",value:"Content suitable for children"},{name:"tif_pc_restrictions_high_title",value:"High restrictions"},{name:"tif_pc_restrictions_low_description",value:"Content suitable for teens"},{name:"tif_pc_restrictions_low_title",value:"Low restrictions"},{name:"tif_pc_restrictions_medium_description",value:"Content suitable for older children"},{name:"tif_pc_restrictions_medium_title",value:"Medium restrictions"},{name:"tif_pc_show_all",value:"Show all"},{name:"tif_pc_subratings",value:"Sub-ratings"},{name:"tif_pc_unblock_all_channels",value:"Unblock all"},{name:"tif_priority_action_one_time_recording",value:"One-time recordings have the highest priority"},{name:"tif_priority_settings_description",value:"When there are too many programmes to be recorded at the same time, only the ones with higher priorities will be recorded."},{name:"tif_priority_settings_title",value:"Choose priority"},{name:"tif_program_conflict_dialog_description_1",value:"Some parts of $1 will not be recorded."},{name:"tif_program_conflict_dialog_description_2",value:"Some parts of $1 and $2 will not be recorded."},{name:"tif_program_conflict_dialog_description_3",value:"Some parts of $1, $2 and one more schedule will not be recorded."},{name:"tif_program_conflict_dialog_description_many",value:"Some parts of $1, $2 and $3 more schedule will not be recorded."},{name:"tif_program_conflict_dialog_title",value:"Conflict"},{name:"tif_program_locked",value:"This program is locked based on its age rating"},{name:"tif_program_locked_rated",value:"This program is rated $1"},{name:"tif_program_unlock_hint",value:"To watch this program, press $1 and enter your PIN"},{name:"tif_recording_channel_option_title",value:"Channels"},{name:"tif_recording_channels_all",value:"Any"},{name:"tif_recording_dialog_episode",value:"Episode"},{name:"tif_recording_dialog_series",value:"Series"},{name:"tif_recording_duration",value:"$1 minutes"},{name:"tif_recording_failed_input_dvr_unsupported_short",value:"Recording not supported."},{name:"tif_recording_failed_input_unavailable_short",value:"$1 unavailable."},{name:"tif_recording_failed_insufficient_space_short",value:"Insufficient space."},{name:"tif_recording_failed_not_started_short",value:"Failed to start recording."},{name:"tif_recording_failed_resource_busy_short",value:"Failed to tune to the channel."},{name:"tif_recording_failed_short",value:"Failed."},{name:"tif_recording_failed_system_failure",value:"System failure. (Error code: $1)"},{name:"tif_recording_highest_priority",value:"Highest"},{name:"tif_recording_lowest_priority",value:"Lowest"},{name:"tif_recording_priority_option_title",value:"Priority"},{name:"tif_recording_priority_rank",value:"No. $1"},{name:"tif_recording_settings_description",value:"When there are too many programs to be recorded at the same time, only the ones with higher priorities will be recorded."},{name:"tif_recording_settings_title",value:"Recording settings"},{name:"tif_recordings_box_name",value:"Third party recordings"},{name:"tif_schedule_deleted",value:"$1 removed from recording schedule"},{name:"tif_schedule_display_episode_title_format",value:"S$1: Ep. $2 $3"},{name:"tif_schedule_display_episode_title_format_no_season_number",value:"Ep. $1 $2"},{name:"tif_schedule_program_title_with_episode_number_no_season",value:"$1 Ep. $2"},{name:"tif_schedules_1_recording",value:"1 recording"},{name:"tif_schedules_empty_state",value:`There are no recordings on schedule yet.
10You can schedule recording from the programme guide.`},{name:"tif_schedules_many_recording",value:"$1 recordings"},{name:"tif_schedules_program_title_with_episode_number",value:"$1 S$2: Ep. $3"},{name:"tif_schedules_tuner_conflict_will_be_partially_recorded",value:"Will be partially recorded due to tuner conflicts."},{name:"tif_schedules_tuner_conflict_will_not_be_recorded_info",value:"Won't be recorded due to tuner conflicts."},{name:"tif_select_group_button",value:"Select group"},{name:"tif_series_progress_message_reading_programs",value:"Reading programmes"},{name:"tif_series_recording_dialog_title",value:"Series recording scheduled"},{name:"tif_series_recording_scheduled_only_this_series_conflict",value:"$1 recordings have been scheduled for $2. $3 of them will not be recorded due to conflicts."},{name:"tif_series_recording_scheduled_only_this_series_conflict_one_recording",value:"1 recording have been scheduled for $1. It will not be recorded due to conflicts."},{name:"tif_series_scheduled_no_conflict",value:"$1 recordings have been scheduled for $2."},{name:"tif_series_scheduled_no_conflict_one_recording",value:"1 recording have been scheduled for $1."},{name:"tif_series_scheduled_only_other_series_many_conflicts",value:"$1 recordings have been scheduled for $2. $3 episodes of other series will not be recorded due to conflicts."},{name:"tif_series_scheduled_only_other_series_many_conflicts_one_recording",value:"1 recording have been scheduled for $1. $2 episodes of other series will not be recorded due to conflicts."},{name:"tif_series_scheduled_only_other_series_one_conflict",value:"$1 recordings have been scheduled for $2. 1 episode of other series will not be recorded due to conflicts."},{name:"tif_series_scheduled_only_other_series_one_conflict_one_recording",value:"1 recording have been scheduled for $1. 1 episode of other series will not be recorded due to conflicts."},{name:"tif_series_scheduled_this_and_other_series_conflict",value:"$1 recordings have been scheduled for $2. $3 episodes of this series and other series will not be recorded due to conflicts."},{name:"tif_series_scheduled_this_and_other_series_conflict_one_recording",value:"1 recording have been scheduled for $1. $2 episodes of this series and other series will not be recorded due to conflicts."},{name:"tif_series_schedules_empty_state",value:`No episodes are available. 
11They will be recorded once they are available.`},{name:"tif_series_schedules_header_description",value:"$1 recording conflicts"},{name:"tif_series_schedules_header_description_one",value:"1 recording conflict"},{name:"tif_series_schedules_settings",value:"Series settings"},{name:"tif_series_schedules_start",value:"Start series recording"},{name:"tif_series_schedules_stop",value:"Stop series recording"},{name:"tif_series_schedules_stop_dialog_action_stop",value:"Stop"},{name:"tif_series_schedules_stop_dialog_description",value:"Recorded episodes will remain available in the DVR library."},{name:"tif_series_schedules_stop_dialog_title",value:"Stop series recording"},{name:"tif_series_schedules_stopped_empty_state",value:"No episodes are on air now."},{name:"tif_stop_recording_dialog_description_on_conflict",value:"The recording of $1 will be stopped because it c
11onflicts with this programme. The recorded content will be saved."},{name:"tif_stop_recording_dialog_title",value:"Stop recording"},{name:"tif_toggle_off",value:"Off"},{name:"tif_toggle_on",value:"On"},{name:"tif_unlock_button",value:"Left"},{name:"time_day",value:"Day"},{name:"time_day_friday",value:"Friday"},{name:"time_day_monday",value:"Monday"},{name:"time_day_saturday",value:"Saturday"},{name:"time_day_short_fri",value:"Fri"},{name:"time_day_short_mon",value:"Mon"},{name:"time_day_short_sat",value:"Sat"},{name:"time_day_short_sun",value:"Sun"},{name:"time_day_short_thu",value:"Thu"},{name:"time_day_short_tue",value:"Tue"},{name:"time_day_short_wed",value:"Wed"},{name:"time_day_sunday",value:"Sunday"},{name:"time_day_thursday",value:"Thursday"},{name:"time_day_tuesday",value:"Tuesday"},{name:"time_day_wednesday",value:"Wednesday"},{name:"time_duration_1_hour",value:"$1 hour"},{name:"time_duration_1_min",value:"$1 minute"},{name:"time_duration_hours",value:"$1 hours"},{name:"time_duration_min",value:"$1 minutes"},{name:"time_hour_short",value:"hr"},{name:"time_minutes_short",value:"min"},{name:"time_month",value:"Month"},{name:"time_month_short_april",value:"Apr"},{name:"time_month_short_august",value:"Aug"},{name:"time_month_short_december",value:"Dec"},{name:"time_month_short_february",value:"Feb"},{name:"time_month_short_january",value:"Jan"},{name:"time_month_short_july",value:"Jul"},{name:"time_month_short_june",value:"Jun"},{name:"time_month_short_march",value:"Mar"},{name:"time_month_short_may",value:"May"},{name:"time_month_short_november",value:"Nov"},{name:"time_month_short_october",value:"Oct"},{name:"time_month_short_september",value:"Sep"},{name:"time_today",value:"Today"},{name:"time_tomorrow",value:"Tomorrow"},{name:"time_year",value:"Year"},{name:"time_yesterday",value:"Yesterday"},{name:"unmark_favorite",value:"unmark as favourite"}],contentDescriptionTranslations:[{name:"autoplay_poster",value:"Poster image for $1"},{name:"btn_clear_filter",value:"Clear filter"},{name:"btn_clear_filters",value:"Clear filters"},{name:"btn_close",value:"Close"},{name:"btn_favorite_add",value:"Mark as favorite"},{name:"btn_favorite_remove",value:"Unmark as favorite"},{name:"btn_reminder_add",value:"Set reminder"},{name:"btn_reminder_remove",value:"Remove reminder"},{name:"btn_share",value:"Share with others"},{name:"btn_swipe_stb",value:"Swipe this content to your decorder"},{name:"btn_watch",value:"Watch"},{name:"icon_age",value:"Suitable for ages $1 and up"},{name:"icon_audio_description",value:"Audio description"},{name:"icon_parental_rating_coarse_language",value:"Coarse language"},{name:"icon_parental_rating_discrimination",value:"Discrimination"},{name:"icon_parental_rating_drugs",value:"Drugs"},{name:"icon_parental_rating_fear",value:"Fear"},{name:"icon_parental_rating_sex",value:"Sex"},{name:"icon_parental_rating_violence",value:"Violence"},{name:"icon_play",value:"Watchable"},{name:"icon_play_swipe",value:"Watchable on your STB"},{name:"icon_recording_conflict",value:"Recording in conflict"},{name:"icon_recording_delete_all",value:"Delete all recordings"},{name:"icon_recording_error",value:"Recording with an error"},{name:"icon_recording_folder",value:"Folder contains $1 recordings"},{name:"icon_recording_in_progress",value:"Recording is in progress"},{name:"icon_recording_in_progress_conflict",value:"Recording is in progress but with a conflict"},{name:"icon_recording_locked",value:"Locked recording"},{name:"icon_recording_planned",value:"Planned recording"},{name:"icon_recording_recorded",value:"Recorded"},{name:"icon_replay",value:"Replayable"},{name:"icon_replay_swipe",value:"Replayable on your STB"},{name:"icon_resolution_4k",value:"4K"},{name:"icon_resolution_hd",value:"HD"},{name:"icon_sign_language",value:"Sign language"},{name:"icon_subtitles",value:"Subtitles"},{name:"includes",value:"Includes $1"},{name:"login_btn_hide_password",value:"Hide password"},{name:"login_btn_show_password",value:"Show password"},{name:"main_navigation",value:"Main navigation"},{name:"menu_item_catalog",value:"Current catalog is $1. Select to switch catalogs"},{name:"menu_item_profile",value:"Current profile is $1. Select to switch profiles or to update profile settings"},{name:"operator_score",value:"$1 stars out of $2"},{name:"player_btn_enter_full_screen",value:"Enter full screen"},{name:"player_btn_enter_multiview",value:"Enter multiview"},{name:"player_btn_exit_full_screen",value:"Exit full screen"},{name:"player_btn_exit_multiview",value:"Exit multiview"},{name:"player_btn_mute",value:"Mute"},{name:"player_btn_next_event",value:"Next event"},{name:"player_btn_pause",value:"Pause"},{name:"player_btn_pip",value:"Turn on Picture-in-Picture"},{name:"player_btn_play",value:"Play"},{name:"player_btn_previous_event",value:"Previous event"},{name:"player_btn_settings",value:"Settings"},{name:"player_btn_skip_backward",value:"Skip $1 backward"},{name:"player_btn_skip_forward",value:"Skip $1 forward"},{name:"player_btn_unmute",value:"Unmute"},{name:"player_slider_volume",value:"Volume slider"},{name:"profile_btn_create",value:"Create profile"},{name:"profile_btn_edit",value:"Edit profile $1"},{name:"profile_icon",value:"Profile icon for $1"},{name:"profile_switch",value:"Switch to profile $1"},{name:"progress_bookmark_value",value:"$1 percent watched"},{name:"progress_live_value",value:"Live show progress, $1 percent elapsed"},{name:"progress_value_completed",value:"Fully watched"},{name:"score",value:"$1 out of $2"},{name:"sub_navigation",value:"$1 sub navigation"}],genreTranslations:[],parentalRatingTranslations:[],legalTexts:[],externalLinks:[],anonymousConfig:{catalogs:[{id:"99fa2284-7c37-4bc8-b864-000000000001",name:"Arena",avatar:"https://arena-streams.com/media/images/profile/a1/36/undefined_atv1.png"}],defaultCatalogId:"99fa2284-7c37-4bc8-b864-000000000001",defaultProfileId:"5c94697c-9c8a-4e29-9e10-000000000002",defaultEntitlementId:"00000000-0000-0000-0000-000000000000",defaultParentalId:"00000000-0000-0000-0000-000000000000"}};var co={version:"3.0.0.3",buildTime:"2026-09-25 08:54:07 CEST"};var ln=(function(t){return t[t.RECORDING=0]="RECORDING",t[t.SHOW_SWIPABLE_ICONS=1]="SHOW_SWIPABLE_ICONS",t[t.SHOW_RECORDABLE_ICONS=2]="SHOW_RECORDABLE_ICONS",t[t.VIDEO_BANNERS=3]="VIDEO_BANNERS",t[t.CHANNEL_LIVE_THUMBNAIL=4]="CHANNEL_LIVE_THUMBNAIL",t})(ln||{});var Dr=(function(t){return t[t.PLAYING=0]="PLAYING",t[t.PAUSED=1]="PAUSED",t[t.BUFFERING=2]="BUFFERING",t[t.TIME_UPDATE=3]="TIME_UPDATE",t[t.TRACKS_ADDED=4]="TRACKS_ADDED",t[t.ENDED=5]="ENDED",t[t.AIRPLAY=6]="AIRPLAY",t[t.ERROR=7]="ERROR",t[t.ADS_ADDED=8]="ADS_ADDED",t[t.AD_BREAK=9]="AD_BREAK",t[t.AD=10]="AD",t[t.CAN_UPDATE_START_TIME=11]="CAN_UPDATE_START_TIME",t})(Dr||{}),Ar=(function(t){return t[t.PRE_ROLL=0]="PRE_ROLL",t[t.MID_ROLL=1]="MID_ROLL",t[t.POST_ROLL=2]="POST_ROLL",t})(Ar||{}),ka=class{constructor(i){this.type=Dr.PLAYING,this.isAd=i}},La=class{constructor(i){this.type=Dr.PAUSED,this.isAd=i}},Cd=class{constructor(i){this.type=Dr.BUFFERING,this.isBuffering=i}},wr=class{constructor(i,e){this.type=Dr.TIME_UPDATE,this.position=i,this.duration=e}}
11,Sd=class{constructor(i,e,n){this.type=Dr.TRACKS_ADDED,this.videoTracks=i,this.audioTracks=e,this.textTracks=n}},Fa=class{constructor(){this.type=Dr.ENDED}},Ed=class{constructor(i){this.type=Dr.AIRPLAY,this.isActive=i}},Tr=class{constructor(i){this.type=Dr.ERROR,this.error=i}},Id=class{constructor(i,e,n){this.type=Dr.ADS_ADDED,this.hasPreRoll=i,this.hasMidRoll=e,this.hasPostRoll=n}},wd=class{constructor(i,e){this.type=Dr.AD_BREAK,this.starting=i,this.breakType=e}},Td=class{constructor(){this.type=Dr.CAN_UPDATE_START_TIME}};var uo=(function(t){return t[t.CASTLABS=0]="CASTLABS",t[t.SHAKA=1]="SHAKA",t[t.THEO=2]="THEO",t})(uo||{}),rf=(function(t){return t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready",t.FAIRPLAY="com.apple.fps",t})(rf||{}),Dn=class{constructor(i){this.forBanner=i,this.playerEvents=new wn(1,0),this.notifyPlaying=e=>{this.playerEvents.next(new ka(e))},this.notifyPaused=e=>{this.playerEvents.next(new La(e))},this.onBuffering=e=>{this.playerEvents.next(new Cd(e))},this.onEnded=()=>{this.playerEvents.next(new Fa)},this.notifyCanUpdateStartTime=()=>{this.playerEvents.next(new Td)}}notifyTracksAdded(i,e,n){this.playerEvents.next(new Sd(i,e,n))}notifyAirplay(i){this.playerEvents.next(new Ed(i))}onAdsAdded(i,e,n){this.playerEvents.next(new Id(i,e,n))}onAdBreak(i,e){this.playerEvents.next(new wd(i,e))}};var po={platform:ra.WEB,device:MS.WEB,allowAdult:!0,ottRights:[q.LINEAR,q.NPVR],stbRights:[q.LINEAR,q.DVBC,q.NPVR],replayOttRights:[q.REPLAY],replayStbRights:[q.REPLAY],useHtmlTextDisplayer:!0,actionFilter:"639",defaultStreamPackageType:Nu.DASH,detailFeature:!0},ae=(()=>{class t{constructor(e){this.features=[],this.http=new on(e)}get applicationName(){return this.appConfig.applicationName}get applicationDescription(){return this.appConfig.applicationDescription}get discoveryUrl(){return this.appConfig.discoveryUrl}get platform(){return po.platform}get device(){return po.device}get allowAdult(){return po.allowAdult}get oauthServiceLocation(){return this.appConfig.oauthServiceLocation??""}get oauthRedirectUri(){return this.appConfig.oauthRedirectUri}get atvFeatureList(){return this.features}get atvOttRights(){return po.ottRights}get atvStbRights(){return po.stbRights}get atvReplayOttRights(){return po.replayOttRights}get atvReplayStbRights(){return po.replayStbRights}get drmMerchant(){return this.appConfig.drm_merchant}get drmStaging(){return this.appConfig.drmStaging}get chromecastReceiverAppId(){return this.appConfig.chromecast_receiver_app_id}get castLabsLicenseKey(){return this.appConfig.castLabsLicenseKey}get theoplayerConfig(){return this.appConfig.theoplayerConfig}get actionFilter(){return po.actionFilter}get playerEngine(){return this.playerEngineType??uo.CASTLABS}get hidePlayerTimeContainerWhenLive(){return this.appConfig.hidePlayerTimeContainerWhenLive??!1}get useHtmlTextDisplayer(){return po.useHtmlTextDisplayer}get defaultStreamPackageType(){return this.appConfig.defaultStreamPackageType??po.defaultStreamPackageType}get detailFeature(){return this.appConfig.detailFeature??po.detailFeature}get saveAssetParams(){return this.appConfig.saveAssetParams??{}}initializeApp(){return this.loadConfig().pipe(we(()=>{console.log("[AppLoad] App initialized")},e=>{console.error("[AppLoad] Failed to initialize App",e)}))}loadConfig(){return this.http.get("./assets/config/app.config.json").pipe(P(e=>{this.appConfig=e,e.logging||(window.console.log=()=>{},window.console.warn=()=>{}),this.convertEnums()}))}convertEnums(){this.convertFeatures(this.appConfig.atv_feature_list),this.convertPlayerEngine(this.appConfig.playerEngine)}convertFeatures(e){e?.forEach(n=>{this.features.push(ln[n])})}convertPlayerEngine(e){this.playerEngineType=uo[e]??uo.CASTLABS}static{this.\u0275fac=function(n){return new(n||t)(h(Ql))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var y_=class{provideSessionToken(){return Promise.resolve("")}provideLoginToken(){return Promise.resolve("")}};var b_=class extends Go{constructor(i){super(i),this.error=i.error}},Ad=class extends Error{constructor(i){super(i?.message),this.error=i}};var of=(function(t){return t.folder="./assets/theme/svg/recording_folder.svg",t.planned="./assets/theme/svg/recording_planned.svg",t.inProgress="./assets/theme/svg/recording_inprogress.svg",t.recorded="./assets/theme/svg/recording_recorded.svg",t.error="./assets/theme/svg/recording_error.svg",t.inProgressError="./assets/theme/svg/recording_error.svg",t.inProgressConflict="./assets/theme/svg/recording_inprogress_conflict.svg",t.plannedConflict="./assets/theme/svg/recording_conflict.svg",t})(of||{}),sf=(function(t){return t.Subtitles="./assets/theme/svg/acc_subtitles_n
11ormal.svg",t.AudioDescription="./assets/theme/svg/acc_AD_normal.svg",t.SignLanguage="./assets/theme/svg/acc_SL_normal.svg",t})(sf||{}),Va=(function(t){return t.Language="./assets/theme/images/language-rating.png",t.Discrimination="./assets/theme/images/discrimination-rating.png",t.Drugs="./assets/theme/images/drugs-alcohol-rating.png",t.Fear="./assets/theme/images/fear-rating.png",t.Sex="./assets/theme/images/sex-rating.png",t.Violence="./assets/theme/images/violence-rating.png",t})(Va||{});var me=(function(t){return t.ARTICLE_WALLPAPER_2="article-wallpaper-2",t.AUTOPLAY_BACKGROUND_1="autoplay-background-mobile-1",t.AUTOPLAY_BACKGROUND_2="autoplay-background-mobile-2",t.AUTOPLAY_BACKGROUND_3="autoplay-background-mobile-3",t.AUTOPLAY_BACKGROUND_4="autoplay-background-mobile-4",t.AVATAR_1="avatar-1",t.AVATAR_2="avatar-2",t.AVATAR_3="avatar-3",t.BANNER_7_1_1="banner-7x1-1",t.BANNER_7_1_2="banner-7x1-2",t.BANNER_7_1_3="banner-7x1-3",t.BANNER_7_1_4="banner-7x1-4",t.BANNER_7_2_1="banner-7x2-1",t.BANNER_7_2_2="banner-7x2-2",t.BANNER_7_2_3="banner-7x2-3",t.BANNER_7_2_4="banner-7x2-4",t.BANNER_7_3_1="banner-7x3-1",t.BANNER_7_3_2="banner-7x3-2",t.BANNER_7_3_3="banner-7x3-3",t.BANNER_7_3_4="banner-7x3-4",t.BREAKVERTISING_1="breakvertising-1",t.CHANNEL_1="channel-1",t.CHANNEL_SQUARE_1="channel-square-1",t.CUSTOM_BACKGROUND_1="custom-background-1",t.CUSTOM_BACKGROUND_2="custom-background-2",t.CUSTOM_BACKGROUND_3="custom-background-3",t.DETAIL_BACKDROP_1="detail-backdrop-1",t.DETAIL_LANDSCAPE_3="detail-landscape-3",t.EPG_CARD_3="epg-card-3",t.UPSELL_1="upsell-1",t.VOD_CARD_3="vod-card-3",t.CARD_LANDSCAPE_SMALL_2="card-landscape-small-2",t.CARD_LANDSCAPE_MEDIUM_2="card-landscape-medium-2",t.CARD_LANDSCAPE_NORMAL_2="card-landscape-normal-2",t.CARD_LANDSCAPE_LARGE_2="card-landscape-large-2",t.CARD_LANDSCAPE_EXTRA_LARGE_2="card-landscape-extra-large-2",t.CARD_PORTRAIT_SMALL_2="card-portrait-small-2",t.CARD_PORTRAIT_MEDIUM_2="card-portrait-medium-2",t.CARD_PORTRAIT_NORMAL_2="card-portrait-normal-2",t.CARD_PORTRAIT_LARGE_2="card-portrait-large-2",t.CARD_PORTRAIT_EXTRA_LARGE_2="card-portrait-extra-large-2",t.RIBBON_BACKGROUND_LANDSCAPE_3="ribbon-background-landscape-3",t.RIBBON_BRAND_3="ribbon-brand-3",t})(me||{}),nr=(function(t){return t[t.BANNER_7_1=0]="BANNER_7_1",t[t.BANNER_7_2=1]="BANNER_7_2",t[t.BANNER_7_3=2]="BANNER_7_3",t[t.CUSTOM_BACKGROUND=3]="CUSTOM_BACKGROUND",t[t.AUTOPLAY_BACKGROUND=4]="AUTOPLAY_BACKGROUND",t})(nr||{}),ot=class t{static createImageUrl(i,e){return`${i}?form=${e}`}static getSourceSet(i,e){return this.getImageRecipeSet(e)?.map(n=>`${t.createImageUrl(i,n.recipe)} ${n.width}w`).join(", ")}static getImageRecipeSet(i){switch(i){case nr.BANNER_7_1:return[{recipe:me.BANNER_7_1_1,width:525},{recipe:me.BANNER_7_1_2,width:1280},{recipe:me.BANNER_7_1_3,width:2100},{recipe:me.BANNER_7_1_4,width:4096}];case nr.BANNER_7_2:return[{recipe:me.BANNER_7_2_1,width:525},{recipe:me.BANNER_7_2_2,width:1280},{recipe:me.BANNER_7_2_3,width:2100},{recipe:me.BANNER_7_2_4,width:4096}];case nr.BANNER_7_3:return[{recipe:me.BANNER_7_3_1,width:525},{recipe:me.BANNER_7_3_2,width:1280},{recipe:me.BANNER_7_3_3,width:2100},{recipe:me.BANNER_7_3_4,width:4096}];case nr.CUSTOM_BACKGROUND:return[{recipe:me.CUSTOM_BACKGROUND_1,width:1280},{recipe:me.CUSTOM_BACKGROUND_2,width:1920},{recipe:me.CUSTOM_BACKGROUND_3,width:3840}];case nr.AUTOPLAY_BACKGROUND:return[{recipe:me.AUTOPLAY_BACKGROUND_1,width:960},{recipe:me.AUTOPLAY_BACKGROUND_2,width:1920},{recipe:me.AUTOPLAY_BACKGROUND_3,width:2880},{recipe:me.AUTOPLAY_BACKGROUND_4,width:3840}];default:return[]}}};var $=class t{static getMinimumAgeImage(i,e="normal"){if(!i)return"";switch(i){case 1:case 2:case 3:case 4:return`./assets/theme/svg/4_${e}.svg`;case 5:case 6:return`./assets/theme/svg/6_${e}.svg`;case 7:case 8:case 9:case 10:case 11:case 12:return`./assets/theme/svg/12_${e}.svg`;case 13:case 14:return`./assets/theme/svg/14_${e}.svg`;case 15:case 16:return`./assets/theme/svg/16_${e}.svg`;case 17:case 18:return`./assets/theme/svg/18_${e}.svg`;default:return""}}
11static getResolutionImage(i){switch(i){case In.UHD_4K:return"./assets/theme/svg/4K_normal.svg";case In.HD:return"./assets/theme/svg/HD_normal.svg";default:return""}}static getHighestResolution(i){if(i)return i=i.sort((e,n)=>t.resolutionTypeToNumber(n.resolution)-t.resolutionTypeToNumber(e.resolution)),i[0]?.resolution}static generateAuthState(){return this.getCSPRN()||this.getPRN()}static secondsToHHMMSS(i){let e=i<0?"-":"",n=Math.abs(i),r=Math.floor(n/3600),o=Math.floor(n%3600/60),s=Math.floor(n%3600%60);return e+((r>0?r+":"+(o<10?"0":""):"")+o+":"+(s<10?"0":"")+s)}static getCSPRN(){if(window&&window.crypto){let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=new Uint8Array(40);return window.crypto.getRandomValues(e),e=e.map(n=>i.charCodeAt(n%i.length)),String.fromCharCode.apply(null,e)}}static getPRN(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}static timeStringToMs(i){return Number.isNaN(i)?new Date(i).getTime():(typeof i=="string"&&(i=parseInt(i,10)),(i||0)*1e3)}static timeStringToDateTime(i){return Number.isNaN(i)?ie.fromISO(i):ie.fromSeconds(parseInt(i,10)||0)}static timeStringToDate(i){return this.timeStringToDateTime(i).toJSDate()}static dateToDateTime(i){return ie.fromJSDate(i)}static resolutionTypeToNumber(i){switch(i){case In.SD:return 0;case In.HD:return 1;case In.UHD_4K:return 2}}static getFullDetailUrl(i){return window.location.origin+"/"+i}static getFavoriteIcon(i){return i?"./assets/theme/svg/favoritesicon_selected.svg":"./assets/theme/svg/favoritesicon_normal.svg"}static getReminderIcon(i){return i?"./assets/theme/svg/reminders_selected.svg":"./assets/theme/svg/reminders_normal.svg"}static formatDateToApi(i,e=!0){return ie.fromJSDate(i).toUTC().set({minute:0,second:0,millisecond:0}).toISO({suppressMilliseconds:!0,suppressSeconds:e})}static formatDateToString(i){let e=i.getDate().toString().padStart(2,"0"),n=(i.getMonth()+1).toString().padStart(2,"0");return`${e}/${n}/${i.getFullYear()}`}static dateToSec(i){return ie.fromJSDate(i).toSeconds()}static getDayInfo(i,e,n){if(!i)return"";let r=ie.now().startOf("day"),o=ie.fromMillis(i),s=o.startOf("day").diff(r,"days").days,a="";return Math.abs(s)>1?(e?a+=this.getShortDayTranslation(o.weekday,n):a+=this.getDayTranslation(o.weekday,n),a+=" "+o.toFormat("dd"),a+=" "+this.getMonthTranslation(o.month,n)):a+=this.getYesterdayTodayTomorrowTranslation(s,n),a}static getDayTimeInfo(i,e){if(!i)return"";let n="";return n+=this.getDayTranslation(i.weekday,e),n+=" "+i.toFormat("dd"),n+=" "+this.getMonthTranslation(i.month,e),n+=", "+i.toFormat("HH:mm"),n}static getShortDayTranslation(i,e){switch(i){case 1:return e.getTranslation(Fe.time_day_short_mon);case 2:return e.getTranslation(Fe.time_day_short_tue);case 3:return e.getTranslation(Fe.time_day_short_wed);case 4:return e.getTranslation(Fe.time_day_short_thu);case 5:return e.getTranslation(Fe.time_day_short_fri);case 6:return e.getTranslation(Fe.time_day_short_sat);case 7:return e.getTranslation(Fe.time_day_short_sun);default:return""}}static getLastValidQuote(i){let e;return i.forEach(n=>{(!e||parseInt(n.validUntil,10)>parseInt(e.validUntil,10))&&(e=n)}),e}static getAvailableUntilFromQuote(i,e){return e.getTranslation(pe.detail_available_until)+" "+t.getDayInfo(t.timeStringToMs(i.validUntil),!1,e)+", "+t.timeStringToDateTime(i.validUntil).toLocaleString(ie.TIME_24_SIMPLE)}static removePathParams(i,e){if(e){let n=Object.values(e);n.every(r=>i.includes(r))&&n.forEach(r=>i=i.replace("/"+r,""))}return i}static getLastBookmarkEpisode(i){let e;return i.forEach(n=>{(!e||parseInt(e.updatedAt,10)<parseInt(n.updatedAt,10))&&(e=n)}),e}static s4(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}static guid(){return this.s4()+this.s4()+"-"+this.s4()+"-"+this.s4()+"-"+this.s4()+"-"+this.s4()+this.s4()+this.s4()}static getPosterImage(i,e,n,r){return n?r===nt.LANDSCAPE?"./assets/theme/images/placeholder_adult_landscape.png":"./assets/theme/images/placeholder_adult_portrait.png":i?ot.createImageUrl(i,e):""}static getAccessibilityIcons(i){let e=[];return i&&(i.includes(ms.SUBTITLES)&&e.push(sf.Subtitles),i.includes(ms.AUDIO_DESCRIPTION)&&e.push(sf.AudioDescription),i.includes(ms.SIGN_LANGUAGE)&&e.push(sf.SignLanguage)),e}static getParentalIcons(i){let e=[];return i&&(i.includes(ia.COARSELANGUAGE)&&e.push(Va.Language),i.includes(ia.DISCRIMINATION)&&e.push(Va.Discrimination),i.includes(ia.DRUGS)&&e.push(Va.Drugs),i.includes(ia.FEAR)&&e.push(Va.Fear),i.includes(ia.SEX)&&e.push(Va.Sex),i.includes(ia.VIOLENCE)&&e.push(Va.Violence)),e}static getYesterdayTodayTomorrowTranslation(i,e){switch(i){case-1:return e.getTranslation(Fe.time_yesterday);case 0:return e.getTranslation(Fe.time_today);case 1:return e.getTranslation(Fe.time_tomorrow);default:return""}}static getDayTranslation(i,e){switch(i){case 1:return e.getTranslation(Fe.time_day_monday);case 2:return e.getTranslation(Fe.time_day_tuesday);case 3:return e.getTranslation(Fe.time_day_wednesday);case 4:return e.getTranslation(Fe.time_day_thursday);case 5:return e.getTranslation(Fe.time_day_friday);case 6:return e.getTranslation(Fe.time_day_saturday);case 7:return e.getTranslation(Fe.time_day_sunday);default:return""}}static getMonthTranslation(i,e){switch(i){case 1:return e.getTranslation(Fe.time_month_short_january);case 2:return e.getTranslation(Fe.time_month_short_february);case 3:return e.getTranslation(Fe.time_month_short_march);case 4:return e.getTranslation(Fe.time_month_short_april);case 5:return e.getTranslation(Fe.time_month_short_may);case 6:return e.getTranslation(Fe.time_month_short_june);case 7:return e.getTranslation(Fe.time_month_short_july);case 8:return e.getTranslation(Fe.time_month_short_august);case 9:return e.getTranslation(Fe.time_month_short_september);case 10:return e.getTranslation(Fe.time_month_short_october);case 11:return e.getTranslation(Fe.time_month_short_november);case 12:return e.getTranslation(Fe.time_month_short_december);default:return""}}static randIntInRange(i,e){return Math.floor(Math.random()*(e-i+1))+i}};function C_(t,i){return t?i?t.endsWith("/")?i.startsWith("/")?t+i.slice(1):t+i:i.startsWith("/")?t+i:`${t}/${i}`:t:i}function IO(t){let i=t.search(/#|\?|$/);return t[i-1]==="/"?t.slice(0,i-1)+t.slice(i):t}function fo(t){return t&&t[0]!=="?"?`?${t}`:t}var ho=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:()=>U(E_),providedIn:"root"})}return t})(),S_=new le(""),E_=(()=>{class t extends ho{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??U(Yt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.on
vendor: 7,576 bytes, line 11
11HashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return C_(this._baseHref,e)}path(e=!1){let n=this._platformLocation.pathname+fo(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,o){let s=this.prepareExternalUrl(r+fo(o));this._platformLocation.pushState(e,n,s)}replaceState(e,n,r,o){let s=this.prepareExternalUrl(r+fo(o));this._platformLocation.replaceState(e,n,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(h(Os),h(S_,8))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Rr=(()=>{class t{_subject=new Ot;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let n=this._locationStrategy.getBaseHref();this._basePath=g3(IO(wO(n))),this._locationStrategy.onPopState(r=>{this._subject.next({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+fo(n))}normalize(e){return t.stripTrailingSlash(m3(this._basePath,wO(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",r=null){this._locationStrategy.pushState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+fo(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+fo(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(r=>r(e,n))}subscribe(e,n,r){return this._subject.subscribe({next:e,error:n??void 0,complete:r??void 0})}static normalizeQueryParams=fo;static joinWithSlash=C_;static stripTrailingSlash=IO;static \u0275fac=function(n){return new(n||t)(h(ho))};static \u0275prov=w({token:t,factory:()=>h3(),providedIn:"root"})}return t})();function h3(){return new Rr(h(ho))}function m3(t,i){if(!t||!i.startsWith(t))return i;let e=i.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:i}function wO(t){return t.replace(/\/index.html$/,"")}function g3(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var vE=(()=>{class t extends ho{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,n!=null&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash??"#";return n.length>0?n.substring(1):n}prepareExternalUrl(e){let n=C_(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,o){let s=this.prepareExternalUrl(r+fo(o))||this._platformLocation.pathname;this._platformLocation.pushState(e,n,s)}replaceState(e,n,r,o){let s=this.prepareExternalUrl(r+fo(o))||this._platformLocation.pathname;this._platformLocation.replaceState(e,n,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(h(Os),h(S_,8))};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})();var ai=(function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t})(ai||{}),kt=(function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t})(kt||{}),Oi=(function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t})(Oi||{}),Vs={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function AO(t){return Xi(t)[Sn.LocaleId]}function RO(t,i,e){let n=Xi(t),r=[n[Sn.DayPeriodsFormat],n[Sn.DayPeriodsStandalone]],o=xr(r,i);return xr(o,e)}function xO(t,i,e){let n=Xi(t),r=[n[Sn.DaysFormat],n[Sn.DaysStandalone]],o=xr(r,i);return xr(o,e)}function MO(t,i,e){let n=Xi(t),r=[n[Sn.MonthsFormat],n[Sn.MonthsStandalone]],o=xr(r,i);return xr(o,e)}function PO(t,i){let n=Xi(t)[Sn.Eras];return xr(n,i)}function af(t,i){let e=Xi(t);return xr(e[Sn.DateFormat],i)}function lf(t,i){let e=Xi(t);return xr(e[Sn.TimeFormat],i)}function cf(t,i){let n=Xi(t)[Sn.DateTimeFormat];return xr(n,i)}function df(t,i){let e=Xi(t),n=e[Sn.NumberSymbols][i];if(typeof n>"u"){if(i===Vs.CurrencyDecimal)return e[Sn.NumberSymbols][Vs.Decimal];if(i===Vs.CurrencyGroup)return e[Sn.NumberSymbols][Vs.Group]}return n}function OO(t){if(!t[Sn.ExtraData])throw new Z(2303,!1)}function NO(t){let i=Xi(t);return OO(i),(i[Sn.ExtraData][2]||[]).map(n=>typeof n=="string"?hE(n):[hE(n[0]),hE(n[1])])}function kO(t,i,e){let n=Xi(t);OO(n);let r=[n[Sn.ExtraData][0],n[Sn.ExtraData][1]],o=xr(r,i)||[];return xr(o,e)||[]}function xr(t,i){for(let e=i;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new Z(2304,!1)}function hE(t){let[i,e]=t.split(":");return{hours:+i,minutes:+e}}var _3=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,I_={},v3=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function LO(t,i,e,n){let r=D3(t);i=Fs(e,i)||i;let s=[],a;for(;i;)if(a=v3.exec(i),a){s=s.concat(a.slice(1));let d=s.pop();if(!d)break;i=d}else{s.push(i);break}let l=r.getTimezoneOffset();n&&(l=VO(n,l),r=T3(r,n));let c="";return s.forEach(d=>{let p=I3(d);c+=p?p(r,e,l):d==="''"?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function R_(t,i,e){let n=new Date(0);return n.setFullYear(t,i,e),n.setHours(0,0,0),n}function Fs(t,i){let e=AO(t);if(I_[e]??={},I_[e][i])return I_[e][i];let n="";switch(i){case"shortDate":n=af(t,Oi.Short);break;case"mediumDate":n=af(t,Oi.Medium);break;case"longDate":n=af(t,Oi.Long);break;case"fullDate":n=af(t,Oi.Full);break;case"shortTime":n=lf(t,Oi.Short);break;case"mediumTime":n=lf(t,Oi.Medium);break;case"longTime":n=lf(t,Oi.Long);break;case"fullTime":n=lf(t,Oi.Full);break;case"short":let r=Fs(t,"shortTime"),o=Fs(t,"shortDate");n=w_(cf(t,Oi.Short),[r,o]);break;case"medium":let s=Fs(t,"mediumTime"),a=Fs(t,"mediumDate");n=w_(cf(t,Oi.Medium),[s,a]);break;case"long":let l=Fs(t,"longTime"),c=Fs(t,"longDate");n=w_(cf(t,Oi.Long),[l,c]);break;case"full":let d=Fs(t,"fullTime"),p=Fs(t,"fullDate");n=w_(cf(t,Oi.Full),[d,p]);break}return n&&(I_[e][i]=n),n}function w_(t,i){return i&&(t=t.replace(/\{([^}]+)}/g,function(e,n){return i!=null&&n in i?i[n]:e})),t}function mo(t,i,e="-",n,r){let o="";
vendor: 4,372 bytes, line 11
11(t<0||r&&t<=0)&&(r?t=-t+1:(t=-t,o=e));let s=String(t);for(;s.length<i;)s="0"+s;return n&&(s=s.slice(s.length-i)),o+s}function y3(t,i){return mo(t,3).substring(0,i)}function An(t,i,e=0,n=!1,r=!1){return function(o,s){let a=b3(t,o);if((e>0||a>-e)&&(a+=e),t===3)a===0&&e===-12&&(a=12);else if(t===6)return y3(a,i);let l=df(s,Vs.MinusSign);return mo(a,i,l,n,r)}}function b3(t,i){switch(t){case 0:return i.getFullYear();case 1:return i.getMonth();case 2:return i.getDate();case 3:return i.getHours();case 4:return i.getMinutes();case 5:return i.getSeconds();case 6:return i.getMilliseconds();case 7:return i.getDay();default:throw new Z(2301,!1)}}function zt(t,i,e=ai.Format,n=!1){return function(r,o){return C3(r,o,t,i,e,n)}}function C3(t,i,e,n,r,o){switch(e){case 2:return MO(i,r,n)[t.getMonth()];case 1:return xO(i,r,n)[t.getDay()];case 0:let s=t.getHours(),a=t.getMinutes();if(o){let c=NO(i),d=kO(i,r,n),p=c.findIndex(y=>{if(Array.isArray(y)){let[b,T]=y,W=s>=b.hours&&a>=b.minutes,j=s<T.hours||s===T.hours&&a<T.minutes;if(b.hours<T.hours){if(W&&j)return!0}else if(W||j)return!0}else if(y.hours===s&&y.minutes===a)return!0;return!1});if(p!==-1)return d[p]}return RO(i,r,n)[s<12?0:1];case 3:return PO(i,n)[t.getFullYear()<=0?0:1];default:let l=e;throw new Z(2302,!1)}}function T_(t){return function(i,e,n){let r=-1*n,o=df(e,Vs.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(t){case 0:return(r>=0?"+":"")+mo(s,2,o)+mo(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+mo(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+mo(s,2,o)+":"+mo(Math.abs(r%60),2,o);case 3:return n===0?"Z":(r>=0?"+":"")+mo(s,2,o)+":"+mo(Math.abs(r%60),2,o);default:throw new Z(2310,!1)}}}var S3=0,A_=4;function E3(t){let i=R_(t,S3,1).getDay();return R_(t,0,1+(i<=A_?A_:A_+7)-i)}function FO(t){let i=t.getDay(),e=i===0?-3:A_-i;return R_(t.getFullYear(),t.getMonth(),t.getDate()+e)}function mE(t,i=!1){return function(e,n){let r;if(i){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{let o=FO(e),s=E3(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return mo(r,t,df(n,Vs.MinusSign))}}function D_(t,i=!1){return function(e,n){let o=FO(e).getFullYear();return mo(o,t,df(n,Vs.MinusSign),i)}}var gE={};function I3(t){if(gE[t])return gE[t];let i;switch(t){case"G":case"GG":case"GGG":i=zt(3,kt.Abbreviated);break;case"GGGG":i=zt(3,kt.Wide);break;case"GGGGG":i=zt(3,kt.Narrow);break;case"y":i=An(0,1,0,!1,!0);break;case"yy":i=An(0,2,0,!0,!0);break;case"yyy":i=An(0,3,0,!1,!0);break;case"yyyy":i=An(0,4,0,!1,!0);break;case"Y":i=D_(1);break;case"YY":i=D_(2,!0);break;case"YYY":i=D_(3);break;case"YYYY":i=D_(4);break;case"M":case"L":i=An(1,1,1);break;case"MM":case"LL":i=An(1,2,1);break;case"MMM":i=zt(2,kt.Abbreviated);break;case"MMMM":i=zt(2,kt.Wide);break;case"MMMMM":i=zt(2,kt.Narrow);break;case"LLL":i=zt(2,kt.Abbreviated,ai.Standalone);break;case"LLLL":i=zt(2,kt.Wide,ai.Standalone);break;case"LLLLL":i=zt(2,kt.Narrow,ai.Standalone);break;case"w":i=mE(1);break;case"ww":i=mE(2);break;case"W":i=mE(1,!0);break;case"d":i=An(2,1);break;case"dd":i=An(2,2);break;case"c":case"cc":i=An(7,1);break;case"ccc":i=zt(1,kt.Abbreviated,ai.Standalone);break;case"cccc":i=zt(1,kt.Wide,ai.Standalone);break;case"ccccc":i=zt(1,kt.Narrow,ai.Standalone);break;case"cccccc":i=zt(1,kt.Short,ai.Standalone);break;case"E":case"EE":case"EEE":i=zt(1,kt.Abbreviated);break;case"EEEE":i=zt(1,kt.Wide);break;case"EEEEE":i=zt(1,kt.Narrow);break;case"EEEEEE":i=zt(1,kt.Short);break;case"a":case"aa":case"aaa":i=zt(0,kt.Abbreviated);break;case"aaaa":i=zt(0,kt.Wide);break;case"aaaaa":i=zt(0,kt.Narrow);break;case"b":case"bb":case"bbb":i=zt(0,kt.Abbreviated,ai.Standalone,!0);break;case"bbbb":i=zt(0,kt.Wide,ai.Standalone,!0);break;case"bbbbb":i=zt(0,kt.Narrow,ai.Standalone,!0);break;case"B":case"BB":case"BBB":i=zt(0,kt.Abbreviated,ai.Format,!0);break;case"BBBB":i=zt(0,kt.Wide,ai.Format,!0);break;case"BBBBB":i=zt(0,kt.Narrow,ai.Format,!0);break;case"h":i=An(3,1,-12);break;case"hh":i=An(3,2,-12);break;case"H":i=An(3,1);break;case"HH":i=An(3,2);break;case"m":i=An(4,1);break;case"mm":i=An(4,2);break;case"s":i=An(5,1);break;case"ss":i=An(5,2);break;case"S":i=An(6,1);break;case"SS":i=An(6,2);break;case"SSS":i=An(6,3);break;case"Z":case"ZZ":case"ZZZ":i=T_(0);break;case"ZZZZZ":i=T_(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=T_(1);break;
vendor: 5,257 bytes, line 11
11case"OOOO":case"ZZZZ":case"zzzz":i=T_(2);break;default:return null}return gE[t]=i,i}function VO(t,i){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?i:e}function w3(t,i){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+i),t}function T3(t,i,e){let r=t.getTimezoneOffset(),o=VO(i,r);return w3(t,-1*(o-r))}function D3(t){if(TO(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[r,o=1,s=1]=t.split("-").map(a=>+a);return R_(r,o-1,s)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let n;if(n=t.match(_3))return A3(n)}let i=new Date(t);if(!TO(i))throw new Z(2311,!1);return i}function A3(t){let i=new Date(0),e=0,n=0,r=t[8]?i.setUTCFullYear:i.setFullYear,o=t[8]?i.setUTCHours:i.setHours;t[9]&&(e=Number(t[9]+t[10]),n=Number(t[9]+t[11])),r.call(i,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-e,a=Number(t[5]||0)-n,l=Number(t[6]||0),c=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return o.call(i,s,a,l,c),i}function TO(t){return t instanceof Date&&!isNaN(t.valueOf())}var _E=/\s+/,DO=[],ec=(()=>{class t{_ngEl;_renderer;initialClasses=DO;rawClass;stateMap=new Map;constructor(e,n){this._ngEl=e,this._renderer=n}set klass(e){this.initialClasses=e!=null?e.trim().split(_E):DO}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(_E):e}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let n of e)this._updateState(n,!0);else if(e!=null)for(let n of Object.keys(e))this._updateState(n,!!e[n]);this._applyStateDiff()}_updateState(e,n){let r=this.stateMap.get(e);r!==void 0?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let n=e[0],r=e[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(e,n){e=e.trim(),e.length>0&&e.split(_E).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(n){return new(n||t)(f(Cn),f(Zi))};static \u0275dir=Bt({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var Us=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,n,r){this._ngEl=e,this._differs=n,this._renderer=r}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){let[r,o]=e.split("."),s=r.indexOf("-")===-1?void 0:no.DashCase;n!=null?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${n}${o}`:n,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(n){return new(n||t)(f(Cn),f(SS),f(Zi))};static \u0275dir=Bt({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),R3=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=U(Ut);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(e,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||t)(f(Bo))};static \u0275dir=Bt({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Un]})}return t})();function x3(t,i){return new Z(2100,!1)}var M3="mediumDate",UO=new le(""),BO=new le(""),yE=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(e,n,r){this.locale=e,this.defaultTimezone=n,this.defaultOptions=r}transform(e,n,r,o){if(e==null||e===""||e!==e)return null;try{let s=n??this.defaultOptions?.dateFormat??M3,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return LO(e,s,o||this.locale,a)}catch(s){throw x3(t,s.message)}}static \u0275fac=function(n){return new(n||t)(f(Hp,16),f(UO,24),f(BO,24))};static \u0275pipe=kp({name:"date",type:t,pure:!0})}return t})();var Bs=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Ji({type:t});static \u0275inj=Ri({})}return t})();
11var CE="browser";function $Se(t){return t===CE}var SE=(()=>{class t{static \u0275prov=w({token:t,providedIn:"root",factory:()=>new bE(U(Yt),window)})}return t})(),bE=class{document;window;offset=()=>[0,0];constructor(i,e){this.document=i,this.window=e}setOffset(i){Array.isArray(i)?this.offset=()=>i:this.offset=i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i,e){this.window.scrollTo(ve(F({},e),{left:i[0],top:i[1]}))}scrollToAnchor(i,e){let n=O3(this.document,i);n&&(this.scrollToElement(n,e),n.focus())}setHistoryScrollRestoration(i){try{this.window.history.scrollRestoration=i}catch(e){console.warn(fr(2400,!1))}}scrollToElement(i,e){let n=i.getBoundingClientRect(),r=n.left+this.window.pageXOffset,o=n.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(ve(F({},e),{left:r-s[0],top:o-s[1]}))}};function O3(t,i){let e=t.getElementById(i)||t.getElementsByName(i)[0];if(e)return e;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),r=n.currentNode;for(;r;){let o=r.shadowRoot;if(o){let s=o.getElementById(i)||o.querySelector(`[name="${i}"]`);if(s)return s}r=n.nextNode()}}return null}var gt=(()=>{class t{constructor(){this.showDropdown=V(!1),this.clickedInside=!1}openDropdown(){this.showDropdown.set(!0)}onClickedInside(){this.clickedInside=!0}onClickedOutside(){!this.clickedInside&&this.showDropdown()&&this.hideDropdown(),this.clickedInside=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["ng-component"]],hostBindings:function(n,r){n&1&&A("click",function(){return r.onClickedInside()})("click",function(){return r.onClickedOutside()},Rp)},decls:0,vars:0,template:function(n,r){},encapsulation:2})}}return t})();var Mr=(()=>{class t{constructor(){this.selected=new Y}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-select-option"]],inputs:{title:"title",value:"value"},outputs:{selected:"selected"},decls:2,vars:1,consts:[[1,"select-option","font-label",3,"click"]],template:function(n,r){n&1&&(te(0,"div",0),qe("click",function(){return r.selected.emit(r.value)}),N(1),J()),n&2&&(u(),Q(r.title))},styles:[".select-option[_ngcontent-%COMP%]{padding:.22rem;width:100%;opacity:1;color:#fff}.select-option[_ngcontent-%COMP%]:hover{background:#fff6}"]})}}return t})();var N3=["dropdown"],k3=["*"];function L3(t,i){t&1&&(te(0,"div",3),ro(1),J())}var Yo=(()=>{class t extends gt{constructor(){super(...arguments),this.valueChange=new Y,this.title=""}set value(e){this.selectedValue=e,this.title=this.options?.find(n=>n.value===e)?.title??""}ngAfterContentInit(){if(this.title=this.options.find(e=>e.value===this.selectedValue)?.title??"",!this.title){let e=this.options.get(0);e&&(this.title=e.title,this.selectedValue=e.value)}this.options.forEach(e=>{e.selected.subscribe(n=>{this.valueChange.emit(n),this.hideDropdown()})})}hideDropdown(){this.showDropdown.set(!1)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=_r(t)))(r||t)}})()}static{this.\u0275cmp=D({type:t,selectors:[["app-select-button"]],contentQueries:function(n,r,o){if(n&1&&Ia(o,Mr,4),n&2){let s;be(s=Ce())&&(r.options=s)}},viewQuery:function(n,r){if(n&1&&Ve(N3,5),n&2){let o;be(o=Ce())&&(r.dropdown=o.first)}},inputs:{value:"value"},outputs:{valueChange:"valueChange"},features:[Ee],ngContentSelectors:k3,decls:5,vars:4,consts:[[1,"select-container","font-highlighted-label"],[1,"select-title",3,"click"],["src","./assets/theme/svg/dropdown_selected.svg",1,"select-icon"],[1,"select-dropdown"]],template:function(n,r){n&1&&(io(),te(0,"div",0)(1,"div",1),qe("click",function(){return r.showDropdown.set(!r.showDropdown())}),N(2),Qe(3,"img",2),J(),E(4,L3,2,0,"div",3),J()),n&2&&(u(2),ce(" ",r.title," "),u(),H("open",r.showDropdown()),u(),I(r.showDropdown()?4:-1))},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.select-container[_ngcontent-%COMP%]{position:relative;color:#ca7ef1;white-space:nowrap;cursor:pointer}.select-title[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.22rem;text-align:end}.select-icon[_ngcontent-%COMP%]{width:.875rem;height:.875rem;margin-left:.44rem}.select-icon.open[_ngcontent-%COMP%]{transform:scaleY(-1)}.select-dropdown[_ngcontent-%COMP%]{position:absolute;display:flex;flex-direction:column;background-color:#000b1c;border:1.6px solid rgba(255,255,255,.12);z-index:50;min-width:100%}"]})}}return t})();var Qo=(()=>{class t{constructor(){this.valueChange=new Y}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-toggle-button"]],inputs:{value:"value"},outputs:{valueChange:"valueChange"},decls:3,vars:3,consts:[[1,"toggle-button"],["type","checkbox",3,"change","checked"],[1,"toggle-slider"]],template:function(n,r){n&1&&(te(0,"label",0)(1,"input",1),qe("change",function(s){return r.valueChange.emit(s.target.checked)}),J(),Qe(2,"span",2),J()),n&2&&(H("enabled",r.value),u(),Gn("checked",r.value))},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.toggle-button[_ngcontent-%COMP%]{display:flex;justify-content:left;align-items:center;width:2.25rem;height:1.25rem;background-color:#ccc;border-radius:1.875rem;cursor:pointer;transition:.4s}.toggle-button[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{position:absolute;opacity:0;width:0;height:0}.toggle-button[_ngcontent-%COMP%]:focus-within{outline:2px solid #ca7ef1;outline-offset:1px}.toggle-button.enabled[_ngcontent-%COMP%]{background-color:#ca7ef1}.toggle-slider[_ngcontent-%COMP%]{height:1rem;width:1rem;margin-left:.125rem;border-radius:1.875rem;background-color:#fff;cursor:pointer;-webkit-transition:.4s;transition:.4s}.toggle-button.enabled[_ngcontent-%COMP%]   .toggle-slider[_ngcontent-%COMP%]{margin-left:1.125rem}"]})}}return t})();var O=(()=>{class t{constructor(e){this.business=e,this.config=this.business.client.bootstrap.config}getSettingString(e,n){return this.config.settingString(e,n)}getSettingBoolean(e,n){return this.config.settingBoolean(e,n)}getSettingNumber(e,n){return this.config.settingNumber(e,n)}getSettingArray(e,n,r){return this.config.settingArray(e,n,r)}getTranslation(e,n){return this.config.translation(e,n)}getContentDescription(e){return this.config.contentDescription(e)}getGenre(e){return this.config.genre(e)}getLocale(){return this.config.locale}getAnonymousSettings(){return this.config.anonymousSettings}static{this.\u0275fac=function(n){return new(n||t)(h(st))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function F3(t,i){if(t&1&&M(0,"app-select-option",3),t&2){let e=i.$implicit;S("title",e.title)("value",e.value)}}function V3(t,i){if(t&1){let e=B();m(0,"div",1)(1,"div"),N(2),g(),m(3,"app-select-button",2),xt("valueChange",function(r){k(e);let o=_();return Pt(o.options.type,r)||(o.options.type=r),L(r)}),X(4,F3,1,2,"app-select-option",3,se),g()()}if(t&2){let e=_();S("ngClass",e.itemClass),u(2),Q(e.episodesLabel),u(),Rt("value",e.options.type),u(),K(e.episodeOptions)}}function U3(t,i){if(t&1&&M(0,"app-select-option",3),t&2){let e=i.$implicit;S("title",e.title)("value",e.value)}}function B3(t,i){if(t&1){let e=B();m(0,"div",1)(1,"div"),N(2),g(),m(3,"app-select-button",2),xt("valueChange",function(r){k(e);let o=_();return Pt(o.options.beginBuffer,r)||(o.options.beginBuffer=r),L(r)}),X(4,U3,1,2,"app-select-option",3,se),g()()}if(t&2){let e=_();S("ngClass",e.itemClass),u(2),Q(e.beforeLabel),u(),Rt("value",e.options.beginBuffer),u(),K(e.beginBufferOptions)}}function j3(t,i){if(t&1&&M(0,"app-select-option",3),t&2){let e=i.$implicit;S("title",e.title)("value",e.value)}}
11function H3(t,i){if(t&1){let e=B();m(0,"div",1)(1,"div"),N(2),g(),m(3,"app-select-button",2),xt("valueChange",function(r){k(e);let o=_();return Pt(o.options.endBuffer,r)||(o.options.endBuffer=r),L(r)}),X(4,j3,1,2,"app-select-option",3,se),g()()}if(t&2){let e=_();S("ngClass",e.itemClass),u(2),Q(e.afterLabel),u(),Rt("value",e.options.endBuffer),u(),K(e.endBufferOptions)}}var EE=[0,3e5,6e5,9e5,12e5,18e5],Le=(function(t){return t.EPISODE="this_episode",t.SEASON="this_season",t.SERIES="this_series",t})(Le||{}),x_=(()=>{class t{constructor(e){this.config=e,this.confirm=new Y,this.cancel=new Y,this.episodesLabel="",this.beforeLabel="",this.afterLabel="",this.deleteProtectedLabel="",this.episodesLabel=e.getTranslation(pe.detail_recording_episodes),this.beforeLabel=e.getTranslation(pe.detail_recording_change_rec_option_before),this.afterLabel=e.getTranslation(pe.detail_recording_change_rec_option_after),this.deleteProtectedLabel=e.getTranslation(pe.detail_recording_delete_protected),this.episodeOptions=[{title:e.getTranslation(pe.detail_recording_this_episode),value:Le.EPISODE},{title:e.getTranslation(pe.detail_recording_this_season),value:Le.SEASON},{title:e.getTranslation(pe.detail_recording_this_series),value:Le.SERIES}],this.minutesLabel=this.config.getTranslation(pe.detail_duration_min),this.beginBufferOptions=this.getBufferOptions(x.recordingBeforeTimes),this.endBufferOptions=this.getBufferOptions(x.recordingAfterTimes)}getBufferOptions(e){return this.config.getSettingArray(e,r=>parseInt(r,10)*6e4,EE).map(r=>({value:r,title:this.getBufferLabel(r)}))}getBufferLabel(e){return`${e/6e4} ${this.minutesLabel}`}static{this.\u0275fac=function(n){return new(n||t)(f(O))}}static{this.\u0275cmp=D({type:t,selectors:[["app-recording-options"]],inputs:{options:"options",dropdownConfig:"dropdownConfig",itemClass:"itemClass"},outputs:{confirm:"confirm",cancel:"cancel"},decls:8,vars:6,consts:[[1,"font-label"],[3,"ngClass"],[3,"valueChange","value"],[3,"title","value"]],template:function(n,r){n&1&&(m(0,"div",0),E(1,V3,6,3,"div",1),E(2,B3,6,3,"div",1),E(3,H3,6,3,"div",1),m(4,"div",1)(5,"div"),N(6),g(),m(7,"app-toggle-button",2),xt("valueChange",function(s){return Pt(r.options.deleteProtected,s)||(r.options.deleteProtected=s),s}),g()()()),n&2&&(u(),I(r.dropdownConfig.showEpisodesSelection?1:-1),u(),I(r.dropdownConfig.showBufferSelection?2:-1),u(),I(r.dropdownConfig.showBufferSelection?3:-1),u(),S("ngClass",r.itemClass),u(2),Q(r.deleteProtectedLabel),u(),Rt("value",r.options.deleteProtected))},dependencies:[Bs,ec,Yo,Mr,Qo],encapsulation:2})}}return t})();var pf=class{constructor(i,e,n,r){this.id=$.guid(),this.category=i,this.timestamp=ie.utc().startOf("second").toISO({suppressMilliseconds:!0}),e&&(this.loginContext=e),n&&(this.pageContext=n),this.properties=r}},Yn=class{constructor(i){i&&(i.error&&(this.code=i.error.code,this.errorId=i.error.errorId,this.message=i.error.message||void 0,this.message&&this.message.length>255&&(this.message=this.message.substring(0,255)+"...")),i.error?.code||(this.code=`HTTP_ERROR_${i.status}`))}},Qt=class{constructor(i){Object.keys(i).map(e=>this[e]=i[e])}},Zt=(function(t){return t.vod_favorites="vod_favorites",t.vod_recommended="vod_recommended",t.vod_new="vod_new",t.vod_movies="vod_movies",t.vod_series="vod_series",t.vod_adult="vod_adult",t.vod_search="vod_search",t.epg_recent="epg_recent",t.epg_favorites="epg_favorites",t.epg_recommended="epg_recommended",t.epg_guide="epg_guide",t.epg_lists="epg_lists",t.epg_search="epg_search",t.replay_epg_recent="replay_epg_recent",t.replay_epg_favorites="replay_epg_favorites",t.replay_epg_recommended="replay_epg_recommended",t.replay_epg_guide="replay_epg_guide",t.replay_epg_lists="replay_epg_lists",t.replay_epg_search="replay_epg_search",t.vod_detail="vod_detail",t.vod_series_detail="vod_series_detail",t.epg_detail="epg_detail",t.epg_series_detail="epg_series_detail",t.recording_detail="recording_detail",t.videoplayer="videoplayer",t.search="search",t.login="login",t.splash="splash",t.home_menu="home_menu",t.home_menu_epg="home_menu_epg",t.home_menu_replay_epg="home_menu_replay_epg",t.home_menu_my_stuff="home_menu_my_stuff",t.home_menu_apps="home_menu_apps",t.home_menu_vod="home_menu_vod",t.home_menu_search="home_menu_search",t.settings="settings",t.my_stuff="my_stuff",t.my_stuff_recordings_planned="my_stuff_recordings_planned",t.my_stuff_recordings_recorded="my_stuff_recordings_recorded",t.my_stuff_recordings_expired="my_stuff_recordings_expired",t.my_stuff_recordings_conflict="my_stuff_recordings_conflict",t.my_stuff_recordings_series="my_stuff_recordings_series",t.my_stuff_favorites="my_stuff_favorites",t.my_stuff_reminders="my_stuff_reminders",t.my_stuff_client_area="my_stuff_client_area",t.my_stuff_client_area_subscriptions="my_stuff_client_area_subscriptions",t.my_stuff_client_area_active_subscriptions="my_stuff_client_area_active_subscriptions",t.my_stuff_client_area_inbox="my_stuff_client_area_inbox",t.my_stuff_media_center="my_stuff_media_center",t.my_stuff_search="my_stuff_search",t.my_stuff_channels="my_stuff_channels",t.my_stuff_settings="my_stuff_settings",t.app_app="app_app",t.tuner_info="tuner_info",t.article_detail="article_detail",t.bundle_detail="bundle_detail",t.autoplay_detail="autoplay_detail",t})(Zt||{}),v=class{constructor(i,e){this.name=i,this.value=e}};
11var Ua=class{constructor(i,e,n,r,o){e&&(this.programId=e.programId,this.seasonId=e.season?.seasonId,this.seriesId=e.series?.seriesId,this.name=e.name,this.channelId=e.channel.id,this.channelName=e.channel.name),i&&(this.deviceId=i.deviceId,this.beginBuffer=""+i.beginBuffer,this.endBuffer=""+i.endBuffer,this.deleteProtection=i.deleteProtected?"ON":"OFF",this.episodes=i.type),n&&(this.recordingId=n.identifier,this.programId=n.program,this.seasonId=n.season,this.seriesId=n.series,this.scheduleId=n.schedule,this.episodes=Le.EPISODE,this.deviceId=n.device,this.channelId=n.channel,this.type="PVR"),this.type=r&&this.deviceId===r.id?"NPVR":"PVR",i&&i.type===Le.EPISODE||o===Le.EPISODE?this.episodes=Le.EPISODE:i&&i.type===Le.SEASON||o===Le.SEASON?(this.episodes=Le.SEASON,this.programId=void 0,this.scheduleId=void 0,e?.series&&e.season&&(this.name=e.series.text.title+": Season "+e.season.seasonNumber)):(i&&i.type===Le.SERIES||o===Le.SERIES)&&(this.episodes=Le.SERIES,this.programId=void 0,this.scheduleId=void 0,this.seasonId=void 0)}},jO=class{constructor(i){Object.keys(i).map(e=>this[e]=i[e])}};var ff=(function(t){return t.NO_INTERACTION="NO_INTERACTION",t.CLOSE="CLOSE",t.MANUAL="MANUAL",t})(ff||{}),li=(function(t){return t.USER_INITIATED="USER_INITIATED",t.FINISHED="FINISHED",t.SCHEDULE_END="SCHEDULE_END",t.RESTART="RESTART",t.ERROR="ERROR",t.NO_INTERACTION="NO_INTERACTION",t})(li||{}),IE=(function(t){return t.CONTINUE_WATCHING="CONTINUE_WATCHING",t})(IE||{}),hf=(function(t){return t.ADD="ADD",t.EDIT="EDIT",t.DELETE="DELETE",t})(hf||{});var Te=(function(t){return t.client_events_buffer="client_events_buffer",t.client_events_failed_buffer="client_events_failed_buffer",t.user_analytics_allowed="user_analytics_allowed",t.preferred_video_rendition="preferred_video_rendition",t.player_volume="player_volume",t.player_muted="player_muted",t.player_last_channel="player_last_channel",t.preferred_channel_audio_language="preferred_channel_audio_language",t.preferred_channel_text_language="preferred_channel_text_language",t.ACTIVE_TAB_BEACON="ACTIVE_TAB_BEACON",t.version_current="version_current",t.version_check_time="version_check_time",t.anonymous_device_id="anonymous_device_id",t.auth_device_id="auth_device_id",t.refreshing_token="refreshing_token",t.user_identity_provider="user_identity_provider",t})(Te||{});var $3=["*"],Pr=(()=>{class t{constructor(){this.active=!1,this.danger=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-generic-button"]],inputs:{active:"active",danger:"danger"},ngContentSelectors:$3,decls:2,vars:6,consts:[["type","button",1,"button-title","font-button"]],template:function(n,r){n&1&&(io(),te(0,"button",0),ro(1),J()),n&2&&H("normal",!r.active)("active",r.active)("danger",r.danger)},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.button-title[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;padding:.5rem 1rem;border-radius:2rem;border:2px solid white}.button-title[_ngcontent-%COMP%]:focus-visible{outline:2px solid #ca7ef1;outline-offset:2px}.button-title.normal[_ngcontent-%COMP%]{border-color:#fff}.button-title.normal[_ngcontent-%COMP%]:hover{background-color:#353535cc}.button-title.active[_ngcontent-%COMP%]{color:#000;background-color:var(--button-background, #ca7ef1);border-color:var(--button-background, #ca7ef1)}.button-title.danger[_ngcontent-%COMP%]{color:#f03b3b;border-color:#f03b3b}.button-title.danger.active[_ngcontent-%COMP%]{color:#000;background-color:#f03b3b;border-color:#f03b3b}"]})}}return t})();function G3(t,i){if(t&1&&M(0,"img",1),t&2){let e=_();S("src",e.icon,Je)}}var Ke=(()=>{class t{constructor(){this.icon="",this.active=!1,this.danger=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-text-button"]],inputs:{icon:"icon",label:"label",active:"active",danger:"danger"},decls:4,vars:4,consts:[[3,"active","danger"],[1,"button-icon",3,"src"],[1,"tabular-nums"]],template:function(n,r){n&1&&(m(0,"app-generic-button",0),E(1,G3,1,1,"img",1),m(2,"div",2),N(3),g()()),n&2&&(S("active",r.active)("danger",r.danger),u(),I(r.icon?1:-1),u(2),Q(r.label))},dependencies:[Pr],styles:[".button-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem;margin-right:.5rem}.tabular-nums[_ngcontent-%COMP%]{font-variant-numeric:tabular-nums}"]})}}return t})();var Or=(()=>{class t{constructor(e,n,r){this.business=e,this.http=n,this.apiClient=r,this.location=this.business.client.bootstrap.discovery.location,this.aaApi=new dh(this.apiClient)}getAllCustomerProfiles(){let e=this.business.client.bootstrap.discovery.location;return this.http.get(`${e}
11/aa/v1/profile`)}getAllCatalogs(){return this.http.get(`${this.location}/aa/v1/catalog`)}getBaseProfileForDevice(e){return this.http.get(`${this.location}/aa/v1/device/${encodeURIComponent(e)}/profile`)}switchProfile(e,n){return this.http.put(`${this.location}/aa/v1/device/${encodeURIComponent(e)}/profile/${encodeURIComponent(n)}`,{})}getProfile(e){return this.http.get(`${this.location}/aa/v1/profile/${encodeURIComponent(e)}`)}createProfile(e){return this.http.post(`${this.location}/aa/v1/profile`,e)}editProfile(e,n){return this.http.put(`${this.location}/aa/v1/profile/${encodeURIComponent(e)}`,n)}deleteProfile(e){return this.http.delete(`${this.location}/aa/v1/profile/${encodeURIComponent(e)}`)}getProfileForDevice(e,n){return this.http.get(`${this.location}/aa/v1/device/${encodeURIComponent(e)}/profile/${encodeURIComponent(n)}`)}getAvatars(){return this.http.get(`${this.location}/aa/v1/avatar`)}registerChromecastDevice(e){return this.http.post(`${this.location}/aa/v1/cast-device`,e)}loginDevice(e){return re(this.aaApi.loginDevice(e))}identityProviders(e){return re(this.aaApi.getAllIdentityProviders(e))}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(on),h(Ni))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ba=(()=>{class t{constructor(e,n,r){this.business=e,this.http=n,this.apiClient=r,this.location=this.business.client.bootstrap.discovery.location,this.apiApi=new Ic(this.apiClient)}getSession(){let e=new mt().append("appVersion",co.version);return this.http.get(`${this.location}/api/v4/session`,{observe:"response",params:e})}getSessionV5(e){return re(this.apiApi.getSession(e))}deleteSession(){return this.http.delete(`${this.location}/api/v3/session`)}sendSessionTerminateBeacon(e){return navigator.sendBeacon(`${this.location}/api/v3/session/terminate`,JSON.stringify(e))}swipe(e,n){return re(this.apiApi.swipe(e,n))}pollSwipe(e){return re(this.apiApi.getSwipeResponse(e))}checkPincode(e){return this.http.post(`${this.location}/api/v1/pincode`,e)}changePincode(e){return this.http.put(`${this.location}/api/v1/pincode`,e)}log(e){return this.http.post(`${this.location}/api/v1/log`,e)}sendLogBeacon(e){return navigator.sendBeacon(`${this.location}/api/v1/log`,JSON.stringify(e))}getServerTime(){return this.http.get(`${this.location}/api/v1/time`)}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(on),h(Ni))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ja=(()=>{class t{constructor(e,n){this.zone=e,this.apiApi=n,this.activeTabBeaconInterval=6e4,this.logoutChannel=new BroadcastChannel("atv_logout"),this.logoutChannel.onmessage=()=>{console.error("No logout action set")},this.activeSessionChannel=new BroadcastChannel("atv_active_session"),this.activeSessionChannel.onmessage=()=>{console.error("No active session action set")},this.sessionRequestChannel=new BroadcastChannel("atv_session_request"),this.sessionRequestChannel.onmessage=()=>{console.error("No session request action set")},this.loginProviderChannel=new BroadcastChannel("atv_login_provider"),this.loginProviderChannel.onmessage=()=>{console.error("No login provider action set")},this.providerIdTokenChannel=new BroadcastChannel("atv_provider_id_token"),this.providerIdTokenChannel.onmessage=()=>{console.error("No provider id token action set")},this.uniqueId=window.crypto.getRandomValues(new Uint8Array(16)).join("")}broadcastLogout(){this.logoutChannel.postMessage({})}setLogoutAction(e){this.logoutChannel.onmessage=()=>this.zone.run(e)}broadcastActiveToken(e){}broadcastActiveSession(e){this.activeSessionChannel.postMessage(e)}broadcastLoginProvider(e){this.loginProviderChannel.postMessage(e)}broadcastProviderIdToken(e){this.providerIdTokenChannel.postMessage(e)}setActiveTokenAction(e){this.activeSessionChannel.onmessage=n=>{this.zone.run(()=>e(n.data)),this.startupSessionListener&&(this.startupSessionListener.next(!0),this.startupSessionListener=void 0),this.headlessLoginListener&&(this.headlessLoginListener.next(!0),this.headlessLoginListener=void 0)}}setActiveSessionAction(e){this.activeSessionChannel.onmessage=n=>{this.zone.run(()=>e(n.data)),this.startupSessionListener&&(this.startupSessionListener.next(!0),this.startupSessionListener=void 0),this.headlessLoginListener&&(this.headlessLoginListener.next(!0),this.headlessLoginListener=void 0)}}setSessionRequestAction(e){this.sessionRequestChannel.onmessage=()=>this.zone.run(e)}requestSessionBroadcast(){return this.activeTabBeaconCount()<=1?C(!1):lm($i(1e3).pipe(P(()=>!1)),new Re(e=>{this.startupSessionListener=e,this.sessionRequestChannel.postMessage({})})).pipe(we(()=>{this.startupSessionListener?.unsubscribe(),this.startupSessionListener=void 0}))}waitHeadlessLogin(){return this.activeTabBeaconCount()<=1?C(!1):lm($i(1e3).pipe(P(()=>!1)),new Re(e=>{this.headlessLoginListener=e})).pipe(we(()=>{this.headlessLoginListener?.unsubscribe(),this.headlessLoginListener=void 0}))}setLoginProviderAction(e){this.loginProviderChannel.onmessage=n=>{this.zone.run(()=>e(n.data))}}setProviderIdTokenAction(e){this.providerIdTokenChannel.onmessage=n=>{this.zone.run(()=>e(n.data))}}startActiveTabBeacon(){this.activeTabSubscription?.unsubscribe(),this.activeTabSubscription=$i(0,this.activeTabBeaconInterval).subscribe(()=>{localStorage.setItem(`${Te.ACTIVE_TAB_BEACON}-${this.uniqueId}`,String(new Date().getTime()))})}stopActiveTabBeacon(e){this.activeTabSubscription?.unsubscribe(),localStorage.removeItem(`${Te.ACTIVE_TAB_BEACON}-${this.uniqueId}`),this.activeTabBeaconCount()===0&&e&&this.apiApi.sendSessionTerminateBeacon(e)}activeTabBeaconCount(){let e=Object.keys(localStorage).filter(r=>r.startsWith(Te.ACTIVE_TAB_BEACON)),n=new Date().getTime()-2*this.activeTabBeaconInterval;return e.filter(r=>parseInt(localStorage.getItem(r)??"0",10)<n?(localStorage.removeItem(r),!1):!0).length}isMasterTab(){let e=Object.keys(localStorage).filter(o=>o.startsWith(Te.ACTIVE_TAB_BEACON)),n,r;return e.forEach(o=>{let s=localStorage.getItem(o);if(!s)return;let a=parseInt(s,10);n?a>r&&(r=a,n=o):(n=o,r=a)}),n===`${Te.ACTIVE_TAB_BEACON}-${this.uniqueId}`}static{this.\u0275fac=function(n){return new(n||t)(h(ut),h(Ba))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var HO=(()=>{class t{constructor(e,n){this.http=e,this.location=n.oauthServiceLocation}token(){return this.http.get(`${this.location}/api/login/v1/token`,{withCredentials:!0})}refresh(){return this.http.post(`${this.location}/api/login/v1/refresh`,{},{withCredentials:!0})}login(e){return this.http.post(`${this.location}/api/login/v1/login`,e,{withCredentials:!0})}logout(){return this.http.post(`${this.location}/api/login/v1/logout`,{},{withCredentials:!0})}static{this.\u0275fac=function(n){return new(n||t)(h(on),h(ae))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Md=(()=>{class t{constructor(e,n,r,o,s){this.aaApi=e,this.environment=n,this.tokenCommunication=r,this.config=o,this.loginApi=s,this.providers=[],this.selectBroadcastProvider=a=>{this.loadProviders().subscribe({next:l=>
11{let c=l.find(d=>d.providerId===a);c&&this.selectProvider(c,!1)}})},this.tokenCommunication.setLoginProviderAction(this.selectBroadcastProvider)}loadProviders(){return this.aaApi.identityProviders(this.environment.platform).pipe(z(()=>{throw this.throwProviderError()}),P(e=>{if(e.length===0)throw this.throwProviderError();return this.providers=e,e}))}selectInitialProvider(){let e=localStorage.getItem(Te.user_identity_provider),n;return e&&(n=this.providers.find(r=>r.providerId===e)),n||(n=this.autoSelectProvider(this.providers)),n&&this.selectProvider(n),!!n}autoSelectProvider(e){let n=this.config.getSettingString(x.defaultIdentityProviderId,"");e||(e=this.providers);let r;return n&&(r=e.find(o=>o.providerId===n)),!r&&e.length===1&&(r=e[0]),r}selectProvider(e,n=!0){localStorage.setItem(Te.user_identity_provider,e.providerId),n&&this.tokenCommunication.broadcastLoginProvider(e.providerId),this.activeProvider=e}clearActiveProvider(){this.activeProvider=void 0,localStorage.removeItem(Te.user_identity_provider)}silentRefresh(){return this.loginApi.refresh().pipe(P(e=>({token_type:"bearer",access_token:e.accessToken})))}buildAuthorizationUrl(){if(!this.activeProvider)throw new Error("[BFF] - No active provider");return this.loginApi.login({platform:this.environment.platform,providerId:this.activeProvider.providerId,redirectUri:this.environment.oauthRedirectUri}).pipe(P(e=>e.redirectUri))}fetchTokenAfterLogin(){return this.loginApi.token().pipe(P(e=>({token_type:"bearer",access_token:e.accessToken})))}logoutWithProvider(){return this.loginApi.logout().pipe(P(e=>e.redirectUri))}activeProviderIsLocal(){return!!this.activeProvider&&this.activeProvider.providerType===Zy.LOCAL}throwProviderError(){return new Ad({code:ge.error_identity_providers,errorId:"",message:"No providers found."})}static{this.\u0275fac=function(n){return new(n||t)(h(Or),h(ae),h(ja),h(O),h(HO))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Zo=class{constructor(){this.closable=!0,this.dismissableMask=!1}};var ir=(function(t){return t.login_succes_redirect_url="login_succes_redirect_url",t.login_succes_redirect_params="login_succes_redirect_params",t.login_succes_redirect_route="login_succes_redirect_route",t.auth_state="auth_state",t.auth_code_verifier="auth_code_verifier",t.anonymous_catalog="anonymous_catalog",t})(ir||{});var O_=(()=>{class t{save(e){if(e.url.length===0)return;let n={params:e.queryParams,url:e.url.join("/")};this.saveRedirect(n)}redirectUrl(){let e=sessionStorage.getItem(ir.login_succes_redirect_route)||"",n=e?JSON.parse(e):this.savedRoute??{};return sessionStorage.removeItem(ir.login_succes_redirect_route),this.savedRoute=void 0,n}updateCurrent(e){e.startsWith("/")&&(e=e.slice(1));let n=e.indexOf(":detail");n>=0&&(e=e.slice(n+1,-1));let r=e.split("?"),o=[];r.length>1&&(o=r[1].split("&"));let s={};o.forEach(a=>{let l=a.split("=");s[l[0]]=l[1]}),this.currentRoute={url:r[0],params:s}}saveCurrent(){this.currentRoute&&this.saveRedirect(this.currentRoute)}saveRedirect(e){sessionStorage.getItem(ir.login_succes_redirect_route)==null&&this.savedRoute===void 0&&(sessionStorage.setItem(ir.login_succes_redirect_route,JSON.stringify(e)),this.savedRoute=e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Pd=(function(t){return t[t.ERROR=0]="ERROR",t[t.WARNING=1]="WARNING",t[t.INFO=2]="INFO",t[t.SUCCESS=3]="SUCCESS",t})(Pd||{}),nc=class{constructor(i,e,n=!0){this.type=i,this.message=e,this.dissipate=n}};var _e=(()=>{class t{showErrorMessage(e){this.newMessageEvent.emit(new nc(Pd.ERROR,e))}showWarningMessage(e){this.newMessageEvent.emit(new nc(Pd.WARNING,e))}showInfoMessage(e,n){this.newMessageEvent.emit(new nc(Pd.INFO,e,n))}showSuccessMessage(e){this.newMessageEvent.emit(new nc(Pd.SUCCESS,e))}constructor(){this.newMessageEvent=new Y}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var go=class{constructor(){this._onClose=new wn(1),this.onClose=this._onClose.asObservable()}close(i){this._onClose.next(i)}};var z3=(t,i)=>i.providerId;function q3(t,i){t&1&&(m(0,"div",1),M(1,"div")(2,"div")(3,"div")(4,"div"),g())}function Y3(t,i){if(t&1){let e=B();m(0,"app-text-button",3),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.loginWithProvider(r))}),g()}if(t&2){let e=i.$implicit;S("label",e.providerName)}}function Q3(t,i){if(t&1&&X(0,Y3,1,1,"app-text-button",2,z3),t&2){let e=_();K(e.providers())}}var RE=(()=>{class t{static config(e,n=!0){return{dismissableMask:!0,closable:!0,data:{snapshot:e,saveSnapshot:n}}}constructor(e,n,r,o,s,a){this.bff=e,this.dlgConfig=n,this.redirect=r,this.messages=o,this.config=s,this.dlgRef=a,this.loading=V(!0),this.providers=V([]),this.saveSnapshot=!0}ngOnInit(){this.snapshot=this.dlgConfig.data?.snapshot,this.saveSnapshot=this.dlgConfig.data?.saveSnapshot??!0,this.bff.loadProviders().subscribe({next:e=>{this.providers.set(e),this.loading.set(!1);let n=this.bff.autoSelectProvider(e);n&&this.loginWithProvider(n)},error:e=>{console.error("[Provider Select] - failed to load providers",e),this.dlgRef.close(),this.showErrorMessage(e.error?.code)}})}loginWithProvider(e){this.loading.set(!0),this.bff.selectProvider(e),this.saveSnapshot&&(this.snapshot?this.redirect.save(this.snapshot):this.redirect.saveCurrent()),this.bff.buildAuthorizationUrl().subscribe({next:n=>{location.href=n},error:n=>{console.error("[Provider Select] - failed to create redirect URL",n),this.showErrorMessage(),this.loading.set(!1)}})}showErrorMessage(e){this.messages.showErrorMessage(this.config.getTranslation(e??"",ge.error_authentication_failed))}static{this.\u0275fac=function(n){return new(n||t)(f(Md),f(Zo),f(O_),f(_e),f(O),f(go))}}static{this.\u0275cmp=D({type:t,selectors:[["app-login-provider-dialog"]],decls:3,vars:2,consts:[[1,"provider-container"],[1,"lds-ellipsis"],[3,"label"],[3,"click","label"]],template:function(n,r){n&1&&(m(0,"div",0),E(1,q3,5,0,"div",1),E(2,Q3,2,0),g()),n&2&&(u(),I(r.loading()?1:-1),u(),I(r.loading()?-1:2))},dependencies:[Ke],styles:[".provider-container[_ngcontent-%COMP%]{min-width:10rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}"]})}}return t})();var et=(()=>{class t{constructor(e,n,r,o){this.config=e,this.tokenCommunication=n,this.bff=r,this.messages=o,this.unauthenticatedUse=!1,this.lastRefresh=new Date,this.allowUnauthenticatedUse=this.config.getSettingBoolean(x.allowUnauthenticatedUse,!1)}startupLogin(){return this.configureInitialProvider().pipe(fe(()=>this.requestSessionFromTabs()),fe(e=>e?C(e):this.waitOtherHeadlessLogin()),fe(e=>e?C(e):this.saveTokenFromSilentLogin()),fe(e=>e?C({success:e}):this.autoRedirectToLogin().pipe(P(n=>({success:!1,redirectTo:n})))),z(e=>{if(this.switchToUnauthorized())return C({success:!0});throw e}))}handleOauthResult(e){let n=this.handleOauthError(e);
11if(n){if(this.switchToUnauthorized())return C(void 0);throw n}return this.configureInitialProvider().pipe(fe(()=>this.bff.fetchTokenAfterLogin()),P(r=>{this.setLoginAuthorization(r.token_type,r.access_token)}),z(r=>{if(this.messages.showErrorMessage(this.config.getTranslation(r?.error?.code??"",ge.error_authentication_failed)),this.switchToUnauthorized())return C(void 0);throw r}))}setAuthorizationFromSession(e,n){this.sessionToken!==e&&this.setSessionAuthorization("Bearer",e,!n)}isLoggedIn(){return this.loginTokenType!==void 0&&this.loginToken!==void 0}isAuthorized(){return this.sessionTokenType!==void 0&&this.sessionToken!==void 0}getAuthorization(){if(this.sessionTokenType&&this.sessionToken)return this.sessionTokenType+" "+this.sessionToken}getLoginToken(){return this.loginToken??""}getSessionToken(){return this.sessionToken??""}refreshToken(){let e=this.lastRefresh;localStorage.setItem(Te.refreshing_token,JSON.stringify(!0));let n=this.silentLogin().pipe(fe(r=>(this.lastRefresh<=e&&this.setLoginAuthorization(r.token_type,r.access_token),C(0))));return Cs(n).then(()=>{})}setBroadcastedToken(e){return this.sessionToken===e?!1:(this.setAuthorizationFromSession(e,!0),!0)}deleteTokens(){return this.loginTokenType=void 0,this.loginToken=void 0,this.sessionTokenType=void 0,this.sessionToken=void 0,this.switchToUnauthorized()}logout(e=!0){e?this.bff.clearActiveProvider():(this.bff.clearActiveProvider(),this.tokenCommunication.broadcastLogout(),this.bff.logoutWithProvider().subscribe({next:n=>{location.href=n}}))}handleOauthError(e){let n=e.searchParams.get("error");if(n)return this.messages.showErrorMessage(this.config.getTranslation(n??"",ge.error_authentication_failed)),new Ad({message:n,code:n,errorId:""})}configureInitialProvider(){return this.bff.loadProviders().pipe(P(()=>this.bff.selectInitialProvider()))}requestSessionFromTabs(){return this.tokenCommunication.requestSessionBroadcast()}waitOtherHeadlessLogin(){return localStorage.getItem(Te.refreshing_token)?this.tokenCommunication.waitHeadlessLogin():C(!1)}saveTokenFromSilentLogin(){return localStorage.setItem(Te.refreshing_token,JSON.stringify(!0)),this.bff.selectInitialProvider()?this.silentLogin().pipe(P(n=>(this.setLoginAuthorization(n.token_type,n.access_token),!0)),z(()=>C(this.switchToUnauthorized()))):C(this.switchToUnauthorized())}autoRedirectToLogin(){let e=this.bff.autoSelectProvider();return e?(this.bff.selectProvider(e),this.bff.buildAuthorizationUrl().pipe(z(()=>C("")))):C("")}switchToUnauthorized(){return this.allowUnauthenticatedUse&&(this.unauthenticatedUse=!0),this.unauthenticatedUse}silentLogin(){return localStorage.setItem(Te.refreshing_token,JSON.stringify(!0)),this.bff.silentRefresh()}setLoginAuthorization(e,n){this.loginTokenType=e,this.loginToken=n,this.lastRefresh=new Date}setSessionAuthorization(e,n,r=!0){this.sessionTokenType=e,this.sessionToken=n,r&&this.tokenCommunication.broadcastActiveToken({access_token:n,token_type:e})}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(ja),h(Md),h(_e))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mf=class{_doc;constructor(i){this._doc=i}manager},N_=(()=>{class t extends mf{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,r,o){return e.addEventListener(n,r,o),()=>this.removeEventListener(e,n,r,o)}removeEventListener(e,n,r,o){return e.removeEventListener(n,r,o)}static \u0275fac=function(n){return new(n||t)(h(Yt))};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),F_=new le(""),OE=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(s=>{s.manager=this});let r=e.filter(s=>!(s instanceof N_));this._plugins=r.slice().reverse();let o=e.find(s=>s instanceof N_);o&&this._plugins.push(o)}addEventListener(e,n,r,o){return this._findPluginFor(n).addEventListener(e,n,r,o)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new Z(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||t)(h(F_),h(ut))};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),xE="ng-app-id";function GO(t){for(let i of t)i.remove()}function WO(t,i){let e=i.createElement("style");return e.textContent=t,e}function Z3(t,i,e,n){let r=t.head?.querySelectorAll(`style[${xE}="${i}"],link[${xE}="${i}"]`);if(r)for(let o of r)o.removeAttribute(xE),o instanceof HTMLLinkElement?n.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function PE(t,i){let e=i.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var NE=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,n,r,o={}){this.doc=e,this.appId=n,this.nonce=r,Z3(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let r of e)this.addUsage(r,this.inline,WO);n?.forEach(r=>this.addUsage(r,this.external,PE))}removeStyles(e,n){for(let r of e)this.removeUsage(r,this.inline);n?.forEach(r=>this.removeUsage(r,this.external))}addUsage(e,n,r){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(e,this.doc)))})}removeUsage(e,n){let r=n.get(e);r&&(r.usage--,r.usage<=0&&(GO(r.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])GO(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(e,WO(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(e,PE(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),e.appendChild(n)}static \u0275fac=function(n){return new(n||t)(h(Yt),h(vg),h(bg,8),h(Tp))};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),ME={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},kE=/%COMP%/g;var qO="%COMP%",J3=`_nghost-${qO}`,X3=`_ngcontent-${qO}`,K3=!0,eG=new le("",{factory:()=>K3});function tG(t){return X3.replace(kE,t)}function nG(t){return J3.replace(kE,t)}function YO(t,i){return i.map(e=>e.replace(kE,t))}var LE=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,n,r,o,s,a,l=null,c=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.defaultRenderer=new gf(e,s,a,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(e,n);return r instanceof L_?r.applyToHost(e):r instanceof _f&&r.applyStyles(),r}getOrCreateRenderer(e,n){let r=this.rendererByCompId,o=r.get(n.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,p=this.tracingService;switch(n.encapsulation){case to.Emulated:o=new L_(l,c,n,this.appId,d,s,a,p);break;case to.ShadowDom:return new k_(l,e,n,s,a,this.nonce,p,c);case to.ExperimentalIsolatedShadowDom:return new k_(l,e,n,s,a,this.nonce,p);default:o=new _f(l,c,n,d,s,a,p);break}r.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||t)(h(OE),h(NE),h(vg),h(eG),h(Yt),h(ut),h(bg),h(Uo,8))};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),gf=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;
vendor: 2,900 bytes, line 11
11constructor(i,e,n,r){this.eventManager=i,this.doc=e,this.ngZone=n,this.tracingService=r}destroy(){}destroyNode=null;createElement(i,e){return e?this.doc.createElementNS(ME[e]||e,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,e){(zO(i)?i.content:i).appendChild(e)}insertBefore(i,e,n){i&&(zO(i)?i.content:i).insertBefore(e,n)}removeChild(i,e){e.remove()}selectRootElement(i,e){let n=typeof i=="string"?this.doc.querySelector(i):i;if(!n)throw new Z(-5104,!1);return e||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,e,n,r){if(r){e=r+":"+e;let o=ME[r];o?i.setAttributeNS(o,e,n):i.setAttribute(e,n)}else i.setAttribute(e,n)}removeAttribute(i,e,n){if(n){let r=ME[n];r?i.removeAttributeNS(r,e):i.removeAttribute(`${n}:${e}`)}else i.removeAttribute(e)}addClass(i,e){i.classList.add(e)}removeClass(i,e){i.classList.remove(e)}setStyle(i,e,n,r){r&(no.DashCase|no.Important)?i.style.setProperty(e,n,r&no.Important?"important":""):i.style[e]=n}removeStyle(i,e,n){n&no.DashCase?i.style.removeProperty(e):i.style[e]=""}setProperty(i,e,n){i!=null&&(i[e]=n)}setValue(i,e){i.nodeValue=e}listen(i,e,n,r){if(typeof i=="string"&&(i=Pi().getGlobalEventTarget(this.doc,i),!i))throw new Z(5102,!1);let o=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(i,e,o)),this.eventManager.addEventListener(i,e,o,r)}decoratePreventDefault(i){return e=>{if(e==="__ngUnwrap__")return i;i(e)===!1&&e.preventDefault()}}};function zO(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var k_=class extends gf{hostEl;sharedStylesHost;shadowRoot;constructor(i,e,n,r,o,s,a,l){super(i,r,o,a),this.hostEl=e,this.sharedStylesHost=l,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=YO(n.id,c);for(let p of c){let y=document.createElement("style");s&&y.setAttribute("nonce",s),y.textContent=p,this.shadowRoot.appendChild(y)}let d=n.getExternalStyles?.();if(d)for(let p of d){let y=PE(p,r);s&&y.setAttribute("nonce",s),this.shadowRoot.appendChild(y)}}nodeOrShadowRoot(i){return i===this.hostEl?this.shadowRoot:i}appendChild(i,e){return super.appendChild(this.nodeOrShadowRoot(i),e)}insertBefore(i,e,n){return super.insertBefore(this.nodeOrShadowRoot(i),e,n)}removeChild(i,e){return super.removeChild(null,e)}parentNode(i){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(i)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},_f=class extends gf{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(i,e,n,r,o,s,a,l){super(i,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?YO(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}
vendor: 4,727 bytes, line 11
11applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ba.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},L_=class extends _f{contentAttr;hostAttr;constructor(i,e,n,r,o,s,a,l){let c=r+"-"+n.id;super(i,e,n,o,s,a,l,c),this.contentAttr=tG(c),this.hostAttr=nG(c)}applyToHost(i){this.applyStyles(),this.setAttribute(i,this.hostAttr,"")}createElement(i,e){let n=super.createElement(i,e);return super.setAttribute(n,this.contentAttr,""),n}};var V_=class t extends zp{supportsDOMEvents=!0;static makeCurrent(){ES(new t)}onAndCancel(i,e,n,r){return i.addEventListener(e,n,r),()=>{i.removeEventListener(e,n,r)}}dispatchEvent(i,e){i.dispatchEvent(e)}remove(i){i.remove()}createElement(i,e){return e=e||this.getDefaultDocument(),e.createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,e){return e==="window"?window:e==="document"?i:e==="body"?i.body:null}getBaseHref(i){let e=iG();return e==null?null:rG(e)}resetBaseElement(){vf=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return Wp(document.cookie,i)}},vf=null;function iG(){return vf=vf||document.head.querySelector("base"),vf?vf.getAttribute("href"):null}function rG(t){return new URL(t,document.baseURI).pathname}var U_=class{addToWindow(i){Fn.getAngularTestability=(n,r=!0)=>{let o=i.findTestabilityInTree(n,r);if(o==null)throw new Z(5103,!1);return o},Fn.getAllAngularTestabilities=()=>i.getAllTestabilities(),Fn.getAllAngularRootElements=()=>i.getAllRootElements();let e=n=>{let r=Fn.getAllAngularTestabilities(),o=r.length,s=function(){o--,o==0&&n()};r.forEach(a=>{a.whenStable(s)})};Fn.frameworkStabilizers||(Fn.frameworkStabilizers=[]),Fn.frameworkStabilizers.push(e)}findTestabilityInTree(i,e,n){if(e==null)return null;let r=i.getTestability(e);return r??(n?Pi().isShadowRoot(e)?this.findTestabilityInTree(i,e.host,!0):this.findTestabilityInTree(i,e.parentElement,!0):null)}},oG=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),QO=["alt","control","meta","shift"],sG={"\b":"Backspace","	":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},aG={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},ZO=(()=>{class t extends mf{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,n,r,o){let s=t.parseEventName(n),a=t.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Pi().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let n=e.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let o=t._normalizeKey(n.pop()),s="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),s="code."),QO.forEach(c=>{let d=n.indexOf(c);d>-1&&(n.splice(d,1),s+=c+".")}),s+=o,n.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,n){let r=sG[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(r=e.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),QO.forEach(s=>{if(s!==r){let a=aG[s];a(e)&&(o+=s+".")}}),o+=r,o===n)}static eventCallback(e,n,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||t)(h(Yt))};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})();function lG(t,i,e){return Vt(this,null,function*(){let n=F({rootComponent:t},cG(i,e));return OM(n)})}function cG(t,i){return{platformRef:i?.platformRef,appProviders:[...JO,...t?.providers??[]],platformProviders:fG}}function dG(){V_.makeCurrent()}function uG(){return new pr}function pG(){return EC(document),document}var fG=[{provide:Tp,useValue:CE},{provide:yg,useValue:dG,multi:!0},{provide:Yt,useFactory:pG}];var hG=[{provide:Ug,useClass:U_},{provide:Vg,useClass:Lp},{provide:Lp,useClass:Lp}],JO=[{provide:ip,useValue:"root"},{provide:pr,useFactory:uG},{provide:F_,useClass:N_,multi:!0},{provide:F_,useClass:ZO,multi:!0},LE,NE,OE,{provide:jl,useExisting:LE},{provide:ql,useClass:oG},[]],mG=(()=>{class t{constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275mod=Ji({type:t});static \u0275inj=Ri({providers:[...JO,...hG],imports:[Bs,PM]})}return t})();var XO=(()=>{class t{_doc;_dom;
11constructor(e){this._doc=e,this._dom=Pi()}addTag(e,n=!1){return e?this._getOrCreateElement(e,n):null}addTags(e,n=!1){return e?e.reduce((r,o)=>(o&&r.push(this._getOrCreateElement(o,n)),r),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];let n=this._doc.querySelectorAll(`meta[${e}]`);return n?[].slice.call(n):[]}updateTag(e,n){if(!e)return null;n=n||this._parseSelector(e);let r=this.getTag(n);return r?this._setMetaElementAttributes(e,r):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,n=!1){if(!n){let s=this._parseSelector(e),a=this.getTags(s).filter(l=>this._containsAttributes(e,l))[0];if(a!==void 0)return a}let r=this._dom.createElement("meta");return this._setMetaElementAttributes(e,r),this._doc.getElementsByTagName("head")[0].appendChild(r),r}_setMetaElementAttributes(e,n){return Object.keys(e).forEach(r=>n.setAttribute(this._getMetaKeyMap(r),e[r])),n}_parseSelector(e){let n=e.name?"name":"property";return`${n}="${e[n]}"`}_containsAttributes(e,n){return Object.keys(e).every(r=>n.getAttribute(this._getMetaKeyMap(r))===e[r])}_getMetaKeyMap(e){return gG[e]||e}static \u0275fac=function(n){return new(n||t)(h(Yt))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),gG={httpEquiv:"http-equiv"},B_=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||t)(h(Yt))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var FE=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let r=null;return n?r=new(n||t):r=h(_G),r},providedIn:"root"})}return t})(),_G=(()=>{class t extends FE{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case vr.NONE:return n;case vr.HTML:return Vo(n,"HTML")?Qi(n):Ig(this._doc,String(n)).toString();case vr.STYLE:return Vo(n,"Style")?Qi(n):n;case vr.SCRIPT:if(Vo(n,"Script"))return Qi(n);throw new Z(5200,!1);case vr.URL:return Vo(n,"URL")?Qi(n):Dp(String(n));case vr.RESOURCE_URL:if(Vo(n,"ResourceURL"))return Qi(n);throw new Z(5201,!1);default:throw new Z(5202,!1)}}bypassSecurityTrustHtml(e){return wC(e)}bypassSecurityTrustStyle(e){return TC(e)}bypassSecurityTrustScript(e){return DC(e)}bypassSecurityTrustUrl(e){return AC(e)}bypassSecurityTrustResourceUrl(e){return RC(e)}static \u0275fac=function(n){return new(n||t)(h(Yt))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ue="primary",Mf=Symbol("RouteTitle"),$E=class{params;constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e[0]:e}return null}getAll(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function rc(t){return new $E(t)}function UE(t,i,e){for(let n=0;n<t.length;n++){let r=t[n],o=i[n];if(r[0]===":")e[r.substring(1)]=o;else if(r!==o.path)return!1}return!0}function oN(t,i,e){let n=e.path.split("/"),r=n.indexOf("**");if(r===-1){if(n.length>t.length||e.pathMatch==="full"&&(i.hasChildren()||n.length<t.length))return null;let l={},c=t.slice(0,n.length);return UE(n,c,l)?{consumed:c,posParams:l}:null}if(r!==n.lastIndexOf("**"))return null;let o=n.slice(0,r),s=n.slice(r+1);if(o.length+s.length>t.length||e.pathMatch==="full"&&i.hasChildren()&&e.path!=="**")return null;let a={};return!UE(o,t.slice(0,o.length),a)||!UE(s,t.slice(t.length-s.length),a)?null:{consumed:t,posParams:a}}function z_(t){return new Promise((i,e)=>{t.pipe(Ss()).subscribe({next:n=>i(n),error:n=>e(n)})})}function vG(t,i){if(t.length!==i.length)return!1;for(let e=0;e<t.length;++e)if(!Jo(t[e],i[e]))return!1;return!0}function Jo(t,i){let e=t?GE(t):void 0,n=i?GE(i):void 0;if(!e||!n||e.length!=n.length)return!1;let r;for(let o=0;o<e.length;o++)if(r=e[o],!sN(t[r],i[r]))return!1;return!0}function GE(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function sN(t,i){if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return!1;let e=[...t].sort(),n=[...i].sort();return e.every((r,o)=>n[o]===r)}else return t===i}function yG(t){return t.length>0?t[t.length-1]:null}function sc(t){return rm(t)?t:Ea(t)?re(Promise.resolve(t)):C(t)}
vendor: 13,171 bytes, line 11
11function aN(t){return rm(t)?z_(t):Promise.resolve(t)}var bG={exact:cN,subset:dN},lN={exact:CG,subset:SG,ignored:()=>!0},rI={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Ef={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function oI(t,i,e){let n=t instanceof bi?t:i.parseUrl(t);return Xe(()=>WE(i.lastSuccessfulNavigation()?.finalUrl??new bi,n,F(F({},Ef),e)))}function WE(t,i,e){return bG[e.paths](t.root,i.root,e.matrixParams)&&lN[e.queryParams](t.queryParams,i.queryParams)&&!(e.fragment==="exact"&&t.fragment!==i.fragment)}function CG(t,i){return Jo(t,i)}function cN(t,i,e){if(!ic(t.segments,i.segments)||!$_(t.segments,i.segments,e)||t.numberOfChildren!==i.numberOfChildren)return!1;for(let n in i.children)if(!t.children[n]||!cN(t.children[n],i.children[n],e))return!1;return!0}function SG(t,i){return Object.keys(i).length<=Object.keys(t).length&&Object.keys(i).every(e=>sN(t[e],i[e]))}function dN(t,i,e){return uN(t,i,i.segments,e)}function uN(t,i,e,n){if(t.segments.length>e.length){let r=t.segments.slice(0,e.length);return!(!ic(r,e)||i.hasChildren()||!$_(r,e,n))}else if(t.segments.length===e.length){if(!ic(t.segments,e)||!$_(t.segments,e,n))return!1;for(let r in i.children)if(!t.children[r]||!dN(t.children[r],i.children[r],n))return!1;return!0}else{let r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ic(t.segments,r)||!$_(t.segments,r,n)||!t.children[Ue]?!1:uN(t.children[Ue],i,o,n)}}function $_(t,i,e){return i.every((n,r)=>lN[e](t[r].parameters,n.parameters))}var bi=class{root;queryParams;fragment;_queryParamMap;constructor(i=new It([],{}),e={},n=null){this.root=i,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=rc(this.queryParams),this._queryParamMap}toString(){return wG.serialize(this)}},It=class{segments;children;parent=null;constructor(i,e){this.segments=i,this.children=e,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return G_(this)}},Ha=class{path;parameters;_parameterMap;constructor(i,e){this.path=i,this.parameters=e}get parameterMap(){return this._parameterMap??=rc(this.parameters),this._parameterMap}toString(){return fN(this)}};function EG(t,i){return ic(t,i)&&t.every((e,n)=>Jo(e.parameters,i[n].parameters))}function ic(t,i){return t.length!==i.length?!1:t.every((e,n)=>e.path===i[n].path)}function IG(t,i){let e=[];return Object.entries(t.children).forEach(([n,r])=>{n===Ue&&(e=e.concat(i(r,n)))}),Object.entries(t.children).forEach(([n,r])=>{n!==Ue&&(e=e.concat(i(r,n)))}),e}var Ga=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:()=>new Hs,providedIn:"root"})}return t})(),Hs=class{parse(i){let e=new qE(i);return new bi(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(i){let e=`/${yf(i.root,!0)}`,n=AG(i.queryParams),r=typeof i.fragment=="string"?`#${TG(i.fragment)}`:"";return`${e}${n}${r}`}},wG=new Hs;function G_(t){return t.segments.map(i=>fN(i)).join("/")}function yf(t,i){if(!t.hasChildren())return G_(t);if(i){let e=t.children[Ue]?yf(t.children[Ue],!1):"",n=[];return Object.entries(t.children).forEach(([r,o])=>{r!==Ue&&n.push(`${r}:${yf(o,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}else{let e=IG(t,(n,r)=>r===Ue?[yf(t.children[Ue],!1)]:[`${r}:${yf(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[Ue]!=null?`${G_(t)}/${e[0]}`:`${G_(t)}/(${e.join("//")})`}}function pN(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function j_(t){return pN(t).replace(/%3B/gi,";")}function TG(t){return encodeURI(t)}function zE(t){return pN(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function W_(t){return decodeURIComponent(t)}function KO(t){return W_(t.replace(/\+/g,"%20"))}function fN(t){return`${zE(t.path)}${DG(t.parameters)}`}function DG(t){return Object.entries(t).map(([i,e])=>`;${zE(i)}=${zE(e)}`).join("")}function AG(t){let i=Object.entries(t).map(([e,n])=>Array.isArray(n)?n.map(r=>`${j_(e)}=${j_(r)}`).join("&"):`${j_(e)}=${j_(n)}`).filter(e=>e);return i.length?`?${i.join("&")}`:""}var RG=/^[^\/()?;#]+/;function BE(t){let i=t.match(RG);return i?i[0]:""}var xG=/^[^\/()?;=#]+/;function MG(t){let i=t.match(xG);return i?i[0]:""}var PG=/^[^=?&#]+/;function OG(t){let i=t.match(PG);return i?i[0]:""}var NG=/^[^&#]+/;function kG(t){let i=t.match(NG);return i?i[0]:""}var qE=class{url;remaining;constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new It([],{}):new It([],this.parseChildren())}parseQueryParams(){let i={};if(this.consumeOptional("?"))do this.parseQueryParam(i);while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(i=0){if(i>50)throw new Z(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0,i));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1,i)),(e.length>0||Object.keys(n).length>0)&&(r[Ue]=new It(e,n)),r}parseSegment(){let i=BE(this.remaining);if(i===""&&this.peekStartsWith(";"))throw new Z(4009,!1);return this.capture(i),new Ha(W_(i),this.parseMatrixParams())}parseMatrixParams(){let i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){let e=MG(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let r=BE(this.remaining);r&&(n=r,this.capture(n))}i[W_(e)]=W_(n)}parseQueryParam(i){let e=OG(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let s=kG(this.remaining);s&&(n=s,this.capture(n))}let r=KO(e),o=KO(n);if(i.hasOwnProperty(r)){let s=i[r];Array.isArray(s)||(s=[s],i[r]=s),s.push(o)}else i[r]=o}parseParens(i,e){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=BE(this.remaining),o=this.remaining[r.length];if(o!=="/"&&o!==")"&&o!==";")throw new Z(4010,!1);let s;r.indexOf(":")>-1?(s=r.slice(0,r.indexOf(":")),this.capture(s),this.capture(":")):i&&(s=Ue);let a=this.parseChildren(e+1);n[s??Ue]=Object.keys(a).length===1&&a[Ue]?a[Ue]:new It([],a),this.consumeOptional("//")}return n}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return this.peekStartsWith(i)?(this.remaining=this.remaining.substring(i.length),!0):!1}capture(i){if(!this.consumeOptional(i))throw new Z(4011,!1)}};function hN(t){return t.segments.length>0?new It([],{[Ue]:t}):t}function mN(t){let i={};for(let[n,r]of Object.entries(t.children)){let o=mN(r);if(n===Ue&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))i[s]=a;else(o.segments.length>0||o.hasChildren())&&(i[n]=o)}let e=new It(t.segments,i);return LG(e)}function LG(t){if(t.numberOfChildren===1&&t.children[Ue]){let i=t.children[Ue];return new It(t.segments.concat(i.segments),i.children)}return t}function $a(t){return t instanceof bi}function gN(t,i,e=null,n=null,r=new Hs){let o=_N(t);return vN(o,i,e,n,r)}function _N(t){let i;function e(o){let s={};for(let l of o.children){let c=e(l);s[l.outlet]=c}let a=new It(o.url,s);return o===t&&(i=a),a}let n=e(t.root),r=hN(n);return i??r}function vN(t,i,e,n,r){let o=t;for(;o.parent;)o=o.parent;if(i.length===0)return jE(o,o,o,e,n,r);let s=FG(i);if(s.toRoot())return jE(o,o,new It([],{}),e,n,r);let a=VG(s,o,t),l=a.processChildren?Cf(a.segmentGroup,a.index,s.commands):bN(a.segmentGroup,a.index,s.commands);return jE(o,a.segmentGroup,l,e,n,r)}function q_(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function If(t){return typeof t=="object"&&t!=null&&t.outlets}function eN(t,i,e){t||="\u0275";let n=new bi;return n.queryParams={[t]:i},e.parse(e.serialize(n)).queryParams[t]}function jE(t,i,e,n,r,o){let s={};for(let[c,d]of Object.entries(n??{}))s[c]=Array.isArray(d)?d.map(p=>eN(c,p,o)):eN(c,d,o);let a;t===i?a=e:a=yN(t,i,e);let l=hN(mN(a));return new bi(l,s,r)}function yN(t,i,e){let n={};return Object.entries(t.children).forEach(([r,o])=>{o===i?n[r]=e:n[r]=yN(o,i,e)}),new It(t.segments,n)}var Y_=class{isAbsolute;numberOfDoubleDots;commands;constructor(i,e,n){if(this.isAbsolute=i,this.numberOfDoubleDots=e,this.commands=n,i&&n.length>0&&q_(n[0]))throw new Z(4003,!1);let r=n.find(If);if(r&&r!==yG(n))throw new Z(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function FG(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Y_(!0,0,t);let i=0,e=!1,n=t.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?e=!0:a===".."?i++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new Y_(e,i,n)}var Nd=class{segmentGroup;processChildren;index;constructor(i,e,n){this.segmentGroup=i,this.processChildren=e,this.index=n}};function VG(t,i,e){if(t.isAbsolute)return new Nd(i,!0,0);if(!e)return new Nd(i,!1,NaN);if(e.parent===null)return new Nd(e,!0,0);let n=q_(t.commands[0])?0:1,r=e.segments.length-1+n;return UG(e,r,t.numberOfDoubleDots)}function UG(t,i,e){let n=t,r=i,o=e;for(;o>r;){if(o-=r,n=n.parent,!n)throw new Z(4005,!1);r=n.segments.length}return new Nd(n,!1,r-o)}function BG(t){return If(t[0])?t[0].outlets:{[Ue]:t}}function bN(t,i,e){if(t??=new It([],{}),t.segments.length===0&&t.hasChildren())return Cf(t,i,e);let n=jG(t,i,e),r=e.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){let o=new It(t.segments.slice(0,n.pathIndex),{});return o.children[Ue]=new It(t.segments.slice(n.pathIndex),t.children),Cf(o,0,r)}else return n.match&&r.length===0?new It(t.segments,{}):n.match&&!t.hasChildren()?YE(t,i,e):n.match?Cf(t,0,r):YE(t,i,e)}function Cf(t,i,e){if(e.length===0)return new It(t.segments,{});{let n=BG(e),r={};if(Object.keys(n).some(o=>o!==Ue)&&t.children[Ue]&&t.numberOfChildren===1&&t.children[Ue].segments.length===0){let o=Cf(t.children[Ue],i,e);return new It(t.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=bN(t.children[o],i,s))}),Object.entries(t.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new It(t.segments,r)}}function jG(t,i,e){let n=0,r=i,o={match:!1,pathIndex:0,commandIndex:0};for(;r<t.segments.length;){if(n>=e.length)return o;let s=t.segments[r],a=e[n];if(If(a))break;let l=`${a}`,c=n<e.length-1?e[n+1]:null;if(r>0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!nN(l,c,s))return o;n+=2}else{if(!nN(l,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function YE(t,i,e){let n=t.segments.slice(0,i),r=0;for(;r<e.length;){let o=e[r];if(If(o)){let l=HG(o.outlets);return new It(n,l)}if(r===0&&q_(e[0])){let l=t.segments[i];n.push(new Ha(l.path,tN(e[0]))),r++;continue}let s=If(o)?o.outlets[Ue]:`${o}`,a=r<e.length-1?e[r+1]:null;s&&a&&q_(a)?(n.push(new Ha(s,tN(a))),r+=2):(n.push(new Ha(s,{})),r++)}return new It(n,{})}function HG(t){let i={};return Object.entries(t).forEach(([e,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(i[e]=YE(new It([],{}),0,n))}),i}function tN(t){let i={};return Object.entries(t).forEach(([e,n])=>i[e]=`${n}`),i}function nN(t,i,e){return t==e.path&&Jo(i,e.parameters)}var kd="imperative",jn=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(jn||{}),or=class{id;url;constructor(i,e){this.id=i,this.url=e}},Xo=class extends or{type=jn.NavigationStart;navigationTrigger;restoredState;constructor(i,e,n="imperative",r=null){super(i,e),this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Ci=class extends or{urlAfterRedirects;type=jn.NavigationEnd;constructor(i,e,n){super(i,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},ci=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromRe
11solver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(ci||{}),Fd=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Fd||{}),Nr=class extends or{reason;code;type=jn.NavigationCancel;constructor(i,e,n,r){super(i,e),this.reason=n,this.code=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function CN(t){return t instanceof Nr&&(t.code===ci.Redirect||t.code===ci.SupersededByNewNavigation)}var Ko=class extends or{reason;code;type=jn.NavigationSkipped;constructor(i,e,n,r){super(i,e),this.reason=n,this.code=r}},oc=class extends or{error;target;type=jn.NavigationError;constructor(i,e,n,r){super(i,e),this.error=n,this.target=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},wf=class extends or{urlAfterRedirects;state;type=jn.RoutesRecognized;constructor(i,e,n,r){super(i,e),this.urlAfterRedirects=n,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Q_=class extends or{urlAfterRedirects;state;type=jn.GuardsCheckStart;constructor(i,e,n,r){super(i,e),this.urlAfterRedirects=n,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Z_=class extends or{urlAfterRedirects;state;shouldActivate;type=jn.GuardsCheckEnd;constructor(i,e,n,r,o){super(i,e),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},J_=class extends or{urlAfterRedirects;state;type=jn.ResolveStart;constructor(i,e,n,r){super(i,e),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},X_=class extends or{urlAfterRedirects;state;type=jn.ResolveEnd;constructor(i,e,n,r){super(i,e),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},K_=class{route;type=jn.RouteConfigLoadStart;constructor(i){this.route=i}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},ev=class{route;type=jn.RouteConfigLoadEnd;constructor(i){this.route=i}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},tv=class{snapshot;type=jn.ChildActivationStart;constructor(i){this.snapshot=i}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},nv=class{snapshot;type=jn.ChildActivationEnd;constructor(i){this.snapshot=i}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},iv=class{snapshot;type=jn.ActivationStart;constructor(i){this.snapshot=i}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},rv=class{snapshot;type=jn.ActivationEnd;constructor(i){this.snapshot=i}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Vd=class{routerEvent;position;anchor;scrollBehavior;type=jn.Scroll;constructor(i,e,n,r){this.routerEvent=i,this.position=e,this.anchor=n,this.scrollBehavior=r}toString(){let i=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${i}')`}},Ud=class{},Tf=class{},Bd=class{url;navigationBehaviorOptions;constructor(i,e){this.url=i,this.navigationBehaviorOptions=e}};function $G(t){return!(t instanceof Ud)&&!(t instanceof Bd)&&!(t instanceof Tf)}var ov=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(i){this.rootInjector=i,this.children=new ac(this.rootInjector)}},ac=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,n){let r=this.getOrCreateContext(e);r.outlet=n,this.contexts.set(e,r)}onChildOutletDestroyed(e){let n=this.getContext(e);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let n=this.getContext(e);return n||(n=new ov(this.rootInjector),this.contexts.set(e,n)),n}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(n){return new(n||t)(h(Jt))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),sv=class{_root;constructor(i){this._root=i}get root(){return this._root.value}
vendor: 16,304 bytes, line 11
11parent(i){let e=this.pathFromRoot(i);return e.length>1?e[e.length-2]:null}children(i){let e=QE(i,this._root);return e?e.children.map(n=>n.value):[]}firstChild(i){let e=QE(i,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(i){let e=ZE(i,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==i)}pathFromRoot(i){return ZE(i,this._root).map(e=>e.value)}};function QE(t,i){if(t===i.value)return i;for(let e of i.children){let n=QE(t,e);if(n)return n}return null}function ZE(t,i){if(t===i.value)return[i];for(let e of i.children){let n=ZE(t,e);if(n.length)return n.unshift(i),n}return[]}var rr=class{value;children;constructor(i,e){this.value=i,this.children=e}toString(){return`TreeNode(${this.value})`}};function Od(t){let i={};return t&&t.children.forEach(e=>i[e.value.outlet]=e),i}var Df=class extends sv{snapshot;constructor(i,e){super(i),this.snapshot=e,aI(this,i)}toString(){return this.snapshot.toString()}};function SN(t,i){let e=GG(t,i),n=new qt([new Ha("",{})]),r=new qt({}),o=new qt({}),s=new qt({}),a=new qt(""),l=new _t(n,r,s,a,o,Ue,t,e.root);return l.snapshot=e.root,new Df(new rr(l,[]),e)}function GG(t,i){let e={},n={},r={},s=new jd([],e,r,"",n,Ue,t,null,{},i);return new Af("",new rr(s,[]))}var _t=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(i,e,n,r,o,s,a,l){this.urlSubject=i,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(P(c=>c[Mf]))??C(void 0),this.url=i,this.params=e,this.queryParams=n,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(P(i=>rc(i))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(P(i=>rc(i))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function sI(t,i,e="emptyOnly"){let n,{routeConfig:r}=t;return i!==null&&(e==="always"||r?.path===""||!i.component&&!i.routeConfig?.loadComponent)?n={params:F(F({},i.params),t.params),data:F(F({},i.data),t.data),resolve:F(F(F(F({},t.data),i.data),r?.data),t._resolvedData)}:n={params:F({},t.params),data:F({},t.data),resolve:F(F({},t.data),t._resolvedData??{})},r&&IN(r)&&(n.resolve[Mf]=r.title),n}var jd=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[Mf]}constructor(i,e,n,r,o,s,a,l,c,d){this.url=i,this.params=e,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c,this._environmentInjector=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=rc(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=rc(this.queryParams),this._queryParamMap}toString(){let i=this.url.map(n=>n.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${i}', path:'${e}')`}},Af=class extends sv{url;constructor(i,e){super(e),this.url=i,aI(this,e)}toString(){return EN(this._root)}};function aI(t,i){i.value._routerState=t,i.children.forEach(e=>aI(t,e))}function EN(t){let i=t.children.length>0?` { ${t.children.map(EN).join(", ")} } `:"";return`${t.value}${i}`}function HE(t){if(t.snapshot){let i=t.snapshot,e=t._futureSnapshot;t.snapshot=e,Jo(i.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),i.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),Jo(i.params,e.params)||t.paramsSubject.next(e.params),vG(i.url,e.url)||t.urlSubject.next(e.url),Jo(i.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function JE(t,i){let e=Jo(t.params,i.params)&&EG(t.url,i.url),n=!t.parent!=!i.parent;return e&&!n&&(!t.parent||JE(t.parent,i.parent))}function IN(t){return typeof t.title=="string"||t.title===null}var wN=new le(""),lI=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=Ue;activateEvents=new Y;deactivateEvents=new Y;attachEvents=new Y;detachEvents=new Y;routerOutletData=Ct();parentContexts=U(ac);location=U(Bo);changeDetector=U(Pe);inputBinder=U(Pf,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:n,previousValue:r}=e.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Z(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Z(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Z(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,n){if(this.isActivated)throw new Z(4013,!1);this._activatedRoute=e;let r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new XE(e,a,r.injector,this.routerOutletData);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Bt({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Un]})}return t})(),XE=class{route;childContexts;parent;outletData;constructor(i,e,n,r){this.route=i,this.childContexts=e,this.parent=n,this.outletData=r}get(i,e){return i===_t?this.route:i===ac?this.childContexts:i===wN?this.outletData:this.parent.get(i,e)}},Pf=new le(""),cI=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:n}=e,r=am([n.queryParams,n.params,n.data]).pipe(fe(([o,s,a],l)=>(a=F(F(F({},o),s),a),l===0?C(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==n||n.component===null){this.unsubscribeFromRouteData(e);return}let s=NM(n.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),dI=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=D({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(n,r){n&1&&M(0,"router-outlet")},dependencies:[lI],encapsulation:2})}return t})();function uI(t){let i=t.children&&t.children.map(uI),e=i?ve(F({},t),{children:i}):F({},t);return!e.component&&!e.loadComponent&&(i||e.loadChildren)&&e.outlet&&e.outlet!==Ue&&(e.component=dI),e}function WG(t,i,e){let n=Rf(t,i._root,e?e._root:void 0);return new Df(n,i)}function Rf(t,i,e){if(e&&t.shouldReuseRoute(i.value,e.value.snapshot)){let n=e.value;n._futureSnapshot=i.value;let r=zG(t,i,e);return new rr(n,r)}else{if(t.shouldAttach(i.value)){let o=t.retrieve(i.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=i.value,s.children=i.children.map(a=>Rf(t,a)),s}}let n=qG(i.value),r=i.children.map(o=>Rf(t,o));return new rr(n,r)}}function zG(t,i,e){return i.children.map(n=>{for(let r of e.children)if(t.shouldReuseRoute(n.value,r.value.snapshot))return Rf(t,n,r);return Rf(t,n)})}function qG(t){return new _t(new qt(t.url),new qt(t.params),new qt(t.queryParams),new qt(t.fragment),new qt(t.data),t.outlet,t.component,t)}var Hd=class{redirectTo;navigationBehaviorOptions;constructor(i,e){this.redirectTo=i,this.navigationBehaviorOptions=e}},TN="ngNavigationCancelingError";function av(t,i){let{redirectTo:e,navigationBehaviorOptions:n}=$a(i)?{redirectTo:i,navigationBehaviorOptions:void 0}:i,r=DN(!1,ci.Redirect);return r.url=e,r.navigationBehaviorOptions=n,r}function DN(t,i){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[TN]=!0,e.cancellationCode=i,e}function YG(t){return AN(t)&&$a(t.url)}function AN(t){return!!t&&t[TN]}var KE=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(i,e,n,r,o){this.routeReuseStrategy=i,this.futureState=e,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(i){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,i),HE(this.futureState.root),this.activateChildRoutes(e,n,i)}deactivateChildRoutes(i,e,n){let r=Od(e);i.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(i,e,n){let r=i.value,o=e?e.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(i,e,s.children)}else this.deactivateChildRoutes(i,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(i,e){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,e):this.deactivateRouteAndOutlet(i,e)}detachAndStoreRouteSubtree(i,e){let n=e.getContext(i.value.outlet),r=n&&i.value.component?n.children:e,o=Od(i);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:s,route:i,contexts:a})}}deactivateRouteAndOutlet(i,e){let n=e.getContext(i.value.outlet),r=n&&i.value.component?n.children:e,o=Od(i);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(i,e,n){let r=Od(e);i.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new rv(o.value.snapshot))}),i.children.length&&this.forwardEvent(new nv(i.value.snapshot))}activateRoutes(i,e,n){let r=i.value,o=e?e.value:null;if(HE(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(i,e,s.children)}else this.activateChildRoutes(i,e,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),HE(a.route.value),this.activateChildRoutes(i,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(i,null,s.children)}else this.activateChildRoutes(i,null,n)}},lv=class{path;route;constructor(i){this.path=i,this.route=this.path[this.path.length-1]}},Ld=class{component;route;constructor(i,e){this.component=i,this.route=e}};function QG(t,i,e){let n=t._root,r=i?i._root:null;return bf(n,r,e,[n.value])}function ZG(t){let i=t.routeConfig?t.routeConfig.canActivateChild:null;return!i||i.length===0?null:{node:t,guards:i}}function Gd(t,i){let e=Symbol(),n=i.get(t,e);return n===e?typeof t=="function"&&!V0(t)?t:i.get(t):n}function bf(t,i,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=Od(i);return t.children.forEach(s=>{JG(s,o[s.value.outlet],e,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Sf(a,e.getContext(s),r)),r}function JG(t,i,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=i?i.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=XG(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new lv(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?bf(t,i,a?a.children:null,n,r):bf(t,i,e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Ld(a.outlet.component,s))}else s&&Sf(i,a,r),r.canActivateChecks.push(new lv(n)),o.component?bf(t,null,a?a.children:null,n,r):bf(t,null,e,n,r);return r}function XG(t,i,e){if(typeof e=="function")return Vn(i._environmentInjector,()=>e(t,i));switch(e){case"pathParamsChange":return!ic(t.url,i.url);case"pathParamsOrQueryParamsChange":return!ic(t.url,i.url)||!Jo(t.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!JE(t,i)||!Jo(t.queryParams,i.queryParams);default:return!JE(t,i)}}function Sf(t,i,e){let n=Od(t),r=t.value;Object.entries(n).forEach(([o,s])=>{r.component?i?Sf(s,i.children.getContext(o),e):Sf(s,null,e):Sf(s,i,e)}),r.component?i&&i.outlet&&i.outlet.isActivated?e.canDeactivateChecks.push(new Ld(i.outlet.component,r)):e.canDeactivateChecks.push(new Ld(null,r)):e.canDeactivateChecks.push(new Ld(null,r))}function Of(t){return typeof t=="function"}function KG(t){return typeof t=="boolean"}function e5(t){return t&&Of(t.canLoad)}function t5(t){return t&&Of(t.canActivate)}function n5(t){return t&&Of(t.canActivateChild)}function i5(t){return t&&Of(t.canDeactivate)}function r5(t){return t&&Of(t.canMatch)}function RN(t){return t instanceof bs||t?.name==="EmptyError"}var H_=Symbol("INITIAL_VALUE");function $d(){return fe(t=>am(t.map(i=>i.pipe(hi(1),b0(H_)))).pipe(P(i=>{for(let e of i)if(e!==!0){if(e===H_)return H_;if(e===!1||o5(e))return e}return!0}),ke(i=>i!==H_),hi(1)))}function o5(t){return $a(t)||t instanceof Hd}function xN(t){return t.aborted?C(void 0).pipe(hi(1)):new Re(i=>{let e=()=>{i.next(),i.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function MN(t){return El(xN(t))}function s5(t){return _n(i=>{let{targetSnapshot:e,currentSnapshot:n,guards:{canActivateChecks:r,canDeactivateChecks:o}}=i;return o.length===0&&r.length===0?C(ve(F({},i),{guardsResult:!0})):a5(o,e,n).pipe(_n(s=>s&&KG(s)?l5(e,r,t):C(s)),P(s=>ve(F({},i),{guardsResult:s})))})}function a5(t,i,e){return re(t).pipe(_n(n=>f5(n.component,n.route,e,i)),Ss(n=>n!==!0,!0))}function l5(t,i,e){return re(i).pipe(dr(n=>ua(d5(n.route.parent,e),c5(n.route,e),p5(t,n.path),u5(t,n.route))),Ss(n=>n!==!0,!0))}function c5(t,i){return t!==null&&i&&i(new iv(t)),C(!0)}function d5(t,i){return t!==null&&i&&i(new tv(t)),C(!0)}
11function u5(t,i){let e=i.routeConfig?i.routeConfig.canActivate:null;if(!e||e.length===0)return C(!0);let n=e.map(r=>zu(()=>{let o=i._environmentInjector,s=Gd(r,o),a=t5(s)?s.canActivate(i,t):Vn(o,()=>s(i,t));return sc(a).pipe(Ss())}));return C(n).pipe($d())}function p5(t,i){let e=i[i.length-1],r=i.slice(0,i.length-1).reverse().map(o=>ZG(o)).filter(o=>o!==null).map(o=>zu(()=>{let s=o.guards.map(a=>{let l=o.node._environmentInjector,c=Gd(a,l),d=n5(c)?c.canActivateChild(e,t):Vn(l,()=>c(e,t));return sc(d).pipe(Ss())});return C(s).pipe($d())}));return C(r).pipe($d())}function f5(t,i,e,n){let r=i&&i.routeConfig?i.routeConfig.canDeactivate:null;if(!r||r.length===0)return C(!0);let o=r.map(s=>{let a=i._environmentInjector,l=Gd(s,a),c=i5(l)?l.canDeactivate(t,i,e,n):Vn(a,()=>l(t,i,e,n));return sc(c).pipe(Ss())});return C(o).pipe($d())}function h5(t,i,e,n,r){let o=i.canLoad;if(o===void 0||o.length===0)return C(!0);let s=o.map(a=>{let l=Gd(a,t),c=e5(l)?l.canLoad(i,e):Vn(t,()=>l(i,e)),d=sc(c);return r?d.pipe(MN(r)):d});return C(s).pipe($d(),PN(n))}function PN(t){return p0(we(i=>{if(typeof i!="boolean")throw av(t,i)}),P(i=>i===!0))}function m5(t,i,e,n,r,o){let s=i.canMatch;if(!s||s.length===0)return C(!0);let a=s.map(l=>{let c=Gd(l,t),d=r5(c)?c.canMatch(i,e,r):Vn(t,()=>c(i,e,r));return sc(d).pipe(MN(o))});return C(a).pipe($d(),PN(n))}var js=class t extends Error{segmentGroup;constructor(i){super(),this.segmentGroup=i||null,Object.setPrototypeOf(this,t.prototype)}},xf=class t extends Error{urlTree;constructor(i){super(),this.urlTree=i,Object.setPrototypeOf(this,t.prototype)}};function g5(t){throw new Z(4e3,!1)}function _5(t){throw DN(!1,ci.GuardRejected)}var eI=class{urlSerializer;urlTree;constructor(i,e){this.urlSerializer=i,this.urlTree=e}lineralizeSegments(i,e){return Vt(this,null,function*(){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return n;if(r.numberOfChildren>1||!r.children[Ue])throw g5(`${i.redirectTo}`);r=r.children[Ue]}})}applyRedirectCommands(i,e,n,r,o){return Vt(this,null,function*(){let s=yield v5(e,r,o);if(s instanceof bi)throw new xf(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),i,n);if(s[0]==="/")throw new xf(a);return a})}applyRedirectCreateUrlTree(i,e,n,r){let o=this.createSegmentGroup(i,e.root,n,r);return new bi(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(i,e){let n={};return Object.entries(i).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);n[r]=e[a]}else n[r]=o}),n}createSegmentGroup(i,e,n,r){let o=this.createSegments(i,e.segments,n,r),s={};return Object.entries(e.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(i,l,n,r)}),new It(o,s)}createSegments(i,e,n,r){return e.map(o=>o.path[0]===":"?this.findPosParam(i,o,r):this.findOrReturn(o,n))}findPosParam(i,e,n){let r=n[e.path.substring(1)];if(!r)throw new Z(4001,!1);return r}findOrReturn(i,e){let n=0;for(let r of e){if(r.path===i.path)return e.splice(n),r;n++}return i}};function v5(t,i,e){if(typeof t=="string")return Promise.resolve(t);let n=t;return z_(sc(Vn(e,()=>n(i))))}function y5(t,i){return t.providers&&!t._injector&&(t._injector=rd(t.providers,i,`Route: ${t.path}`)),t._injector??i}function _o(t){return t.outlet||Ue}function b5(t,i){let e=t.filter(n=>_o(n)===i);return e.push(...t.filter(n=>_o(n)!==i)),e}var tI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ON(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function C5(t,i,e,n,r,o,s){let a=NN(t,i,e);if(!a.matched)return C(a);let l=ON(o(a));return n=y5(i,n),m5(n,i,e,r,l,s).pipe(P(c=>c===!0?a:F({},tI)))}function NN(t,i,e){if(i.path==="")return i.pathMatch==="full"&&(t.hasChildren()||e.length>0)?F({},tI):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(i.matcher||oN)(e,t,i);if(!r)return F({},tI);let o={};Object.entries(r.posParams??{}
11).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?F(F({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function iN(t,i,e,n,r){return e.length>0&&I5(t,e,n,r)?{segmentGroup:new It(i,E5(n,new It(e,t.children))),slicedSegments:[]}:e.length===0&&w5(t,e,n)?{segmentGroup:new It(t.segments,S5(t,e,n,t.children)),slicedSegments:e}:{segmentGroup:new It(t.segments,t.children),slicedSegments:e}}function S5(t,i,e,n){let r={};for(let o of e)if(dv(t,i,o)&&!n[_o(o)]){let s=new It([],{});r[_o(o)]=s}return F(F({},n),r)}function E5(t,i){let e={};e[Ue]=i;for(let n of t)if(n.path===""&&_o(n)!==Ue){let r=new It([],{});e[_o(n)]=r}return e}function I5(t,i,e,n){return e.some(r=>!dv(t,i,r)||!(_o(r)!==Ue)?!1:!(n!==void 0&&_o(r)===n))}function w5(t,i,e){return e.some(n=>dv(t,i,n))}function dv(t,i,e){return(t.hasChildren()||i.length>0)&&e.pathMatch==="full"?!1:e.path===""}function T5(t,i,e){return i.length===0&&!t.children[e]}var nI=class{};function D5(t,i,e,n,r,o,s="emptyOnly",a){return Vt(this,null,function*(){return new iI(t,i,e,n,r,s,o,a).recognize()})}var A5=31,iI=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(i,e,n,r,o,s,a,l){this.injector=i,this.configLoader=e,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=l,this.applyRedirects=new eI(this.urlSerializer,this.urlTree)}noMatchError(i){return new Z(4002,`'${i.segmentGroup}'`)}recognize(){return Vt(this,null,function*(){let i=iN(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:n}=yield this.match(i),r=new rr(n,e),o=new Af("",r),s=gN(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}})}match(i){return Vt(this,null,function*(){let e=new jd([],Object.freeze({}),Object.freeze(F({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Ue,this.rootComponentType,null,{},this.injector);try{return{children:yield this.processSegmentGroup(this.injector,this.config,i,Ue,e),rootSnapshot:e}}catch(n){if(n instanceof xf)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof js?this.noMatchError(n):n}})}processSegmentGroup(i,e,n,r,o){return Vt(this,null,function*(){if(n.segments.length===0&&n.hasChildren())return this.processChildren(i,e,n,o);let s=yield this.processSegment(i,e,n,n.segments,r,!0,o);return s instanceof rr?[s]:[]})}processChildren(i,e,n,r){return Vt(this,null,function*(){let o=[];for(let l of Object.keys(n.children))l==="primary"?o.unshift(l):o.push(l);let s=[];for(let l of o){let c=n.children[l],d=b5(e,l),p=yield this.processSegmentGroup(i,d,c,l,r);s.push(...p)}let a=kN(s);return R5(a),a})}processSegment(i,e,n,r,o,s,a){return Vt(this,null,function*(){for(let l of e)try{return yield this.processSegmentAgainstRoute(l._injector??i,e,l,n,r,o,s,a)}catch(c){if(c instanceof js||RN(c))continue;throw c}if(T5(n,r,o))return new nI;throw new js(n)})}processSegmentAgainstRoute(i,e,n,r,o,s,a,l){return Vt(this,null,function*(){if(_o(n)!==s&&(s===Ue||!dv(r,o,n)))throw new js(r);if(n.redirectTo===void 0)return this.matchSegmentAgainstRoute(i,r,n,o,s,l);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(i,r,e,n,o,s,l);throw new js(r)})}expandSegmentAgainstRouteUsingRedirect(i,e,n,r,o,s,a){return Vt(this,null,function*(){let{matched:l,parameters:c,consumedSegments:d,positionalParamSegments:p,remainingSegments:y}=NN(e,r,o);if(!l)throw new js(e);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>A5&&(this.allowRedirects=!1));let b=this.createSnapshot(i,r,o,c,a);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let T=yield this.applyRedirects.applyRedirectCommands(d,r.redirectTo,p,ON(b),i),W=yield this.applyRedirects.lineralizeSegments(r,T);return this.processSegment(i,n,e,W.concat(y),s,!1,a)})}
11createSnapshot(i,e,n,r,o){let s=new jd(n,r,Object.freeze(F({},this.urlTree.queryParams)),this.urlTree.fragment,M5(e),_o(e),e.component??e._loadedComponent??null,e,P5(e),i),a=sI(s,o,this.paramsInheritanceStrategy);return s.params=Object.freeze(a.params),s.data=Object.freeze(a.data),s}matchSegmentAgainstRoute(i,e,n,r,o,s){return Vt(this,null,function*(){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=tt=>this.createSnapshot(i,n,tt.consumedSegments,tt.parameters,s),l=yield z_(C5(e,n,r,i,this.urlSerializer,a,this.abortSignal));if(n.path==="**"&&(e.children={}),!l?.matched)throw new js(e);i=n._injector??i;let{routes:c}=yield this.getChildConfig(i,n,r),d=n._loadedInjector??i,{parameters:p,consumedSegments:y,remainingSegments:b}=l,T=this.createSnapshot(i,n,y,p,s),{segmentGroup:W,slicedSegments:j}=iN(e,y,b,c,o);if(j.length===0&&W.hasChildren()){let tt=yield this.processChildren(d,c,W,T);return new rr(T,tt)}if(c.length===0&&j.length===0)return new rr(T,[]);let ee=_o(n)===o,De=yield this.processSegment(d,c,W,j,ee?Ue:o,!0,T);return new rr(T,De instanceof rr?[De]:[])})}getChildConfig(i,e,n){return Vt(this,null,function*(){if(e.children)return{routes:e.children,injector:i};if(e.loadChildren){if(e._loadedRoutes!==void 0){let o=e._loadedNgModuleFactory;return o&&!e._loadedInjector&&(e._loadedInjector=o.create(i).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(yield z_(h5(i,e,n,this.urlSerializer,this.abortSignal))){let o=yield this.configLoader.loadChildren(i,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,e._loadedNgModuleFactory=o.factory,o}throw _5(e)}return{routes:[],injector:i}})}};function R5(t){t.sort((i,e)=>i.value.outlet===Ue?-1:e.value.outlet===Ue?1:i.value.outlet.localeCompare(e.value.outlet))}function x5(t){let i=t.value.routeConfig;return i&&i.path===""}function kN(t){let i=[],e=new Set;for(let n of t){if(!x5(n)){i.push(n);continue}let r=i.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),e.add(r)):i.push(n)}for(let n of e){let r=kN(n.children);i.push(new rr(n.value,r))}return i.filter(n=>!e.has(n))}function M5(t){return t.data||{}}function P5(t){return t.resolve||{}}function O5(t,i,e,n,r,o,s){return _n(a=>Vt(null,null,function*(){let{state:l,tree:c}=yield D5(t,i,e,n,a.extractedUrl,r,o,s);return ve(F({},a),{targetSnapshot:l,urlAfterRedirects:c})}))}function N5(t){return _n(i=>{let{targetSnapshot:e,guards:{canActivateChecks:n}}=i;if(!n.length)return C(i);let r=new Set(n.map(a=>a.route)),o=new Set;for(let a of r)if(!o.has(a))for(let l of LN(a))o.add(l);let s=0;return re(o).pipe(dr(a=>r.has(a)?k5(a,e,t):(a.data=sI(a,a.parent,t).resolve,C(void 0))),we(()=>s++),cm(1),_n(a=>s===o.size?C(i):kn))})}function LN(t){let i=t.children.map(e=>LN(e)).flat();return[t,...i]}function k5(t,i,e){let n=t.routeConfig,r=t._resolve;return n?.title!==void 0&&!IN(n)&&(r[Mf]=n.title),zu(()=>(t.data=sI(t,t.parent,e).resolve,L5(r,t,i).pipe(P(o=>(t._resolvedData=o,t.data=F(F({},t.data),o),null)))))}function L5(t,i,e){let n=GE(t);if(n.length===0)return C({});let r={};return re(n).pipe(_n(o=>F5(t[o],i,e).pipe(Ss(),we(s=>{if(s instanceof Hd)throw av(new Hs,s);r[o]=s}))),cm(1),P(()=>r),z(o=>RN(o)?kn:g0(o)))}function F5(t,i,e){let n=i._environmentInjector,r=Gd(t,n),o=r.resolve?r.resolve(i,e):Vn(n,()=>r(i,e));return sc(o)}function rN(t){return fe(i=>{let e=t(i);return e?re(e).pipe(P(()=>i)):C(i)})}var pI=(()=>{class t{buildTitle(e){let n,r=e.root;for(;r!==void 0;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(o=>o.outlet===Ue);return n}getResolvedTitleForRoute(e){return e.data[Mf]}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:()=>U(FN),providedIn:"root"})}return t})(),FN=(()=>{class t extends pI{title;constructor(e){super(),this.title=e}updateTitle(e){let n=this.buildTitle(e);n!==void 0&&this.title.setTitle(n)}static \u0275fac=function(n){return new(n||t)(h(B_))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),$s=new le("",{factory:()=>({})}),lc=new le(""),uv=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=U(mS);loadComponent(e,n){return Vt(this,null,function*(){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Promise.resolve(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=Vt(this,null,function*(){try{let o=yield aN(Vn(e,()=>n.loadComponent())),s=yield BN(UN(o));return this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s,s}finally{this.componentLoaders.delete(n)}});return this.componentLoaders.set(n,r),r})}
11loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return Promise.resolve({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let r=Vt(this,null,function*(){try{let o=yield VN(n,this.compiler,e,this.onLoadEndListener);return n._loadedRoutes=o.routes,n._loadedInjector=o.injector,n._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(n)}});return this.childrenLoaders.set(n,r),r}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function VN(t,i,e,n){return Vt(this,null,function*(){let r=yield aN(Vn(e,()=>t.loadChildren())),o=yield BN(UN(r)),s;o instanceof kg||Array.isArray(o)?s=o:s=yield i.compileModuleAsync(o),n&&n(t);let a,l,c=!1,d;return Array.isArray(s)?(l=s,c=!0):(a=s.create(e).injector,d=s,l=a.get(lc,[],{optional:!0,self:!0}).flat()),{routes:l.map(uI),injector:a,factory:d}})}function V5(t){return t&&typeof t=="object"&&"default"in t}function UN(t){return V5(t)?t.default:t}function BN(t){return Vt(this,null,function*(){return t})}var pv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:()=>U(U5),providedIn:"root"})}return t})(),U5=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,n){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),fI=new le(""),hI=new le("");function jN(t,i,e){let n=t.get(hI),r=t.get(Yt);if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),B5(t)));a.updateCallbackDone.catch(c=>{}),a.ready.catch(c=>{}),a.finished.catch(c=>{});let{onViewTransitionCreated:l}=n;return l&&Vn(t,()=>l({transition:a,from:i,to:e})),s}function B5(t){return new Promise(i=>{id({read:()=>setTimeout(i)},{injector:t})})}var j5=()=>{},mI=new le(""),fv=(()=>{class t{currentNavigation=V(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=V(null);events=new Ot;transitionAbortWithErrorSubject=new Ot;configLoader=U(uv);environmentInjector=U(Jt);destroyRef=U($n);urlSerializer=U(Ga);rootContexts=U(ac);location=U(Rr);inputBindingEnabled=U(Pf,{optional:!0})!==null;titleStrategy=U(pI);options=U($s,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=U(pv);createViewTransition=U(fI,{optional:!0});navigationErrorHandler=U(mI,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>C(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=r=>this.events.next(new K_(r)),n=r=>this.events.next(new ev(r));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let n=++this.navigationId;lt(()=>{this.transitions?.next(ve(F({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:n,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new qt(null),this.transitions.pipe(ke(n=>n!==null),fe(n=>{let r=!1,o=new AbortController,s=()=>!r&&this.currentTransition?.id===n.id;return C(n).pipe(fe(a=>{if(this.navigationId>n.id)return this.cancelNavigationTransition(n,"",ci.SupersededByNewNavigation),kn;this.currentTransition=n;let l=this.lastSuccessfulNavigation();this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:l?ve(F({},l),{previousNavigation:null}):null,abort:()=>o.abort(),routesRecognizeHandler:a.routesRecognizeHandler,beforeActivateHandler:a.beforeActivateHandler});let c=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!c&&d!=="reload")return this.events.next(new Ko(a.id,this.urlSerializer.serialize(a.rawUrl),"",Fd.IgnoredSameUrlNavigation)),a.resolve(!1),kn;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return C(a).pipe(fe(p=>(this.events.next(new Xo(p.id,this.urlSerializer.serialize(p.extractedUrl),p.source,p.restoredState)),p.id!==this.navigationId?kn:Promise.resolve(p))),O5(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),we(p=>{n.targetSnapshot=p.targetSnapshot,n.urlAfterRedirects=p.urlAfterRedirects,this.currentNavigation.update(y=>(y.finalUrl=p.urlAfterRedirects,y)),this.events.next(new Tf)}),fe(p=>re(n.routesRecognizeHandler.deferredHandle??C(void 0)).pipe(P(()=>p))),we(()=>{let p=new wf(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(p)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:p,extractedUrl:y,source:b,restoredState:T,extras:W}=a,j=new Xo(p,this.urlSerializer.serialize(y),b,T);this.events.next(j);let ee=SN(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=n=ve(F({},a),{targetSnapshot:ee,urlAfterRedirects:y,extras:ve(F({},W),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(De=>(De.finalUrl=y,De)),C(n)}else return this.events.next(new Ko(a.id,this.urlSerializer.serialize(a.extractedUrl),"",Fd.IgnoredByUrlHandlingStrategy)),a.resolve(!1),kn}),P(a=>{let l=new Q_(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);return this.events.next(l),this.currentTransition=n=ve(F({},a),{guards:QG(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),n}),s5(a=>this.events.next(a)),fe(a=>{if(n.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw av(this.urlSerializer,a.guardsResult);let l=new Z_(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);if(this.events.next(l),!s())return kn;if(!a.guardsResult)return this.cancelNavigationTransition(a,"",ci.GuardRejected),kn;if(a.guards.canActivateChecks.length===0)return C(a);let c=new J_(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);if(this.events.next(c),!s())return kn;let d=!1;return C(a).pipe(N5(this.paramsInheritanceStrategy),we({next:()=>{d=!0;let p=new X_(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(p)},complete:()=>
11{d||this.cancelNavigationTransition(a,"",ci.NoDataFromResolver)}}))}),rN(a=>{let l=d=>{let p=[];if(d.routeConfig?._loadedComponent)d.component=d.routeConfig?._loadedComponent;else if(d.routeConfig?.loadComponent){let y=d._environmentInjector;p.push(this.configLoader.loadComponent(y,d.routeConfig).then(b=>{d.component=b}))}for(let y of d.children)p.push(...l(y));return p},c=l(a.targetSnapshot.root);return c.length===0?C(a):re(Promise.all(c).then(()=>a))}),rN(()=>this.afterPreactivation()),fe(()=>{let{currentSnapshot:a,targetSnapshot:l}=n,c=this.createViewTransition?.(this.environmentInjector,a.root,l.root);return c?re(c).pipe(P(()=>n)):C(n)}),hi(1),fe(a=>{let l=WG(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);this.currentTransition=n=a=ve(F({},a),{targetRouterState:l}),this.currentNavigation.update(d=>(d.targetRouterState=l,d)),this.events.next(new Ud);let c=n.beforeActivateHandler.deferredHandle;return c?re(c.then(()=>a)):C(a)}),we(a=>{new KE(e.routeReuseStrategy,n.targetRouterState,n.currentRouterState,l=>this.events.next(l),this.inputBindingEnabled).activate(this.rootContexts),s()&&(r=!0,this.currentNavigation.update(l=>(l.abort=j5,l)),this.lastSuccessfulNavigation.set(lt(this.currentNavigation)),this.events.next(new Ci(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0))}),El(xN(o.signal).pipe(ke(()=>!r&&!n.targetRouterState),we(()=>{this.cancelNavigationTransition(n,o.signal.reason+"",ci.Aborted)}))),we({complete:()=>{r=!0}}),El(this.transitionAbortWithErrorSubject.pipe(we(a=>{throw a}))),Gi(()=>{o.abort(),r||this.cancelNavigationTransition(n,"",ci.SupersededByNewNavigation),this.currentTransition?.id===n.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),z(a=>{if(r=!0,this.destroyed)return n.resolve(!1),kn;if(AN(a))this.events.next(new Nr(n.id,this.urlSerializer.serialize(n.extractedUrl),a.message,a.cancellationCode)),YG(a)?this.events.next(new Bd(a.url,a.navigationBehaviorOptions)):n.resolve(!1);else{let l=new oc(n.id,this.urlSerializer.serialize(n.extractedUrl),a,n.targetSnapshot??void 0);try{let c=Vn(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(c instanceof Hd){let{message:d,cancellationCode:p}=av(this.urlSerializer,c);this.events.next(new Nr(n.id,this.urlSerializer.serialize(n.extractedUrl),d,p)),this.events.next(new Bd(c.redirectTo,c.navigationBehaviorOptions))}else throw this.events.next(l),a}catch(c){this.options.resolveNavigationPromiseOnError?n.resolve(!1):n.reject(c)}}return kn}))}))}cancelNavigationTransition(e,n,r){let o=new Nr(e.id,this.urlSerializer.serialize(e.extractedUrl),n,r);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=lt(this.currentNavigation),r=n?.targetBrowserUrl??n?.extractedUrl;return e.toString()!==r?.toString()&&!n?.extras.skipLocationChange}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function H5(t){return t!==kd}var HN=new le("");var $N=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:()=>U($5),providedIn:"root"})}return t})(),cv=class{shouldDetach(i){return!1}store(i,e){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,e){return i.routeConfig===e.routeConfig}shouldDestroyInjector(i){return!0}},$5=(()=>{class t extends cv{static \u0275fac=(()=>{let e;return function(r){return(e||(e=_r(t)))(r||t)}})();static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),hv=(()=>{class t{urlSerializer=U(Ga);options=U($s,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=U(Rr);urlHandlingStrategy=U(pv);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new bi;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:n,targetBrowserUrl:r}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,n):n,s=r??o;return s instanceof bi?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:n,initialUrl:r}){n&&e?(this.currentUrlTree=n,this.rawUrlTree=this.urlHandlingStrategy.merge(n,r),this.routerState=e):this.rawUrlTree=r}routerState=SN(null,U(Jt));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:()=>U(G5),providedIn:"root"})}return t})(),G5=(()=>{class t extends hv{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(n=>{n.type==="popstate"&&setTimeout(()=>{e(n.url,n.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(e,n){e instanceof Xo?this.updateStateMemento():e instanceof Ko?this.commitTransition(n):e instanceof wf?this.urlUpdateStrategy==="eager"&&(n.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(n),n)):e instanceof Ud?(this.commitTransition(n),this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(n),n)):e instanceof Nr&&!CN(e)?this.restoreHistory(n):e instanceof oc?this.restoreHistory(n,!0):e instanceof Ci&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:n,id:r}){let{replaceUrl:o,state:s}=n;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,l=F(F({},s),this.generateNgRouterState(r,a));this.location.replaceState(e,"",l)}else{let a=F(F({},s),this.generateNgRouterState(r,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,n=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,o=this.currentPageId-r;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,n){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=_r(t)))(r||t)}})();static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function mv(t,i){t.events.pipe(ke(e=>e instanceof Ci||e instanceof Nr||e instanceof oc||e instanceof Ko),P(e=>e instanceof Ci||e instanceof Ko?0:(e instanceof Nr?e.code===ci.Redirect||e.code===ci.SupersededByNewNavigation:!1)?2:1),ke(e=>e!==2),hi(1)).subscribe(()=>{i()})}var ft=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=U(Fg);stateManager=U(hv);options=U($s,{optional:!0})||{};pendingTasks=U(Lo);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=U(fv);
11urlSerializer=U(Ga);location=U(Rr);urlHandlingStrategy=U(pv);injector=U(Jt);_events=new Ot;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=U($N);injectorCleanup=U(HN,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=U(lc,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!U(Pf,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new gn;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(n=>{try{let r=this.navigationTransitions.currentTransition,o=lt(this.navigationTransitions.currentNavigation);if(r!==null&&o!==null){if(this.stateManager.handleRouterEvent(n,o),n instanceof Nr&&n.code!==ci.Redirect&&n.code!==ci.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof Ci)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(n instanceof Bd){let s=n.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),l=F({scroll:r.extras.scroll,browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||H5(r.source)},s);this.scheduleNavigation(a,kd,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}$G(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortWithErrorSubject.next(r)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),kd,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,n,r,o)=>{this.navigateToSyncWithBrowser(e,r,n,o)})}navigateToSyncWithBrowser(e,n,r,o){let s=r?.navigationId?r:null;if(r){let l=F({},r);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let a=this.parseUrl(e);this.scheduleNavigation(a,n,s,o).catch(l=>{this.disposed||this.injector.get(Yi)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return lt(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(uI),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,n={}){let{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=n,c=l?this.currentUrlTree.fragment:s,d=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":d=F(F({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}d!==null&&(d=this.removeEmptyProps(d));let p;try{let y=r?r.snapshot:this.routerState.snapshot.root;p=_N(y)}catch(y){(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),p=this.currentUrlTree.root}return vN(p,e,d,c??null,this.urlSerializer)}navigateByUrl(e,n={skipLocationChange:!1}){let r=$a(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,kd,null,n)}navigate(e,n={skipLocationChange:!1}){return W5(e),this.navigateByUrl(this.createUrlTree(e,n),n)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch(n){return this.console.warn(fr(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,n){let r;if(n===!0?r=F({},rI):n===!1?r=F({},Ef):r=F(F({},Ef),n),$a(e))return WE(this.currentUrlTree,e,r);let o=this.parseUrl(e);return WE(this.currentUrlTree,o,r)}removeEmptyProps(e){return Object.entries(e).reduce((n,[r,o])=>(o!=null&&(n[r]=o),n),{})}scheduleNavigation(e,n,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((p,y)=>{a=p,l=y});let d=this.pendingTasks.add();return mv(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}
11),c.catch(Promise.reject.bind(Promise))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function W5(t){for(let i=0;i<t.length;i++)if(t[i]==null)throw new Z(4008,!1)}var z5=(()=>{class t{router=U(ft);stateManager=U(hv);fragment=V("");queryParams=V({});path=V("");serializer=U(Ga);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof Ci&&this.updateState()})}updateState(){let{fragment:e,root:n,queryParams:r}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(r),this.path.set(this.serializer.serialize(new bi(n)))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),gv=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=U(new Gg("href"),{optional:!0});reactiveHref=gS(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return lt(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return lt(this._target)}_target=V(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return lt(this._queryParams)}_queryParams=V(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return lt(this._fragment)}_fragment=V(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return lt(this._queryParamsHandling)}_queryParamsHandling=V(void 0);set state(e){this._state.set(e)}get state(){return lt(this._state)}_state=V(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return lt(this._info)}_info=V(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return lt(this._relativeTo)}_relativeTo=V(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return lt(this._preserveFragment)}_preserveFragment=V(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return lt(this._skipLocationChange)}_skipLocationChange=V(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return lt(this._replaceUrl)}_replaceUrl=V(!1);isAnchorElement;onChanges=new Ot;applicationErrorHandler=U(Yi);options=U($s,{optional:!0});reactiveRouterState=U(z5);constructor(e,n,r,o,s,a){this.router=e,this.route=n,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a;let l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=l==="a"||l==="area"||!!(typeof customElements=="object"&&customElements.get(l)?.observedAttributes?.includes?.("href"))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=V(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):($a(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,n,r,o,s){let a=this._urlTree();if(a===null||this.isAnchorElement&&(e!==0||n||r||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let l={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,l)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,n){let r=this.renderer,o=this.el.nativeElement;n!==null?r.setAttribute(o,e,n):r.removeAttribute(o,e)}_urlTree=Xe(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=r=>r==="preserve"||r==="merge";(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let n=this.routerLinkInput();return n===null||!this.router.createUrlTree?null:$a(n)?n:this.router.createUrlTree(n,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,n)=>this.computeHref(e)===this.computeHref(n)});get urlTree(){return lt(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null}static \u0275fac=function(n){return new(n||t)(f(ft),f(_t),wp("tabindex"),f(Zi),f(Cn),f(ho
11))};static \u0275dir=Bt({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(n,r){n&1&&A("click",function(s){return r.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),n&2&&jo("href",r.reactiveHref(),MC)("target",r._target())},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",zl],skipLocationChange:[2,"skipLocationChange","skipLocationChange",zl],replaceUrl:[2,"replaceUrl","replaceUrl",zl],routerLink:"routerLink"},features:[Un]})}return t})(),q5=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new Y;link=U(gv,{optional:!0});constructor(e,n,r,o){this.router=e,this.element=n,this.renderer=r,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(s=>{s instanceof Ci&&this.update()})}ngAfterContentInit(){C(this.links.changes,C(null)).pipe(Ao()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(n=>!!n).map(n=>n.onChanges);this.linkInputChangesSubscription=re(e).pipe(Ao()).subscribe(n=>{this._isActive!==this.isLinkActive(this.router)(n)&&this.update()})}set routerLinkActive(e){let n=Array.isArray(e)?e:e.split(" ");this.classes=n.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(n=>{e?this.renderer.addClass(this.element.nativeElement,n):this.renderer.removeClass(this.element.nativeElement,n)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let n=Y5(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact??!1?F({},rI):F({},Ef);return r=>{let o=r.urlTree;return o?lt(oI(o,e,n)):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(n){return new(n||t)(f(ft),f(Cn),f(Zi),f(Pe))};static \u0275dir=Bt({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(n,r,o){if(n&1&&Ia(o,gv,5),n&2){let s;be(s=Ce())&&(r.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Un]})}return t})();function Y5(t){let i=t;return!!(i.paths||i.matrixParams||i.queryParams||i.fragment)}var Nf=class{};var GN=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,n,r,o){this.router=e,this.injector=n,this.preloadingStrategy=r,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(ke(e=>e instanceof Ci),dr(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription?.unsubscribe()}processRoutes(e,n){let r=[];for(let o of n){o.providers&&!o._injector&&(o._injector=rd(o.providers,e,""));let s=o._injector??e;o._loadedNgModuleFactory&&!o._loadedInjector&&(o._loadedInjector=o._loadedNgModuleFactory.create(s).injector);let a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return re(r).pipe(Ao())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{if(e.destroyed)return C(null);let r;n.loadChildren&&n.canLoad===void 0?r=re(this.loader.loadChildren(e,n
vendor: 5,324 bytes, line 11
11)):r=C(null);let o=r.pipe(_n(s=>s===null?C(void 0):(n._loadedRoutes=s.routes,n._loadedInjector=s.injector,n._loadedNgModuleFactory=s.factory,this.processRoutes(s.injector??e,s.routes))));if(n.loadComponent&&!n._loadedComponent){let s=this.loader.loadComponent(e,n);return re([o,s]).pipe(Ao())}else return o})}static \u0275fac=function(n){return new(n||t)(h(ft),h(Jt),h(Nf),h(uv))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),WN=new le(""),Q5=(()=>{class t{options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=kd;restoredId=0;store={};urlSerializer=U(Ga);zone=U(ut);viewportScroller=U(SE);transitions=U(fv);constructor(e){this.options=e,this.options.scrollPositionRestoration||="disabled",this.options.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Xo?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ci?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof Ko&&e.code===Fd.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{if(!(e instanceof Vd)||e.scrollBehavior==="manual")return;let n={behavior:"instant"};e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0],n):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position,n):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(e,n){let r=lt(this.transitions.currentNavigation)?.extras.scroll;this.zone.runOutsideAngular(()=>Vt(this,null,function*(){yield new Promise(o=>{setTimeout(o),typeof requestAnimationFrame<"u"&&requestAnimationFrame(o)}),this.zone.run(()=>{this.transitions.events.next(new Vd(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,n,r))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(n){JC()};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})();function Z5(t,...i){return Ts([{provide:lc,multi:!0,useValue:t},[],{provide:_t,useFactory:zN},{provide:Fp,multi:!0,useFactory:qN},i.map(e=>e.\u0275providers)])}function zN(){return U(ft).routerState.root}function Wd(t,i){return{\u0275kind:t,\u0275providers:i}}function qN(){let t=U(Ut);return i=>{let e=t.get(si);if(i!==e.components[0])return;let n=t.get(ft),r=t.get(YN);t.get(_I)===1&&n.initialNavigation(),t.get(JN,null,{optional:!0})?.setUpPreloading(),t.get(WN,null,{optional:!0})?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var YN=new le("",{factory:()=>new Ot}),_I=new le("",{factory:()=>1});function QN(){let t=[{provide:Cg,useValue:!0},{provide:_I,useValue:0},Bg(()=>{let i=U(Ut);return i.get(IS,Promise.resolve()).then(()=>new Promise(n=>{let r=i.get(ft),o=i.get(YN);mv(r,()=>{n(!0)}),i.get(fv).afterPreactivation=()=>(n(!0),o.closed?C(void 0):o),r.initialNavigation()}))})];return Wd(2,t)}function ZN(){let t=[Bg(()=>{U(ft).setUpLocationChangeListener()}),{provide:_I,useValue:2}];return Wd(3,t)}var JN=new le("");function XN(t){return Wd(0,[{provide:JN,useExisting:GN},{provide:Nf,useExisting:t}])}function J5(t){return Wd(5,[{provide:$s,useValue:t}])}function KN(){return Wd(8,[cI,{provide:Pf,useExisting:cI}])}function e1(t){Mi("NgRouterViewTransitions");let i=[{provide:fI,useValue:jN},{provide:hI,useValue:F({skipNextTransition:!!t?.skipInitialTransition},t)}];return Wd(9,i)}var t1=[Rr,{provide:Ga,useClass:Hs},ft,ac,{provide:_t,useFactory:zN},uv,[]],X5=(()=>{class t{constructor(){}static forRoot(e,n){return{ngModule:t,providers:[t1,[],{provide:lc,multi:!0,useValue:e},[],n?.errorHandler?{provide:mI,useValue:n.errorHandler}:[],{provide:$s,useValue:n||{}},n?.useHash?e4():t4(),K5(),n?.preloadingStrategy?XN(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?n4(n):[],n?.bindToComponentInputs?KN().\u0275providers:[],n?.enableViewTransitions?e1().\u0275providers:[],i4()]}}static forChild(e){return{ngModule:t,providers:[{provide:lc,multi:!0,useValue:e}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=Ji({type:t});static \u0275inj=Ri({})}return t})();function K5(){return{provide:WN,useFactory:()=>{let t=U(SE),i=U($s);return i.scrollOffset&&t.setOffset(i.scrollOffset),new Q5(i)}}}function e4(){return{provide:ho,useClass:vE}}function t4(){return{provide:ho,useClass:E_}}function n4(t){return[t.initialNavigation==="disabled"?ZN().\u0275providers:[],t.initialNavigation==="enabledBlocking"?QN().\u0275providers:[]]}var gI=new le("");function i4(){return[{provide:gI,useFactory:qN},{provide:Fp,multi:!0,useExisting:gI}]}
11var vI=(function(t){return t.alias="alias",t})(vI||{});var yI=(function(t){return t.SS_STREAM_GONE="SS_STREAM_GONE",t})(yI||{}),zd=(function(t){return t.VOD="VOD",t.ADULT="ADULT",t})(zd||{});var kf=class{constructor(i,e,n,r){this.id=i,this.entitlementId=n,this.type=e,this.serial=r}};var Wa=class{constructor(i=[],e){this.stbs=i,this.npvrStb=e}getStbs(i=!0){return i&&this.npvrStb?[...this.stbs,this.npvrStb]:this.stbs}getNpvrStb(){return this.npvrStb}hasNpvrBox(){return!!this.npvrStb}};var qd=class{constructor(i,e){Object.keys(i).forEach(n=>this[n]=i[n]),this.maxLengthProfileName=e}getProfileName(){return this.profile.name.length>this.maxLengthProfileName?this.profile.name.substring(0,this.maxLengthProfileName)+"...":this.profile.name}getAvatar(){return this.image?ot.createImageUrl(this.image,me.AVATAR_1):void 0}updateProfile(i,e){this.profile.avatar=i.avatar,this.profile.name=i.name,this.profile.catalog=i.catalog,e&&(this.image=e.image)}},_v=class{constructor(i){Object.keys(i).forEach(e=>this[e]=i[e]),this.activeCatalogId=sessionStorage.getItem(ir.anonymous_catalog)||this.defaultCatalogId}setActiveCatalogId(i){sessionStorage.setItem(ir.anonymous_catalog,i),this.activeCatalogId=i}getAvatar(){let i=this.catalogs.find(e=>e.id===this.activeCatalogId);return i?ot.createImageUrl(i.avatar,me.AVATAR_1):""}};var cn=(function(t){return t.VOD="VOD",t.PROGRAM="PROGRAM",t.SERIES="SERIES",t.CHANNEL="CHANNEL",t})(cn||{}),Gs=(function(t){return t.CHANNEL="CHANNEL",t})(Gs||{}),vo=(function(t){return t.VOD="VOD",t.PROGRAM="PROGRAM",t})(vo||{}),kr=(function(t){return t.SCHEDULE="SCHEDULE",t})(kr||{});var en=(()=>{class t{constructor(e,n){this.business=e,this.http=n,this.location=this.business.client.bootstrap.discovery.location}getFavorites(e,n){let r=new mt().append("profileId",e).append("catalogId",n);return this.http.get(`${this.location}/history/v2/favorite`,{params:r})}setFavorite(e,n,r){let o=new mt().append("profileId",e),s={};return this.http.put(`${this.location}/history/v1/favorite/${encodeURIComponent(n)}/${encodeURIComponent(r)}`,s,{params:o})}deleteFavorite(e,n,r){let o=new mt().append("profileId",e);return this.http.delete(`${this.location}/history/v1/favorite/${encodeURIComponent(n)}/${encodeURIComponent(r)}`,{params:o})}getBookmarks(e,n){let r=new mt().append("profileId",e).append("catalogId",n);return this.http.get(`${this.location}/history/v2/bookmark`,{params:r})}setBookmark(e,n,r,o){let s=new mt().append("profileId",e);return this.http.put(`${this.location}/history/v1/bookmark/${encodeURIComponent(n)}/${encodeURIComponent(r)}`,o,{params:s})}getBookmark(e,n,r){let o=new mt().append("profileId",e);return this.http.get(`${this.location}/history/v2/bookmark/${encodeURIComponent(n)}/${encodeURIComponent(r)}`,{params:o})}deleteBookmark(e,n,r){let o=new mt().append("profileId",e);return this.http.delete(`${this.location}/history/v1/bookmark/${encodeURIComponent(n)}/${encodeURIComponent(r)}`,{params:o})}getSettingForDevice(e,n){return this.http.get(`${this.location}/history/v1/settings/${encodeURIComponent(e)}/${encodeURIComponent(n)}`)}setSettingForDevice(e,n,r){let o={value:r};return this.http.put(`${this.location}/history/v1/settings/${encodeURIComponent(e)}/${encodeURIComponent(n)}`,o)}getAllDeviceSettings(e){return this.http.get(`${this.location}/history/v1/settings/${encodeURIComponent(e)}`)}getCustomerSetting(e){return this.http.get(`${this.location}/history/v1/customer/settings/${encodeURIComponent(e)}`)}setCustomerSetting(e,n){let r={value:n};return this.http.put(`${this.location}/history/v1/customer/settings/${encodeURIComponent(e)}`,r)}getReminders(e){let n=new mt().append("profileId",e);return this.http.get(`${this.location}/history/v1/reminder`,{params:n})}deleteReminder(e,n){let r=new mt().append("profileId",e);return this.http.delete(`${this.location}/history/v1/reminder/${encodeURIComponent(kr.SCHEDULE)}/${encodeURIComponent(n)}`,{params:r})}setReminder(e,n,r){let o=new mt().append("profileId",e),s={minutes:r||0};return this.http.put(`${this.location}/history/v1/reminder/${encodeURIComponent(kr.SCHEDULE)}/${encodeURIComponent(n)}`,s,{params:o})}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(on))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Rn=(function(t){return t.TRACK="TRACK",t.ADVERTISEMENT="ADVERTISEMENT",t.PLAYER="PLAYER",t.AUTHENTICATE="AUTHENTICATE",t.STARTUP="STARTUP",t.SWIPE="SWIPE",t.RECORDING="RECORDING",t.ARTICLE="ARTICLE",t.LOG="LOG",t.AUTOPLAY="AUTOPLAY",t.PROFILE="PROFILE",t.U
11RL_MAPPER="URL_MAPPER",t})(Rn||{}),za=(function(t){return t.PAGE_VIEW="PAGE_VIEW",t.LOAD_DETAIL="LOAD_DETAIL",t.BANNER="BANNER",t.POPUP="POPUP",t.SWITCH_CATALOG="SWITCH_CATALOG",t.SWITCH_PROFILE="SWITCH_PROFILE",t})(za||{}),Ws=class{constructor(i){this.type=Rn.TRACK,this.subType=i}},bI=(function(t){return t.ADVERTISEMENT_END="ADVERTISEMENT_END",t.ADVERTISEMENT_ERROR="ADVERTISEMENT_ERROR",t})(bI||{}),vv=class{constructor(i){this.type=Rn.ADVERTISEMENT,this.subType=i}},Si=(function(t){return t.PLAY_START="PLAY_START",t.PLAYING="PLAYING",t.PLAY_STOP="PLAY_STOP",t.KEEP_ALIVE_ERROR="KEEP_ALIVE_ERROR",t.PLAY_STATE="PLAY_STATE",t.PLAY_ERROR="PLAY_ERROR",t.PLAY_WARNING="PLAY_WARNING",t})(Si||{}),di=class{constructor(i){this.type=Rn.PLAYER,this.subType=i}},qa=(function(t){return t.LOGIN="LOGIN",t.LOGOUT="LOGOUT",t.STATE="STATE",t})(qa||{}),Yd=class{constructor(i){this.type=Rn.AUTHENTICATE,this.subType=i}},Vf=(function(t){return t.APP_OPEN="APP_OPEN",t})(Vf||{}),yv=class{constructor(i){this.type=Rn.STARTUP,this.subType=i}},CI=(function(t){return t.SWIPE="SWIPE",t})(CI||{}),bv=class{constructor(i){this.type=Rn.SWIPE,this.subType=i}},Qd=(function(t){return t.REC_PLANNED="REC_PLANNED",t.REC_REMOVED="REC_REMOVED",t.REC_CANCEL="REC_CANCEL",t.REC_CHANGED="REC_CHANGED",t})(Qd||{}),cc=class{constructor(i){this.type=Rn.RECORDING,this.subType=i}},Sv=(function(t){return t.PAGE_VIEW="PAGE_VIEW",t.ACTION="ACTION",t})(Sv||{}),Lf=class{constructor(i){this.type=Rn.ARTICLE,this.subType=i}},SI=(function(t){return t.LOG_LOGGING_ERROR="LOG_LOGGING_ERROR",t})(SI||{}),Cv=class{constructor(i){this.type=Rn.LOG,this.subType=i}},Zd=(function(t){return t.PAGE_VIEW="PAGE_VIEW",t.ACTION="ACTION",t})(Zd||{}),dc=class{constructor(i){this.type=Rn.AUTOPLAY,this.subType=i}},Jd=(function(t){return t.ADD_PROFILE="ADD_PROFILE",t.EDIT_PROFILE="EDIT_PROFILE",t.DELETE_PROFILE="DELETE_PROFILE",t.ERROR="ERROR",t})(Jd||{}),uc=class{constructor(i){this.type=Rn.PROFILE,this.subType=i}},Ev=(function(t){return t.TRACK="TRACK",t.ERROR="ERROR",t})(Ev||{}),Ff=class{constructor(i){this.type=Rn.URL_MAPPER,this.subType=i}};var ne=(()=>{class t{constructor(e){this.config=e,this._anonymousCatalogs=[],this.allowProfileSwitching=!1,this._isAnonymous=!0,this._catalogId="",this._profileId="",this._avatarUrl="",this._stbList=new Wa,this.features=[],this.profileName="",this._customerName="",this._deviceId="",this._entitlementId="",this._customerId="",this._loginName="",this.enabledAnalytics=[]}setAnonymous(e,n){this._authorizedSession=void 0,this._isAnonymous=!0,this._catalogId=e.activeCatalogId,this._profileId=e.defaultProfileId,this._avatarUrl=e.getAvatar(),this._stbList=new Wa,this.features=[],this.profileName="",this._customerName="",this._entitlementId=e.defaultEntitlementId,this._customerId="",this._loginName="",this.enabledAnalytics=n,this.allowProfileSwitching=!1;let r=localStorage.getItem(Te.anonymous_device_id);r||(r=$.guid(),localStorage.setItem(Te.anonymous_device_id,r)),this._deviceId=r}setAuthorized(e,n,r){this._authorizedSession=e,this._isAnonymous=!1,this._stbList=r,this.features=e.customer.features??[],this._customerName=e.customer.displayName??"",this._deviceId=e.device.id,this._entitlementId=e.device.entitlementId,this._customerId=e.customer.id,this._loginName=e.customer.loginName??"",this.enabledAnalytics=e.analytics??[],this.updateProfile(n),this.allowProfileSwitching=this.config.getSettingBoolean(x.allowProfileSwitching,!1)||this.sessionIncludesFeature(ll.ALLOW_PROFILES),localStorage.setItem(Te.auth_device_id,this._deviceId)}updateProfile(e){this._catalogId=e.profile.catalog,this._profileId=e.id,this._avatarUrl=e.getAvatar()??"",this.profileName=e.getProfileName()}updateAnonymousCatalog(e){sessionStorage.setItem(ir.anonymous_catalog,e),this._catalogId=e}set anonymousCatalogs(e){this._anonymousCatalogs=e}get anonymousCatalogs(){return this._anonymousCatalogs}get catalogId(){return this._catalogId}get stbList(){return this._stbList}get isAnonymous(){return this._isAnonymous}sessionIncludesFeature(e){return this.features.includes(e)}get getDisplayName(){return this.allowProfileSwitching&&this.profileName?this.profileName:this._customerName}get customerName(){return this._customerName}get deviceId(){return this._deviceId}get authDeviceId(){return localStorage.getItem(Te.auth_device_id)??void 0}get profileId(){return this._profileId}get entitlementId(){return this._entitlementId}get customerId(){return this._customerId}get loginName(){return this._loginName}getLoginContext(){return{userId:this.loginName,customerId:this.customerId,deviceId:this.deviceId,profileId:this.profileId,catalogId:this.catalogId,entitlementId:this.entitlementId}}analyticsCategoryEnabled(e){if(e.type===void 0)return!1;let n=this.enabledAnalytics.find(r=>r.category===e.type);return n?.subcategories&&e.subType!==void 0?n.subcategories.some(r=>r===e.subType.toString()):e.type===Rn.AUTHENTICATE&&e.subType===qa.LOGIN||e.type===Rn.STARTUP&&e.subType===Vf.APP_OPEN||e.type===Rn.AUTHENTICATE&&e.subType===qa.STATE}get avatarUrl(){return this._avatarUrl}get authorizedSession(){return this._authorizedSession}static{this.\u0275fac=function(n){return new(n||t)(h(O))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Xd=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y){this.apiApi=e,this.aaApi=n,this.historyApi=r,this.config=o,this.messages=s,this.info=a,this.router=l,this.location=c,this.environment=d,this.bff=p,this.authorization=y,this.previousRoute="",this.maxLengthProfileName=this.config.getSettingNumber(x.maxLengthProfileName,25),t.isLoginFromIframe()||this.router.events.subscribe(b=>{b instanceof Xo&&(this.previousRoute=this.router.url)})}loadAnonymousSession(){return this.checkTimeDiff().pipe(P(()=>{let e=new _v(this.config.getAnonymousSettings()),n=this.config.getSettingString(x.unauthorizedAnalytics,'[{"category": "PLAYER","subcategories": ["PLAY_STATE","KEEP_ALIVE_ERROR","PLAY_START","PLAY_ERROR","PLAY_WARNING","PLAYING","PLAY_STOP"]}]'),r=[];n&&(r=JSON.parse(n)),this.info.setAnonymous(e,r),this.info.anonymousCatalogs=e.catalogs??[]}))}switchCatalog(e){this.info.updateAnonymousCatalog(e)}loadAuthorizedSession(e){let n,r,o;return this.checkTimeDiff().pipe(fe(()=>e?C(e):this.apiApi.getSessionV5(this.createSessionRequest())),fe(s=>(n=s,this.authorization.setAuthorizationFromSession(s.sessionId),n.npvr?.id&&(o=new kf(n.npvr.id),o.alias=this.config.getTranslation(ji.recordings_npvr_settopbox_name)),this.aaApi.getBaseProfileForDevice(n.device.id))),fe(s=>{if(r=s,n.stbs){let a=n.stbs.map(l=>new kf(l.id,l.type,l.entitlementId,l.serial));return this.loadStbNameSetting(a)}else return C(void 0)}),P(s=>{let a;s?a=new Wa(s,o):a=new Wa([],o),this.info.setAuthorized(n,new qd(r,this.maxLengthProfileName),a)}))}endAuthorizedSession(){return this.apiApi.deleteSession().pipe(z(()=>C(void 0)))}createSessionRequest(){if(!this.bff.activeProvider?.providerId)throw new Error("[Session] - no provider available");return{deviceType:this.environment.platform,deviceId:this.info.authDeviceId,providerId:this.bff.activeProvider?.providerId,version:{app:co.version}}}switchProfile(e){return this.aaApi.switchProfile(this.info.deviceId,e).pipe(P(n=>{this.info.updateProfile(new qd(n,this.maxLengthProfileName))}))}updateProfile(e){this.info.updateProfile(new qd(e,this.maxLengthProfileName))}checkTimeDiff(){return this.apiApi.getServerTime().pipe(we(e=>{let n=this.config.getSettingNumber(x.startupTimeDifference,12e4),r=$.timeStr
11ingToMs(e.time)-new Date().getTime();Math.abs(r)>n&&this.messages.showErrorMessage(this.config.getTranslation(ge.error_device_time))}),z(()=>C(void 0)))}loadStbNameSetting(e){let n=[];return e.forEach(r=>{n.push(this.historyApi.getAllDeviceSettings(r.id).pipe(z(()=>C([]))))}),n.length===0?C(void 0):We(n).pipe(we(r=>{r.forEach((o,s)=>{let a=o.find(l=>l.name===vI.alias);a?e[s].alias=a.value:this.getFallBackDeviceAlias(e[s])})}),z(()=>C(void 0)),P(()=>e))}getFallBackDeviceAlias(e){e.alias=this.config.getTranslation(pe.detail_stb_fallback_name).replace("$1",e.serial?.slice(-4)??"")}goToPreviousRoute(){!this.previousRoute||this.previousRoute==="/"||this.previousRoute==="/account/login"||this.previousRoute.includes("#")||this.previousRoute===this.router.url?this.router.navigate(["/main"]):this.location.back()}static isLoginFromIframe(){return!!window.frameElement}static{this.\u0275fac=function(n){return new(n||t)(h(Ba),h(Or),h(en),h(O),h(_e),h(ne),h(ft),h(Rr),h(ae),h(Md),h(et))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Kn=[];for(let t=0;t<256;++t)Kn.push((t+256).toString(16).slice(1));function n1(t,i=0){return(Kn[t[i+0]]+Kn[t[i+1]]+Kn[t[i+2]]+Kn[t[i+3]]+"-"+Kn[t[i+4]]+Kn[t[i+5]]+"-"+Kn[t[i+6]]+Kn[t[i+7]]+"-"+Kn[t[i+8]]+Kn[t[i+9]]+"-"+Kn[t[i+10]]+Kn[t[i+11]]+Kn[t[i+12]]+Kn[t[i+13]]+Kn[t[i+14]]+Kn[t[i+15]]).toLowerCase()}var II,o4=new Uint8Array(16);function wI(){if(!II){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");II=crypto.getRandomValues.bind(crypto)}return II(o4)}var s4=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),TI={randomUUID:s4};function a4(t,i,e){t=t||{};let n=t.random??t.rng?.()??wI();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,i){if(e=e||0,e<0||e+16>i.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let r=0;r<16;++r)i[e+r]=n[r];return i}return n1(n)}function l4(t,i,e){return TI.randomUUID&&!i&&!t?TI.randomUUID():a4(t,i,e)}var Uf=l4;var Kd=(()=>{class t{constructor(){this.stopPlayerEvent=new Y,this.sendAnalyticsEvent=new Y,this.removeActiveTabEvent=new Y}startUnload(){this.stopPlayerEvent.emit(),this.sendAnalyticsEvent.emit(),this.removeActiveTabEvent.emit()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ct=(()=>{class t{constructor(e,n,r,o,s,a){this.config=e,this.sessionService=n,this.apiApi=r,this.environment=o,this.tokenCommunicationService=s,this.unloadService=a,this.analyticsFlushPeriod=this.config.getSettingNumber(x.analyticsFlushPeriod,3e5),this.analyticsPostBatchSize=this.config.getSettingNumber(x.analyticsPostBatchSize,50),this.maxNrOfFailedAnalytics=this.config.getSettingNumber(x.maxNrOfFailedAnalytics,10),this.startFlushPeriodTimeout(),this.deviceInfo={deviceId:this.sessionService.deviceId,platform:this.environment.platform},this.applicationInfo={name:"Web",version:co.version,build:co.buildTime},this.unloadService.sendAnalyticsEvent.subscribe(()=>this.unloadHandler()),this._userAnalyticsAllowed=localStorage.getItem(Te.user_analytics_allowed)!=="false"}get userAnalyticsAllowed(){return this._userAnalyticsAllowed}set userAnalyticsAllowed(e){this._userAnalyticsAllowed=e,localStorage.setItem(Te.user_analytics_allowed,e?"true":"false")}startFlushPeriodTimeout(){this.flushPeriodTimeout=setTimeout(()=>{this.sendBufferToServer()},this.analyticsFlushPeriod)}set deviceInfoId(e){this.deviceInfo.deviceId=e}appOpen(e){this.addToClientEventBuffer(new yv(Vf.APP_OPEN),e,[])}removeEmptyProperties(e){return e.filter(n=>!!n.value)}parseJSONString(e){try{return JSON.parse(e)||[]}catch(n){return[]}}unloadHandler(){if(!this.tokenCommunicationService.isMasterTab())return;this.flushPeriodTimeout&&(clearTimeout(this.flushPeriodTimeout),this.flushPeriodTimeout=void 0);let e=this.parseJSONString(localStorage.getItem(Te.client_events_buffer));localStorage.setItem(Te.client_events_buffer,JSON.stringify([]));let n=e.filter(r=>r.category.type===Rn.PLAYER);if(n.length!==0){let r={device:this.deviceInfo,app:this.applicationInfo,events:n};this.apiApi.sendLogBeacon(r)&&(e=e.filter(o=>o.category.type!==Rn.PLAYER)),localStorage.setItem(Te.client_events_buffer,JSON.stringify(e))}}sendBufferToServer(){this.flushPeriodTimeout&&(clearTimeout(this.flushPeriodTimeout),this.flushPeriodTimeout=void 0);let e=this.parseJSONString(localStorage.getItem(Te.client_events_buffer));localStorage.setItem(Te.client_events_buffer,JSON.stringify([])),this.processFailedLogging().subscribe(n=>{if(e.length!==0){let r={device:this.deviceInfo,app:this.applicationInfo,events:e};this.apiApi.log(r).subscribe({next:()=>{localStorage.setItem(Te.client_events_failed_buffer,JSON.stringify([]))},error:o=>{let s=[];if(o?.error){let c=new Yn(o);s.push(new v("errorId",c.errorId)),s.push(new v("errorCode",c.code)),s.push(new v("errorMessage",c.message))}s=this.removeEmptyProperties(s);let a=new pf(new Cv(SI.LOG_LOGGING_ERROR),this.sessionService.getLoginContext(),this.lastPageContext,s),l=o?.status?.toString()||"-1";l==="0"||l.startsWith("5")?(e.push(a),n.push(e)):n.push([a]),n.length>this.maxNrOfFailedAnalytics&&(n=n.slice(1)),localStorage.setItem(Te.client_events_failed_buffer,JSON.stringify(n))}})}else localStorage.setItem(Te.client_events_failed_buffer,JSON.stringify(n));this.startFlushPeriodTimeout()})}sendBuffer(e){let n={device:this.deviceInfo,app:this.applicationInfo,events:e};return this.apiApi.log(n).pipe(P(()=>[]),z(()=>C(e)))}processFailedLogging(){let e=this.parseJSONString(localStorage.getItem(Te.client_events_failed_buffer)),n=e.map(r=>this.sendBuffer(r));return e=[],We(n).pipe(Di([]),P(r=>(r.forEach(o=>{o&&o.length>0&&e.push(o)}),e)),z(()=>C([])))}playStartOld(e){this.playerStartTime=ie.now(),this.playerReferenceId=Uf();let n=[];n.push(new v("id",e.id)),n.push(new v("type",e.type)),n.push(new v("name",e.name)),n.push(new v("season",e.seasonNumber?e.seasonNumber.toFixed(0):"")),n.push(new v("episode",e.episodeNumber?e.episodeNumber.toFixed(0):"")),n.push(new v("scheduleId",e.scheduleId)),n.push(new v("programId",e.programId)),n.push(new v("streamId",e.streamId)),n.push(new v("channelId",e.channelId)),n.push(new v("channelName",e.channelName)),n.push(new v("referenceId",this.playerReferenceId)),this.addToClientEventBuffer(new di(Si.PLAY_START),void 0,n)}playStart(e){let n=[];n.push(new v("id",e.id)),n.push(new v("type",e.type)),n.push(new v("name",e.name)),n.push(new v("season",e.season?.toFixed(0)??"")),n.push(new v("episode",e.episode?.toFixed(0)??"")),n.push(new v("scheduleId",e.scheduleId)),n.push(new v("programId",e.programId)),n.push(new v("streamId",e.streamId)),n.push(new v("channelId",e.channelId)),n.push(new v("channelName",e.channelName)),n.push(new v("referenceId",e.referenceId)),this.addToClientEventBuffer(new di(Si.PLAY_START),void 0,n)}playPlayingOld(e){let n=[];n.push(new v("id",e.id)),n.push(new v("type",e.type)),n.push(new v("scheduleId",e.scheduleId)),n.push(new v("programId",e.programId)),n.push(new v("channelId",e.channelId)),n.push(new v("channelName",e.channelName)),n.push(new v("streamId",e.streamId)),n.push(new v("ssId",e.
11ssId)),n.push(new v("manifest",e.manifest)),n.push(new v("referenceId",this.playerReferenceId)),this.addToClientEventBuffer(new di(Si.PLAYING),void 0,n)}playPlaying(e,n){let r=[];r.push(new v("id",e.id)),r.push(new v("type",e.type)),r.push(new v("scheduleId",e.scheduleId)),r.push(new v("programId",e.programId)),r.push(new v("channelId",e.channelId)),r.push(new v("channelName",e.channelName)),r.push(new v("streamId",e.streamId)),r.push(new v("ssId",e.ssId)),r.push(new v("manifest",e.manifest)),r.push(new v("referenceId",e.referenceId)),n!==void 0&&r.push(new v("airplayUsed",n?"TRUE":"FALSE")),this.addToClientEventBuffer(new di(Si.PLAYING),void 0,r)}playStopOld(e,n){}playStop(e,n,r,o,s){let a=[];a.push(new v("id",e.id)),a.push(new v("type",e.type)),a.push(new v("name",e.name)),a.push(new v("season",e.season?.toFixed(0)??"")),a.push(new v("episode",e.episode?.toFixed(0)??"")),a.push(new v("time",r.toFixed(0))),a.push(new v("scheduleId",e.scheduleId)),a.push(new v("programId",e.programId)),a.push(new v("channelId",e.channelId)),a.push(new v("channelName",e.channelName)),a.push(new v("streamId",e.streamId)),a.push(new v("ssId",e.ssId)),a.push(new v("manifest",e.manifest)),a.push(new v("referenceId",e.referenceId)),s&&(s.provider&&a.push(new v("drm.provider",s.provider)),a.push(new v("drm.outputWidth",s.outputWidth?.toString())),a.push(new v("drm.outputHeight",s.outputHeight?.toString())),a.push(new v("drm.supportsHdr10",s.supportsHdr10?.toString())),s.widevineSecurity&&a.push(new v("drm.securityLevel",s.widevineSecurity))),a.push(new v("reason",n)),o!==void 0&&a.push(new v("airplayUsed",o?"TRUE":"FALSE")),this.addToClientEventBuffer(new di(Si.PLAY_STOP),void 0,a)}playerKeepAliveErrorOld(e,n){let r=[];r.push(new v("id",e.id)),r.push(new v("type",e.type)),r.push(new v("time",this.playerStartTime?ie.now().diff(this.playerStartTime).milliseconds.toFixed(0):"")),r.push(new v("scheduleId",e.scheduleId)),r.push(new v("programId",e.programId)),r.push(new v("channelId",e.channelId)),r.push(new v("channelName",e.channelName)),r.push(new v("errorId",n?n.errorId:"")),r.push(new v("errorCode",n?n.code:"")),r.push(new v("errorMessage",n?n.message:"")),r.push(new v("streamId",e.streamId)),r.push(new v("ssId",e.ssId)),r.push(new v("manifest",e.manifest)),r.push(new v("referenceId",this.playerReferenceId)),this.addToClientEventBuffer(new di(Si.KEEP_ALIVE_ERROR),void 0,r)}playerKeepAliveError(e,n,r,o){let s=[];s.push(new v("id",e.id)),s.push(new v("type",e.type)),s.push(new v("time",o?.toFixed(0)??"")),s.push(new v("scheduleId",e.scheduleId)),s.push(new v("programId",e.programId)),s.push(new v("channelId",e.channelId)),s.push(new v("channelName",e.channelName)),s.push(new v("errorId",n.id??"")),s.push(new v("errorCode",n.code??"")),s.push(new v("errorMessage",n.message??"")),s.push(new v("streamId",e.streamId)),s.push(new v("ssId",e.ssId)),s.push(new v("manifest",e.manifest)),s.push(new v("referenceId",e.referenceId)),r!==void 0&&s.push(new v("airplayUsed",r?"TRUE":"FALSE")),this.addToClientEventBuffer(new di(Si.KEEP_ALIVE_ERROR),void 0,s)}playStateOld(e,n,r){let o=[];o.push(new v("id",e.id)),o.push(new v("type",e.type)),o.push(new v("name",e.name)),o.push(new v("season",e.seasonNumber?e.seasonNumber.toFixed(0):"")),o.push(new v("episode",e.episodeNumber?e.episodeNumber.toFixed(0):"")),o.push(new v("scheduleId",e.scheduleId)),o.push(new v("programId",e.programId)),o.push(new v("channelId",e.channelId)),o.push(new v("channelName",e.channelName)),o.push(new v("state",n)),o.push(new v("originator",r)),o.push(new v("streamId",e.streamId)),o.push(new v("ssId",e.ssId)),o.push(new v("manifest",e.manifest)),o.push(new v("referenceId",this.playerReferenceId)),this.addToClientEventBuffer(new di(Si.PLAY_STATE),void 0,o)}playState(e,n,r,o){let s=[];s.push(new v("id",e.id)),s.push(new v("type",e.type)),s.push(new v("name",e.name)),s.push(new v("season",e.season?.toFixed(0)??"")),s.push(new v("episode",e.episode?.toFixed(0)??"")),s.push(new v("scheduleId",e.scheduleId)),s.push(new v("programId",e.programId)),s.push(new v("channelId",e.channelId)),s.push(new v("channelName",e.channelName)),s.push(new v("state",n)),s.push(new v("originator",r)),s.push(new v("streamId",e.streamId)),s.push(new v("ssId",e.
11ssId)),s.push(new v("manifest",e.manifest)),s.push(new v("referenceId",e.referenceId)),o!==void 0&&s.push(new v("airplayUsed",o?"TRUE":"FALSE")),this.addToClientEventBuffer(new di(Si.PLAY_STATE),void 0,s)}playErrorOld(e,n,r){let o=[],s=this.config.getSettingNumber(x.stackTraceMaximumLines,25),a="";try{a=Error().stack?.split(`
12`).slice(0,s).join(`
13`)??""}catch(l){}o.push(new v("id",e.id)),o.push(new v("type",e.type)),o.push(new v("name",e.name)),o.push(new v("season",e.seasonNumber?e.seasonNumber.toFixed(0):"")),o.push(new v("episode",e.episodeNumber?e.episodeNumber.toFixed(0):"")),o.push(new v("scheduleId",e.scheduleId)),o.push(new v("programId",e.programId)),o.push(new v("channelId",e.channelId)),o.push(new v("channelName",e.channelName)),o.push(new v("originator",n)),o.push(new v("errorCode",r?r.code:"")),o.push(new v("errorMessage",r?r.message:"")),o.push(new v("errorId",r?r.errorId:"")),o.push(new v("stackTrace",a??"")),o.push(new v("streamId",e.streamId)),o.push(new v("ssId",e.ssId)),o.push(new v("manifest",e.manifest)),o.push(new v("referenceId",this.playerReferenceId)),this.addToClientEventBuffer(new di(Si.PLAY_ERROR),void 0,o)}playError(e,n,r,o){let s=[],a=this.config.getSettingNumber(x.stackTraceMaximumLines,25),l="";try{l=Error().stack?.split(`
14`).slice(0,a).join(`
15`)??""}catch(c){}s.push(new v("id",e.id)),s.push(new v("type",e.type)),s.push(new v("name",e.name)),s.push(new v("season",e.season?.toFixed(0)??"")),s.push(new v("episode",e.episode?.toFixed(0)??"")),s.push(new v("scheduleId",e.scheduleId)),s.push(new v("programId",e.programId)),s.push(new v("channelId",e.channelId)),s.push(new v("channelName",e.channelName)),s.push(new v("originator",n)),s.push(new v("errorCode",r.code??"")),s.push(new v("errorMessage",r.message)),s.push(new v("errorId",r.id??"")),s.push(new v("stackTrace",l??"")),s.push(new v("streamId",e.streamId)),s.push(new v("ssId",e.ssId)),s.push(new v("manifest",e.manifest)),s.push(new v("referenceId",e.referenceId)),o!==void 0&&s.push(new v("airplayUsed",o?"TRUE":"FALSE")),this.addToClientEventBuffer(new di(Si.PLAY_ERROR),void 0,s)}playWarningOld(e,n){let r=[];r.push(new v("id",e.id)),r.push(new v("type",e.type)),r.push(new v("name",e.name)),r.push(new v("season",e.seasonNumber?e.seasonNumber.toFixed(0):"")),r.push(new v("episode",e.episodeNumber?e.episodeNumber.toFixed(0):"")),r.push(new v("scheduleId",e.scheduleId)),r.push(new v("programId",e.programId)),r.push(new v("channelId",e.channelId)),r.push(new v("channelName",e.channelName)),r.push(new v("errorCode",n?n.code:"")),r.push(new v("errorMessage",n?n.message:"")),r.push(new v("errorId",n?n.errorId:"")),r.push(new v("streamId",e.streamId)),r.push(new v("ssId",e.ssId)),r.push(new v("manifest",e.manifest)),r.push(new v("referenceId",this.playerReferenceId)),this.addToClientEventBuffer(new di(Si.PLAY_WARNING),void 0,r)}playWarning(e,n,r){let o=[];o.push(new v("id",e.id)),o.push(new v("type",e.type)),o.push(new v("name",e.name)),o.push(new v("season",e.season?.toFixed(0)??"")),o.push(new v("episode",e.episode?.toFixed(0)??"")),o.push(new v("scheduleId",e.scheduleId)),o.push(new v("programId",e.programId)),o.push(new v("channelId",e.channelId)),o.push(new v("channelName",e.channelName)),o.push(new v("errorCode",n.code??"")),o.push(new v("errorMessage",n.message)),o.push(new v("errorId",n.id??"")),o.push(new v("streamId",e.streamId)),o.push(new v("ssId",e.ssId)),o.push(new v("manifest",e.manifest)),o.push(new v("referenceId",e.referenceId)),r!==void 0&&o.push(new v("airplayUsed",r?"TRUE":"FALSE")),this.addToClientEventBuffer(new di(Si.PLAY_WARNING),void 0,o)}loadDetail(e,n,r){let o=[];o.push(new v("id",n)),o.push(new v("type",r)),this.addToClientEventBuffer(new Ws(za.LOAD_DETAIL),e,o)}login(e){this.addToClientEventBuffer(new Yd(qa.LOGIN),e,[])}logout(e){this.addToClientEventBuffer(new Yd(qa.LOGOUT),e,[])}authenticateState(e,n,r){let o=[];o.push(new v("success",e.toString())),r&&(o.push(new v("errorCode",r?r.code:"")),o.push(new v("errorMessage",r?r.message:"")),o.push(new v("errorId",r?r.errorId:""))),n&&o.push(new v("httpStatusCode",n)),this.addToClientEventBuffer(new Yd(qa.STATE),void 0,o)}pageView(e){this.addToClientEventBuffer(new Ws(za.PAGE_VIEW),e,[])}swipe(e,n){let r=[];r.push(new v("id",e.id)),r.push(new v("type",e.type)),r.push(new v("name",e.name)),r.push(new v("scheduleId",e.scheduleId)),r.push(new v("channelId",e.channelId)),r.push(new v("channelName",e.channelName)),r.push(new v("bookmark",e.bookmark.toFixed(0))),r.push(new v("errorId",n?n.errorId:"")),r.push(new v("errorCode",n?n.code:"")),r.push(new v("errorMessage",n?n.message:"")),this.addToClientEventBuffer(new bv(CI.SWIPE),void 0,r)}recPlanned(e,n){let r=[];r.push(new v("programId",e.programId)),r.push(new v("seasonId",e.
15seasonId)),r.push(new v("seriesId",e.seriesId)),r.push(new v("name",e.name)),r.push(new v("channelId",e.channelId)),r.push(new v("channelName",e.channelName)),r.push(new v("deviceId",e.deviceId)),r.push(new v("type",e.type)),r.push(new v("beginBuffer",e.beginBuffer)),r.push(new v("endBuffer",e.endBuffer)),r.push(new v("deleteProtection",e.deleteProtection)),r.push(new v("episodes",e.episodes)),r.push(new v("errorId",n?n.errorId:"")),r.push(new v("errorCode",n?n.code:"")),r.push(new v("errorMessage",n?n.message:"")),this.addToClientEventBuffer(new cc(Qd.REC_PLANNED),void 0,r)}recRemoved(e,n){let r=[];r.push(new v("recordingId",e.recordingId)),r.push(new v("programId",e.programId)),r.push(new v("scheduleId",e.scheduleId)),r.push(new v("seriesId",e.seriesId)),r.push(new v("name",e.name)),r.push(new v("channelId",e.channelId)),r.push(new v("channelName",e.channelName)),r.push(new v("episodes",e.episodes)),r.push(new v("deviceId",e.deviceId)),r.push(new v("type",e.type)),r.push(new v("errorId",n?n.errorId:"")),r.push(new v("errorCode",n?n.code:"")),r.push(new v("errorMessage",n?n.message:"")),this.addToClientEventBuffer(new cc(Qd.REC_REMOVED),void 0,r)}recCancel(e,n){let r=[];r.push(new v("programId",e.programId)),r.push(new v("seasonId",e.seasonId)),r.push(new v("seriesId",e.seriesId)),r.push(new v("name",e.name)),r.push(new v("channelId",e.channelId)),r.push(new v("channelName",e.channelName)),r.push(new v("episodes",e.episodes)),r.push(new v("deviceId",e.deviceId)),r.push(new v("type",e.type)),r.push(new v("errorId",n?n.errorId:"")),r.push(new v("errorCode",n?n.code:"")),r.push(new v("errorMessage",n?n.message:"")),this.addToClientEventBuffer(new cc(Qd.REC_CANCEL),void 0,r)}recChanged(e,n){let r=[];r.push(new v("recordingId",e.recordingId)),r.push(new v("subscriptionId",e.subscriptionId)),r.push(new v("programId",e.programId)),r.push(new v("seasonId",e.seasonId)),r.push(new v("seriesId",e.seriesId)),r.push(new v("name",e.name)),r.push(new v("scheduleId",e.scheduleId)),r.push(new v("channelId",e.channelId)),r.push(new v("channelName",e.channelName)),r.push(new v("deviceId",e.deviceId)),r.push(new v("type",e.type)),r.push(new v("beginBuffer",e.beginBuffer)),r.push(new v("endBuffer",e.endBuffer)),r.push(new v("deleteProtection",e.deleteProtection)),r.push(new v("episodes",e.episodes)),r.push(new v("errorId",n?n.errorId:"")),r.push(new v("errorCode",n?n.code:"")),r.push(new v("errorMessage",n?n.message:"")),this.addToClientEventBuffer(new cc(Qd.REC_CHANGED),void 0,r)}articlePageView(e,n){let r=[];r.push(new v("articleId",e.articleId)),r.push(new v("title",e.title)),r.push(new v("curPage",e.curPage)),r.push(new v("numPages",e.numPages)),this.addToClientEventBuffer(new Lf(Sv.PAGE_VIEW),n,r)}articleAction(e,n){let r=[];r.push(new v("articleId",e.articleId)),r.push(new v("label",e.label)),r.push(new v("actionType",e.actionType)),r.push(new v("actionId",e.actionId)),r.push(new v("actionMethod",e.actionMethod)),this.addToClientEventBuffer(new Lf(Sv.ACTION),n,r)}bannerAction(e,n){let r=[];r.push(new v("actionType",e.actionType)),r.push(new v("actionId",e.actionId)),r.push(new v("actionMethod",e.actionMethod)),this.addToClientEventBuffer(new Ws(za.BANNER),n,r)}catalogSwitch(e,n){let r=[];r.push(new v("from",e)),r.push(new v("to",n)),this.addToClientEventBuffer(new Ws(za.SWITCH_CATALOG),void 0,r)}profileSwitch(e,n){let r=[];r.push(new v("from",e)),r.push(new v("to",n)),this.addToClientEventBuffer(new Ws(za.SWITCH_PROFILE),void 0,r)}addProfile(e){let n=[];n.push(new v("profileId",e.profileId)),n.push(new v("master",e.master?"TRUE":"FALSE")),n.push(new v("profileName",e.name)),n.push(new v("catalogId",e.catalogId)),this.addToClientEventBuffer(new uc(Jd.ADD_PROFILE),void 0,n)}editProfile(e){let n=[];n.push(new v("profileId",e.profileId)),n.push(new v("master",e.master?"TRUE":"FALSE")),n.push(new v("profileName",e.name)),n.push(new v("catalogId",e.catalogId)),this.addToClientEventBuffer(new uc(Jd.EDIT_PROFILE),void 0,n)}deleteProfile(e){let n=[];n.push(new v("profileId",e)),this.addToClientEventBuffer(new uc(Jd.DELETE_PROFILE),void 0,n)}errorProfile(e,n,r,o){let s=[];s.push(new v("originator",e)),s.push(new v("profileId",n.profileId)),s.push(new v("profileName",n.name)),s.push(new v("catalogId",n.catalogId)),r&&(s.push(new v("errorId",r.errorId)),s.push(new v("errorMessage",r.message)),s.push(new v("errorCode",r.code)),s.push(new v("httpStatusCode",`${o??""}`))),this.addToClientEventBuffer(new uc(Jd.ERROR),void 0,s)}urlMapperSuccess(e,n,r){let o=[];o.push(new v("url",e)),o.push(new v("actionType",r.type)),o.push(new v("actionId",r.id)),o.push(new v("actionMethod",r.method)),this.addToClientEventBuffer(new Ff(Ev.TRACK),n,o)}urlMapperError(e,n,r,o){let s=[];s.push(new v("url",e)),r&&(s.push(new v("errorId",r.errorId)),s.push(new v("errorMessage",r.message)),s.push(new v("errorCode",r.code)),s.push(new v("httpStatusCode",`${o??""}`))),this.addToClientEventBuffer(new Ff(Ev.ERROR),n,s)}advertisementEndOld(e,n){}advertisementEnd(e,n){let r=[];r.push(new v("type",e.type)),r.push(new v("campaignId",e.campaignId)),r.push(new v("campaignReportingId",e.campaignReportingId)),r.push(new v("advertisementId",e.advertisementId)),r.push(new v("advertisementReportingId",e.advertisementReportingId)),r.push(new v("resourceType",e.resourceType)),r.push(new v("actionMethod",e.actionMethod)),r.push(new v("actionType",e.actionType)),r.push(new v("actionId",e.actionId)),r.push(new v("actionPerformed",e.actionPerformed?"TRUE":"FALSE")),r.push(new v("start",e.start.toISOString().replace(/\.\d\d\d/,""))),r.push(new v("end",new Date().toISOString().replace(/\.\d\d\d/,""))),this.addToClientEventBuffer(new vv(bI.ADVERTISEMENT_END),n,r)}advertisementError(e,n,r){}autoplayPageViewOld(e,n){let r=[];r.push(new v("assetId",e.assetId)),r.push(new v("assetType",e.assetType)),r.push(new v("nextAssetId",e.nextAssetId)),r.push(new v("nextAssetType",e.nextAssetType)),this.addToClientEventBuffer(new dc(Zd.PAGE_VIEW),n,r)}autoplayPageView(e,n){let r=[];r.push(new v("assetId",e.assetId)),r.push(new v("assetType",e.assetType)),r.push(new v("nextAssetId",e.nextAssetId)),r.push(new v("nextAssetType",e.nextAssetType)),this.addToClientEventBuffer(new dc(Zd.PAGE_VIEW),n,r)}autoplayActionOld(e,n){let r=[];e.action&&r.push(new v("action",e.action.toString())),r.push(new v("assetId",e.assetId)),r.push(new v("assetType",e.assetType)),r.push(new v("nextAssetId",e.nextAssetId)),r.push(new v("nextAssetType",e.nextAssetType)),this.addToClientEventBuffer(new dc(Zd.ACTION),n,r)}autoplayAction(e,n,r){let o=[];o.push(new v("action",n.toString())),o.push(new v("assetId",e.assetId)),o.push(new v("assetType",e.assetType)),o.push(new v("nextAssetId",e.nextAssetId)),o.push(new v("nextAssetType",e.nextAssetType)),this.addToClientEventBuffer(new dc(Zd.ACTION),r,o)}popUpShown(e){let n=[];n.push(new v("type",e)),this.addToClientEventBuffer(new Ws(za.POPUP),void 0,n)}addToClientEventBuffer(e,n,r){if(!this.sessionService.analyticsCategoryEnabled(e)||!this._userAnalyticsAllowed)return;n!==void 0?this.lastPageContext=n:n=this.lastPageContext,r=this.removeEmptyProperties(r);let o=this.parseJSONString(localStorage.getItem(Te.client_events_buffer)),s=new pf(e,this.sessionService.getLoginContext(),n,r);o.push(s),localStorage.setItem(Te.client_events_buffer,JSON.stringify(o)),o.length>=this.analyticsPostBatchSize&&this.analyticsPostBatchSize!==void 0&&this.sendBufferToServer()}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(ne),h(Ba),h(ae),h(ja),h(Kd))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var sr=class{constructor(){this.cache={}}clearCache(){delete this.cache,this.cache={}}put(i,e){this.cache[i]=e}remove(i){delete this.cache[i]}get(i){return this.cache[i]}values(){return Object.keys(this.cache).map(i=>this.cache[i])}};var pc=class{constructor(i,e){this.bookmarksMaximumPercent=e,Object.keys(i).map(n=>this[n]=i[n])}isFullyWatched(){return this.position&&this.size&&this.position>=this.size*this.bookmarksMaximumPercent}};var eu=(()=>{class t{constructor(e,n,r,o){this.config=e,this.historyApi=n,this.auth=r,this.sessionService=o,this.reloadingCache=!1,this.cache=new sr,this.cachePromise=void 0,this.expirationTime=0,this.defaultBookmarksMaximumPercent=.95,this.bookmarkUpdateEvent=ne
15w Y}checkCache(){!this.reloadingCache&&new Date().getTime()>this.expirationTime?(this.reloadingCache=!0,this.cachePromise=this.fillCache()):this.cachePromise=this.cachePromise||C([])}getBookmark(e,n){return this.checkCache(),this.cachePromise?.pipe(P(()=>{let r=this.cache.get(n+e);if(r)return r}))??C(void 0)}getBookmarkNoCache(e,n){return this.historyApi.getBookmark(this.sessionService.profileId,e,n).pipe(P(r=>new pc(r,this.config.getSettingNumber(x.bookmarksMaximumPercent,this.defaultBookmarksMaximumPercent))))}getBookmarksForTypeForSeries(e,n){return this.checkCache(),this.cachePromise?.pipe(P(()=>{if(n===void 0)return[];let r=this.cache.values();return r.sort((o,s)=>parseInt(o.updatedAt)<parseInt(s.updatedAt)?1:parseInt(o.updatedAt)>parseInt(s.updatedAt)?-1:0),r.filter(o=>o.assetType===e&&o.seriesId===n)}))??C([])}setBookmark(e){if(!this.auth.isAuthorized())return;e=new pc(e,this.config.getSettingNumber(x.bookmarksMaximumPercent,this.defaultBookmarksMaximumPercent)),this.checkCache(),this.cachePromise?.subscribe(()=>{this.cache.put(e.assetId+e.assetType,e)});let n={series:e.seriesId,position:e.position,size:e.size};this.historyApi.setBookmark(this.sessionService.profileId,e.assetType,e.assetId,n).subscribe(()=>{this.bookmarkUpdateEvent.emit()})}fillCache(){return this.auth.isAuthorized()?this.historyApi.getBookmarks(this.sessionService.profileId,this.sessionService.catalogId).pipe(fe(e=>(this.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.bookmarkCacheExpiration,6e5),this.reloadingCache=!1,this.clearCache(),e.forEach(n=>this.cache.put(n.assetId+n.assetType,new pc(n,this.config.getSettingNumber(x.bookmarksMaximumPercent,this.defaultBookmarksMaximumPercent)))),C([])))).pipe(z(()=>(this.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.bookmarkCacheErrorExpiration,3e5),this.reloadingCache=!1,C([]))),Ai()):(this.reloadingCache=!1,C([]))}deleteBookmark(e,n){this.checkCache(),this.cachePromise?.subscribe(()=>{this.cache.remove(n+e)}),this.historyApi.deleteBookmark(this.sessionService.profileId,e,n).subscribe()}clearCache(){this.reloadingCache||(this.cache=new sr)}clearForSession(){this.expirationTime=0,this.clearCache()}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(en),h(et),h(ne))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var tu=class{constructor(i){this.assetId=i.assetId,this.assetType=i.assetType,this.updatedAt=i.updatedAt}};var ui=(()=>{class t{constructor(e,n,r,o){this.config=e,this.historyApi=n,this.auth=r,this.sessionService=o,this.reloadingCache=!1,this.cache=new sr,this.expirationTime=0}getFavoritesForType(e,n){return this.checkCache(),this.cachePromise?.pipe(P(()=>{let r=this.cache.values();r.sort((s,a)=>parseInt(s.updatedAt)<parseInt(a.updatedAt)?1:parseInt(s.updatedAt)>parseInt(a.updatedAt)?-1:0);let o=[];return e===Gs.CHANNEL&&(o=r.filter(s=>s.assetType===cn.CHANNEL),o.forEach(s=>{s.channel=n.find(a=>a.id===s.assetId)}),o.sort((s,a)=>{let l=s.channel?.getChannelNumberForCatalog(this.sessionService.catalogId)||Number.MAX_SAFE_INTEGER,c=a.channel?.getChannelNumberForCatalog(this.sessionService.catalogId)||Number.MAX_SAFE_INTEGER;return l<c?-1:l>c?1:0})),o}))??C([])}getFavoritesForChannel(){return this.checkCache(),this.cachePromise?.pipe(P(()=>{let n=this.cache.values().filter(r=>r.assetType===cn.CHANNEL);return n.sort(function(r,o){return parseInt(r.updatedAt)<parseInt(o.updatedAt)?1:parseInt(r.updatedAt)>parseInt(o.updatedAt)?-1:0}),n}))??C([])}isFavorite(e,n){return this.checkCache(),this.cachePromise?.pipe(P(()=>this.cache.get(n+e)!==void 0))??C(!1)}setFavorite(e,n){this.auth.isAuthorized()&&(this.checkCache(),this.cachePromise?.subscribe(()=>{this.cache.put(n+e,new tu({assetType:e,assetId:n,updatedAt:(new Date().getTime()/1e3).toString()})),this.historyApi.setFavorite(this.sessionService.profileId,e,n).subscribe()}))}deleteFavorite(e,n){this.checkCache(),this.cachePromise?.subscribe(()=>{this.cache.remove(n+e)}),this.historyApi.deleteFavorite(this.sessionService.profileId,e,n).subscribe()}checkCache(){!this.reloadingCache&&new Date().getTime()>this.expirationTime?(this.reloadingCache=!0,this.cachePromise=this.fillCache()):this.cachePromise=this.cachePromise||C(void 0)}fillCache(){return this.auth.isAuthorized()?this.historyApi.getFavorites(this.sessionService.profileId,this.sessionService.catalogId).pipe(fe(e=>(this.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.favoriteCacheExpiration,6e5),this.reloadingCache=!1,this.clearCache(),e.forEach(n=>this.cache.put(n.assetId+n.assetType,new tu(n))),C(void 0))),z(()=>(this.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.favoriteCacheErrorExpiration,3e5),this.reloadingCache=!1,C(void 0))),Ai()):(this.reloadingCache=!1,C(void 0))}clearCache(){this.reloadingCache||(this.cache=new sr)}clearForSession(){this.expirationTime=0,this.clearCache()}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(en),h(et),h(ne))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var iu=(()=>{class t{constructor(e,n,r){this.business=e,this.sessionService=n,this.http=r,this.location=this.business.client.bootstrap.discovery.location}getVodPrice(e,n,r){let o=new mt().append("platformType",n).append("entitlementId",r).append("catalogId",this.sessionService.catalogId);return this.http.get(`${this.location}/price/v5/vod/${encodeURIComponent(e)}`,{params:o})}
15getBundlePrice(e,n,r){let o=new mt().append("platformType",n).append("entitlementId",r).append("catalogId",this.sessionService.catalogId);return this.http.get(`${this.location}/price/v5/bundle/${encodeURIComponent(e)}`,{params:o})}rentVod(e,n,r){let o={catalogId:n,deviceId:r};return this.http.post(`${this.location}/price/v5/vod/${encodeURIComponent(e)}/rent`,o)}rentBundle(e,n,r){let o={catalogId:n,deviceId:r};return this.http.post(`${this.location}/price/v5/bundle/${encodeURIComponent(e)}/rent`,o)}getPurchases(){return this.http.get(`${this.location}/price/v5/purchase`)}updatePurchase(e,n){let r={code:n};return this.http.post(`${this.location}/price/v5/purchase/${encodeURIComponent(e)}/update`,r)}commitPurchase(e,n){return this.http.post(`${this.location}/price/v5/purchase/${encodeURIComponent(e)}/commit`,n)}cancelPurchase(e){return this.http.delete(`${this.location}/price/v5/purchase/${encodeURIComponent(e)}`)}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(ne),h(on))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var es=(()=>{class t{constructor(e,n,r){this.config=e,this.pricingApi=n,this.auth=r,this.reloadingCache=!1,this.cache=new Map,this.cachePromise=void 0,this.expirationTime=0,this.purchaseUpdateEvent=new Y}checkCache(){!this.reloadingCache&&new Date().getTime()>this.expirationTime?(this.reloadingCache=!0,this.cachePromise=this.fillCache()):this.cachePromise=this.cachePromise||C([])}getPurchases(e=!1){return e&&(this.clearCache(),this.expirationTime=0),this.checkCache(),this.cachePromise?.pipe(P(()=>{let n=Array.from(this.cache.values());return e&&this.purchaseUpdateEvent.emit(n),n}))??C([])}addPurchase(e){this.cache.set(e.purchaseId,e),this.purchaseUpdateEvent.emit(Array.from(this.cache.values()))}fillCache(){return this.auth.isAuthorized()?this.pricingApi.getPurchases().pipe(fe(e=>(this.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.quoteCacheExpiration,6e5),this.reloadingCache=!1,e?(this.clearCache(),e.forEach(n=>{this.cache.set(n.purchaseId,n)}),C(void 0)):C(void 0))),z(()=>(this.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.quoteCacheErrorExpiration,3e5),this.reloadingCache=!1,C(void 0))),Ai()):(this.reloadingCache=!1,C(void 0))}clearCache(){this.reloadingCache||this.cache.clear()}clearForSession(){this.expirationTime=0,this.clearCache()}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(iu),h(et))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ru=(function(t){return t[t.RENEW=0]="RENEW",t[t.CLEAR=1]="CLEAR",t[t.NOTIFY=2]="NOTIFY",t[t.ADD=3]="ADD",t})(ru||{});
15var ou=class{constructor(i,e){Object.keys(i).forEach(n=>this[n]=i[n]),this.schedule=e}};var dn=(()=>{class t{constructor(e,n,r){this.sessionService=e,this.apiClient=n,this.environment=r,this.epgApi=new uh(this.apiClient)}getChannels(){let e=!this.sessionService.sessionIncludesFeature(ll.NO_UPSELL);return re(this.epgApi.getAllChannels(this.environment.platform,this.sessionService.entitlementId,e))}filterChannels(e,n,r,o){return re(this.epgApi.filterChannels(r,o,e,n))}getSchedule(e){return re(this.epgApi.getSchedule(e,this.environment.platform,this.sessionService.entitlementId))}getProgram(e){return re(this.epgApi.getProgram(e))}getProgramLineup(e,n,r){return re(this.epgApi.getProgramLineup(e,this.environment.platform,this.sessionService.entitlementId,n,r))}getSeries(e){return re(this.epgApi.getSeries(e))}getSeriesLineup(e,n,r){return re(this.epgApi.getSeriesLineup(e,this.environment.platform,this.sessionService.entitlementId,n,r))}getScheduleForChannelFromUntil(e,n,r){return re(this.epgApi.getChannelLineup(this.environment.platform,this.sessionService.entitlementId,n,r,e))}getCategories(){return re(this.epgApi.getEpgCategories())}getLineupRibbon(e,n,r,o,s,a,l,c=Hr.ASC,d=!1){return re(this.epgApi.getChannelLineupRibbon(e,r,_s.NONE,zy.SCHEDULE,c,this.environment.platform,this.sessionService.entitlementId,a,l,n,this.sessionService.catalogId,o,s,d))}static{this.\u0275fac=function(n){return new(n||t)(h(ne),h(Ni),h(ae))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ns=(()=>{class t{constructor(e,n,r,o,s){this.historyApi=e,this.config=n,this.epgApi=r,this.auth=o,this.sessionService=s,this.reloadingCache=!1,this.cache=new sr,this.cachePromise=void 0,this.expirationTime=0,this.minutesBefore=0,zs&&(zs.onmessage=a=>{let l=a.data;l.type===ru.NOTIFY&&l.items&&(Notification.permission==="granted"?this.showNotifications(l.items):Notification.permission!=="denied"&&Notification.requestPermission().then(c=>{c==="granted"&&this.showNotifications(l.items)}))})}reset(){let e=this.sessionService.deviceId;this.expirationTime=0,e&&this.auth.isAuthorized()?this.historyApi.getSettingForDevice(e,St.reminder_before_time).pipe(we(n=>{n?.value&&(this.minutesBefore=parseInt(n.value,10)/1e3/60)}),Gi(()=>{this.clearCache(),this.checkCache(),this.cachePromise.subscribe()})).subscribe():(this.clearCache(),this.checkCache(),this.cachePromise.subscribe())}renewReminderWorkerValues(){if(!zs)return;let e=this.cache.values();e&&(e=e.map(n=>this.createReminderWorkerItem(n)),zs.postMessage({type:ru.RENEW,items:e}))}addReminderWorkerValues(e){if(zs&&e){let n=this.createReminderWorkerItem(e);zs.postMessage({type:ru.ADD,items:[n]})}}clearReminderWorkerValues(){zs&&zs.postMessage({type:ru.CLEAR,items:void 0})}getReminders(){return this.checkCache(),this.cachePromise.pipe(P(()=>{let e=this.cache.values();return e=e.filter(n=>this.reminderIsValid(n)),e.sort((n,r)=>{let o=n.schedule.schedule.published.start.getTime(),s=r.schedule.schedule.published.start.getTime(),a=n.schedule.schedule.published.end.getTime(),l=r.schedule.schedule.published.end.getTime();return o<s?-1:o>s?1:a<l?-1:a>l?1:0}),e}))}getReminder(e,n){return e!==kr.SCHEDULE?C(void 0):(this.checkCache(),this.cachePromise.pipe(P(()=>{let r=this.cache.get(n);return this.reminderIsValid(r)?r:void 0})))}toggleReminder(e,n){return e!==kr.SCHEDULE?C(void 0):(this.checkCache(),this.cachePromise.pipe(P(()=>this.cache.get(n)?(this.deleteReminder(n),!1):(this.setReminder(n),!0))))}showNotifications(e){e.forEach(n=>{let r={body:n.body,badge:"./assets/theme/images/logo_notification.png",icon:"./assets/theme/images/logo_notification.png"};new Notification(n.title,r)})}checkCache(){!this.reloadingCache&&new Date().getTime()>this.expirationTime?(this.reloadingCache=!0,this.cachePromise=this.fillCache()):this.cachePromise=this.cachePromise||C([])}fillCache(){return this.auth.isAuthorized()?this.historyApi.getReminders(this.sessionService.profileId).pipe(fe(e=>{if(this.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.reminderCacheExpiration,6e5),this.reloadingCache=!1,!e)return C(void 0);this.clearCache();let n=[];return e.forEach(r=>
15{r.type===kr.SCHEDULE&&n.push(this.epgApi.getSchedule(r.id).pipe(P(o=>{o?.schedule?.published&&o.schedule.published.start.getTime()>new Date().getTime()&&this.cache.put(r.id,new ou(r,o))}),z(()=>C(void 0))))}),n.length===0?C(void 0):We(n).pipe(P(()=>this.renewReminderWorkerValues()))}),z(()=>(this.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.reminderCacheErrorExpiration,3e5),this.reloadingCache=!1,C(void 0))),Ai()):(this.reloadingCache=!0,C([]))}createReminderWorkerItem(e){let n=this.config.getTranslation(ni.popup_reminder_text);n&&e.schedule?.program?n=n.replace("$1",e.schedule.program.text.title):n=e.schedule?.program?e.schedule.program.text.title:"";let r=e.schedule?.schedule?.published?.start?e.schedule.schedule.published.start.getTime():0;return e.minutes&&(r-=e.minutes*1e3*60,r=Math.max(r,0)),{body:n,title:this.config.getTranslation(ni.popup_reminder_title),time:r}}setReminder(e){this.auth.isAuthorized()&&(this.epgApi.getSchedule(e).subscribe(n=>{let r={id:e,type:kr.SCHEDULE,minutes:this.minutesBefore};this.cache.put(e,new ou(r,n)),this.addReminderWorkerValues(new ou(r,n))}),this.historyApi.setReminder(this.sessionService.profileId,e,this.minutesBefore).subscribe())}deleteReminder(e){this.checkCache(),this.cachePromise.subscribe(()=>{this.cache.remove(e),this.renewReminderWorkerValues()}),this.historyApi.deleteReminder(this.sessionService.profileId,e).subscribe()}reminderIsValid(e){return e?.schedule?.schedule?.published?e.schedule.schedule.published.start.getTime()>new Date().getTime():!1}clearCache(){this.reloadingCache||(this.cache=new sr,this.clearReminderWorkerValues())}static{this.\u0275fac=function(n){return new(n||t)(h(en),h(O),h(dn),h(et),h(ne))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),zs;typeof Worker<"u"&&"Notification"in window&&(zs=new Worker(new URL("worker-CFC2KTGC.js",import.meta.url),{type:"module"}));
15var Hf=class{constructor(i,e){Object.keys(i).forEach(n=>this[n]=i[n]),this.aboutToExpireSetting=e}isPlanned(){let i=new Date().getTime(),e=$.timeStringToMs(this.plannedStart),n=this.beginBuffer;return e-n>=i}isInProgress(){let i=new Date().getTime(),e=$.timeStringToMs(this.plannedEnd),n=$.timeStringToMs(this.plannedStart);return e+this.endBuffer>i&&n-this.beginBuffer<i}isRecorded(){let i=new Date().getTime();return $.timeStringToMs(this.plannedEnd)+this.endBuffer<=i}isAboutToExpire(){let i=new Date,e=this.aboutToExpireSetting;return i.setDate(i.getDate()+e),$.timeStringToMs(this.expiration)<i.getTime()}getIcon(){return this.isRecorded()?of.recorded:this.isInProgress()?of.inProgress:of.planned}};var Iv=class{constructor(i){this.identifier=void 0,this.device=void 0,this.version=void 0,this.schedule=void 0,this.program=void 0,this.programOrdinal=void 0,this.season=void 0,this.seasonOrdinal=void 0,this.series=void 0,this.channel=void 0,this.start=void 0,this.end=void 0,this.plannedStart=void 0,this.plannedEnd=void 0,this.effectiveStart=void 0,this.effectiveEnd=void 0,this.beginBuffer=void 0,this.endBuffer=void 0,this.deleteProtected=void 0,this.infernoIdentifier=void 0,this.infernoState=void 0,this.infernoFailureReason=void 0,this.infernoSize=void 0,this.programSubscription=void 0,this.seasonSubscription=void 0,this.seriesSubscription=void 0,this.conflicts=void 0,this.adult=void 0,this.expiration=void 0,Object.keys(this).forEach(n=>{this[n]=i[n]});let e=n=>ie.fromSeconds(parseInt(n,10)).toUTC().startOf("second").toISO({suppressMilliseconds:!0});this.effectiveEnd=this.effectiveEnd?e(this.effectiveEnd):void 0,this.effectiveStart=this.effectiveStart?e(this.effectiveStart):void 0,this.plannedEnd=this.plannedEnd?e(this.plannedEnd):void 0,this.plannedStart=this.plannedStart?e(this.plannedStart):void 0,this.start=this.start?e(this.start):void 0,this.end=this.end?e(this.end):void 0,this.expiration=this.expiration?e(this.expiration):void 0}}
15,$f=class{constructor(i){Object.keys(i).forEach(e=>this[e]=i[e])}},fc=class{constructor(i){Object.keys(i).forEach(e=>this[e]=i[e])}},hc=class{constructor(i){Object.keys(i).forEach(e=>this[e]=i[e])}},o1=(function(t){return t.scheduled="SCHEDULED",t.recording="RECORDING",t.recorded="RECORDED",t})(o1||{});var wv=(()=>{class t{constructor(e,n){this.business=e,this.http=n,this.location=this.business.client.bootstrap.discovery.location}getRecording(e,n){return this.http.get(`${this.location}/recording/v1/device/${encodeURIComponent(e)}/recording/${encodeURIComponent(n)}`)}getDeviceRecordingsAndSubScriptions(e){return this.http.get(`${this.location}/recording/v1/device/${encodeURIComponent(e)}`)}createProgramSubscription(e,n,r,o){let s=encodeURIComponent(e),a=encodeURIComponent(n),l=encodeURIComponent(r);return this.http.post(`${this.location}/recording/v1/device/${s}/subscription/program/${a}/channel/${l}`,o)}createSeasonSubscription(e,n,r,o){let s=encodeURIComponent(e),a=encodeURIComponent(n),l=encodeURIComponent(r);return this.http.post(`${this.location}/recording/v1/device/${s}/subscription/season/${a}/channel/${l}`,o)}createSeriesSubscription(e,n,r,o){let s=encodeURIComponent(e),a=encodeURIComponent(n),l=encodeURIComponent(r);return this.http.post(`${this.location}/recording/v1/device/${s}/subscription/series/${a}/channel/${l}`,o)}editRecording(e){e=new Iv(e);let n=encodeURIComponent(e.device),r=encodeURIComponent(e.identifier);return this.http.put(`${this.location}/recording/v1/device/${n}/recording/${r}`,e)}deleteRecording(e){let n=encodeURIComponent(e.device),r=encodeURIComponent(e.identifier);return this.http.delete(`${this.location}/recording/v1/device/${n}/recording/${r}`)}deleteRecordings(e,n){let r=new mt;return Object.keys(n).forEach(o=>{n[o].forEach(s=>{r=r.append(o,s)})}),this.http.delete(`${this.location}/recording/v1/device/${encodeURIComponent(e.device)}/recording`,{params:r})}editProgramSubscription(e,n){let r=encodeURIComponent(e),o=encodeURIComponent(n.identifier);return this.http.put(`${this.location}/recording/v1/device/${r}/subscription/program/${o}`,n)}editSeasonSubscription(e,n){let r=encodeURIComponent(e),o=encodeURIComponent(n.identifier);return this.http.put(`${this.location}/recording/v1/device/${r}/subscription/season/${o}`,n)}editSeriesSubscription(e,n){let r=encodeURIComponent(e),o=encodeURIComponent(n.identifier);return this.http.put(`${this.location}/recording/v1/device/${r}/subscription/series/${o}`,n)}deleteProgramSubscription(e){let n=encodeURIComponent(e.device),r=encodeURIComponent(e.program),o=encodeURIComponent(e.channel);return this.http.delete(`${this.location}/recording/v1/device/${n}/subscription/program/${r}/channel/${o}`)}deleteSeasonSubscription(e){let n=encodeURIComponent(e.device),r=encodeURIComponent(e.season),o=encodeURIComponent(e.channel);return this.http.delete(`${this.location}/recording/v1/device/${n}/subscription/season/${r}/channel/${o}`)}deleteSeriesSubscription(e){let n=encodeURIComponent(e.device),r=encodeURIComponent(e.series),o=encodeURIComponent(e.channel);return this.http.delete(`${this.location}/recording/v1/device/${n}/subscription/series/${r}/channel/${o}`)}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(on))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var sn=(function(t){return t.recorded="recorded",t.planned="planned",t.conflict="conflict",t.expires="expires",t})(sn||{}),Tv=class{constructor(i){this.cachePromise=void 0,this.expirationTime=0,this.reloadingCache=!1,this.translations=i,this.recordings=[]}setRecordings(i){this.recordings=i}setSubcriptions(i){this.programSubscriptions=i.programSubscriptions.map(e=>new hc(e)),this.seriesSubscriptions=i.seriesSubscriptions.map(e=>new $f(e)),this.seasonSubscriptions=i.seasonSubscriptions.map(e=>new fc(e))}setStatus(i){this.npvr=i}getAvailableUsedMaxSpace(){let i="",e=0,n=0;if(this.npvr?.maximumHours!==void 0&&this.npvr.usedHours!==void 0){e=this.npvr.usedHours,n=this.npvr.maximumHours;let r=this.npvr.maximumHours-this.npvr.usedHours;if(r<1){let o=Math.floor(60*r);i=this.translations[ji.recordings_minutes_available].replace("$1",o).replace("$2",this.npvr.maximumHours)}else r=Math.max(Math.floor(r),0),i=this.translations[ji.recordings_hours_available].replace("$1",r).replace("$2",this.npvr.maximumHours)}return{available:i,used:e,max:n}}getProgramSubscription(i,e){if(this.programSubscriptions!==void 0)return this.programSubscriptions.find(n=>n.identifier===i&&n.channel===e)}getSeasonSubscription(i,e){if(this.seasonSubscriptions!==void 0)return this.seasonSubscriptions.find(n=>n.identifier===i&&n.channel===e)}getSeriesSubscription(i,e){if(this.seriesSubscriptions!==void 0)return this.seriesSubscriptions.find(n=>n.identifier===i&&n.channel===e)}getRecordings(i){return i?this.recordings:this.recordings.filter(e=>!e.adult)}getRecordingsForType(i,e){switch(i){case sn.recorded:return this.getFinis
15hedRecordings(e);case sn.planned:return this.getPlannedRecordings(e);case sn.conflict:return this.getConflictRecordings(e);case sn.expires:return this.getExpiredRecordings(e);default:return[]}}getSortedRecordingsOnExpirationTimeAcending(){return this.recordings.sort((i,e)=>parseInt(i.expiration)<parseInt(e.expiration)?-1:parseInt(i.expiration)>parseInt(e.expiration)?1:parseInt(i.plannedStart)<parseInt(e.plannedStart)?-1:parseInt(i.plannedStart)>parseInt(e.plannedStart)?1:0)}getSortedRecordingsOnStartTimeAscending(){return this.recordings.sort((i,e)=>parseInt(i.plannedStart)<parseInt(e.plannedStart)?-1:parseInt(i.plannedStart)>parseInt(e.plannedStart)?1:parseInt(i.plannedEnd)<parseInt(e.plannedEnd)?-1:parseInt(i.plannedEnd)>parseInt(e.plannedEnd)?1:0)}getSortedRecordingsOnEndTimeDescending(){return this.recordings.sort(function(i,e){return parseInt(i.plannedEnd)<parseInt(e.plannedEnd)?1:parseInt(i.plannedEnd)>parseInt(e.plannedEnd)?-1:parseInt(i.plannedStart)<parseInt(e.plannedStart)?1:parseInt(i.plannedStart)>parseInt(e.plannedStart)?-1:0})}getPlannedRecordings(i){if(this.recordings.length===0)return[];let e=this.getSortedRecordingsOnStartTimeAscending().filter(n=>n.isPlanned());return this.filterAdult(e,i)}getFinishedRecordings(i){if(this.recordings.length===0)return[];let e=this.getSortedRecordingsOnEndTimeDescending().filter(n=>n.isRecorded()||n.isInProgress());return this.filterAdult(e,i)}getConflictRecordings(i){return this.recordings.length===0?[]:this.filterAdult([],i)}getExpiredRecordings(i){if(this.recordings.length===0)return[];let e=this.getSortedRecordingsOnExpirationTimeAcending().filter(function(n){return n.isAboutToExpire()});return this.filterAdult(e,i)}filterAdult(i,e){return e?i:i.filter(n=>!n.adult)}};var xn=(()=>{class t{constructor(e,n,r,o,s,a){this.config=e,this.recordingApi=n,this.sessionService=r,this.messagesService=o,this.log=s,this.environment=a,this.stbRecordingChange=new Y,this.showDeleteAllRecordingsPopup=new Y,this.cache=new sr,this.neededTranslations={}}getRecordingsForDevice(e,n){if(this.stbHasRecording(e)){let r=this.checkCache(e);return r.cachePromise.pipe(P(o=>r.getRecordings(n)))}return C([])}getRecordingsForDeviceForType(e,n,r){if(this.stbHasRecording(e)){let o=this.checkCache(e);return o.cachePromise.pipe(P(s=>o.getRecordingsForType(n,r)))}return C([])}getRecordingsForDeviceForTypeForSeries(e,n,r,o){if(this.stbHasRecording(e)){let s=this.checkCache(e);return s.cachePromise.pipe(P(a=>s.getRecordingsForType(r,o).filter(l=>l.series===n)))}return C([])}stbHasRecording(e){return e===this.sessionService.stbList.getNpvrStb()?.id}getRecordingForProgram(e,n,r){return this.environment.atvFeatureList.includes(ln.RECORDING)?this.getRecordingsForAllDevices(r).pipe(P(o=>o.find(s=>s.program===e&&(n===void 0||s.channel===n)))):C(void 0)}getRecordingsForSeries(e,n){return this.environment.atvFeatureList.includes(ln.RECORDING)?this.getRecordingsForAllDevices(n).pipe(P(r=>r.filter(o=>o.series===e))):C(void 0)}getRecordingForId(e,n){return this.environment.atvFeatureList.includes(ln.RECORDING)?this.getRecordingsForAllDevices(n).pipe(P(r=>r.find(o=>o.identifier===e))):C(void 0)}getRecordingNoCache(e,n){return this.environment.atvFeatureList.includes(ln.RECORDING)?this.recordingApi.getRecording(e,n).pipe(P(r=>new Hf(r,this.config.getSettingNumber(x.npvrRecordingAboutToExpireInterval,7)))):C(void 0)}getAvailableUsedMaxSpace(e){let n=this.checkCache(e);return n.cachePromise.pipe(P(()=>n.getAvailableUsedMaxSpace()))}getRecordingsForAllDevices(e){let n=this.sessionService.stbList.getNpvrStb();return n?this.getRecordingsForDevice(n.id,e).pipe(z(()=>C([]))):C([])}getSubscription(e){let n=this.checkCache(e.device);return n.cachePromise.pipe(P(()=>{if(e.programSubscription)return n.getProgramSubscription(e.programSubscription,e.channel);if(e.seasonSubscription)return n.getSeasonSubscription(e.seasonSubscription,e.channel);if(e.seriesSubscription)return n.getSeriesSubscription(e.seriesSubscription,e.channel);throw new Error("invalid subscription")}))}clearCacheForDevice(e){let n=this.cache.get(e);return n&&n.reloadingCache||(this.cache.put(e,new Tv(this.neededTranslations)),n=this.cache.get(e)),n}deleteRecordings(e,n,r){return this.recordingApi.deleteRecordings(e,r).pipe(P(()=>{this.log.recRemoved(n,void 0),this.clearCacheForDevice(e.device),this.stbRecordingChange.emit()}),z(o=>{throw this.log.recRemoved(n,new Yn(o)),this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_recording_delete_failed)),o}))}
15editRecording(e,n){return this.recordingApi.editRecording(e).pipe(P(()=>{this.log.recChanged(n,void 0),this.clearCacheForDevice(e.device),this.stbRecordingChange.emit()}),z(r=>{throw this.log.recChanged(n,new Yn(r)),this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_recording_edit_failed)),r}))}cancelSubscription(e,n,r){let o=[];return n.isInProgress()&&o.push(this.recordingApi.deleteRecording(n).pipe(P(()=>{this.log.recRemoved(r,void 0)}),z(s=>{throw this.log.recRemoved(r,new Yn(s)),s}))),e===Le.EPISODE?o.push(this.recordingApi.deleteProgramSubscription(n)):e===Le.SEASON?o.push(this.recordingApi.deleteSeasonSubscription(n)):e===Le.SERIES&&o.push(this.recordingApi.deleteSeriesSubscription(n)),We(o).pipe(P(()=>{this.log.recCancel(r,void 0),this.clearCacheForDevice(n.device),this.stbRecordingChange.emit()}),z(s=>{throw this.log.recCancel(r,new Yn(s)),this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_recording_cancel_failed)),this.clearCacheForDevice(n.device),this.stbRecordingChange.emit(),s}))}clearCacheForAllDevices(){this.cache.clearCache()}checkCache(e){Object.keys(this.neededTranslations).length===0&&(this.neededTranslations[ji.recordings_minutes_available]=this.config.getTranslation(ji.recordings_minutes_available),this.neededTranslations[ji.recordings_hours_available]=this.config.getTranslation(ji.recordings_hours_available));let n=this.cache.get(e);return n===void 0&&(n=this.clearCacheForDevice(e)),!n.reloadingCache&&new Date().getTime()>n.expirationTime?(n.reloadingCache=!0,n.cachePromise=this.fillCache(e)):n.cachePromise=n.cachePromise||C([]),n}fillCache(e){let n=this.cache.get(e);return this.recordingApi.getDeviceRecordingsAndSubScriptions(e).pipe(P(r=>{n=this.clearCacheForDevice(e),n.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.recordingCacheExpiration,6e5),n.reloadingCache=!1,n.setRecordings((r.recordings??[]).map(o=>new Hf(o,this.config.getSettingNumber(x.npvrRecordingAboutToExpireInterval,7)))),n.setSubcriptions(r.subscriptions),n.setStatus(r.status.npvr)}),z(()=>(n.expirationTime=new Date().getTime()+this.config.getSettingNumber(x.recordingCacheErrorExpiration,3e5),n.reloadingCache=!1,C(void 0))),Ai())}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(wv),h(ne),h(_e),h(ct),h(ae))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ft=(()=>{class t{constructor(){this.showAuthPopup=new Y,this.confirmLogoutPopup=new Y,this.reloadCurrentPageEvent=new Y,this.showSharePopup=new Y}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $e=(()=>{class t{constructor(e,n,r,o,s){this.historyApi=e,this.auth=n,this.sessionService=r,this.environment=o,this.popup=s,this.adultModeActive=!1,this.openAdultPopupEvent=new Y,this.adultPopupSubject=ne
15w qt(!1)}showAdult(e){return this.environment.allowAdult&&(e===Me.ANY||e===Me._TRUE)&&this.adultModeActive}getAdultMode(e){return this.environment.allowAdult&&(e===Me.ANY||e===Me._TRUE)&&this.adultModeActive?e:Me._FALSE}setAdultModeForMinutes(e){this.adultModeActive=!0,this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.timer=window.setTimeout(()=>{this.adultModeActive=!1},(e||.25)*60*1e3)}stopAdultMode(){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.adultModeActive=!1}checkAdultMode(e){this.auth.isAuthorized()?this.environment.allowAdult?this.adultModeActive?e?.successCallback&&e.successCallback():this.openAdultPopupEvent.emit(e):e.errorCallback():this.popup.showAuthPopup.emit()}getNumberOfMinutesAdultMode(e=!1){return e&&(this.savedNumberOfAdultMinutes=void 0),this.savedNumberOfAdultMinutes!==void 0?C(this.savedNumberOfAdultMinutes):this.historyApi.getSettingForDevice(this.sessionService.deviceId,St.adult_mode).pipe(P(n=>(this.savedNumberOfAdultMinutes=parseInt(n.value,10),this.savedNumberOfAdultMinutes)),z(n=>(this.savedNumberOfAdultMinutes=5,C(this.savedNumberOfAdultMinutes))))}setAdultPopupStatus(e){e!==this.adultPopupSubject.value&&this.adultPopupSubject.next(e)}onAdultPopupStatusChange(e){return this.adultPopupSubject.subscribe(e)}static{this.\u0275fac=function(n){return new(n||t)(h(en),h(et),h(ne),h(ae),h(Ft))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gf=(()=>{class t{constructor(e,n,r){this.sessionService=e,this.authorization=n,this.router=r}canActivate(e,n){return this.sessionService.isAnonymous||this.authorization.isAuthorized()||this.router.navigate([""]),!0}static{this.\u0275fac=function(n){return new(n||t)(h(ne),h(et),h(ft))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac})}}return t})();var Zn=(()=>{class t{constructor(){this.ready=new Y,this.updated=new Y,this.scroll=new Y,this.menuRefs=[]}initMenus(e,n){this.scrollableMenu=e,this.fixedMenu=n,this.ready.emit()}initContent(e){this.content=e}injectScrollableMenu(e){let n=this.scrollableMenu?.createComponent(e);return n&&(n.location.nativeElement.style.width="100%",this.menuRefs.push(n),this.updated.emit()),n}injectFixedMenu(e){let n=this.fixedMenu?.createComponent(e);return n&&(n.location.nativeElement.style.width="100%",this.menuRefs.push(n),this.updated.emit()),n}clearMenus(){this.scrollableMenu?.clear(),this.fixedMenu?.clear(),this.menuRefs.forEach(e=>e.destroy()),this.updated.emit()}scrollTo(e){this.content?.nativeElement.scrollTo(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var un=(()=>{class t{constructor(e,n,r,o){this.title=e,this.meta=n,this.environment=r,this.config=o,this.lastPageTitle="",this.lastTitle=""}updateTitlePage(e){this.lastPageTitle=e??"",this.lastTitle=e??"",this.title.setTitle(this.appTitlePrefix(e)+this.environment.applicationName)}updateTitleForDetail(e){this.lastTitle=e,this.title.setTitle(this.appTitlePrefix(e)+this.environment.applicationName)}reloadLastPageTitle(){this.updateTitlePage(this.lastPageTitle)}updateTitleForPlayer(e){this.title.setTitle(this.appTitlePrefix(e)+this.environment.applicationName)}reloadLastTitle(){this.title.setTitle(this.appTitlePrefix(this.lastTitle)+this.environment.applicationName)}appTitlePrefix(e){return e?`${e} | `:""}updateDescription(){this.meta.addTag({name:"description",content:this.environment.applicationDescription})}updateLang(){let e=this.config.getLocale().replace("_","-");e&&(document.documentElement.lang=e)}static{this.\u0275fac=function(n){return new(n||t)(h(B_),h(XO),h(ae),h(O))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Li=(()=>{class t{constructor(e,n,r,o,s,a,l,c){this.sessionService=e,this.authorizationService=n,this.adultService=r,this.messagesService=o,this.config=s,this.windowManager=a,this.popup=l,this.htmlMeta=c}checkLoadPage(){this.getPageProperties().subscribe(e=>{if(e?.includes(oe.AUTH_REQUIRED)&&!(this.authorizationService.isAuthorized()&&!this.sessionService.isAnonymous)||e?.includes(oe.ADULT_REQUIRED)&&!this.authorizationService.isAuthorized()){this.popup.showAuthPopup.emit();return}if(e?.includes(oe.ADULT_REQUIRED)){this.adultService.checkAdultMode({successCallback:()=>{this.loadPage()},errorCallback:()=>{this.updateHtmlTitle(""),this.messagesService.showErrorMessage(this.config.getTranslation(pe.detail_adult_warning))}});return}this.loadPage()})}start(){this.reloadSubscription=this.popup.reloadCurrentPageEvent.subscribe(()=>{this.checkLoadPage()}),this.windowManager.scrollTo({left:0,behavior:"instant"}),this.checkLoadPage()}stop(){this.reloadSubscription&&this.reloadSubscription.unsubscribe()}updateHtmlTitle(e){this.htmlMeta.updateTitlePage(e)}static{this.\u0275fac=function(n){return new(n||t)(f(ne),f(et),f($e),f(_e),f(O),f(Zn),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(n,r){},encapsulation:2})}}return t})();var p4=["*"];function f4(t,i){if(t&1&&(te(0,"div",2),N(1),J()),t&2){let e=_();u(),Q(e.label)}}var su=(()=>{class t{constructor(){this.selected=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-selectable-avatar"]],inputs:{avatar:"avatar",selected:"selected",label:"label"},ngContentSelectors:p4,decls:4,vars:5,consts:[[1,"avatar"],[1,"avatar-image"],[1,"avatar-label","font-label"]],template:function(n,r){n&1&&(io(),te(0,"div",0)(1,"div",1),ro(2),J(),E(3,f4,2,1,"div",2),J()),n&2&&(H("selected",r.selected),u(),bt("background-image","url("+r.avatar+")"),u(2),I(r.label?3:-1))},styles:['[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}
15.avatar[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:100%;cursor:pointer}.avatar-image[_ngcontent-%COMP%]{position:relative;width:100%;padding-top:100%;border-radius:.625rem;background-position:center;background-size:cover;overflow:hidden;border:2px solid #030d2b}.avatar-image[_ngcontent-%COMP%]:before{position:absolute;content:"";top:0;width:100%;height:100%;background:transparent;transition:.2s}.avatar.selected[_ngcontent-%COMP%]   .avatar-image[_ngcontent-%COMP%]{border-color:#ca7ef1}.avatar[_ngcontent-%COMP%]:hover   .avatar-image[_ngcontent-%COMP%]:before{background:#00000080}.avatar-label[_ngcontent-%COMP%]{margin-top:.3125rem;opacity:.5;width:100%;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.avatar.selected[_ngcontent-%COMP%]   .avatar-label[_ngcontent-%COMP%]{opacity:1}']})}}return t})();function h4(t,i){if(t&1){let e=B();m(0,"app-selectable-avatar",2),A("click",function(){let r=k(e).$implicit,o=_();return L(o.switchCatalog(r.id))}),g()}if(t&2){let e=i.$implicit,n=_();S("avatar",n.getAvatarImage(e))("selected",e.id===n.currentCatalogId)("label",e.name)}}var a1=(()=>{class t{constructor(e,n,r){this.config=e,this.messagesService=n,this.user=r;let o=this.config.getAnonymousSettings();o?.catalogs&&o.catalogs.length>0?(this.catalogs=o.catalogs,this.currentCatalogId=sessionStorage.getItem(ir.anonymous_catalog)||o.defaultCatalogId||this.catalogs[0].id):this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_general))}getAvatarImage(e){return ot.createImageUrl(e.avatar,me.AVATAR_3)}switchCatalog(e){e!==this.currentCatalogId&&this.user.switchAnonymousCatalog(e)}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(_e),f(is))}}static{this.\u0275cmp=D({type:t,selectors:[["app-catalog-selection"]],decls:3,vars:0,consts:[[1,"catalog-list"],[1,"catalog",3,"avatar","selected","label"],[1,"catalog",3,"click","avatar","selected","label"]],template:function(n,r){n&1&&(m(0,"div",0),X(1,h4,1,3,"app-selectable-avatar",1,se),g()),n&2&&(u(),K(r.catalogs))},dependencies:[su],styles:[".catalog-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem}.catalog[_ngcontent-%COMP%]{width:6.65rem}"]})}}return t})();var g1=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,n){this._renderer=e,this._elementRef=n}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(n){return new(n||t)(f(Zi),f(Cn))};static \u0275dir=Bt({type:t})}return t})(),m4=(()=>{class t extends g1{static \u0275fac=(()=>{let e;return function(r){return(e||(e=_r(t)))(r||t)}})();static \u0275dir=Bt({type:t,features:[Ee]})}return t})(),_1=new le("");var g4={provide:_1,useExisting:Is(()=>rs),multi:!0};function _4(){let t=Pi()?Pi().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var v4=new le(""),rs=(()=>{class t extends g1{_compositionMode;_composing=!1;constructor(e,n,r){super(e,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!_4())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(n){return new(n||t)(f(Zi),f(Cn),f(v4,8))};static \u0275dir=Bt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&A("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[Ta([g4]),Ee]})}return t})();function y4(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var MI=new le(""),v1=new le("");function b4(t){return i=>{let e=i.value?.length??y4(i.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function l1(t){return null}function y1(t){return t!=null}function b1(t){return Ea(t)?re(t):t}function C1(t){let i={};
vendor: 7,747 bytes, line 15
15return t.forEach(e=>{i=e!=null?F(F({},i),e):i}),Object.keys(i).length===0?null:i}function S1(t,i){return i.map(e=>e(t))}function C4(t){return!t.validate}function E1(t){return t.map(i=>C4(i)?i:e=>i.validate(e))}function S4(t){if(!t)return null;let i=t.filter(y1);return i.length==0?null:function(e){return C1(S1(e,i))}}function PI(t){return t!=null?S4(E1(t)):null}function E4(t){if(!t)return null;let i=t.filter(y1);return i.length==0?null:function(e){let n=S1(e,i).map(b1);return We(n).pipe(P(C1))}}function OI(t){return t!=null?E4(E1(t)):null}function c1(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function I4(t){return t._rawValidators}function w4(t){return t._rawAsyncValidators}function RI(t){return t?Array.isArray(t)?t:[t]:[]}function Rv(t,i){return Array.isArray(t)?t.includes(i):t===i}function d1(t,i){let e=RI(i);return RI(t).forEach(r=>{Rv(e,r)||e.push(r)}),e}function u1(t,i){return RI(i).filter(e=>!Rv(t,e))}var xv=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=PI(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=OI(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control?.reset(i)}hasError(i,e){return this.control?this.control.hasError(i,e):!1}getError(i,e){return this.control?this.control.getError(i,e):null}},cu=class extends xv{name;get formDirective(){return null}get path(){return null}},Zf=class extends xv{_parent=null;name=null;valueAccessor=null},Mv=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Qa=(()=>{class t extends Mv{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(f(Zf,2))};static \u0275dir=Bt({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&H("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[Ee]})}return t})(),UAe=(()=>{class t extends Mv{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(f(cu,10))};static \u0275dir=Bt({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&H("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[Ee]})}return t})();var Wf="VALID",Av="INVALID",au="PENDING",zf="DISABLED",Ya=class{},Pv=class extends Ya{value;source;constructor(i,e){super(),this.value=i,this.source=e}},Yf=class extends Ya{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},Qf=class extends Ya{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},lu=class extends Ya{status;source;constructor(i,e){super(),this.status=i,this.source=e}},xI=class extends Ya{source;constructor(i){super(),this.source=i}},Ov=class extends Ya{source;constructor(i){super(),this.source=i}};function I1(t){return(Lv(t)?t.validators:t)||null}function T4(t){return Array.isArray(t)?PI(t):t||null}function w1(t,i){return(Lv(i)?i.asyncValidators:t)||null}function D4(t){return Array.isArray(t)?OI(t):t||null}function Lv(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function A4(t,i,e){let n=t.controls;if(!(i?Object.keys(n):n).length)throw new Z(1e3,"");if(!n[e])throw new Z(1001,"")}function R4(t,i,e){t._forEachChild((n,r)=>{if(e[r]===void 0)throw new Z(1002,"")})}var Nv=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,e){this._assignValidators(i),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return lt(this.statusReactive)}set status(i){lt(()=>this.statusReactive.set(i))}_status=Xe(()=>this.statusReactive());statusReactive=V(void 0);get valid(){return this.status===Wf}get invalid(){return this.status===Av}get pending(){return this.status===au}get disabled(){return this.status===zf}get enabled(){return this.status!==zf}errors;get pristine(){return lt(this.pristineReactive)}set pristine(i){lt(()=>this.pristineReactive.set(i))}_pristine=Xe(()=>this.pristineReactive());pristineReactive=V(!0);get dirty(){return!this.pristine}get touched(){return lt(this.touchedReactive)}set touched(i){lt(()=>this.touchedReactive.set(i))}_touched=Xe(()=>this.touchedReactive());touchedReactive=V(!1);get untouched(){return!this.touched}_events=new Ot;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(d1(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(d1(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(u1(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(u1(i,this._rawAsyncValidators))}hasValidator(i){return Rv(this._rawValidators,i)}hasAsyncValidator(i){return Rv(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let e=this.touched===!1;this.touched=!0;let n=i.sourceControl??this;i.onlySelf||this._parent?.markAsTouched(ve(F({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new Qf(!0,n))}
15markAllAsDirty(i={}){this.markAsDirty({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(i))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(i))}markAsUntouched(i={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=i.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:n})}),i.onlySelf||this._parent?._updateTouched(i,n),e&&i.emitEvent!==!1&&this._events.next(new Qf(!1,n))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let n=i.sourceControl??this;i.onlySelf||this._parent?.markAsDirty(ve(F({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new Yf(!1,n))}markAsPristine(i={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=i.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),i.onlySelf||this._parent?._updatePristine(i,n),e&&i.emitEvent!==!1&&this._events.next(new Yf(!0,n))}markAsPending(i={}){this.status=au;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new lu(this.status,e)),this.statusChanges.emit(this.status)),i.onlySelf||this._parent?.markAsPending(ve(F({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=zf,this.errors=null,this._forEachChild(r=>{r.disable(ve(F({},i),{onlySelf:!0}))}),this._updateValue();let n=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Pv(this.value,n)),this._events.next(new lu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ve(F({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=Wf,this._forEachChild(n=>{n.enable(ve(F({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(ve(F({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i,e){i.onlySelf||(this._parent?.updateValueAndValidity(i),i.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Wf||this.status===au)&&this._runAsyncValidator(n,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Pv(this.value,e)),this._events.next(new lu(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),i.onlySelf||this._parent?.updateValueAndValidity(ve(F({},i),{sourceControl:e}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?zf:Wf}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=au,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:i!==!1};let n=b1(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(i){let e=i;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(i,e){let n=e?this.get(e):this;return n?.errors?n.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,e,n){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||n)&&this._events.next(new lu(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,n)}_initObservables(){this.valueChanges=new Y,this.statusChanges=new Y}_calculateStatus(){return this._allControlsDisabled()?zf:this.errors?Av:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(au)?au:this._anyControlsHaveStatus(Av)?Av:Wf}
15_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,e){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,i.onlySelf||this._parent?._updatePristine(i,e),r&&this._events.next(new Yf(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new Qf(this.touched,e)),i.onlySelf||this._parent?._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){Lv(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){return!i&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=T4(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=D4(this._rawAsyncValidators)}},kv=class extends Nv{constructor(i,e,n){super(I1(e),w1(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,n={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}
vendor: 10,505 bytes, line 15
15){R4(this,!0,i),Object.keys(i).forEach(n=>{A4(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(Object.keys(i).forEach(n=>{let r=this.controls[n];r&&r.patchValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((n,r)=>{n.reset(i?i[r]:null,ve(F({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Ov(this))}getRawValue(){return this._reduceChildren({},(i,e,n)=>(i[n]=e.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&i(n,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&i(n))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(i,e){let n=i;return this._forEachChild((r,o)=>{n=e(n,r,o)}),n}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var NI=new le("",{factory:()=>kI}),kI="always";function x4(t,i){return[...i.path,t]}function T1(t,i,e=kI){D1(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),P4(t,i),N4(t,i),O4(t,i),M4(t,i)}function p1(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function M4(t,i){if(i.valueAccessor.setDisabledState){let e=n=>{i.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function D1(t,i){let e=I4(t);i.validator!==null?t.setValidators(c1(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let n=w4(t);i.asyncValidator!==null?t.setAsyncValidators(c1(n,i.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let r=()=>t.updateValueAndValidity();p1(i._rawValidators,r),p1(i._rawAsyncValidators,r)}function P4(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&A1(t,i)})}function O4(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&A1(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function A1(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function N4(t,i){let e=(n,r)=>{i.valueAccessor.writeValue(n),r&&i.viewToModelUpdate(n)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function k4(t,i){t==null,D1(t,i)}function L4(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function F4(t){return Object.getPrototypeOf(t.constructor)===m4}function V4(t,i){t._syncPendingControls(),i.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function U4(t,i){if(!i)return null;Array.isArray(i);let e,n,r;return i.forEach(o=>{o.constructor===rs?e=o:F4(o)?n=o:r=o}),r||n||e||null}var B4={provide:cu,useExisting:Is(()=>j4)},qf=Promise.resolve(),j4=(()=>{class t extends cu{callSetDisabledState;get submitted(){return lt(this.submittedReactive)}_submitted=Xe(()=>this.submittedReactive());submittedReactive=V(!1);_directives=new Set;form;ngSubmit=new Y;options;constructor(e,n,r){super(),this.callSetDisabledState=r,this.form=new kv({},PI(e),OI(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){qf.then(()=>{let n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),T1(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){qf.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){qf.then(()=>{let n=this._findContainer(e.path),r=new kv({});k4(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){qf.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){qf.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),V4(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new xI(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(n){return new(n||t)(f(MI,10),f(v1,10),f(NI,8))};static \u0275dir=Bt({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){n&1&&A("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Ta([B4]),Ee]})}return t})();function f1(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function h1(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var H4=class extends Nv{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,n){super(I1(e),w1(n,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Lv(e)&&(e.nonNullable||e.initialValueIsDefault)&&(h1(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new Ov(this))}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){f1(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){f1(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){h1(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}};var $4={provide:Zf,useExisting:Is(()=>Qs)},m1=Promise.resolve(),Qs=(()=>{class t extends Zf{_changeDetectorRef;callSetDisabledState;control=new H4;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new Y;constructor(e,n,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=U4(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),L4(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){T1(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){m1.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let n=e.isDisabled.currentValue,r=n!==0&&zl(n);m1.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?x4(e,this._parent):[e]}static \u0275fac=function(n){return new(n||t)(f(cu,9),f(MI,10),f(v1,10),f(_1,10),f(Pe,8),f(NI,8))};static \u0275dir=Bt({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[Ta([$4]),Ee,Un]})}return t})();var jAe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=Bt({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})();function G4(t){return typeof t=="number"?t:parseInt(t,10)}var W4=(()=>{class t{_validator=l1;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let n=this.normalizeInput(e[this.inputName].
15currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):l1,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Bt({type:t,features:[Un]})}return t})();var z4={provide:MI,useExisting:Is(()=>LI),multi:!0},LI=(()=>{class t extends W4{maxlength;inputName="maxlength";normalizeInput=e=>G4(e);createValidator=e=>b4(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=_r(t)))(r||t)}})();static \u0275dir=Bt({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&jo("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[Ta([z4]),Ee]})}return t})();var q4=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Ji({type:t});static \u0275inj=Ri({})}return t})();var os=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:NI,useValue:e.callSetDisabledState??kI}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=Ji({type:t});static \u0275inj=Ri({imports:[q4]})}return t})();var R1=(()=>{class t{constructor(e){this.confirm=new Y,this.cancel=new Y,this.confirmLabel=e.getTranslation(ni.popup_btn_ok),this.cancelLabel=e.getTranslation(ni.popup_btn_cancel)}static{this.\u0275fac=function(n){return new(n||t)(f(O))}}static{this.\u0275cmp=D({type:t,selectors:[["app-confirm-dropdown"]],inputs:{message:"message"},outputs:{confirm:"confirm",cancel:"cancel"},decls:6,vars:4,consts:[[1,"dropdown"],[1,"dropdown-item"],[1,"dropdown-buttons"],[3,"click","label"],[3,"click","label","active"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"div",1),N(2),g(),m(3,"div",2)(4,"app-text-button",3),A("click",function(){return r.cancel.emit()}),g(),m(5,"app-text-button",4),A("click",function(){return r.confirm.emit()}),g()()()),n&2&&(u(2),Q(r.message),u(2),S("label",r.cancelLabel),u(),S("label",r.confirmLabel)("active",!0))},dependencies:[Ke],encapsulation:2})}}return t})();function Y4(t,i){if(t&1){let e=B();m(0,"app-confirm-dropdown",2),A("cancel",function(){k(e);let r=_();return r.cancel.emit(),L(r.hideDropdown())})("confirm",function(){k(e);let r=_();return r.confirm.emit(),L(r.hideDropdown())}),g()}if(t&2){let e=_();S("message",e.confirmMessage)}}var Vv=(()=>{class t extends gt{constructor(){super(),this.danger=!1,this.confirm=new Y,this.cancel=new Y}hideDropdown(){this.showDropdown.set(!1)}showOptions(){this.showDropdown.set(!this.showDropdown())}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-confirm-button"]],inputs:{label:"label",confirmMessage:"confirmMessage",danger:"danger"},outputs:{confirm:"confirm",cancel:"cancel"},features:[Ee],decls:2,vars:4,consts:[[3,"click","label","active","danger"],[3,"message"],[3,"cancel","confirm","message"]],template:function(n,r){n&1&&(m(0,"app-text-button",0),A("click",function(){return r.showOptions()}),g(),E(1,Y4,1,1,"app-confirm-dropdown",1)),n&2&&(S("label",r.label)("active",r.showDropdown())("danger",r.danger),u(),I(r.showDropdown()?1:-1))},dependencies:[R1,Ke],encapsulation:2})}}return t})();var Uv=(()=>{class t{constructor(e,n,r){this.aaApi=e,this.config=n,this.messagesService=r,this.maxLengthProfileName=this.config.getSettingNumber(x.maxLengthProfileName,25)}loadProfiles(){return this.aaApi.getAllCustomerProfiles().pipe(P(e=>(e.forEach(n=>{n.profile.name.length>this.maxLengthProfileName&&(n.profile.name=n.profile.name.substring(0,this.maxLengthProfileName)+"...")}),e)))}isNameValid(e){if(!e)return this.messagesService.showErrorMessage(this.config.getTranslation(Nn.profile_error_name)),!1;if(e.length>this.maxLengthProfileName){let n=this.config.getTranslation(Nn.profile_error_name_length);return n&&(n=n.replace("$1",this.maxLengthProfileName.toString())),this.messagesService.showErrorMessage(n),!1}return!0}static{this.\u0275fac=function(n){return new(n||t)(h(Or),h(O),h(_e))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Q4(t,i){if(t&1&&M(0,"app-select-option",6),t&2){let e=i.$implicit;S("title",e.name)("value",e.id)}}function Z4(t,i){if(t&1){let e=B();m(0,"app-selectable-avatar",16),A("click",function(){let r=k(e).$implicit,o=_();return L(o.createEditProfile.avatarId=r.id)}),g()}if(t&2){let e=i.$implicit,n=_();S("avatar",n.getAvatarImage(e))("selected",n.createEditProfile.avatarId===e.id)}}function J4(t,i){if(t&1){let e=B();m(0,"app-confirm-button",17),A("confirm",function(){k(e);let r=_();return L(r.delete())}),g()}if(t&2){let e=_();S("label",e.profileDeleteButton)("confirmMessage",e.profileDeleteConfirm)("danger",!0)}}
15var Bv=class{constructor(i,e,n){this.isMaster=!1,this.isEdit=!1,this.availableAvatars=i,this.availableCatalogs=e,n?(this.isEdit=!0,this.isMaster=n.master??!1,this.editProfileId=n.id,this.avatarId=n.profile.avatar,this.name=n.profile.name,this.catalogId=n.profile.catalog):(this.avatarId=this.availableAvatars[0].id,this.catalogId=e[0].id)}logInfo(){return{profileId:this.editProfileId,master:this.isMaster,name:this.name??"",catalogId:this.catalogId}}},M1=(()=>{class t{constructor(e,n,r,o,s,a,l){this.aaApi=e,this.config=n,this.messagesService=r,this.session=o,this.profileService=s,this.log=a,this.user=l,this.maxProfileCount=0,this.maxProfileNameLength=25,this.backToSwitch=new Y,this.profileDeleteButton="",this.profileDeleteConfirm="",this.profileCreateButton="",this.profileSaveButton="",this.profileCancelButton="",this.profilePropertyAvatar="",this.profilePropertyCatalog="",this.profilePropertyName="",this.profileEditTitle="",this.profileAddTitle="",this.maxProfileCount=this.config.getSettingNumber(x.maxAllowedProfiles,0),this.maxProfileNameLength=this.config.getSettingNumber(x.maxLengthProfileName,25),this.profileAddTitle=this.config.getTranslation(Nn.profile_add_title),this.profileEditTitle=this.config.getTranslation(Nn.profile_edit_title),this.profilePropertyName=this.config.getTranslation(Nn.profile_property_name),this.profilePropertyAvatar=this.config.getTranslation(Nn.profile_property_avatar),this.profilePropertyCatalog=this.config.getTranslation(Nn.profile_property_catalog),this.profileDeleteButton=this.config.getTranslation(Nn.profile_delete_btn),this.profileDeleteConfirm=this.config.getTranslation(Nn.profile_delete_confirm),this.profileCancelButton=this.config.getTranslation(Nn.profile_cancel_btn),this.profileCreateButton=this.config.getTranslation(Nn.profile_create_btn),this.profileSaveButton=this.config.getTranslation(Nn.profile_save_btn)}cancel(){this.backToSwitch.emit()}createEdit(){if(!this.createEditProfile?.name||!this.profileService.isNameValid(this.createEditProfile.name))return;let e={name:this.createEditProfile.name,avatar:this.createEditProfile.avatarId,catalog:this.createEditProfile.catalogId},n;this.createEditProfile.isEdit&&this.createEditProfile.editProfileId?n=this.aaApi.editProfile(this.createEditProfile.editProfileId,e):n=this.aaApi.createProfile(e);let r=this.createEditProfile.isEdit&&this.createEditProfile.editProfileId;n.subscribe({next:o=>{let s={profileId:o.id,name:o.profile.name,master:o.master??!1,catalogId:o.profile.catalog};r?(this.log.editProfile(s),this.session.profileId===o.id&&this.user.updateExistingProfile(o)):this.log.addProfile(s),this.backToSwitch.emit()},error:o=>{this.log.errorProfile(r?hf.EDIT:hf.ADD,this.createEditProfile.logInfo(),o.error,o.status),this.messagesService.showErrorMessage(this.config.getTranslation(o.error?o.error.code:"",ge.error_general)),this.backToSwitch.emit()}})}delete(){this.createEditProfile?.editProfileId&&this.aaApi.deleteProfile(this.createEditProfile.editProfileId).subscribe({next:()=>{this.log.deleteProfile(this.createEditProfile.editProfileId??""),this.backToSwitch.emit()},error:e=>{let n=this.config.getTranslation(e.error?e.error.code:"",ge.error_general);this.log.errorProfile(hf.DELETE,this.createEditProfile.logInfo(),e.error,e.status),this.messagesService.showErrorMessage(n),this.backToSwitch.emit()}})}getAvatarImage(e){return ot.createImageUrl(e.image,me.AVATAR_2)}static{this.\u0275fac=function(n){return new(n||t)(f(Or),f(O),f(_e),f(ne),f(Uv),f(ct),f(is))}}static{this.\u0275cmp=D({type:t,selectors:[["app-create-edit-profile"]],inputs:{createEditProfile:"createEditProfile"},outputs:{backToSwitch:"backToSwitch"},decls:24,vars:12,consts:[[1,"settings-category"],[1,"font-title-2","settings-category-title"],[1,"settings-item"],[1,"font-label"],["autocomplete","off","id","profname","name","profname","type","text",1,"settings-item-input","font-highlighted-label",3,"ngModelChange","maxlength","ngModel"],[3,"valueChange","value"],[3,"title","value"],[1,"profile-avatar-option"],[1,"profile-avatar-label","font-label"],[1,"profile-avatar-list"],[3,"avatar","selected"],[1,"profile-actions"],[1,"profile-action-delete",3,"label","confirmMessage","danger"],[1,"profile-actions-right"],[3,"click","label"],[3,"click","label","active"],[3,"click","avatar","selected"],[1,"profile-action-delete",3,"confirm","label","confirmMessage","danger"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"div",1),N(2),g(),m(3,"div",2)(4,"div",3),N(5),g(),m(6,"input",4),xt("ngModelChange",function(s){return Pt(r.createEditProfile.name,s)||(r.createEditProfile.name=s),s}),g()(),m(7,"div",2)(8,"div",3),N(9),g(),m(10,"app-select-button",5),xt("valueChange",function(s){return Pt(r.createEditProfile.catalogId,s)||(r.createEditProfile.catalogId=s),s}),X(11,Q4,1,2,"app-select-option",6,se),g()(),m(13,"div",7)(14,"div",8),N(15),g(),m(16,"div",9),X(17,Z4,1,2,"app-selectable-avatar",10,se),g()(),m(19,"div",11),E(20,J4,1,3,"app-confirm-button",12),m(21,"div",13)(22,"app-text-button",14),A("click",function(){return r.cancel()}),g(),m(23,"app-text-button",15),A("click",function(){return r.createEdit()}),g()()()()),n&2&&(u(2),ce(" ",r.createEditProfile.isEdit?r.profileEditTitle:r.profileAddTitle," "),u(3),Q(r.profilePropertyName),u(),S("maxlength",wa(r.maxProfileNameLength)),Rt("ngModel",r.createEditProfile.name),u(3),Q(r.profilePropertyCatalog),u(),Rt("value",r.createEditProfile.catalogId),u(),K(r.createEditProfile.availableCatalogs),u(4),Q(r.profilePropertyAvatar),u(2),K(r.createEditProfile.availableAvatars),u(3),I(!r.createEditProfile.isMaster&&r.createEditProfile.isEdit?20:-1),u(2),S("label",r.profileCancelButton),u(),S("label",r.createEditProfile.isEdit?r.profileSaveButton:r.profileCreateButton)("active",!0))},dependencies:[os,rs,Qa,LI,Qs,Yo,Mr,su,Vv,Ke],styles:[".profile-avatar-option[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:1.375rem;border-bottom:1px solid rgba(255,255,255,.1)}.profile-avatar-label[_ngcontent-%COMP%]{padding:1.375rem}.profile-avatar-list[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(4rem,1fr));grid-auto-flow:row;gap:.5rem;width:100%;padding:0 1.375rem}.profile-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem;margin-top:2.33rem}
15.profile-action-delete[_ngcontent-%COMP%]{position:relative;margin-right:auto}.profile-actions-right[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})}}return t})();function X4(t,i){t&1&&M(0,"div",6)}function K4(t,i){if(t&1){let e=B();m(0,"app-selectable-avatar",5),A("click",function(){let r=k(e).$index,o=_();return L(o.switchEditProfile(r))}),E(1,X4,1,0,"div",6),g()}if(t&2){let e=i.$implicit,n=_();S("avatar",n.getProfileImage(e))("label",e==null||e.profile==null?null:e.profile.name)("selected",e.id===n.getActiveProfileId()),u(),I(n.editMode?1:-1)}}function eW(t,i){if(t&1){let e=B();m(0,"app-selectable-avatar",7),A("click",function(){k(e);let r=_();return L(r.newProfile())}),M(1,"div",8),g()}if(t&2){let e=_();S("label",e.profileNew)}}var P1=(()=>{class t{constructor(e,n,r,o,s){this.user=e,this.session=n,this.config=r,this.cdr=o,this.profileService=s,this.profiles=[],this.profileNew="",this.maxProfileCount=5,this.manageProfilesBtn="",this.cancelBtn="",this.editMode=!1,this.createProfile=new Y,this.editProfile=new Y,this.maxProfileCount=this.config.getSettingNumber(x.maxAllowedProfiles,0),this.profileNew=this.config.getTranslation(Nn.profile_new),this.manageProfilesBtn=this.config.getTranslation(Nn.profiles_manage),this.cancelBtn=this.config.getTranslation(Nn.profile_cancel_btn)}ngOnInit(){this.showProfileSelection()}detectChanges(){this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges()}switchEditProfile(e){this.editMode?this.editUserProfile(e):this.switchToProfile(e)}showProfileSelection(){this.profileService.loadProfiles().subscribe(e=>{this.profiles=e,this.detectChanges()})}editUserProfile(e){let n=this.profiles[e];this.editProfile.emit(n)}getActiveProfileId(){return this.session.profileId}getProfileImage(e){return e.image?ot.createImageUrl(e.image,me.AVATAR_3):void 0}newProfile(){this.createProfile.emit()}switchToProfile(e){let n=this.profiles[e];n.id!==this.getActiveProfileId()&&this.user.switchProfile(n.id)}static{this.\u0275fac=function(n){return new(n||t)(f(is),f(ne),f(O),f(Pe),f(Uv))}}static{this.\u0275cmp=D({type:t,selectors:[["app-profile-selection"]],outputs:{createProfile:"createProfile",editProfile:"editProfile"},decls:6,vars:2,consts:[[1,"profile-selection"],[1,"available-profiles"],[1,"profile",3,"avatar","label","selected"],[1,"profile",3,"label"],[1,"profile-manage-button",3,"click","label"],[1,"profile",3,"click","avatar","label","selected"],[1,"profile-avatar-overlay","profile-edit"],[1,"profile",3,"click","label"],[1,"profile-avatar-overlay","profile-new"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"div",1),X(2,K4,2,4,"app-selectable-avatar",2,se),E(4,eW,2,1,"app-selectable-avatar",3),g(),m(5,"app-text-button",4),A("click",function(){return r.editMode=!r.editMode}),g()()),n&2&&(u(2),K(r.profiles),u(2),I(r.profiles&&r.profiles.length<r.maxProfileCount?4:-1),u(),S("label",r.editMode?r.cancelBtn:r.manageProfilesBtn))},dependencies:[su,Ke],styles:['[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.profile-selection[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;row-gap:2rem}.available-profiles[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem;padding:0 1.375rem}.profile[_ngcontent-%COMP%]{width:6.65rem}.profile-avatar-overlay[_ngcontent-%COMP%]{height:100%;width:100%;position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;background:#000000b3}.profile-avatar-overlay[_ngcontent-%COMP%]:after{font-family:fontawesome-bold;font-size:40px}.profile-avatar-overlay.profile-edit[_ngcontent-%COMP%]:after{content:"\\f303"}.profile-avatar-overlay.profile-new[_ngcontent-%COMP%]:after{content:"\\f055"}.profile-avatar-overlay[_ngcontent-%COMP%]:hover:after{color:#ca7ef1}']})}}return t})();function tW(t,i){if(t&1){let e=B();m(0,"app-profile-selection",12),A("createProfile",function(){k(e);let r=_(2);return L(r.editProfile())})("editProfile",function(r){k(e);let o=_(2);return L(o.editProfile(r))}),g()}}function nW(t,i){t&1&&M(0,"app-catalog-selection")}function iW(t,i){if(t&1&&(m(0,"div",4)(1,"div",5),N(2),g(),m(3,"div",6),N(4),g()()),t&2){let e=_(2);u(2),Q(e.displayNameTitle),u(2),Q(e.displayName)}}function rW(t,i){if(t&1){let e=B();m(0,"div",13),A("click",function(){k(e);let r=_(2);return L(r.openUrl(r.forgotPasswordUrl))}),m(1,"a",5),N(2),g(),M(3,"img",14),g()}if(t&2){let e=_(2);u(2),Q(e.forgotPasswordTitle)}}function oW(t,i){if(t&1){let e=B();m(0,"div",13),A("click",function(){k(e);let r=_(2);return L(r.openUrl(r.invoicesUrl))}),m(1,"a",5),N(2),g(),M(3,"img",14),g()}if(t&2){let e=_(2);u(2),Q(e.invoicesTitle)}}function sW(t,i){if(t&1){let e=B();m(0,"div",13),A("click",function(){k(e);let r=_(2);return L(r.openUrl(r.faqUrl))}),m(1,"a",5),N(2),g(),M(3,"img",14),g()}if(t&2){let e=_(2);u(2),Q(e.faqTitle)}}function aW(t,i){if(t&1){let e=B();m(0,"div",13),A("click",function(){k(e);let r=_(2);return L(r.openUrl(r.privacyPolicyUrl))}),m(1,"a",5),N(2),g(),M(3,"img",14),g()}if(t&2){let e=_(2);u(2),Q(e.privacyPolicyTitle)}}function lW(t,i){if(t&1){let e=B();m(0,"app-text-button",15),A("click",function(){k(e);let r=_(2);return L(r.login())}),g()}if(t&2){let e=_(2);S("label",e.loginLabel)("active",!0)}}function cW(t,i){if(t&1){let e=B();m(0,"app-text-button",16),A("click",function(){k(e);let r=_(2);return L(r.logout())}),g()}if(t&2){let e=_(2);S("label",e.logoutLabel)("danger",!0)}}function dW(t,i){if(t&1){let e=B();m(0,"div",1),E(1,tW,1,0,"app-profile-selection"),E(2,nW,1,0,"app-catalog-selection"),m(3,"div",3)(4,"div",4)(5,"div",5),N(6),g(),m(7,"div",6),N(8),g()(),E(9,iW,5,2,"div",4),E(10,rW,4,1,"div",7),E(11,oW,4,1,"div",7),E(12,sW,4,1,"div",7),m(13,"div",4)(14,"div",5),N(15),g(),m(16,"div",8)(17,"app-toggle-button",9),xt("valueChange",function(r){k(e);let o=_();return Pt(o.log.userAnalyticsAllowed,r)||(o.log.userAnalyticsAllowed=r),L(r)}),g()()(),E(18,aW,4,1,"div",7),g(),E(19,lW,1,2,"app-text-button",10),E(20,cW,1,2,"app-text-button",11),g()}if(t&2){let e=_();u(),I(e.isAuthorized&&e.allowProfileSwitching?1:-1),u(),I(e.isAuthorized?-1:2),u(4),Q(e.appName),u(2),Q(e.appVersion),u(),I(e.displayName?9:-1),u(),I(e.forgotPasswordUrl?10:-1),u(),I(e.invoicesUrl?11:-1),u(),I(e.faqUrl?12:-1),u(3),Q(e.analyticsTitle),u(2),Rt("value",e.log.userAnalyticsAllowed),u(),I(e.privacyPolicyUrl?18:-1),u(),I(e.isAuthorized?-1:19),u(),I(e.isAuthorized?20:-1)}}function uW(t,i){if(t&1){let e=B();m(0,"app-create-edit-profile",17),A("backToSwitch",function(){k(e);let r=_();return L(r.createEditProfile=void 0)}),g()}if(t&2){let e=_();S("createEditProfile",e.createEditProfile)}}var O1=(()=>{class t extends Li{constructor(e,n,r,o,s,a,l,c,d,p,y,b){super(o,c,r,n,e,d,y,b),this.aaApi=a,this.log=l,this.user=p,this.displayName="",this.logoutLabel="",this.loginLabel="",this.forgotPasswordTitle="",this.invoicesTitle="",this.faqTitle="",this.privacyPolicyTitle="",this.pageTitle=this.config.getTranslation(Hn.menu_clientarea),this.appName=s.applicationName,this.appVersion=co.version,this.isAuthorized=this.authorizationService.isAuthorized(),this.allowProfileSwitching=this.config.getSettingBoolean(x.allowProfileSwitching,!1)||this.sessionService.sessionIncludesFeature(ll.ALLOW_PROFILES),this.isAuthorized&&(this.displayNameTitle=this.config.getTranslation(bh.login_name),this.displayName=this.sessionService.customerName),this.analyticsTitle=this.config.getTranslation(Ye.mystuff_privacy_analytics),this.logoutLabel=this.config.getTranslation($t.settings_logout),this.loginLabel=this.config.getTranslation(bh.login_login),this.forgotPasswordTitle=this.config.getTranslation(Lu.client_area_change_password),this.forgotPasswordUrl=this.config.getSettingString(x.clientAreaChangePasswordUrl,""),this.invoicesTitle=this.config.getTranslation(Lu.client_area_customer_invoices),this.invoicesUrl=this.config.getSettingString(x.clientAreaCustomerInvoicesUrl,""),this.faqTitle=this.config.getTranslation(Lu.client_area_faq),this.faqUrl=this.config.getSettingString(x.clientAreaFaqUrl,""),this.privacyPolicyTitle=this.config.getTranslation(Ye.mystuff_privacy),this.privacyPolicyUrl=this.config.getSettingString(x.privacyUrl,"")}ngOnInit(){this.log.pageView(new Qt({pageURL:Zt.my_stuff_client_area,pageTitle:this.pageTitle,pageLocale:this.config.getLocale()}
15)),super.start()}loadPage(){this.isAuthorized=this.authorizationService.isAuthorized(),this.isAuthorized&&(this.displayName=this.sessionService.customerName),this.updateHtmlTitle(this.pageTitle)}editProfile(e){We({avatars:this.aaApi.getAvatars(),catalogs:this.aaApi.getAllCatalogs()}).subscribe({next:({avatars:n,catalogs:r})=>{this.createEditProfile=new Bv(n,r,e)},error:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_general))}})}getPageProperties(){return C([])}openUrl(e){window.open(e,"_blank")}logout(){this.popup.confirmLogoutPopup.emit(()=>{this.isAuthorized=!1})}login(){this.user.selectLoginProvider(void 0,!1)}ngOnDestroy(){super.stop()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(_e),f($e),f(ne),f(ae),f(Or),f(ct),f(et),f(Zn),f(is),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["app-client-area-page"]],features:[Ee],decls:3,vars:2,consts:[[1,"settings-wrapper","left-right-page-padding"],[1,"settings"],[1,"settings",3,"createEditProfile"],[1,"settings-category"],[1,"settings-item"],[1,"font-label"],[1,"settings-item-value","font-highlighted-label"],[1,"settings-item","clickable"],[1,"settings-item-value"],[3,"valueChange","value"],[1,"client-area-auth-button",3,"label","active"],[1,"client-area-auth-button",3,"label","danger"],[3,"createProfile","editProfile"],[1,"settings-item","clickable",3,"click"],["src","./assets/theme/svg/open_in_new.svg",1,"settings-item-value"],[1,"client-area-auth-button",3,"click","label","active"],[1,"client-area-auth-button",3,"click","label","danger"],[1,"settings",3,"backToSwitch","createEditProfile"]],template:function(n,r){n&1&&(m(0,"div",0),E(1,dW,21,13,"div",1),E(2,uW,1,1,"app-create-edit-profile",2),g()),n&2&&(u(),I(r.createEditProfile?-1:1),u(),I(r.createEditProfile?2:-1))},dependencies:[P1,a1,Ke,M1,Qo],styles:["app-switch-profiles[_ngcontent-%COMP%], app-catalog-selection[_ngcontent-%COMP%]{width:100%;padding:0 1.375rem}.client-area-auth-button[_ngcontent-%COMP%]{align-self:center}"]})}}return t})();var Pn=class{static isReplay(i,e){return i?.includes(oe.FOCUS_PAST)&&!i?.includes(oe.FOCUS_FUTURE)||!i?.includes(oe.FOCUS_FUTURE)&&e?.includes(oe.FOCUS_PAST)&&!e?.includes(oe.FOCUS_FUTURE)}static getFocusType(i,e){return i.includes(oe.FOCUS_FUTURE)&&i.includes(oe.FOCUS_PAST)?cd.ANY:i.includes(oe.FOCUS_FUTURE)?cd.FUTURE:i.includes(oe.FOCUS_PAST)?cd.PAST:e?this.getFocusType(e):cd.ANY}static containsProperty(i,e,n){return e?.includes(i)||n?.includes(i)}};var du=class extends Li{constructor(){super(...arguments),this.isOnCustomPage=!1}setPage(i,e){this.page=i,this.pageId=e,this.isOnCustomPage=!0}};var G=(function(t){return t.DATE="date",t.CHANNEL="channel",t.TAG="tag",t.YEAR="year",t.SCORE="score",t.ACCESSIBILITY="accessibility",t.RIKSTOTO_TRACK_NAME="rikstotoTrackName",t.RIKSTOTO_HORSE_NAME="rikstotoHorseName",t.RIKSTOTO_RACE_NAME="rikstotoRaceName",t.SORT="sort",t.GUIDE_Y="y",t.SEARCH="q",t})(G||{}),dt=(()=>{class t{constructor(e,n){this.router=e,this.activatedRoute=n,this.filterChanged=new Y,this.filters=new Map}hasFilter(e){return this.filters.has(e)}hasAny(e){return Array.from(this.filters.keys()).some(n=>e.has(n))}loadUrlFilters(){this.filters.clear();let e=this.activatedRoute.snapshot.queryParamMap;e.keys.forEach(n=>{let r=n,o=e.get(n)??void 0;Object.values(G).includes(r)&&o&&this.filters.set(r,o)})}getFilterString(e){return this.filters.get(e)}getFilterNumber(e){let n=this.getFilterString(e);return n?parseInt(n,10):void 0}getFilterDate(e){let n=this.getFilterNumber(e);return n?ie.fromMillis(n):void 0}getFilterList(e){return this.getFilterString(e)?.split("||")??[]}updateFilterNumber(e,n){this.updateFilter(e,n?.toString())}updateFilterDate(e,n){this.updateFilterNumber(e,n?.toMillis())}updateFilterList(e,n){this.updateFilter(e,n.join("||"))}updateFilter(e,n){this.updateFilters([{key:e,value:n}])}clearFilter(e){this.updateFilters([{key:e,value:void 0}])}clearAll(){let e=Array.from(this.filters.keys()).filter(n=>Object.values(G).includes(n)).map(n=>({key:n,value:void 0}));this.updateFilters(e)}updateFilters(e){let n={};e.forEach(({key:r,value:o})=>{n[r]=o,o?this.filters.set(r,o):this.filters.delete(r)}),this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:n,queryParamsHandling:"merge",replaceUrl:!0}).then(()=>e.forEach(({key:r})=>this.filterChanged.emit(r)))}static{this.\u0275fac=function(n){return new(n||t)(h(ft),h(_t))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Za=(()=>{class t{constructor(e){this.filterService=e}clearFilter(e){e.preventDefault(),e.stopPropagation(),this.filterService.clearFilter(this.filter)}static{this.\u0275fac=function(n){return new(n||t)(f(dt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-clear-filter"]],inputs:{filter:"filter"},decls:1,vars:0,consts:[[1,"clear-filter",3,"click"]],template:function(n,r){n&1&&(te(0,"button",0),qe("click",function(s){return r.clearFilter(s)}),J())},styles:['[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.clear-filter[_ngcontent-%COMP%]{margin-right:.5rem}
15.clear-filter[_ngcontent-%COMP%]:hover{color:#fff}.clear-filter[_ngcontent-%COMP%]:before{font-family:fontawesome-bold;font-size:1rem;content:"\\f00d"}']})}}return t})();function pW(t,i){if(t&1&&M(0,"app-clear-filter",2),t&2){let e=_();S("filter",e.FilterType.TAG)}}function fW(t,i){if(t&1){let e=B();m(0,"span",8),A("click",function(r){let o=k(e).$index,s=_(3);return r.stopPropagation(),L(s.jumpBreadCrumb(o+1))}),M(1,"img",9),N(2),g()}if(t&2){let e=i.$implicit;u(2),ce(" ",e.title," ")}}function hW(t,i){if(t&1){let e=B();m(0,"li",4)(1,"button",6),A("click",function(){k(e);let r=_(2);return L(r.jumpBreadCrumb(0))}),m(2,"span",7),N(3),g(),X(4,fW,3,1,"span",7,se),g()()}if(t&2){let e=_(2);u(3),Q(e.allLabel),u(),K(e.currentBreadCrumb)}}function mW(t,i){t&1&&M(0,"img",11)}function gW(t,i){if(t&1){let e=B();m(0,"li",4)(1,"button",10),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.selectCategory(r))}),N(2),E(3,mW,1,0,"img",11),g()()}if(t&2){let e=i.$implicit,n=_(2);H("hidden",n.hideAdult(e)),u(),H("selected",n.isCurrentCategory(e)),u(),ce(" ",e.text.title," "),u(),I(e.categories&&e.categories.length>0?3:-1)}}function _W(t,i){if(t&1&&(m(0,"ul",3),E(1,hW,6,1,"li",4),X(2,gW,4,6,"li",5,se),g()),t&2){let e=_();u(),I(e.currentBreadCrumb.length>0?1:-1),u(),K(e.currentTree)}}var Ja=class{constructor(i){this.epgApi=i}loadCategories(){return this.epgApi.getCategories()}},uu=class{constructor(i,e){this.vodApi=i,this.catalogId=e}loadCategories(){return this.vodApi.getCategories(this.catalogId)}},ss=(()=>{class t extends gt{constructor(e,n,r,o){super(),this.filterService=n,this.adultService=r,this.cdr=o,this.categoryRoot=[],this.clearable=!1,this.currentBreadCrumb=new Array,this.selectedBreadCrumb=new Array,this.FilterType=G,this.label=e.getTranslation(cr.lists_filter_category),this.allLabel=e.getTranslation(cr.lists_filter_all_value)}ngOnInit(){this.validateCurrentFilter(),this.filterChangeSubscription=this.filterService.filterChanged.pipe(ke(e=>e===G.TAG)).subscribe(()=>this.validateCurrentFilter())}
15showCategories(){this.showDropdown()?this.hideDropdown():this.reload().subscribe(e=>{this.currentBreadCrumb=this.selectedBreadCrumb.slice(0,-1),this.initFromCurrentBreadCrumb(e),this.openDropdown()})}initFromCurrentBreadCrumb(e){this.currentTree=e;for(let n of this.currentBreadCrumb){let r=this.currentTree?.find(o=>o.tag===n.tag);if(r?.categories?.length)this.currentTree=r.categories;else{this.currentTree=e;break}}}hideDropdown(){this.showDropdown.set(!1),this.currentTree=void 0}jumpBreadCrumb(e){this.currentBreadCrumb=this.currentBreadCrumb.slice(0,e),this.initFromCurrentBreadCrumb(this.allCategories??[])}selectCategory(e){this.currentBreadCrumb.push({tag:e.tag,title:e.text.title}),e.categories&&e.categories.length>0?this.currentTree=e.categories:(this.selectedBreadCrumb=this.currentBreadCrumb,this.currentBreadCrumb=new Array,this.filterService.updateFilterList(G.TAG,this.selectedBreadCrumb.map(n=>n.tag)),this.hideDropdown())}hideAdult(e){return e.adult&&!this.adultService.showAdult(this.allowedAdultMode)}isButtonActive(){return this.showDropdown()||this.selectedBreadCrumb.length>0}isClearable(){return this.clearable&&this.selectedBreadCrumb.length>0}isCurrentCategory(e){for(let[n,r]of this.selectedBreadCrumb.entries()){if(n>=this.currentBreadCrumb.length)return r.tag===e.tag;if(r.tag!==this.currentBreadCrumb[n].tag)return!1}return this.selectedBreadCrumb.at(-1)?.tag===e.tag}getButtonLabel(){return this.selectedBreadCrumb.at(-1)?.title??this.label}validateCurrentFilter(){let e=this.filterService.getFilterList(G.TAG);if(e.length===0){this.currentBreadCrumb=this.selectedBreadCrumb=new Array,this.cdr.detectChanges();return}this.reload().subscribe(n=>
15{this.selectedBreadCrumb=this.findCategory(e,n),this.selectedBreadCrumb.length===0&&this.filterService.clearFilter(G.TAG),this.cdr.detectChanges()})}reload(){return this.allCategories?C(this.allCategories):this.categoryProvider.loadCategories().pipe(P(e=>this.findRoot(this.categoryRoot,e)),we(e=>this.allCategories=e))}findRoot(e,n){if(e.length===0)return n;for(let r of n)if(r.tag===e.at(0))return r.categories&&r.categories.length>0?this.findRoot(e.slice(1),r.categories):[r];return[]}findCategory(e,n){if(!n||e.length===0)return[];for(let r of n)if(r.tag===e.at(0)){let o=[{tag:r.tag,title:r.text.title}];if(r.categories&&r.categories.length>0){let s=this.findCategory(e.slice(1),r.categories);if(s?.length===0)return[];o=o.concat(s)}return o}return[]}ngOnDestroy(){this.filterChangeSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(dt),f($e),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-category-filter"]],inputs:{categoryProvider:"categoryProvider",allowedAdultMode:"allowedAdultMode",categoryRoot:"categoryRoot",clearable:"clearable"},features:[Ee],decls:5,vars:4,consts:[[1,"filter-container"],[1,"filter-button",3,"click","active"],[3,"filter"],["role","menu",1,"dropdown"],["role","none"],["role","none",3,"hidden"],["type","button","role","menuitem",1,"font-label","dropdown-item","breadcrumb",3,"click"],[1,"breadcrumb-item"],[1,"breadcrumb-item",3,"click"],["src","./assets/theme/svg/chevron_right.svg",1,"breadcrumb-separator"],["type","button","role","menuitem",1,"font-label","dropdown-item","selectable",3,"click"],["src","./assets/theme/svg/chevron_right.svg",1,"dropdown-item-icon"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"app-generic-button",1),A("click",function(){return r.showCategories()}),E(2,pW,1,1,"app-clear-filter",2),N(3),g(),E(4,_W,4,1,"ul",3),g()),n&2&&(u(),S("active",r.isButtonActive()),u(),I(r.isClearable()?2:-1),u(),ce(" ",r.getButtonLabel()," "),u(),I(r.showDropdown()&&r.currentTree?4:-1))},dependencies:[Za,Pr],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.dropdown-item-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem;margin-left:.5rem}.breadcrumb[_ngcontent-%COMP%]{justify-content:flex-start;align-items:center}.breadcrumb-item[_ngcontent-%COMP%]{display:flex;align-items:center;transition:color .2s;cursor:pointer}
15.breadcrumb-separator[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem;margin:0 .25rem}.breadcrumb-item[_ngcontent-%COMP%]:last-child{color:#ca7ef1}.breadcrumb-item[_ngcontent-%COMP%]:hover{color:#ca7ef1}"]})}}return t})();var pu=(()=>{class t{constructor(e){this.filterService=e}clearFilters(e,n){n.preventDefault(),n.stopPropagation(),e.blur(),this.filterService.clearAll()}static{this.\u0275fac=function(n){return new(n||t)(f(dt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-clear-all-filters"]],decls:3,vars:0,consts:[["clearBtn",""],["type","button",1,"button",3,"click"],["src","./assets/theme/svg/clear_normal.svg",1,"clear-filter"]],template:function(n,r){if(n&1){let o=B();te(0,"button",1,0),qe("click",function(a){k(o);let l=Ho(1);return L(r.clearFilters(l,a))}),Qe(2,"img",2),J()}},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.clear-filter[_ngcontent-%COMP%]{width:1rem;height:1rem;margin:0 .5rem;content:url(assets/theme/svg/clear_normal.svg);cursor:pointer}.clear-filter[_ngcontent-%COMP%]:hover{content:url(assets/theme/svg/clear_selected.svg)}.button[_ngcontent-%COMP%]:focus-visible{outline:2px solid #ca7ef1;outline-offset:2px}"]})}}return t})();function vW(t,i){if(t&1&&Qe(0,"img",3),t&2){let e=_();H("active",e.active)("selectable",e.selectable)("selected",e.selected)}}function yW(t,i){if(t&1&&Qe(0,"img",4),t&2){let e=_();H("disabled",e.selectable||e.active)}}var N1=(()=>{class t{constructor(){this.selectable=!1,this.selected=!1,this.active=!1}getStars(){return Math.ceil(this.score/25)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-score-stars"]],inputs:{score:"score",selectable:"selectable",selected:"selected",active:"active"},decls:5,vars:0,consts:[[1,"score-stars"],["src","./assets/theme/svg/rating_normal.svg",1,"score-star",3,"active","selectable","selected"],["src","./assets/theme/svg/rating_disabled.svg",1,"score-star",3,"disabled"],["src","./assets/theme/svg/rating_normal.svg",1,"score-star"],["src","./assets/theme/svg/rating_disabled.svg",1,"score-star"]],template:function(n,r){n&1&&(te(0,"div",0),X(1,vW,1,6,"img",1,se),X(3,yW,1,2,"img",2,se),J()),n&2&&(u(),K(" ".repeat(r.getStars()).split("")),u(2),K(" ".repeat(4-r.getStars()).split("")))},styles:[".score-stars[_ngcontent-%COMP%]{display:flex;column-gap:.375rem}.score-stars[_ngcontent-%COMP%]   .score-star[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.score-stars[_ngcontent-%COMP%]   .score-star.selectable[_ngcontent-%COMP%], .score-stars[_ngcontent-%COMP%]   .score-star.active[_ngcontent-%COMP%]{content:url(assets/theme/svg/rating_selectable.svg)}.score-stars[_ngcontent-%COMP%]   .score-star.disabled[_ngcontent-%COMP%]{content:url(assets/theme/svg/rating_inactive.svg)}.score-stars[_ngcontent-%COMP%]   .score-star.selected[_ngcontent-%COMP%], .score-stars[_ngcontent-%COMP%]:hover   .score-star.selectable[_ngcontent-%COMP%]{content:url(assets/theme/svg/rating_selected.svg)}"]})}}return t})();var bW=()=>[1,2,3,4];function CW(t,i){if(t&1&&(m(0,"span"),N(1),g()),t&2){let e=_();u(),Q(e.label)}}function SW(t,i){if(t&1&&M(0,"app-score-stars",2),t&2){let e=_();S("score",e.selectedScore*25)("active",!0)}}function EW(t,i){if(t&1){let e=B();m(0,"app-score-stars",5),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.selectScore(r))}),g()}if(t&2){let e=i.$implicit,n=_(2);S("score",e*25)("selected",e===n.selectedScore)("selectable",!0)}}function IW(t,i){t&1&&(m(0,"div",3),X(1,EW,1,3,"app-score-stars",4,se),g()),t&2&&(u(),K(Wl(0,bW)))}var k1=(()=>{class t extends gt{constructor(e,n){super(),this.filterService=n,this.label=e.getTranslation(Io.ribbon_filter_rating)}ngOnInit(){this.validateCurrentFilter(),this.filterChangeSubscription=this.filterService.filterChanged.pipe(ke(e=>e===G.SCORE)).subscribe(()=>this.validateCurrentFilter())}
15showScores(){this.showDropdown()?this.hideDropdown():this.showDropdown.set(!0)}hideDropdown(){this.showDropdown.set(!1)}selectScore(e){this.selectedScore=e,this.filterService.updateFilterNumber(G.SCORE,e),this.hideDropdown()}isButtonActive(){return this.showDropdown()||!!this.selectedScore}validateCurrentFilter(){this.selectedScore=this.filterService.getFilterNumber(G.SCORE),this.selectedScore&&(this.selectedScore<1||this.selectedScore>4)&&(this.selectedScore=void 0,this.filterService.clearFilter(G.SCORE))}ngOnDestroy(){this.filterChangeSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(dt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-score-filter"]],features:[Ee],decls:5,vars:4,consts:[[1,"filter-container"],[3,"click","active"],[1,"button-score",3,"score","active"],[1,"dropdown"],[1,"dropdown-item","selectable",3,"score","selected","selectable"],[1,"dropdown-item","selectable",3,"click","score","selected","selectable"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"app-generic-button",1),A("click",function(){return r.showScores()}),E(2,CW,2,1,"span"),E(3,SW,1,2,"app-score-stars",2),g(),E(4,IW,3,1,"div",3),g()),n&2&&(u(),S("active",r.isButtonActive()),u(),I(r.selectedScore?-1:2),u(),I(r.selectScore?3:-1),u(),I(r.showDropdown()?4:-1))},dependencies:[Pr,N1],styles:[".button-score[_ngcontent-%COMP%]{padding:1px 0}"]})}}return t})();var Xa=(()=>{class t{constructor(e,n,r){this.business=e,this.environment=n,this.apiClient=r,this.location=this.business.client.bootstrap.discovery.location,this.vodApi=new gh(this.apiClient)}getVod(e){return re(this.vodApi.getVodAsset(e))}getCmsVods(e,n,r,o,s,a,l=Cc.TITLE,c=Hr.ASC,d=0){return re(this.vodApi.getVodCmsAssets(d,this.environment.platform,e,_s.NONE,l,c,r,n,o,s,a))}getSeasons(e){return re(this.vodApi.getVodSeasons(e))}getEpisodes(e){return re(this.vodApi.getVodEpisodes(e))}getCmsEpisodes(e,n,r,o=Cc.TITLE,s=Hr.ASC,a=0){return re(this.vodApi.getVodCmsEpisodes(e,a,this.environment.platform,n,o,s,r,_s.NONE))}getBundle(e){return re(this.vodApi.getVodBundle(e))}getBundleContentUrl(e){return`${this.location}/vod/v5/cms/bundle/${e}/asset?platformType=${this.environment.platform}&page=\${page}&catalogId=\${catalogId}&adult=\${adult}&extraData=\${extraData}`}getCategories(e){return re(this.vodApi.getVodCategories(e))}getProductionYears(e,n,r){return re(this.vodApi.getProductionYears(e,n,r))}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(ae),h(Ni))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function wW(t,i){if(t&1){let e=B();m(0,"div",4),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.selectYear(r))}),N(1),g()}if(t&2){let e=i.$implicit,n=_(2);H("selected",e===n.selectedYear),u(),ce(" ",e," ")}}function TW(t,i){if(t&1&&(m(0,"div",2),X(1,wW,2,3,"div",3,se),g()),t&2){let e=_();u(),K(e.years)}}var L1=(()=>{class t extends gt{constructor(e,n,r,o){super(),this.vodApi=n,this.filterService=r,this.sessionService=o,this.categoryRoot=[],this.label=e.getTranslation(Io.ribbon_filter_year)}ngOnInit(){this.validateCurrentFilter(),this.filterChangeSubscription=this.filterService.filterChanged.pipe(ke(e=>e===G.YEAR||e===G.TAG)).subscribe(e=>{e===G.YEAR?this.validateCurrentFilter():this.years=void 0})}showYears(){this.showDropdown()?this.hideDropdown():this.reload().subscribe(()=>this.showDropdown.set(!0))}hideDropdown(){this.showDropdown.set(!1)}isButtonActive(){return this.showDropdown()&&!!this.years||!!this.selectedYear}getButtonLabel(){return this.selectedYear?this.selectedYear.toString():this.label}selectYear(e){this.selectedYear=e,this.hideDropdown(),this.filterService.updateFilterNumber(G.YEAR,e)}reload(){return this.years?C(this.years):this.vodApi.getProductionYears(this.sessionService.catalogId,this.categoryRoot.concat(this.filterService.getFilterList(G.TAG)),this.allowedAdultMode).pipe(P(e=>e.sort((n,r)=>r-n)),we(e=>this.years=e))}validateCurrentFilter(){let e=this.filterService.getFilterNumber(G.YEAR);e!==this.selectedYear&&(this.selectedYear=e,this.selectedYear&&this.reload().subscribe(n=>{n.some(r=>r===this.selectedYear)||(this.selectedYear=void 0,this.filterService.clearFilter(G.YEAR))}))}ngOnDestroy(){this.filterChangeSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(Xa),f(dt),f(ne))}}static{this.\u0275cmp=D({type:t,selectors:[["app-year-filter"]],inputs:{allowedAdultMode:"allowedAdultMode",categoryRoot:"categoryRoot"},features:[Ee],decls:3,vars:3,consts:[[1,"filter-container"],[3,"click","label","active"],[1,"dropdown"],[1,"dropdown-item","selectable","font-label",3,"selected"],[1,"dropdown-item","selectable","font-label",3,"click"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"app-text-button",1),A("click",function(){return r.showYears()}),g(),E(2,TW,3,0,"div",2),g()),n&2&&(u(),S("label",r.getButtonLabel())("active",r.isButtonActive()),u(),I(r.showDropdown()&&r.years?2:-1))},dependencies:[Ke],encapsulation:2})}}return t})();
15var Co=(function(t){return t.NONE="NONE",t.WIDEVINE="WIDEVINE",t.PLAYREADY="PLAYREADY",t.FAIRPLAY="FAIRPLAY",t.OTHER="OTHER",t})(Co||{}),mc=(function(t){return t.NONE="none",t.CLEAR_KEY="org.w3.clearkey",t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready",t.FAIRPLAY="com.apple.fps",t.PRIMETIME="com.adobe.primetime",t})(mc||{});function Hv(t){switch(t){case mc.NONE:return Co.OTHER;case mc.CLEAR_KEY:return Co.NONE;case mc.PLAYREADY:return Co.PLAYREADY;case mc.FAIRPLAY:return Co.FAIRPLAY;case mc.WIDEVINE:return Co.WIDEVINE;case mc.PRIMETIME:return Co.OTHER}}function $v(t){return typeof t=="string"&&(t=[t]),t.map(e=>{switch(e){case fu.HW_SECURE_ALL:case fu.HW_SECURE_DECODE:return"L1";case fu.HW_SECURE_CRYPTO:return"L2";case fu.SW_SECURE_DECODE:case fu.SW_SECURE_CRYPTO:return"L3";default:return}}).sort()[0]}var fu=(function(t){return t.SW_SECURE_CRYPTO="SW_SECURE_CRYPTO",t.SW_SECURE_DECODE="SW_SECURE_DECODE",t.HW_SECURE_CRYPTO="HW_SECURE_CRYPTO",t.HW_SECURE_DECODE="HW_SECURE_DECODE",t.HW_SECURE_ALL="HW_SECURE_ALL",t})(fu||{});var ht=(function(t){return t[t.PLAYER=0]="PLAYER",t[t.KEEPALIVE=1]="KEEPALIVE",t[t.START_STREAM=2]="START_STREAM",t[t.STOP_STREAM=3]="STOP_STREAM",t[t.MANIFEST=4]="MANIFEST",t[t.ENGINE=5]="ENGINE",t[t.START_ASSET_STREAM=6]="START_ASSET_STREAM",t})(ht||{}),vt=class extends Error{constructor(i,e,n,r,o){super(),this.message=i,this.origin=e,this.fatal=n,this.code=r,this.id=o}};var Gv=class extends Dn{constructor(i,e=!1){super(e),this.environment=i,this.containerEl=document.createElement("div"),this.onBufferStart=()=>{this.onBuffering(!0)},this.onBufferEnd=()=>{this.onBuffering(!1)},this.onTimeUpdate=()=>{let n=this.player.getPosition(),r=this.player.getDuration();this.player.isLive()&&(n+=this.presentationStartTime);let o=new wr(n,r);this.playerEvents.next(o)},this.onError=n=>{let r=this.handleClppError(n.detail);this.playerEvents.next(new Tr(r))},this.onPlaying=()=>{this.notifyPlaying(!1)},this.onPaused=()=>{this.notifyPaused(!1)},this.onAirplayStarted=()=>{this.notifyAirplay(!0)},this.onAirplayEnded=()=>{this.notifyAirplay(!1)},this.onTracksAdded=()=>{let n=this.videoTracks,r=this.audioTracks,o=this.textTracks;this.notifyTracksAdded(n,r,o)},this.onAdPlaying=()=>{this.notifyPlaying(!0)},this.onAdPaused=()=>{this.notifyPaused(!0)},this.adTimeLineChanged=n=>{this.onAdsAdded(n.adsTimeline.hasPreroll(),!1,n.adsTimeline.hasPostroll())},this.adBreakStart=n=>{this.currentAdBreak=this.mapAdType(n.ad.getPodType()),this.onAdBreak(!0,this.currentAdBreak)},this.adBreakStop=()=>{this.currentAdBreak!==void 0&&(this.onAdBreak(!1,this.currentAdBreak),this.currentAdBreak=void 0)}}loadLib(){return re(import("./chunk-VGXMHET4.js").then(i=>(this.clpp=i.clpp,import("./chunk-VBBVZI3F.js"))).then(()=>import("./chunk-CTZM7NXM.js")).then(()=>{if(!this.forBanner)return import("./chunk-CCXE3CDR.js")}).then(()=>import("./chunk-V5M2HNMP.js")).then(()=>import("./chunk-XIEU2PQG.js")).then(()=>import("./chunk-HUA3IX4N.js")).then(()=>{if(!this.forBanner)return import("./chunk-6LOOXMDC.js")}).then(()=>{if(!this.forBanner)return import("./chunk-6B3RVTIG.js")}).then(()=>import("./chunk-O4YWCR7V.js")).then(()=>import("./chunk-EXNHR7DF.js")).then(()=>this.initGoogleIma()).then(()=>{if(!this.forBanner)return import("./chunk-CSF7LDEU.js")}).then(()=>this.initLib())).pipe(z(i=>{console.error("[CastlabsEngineService]",i);let e=i instanceof vt?i.code:void 0;throw new vt("failed to initialize Castlabs player engine",ht.ENGINE,!0,e)}))}initGoogleIma(){return new Promise((i,e)=>{if(this.forBanner){i(void 0);return}let n=document.createElement("script");n.src="//imasdk.googleapis.com/js/sdkloader/ima3.js",document.head.appendChild(n),n.onload=()=>{i(void 0)},n.onerror=()=>{e(new vt("failed to initialize ima library",ht.ENGINE,!0,Mt.player_disable_add_block))}})}initLib(){let i={license:this.environment.castLabsLicenseKey,muted:this.forBanner},e=document.createElement("video");this.containerEl.appendChild(e),this.player=new this.clpp.Player(e,i,{disableContainer:!1,containerEl:this.containerEl,crossorigin:"anonymous",webOSStartupPatch:!1}),this.installClppComponents()}installClppComponents(){this.clpp.install(this.clpp.dash.DashComponent),this.environment.useHtmlTextDisplayer&&!this.forBanner&&this.clpp.install(this.clpp.htmlcue.HtmlCueComponent),this.clpp.install(this.clpp.ttml.TtmlComponent),this.clpp.install(this.clpp.vtt.VttComponent),this.forBanner||this.player.one(this.clpp.events.AIRPLAY_STATUS_CHANGED,(
15)=>{this.airplayPlugin=this.player.getPlugin(this.clpp.airplay.AirPlayPlugin.Id)}),this.addEventListeners()}get videoElement(){return this.containerEl}get containerElement(){}load(i){let e=this.configureDrm(i.drmConfig),n=i.sources.map(r=>({url:r.manifest.url,drmProtected:e!==void 0}));return this.handleClppPromise(this.player.load({source:n,startTime:i.startPosition,abr:this.configureAbr(i.initialBitrate),drm:e,broadpeak:this.configureBroadpeak(i.broadpeakConfig),ima:this.configureIma(i.vast)}))}configureDrm(i){if(i)return{env:i.environment,customData:{userId:i.userId,sessionId:i.sessionId,merchant:i.merchant,assetId:i.assetId,authToken:i.authToken},preferredDrmSystem:this.getDrmKeySystem(i.keySystem)}}getDrmKeySystem(i){switch(i){case fi.FAIRPLAY:return this.clpp.drm.KeySystem.FAIRPLAY;case fi.PLAYREADY:return this.clpp.drm.KeySystem.PLAYREADY;case fi.WIDEVINE:return this.clpp.drm.KeySystem.WIDEVINE;default:return}}configureBroadpeak(i){if(i)return this.clpp.broadpeak.BroadpeakPlugin.isSdkMissing()&&console.warn("[CastlabsEngineService] Broadpeak plugin not loaded"),{analyticsAddress:i.analyticsServer??"",broadpeakDomainNames:i.analyticsDomain}}configureIma(i){if(i)return{adTagUrl:i.url,playAdsAfterTime:i.playAdsFrom}}configureAbr(i){return{enabled:!0,defaultBandwidthEstimate:i}}handleClppError(i){return new vt(i.message,ht.PLAYER,i.severity===this.clpp.Error.Severity.FATAL&&i.code!==this.clpp.Error.Code.LOAD_INTERRUPTED,`[CASTLABS] - ${i.code}`)}handleClppPromise(i){return re(i).pipe(z(e=>{throw this.handleClppError(e)}))}release(){return this.player?this.handleClppPromise(this.player.release()):C(void 0)}destroy(){this.player&&this.player.destroy()}addEventListeners(){this.player.on("playing",this.onPlaying),this.player.on("pause",this.onPaused),this.player.on("ended",this.onEnded),this.player.on(this.clpp.events.ERROR,this.onError),this.player.on("timeupdate",this.onTimeUpdate),!this.forBanner&&(this.player.on(this.clpp.events.BUFFERING_STARTED,this.onBufferStart),this.player.on(this.clpp.events.BUFFERING_ENDED,this.onBufferEnd),this.player.on(this.clpp.events.TRACKS_ADDED,this.onTracksAdded),this.player.on(this.clpp.events.AIRPLAY_CASTING_STARTED,this.onAirplayStarted),this.player.on(this.clpp.events.AIRPLAY_CASTING_ENDED,this.onAirplayEnded),this.player.on(this.clpp.events.ADS_TIMELINE_CHANGED,this.adTimeLineChanged),this.player.on(this.clpp.events.AD_BREAK_STARTED,this.adBreakStart),this.player.on(this.clpp.events.AD_BREAK_STOPPED,this.adBreakStop),this.player.on(this.clpp.events.AD_RESUMED,this.onAdPlaying),this.player.on(this.clpp.events.AD_PAUSED,this.onAdPaused))}removeEventListeners(){this.player.off("playing",this.onPlaying),this.player.off("pause",this.onPaused),this.player.off("ended",this.onEnded),this.player.off(this.clpp.events.ERROR,this.onError),this.player.off("timeupdate",this.onTimeUpdate),!this.forBanner&&(this.player.off(this.clpp.events.BUFFERING_STARTED,this.onBufferStart),this.player.off(this.clpp.events.BUFFERING_ENDED,this.onBufferEnd),this.player.off(this.clpp.events.TRACKS_ADDED,this.onTracksAdded),this.player.off(this.clpp.events.AIRPLAY_CASTING_STARTED,this.onAirplayStarted),this.player.off(this.clpp.events.AIRPLAY_CASTING_ENDED,this.onAirplayEnded),this.player.off(this.clpp.events.ADS_TIMELINE_CHANGED,this.adTimeLineChanged),this.player.off(this.clpp.events.AD_BREAK_STARTED,this.adBreakStart),this.player.off(this.clpp.events.AD_BREAK_STOPPED,this.adBreakStop),this.player.off(this.clpp.events.AD_RESUMED,this.onAdPlaying),this.player.off(this.clpp.events.AD_PAUSED,this.onAdPaused))}get canAirplay(){return this.airplayPlugin?.canCast()??!1}play(){return this.handleClppPromise(this.player.play())}pause(){this.player.pause()}get isLive(){return this.player.isLive()}seekAbsolute(i){this.player.seek(i)}updateStartTime(i){}get presentationStartTime(){return this.player.getPresentationStartTime()??0}showAirplaySelect(){this.airplayPlugin?.showCastMenu()}get seekRange(){return this.player.getSeekRange()}get position(){return this.player.getPosition()}set volume(i){this.player.setVolume(i)}set muted(i){this.player.setMuted(i)}get videoTracks(){let i=this.videoRenditions,e=new Map;
15return i.forEach(n=>{let r=n.height??0,o=n.track.frameRate??void 0,s=`${r}@${o}`;e.set(s,{height:r,id:n.id,frameRate:o})}),Array.from(e.values())}get videoRenditions(){let i=[];return this.player.getTrackManager()?.getVideoTracks().forEach(e=>{i.push(...e.renditions)}),i}get audioTracks(){return(this.player.getTrackManager()?.getAudioTracks()??[]).map(e=>this.convertToAudioTrack(e))}convertToAudioTrack(i){return{id:i.id,channelsCount:i.channelsCount??void 0,label:i.label??void 0,language:i.language??void 0}}get textTracks(){return this.textRenditions.map(e=>({id:e.id,language:e.track.language??void 0,label:e.track.label??void 0,representationId:e.originalId??void 0}))}get textRenditions(){let i=[];return this.player.getTrackManager()?.getTextTracks().forEach(e=>{i.push(...e.renditions)}),i}selectVideoTrack(i){let e=this.videoRenditions.find(n=>n.id===i);this.player.getTrackManager()?.setVideoRendition(e,!!e)}selectAudioTrack(i){let e=this.player.getTrackManager();if(e){let n=e.getAudioTracks().find(r=>r.id===i);n&&this.player.getTrackManager()?.setAudioTrack(n)}}get activeAudioTrack(){let i=this.player.getTrackManager()?.getAudioTrack();if(i)return this.convertToAudioTrack(i)}selectTextTrack(i){let e=this.textRenditions.find(n=>n.id===i);this.player.getTrackManager()?.setTextRendition(e,!0)}get drmInfo(){let i=this.player.getDrmInfo();if(!i)return{};let e=Hv(i.keySystem),n;e===Co.WIDEVINE&&(n=$v(i.videoRobustness));let r=this.player.getTrackManager()?.getVideoRendition();return{provider:e,outputHeight:r?.height??void 0,outputWidth:r?.width??void 0,supportsHdr10:screen.colorDepth>24,widevineSecurity:n}}loadThumbnail(i){let e=this.player.getPlugin(this.clpp.thumbnails.ThumbnailsPlugin.Id);return e?re(e.get(i)).pipe(fe(n=>n.load()),P(n=>n.raw().src),z(()=>C(""))):C("")}get isAttached(){return!!this.player}playAd(){this.player.getAdsManager()?.resume()}pauseAd(){this.player.getAdsManager()?.pause()}mapAdType(i){switch(i){case this.clpp.ads.PodType.PREROLL:return Ar.PRE_ROLL;case this.clpp.ads.PodType.MIDROLL:return Ar.MID_ROLL;case this.clpp.ads.PodType.POSTROLL:return Ar.POST_ROLL}}};var FI=(function(t){return t[t.AES_128_INVALID_IV_LENGTH=4048]="AES_128_INVALID_IV_LENGTH",t[t.AES_128_INVALID_KEY_LENGTH=4049]="AES_128_INVALID_KEY_LENGTH",t[t.ALREADY_CASTING=8002]="ALREADY_CASTING",t[t.ATTEMPTS_EXHAUSTED=1010]="ATTEMPTS_EXHAUSTED",t[t.BAD_ENCODING=2004]="BAD_ENCODING",t[t.BAD_HTTP_STATUS=1001]="BAD_HTTP_STATUS",t[t.BUFFER_READ_OUT_OF_BOUNDS=3e3]="BUFFER_READ_OUT_OF_BOUNDS",t[t.CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM=4033]="CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM",t[t.CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS=2012]="CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS",t[t.CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM=4045]="CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM",t[t.CANNOT_STORE_LIVE_OFFLINE=9005]="CANNOT_STORE_LIVE_OFFLINE",t[t.CAST_API_UNAVAILABLE=8e3]="CAST_API_UNAVAILABLE",t[t.CAST_CANCELED_BY_USER=8004]="CAST_CANCELED_BY_USER",t[t.CAST_CONNECTION_TIMED_OUT=8005]="CAST_CONNECTION_TIMED_OUT",t[t.CAST_RECEIVER_APP_UNAVAILABLE=8006]="CAST_RECEIVER_APP_UNAVAILABLE",t[t.CHAPTERS_TRACK_FAILED=2015]="CHAPTERS_TRACK_FAILED",t[t.CONTENT_NOT_LOADED=7004]="CONTENT_NOT_LOADED",t[t.CONTENT_TRANSFORMATION_FAILED=3019]="CONTENT_TRANSFORMATION_FAILED",t[t.CONTENT_UNSUPPORTED_BY_BROWSER=4032]="CONTENT_UNSUPPORTED_BY_BROWSER",t[t.CS_AD_MANAGER_NOT_INITIALIZED=10001]="CS_AD_MANAGER_NOT_INITIALIZED",t[t.CS_IMA_SDK_MISSING=1e4]="CS_IMA_SDK_MISSING",t[t.CURRENT_DAI_REQUEST_NOT_FINISHED=10004]="CURRENT_DAI_REQUEST_NOT_FINISHED",t[t.DASH_CONFLICTING_AES_128=4050]="DASH_CONFLICTING_AES_128",t[t.DASH_CONFLICTING_KEY_IDS=4010]="DASH_CONFLICTING_KEY_IDS",t[t.DASH_DUPLICATE_REPRESENTATION_ID=4018]="DASH_DUPLICATE_REPRESENTATION_ID",t[t.DASH_EMPTY_ADAPTATION_SET=4003]="DASH_EMPTY_ADAPTATION_SET",t[t.DASH_EMPTY_PERIOD=4004]="DASH_EMPTY_PERIOD",t[t.DASH_INVALID_PATCH=4052]="DASH_INVALID_PATCH",t[t.DASH_INVALID_XML=4001]="DASH_INVALID_XML",t[t.DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED=4054]="DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED",t[t.DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED=4009]="DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED",t[t.DASH_NO_COMMON_KEY_SYSTEM=4008]="DASH_NO_COMMON_KEY_SYSTEM",t[t.DASH_NO_SEGMENT_INFO=4002]="DASH_NO_SEGMENT_INFO",t[t.DASH_PSSH_BAD_ENCODING=4007]="DASH_PSSH_BAD_ENCODING",t[t.DASH_UNSUPPORTED_AES_128=4051]="DASH_UNSUPPORTED_AES_128",t[t.DASH_UNSUPPORTED_CONTAINER=4006]="DASH_UNSUPPORTED_CONTAINER",t[t.DASH_UNSUPPORTED_XLINK_ACTUATE=4027]="DASH_UNSUPPORTED_XLINK_ACTUATE",t[t.DASH_WEBM_MISSING_INIT=4005]="DASH_WEBM_MISSING_INIT",t[t.DASH_XLINK_DEPTH_
15LIMIT=4028]="DASH_XLINK_DEPTH_LIMIT",t[t.DEPRECATED_OPERATION_ABORTED=9002]="DEPRECATED_OPERATION_ABORTED",t[t.DOWNLOAD_SIZE_CALLBACK_ERROR=9015]="DOWNLOAD_SIZE_CALLBACK_ERROR",t[t.EBML_BAD_FLOATING_POINT_SIZE=3003]="EBML_BAD_FLOATING_POINT_SIZE",t[t.EBML_OVERFLOW=3002]="EBML_OVERFLOW",t[t.ENCRYPTED_CONTENT_WITHOUT_DRM_INFO=6010]="ENCRYPTED_CONTENT_WITHOUT_DRM_INFO",t[t.ERROR_CHECKING_HDCP_VERSION=6019]="ERROR_CHECKING_HDCP_VERSION",t[t.EXPIRED=6014]="EXPIRED",t[t.FAILED_TO_ATTACH_TO_VIDEO=6003]="FAILED_TO_ATTACH_TO_VIDEO",t[t.FAILED_TO_CREATE_CDM=6002]="FAILED_TO_CREATE_CDM",t[t.FAILED_TO_CREATE_SESSION=6005]="FAILED_TO_CREATE_SESSION",t[t.FAILED_TO_GENERATE_LICENSE_REQUEST=6006]="FAILED_TO_GENERATE_LICENSE_REQUEST",t[t.HLS_COULD_NOT_GUESS_CODECS=4025]="HLS_COULD_NOT_GUESS_CODECS",t[t.HLS_EMPTY_MEDIA_PLAYLIST=4053]="HLS_EMPTY_MEDIA_PLAYLIST",t[t.HLS_INVALID_PLAYLIST_HIERARCHY=4017]="HLS_INVALID_PLAYLIST_HIERARCHY",t[t.HLS_KEYFORMATS_NOT_SUPPORTED=4026]="HLS_KEYFORMATS_NOT_SUPPORTED",t[t.HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED=4041]="HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED",t[t.HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED=4040]="HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED",t[t.HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND=4020]="HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND",t[t.HLS_PLAYLIST_HEADER_MISSING=4015]="HLS_PLAYLIST_HEADER_MISSING",t[t.HLS_REQUIRED_ATTRIBUTE_MISSING=4023]="HLS_REQUIRED_ATTRIBUTE_MISSING",t[t.HLS_REQUIRED_TAG_MISSING=4024]="HLS_REQUIRED_TAG_MISSING",t[t.HLS_VARIABLE_NOT_FOUND=4039]="HLS_VARIABLE_NOT_FOUND",t[t.HTTP_ERROR=1002]="HTTP_ERROR",t[t.INCONSISTENT_DRM_ACROSS_PERIODS=4038]="INCONSISTENT_DRM_ACROSS_PERIODS",t[t.INDEXED_DB_ERROR=9001]="INDEXED_DB_ERROR",t[t.INDEXED_DB_INIT_TIMED_OUT=9017]="INDEXED_DB_INIT_TIMED_OUT",t[t.INIT_DATA_TRANSFORM_ERROR=6016]="INIT_DATA_TRANSFORM_ERROR",t[t.INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED=10006]="INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED",t[t.INVALID_HLS_TAG=4016]="INVALID_HLS_TAG",t[t.INVALID_MP4_CEA=2010]="INVALID_MP4_CEA",t[t.INVALID_MP4_TTML=2007]="INVALID_MP4_TTML",t[t.INVALID_MP4_VTT=2008]="INVALID_MP4_VTT",t[t.INVALID_SERVER_CERTIFICATE=6004]="INVALID_SERVER_CERTIFICATE",t[t.INVALID_TEXT_CUE=2001]="INVALID_TEXT_CUE",t[t.INVALID_TEXT_HEADER=2e3]="INVALID_TEXT_HEADER",t[t.INVALID_XML=2005]="INVALID_XML",t[t.JS_INTEGER_OVERFLOW=3001]="JS_INTEGER_OVERFLOW",t[t.KEY_NOT_FOUND=9012]="KEY_NOT_FOUND",t[t.LICENSE_REQUEST_FAILED=6007]="LICENSE_REQUEST_FAILED",t[t.LICENSE_RESPONSE_REJECTED=6008]="LICENSE_RESPONSE_REJECTED",t[t.LOAD_INTERRUPTED=7e3]="LOAD_INTERRUPTED",t[t.LOCAL_PLAYER_INSTANCE_REQUIRED=9008]="LOCAL_PLAYER_INSTANCE_REQUIRED",t[t.MALFORMED_DATA_URI=1004]="MALFORMED_DATA_URI",t[t.MALFORMED_OFFLINE_URI=9004]="MALFORMED_OFFLINE_URI",t[t.MALFORMED_TEST_URI=1008]="MALFORMED_TEST_URI",t[t.MEDIA_SOURCE_OPERATION_FAILED=3014]="MEDIA_SOURCE_OPERATION_FAILED",t[t.MEDIA_SOURCE_OPERATION_THREW=3015]="MEDIA_SOURCE_OPERATION_THREW",t[t.MIN_HDCP_VERSION_NOT_MATCH=6018]="MIN_HDCP_VERSION_NOT_MATCH",t[t.MISSING_STORAGE_CELL=9013]="MISSING_STORAGE_CELL",t[t.MISSING_TEXT_PLUGIN=2014]="MISSING_TEXT_PLUGIN",t[t.MODIFY_OPERATION_NOT_SUPPORTED=9016]="MODIFY_OPERATION_NOT_SUPPORTED",t[t.MP4_SIDX_INVALID_TIMESCALE=3005]="MP4_SIDX_INVALID_TIMESCALE",t[t.MP4_SIDX_TYPE_NOT_SUPPORTED=3006]="MP4_SIDX_TYPE_NOT_SUPPORTED",t[t.MP4_SIDX_WRONG_BOX_TYPE=3004]="MP4_SIDX_WRONG_BOX_TYPE",t[t.MSS_INVALID_XML=4046]="MSS_INVALID_XML",t[t.MSS_LIVE_CONTENT_NOT_SUPPORTED=4047]="MSS_LIVE_CONTENT_NOT_SUPPORTED",t[t.MSS_MISSING_DATA_FOR_TRANSMUXING=3020]="MSS_MISSING_DATA_FOR_TRANSMUXING",t[t.MSS_TRANSMUXING_FAILED=3022]="MSS_TRANSMUXING_FAILED",t[t.MT_AD_MANAGER_NOT_INITIALIZED=10005]="MT_AD_MANAGER_NOT_INITIALIZED",t[t.NEW_KEY_OPERATION_NOT_SUPPORTED=9011]="NEW_KEY_OPERATION_NOT_SUPPORTED",t[t.NO_CAST_RECEIVERS=8001]="NO_CAST_RECEIVERS",t[t.NO_INIT_DATA_FOR_OFFLINE=9007]="NO_INIT_DATA_FOR_OFFLINE",t[t.NO_LICENSE_SERVER_GIVEN=6012]="NO_LICENSE_SERVER_GIVEN",t[t.NO_RECOGNIZED_KEY_SYSTEMS=6e3]="NO_RECOGNIZED_KEY_SYSTEMS",t[t.NO_VARIANTS=4036]="NO_VARIANTS",t[t.NO_VIDEO_ELEMENT=7002]="NO_VIDEO_ELEMENT",t[t.NO_WEB_CRYPTO_API=4042]="NO_WEB_CRYPTO_API",t[t.OBJECT_DESTROYED=7003]="OBJECT_DESTROYED",t[t.OFFLINE_SESSION_REMOVED=6013]="OFFLINE_SESSION_REMOVED",t[t.OPERATION_ABORTED=7001]="OPERATION_ABORTED",t[t.PERIOD_FLATTENING_FAILED=4037]="PERIOD_FLATTENING_FAILED",t[t.QUOTA_EXCEEDED_ERROR=3017]="QUOTA_EXCEEDED_ERROR",t[t.REQUESTED_ITEM_NOT_FOUND=9003]="REQUESTED_ITEM_NOT_FOUND",t[t.REQUESTED_
15KEY_SYSTEM_CONFIG_UNAVAILABLE=6001]="REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE",t[t.REQUEST_FILTER_ERROR=1006]="REQUEST_FILTER_ERROR",t[t.RESPONSE_FILTER_ERROR=1007]="RESPONSE_FILTER_ERROR",t[t.RESTRICTIONS_CANNOT_BE_MET=4012]="RESTRICTIONS_CANNOT_BE_MET",t[t.SEGMENT_MISSING=1011]="SEGMENT_MISSING",t[t.SERVER_CERTIFICATE_REQUEST_FAILED=6017]="SERVER_CERTIFICATE_REQUEST_FAILED",t[t.SERVER_CERTIFICATE_REQUIRED=6015]="SERVER_CERTIFICATE_REQUIRED",t[t.SRC_EQUALS_PRELOAD_NOT_SUPPORTED=7005]="SRC_EQUALS_PRELOAD_NOT_SUPPORTED",t[t.SS_AD_MANAGER_NOT_INITIALIZED=10003]="SS_AD_MANAGER_NOT_INITIALIZED",t[t.SS_IMA_SDK_MISSING=10002]="SS_IMA_SDK_MISSING",t[t.STORAGE_LIMIT_REACHED=9014]="STORAGE_LIMIT_REACHED",t[t.STORAGE_NOT_SUPPORTED=9e3]="STORAGE_NOT_SUPPORTED",t[t.STREAMING_ENGINE_STARTUP_INVALID_STATE=5006]="STREAMING_ENGINE_STARTUP_INVALID_STATE",t[t.TEXT_COULD_NOT_GUESS_MIME_TYPE=2011]="TEXT_COULD_NOT_GUESS_MIME_TYPE",t[t.TEXT_ONLY_WEBVTT_SRC_EQUALS=2013]="TEXT_ONLY_WEBVTT_SRC_EQUALS",t[t.TIMEOUT=1003]="TIMEOUT",t[t.TRANSMUXING_FAILED=3018]="TRANSMUXING_FAILED",t[t.TRANSMUXING_NO_VIDEO_DATA=3023]="TRANSMUXING_NO_VIDEO_DATA",t[t.UNABLE_TO_DETECT_ENCODING=2003]="UNABLE_TO_DETECT_ENCODING",t[t.UNABLE_TO_EXTRACT_CUE_START_TIME=2009]="UNABLE_TO_EXTRACT_CUE_START_TIME",t[t.UNABLE_TO_GUESS_MANIFEST_TYPE=4e3]="UNABLE_TO_GUESS_MANIFEST_TYPE",t[t.UNEXPECTED_CAST_ERROR=8003]="UNEXPECTED_CAST_ERROR",t[t.UNEXPECTED_TEST_REQUEST=1009]="UNEXPECTED_TEST_REQUEST",t[t.UNSUPPORTED_EXTERNAL_THUMBNAILS_URI=2017]="UNSUPPORTED_EXTERNAL_THUMBNAILS_URI",t[t.UNSUPPORTED_SCHEME=1e3]="UNSUPPORTED_SCHEME",t[t.VAST_INVALID_XML=10007]="VAST_INVALID_XML",t[t.VIDEO_ERROR=3016]="VIDEO_ERROR",t[t.WEBM_CUES_ELEMENT_MISSING=3007]="WEBM_CUES_ELEMENT_MISSING",t[t.WEBM_CUE_TIME_ELEMENT_MISSING=3013]="WEBM_CUE_TIME_ELEMENT_MISSING",t[t.WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING=3012]="WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING",t[t.WEBM_DURATION_ELEMENT_MISSING=3011]="WEBM_DURATION_ELEMENT_MISSING",t[t.WEBM_EBML_HEADER_ELEMENT_MISSING=3008]="WEBM_EBML_HEADER_ELEMENT_MISSING",t[t.WEBM_INFO_ELEMENT_MISSING=3010]="WEBM_INFO_ELEMENT_MISSING",t[t.WEBM_SEGMENT_ELEMENT_MISSING=3009]="WEBM_SEGMENT_ELEMENT_MISSING",t})(FI||{}),VI=(function(t){return t[t.CRITICAL=2]="CRITICAL",t[t.RECOVERABLE=1]="RECOVERABLE",t})(VI||{}),Fi=(function(t){return t.BufferingEvent="buffering",t.ErrorEvent="error",t.TracksChangedEvent="trackschanged",t.CanUpdateStartTime="canupdatestarttime",t.AdCuePointsChanged="ad-cue-points-changed",t.AdStarted="ad-started",t.AdEnded="ad-stopped",t.AdPaused="ad-paused",t.AdPlaying="ad-playing",t})(Fi||{}),Wv=(function(t){return t[t.MANIFEST=0]="MANIFEST",t[t.SEGMENT=1]="SEGMENT",t[t.LICENSE=2]="LICENSE",t[t.APP=3]="APP",t[t.TIMING=4]="TIMING",t[t.SERVER_CERTIFICATE=5]="SERVER_CERTIFICATE",t[t.KEY=6]="KEY",t[t.ADS=7]="ADS",t[t.CONTENT_STEERING=8]="CONTENT_STEERING",t})(Wv||{});var zv=class extends Dn{constructor(i,e=!1){super(e),this.environment=i,this.videoEl=document.createElement("video"),this.containerEl=document.createElement("div"),this.adContainerEl=document.createElement("div"),this.pauseAd=()=>{this.currentAd.pause(),this.notifyPaused(!0)},this.playAd=()=>{this.currentAd.play(),this.notifyPlaying(!0)},this.onPlaying=()=>{this.notifyPlaying(!1)},this.onPaused=()=>{this.notifyPaused(!1)},this.onError=n=>{let r=this.handleShakaError(n.detail);this.playerEvents.next(new Tr(r))},this.onTimeUpdate=()=>{let n=this.videoEl.currentTime,r=this.videoEl.duration;if(Number.isNaN(r))return;let o=this.presentationStartTime;this.player.isLive()&&o>this.seekRange.start&&(n+=o??0);let s=new wr(n,r);this.playerEvents.next(s)},this.onBuffer=n=>{this.onBuffering(n.buffering)},this.onTracksAdded=()=>{let n=this.videoTracks,r=this.audioTracks,o=this.textTracks;this.notifyTracksAdded(n,r,o)},this.adTimeLineChanged=n=>{this.onAdsAdded(n.cuepoints.some(r=>r.start===0),n.cuepoints.some(r=>r.start!==0&&r.start!==1),n.cuepoints.some(r=>r.start===-1))},this.adStart=n=>{this.currentAd=n.ad,this.onAdBreak(!0,this.mapAdType(this.currentAd))},this.adStop=()=>{this.currentAd!==void 0&&(this.onAdBreak(!1,this.mapAdType(this.currentAd)),this.currentAd=void 0)},this.videoEl.style.width="100%",this.videoEl.style.height="100%",this.containerEl.style.display="flex",this.containerEl.style.minHeight="100%",this.containerEl.style.minWidth="100%",this.containerEl.style.position="absolute",this.containerEl.style.bottom="0",this.containerEl.style.justifyContent="center",this.adContainerEl.style.minHeight="100%",this.adContainerEl.style.minWidth="100%",this.containerEl.appendChild(this.adContainerEl),this.videoEl.muted=e}loadLib(){return re(this.initGoogleIma().then(()=>import("./chunk-BBETYKX4.js")).then(i=>(i.default&&(i=i.default),i.polyfill.installAll(),this.player=new i.Player,this.forBanner||(this.player.setVideoContainer(this.containerEl),this.adManager=this.player.getAdManager()),this.stringUtils=i.util.StringUtils,this.uInt8ArrayUtils=i.util.Uint8ArrayUtils,this.addLicenseResponseHandler(),this.player.attach(this.videoEl))).then(()=>{this.addEventListeners()}))}initGoogleIma(){return new Promise((i,e)=>{if(this.forBanner){i(void 0);return}let n=document.createElement("script");n.src="//imasdk.googleapis.com/js/sdkloader/ima3.js",document.head.appendChild(n),n.onload=()=>{i(void 0)},n.onerror=()=>{e(new vt("failed to initialize ima library",ht.ENGINE,!0,Mt.player_disable_add_block))}})}get activeAudioTrack(){let i=this.activeVariantTrack;return i?this.convertToAudioTrack(i):void 0}get canAirplay(){return!1}destroy(){this.player&&this.player.destroy()}get drmInfo(){let i=this.player.drmInfo(),e;i&&(e=Hv(i.keySystem));let n;e===Co.WIDEVINE&&i&&(n=$v(i.videoRobustness));let r=this.player.getVariantTracks().find(o=>o.active);return{provider:e,outputHeight:r?.height??void 0,outputWidth:r?.width??void 0,supportsHdr10:screen.colorDepth>24,widevineSecurity:n}}get videoElement(){return this.videoEl}get containerElement(){return this.containerEl}get isAttached(){return!!this.player}get isLive(){return this.player.isLive()}load(i){return this.player.getNetworkingEngine().clearAllRequestFilters(),i.drmConfig&&this.addDrmSupport(i.drmConfig),this.player.configure("streaming.lowLatencyMode",!0),this.player.configure("textDisplayer.fontScaleFactor",1.5),this.player.configure("abr.defaultBandwidthEstimate",i.initialBitrate),this.handleShakaPromise(this.player.load(i.sources?.[0]?.manifest.url,i.startPosition)).pipe(we(()=>{this.forBanner||(this.adManager.initClientSide(this.adContainerEl,this.videoEl),this.configureIma(i.vast))}))}addDrmSupport(i){let e=i.environment==="DRMtoday_STAGING"?"lic.staging":"lic";this.player.configure("drm.servers",{"com.widevine.alpha":`https://${e}.drmtoday.com/license-proxy-widevine/cenc/?assetId=${i.assetId}`,"com.apple.fps":`https://${e}.drmtoday.com/license-server-fairplay/`}),i.keySystem&&(this.player.configure("drm.preferredKeySystems",[this.mapKeySystem(i.keySystem)]),i.keySystem===fi.FAIRPLAY&&this.player.configure("drm.advanced.com\\.apple\\.fps.serverCertificateUri",`https://${e}.drmtoday.com/license-server-fairplay/cert/${i.merchant}`)),this.player.getNetworkingEngine().registerRequestFilter((n,r)=>{n===Wv.LICENSE&&(r.headers["dt-custom-data"]=btoa(JSON.stringify({userId:i.userId,sessionId:i.sessionId,merchant:i.merchant})),i.authToken&&(r.headers["x-dt-auth-token"]=i.authToken))})}configureIma(i){if(i&&i.url&&this.adManager){let e=new google.ima.AdsRequest;e.adTagUrl=i.url;let n=new google.ima.AdsRenderingSettings;n.playAdsAfterTime=i.playAdsFrom,this.adManager.updateClientSideAdsRenderingSettings(n),this.adManager.requestClientSideAds(e)}}mapKeySystem(i){switch(i){case fi.WIDEVINE:return rf.WIDEVINE;case fi.PLAYREADY:return rf.PLAYREADY;
15case fi.FAIRPLAY:return rf.FAIRPLAY}}addLicenseResponseHandler(){this.player.getNetworkingEngine().registerResponseFilter((i,e)=>{if(i===Wv.LICENSE){let n=this.stringUtils.fromUTF8(e.data),r=JSON.parse(n);e.data=this.uInt8ArrayUtils.fromBase64(r.license)}})}loadThumbnail(i){let e=this.getImageTrackId();return e?this.handleShakaPromise(this.player.getThumbnails(e,i)).pipe(P(n=>{let r=n.uris;return r?.length>0?r[0]:""})):C("")}getImageTrackId(){let i=this.player.getImageTracks();if(i.length>0)return i[0].id}set muted(i){this.videoEl.muted=i}pause(){this.videoEl.pause()}play(){return this.handleShakaPromise(this.videoEl.play())}get position(){return this.videoEl.currentTime}release(){return this.player?re(this.player.unload()):C(void 0)}addEventListeners(){this.videoEl.addEventListener("playing",this.onPlaying),this.videoEl.addEventListener("pause",this.onPaused),this.videoEl.addEventListener("ended",this.onEnded),this.player.addEventListener(Fi.ErrorEvent,this.onError),this.videoEl.addEventListener("timeupdate",this.onTimeUpdate),this.player.addEventListener(Fi.CanUpdateStartTime,this.notifyCanUpdateStartTime),!this.forBanner&&(this.player.addEventListener(Fi.BufferingEvent,this.onBuffer),this.player.addEventListener(Fi.TracksChangedEvent,this.onTracksAdded),this.adManager&&(this.adManager.addEventListener(Fi.AdCuePointsChanged,this.adTimeLineChanged),this.adManager.addEventListener(Fi.AdStarted,this.adStart),this.adManager.addEventListener(Fi.AdEnded,this.adStop),this.adManager.addEventListener(Fi.AdPlaying,this.playAd),this.adManager.addEventListener(Fi.AdPaused,this.pauseAd)))}removeEventListeners(){this.videoEl.removeEventListener("playing",this.onPlaying),this.videoEl.removeEventListener("pause",this.onPaused),this.videoEl.removeEventListener("ended",this.onEnded),this.player.removeEventListener("error",this.onError),this.videoEl.removeEventListener("timeupdate",this.onTimeUpdate),this.player.removeEventListener(Fi.CanUpdateStartTime,this.notifyCanUpdateStartTime),!this.forBanner&&(this.player.removeEventListener(Fi.BufferingEvent,this.onBuffer),this.player.removeEventListener(Fi.TracksChangedEvent,this.onTracksAdded))}seekAbsolute(i){this.videoEl.currentTime=i}updateStartTime(i){this.player.updateStartTime(i)}get seekRange(){return this.player.seekRange()}selectAudioTrack(i){let e=this.activeVariantTrack;if(e){let n=this.findVariantTrack(`${e.videoId}`,i);n&&this.selectVariantTrack(n)}}selectTextTrack(i){if(i){let e=this.player.getTextTracks().find(n=>`${n.id}`===i);e&&(this.player.selectTextTrack(e),this.player.setTextTrackVisibility(!0))}else this.player.setTextTrackVisibility(!1)}selectVideoTrack(i){if(i){let e=this.activeVariantTrack;if(e){let n=this.findVariantTrack(i,`${e.audioId}`);n&&(this.player.configure("abr.enabled",!1),this.selectVariantTrack(n))}}else this.player.configure("abr.enabled",!0)}get activeVariantTrack(){return this.player.getVariantTracks().find(i=>i.active)}findVariantTrack(i,e){return this.player.getVariantTracks().find(n=>`${n.videoId}`===i&&`${n.audioId}`===e)}selectVariantTrack(i){this.player.selectVariantTrack(i,!0)}showAirplaySelect(){}set volume(i){this.videoEl.volume=i}handleShakaPromise(i){return re(i).pipe(z(e=>{throw this.handleShakaError(e)}))}handleShakaError(i){let e=i.message;return i.data?.length>0&&i.data.forEach((n,r)=>{typeof n=="string"||typeof n=="number"?e+=` | ${r}: ${`${n}`.slice(0,200)}`:n instanceof Error&&(e+=` | ${r}: ${n.message.slice(0,200)}`)}),new vt(e,ht.PLAYER,i.severity===VI.CRITICAL&&i.code!==FI.LOAD_INTERRUPTED,`[SHAKA] - ${i.code}`)}get presentationStartTime(){if(this.player.isLive()){let i=this.player.getPresentationStartTimeAsDate();return i!=null?i.getTime()/1e3:0}return 0}get videoTracks(){let i=this.player.getVariantTracks(),e=new Map;return i.forEach(n=>{let r=n.height??0,o=n.frameRate??void 0;e.set(n.videoId,{height:r,id:`${n.videoId}`,frameRate:o})}),Array.from(e.values())}get audioTracks(){let i=this.player.getVariantTracks(),e=new Map;return i.forEach(n=>{e.set(n.audioId,this.convertToAudioTrack(n))}),Array.from(e.values())}convertToAudioTrack(i){return{id:`${i.audioId}`,channelsCount:i.channelsCount??void 0,label:i.label??void 0,language:i.language??void 0}}get textTracks(){return this.player.getTextTracks().map(e=>({id:`${e.id}`,language:e.language??void 0,label:e.label??void 0,representationId:e.originalTextId??void 0}))}mapAdType(i){if(i&&typeof i.getTimeOffset=="function"){let e=i.getTimeOffset(),n=Ar.MID_ROLL;return e===0?n=Ar.PRE_ROLL:e===-1&&(n=Ar.POST_ROLL),n}}};var qv=class extends Dn{constructor(i,e=!1){super(e),this.environment=i,this.containerEl=document.createElement("div"),this.onBufferStart=()=>{this.onBuffering(!0)},this.onBufferEnd=()=>{this.onBuffering(!1)},this.onTracksAdded=()=>{let n=this.videoTracks,r=this.audioTracks,o=this.textTracks;this.notifyTracksAdded(n,r,o)},this.onPlaying=()=>{this.notifyPlaying(!1)},this.onPaused=()=>{this.notifyPaused(!1)},this.onAirplayStarted=()=>{this.notifyAirplay(!0)},this.onAirplayEnded=()=>{this.notifyAirplay(!1)},this.onError=n=>{let r=this.handleTheoError(n.errorObject);this.playerEvents.next(new Tr(r))},this.onTimeUpdate=()=>{let n=this.player.currentTime,r=this.player.duration;if(Number.isNaN(r))return;let o=this.presentationStartTime;this.isLive&&o>this.seekRange.start&&(n+=o??0);let s=new wr(n,r);this.playerEvents.next(s)},this.containerEl.style.width="100%",this.containerEl.style.height="100%"}loadLib(){return re(import("./chunk-TEJN7RJ6.js").then(i=>{this.player=new i.ChromelessPlayer(this.containerEl,ve(F({},this.environment.theoplayerConfig?.loadConfig),{cast:{strategy:"disabled"}})),this.addEventListeners()}))}destroy(){this.player.destroy()}get videoElement(){return this.containerEl}get containerElement(){}get isAttached(){return!!this.player}get isLive(){return this.player.duration===1/0}get seekRange(){let i=this.player.seekable;return i.length>0?{start:i.start(0),end:i.end(0)}:{start:0,end:0}}get position(){return this.player.currentTime}set volume(i){this.player.volume=i}set muted(i){this.player.muted=i}load(i){return this.player.source={sources:[...i.sources.map(e=>{let n=e.streamType?this.sourceConfigForStreamType(e.streamType):void 0;return F(F({src:e.manifest.url},e.manifest.sourceParameters),n)})]},this.player.abr.strategy={type:"bandwidth",metadata:{bitrate:i.initialBitrate}},this.player.currentTime=i.startPosition,this.handleTheoPromise(new Promise(e=>{let n=()=>{e(void 0),this.player.removeEventListener("loadeddata",n)};this.player.play(),this.player.addEventListener("loadeddata",n)}))}sourceConfigForStreamType(i){return this.environment.theoplayerConfig?.sourceConfig?.find(n=>n.streamTypes?.includes(i))?.config}addEventListeners(){this.player.addEventListener("playing",this.onPlaying),this.player.addEventListener("pause",this.onPaused),this.player.addEventListener("ended",this.onEnded),this.player.addEventListener("error",this.onError),this.player.addEventListener("timeupdate",this.onTimeUpdate),!this.forBanner&&(this.player.addEventListener("waiting",this.onBufferStart),this.player.addEventListener("canplay",this.onBufferEnd),this.player.videoTracks.addEventListener("addtrack",this.onTracksAdded),this.player.audioTracks.addEventListener("addtrack",this.onTracksAdded),this.player.textTracks.addEventListener("addtrack",this.onTracksAdded))}removeEventListeners(){this.player.removeEventListener("playing",this.onPlaying),this.player.removeEventListener("pause",this.onPaused),this.player.removeEventListener("ended",this.onEnded),this.player.removeEventListener("error",this.onError),this.player.removeEventListener("timeupdate",this.onTimeUpdate),!this.forBanner&&(this.player.removeEventListener("waiting",this.onBufferStart),this.player.removeEventListener("canplay",this.onBufferEnd),this.player.videoTracks.removeEventListener("addtrack",this.onTracksAdded),this.player.audioTracks.removeEventListener("addtrack",this.onTracksAdded),this.player.textTracks.removeEventListener("addtrack",this.onTracksAdded))}pause(){this.player.pause()}play(){return this.player.play(),this.handleTheoPromise(Promise.resolve())}handleTheoError(i){return new vt(i.message,ht.PLAYER,!0,`[THEO] - ${i.code}`)}handleTheoPromise(i){return re(i).pipe(z(e=>{throw this.handleTheoError(e)}))}release(){return this.player&&this.player.stop(),this.handleTheoPromise(Promise.resolve())}seekAbsolute(i){this.player.currentTime=i}updateStartTime(i){}selectVideoTrack(i){let e=this.mainVideoTrack;e.targetQuality=e.qualities.find(n=>n.id===i)}selectAudioTrack(i){let e=this.player.audioTracks.find(n=>n.id===i);e&&(e.enabled=!0)}
15selectTextTrack(i){this.player.textTracks.forEach(e=>{e.id===i?e.mode="showing":e.mode="disabled"})}get activeAudioTrack(){let i=this.player.audioTracks.find(e=>e.enabled===!0);return i?this.convertToAudioTrack(i):void 0}get drmInfo(){return{provider:void 0,outputHeight:this.player.videoHeight,outputWidth:this.player.videoWidth,supportsHdr10:screen.colorDepth>24}}get canAirplay(){return!1}showAirplaySelect(){}loadThumbnail(i){let o=this.player.textTracks.find(s=>s.kind==="metadata"&&s.label==="thumbnails")?.cues?.find(s=>s.startTime<=i&&s.endTime>i)?.content??"";return C(o)}playAd(){}pauseAd(){}get presentationStartTime(){let i=this.player.currentProgramDateTime;return i!=null?i.getTime()/1e3:0}get audioTracks(){return this.player?.audioTracks?.map(i=>({id:i.id,language:i.language,label:i.label}))}get textTracks(){return this.player.textTracks.map(i=>({id:i.id,language:i.language,label:i.label}))}get videoTracks(){let i=this.mainVideoTrack;return i?i.qualities.map(e=>({id:e.id,height:e.height,frameRate:e.frameRate})):[]}get mainVideoTrack(){return this.player.videoTracks.length===1?this.player.videoTracks[0]:this.player.videoTracks.find(i=>i.kind==="main")??this.player.videoTracks[0]}convertToAudioTrack(i){return{id:`${i.id}`,channelsCount:void 0,label:i.label,language:i.language}}};var UI=new le("BannerPlayerEngine");function DW(t){let i=t.get(ae);switch(i.playerEngine){case uo.CASTLABS:return new Gv(i,!0);case uo.SHAKA:return new zv(i,!0);case uo.THEO:return new qv(i,!0);default:throw new Error("[PlayerEngineProvider]: No player engine configured")}}var F1={provide:UI,useFactory:DW,deps:[Ut]};var Yv=class{constructor(i){this.customCmsBanners=i,this.currentBannerIndex=0,this.bannerLength=0,this.imageOpacity1=V(0),this.imageOpacity2=V(0),this.srcSet1="",this.srcSet2="",this.lastWasStyle1=!1,this.bannerVisible=!1,this.pageVisible=!1,this.isNextBanner=!0,this.aspectRatio=7/2,this.bannerClass="",this.textOpacity1=0,this.textOpacity2=0,this.bannerLength=this.customCmsBanners.length,this.customCmsBanners.length>0&&(this.aspectRatio=this.getRatio(this.customCmsBanners[0].size),this.bannerClass=this.customCmsBanners[0].size.toLowerCase().replace(/_/g,"-"))}showNextBanner(i){this.lastWasStyle1&&i&&this.customCmsBanners.length>1?this.showBanner2(i):i&&this.showBanner1(i)}getCurrentBanner(){return this.customCmsBanners?.[this.currentBannerIndex]}get isVisible(){return this.bannerVisible&&this.pageVisible}showCurrentBannerImage(){this.lastWasStyle1?(this.imageOpacity1.set(1),this.textOpacity1=1):(this.imageOpacity2.set(1),this.textOpacity2=1)}showBanner1(i){this.srcSet1=i;let e=this.getCurrentBanner();this.textLines1=e?.overlay,this.imageOpacity1.set(1),this.imageOpacity2.set(0),this.textOpacity1=1,this.textOpacity2=0,this.lastWasStyle1=!0}showBanner2(i){this.srcSet2=i;let e=this.getCurrentBanner();this.textLines2=e?.overlay,this.imageOpacity2.set(1),this.imageOpacity1.set(0),this.textOpacity2=1,this.textOpacity1=0,this.lastWasStyle1=!1}getRatio(i){switch(i){case Da.ASPECT_RATIO_7_1:return 1/7;case Da.ASPECT_RATIO_7_2:return 2/7;case Da.ASPECT_RATIO_7_3:return 3/7}}};function AW(t,i){if(t&1){let e=B();te(0,"div",2),qe("click",function(){let r=k(e).$index,o=_();return L(o.switchPage.emit(r))}),J()}if(t&2){let e=i.$index,n=_();H("current-page",e===n.currentPage)}}var V1=(()=>{class t{constructor(){this.switchPage=new Y}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-paging-indicator"]],inputs:{pageCount:"pageCount",currentPage:"currentPage"},outputs:{switchPage:"switchPage"},decls:3,vars:0,consts:[[1,"indicator"],[1,"indicator-dot",3,"current-page"],[1,"indicator-dot",3,"click"]],template:function(n,r){n&1&&(te(0,"div",0),X(1,AW,1,2,"div",1,Vp),J()),n&2&&(u(),K(" ".repeat(r.pageCount).split("")))},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.indicator[_ngcontent-%COMP%]{display:flex;column-gap:1.04rem}.indicator-dot[_ngcontent-%COMP%]{width:.7rem;height:.7rem;border-radius:.35rem;background-color:#fff;opacity:.4;cursor:pointer}.indicator-dot.current-page[_ngcontent-%COMP%]{opacity:1;transition:opacity .3s ease}"]})}}return t})();var Qv=class{constructor(i,e){this.paused=!1,this.callback=i,this.remaining=e,this.start=Date.now(),this.timerId=setTimeout(this.callback,e)}pause(){this.paused||(clearTimeout(this.timerId),this.remaining-=Date.now()-this.start,this.paused=!0)}resume(i){return!this.paused&&i===void 0?!1:(i!==void 0&&(this.remaining-=i*1e3),this.remaining<=0?(this.clear(),this.callback(),!1):(this.start=Date.now(),this.paused=!1,clearTimeout(this.timerId),this.timerId=setTimeout(this.callback,this.remaining),!0))}clear(){clearTimeout(this.timerId),this.paused=!1}};var Zv=class{constructor(i){this.url=i.host,this.token=i.searchParams.get("token")??void 0}get sourceParameters(){return this.token?{subscriberToken:this.token}:void 0}};var Jv=class{constructor(i){this.sourceParameters=void 0,this.url=i.href}};var BI=(function(t){return t.DOLBY="dolby",t})(BI||{});function Xv(t){let i=new URL(t);return!0===i.protocol.startsWith(BI.DOLBY)?new Zv(i):new Jv(i)}var Kv=(()=>{class t{constructor(e,n,r){this.environment=e,this.config=n,this.engine=r,this.engineLoaded=!1,this.pauseStarted=0,this.currentTime=0,this.manifestLoaded=!1,this.showVideo=V(!1),this.videoEnded=new wn(1,
150),this.handlePlayerEvent=o=>{switch(!0){case o instanceof ka:this.handlePlayingEvent();break;case o instanceof La:this.handlePausedEvent();break;case o instanceof Fa:this.handleEndedEvent();break;case o instanceof Tr:this.handleErrorEvent();break;case o instanceof wr:this.handleTimeUpdateEvent(o);break;default:console.warn("Unknown player event: ",o.type)}},this.videoEnabled=this.environment.atvFeatureList.includes(ln.VIDEO_BANNERS)}get videoElement(){if(this.videoEnabled){let e=this.engine.videoElement;return e.classList.add("banner-video"),e}}loadEngine(){return this.engineLoaded?C(void 0):this.engine.loadLib().pipe(we(()=>{this.engineLoaded=!0}))}playManifest(e,n){this.loadEngine().pipe(fe(()=>{let r={sources:e.map(o=>({manifest:Xv(o)})),startPosition:0,initialBitrate:this.getInitialBitrate()};return this.manifestLoaded=!0,this.engine.load(r)})).subscribe({next:()=>{this.handlePlayerReady(n)},error:()=>{this.handleErrorEvent()}})}listenForEvents(){this.destroy(),this.eventsSub=this.engine.playerEvents.subscribe({next:this.handlePlayerEvent})}destroy(){this.eventsSub?.unsubscribe(),this.eventsSub=void 0,this.engineLoaded&&(this.engine.removeEventListeners(),this.engine.destroy())}clearPlayTimeout(){this.pauseStarted=0,this.currentTime=0,this.playTimeout&&(this.playTimeout.clear(),this.playTimeout=void 0)}get canContinue(){return!!this.pauseStarted}continuePlay(){if(this.pauseStarted){let e=(new Date().getTime()-this.pauseStarted)/1e3;this.engine.seekAbsolute(this.currentTime+e),this.playTimeout?.resume(e)&&this.engine.play()}else this.engine.play()}pause(){!this.engineLoaded||!this.showVideo()||(this.playTimeout?.pause(),this.engine.pause())}stop(){this.showVideo.set(!1),this.currentTime=0,this.engine.release().subscribe()}getInitialBitrate(){return screen.height>2e3?this.config.getSettingNumber(x.playerInitialBitrate4K,3e6):this.config.getSettingNumber(x.playerInitialBitrate,3e6)}handlePlayingEvent(){console.log("handling playing event"),this.showVideo.set(!0)}handlePausedEvent(){this.showVideo.set(!1),this.pauseStarted=new Date().getTime()}handleEndedEvent(){this.showVideo.set(!1),this.currentTime=0,this.notifyVideoEnded()}handleErrorEvent(){this.showVideo.set(!1),this.currentTime=0,this.notifyVideoEnded()}handleTimeUpdateEvent(e){this.currentTime=e.position}notifyVideoEnded(){this.manifestLoaded&&(this.manifestLoaded=!1,this.videoEnded.next())}handlePlayerReady(e){this.engine.play().pipe(z(n=>(console.warn("Play failed:",n),this.handleErrorEvent(),C(void 0)))).subscribe(),e&&(this.playTimeout=new Qv(()=>{this.engine.release(),this.engineLoaded=!1,this.handleEndedEvent(),this.playTimeout=void 0,this.pauseStarted=0},e))}static{this.\u0275fac=function(n){return new(n||t)(h(ae),h(O),h(UI))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac})}}return t})();var B1=new le("cms-action-handler"),U1=class{constructor(i,e,n,r){this.adultService=i,this.player=e,this.messagesService=n,this.config=r}checkAdultAndPlay(i){i.isAdult?this.adultService?.checkAdultMode({successCallback:()=>{this.player?.startAsset(i)},errorCallback:()=>{this.messagesService?.showErrorMessage(this.config?.getTranslation(pe.detail_adult_warning)??"")}}):this.player?.startAsset(i)}};var hu=(()=>{class t{constructor(e){this.actionHandlers=e}doAction(e,n=!1,r=!1){for(let o of this.actionHandlers)if(o.handlesMethod(e.actionMethod)&&o.handlesType(e.actionType)){o.handleAction(e,r),n&&e.actionType!==he.PAGE&&e.actionType!==he.CHANNEL&&this.actionHandlers.find(a=>a.handlesMethod(Xt.DETAIL)&&a.handlesType(e.actionType))?.handleAction({actionId:e.actionId,actionType:e.actionType,actionMethod:Xt.DETAIL});return}console.error("action not implemented",e)}static{this.\u0275fac=function(n){return new(n||t)(h(B1))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function xW(t,i){if(t&1){let e=B();te(0,"div",2),qe("click",function(){let r=k(e).$implicit,o=_();return L(o.itemSelected.emit(r))}),te(1,"span"),N(2),J(),Qe(3,"div",3),J()}if(t&2){let e=i.$implicit;u(2),Q(e.title),u(),H("invisible",!e.active)}}var Ka=(()=>{class t{constructor(){this.verPlacement="bottom",this.horPlacement="right",this.itemSelected=new Y}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-dropdown-list"]],inputs:{items:"items",verPlacement:"verPlacement",horPlacement:"horPlacement"},outputs:{itemSelected:"itemSelected"},decls:3,vars:4,consts:[[1,"dropdown"],[1,"dropdown-item","selectable"],[1,"dropdown-item","selectable",3,"click"],[1,"dropdown-item-checked"]],template:function(n,r){n&1&&(te(0,"div",0),X(1,xW,4,3,"div",1,se),J()),n&2&&(H("dropdown-top-placement",r.verPlacement==="top")("dropdown-left-placement",r.horPlacement==="left"),u(),K(r.items))},styles:['[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.dropdown-item-checked[_ngcontent-%COMP%]:after{color:#ca7ef1;font-family:fontawesome-bold;content:"\\f00c";margin-left:.5rem}.dropdown-top-placement[_ngcontent-%COMP%]{bottom:100%}.dropdown-left-placement[_ngcontent-%COMP%]{right:0}']})}}return t})();function MW(t,i){if(t&1){let e=B();m(0,"app-dropdown-list",3),A("itemSelected",function(r){k(e);let o=_();return L(o.itemSelected.emit(r))}),g()}if(t&2){let e=_();S("items",e.items)}}var j1=(()=>{class t extends gt{constructor(){super(...arguments),this.quickSelect=!0,this.activated=new Y,this.itemSelected=new Y}hideDropdown(){this.showDropdown.set(!1)}showOptions(){this.quickSelect&&this.items?.length===1?(this.activated.emit(),this.itemSelected.emit(this.items[0])):(this.showDropdown.set(!this.showDropdown()),this.showDropdown()&&this.activated.emit())}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=_r(t)))(r||t)}})()}static{this.\u0275cmp=D({type:t,selectors:[["app-dropdown-list-button"]],inputs:{label:"label",items:"items",quickSelect:"quickSelect"},outputs:{activated:"activated",itemSelected:"itemSelected"},features:[Ee],decls:3,vars:3,consts:[[1,"button-wrapper"],[3,"click","label","active"],[3,"items"],[3,"itemSelected","items"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"app-text-button",1),A("click",function(){return r.showOptions()}),g(),E(2,MW,1,1,"app-dropdown-list",2),g()),n&2&&(u(),S("label",r.label)("active",r.showDropdown()),u(),I(r.showDropdown()?2:-1))},dependencies:[Ka,Ke],encapsulation:2})}}return t})();function PW(t,i){if(t&1){let e=B();m(0,"div",1),M(1,"app-recording-options",2),m(2,"div",3)(3,"app-text-button",4),A("click",function(){k(e);let r=_();return L(r.hideDropdown())}),g(),m(4,"app-text-button",5),A("click",function(){k(e);let r=_();return r.confirm.emit(r.options),L(r.hideDropdown())}),g()()()}if(t&2){let e=_();u(),S("options",e.options)("dropdownConfig",e.dropdownConfig),u(2),S("label",e.cancelLabel),u(),S("label",e.confirmLabel)("active",!0)}}var H1=(()=>{class t extends gt{constructor(e){super(),this.confirm=new Y,this.icon="./assets/theme/svg/recording_button.svg",this.cancelLabel="",this.cancelLabel=e.getTranslation(ni.popup_btn_cancel)}showOptions(){!this.showDropdown()&&this.options?this.openDropdown():this.showDropdown.set(!1)}hideDropdown(){this.showDropdown.set(!1)}static{this.\u0275fac=function(n){return new(n||t)(f(O))}}static{this.\u0275cmp=D({type:t,selectors:[["app-recording-button"]],inputs:{label:"label",confirmLabel:"confirmLabel",options:"options",dropdownConfig:"dropdownConfig"},outputs:{confirm:"confirm"},features:[Ee],decls:2,vars:4,consts:[[3,"click","icon","label","active"],[1,"dropdown"],["itemClass","dropdown-item",3,"options","dropdownConfig"],[1,"dropdown-buttons","font-button"],[3,"click","label"],[3,"click","label","active"]],template:function(n,r){n&1&&(m(0,"app-text-button",0),A("click",function(){return r.showOptions()}),g(),E(1,PW,5,5,"div",1)),n&2&&(S("icon",r.showDropdown()?r.icon:void 0)("label",r.label)("active",r.showDropdown()),u(),I(r.options&&r.showDropdown()?1:-1))},dependencies:[Ke,x_],styles:[".dropdown[_ngcontent-%COMP%]{width:21rem;overflow:visible}"]})}}return t})();
15function OW(t,i){if(t&1&&(te(0,"span",1),N(1),J()),t&2){let e=_();u(),ce(" ",e.getPriceText(e.originalPrice)," ")}}function NW(t,i){if(t&1&&(te(0,"span",2),N(1),J(),te(2,"span",1),N(3),J()),t&2){let e=_();u(),ce("",e.getPriceText(e.originalPrice)," "),u(2),Q(e.getPriceText(e.customerPrice))}}function kW(t,i){t&1&&(te(0,"span",1),N(1,"/"),J())}function LW(t,i){if(t&1&&(te(0,"span",1),N(1),J()),t&2){let e=_();u(),Q(e.getValidityText())}}var $1=(()=>{class t{constructor(e){this.config=e}getResolutionText(){return this.resolution===In.UHD_4K?"4K":this.resolution}getPriceText(e){let n=this.config.getSettingNumber(x.decimalCount,2),r=this.config.getSettingNumber(x.decimalDivider,100);return e===0?this.config.getTranslation(pe.detail_gratis):this.config.getTranslation(pe.detail_price).replace("$1",(e/r).toFixed(n).toLocaleString())}getValidityText(){return this.config.getTranslation(Fe.time_duration_hours).replace("$1",(this.validity/3600).toString())}static{this.\u0275fac=function(n){return new(n||t)(f(O))}}static{this.\u0275cmp=D({type:t,selectors:[["app-price-label"]],inputs:{resolution:"resolution",originalPrice:"originalPrice",customerPrice:"customerPrice",validity:"validity"},decls:7,vars:4,consts:[[1,"price-label"],[1,"price-part"],[1,"price-part","strikethrough"]],template:function(n,r){n&1&&(te(0,"span",0)(1,"span",1),N(2),J(),E(3,OW,2,1,"span",1)(4,NW,4,2),E(5,kW,2,0,"span",1),E(6,LW,2,1,"span",1),J()),n&2&&(u(2),Q(r.getResolutionText()),u(),I(r.originalPrice&&r.customerPrice&&r.originalPrice===r.customerPrice?3:4),u(2),I(r.validity?5:-1),u(),I(r.validity?6:-1))},styles:[".price-label[_ngcontent-%COMP%]{white-space:nowrap}.price-part[_ngcontent-%COMP%]:not(:first-of-type){margin-left:.34rem}.strikethrough[_ngcontent-%COMP%]{text-decoration:line-through}"]})}}return t})();var FW=["discountInput"],VW=["pinInput"];function UW(t,i){if(t&1){let e=B();m(0,"div",5),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.selectPrice(r))}),M(1,"app-price-label",6),g()}if(t&2){let e=i.$implicit;u(),S("resolution",e.resolution)("originalPrice",e.originalPrice)("customerPrice",e.customerPrice)("validity",e.validity)}}function BW(t,i){if(t&1){let e=B();m(0,"div",8)(1,"input",9,0),A("ngModelChange",function(r){k(e);let o=_(3);return L(o.discountCode=r.toUpperCase())})("keydown.enter",function(){k(e);let r=_(3);return L(r.enterDiscountCode())}),g(),m(3,"app-text-button",10),A("click",function(){k(e);let r=_(3);return L(r.enterDiscountCode())}),g()()}if(t&2){let e=_(3);u(),S("placeholder",wa(e.discountPlaceholder))("ngModel",e.discountCode),u(2),S("label",e.confirmLabel)("active",!0)}}function jW(t,i){if(t&1){let e=B();m(0,"div",4)(1,"div",7),A("click",function(){k(e);let r=_(2);return L(r.openDiscountInput())}),N(2),g(),E(3,BW,4,5,"div",8),g()}if(t&2){let e=_(2);u(2),ce(" ",e.discountLabel," "),u(),I(e.showDiscountInput?3:-1)}}function HW(t,i){if(t&1&&(m(0,"div"),X(1,UW,2,4,"div",3,se),E(3,jW,4,2,"div",4),g()),t&2){let e=_();u(),K(e.options),u(2),I(e.allowDiscount()?3:-1)}}function $W(t,i){if(t&1){let e=B();m(0,"div")(1,"div",11),A("click",function(){k(e);let r=_();return L(r.deselectPrice())}),M(2,"img",12)(3,"app-price-label",13),g(),m(4,"div",14),N(5),m(6,"div",8)(7,"input",15,1),xt("ngModelChange",function(r){k(e);let o=_();return Pt(o.pinCode,r)||(o.pinCode=r),L(r)}),A("keydown.enter",function(){k(e);let r=_();return L(r.enterPinCode())}),g(),m(9,"app-text-button",10),A("click",function(){k(e);let r=_();return L(r.enterPinCode())}),g()()()()}if(t&2){let e=_();u(3),S("resolution",e.selectedPrice.resolution)("originalPrice",e.selectedPrice.originalPrice)("customerPrice",e.selectedPrice.customerPrice)("validity",e.selectedPrice.validity),u(2),ce(" ",e.pinLabel," "),u(2),Rt("ngModel",e.pinCode),u(2),S("label",e.confirmLabel)("active",!0)}}var G1=(()=>{class t{constructor(e,n){this.cdr=n,this.submitDiscount=new Y,this.deselectOption=new Y,this.commit=new Y,this.confirmLabel="",this.showDiscountInput=!1,this.discountLabel="",this.discountPlaceholder="",this.discountCode="",this.pinLabel="",this.pinCode="",this.confirmLabel=e.getTranslation(ni.popup_btn_ok),this.discountLabel=e.getTranslation(pe.detail_vouchercoupon),this.discountPlaceholder=e.getTranslation(pe.detail_claimvoucher_title),this.pinLabel=e.getTranslation(pe.detail_enter_pincode)}allowDiscount(){return this.options.some(e=>e.allowDiscount)}openDiscountInput(){this.showDiscountInput=!this.showDiscountInput,this.showDiscountInput&&setTimeout(()=>
15this.discountInput?.nativeElement.focus(),0)}enterDiscountCode(){this.submitDiscount.emit(this.discountCode),this.showDiscountInput=!1,this.discountCode=""}selectPrice(e){this.selectOption(e).subscribe(n=>{n&&(this.selectedPrice=e,setTimeout(()=>this.pinInput?.nativeElement.focus(),0),this.cdr.detectChanges())})}deselectPrice(){this.selectedPrice=void 0,this.deselectOption.emit()}enterPinCode(){this.selectedPrice&&(this.commit.emit({itemId:this.selectedPrice.itemId,pinCode:this.pinCode}),this.selectedPrice=void 0,this.pinCode="")}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-rent-options"]],viewQuery:function(n,r){if(n&1&&Ve(FW,5)(VW,5),n&2){let o;be(o=Ce())&&(r.discountInput=o.first),be(o=Ce())&&(r.pinInput=o.first)}},inputs:{options:"options",selectOption:"selectOption"},outputs:{submitDiscount:"submitDiscount",deselectOption:"deselectOption",commit:"commit"},decls:3,vars:2,consts:[["discountInput",""],["pinInput",""],[1,"dropdown"],[1,"dropdown-item","selectable","font-highlighted-label"],[1,"dropdown-item","selectable","discount-container"],[1,"dropdown-item","selectable","font-highlighted-label",3,"click"],[1,"rent-option-info",3,"resolution","originalPrice","customerPrice","validity"],[3,"click"],[1,"code-input"],["type","text",3,"ngModelChange","keydown.enter","placeholder","ngModel"],[3,"click","label","active"],[1,"dropdown-item","selectable","rent-option-back","font-highlighted-label",3,"click"],["src","./assets/theme/svg/chevron_left.svg"],[3,"resolution","originalPrice","customerPrice","validity"],[1,"dropdown-item","discount-container","font-label"],["type","password",3,"ngModelChange","keydown.enter","ngModel"]],template:function(n,r){n&1&&(m(0,"div",2),E(1,HW,4,1,"div"),E(2,$W,10,8,"div"),g()),n&2&&(u(),I(r.selectedPrice?-1:1),u(),I(r.selectedPrice?2:-1))},dependencies:[$1,os,rs,Qa,Qs,Ke],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.rent-option-back[_ngcontent-%COMP%]{justify-content:left}.rent-option-resolution[_ngcontent-%COMP%]{margin-right:.875rem}.discount-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.code-input[_ngcontent-%COMP%]{display:flex;margin-top:.875rem;column-gap:.4375rem}.code-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{cursor:text;border-bottom:1px solid #ca7ef1}"]})}}return t})();var Jf=(function(t){return t.TVOD="TVOD",t.BUNDLE="BUNDLE",t.CHANNEL_PPV="CHANNEL_PPV",t.VOD_PPV="VOD_PPV",t})(Jf||{});function W1(t){switch(t){case as.BUNDLE:return Jf.BUNDLE;case as.TVOD:return Jf.TVOD;case as.VOD_PPV:return Jf.VOD_PPV;case as.CHANNEL_PPV:return Jf.CHANNEL_PPV}}var as=(function(t){return t.TVOD="TVOD",t.BUNDLE="BUNDLE",t.CHANNEL_PPV="CHANNEL_PPV",t.VOD_PPV="VOD_PPV",t})(as||{});function z1(t){let i=[];return t.forEach(e=>{i.push({quoteId:e.purchaseId,quoteType:W1(e.purchaseType),resourceId:e.resourceId,validFrom:parseInt(e.validFrom),validUntil:parseInt(e.validUntil),itemIds:e.items?.map(n=>n.itemId)})}),i}var ls=class{constructor(i,e){this._isAdult=i,this._startPosition=e}get quoteId(){}get startPosition(){return this._startPosition}set startPosition(i){this._startPosition=i}get isLive(){return!1}get resumeFromLive(){return!1}get isTrailer(){return!1}get isReserved(){return!1}get isAdult(){return this._isAdult}get scheduleId(){}get channelId(){}get channelName(){}get startTime(){}get endTime(){}updateIsAdult(i){this._isAdult=i}};function el(t,i,e){let n=[];if(i){let r=$.dateToDateTime(i.start),o=$.dateToDateTime(i.end);n.push(r.toFormat("HH:mm")+o.toFormat(" - HH:mm"))}else if(e){let r=$.timeStringToDateTime(e.start),o=$.timeStringToDateTime(e.end);n.push(r.toFormat("HH:mm")+o.toFormat(" - HH:mm"))}return t&&n.push(t.name),n}function cs(t){return t===q.SVOD||t===q.TVOD||t===q.FVOD}var gc=class extends ls{constructor(i,e,n){super(i.adult||e.program?.adult||!1),this._channel=i,this._epgInfo=e,this._streamType=n}get channel(){return this._channel}get assetId(){return this._channel.id}get episode(){return this._epgInfo.program?.episodeNumber||void 0}get programId(){return this._epgInfo.program?.programId}
15get resourceId(){return this._channel.id}get season(){return this._epgInfo.season?.seasonNumber||void 0}get seriesId(){return this._epgInfo.series?.seriesId}get streamType(){return this._streamType}get isLive(){return!0}get subTitleParts(){return el(this._channel,this._epgInfo.schedule?.published)}get title(){return this._epgInfo.program?.text.title??""}get image(){return this._channel.squareLogo}get channelId(){return this._channel.id}get channelName(){return this._channel.name}get scheduleId(){return this._epgInfo.schedule?.scheduleId}get startTime(){return this._epgInfo.schedule?this._epgInfo.schedule?.published.start.getTime():void 0}get endTime(){return this._epgInfo.schedule?this._epgInfo.schedule?.published.end.getTime():void 0}updateForNewSchedule(i){this._epgInfo=i,this.updateIsAdult(i.program?.adult??!1)}get epgInfo(){return this._epgInfo}};function WW(t,i){if(t&1&&(te(0,"span",1),N(1),te(2,"span",2),N(3,"\xB7"),J()()),t&2){let e=i.$implicit;u(),ce(" ",e," ")}}function zW(t,i){if(t&1&&(te(0,"div",0),X(1,WW,4,1,"span",1,se),J()),t&2){let e=_();u(),K(e.tags.tags)}}var En=class{constructor(...i){this.tags=[],this.tags.push(...i)}add(i){this.tags.push(i)}addScheduleInfo(i,e,n){if(e){let r=$.dateToDateTime(e),o=n?$.dateToDateTime(n):void 0,s=$.getDayInfo(r.toMillis(),!1,i);this.tags.push(`${s}, `+r.toFormat("HH:mm")+(o?.toFormat(" - HH:mm")??""))}}addShortScheduleInfo(i,e){if(e){let n=$.dateToDateTime(e.start),r=$.getDayInfo(n.toMillis(),!0,i);this.tags.push(`${r} ${n.toFormat("HH:mm")}`)}}addChannelInfo(i,e){let n=e?.getChannelNumberForCatalog(i.catalogId);n&&this.tags.push(n.toString()),e?.name&&this.tags.push(e.name)}addShortEpisodeInfo(i,e){let n="";i&&i>0&&(n+="S"+i,e&&(n+=" ")),e&&(n+=" E"+e),n&&this.tags.push(n)}addLongEpisodeInfo(i,e,n){if(e){let r=i.getTranslation(pe.detail_season);this.tags.push(`${r} ${e}`)}if(n){let r=i.getTranslation(pe.detail_episode);this.tags.push(`${r} ${n}`)}}addProductionYear(i){i&&this.tags.push(i?.toString())}addDuration(i,e){e&&this.tags.push(`${Math.trunc(e/60)} ${i.getTranslation(pe.detail_duration_min)}`)}addGenres(i,e){this.tags.push(...e.map(n=>i.getGenre(n)).filter(n=>!!n))}},mu=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-tag-list"]],inputs:{tags:"tags"},decls:1,vars:1,consts:[[1,"tag-list"],[1,"tag-list-item"],[1,"dot-gray"]],template:function(n,r){n&1&&E(0,zW,3,0,"div",0),n&2&&I(r.tags?0:-1)},styles:[".tag-list[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.tag-list-item[_ngcontent-%COMP%]:last-of-type   .dot-gray[_ngcontent-%COMP%]{display:none}.dot-gray[_ngcontent-%COMP%]{color:#fff;opacity:40%}"]})}}return t})();var Lr=(()=>{class t{constructor(e,n,r){this.business=e,this.environment=n,this.apiClient=r,this.location=this.business.client.bootstrap.discovery.location,this.ssApi=new mh(this.apiClient)}sendTerminateBeacon(e,n){navigator.sendBeacon(`${this.location}/stream/v2/stream/${encodeURIComponent(e)}/terminate`,JSON.stringify(n))}startStream(e){return e.asset&&(e.asset.actionFilter=parseInt(this.environment.actionFilter),e.asset.tzOffset=t.getTzOffset()),re(this.ssApi.startStream(e))}commitReservedStream(e,n,r){return re(this.ssApi.startReserved(e,n,{quoteId:r}))}updateStream(e,n,r){return re(this.ssApi.updateStreamOptions(e,n,r))}deleteStream(e){return re(this.ssApi.stopStream(e))}getAsset(e,n){return n.actionFilter=parseInt(this.environment.actionFilter),n.tzOffset=t.getTzOffset(),re(this.ssApi.updateStreamAsset(e,n))}getManifest(e,n){return re(this.ssApi.getManifest(e,n))}keepAlive(e,n){return re(this.ssApi.keepAliveStream(e,n))}getBreakvertising(e,n){return re(this.ssApi.getBreakvertisement(e,n,Number(this.environment.actionFilter),t.getTzOffset()))}addToWatchList(e,n){return re(this.ssApi.addWatchListStream(e,n))}getNextAsset(e,n){return re(this.ssApi.getStreamNextAsset(e,n))}static getTzOffset(){let e=ie.now();return e.zone.formatOffset(e.toMillis(),"short")}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(ae),h(Ni))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ey=(()=>{class t{constructor(e,n,r){this.session=e,this.environment=n,this.config=r,this.settingMaxResolution=this.config.getSettingString(x.maxResolutionV2,PS.HD),Object.values(In).includes(this.settingMaxResolution)||(this.settingMaxResolution=In.HD)}
15newStreamRequest(e,n,r,o,s){return{profileId:this.session.profileId,group:Qy.MAIN,packageType:n.packaging,deviceId:o,deviceType:r,drmType:n.encryption,asset:this.createAsset(e,s),catalogId:this.session.catalogId}}createAsset(e,n){return{streamType:e.streamType,reserve:e.isReserved,resourceId:e.resourceId,quoteId:e.quoteId,maxResolutionType:this.getMaxResolution(),options:this.getOptions(e,n),tzOffset:Lr.getTzOffset(),actionFilter:parseInt(this.environment.actionFilter)}}getMaxResolution(){let e=screen.width>1920&&screen.height>1080?In.UHD_4K:In.HD;return this.settingMaxResolution!==In.UHD_4K&&(e=this.settingMaxResolution),e}getOptions(e,n=!1){let r=[];return e.resumeFromLive&&r.push(ch.RESUME_FROM_LIVE),n&&r.push(ch.AIRPLAY_ACTIVE),r.length>0?r:void 0}static{this.\u0275fac=function(n){return new(n||t)(h(ne),h(ae),h(O))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ty=class extends ls{constructor(i,e,n,r){super(n?.adult||e.program?.adult||i.adult||!1,r),this.recording=i,this.epgInfo=e,this.channel=n}get assetId(){return this.recording.identifier}get episode(){return this.epgInfo.program?.episodeNumber||this.recording.programOrdinal||void 0}get programId(){return this.epgInfo.program?.programId??this.recording.program}get resourceId(){return this.recording.identifier}get season(){return this.epgInfo.season?.seasonNumber||this.recording.seasonOrdinal||void 0}get seriesId(){return this.epgInfo.series?.seriesId??this.recording.series}get streamType(){return q.NPVR}get subTitleParts(){return el(this.channel,this.epgInfo.schedule?.published,this.recording)}get title(){return this.epgInfo.program?.text.title??""}get image(){return this.epgInfo.program?.image.poster}get channelId(){return this.channel?.id??this.recording.channel}get channelName(){return this.channel?.name}get scheduleId(){return this.epgInfo.schedule?.scheduleId??this.recording.schedule}get startTime(){return this.epgInfo.schedule?this.epgInfo.schedule?.published.start.getTime():this.recording.start?$.timeStringToMs(this.recording.start):void 0}get endTime(){return this.epgInfo.schedule?this.epgInfo.schedule?.published.end.getTime():this.recording.end?$.timeStr
15ingToMs(this.recording.end):void 0}};var tn=(()=>{class t{constructor(e,n,r){this.config=e,this.sessionService=n,this.environment=r}findClosestScheduleV5(e,n=!1,r){n?this.sortSchedulesDetailAssetByStartDateDESC(e):this.sortSchedulesDetailAssetByStartDateASC(e);let o=this.findFirstScheduledItemV5(e,n,r);return n?this.sortSchedulesDetailAssetByStartDateDESC(e):this.sortSchedulesDetailAssetByStartDateASC(e),o||(o=this.findFirstScheduledItemV5(e,n,r,!1)),o||(o=this.findLastAvailableScheduleItemsV5(e)),o}static findCurrentScheduleV5(e){if(!e||e.length===0)return;let n=new Date().getTime();return e.find(r=>{let o=r.published.start.getTime(),s=r.published.end.getTime();return n>=o&&n<=s})}sortSchedulesDetailAssetByStartDateDESC(e){this.sortSchedulesByStartDateDESC(e)}sortSchedulesDetailAssetByStartDateASC(e){this.sortSchedulesByStartDateASC(e)}calculateProgressPercentage(e){if(!e)return 0;let n=new Date().getTime(),r=e.start.getTime();if(n<r)return 0;let o=e.end.getTime();if(n>o)return 0;let s=o-r,a=n-r;return Math.round(a/s*100)}static scheduleHasBlackout(e,n){return e?.some(r=>r.toUpperCase()===n.toUpperCase())??!1}static scheduleIsLive(e){if(!e)return!1;let n=new Date;return e.published.start<=n&&n<=e.published.end}scheduleIsReplay(e){if(!e?.published)return!1;let n=new Date;return e.published.start<=n}getEpgDaysFromUntil(){let e=new Date;e.setDate(e.getDate()-this.config.getSettingNumber(x.epgPastDays,7)),e.setMinutes(0,0,0);let n=new Date;return n.setDate(n.getDate()+this.config.getSettingNumber(x.epgPastDays,7)),n.setMinutes(0,0,0),{from:e,until:n}}getTodayFromUntil(){let e=ie.now().startOf("day"),n=e.toJSDate(),r=e.plus({days:1}).toJSDate();return{from:n,until:r}}getFromUntilFromTimeForDay(e,n){let r=new Date,o=ie.fromJSDate(e).startOf("day");if(e.toDateString()===r.toDateString())if(n){let s=new Date(r);return s.setHours(r.getHours()+1,0,0,0),{from:o.toJSDate(),until:s}}else{let s=new Date(r);return s.setMinutes(0,0,0),{from:s,until:o.plus({days:1}).toJSDate()}}return{from:o.toJSDate(),until:o.plus({days:1}).toJSDate()}}getFromUntilFromTime(e,n){let r,o;return n?(r=ie.fromJSDate(e).plus({hours:-23}).startOf("hour").toJSDate(),o=ie.fromJSDate(e).plus({hours:1}).startOf("hour").toJSDate()):(r=ie.fromJSDate(e).startOf("hour").toJSDate(),o=ie.fromJSDate(e).plus({days:1}).startOf("hour").toJSDate()),{from:r,until:o}}canPlayRecording(e,n,r){if(this.environment.atvFeatureList.includes(ln.RECORDING)&&e){let o=this.sessionService.stbList.getNpvrStb();if(e.device===o?.id&&(e.isRecorded()||e.isInProgress())){if(n&&this.scheduleHasRight(n,q.NPVR))return!0;if(r?.hasOttRight(q.NPVR))return!0}}return!1}getDurationSeconds(e){if(!e)return;let n=$.dateToDateTime(e.start);return $.dateToDateTime(e.end).diff(n,"seconds").seconds}isInRecordingWindow(e){return e?new Date<e.published.end:!1}sortPrograms(e,n){let r=[];return n.sort((o,s)=>o.seasonNumber-s.seasonNumber),n.forEach(o=>{let s=e.filter(a=>a.seasonId===o.seasonId);s.sort((a,l)=>{let c=a.episodeNumber,d=l.episodeNumber;return c!==void 0&&d!==void 0?c-d:c!==void 0&&d===void 0?-1:c===void 0&&d!==void 0?1:0}),r.push(...s)}),r}findFirstScheduledItemV5(e,n,r,o=!0,s=!1){if(e===void 0||e.length===0)return;let a=e.find(l=>{let c=l.published.start.getTime(),d=l.published.end.getTime(),p=new Date().getTime();if(n){if(d<p){if(o&&this.scheduleHasRight(l,q.REPLAY))return!0;if(!o)return!0}}else if(p>=c&&p<=d||p<=c){if(o&&this.scheduleHasRight(l,q.LINEAR))return!0;if(!o)return!0}return!1});return!a&&!s&&(n?this.sortSchedulesDetailAssetByStartDateASC(e):this.sortSchedulesDetailAssetByStartDateDESC(e),a=this.findFirstScheduledItemV5(e,!n,r,o,!0)),a}findLastAvailableScheduleItemsV5(e){if(e!==void 0)return e[e.length-1]}sortSchedulesByStartDateDESC(e){e&&e.sort((n,r)=>{let o=n.published.start.getTime(),s=r.published.start.getTime();return o<s?1:o>s?-1:0})}sortSchedulesByStartDateASC(e){e&&e.sort((n,r)=>{let o=n.published.start.getTime(),s=r.published.start.getTime();return o<s?-1:o>s?1:0})}fillScheduleGaps(e,n,r){let o=ie.fromJSDate(n),s=o.startOf("day"),a=o.endOf("day");if(!e.length)return[this.createEmptySchedule(s.toJSDate(),a.toJSDate(),r)];let l=[],c=s,d=e.sort((p,y)=>{let b=ie.fromJSDate(p.published.start),T=ie.fromJSDate(y.published.start);return b.diff(T).milliseconds});for(let p of d)c<ie.fromJSDate(p.published.start)&&l.push(this.createEmptySchedule(c.toJSDate(),p.published.start,r)),l.push(p),c=ie.fromJSDate(p.published.end);return c<a&&l.push(this.createEmptySchedule(c.toJSDate(),a.toJSDate(),r)),l}createEmptySchedule(e,n,r){return{scheduleId:"",channelId:r,programId:"",published:{start:e,end:n}}}watchableStreamTypes(e,n,r){let o=[];if(e){let s=this.scheduleHasRight(e,q.LINEAR);if(t.scheduleIsLive(e)){let l;this.sessionService.isAnonymous?l=n?.hasAnonymousRight(q.LINEAR)??!1:l=s,l&&o.push(q.LINEAR)}let a=this.scheduleHasRight(e,q.REPLAY);if(this.scheduleIsReplay(e)&&n){let l;if(this.sessionService.isAnonymous){let c=new Date;c.setHours(c.getHours()-n.maxReplayHours),l=(n?.hasAnonymousRight(q.REPLAY)??!1)&&e.published.start>c}else l=a;l&&o.push(q.REPLAY)}}return r&&this.canPlayRecording(r,e,n)&&o.push(q.NPVR),o}getPlayIcon(e,n,r,o=!1){let s=this.watchableStreamTypes(e,n,r);if(!o){if(s.includes(q.REPLAY))return"./assets/theme/svg/flashback.svg";if(s.includes(q.LINEAR))return"./assets/theme/svg/playable.svg"}return r&&this.canPlayRecording(r,e,n)?"./assets/theme/svg/playable.svg":""}scheduleHasRight(e,n){let r=e.rights?.find(s=>
15s.type===n),o=new Date;return!!r&&(!r.from||r.from<=o)&&(!r.until||o<r.until)}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(ne),h(ae))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var gu=class t extends ls{constructor(i,e,n,r,o=!1){super(i.adult||n.program?.adult||!1,r),this.channel=i,this.schedule=e,this.epgInfo=n,this._resumeFromLive=o}static fromLinear(i,e,n){return new t(i.channel,e,i.epgInfo,n,!0)}get assetId(){return this.schedule.scheduleId}get episode(){return this.epgInfo.program?.episodeNumber||void 0}get programId(){return this.epgInfo.program?.programId}get resourceId(){return this.schedule.scheduleId}get season(){return this.epgInfo.season?.seasonNumber||void 0}get seriesId(){return this.epgInfo.series?.seriesId}get streamType(){return q.REPLAY}get isLive(){return tn.scheduleIsLive(this.schedule)}get subTitleParts(){return el(this.channel,this.schedule.published)}get title(){return this.epgInfo.program?.text.title??""}get image(){return this.epgInfo.program?.image.poster}get channelId(){return this.channel.id}get channelName(){return this.channel.name}get scheduleId(){return this.schedule.scheduleId}get startTime(){return this.epgInfo.schedule?this.epgInfo.schedule?.published.start.getTime():void 0}get endTime(){return this.epgInfo.schedule?this.epgInfo.schedule?.published.end.getTime():void 0}get resumeFromLive(){return this._resumeFromLive}};var ny=class extends ls{constructor(i,e,n){super(i.adult,n),this.vod=i,this.stream=e}get assetId(){return this.vod.assetId}get episode(){return this.vod.episodeNumber||void 0}get programId(){return this.vod.assetId}get resourceId(){return this.stream.streamId}get season(){return this.vod.seasonNumber||void 0}get seriesId(){return this.vod.seriesId}get streamType(){return this.stream.streamType}get isTrailer(){return this.stream.isTrailer}get subTitleParts(){return[]}get title(){return this.vod.text.title}get image(){return this.vod.image.poster}get quoteId(){return this.stream.quoteId}get isReserved(){return this.stream.isReserved}};function qW(t,i){if(t&1&&M(0,"img",1),t&2){let e=i.$implicit;S("src",e,Je)}}function YW(t,i){if(t&1&&(m(0,"div",0),X(1,qW,1,1,"img",1,se),g()),t&2){let e=_();S("ngClass",e.size),u(),K(e.icons.icons)}}var Y1=(function(t){return t.SMALL="small",t.NORMAL="normal",t.LARGE="large",t})(Y1||{}),_c=class{constructor(){this.icons=[]}add(i){this.icons.push(i)}addMinimumAge(i,e="normal"){i&&this.icons.push($.getMinimumAgeImage(i,e))}addResolution(i){let e=$.getResolutionImage(i);e&&this.icons.push(e)}addParentalRatings(i){this.icons.push(...$.getParentalIcons(i))}addAccessibilityOptions(i){this.icons.push(...$.getAccessibilityIcons(i))}addRecording(i){this.icons.push(i.getIcon()),i?.deleteProtected&&this.icons.push("./assets/theme/svg/recording_locked.svg")}},Q1=(()=>{class t{constructor(){this.size=Y1.LARGE}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-icon-list"]],inputs:{icons:"icons",size:"size"},decls:1,vars:1,consts:[[1,"detail-icons",3,"ngClass"],[3,"src"]],template:function(n,r){n&1&&E(0,YW,3,1,"div",0),n&2&&I((r.icons.icons==null?null:r.icons.icons.length)>0?0:-1)},dependencies:[Bs,ec],styles:[".detail-icons[_ngcontent-%COMP%]{display:flex;column-gap:.675rem}.detail-icons.large[_ngcontent-%COMP%]{column-gap:.675rem}.detail-icons.normal[_ngcontent-%COMP%], .detail-icons.small[_ngcontent-%COMP%]{column-gap:.39rem}.detail-icons.large[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:2rem;height:2rem}.detail-icons.normal[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.detail-icons.small[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:1.125rem;height:1.125rem}"]})}}return t})();var Vi=(function(t){return t.Opera="Opera",t.Safari="Safari",t.Chrome="Chrome",t.Firefox="Firefox",t.Edge="Edg",t})(Vi||{}),Z1=(function(t){return t.Windows="Windows",t})(Z1||{}),iy=(()=>{class t{static{this.details={browser:"",mobile:!1}}static isWindowsOs(){return navigator.userAgent.includes(Z1.Windows)}static getDetails(){return this.details.browser!==""?this.details:(this.retrieveDetails(),this.details)}static retrieveDetails(){let n=navigator.userAgent,r,o="-",s;n.indexOf(Vi.Opera)!==-1||n.indexOf("OPR")!==-1?o=Vi.Opera:n.indexOf(Vi.Edge)!==-1?o=Vi.Edge:n.indexOf(Vi.Chrome)!==-1?o=Vi.Chrome:n.indexOf(Vi.Safari)!==-1?o=Vi.Safari:n.indexOf(Vi.Firefox)!==-1?o=Vi.Firefox:(s=n.lastIndexOf(" ")+1)<(r=n.lastIndexOf("/"))&&(o=n.substring(s,r));let a;if("maxTouchPoints"in navigator)a=navigator.maxTouchPoints>0;else{let l=matchMedia?.("(pointer:coarse)");l?.media==="(pointer:coarse)"?a=!!l.matches:"orientation"in window?a=!0:a=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(n)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(n)}this.details.browser=o,this.details.mobile=a}}return t})();var ry=class{constructor(i){this.id=i.assetId,this.type=i.streamType,this.name=i.title,this.episode=i.episode,this.season=i.season,this.scheduleId=i.scheduleId,this.programId=cs(i.streamType)?void 0:i.programId,this.streamId=cs(i.streamType)?i.resourceId:void 0,this.channelId=i.channelId,this.channelName=i.channelName,this.referenceId=Uf(),this.ssId="",this.manifest=""}updateStreamInfo(i,e){this.ssId=i,this.manifest=e}};var oy=class{constructor(){this.url="",this.drm=!1}reset(){this.url="",this.drm=!1,this.assetId=void 0,this.drmSessionId=void 0,this.drmAuthToken=void 0,this.drmUserId=void 0,this.playerPolicy=void 0}newManifest(i){this.reset(),this.url=i.url,this.drm=i.drm,this.assetId=i.assetId,this.drmSessionId=i.drmSessionId,this.drmAuthToken=i.drmAuthToken,this.drmUserId=i.drmUserId,this.playerPolicy=i.playerPolicy}};var sy=class{constructor(){this.sid="",this.keepalive=-1,this.lifetime=-1,this.mid="",this.bookmarkOffset=0,this.keepAliveStatus=Ec.IDLE}reset(){this.sid="",this.keepalive=-1,this.lifetime=-1,this.mid="",this.bookmarkOffset=0,this.event=void 0,this.streamEndTime=void 0,this.sessionLifetime=void 0,this.vastUrl=void 0,this.keepAliveStatus=Ec.IDLE}newStream(i){if(this.reset(),this.sid=i.sid,this.keepalive=i.keepalive,this.lifetime=i.lifetime,!i.asset)throw new vt("No stream asset",ht.START_STREAM,!0);this.mid=i.asset.mid,this.bookmarkOffset=i.asset.bookmarkOffset??0,this.event=i.asset.event,this.streamEndTime=i.asset.streamEndTime,this.sessionLifetime=i.asset.sessionLifetime,this.vastUrl=i.asset.vastUrl}newAsset(i){this.mid=i.mid,this.bookmarkOffset=i.bookmarkOffset??0,this.event=i.event,this.streamEndTime=i.streamEndTime,this.sessionLifetime=i.sessionLifetime,this.vastUrl=i.vastUrl}setPlayingStatus(){this.keepAliveStatus=Ec.PLAYING}setPausedStatus(){this.keepAliveStatus=Ec.PAUSED}};var nn=(()=>{class t{constructor(){this.streamInfo=new sy,this.manifestInfo=new oy,this.mobile=iy.getDetails().mobile,this._contentStarted=!1}reset(){this.streamInfo.reset(),this.manifestInfo.reset(),this._playInfo=void 0,this._logInfo=void 0,this._contentStarted=!1}get absStartSec(){return((this._playInfo?.startTime??0)-this.streamInfo.bookmarkOffset)/1e3}set playInfo(e){this._playInfo=e,this._logInfo=new ry(e)}get playInfo(){return this._playInfo}get logInfo(){return this._logInfo}get contentStarted(){return this._contentStarted}set contentStarted(e){this._contentStarted=e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ay=(()=>
15{class t{constructor(){this.error=new wn(1,0),this.continueWatching=new wn(1,0)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ei=(function(t){return t[t.PLAYING=0]="PLAYING",t[t.PAUSED=1]="PAUSED",t[t.IDLE=2]="IDLE",t})(Ei||{}),Be=(()=>{class t{constructor(){this.visible=V(!1),this.pipMode=V(!1),this.fullscreen=V(!1),this.showContentControls=V(!1),this.showAdControls=V(!1),this.zapbarOpen=V(!1),this.autoplayDetail=V(void 0),this.adBreak=V(!1),this.adPlaying=V(!1),this.canAirplay=V(!1),this.isAirplaying=V(!1),this.playback=V(Ei.IDLE),this.canSeek=V(!1),this.canJump=V(!1),this.canPause=V(!1),this.buffering=V(!1),this.isLive=V(!1),this.assetTitle=V(""),this.assetSubtitleParts=V([]),this.currentChannel=V(void 0),this.channels=V([]),this.hasPrevSchedule=V(!1),this.hasNextSchedule=V(!1),this.relPosition=V(0),this.relDuration=V(0),this.positionPercentage=V(0),this.startOffset=V(0),this.absDuration=V(0),this.thumbnailUrl=V(""),this.volume=V(1),this.muted=V(!1),this.videoTrackOptions=V([]),this.audioTrackOptions=V([]),this.textTrackOptions=V([]),bn(()=>{this.visible()&&!this.pipMode()||this.autoplayDetail()?document.body.classList.add("player-overlay-is-open"):document.body.classList.remove("player-overlay-is-open"),(!this.visible()||this.pipMode())&&this.fullscreen.set(!1)})}timeFromPercentage(e,n=!0){return this.absDuration()*e/100-(n?this.startOffset():0)}reset(){this.pipMode.set(!1),this.playback.set(Ei.IDLE),this.canSeek.set(!1),this.canPause.set(!1),this.buffering.set(!1),this.isLive.set(!1),this.autoplayDetail.set(void 0),this.adBreak.set(!1),this.adPlaying.set(!1),this.assetTitle.set(""),this.assetSubtitleParts.set([]),this.currentChannel.set(void 0),this.channels.set([]),this.hasPrevSchedule.set(!1),this.hasNextSchedule.set(!1),this.relPosition.set(0),this.relDuration.set(0),this.positionPercentage.set(0),this.startOffset.set(0),this.absDuration.set(0),this.thumbnailUrl.set(""),this.videoTrackOptions.set([]),this.audioTrackOptions.set([]),this.textTrackOptions.set([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function HI(t){return{id:t.id,favorite:t.isFavorite(),image:t?.defaultLogo?ot.createImageUrl(t.defaultLogo,me.CHANNEL_1):"",data:t}}var ly=(()=>{class t{constructor(e,n,r,o){this.playerState=e,this.playerInfo=n,this.bookmarkCache=r,this.config=o,this.playerBookmarkTime=this.config.getSettingNumber(x.playerBookmarkTime,300*1e3)}generateBookmark(){if(!(!this.playerInfo.playInfo||this.playerInfo.playInfo.streamType===q.LINEAR||this.playerInfo.playInfo.isTrailer))return{position:Math.floor(this.playerState.relPosition()*1e3),duration:Math.floor(this.playerState.relDuration()*1e3)}}storeBookmark(){let e=this.generateBookmark(),n=this.playerInfo.playInfo;if(!e||!n)return;let r=this.createBookmark(n,e);r&&this.bookmarkCache.setBookmark(r)}createBookmark(e,n){let r=cs(e.streamType),o=r?e.assetId:e.programId;if(o)return{assetType:r?vo.VOD:vo.PROGRAM,assetId:o,seriesId:e.seriesId,position:n.position,size:n.duration,updatedAt:(new Date().getTime()/1e3).toString()}}startBookmarkInterval(){this.stopBookmarkInterval(),this.playerBookmarkInterval=setInterval(()=>this.storeBookmark(),this.playerBookmarkTime)}stopBookmarkInterval(){this.playerBookmarkInterval&&(clearInterval(this.playerBookmarkInterval),this.playerBookmarkInterval=void 0)}static{this.\u0275fac=function(n){return new(n||t)(h(Be),h(nn),h(eu),h(O))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Vr=(()=>{class t{constructor(e,n,r,o,s){this.log=e,this.config=n,this.playerInfo=r,this.playerState=o,this.playerEngine=s,this.pageContext=new Qt({pageURL:Zt.videoplayer,pageLocale:this.config.getLocale()}),this.playerStillPlayingTime=this.config.getSettingNumber(x.playerStillPlayingTime,300*1e3),this.autoplayPageContext=new Qt({pageURL:Zt.autoplay_detail,pageLocale:this.config.getLocale()})}get airplayUsed(){return this.playerState.canAirplay()?this.playerState.isAirplaying():void 0}logPageOpen(){this.log.pageView(this.pageContext)}logPlayStart(){this.streamStart=new Date;let e=this.playerInfo.logInfo;e?(this.log.playStart(e),this.startPlayerPlayingInterval()):this.streamStart=void 0}logPlayStop(e){if(!this.streamStart)return;let n=this.playerInfo.logInfo;if(this.stopPlayerPlayingInterval(),n){let r;this.playerEngine.isAttached&&(r=this.playerEngine.drmInfo),this.log.playStop(n,e,this.timeElapsed,this.airplayUsed,r)}this.streamStart=void 0}get timeElapsed(){let e=0,n=this.playerInfo.lastActiveTime??Date.now();return this.streamStart&&(e=n-this.streamStart.getTime()),e}logPlayState(e){let n=this.playerInfo.logInfo;e?this.startPlayerPlayingInterval():this.stopPlayerPlayingInterval(),n&&this.log.playState(n,e?Kg.playing:Kg.paused,Aa.player,this.airplayUsed)}logPlayError(e){let n=this.playerInfo.logInfo;if(this.stopPlayerPlayingInterval(),n&&e.origin!==ht.KEEPALIVE){let r=this.convertErrorOrigin(e.origin);this.log.playError(n,r,e,this.airplayUsed)}}convertErrorOrigin(e){switch(e){case ht.START_STREAM:return Aa.startStream;case ht.STOP_STREAM:return Aa.stopStream;case ht.MANIFEST:return Aa.manifest;case ht.START_ASSET_STREAM:return Aa.startAssetStream;default:return Aa.player}}logPlayWarning(e){let n=this.playerInfo.logInfo;n&&this.log.playWarning(n,e,this.airplayUsed)}logPlayPlaying(){let e=this.playerInfo.logInfo;e&&this.log.playPlaying(e,this.airplayUsed)}logKeepAliveError(e){let n=this.playerInfo.logInfo;n&&this.log.playerKeepAliveError(n,e,this.airplayUsed,this.timeElapsed)}startPlayerPlayingInterval(){this.stopPlayerPlayingInterval(),this.playerPlayingInterval=setInterval(()=>this.logPlayPlaying(),this.playerStillPlayingTime)}stopPlayerPlayingInterval(){this.playerPlayingInterval&&(clearInterval(this.playerPlayingInterval),this.playerPlayingInterval=void 0)}logAutoplayView(e){this.log.autoplayPageView(e,this.autoplayPageContext)}logAutoplayAction(e,n){this.log.autoplayAction(e,n,this.autoplayPageContext)}logAdEnd(e){this.log.advertisementEnd(e,this.pageContext)}static{this.\u0275fac=function(n){return new(n||t)(h(ct),h(O),h(nn),h(Be),h(Dn))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var yu=(()=>{class t{constructor(e,n){this.playerInfo=e,this.environment=n}startSuspendCheckInterval(){this.stopSuspendCheckInterval(),this.playerInfo.lastActiveTime=void 0,this.lastActiveTime=Date.now(),this.suspendInterval=setInterval(()=>{let e=Date.now();this.lastActiveTime&&(e-this.lastActiveTime>6e4?(this.playerInfo.lastActiveTime=this.lastActiveTime,this.stopSuspendCheckInterval()):this.lastActiveTime=e)},3e4)}stopSuspendCheckInterval(){this.suspendInterval&&(clearInterval(this.suspendInterval),this.suspendInterval=void 0,this.lastActiveTime=void 0)}configureMetadata(e){if(vu())try{navigator.mediaSession.metadata=new Media
15Metadata({title:e,artist:this.environment.applicationName})}catch(n){console.warn("Failed to update browser metadata",n)}}reset(){if(vu())try{navigator.mediaSession.metadata=null,navigator.mediaSession.setPositionState(void 0),navigator.mediaSession.playbackState="none"}catch(e){console.warn("Failed to update browser position state",e)}}updatePlayerTime(e,n){if(vu())try{navigator.mediaSession.setPositionState({position:Math.max(e,0),duration:n})}catch(r){console.warn("Failed to update browser position state",r)}}updateState(e){if(vu())try{navigator.mediaSession.playbackState=e}catch(n){console.warn("Failed to update browser playback state",n)}}get browserConfig(){if(this.info!==void 0)return this.info;let e=iy.getDetails(),n={packaging:this.environment.defaultStreamPackageType,encryption:fi.WIDEVINE,isApple:!1};return e.browser===Vi.Safari&&(n.packaging=Nu.HLS,n.encryption=fi.FAIRPLAY,n.isApple=!0),this.info=n,n}static{this.\u0275fac=function(n){return new(n||t)(h(nn),h(ae))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function vu(){return"mediaSession"in navigator}var bu=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y){this.playerInfo=e,this.streamingApi=n,this.streamRequest=r,this.environment=o,this.config=s,this.playerEventManager=a,this.playerState=l,this.bookmarkManager=c,this.logManager=d,this.session=p,this.browserManager=y,this.keepAliveErrCount=0,this._reloadManifestRequired=!1,this.maxKeepAliveErrors=this.config.getSettingNumber(x.maxKeepAliveErrors,3),this.continueWatchingBeforeStreamEndTime=this.config.getSettingNumber(x.continueWatchingBeforeStreamEndTime,6e5),this.reloadManifestThreshold=this.config.getSettingNumber(x.playerPauseStopPlayerTime,2e4)}startStream(e,n){return(n?C(n):this.streamingApi.startStream(this.newStreamRequest(e))).pipe(P(r=>{this.playerInfo.streamInfo.newStream(r),this.startKeepAlive(),this.startContinueWatchingTimer()}),z(r=>{throw new vt(r.error?.message??"",ht.START_STREAM,!0,r.error?.code,r.error?.errorId)}))}newAsset(e){return this.streamingApi.getAsset(this.playerInfo.streamInfo.sid,this.streamRequest.createAsset(e,this.playerState.isAirplaying())).pipe(P(n=>{this.playerInfo.streamInfo.newAsset(n),this.startContinueWatchingTimer()}),z(n=>{throw new vt(n.error?.message??"",ht.START_ASSET_STREAM,!0,n.error?.code,n.error?.errorId)}))}updateStreamOptions(e){let n=this.playerInfo.streamInfo;return this.streamingApi.updateStream(n.sid,n.mid,{options:this.streamRequest.getOptions(e,this.playerState.isAirplaying())??[]})}getManifest(){return this.streamingApi.getManifest(this.playerInfo.streamInfo.sid,this.playerInfo.streamInfo.mid).pipe(P(e=>{this._reloadManifestRequired=!1,this.playerInfo.manifestInfo.newManifest(e)}),z(e=>{throw new vt(e.error?.message??"",ht.MANIFEST,!0,e.error?.code,e.error?.errorId)}))}deleteStream(){return this.stopKeepAlive(),this.stopContinueWatchingTimer(),this.playerInfo.streamInfo.sid?this.streamingApi.deleteStream(this.playerInfo.streamInfo.sid).pipe(z(e=>{throw new vt(e.error?.message??"",ht.STOP_STREAM,!0,e.error?.code,e.error?.errorId)})):C(void 0)}terminateStream(){let e=this.bookmarkManager.generateBookmark(),n={mid:this.playerInfo.streamInfo.mid,bookmark:e?{position:e.position,size:e.duration}:void 0,watchlist:this.playerInfo.playInfo?.streamType===q.LINEAR};this.streamingApi.sendTerminateBeacon(this.playerInfo.streamInfo.sid,n)}nextAsset(){let e=this.playerInfo.streamInfo.mid,n=this.playerInfo.streamInfo.sid;return e&&n?this.streamingApi.getNextAsset(n,e):C(void 0)}newStreamRequest(e){return this.streamRequest.newStreamRequest(e,this.browserManager.browserConfig,this.environment.platform,this.session.deviceId,this.playerState.isAirplaying())}startKeepAlive(){this.stopKeepAlive();let e=this.playerInfo.streamInfo.keepalive;e<0&&(e=this.config.getSettingNumber(x.defaultKeepaliveTimeout,3e5)),e=e*.85,this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive()},e)}stopKeepAlive(){this.keepAliveInterval&&(clearInterval(this.keepAliveInterval),this.keepAliveInterval=void 0)}sendKeepAlive(){let e={status:this.playerInfo.streamInfo.keepAliveStatus,mid:this.playerInfo.streamInfo.mid};this.streamingApi.keepAlive(this.playerInfo.streamInfo.sid,e).subscribe({error:n=>{let r=n?.error?n.error:void 0,o=r?.code?r.code:void 0,s=new vt(r?.message??"",ht.KEEPALIVE,
15!0,r?.code,r?.errorId);this.logManager.logKeepAliveError(s),o===yI.SS_STREAM_GONE?this.playerEventManager.error.next(s):(this.keepAliveErrCount++,this.keepAliveErrCount===this.maxKeepAliveErrors&&this.playerEventManager.error.next(s))}})}startContinueWatchingTimer(){if(this.playerInfo.streamInfo.sessionLifetime&&this.playerInfo.playInfo?.streamType==q.LINEAR){this.stopContinueWatchingTimer();let e=this.playerInfo.streamInfo.sessionLifetime-this.continueWatchingBeforeStreamEndTime;this.continueWatchingTimeout=setTimeout(()=>{this.playerEventManager.continueWatching.next()},e)}}stopContinueWatchingTimer(){this.continueWatchingTimeout&&(clearTimeout(this.continueWatchingTimeout),this.continueWatchingTimeout=void 0)}startReloadManifestTimeout(){this.stopReloadManifestTimeout(),this.reloadManifestTimeout=setTimeout(()=>{this._reloadManifestRequired=!0,this.reloadManifestTimeout=void 0},this.reloadManifestThreshold)}stopReloadManifestTimeout(){this.reloadManifestTimeout&&(clearTimeout(this.reloadManifestTimeout),this.reloadManifestTimeout=void 0)}get reloadManifestRequired(){return this._reloadManifestRequired}static{this.\u0275fac=function(n){return new(n||t)(h(nn),h(Lr),h(ey),h(ae),h(O),h(ay),h(Be),h(ly),h(Vr),h(ne),h(yu))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var cy=class{constructor(i,e,n){this.favorite=!1,this.recordableIcon="",this.id=e.channelId,this.enabled=e.enabled,this.name=e.text.title,this.shortDescription=e.text.shortDescription,this.longDescription=e.text.longDescription,this.defaultLogo=e.image.defaultLogo?i.imageLocation+e.image.defaultLogo:void 0,this.squareLogo=e.image.squareLogo?i.imageLocation+e.image.squareLogo:void 0,this.posterLogo=e.image.posterLogo?i.imageLocation+e.image.posterLogo:void 0,this.thumbnail=e.thumbnail,this.audioOnly=e.audioOnly,this.resolution=e.resolution,this.minimumAge=e.minimumAge,this.adult=e.adult,this.catalogs=e.catalogs??[],this.ottRights=n?.currentRights??[],this.maximumRights=n?.maximumRights??[],this.maxReplayHours=e.rights?.maxReplayHours??0}getChannelNumberForCatalog(i){let n=(this.catalogs||[]).find(r=>r.catalogId===i);return n?n.channelNumber:void 0}setFavorite(i){this.favorite=i}isFavorite(){return this.favorite}hasOttRight(i){return this.ottRights.some(e=>e.type===i)}hasAnonymousRight(i){return this.maximumRights?.some(e=>e.type===i)}channelHasRightsForStreamTypes(i,e){return!i||i.length===0?!1:i.some(n=>n.currentRights?.some(r=>e.includes(r.type)))}};var Jn=(()=>{class t{constructor(e,n,r,o,s,a){this.epgApi=e,this.sessionService=n,this.environment=r,this.business=o,this.favoriteCache=s,this.adulService=a}getChannels(){return this.request||(this.request=this.epgApi.getChannels().pipe(fe(e=>{let n=e.map(r=>new cy(this.business.client.bootstrap.discovery,r,r.rights));return this.sortChannels(n)}),Ai())),this.request}sortChannels(e){return this.favoriteCache.getFavoritesForChannel().pipe(P(n=>(n.forEach(r=>{let o=e.find(s=>s.id===r.assetId);o&&o.setFavorite(!o.adult||this.adulService.showAdult(Me.ANY))}),e.sort((r,o)=>{let s=r.getChannelNumberForCatalog(this.sessionService.catalogId)||Number.MAX_SAFE_INTEGER,a=o.getChannelNumberForCatalog(this.sessionService.catalogId)||Number.MAX_SAFE_INTEGER;return r.isFavorite()===o.isFavorite()?s<a?-1:s>a?1:0:r.isFavorite()?-1:1}),this.request=void 0,e)),z(()=>C([])))}getValidChannels(e,n){return this.getChannels().pipe(P(r=>(r=r.filter(o=>!o.catalogs||o.catalogs.some(s=>s.catalogId===n)),r.forEach(o=>this.setRecordableIcon(o)),{allChannels:r,validChannels:r.filter(o=>!o.enabled||o.audioOnly||!this.environment.allowAdult&&o.adult?!1:o?.maximumRights?.some(s=>e.includes(s.type)))})))}loadZappableChannels(){return this.getValidChannels(this.environment.atvOttRights,this.sessionService.catalogId).pipe(P(e=>e.validChannels))}setRecordableIcon(e){e.recordableIcon="",this.environment.atvFeatureList.includes(ln.SHOW_RECORDABLE_ICONS)&&e.hasOttRight(q.NPVR)&&(e.recordableIcon="./assets/theme/svg/recordable.svg")}static{this.\u0275fac=function(n){return new(n||t)(h(dn),h(ne),h(ae),h(st),h(ui),h($e))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var il=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y){this.config=e,this.business=n,this.historyApi=r,this.playerInfo=o,this.streamManager=s,this.vodApi=a,this.logManager=l,this.epgUtility=c,this.epgApi=d,this.channelCache=p,this.stbCache=y,this._userEnabled=!1,this.nextAssetChecked=!1,this.autoStart
15Subject=new wn(1,0),this.autoplayButtonLabel=V(""),this.vodEnabled=this.config.getSettingBoolean(x.autoplayWatchingEnabledVod,!1),this.epgEnabled=this.config.getSettingBoolean(x.autoplayWatchingEnabledEpg,!1),this.minPlayPercentage=this.config.getSettingNumber(x.autoplayNextAssetInDetailPercent,.95),this.startCountdownSeconds=this.config.getSettingNumber(x.autoplayStartNextAssetTime,9),this.autoStartInterval=this.config.getSettingNumber(x.autoplayAutoStartInterval,9e6),this.imageLocation=this.business.client.bootstrap.discovery.imageLocation,(this.vodEnabled||this.epgEnabled)&&this.loadCustomerSetting(),this.autoStartLabel=this.config.getTranslation(Sh.autoplay_start_in_seconds)}loadCustomerSetting(){this.historyApi.getCustomerSetting(Ns.autoplay_enabled).subscribe({next:e=>{this._userEnabled=!e||e.value==="true"||e.value==="TRUE"},error:()=>{this._userEnabled=this.config.getSettingBoolean(x.autoplayCustomerDefault,!0)}})}get userEnabled(){return this._userEnabled}set userEnabled(e){this._userEnabled=e}reset(){this.nextAssetChecked=!1,this._autoplayDetail=void 0,this.logInfo=void 0}checkNextAsset(e){let n=this.playerInfo.playInfo;!n||!this.canCheckNextAsset(n.streamType,e)||(this.nextAssetChecked=!0,this.streamManager.nextAsset().pipe(fe(r=>r?this.loadNextAssetInfo(r):C(void 0))).subscribe({next:r=>{this._autoplayDetail=r},error:()=>{this._autoplayDetail=void 0,console.log("Failed to load next asset for autoplay")}}))}get autoplayDetail(){return this._autoplayDetail}canCheckNextAsset(e,n){return!this.nextAssetChecked&&this.canAutoplayForStream(e)&&this._userEnabled&&n>=this.minPlayPercentage}canAutoplayForStream(e){switch(e){case q.REPLAY:case q.NPVR:return this.epgEnabled;case q.FVOD:case q.SVOD:case q.TVOD:return this.vodEnabled;default:return!1}}loadNextAssetInfo(e){return this.createLogInfo(e),e.detail.assetType===he.VOD?this.loadVodAssetInfo(e):this.loadEpgInfo(e).pipe(z(()=>C(void 0)))}createLogInfo(e){let n=this.playerInfo.playInfo;if(n){let r=cs(n.streamType);this.logInfo={assetId:r?n.assetId:n.scheduleId??"",assetType:r?he.VOD:he.SCHEDULE,nextAssetId:e.detail.assetId,nextAssetType:e.detail.assetType}}}loadVodAssetInfo(e){return this.vodApi.getVod(e.detail.assetId).pipe(P(n=>{let r=new ny(n,{streamType:e.play.streamType,streamId:e.play.resourceId,isReserved:!1,isTrailer:!1,quoteId:e.play.quoteId});return this.createVodAutoplayDetail(n,r)}))}loadEpgInfo(e){return e.play.streamType===q.REPLAY?this.loadScheduleInfo(e,e.play.resourceId):e.play.streamType===q.NPVR?this.stbCache.getRecordingForId(e.play.resourceId,!0).pipe(fe(n=>this.loadScheduleInfo(e,n.schedule,n))):C(void 0)}loadScheduleInfo(e,n,r){return We({schedule:this.epgApi.getSchedule(n),channels:this.channelCache.getChannels()}).pipe(P(({schedule:o,channels:s})=>{let a=s.find(d=>d.id===o.schedule.channelId),l={schedule:o.schedule,program:o.program,season:o.season,series:o.series},c;if(r)c=this.createNpvrPlayInfo(e,r,l,a);else{if(!a)throw new Error("No channel available for replay");c=this.createReplayPlayInfo(e,o.schedule,a,l)}return this.createProgramDetail(o,c)}))}createNpvrPlayInfo(e,n,r,o){return n.identifier=e.play.resourceId,new ty(n,r,o)}createReplayPlayInfo(e,n,r,o){return n.scheduleId=e.play.resourceId,new gu(r,n,o)}createPosterImage(e,n){return e?this.imageLocation+ot.createImageUrl(e,n):void 0}createBackgroundImage(e,n){return e?ot.getSourceSet(this.imageLocation+e,nr.AUTOPLAY_BACKGROUND):n?ot.getSourceSet(this.imageLocation+n,nr.AUTOPLAY_BACKGROUND):void 0}createVodAutoplayDetail(e,n){let r=new En;r.addLongEpisodeInfo(this.config,e.seasonNumber,e.episodeNumber);let o=new En;o.addProductionYear(e.productionYear),o.addDuration(this.config,e.duration),o.addGenres(this.config,e.genres??[]);let s=new _c;s.addMinimumAge(e.minimumAge),s.addResolution($.getHighestResolution(e.streams));let a=new _c;return a.addParentalRatings(e.parentalRatings??[]),{title:e.text.title,description:e.text.shortDescription??e.text.longDescription,poster:this.createPosterImage(e.image.poster,me.CARD_PORTRAIT_NORMAL_2),background:this.createBackgroundImage(e.image.detail,e.image.poster),episodeInfo:r,programInfo:o,icons:s,parentalIcons:a,playInfo:n}}createProgramDetail(e,n){let r=new En;r.addLongEpisodeInfo(this.config,e.season?.seasonNumber,e.program?.episodeNumber);let o=new En;o.addProductionYear(e.program.productionYear),o.addDuration(this.config,this.epgUtility.getDurationSeconds(e.schedule.published)),o.addGenres(this.config,e.program.genres??[]);let s=new _c;s.addMinimumAge(e.program.minimumAge);let a=new _c;
15return a.addAccessibilityOptions(e.schedule.accessibilityOptions??[]),a.addParentalRatings(e.program.parentalRatings??[]),{title:e.program.text.title,description:e.program.text.shortDescription??e.program.text.longDescription,poster:this.createPosterImage(e.program.image.poster,me.CARD_LANDSCAPE_NORMAL_2),background:this.createBackgroundImage(e.program.image.detail,e.program.image.poster),episodeInfo:r,programInfo:o,icons:s,parentalIcons:a,playInfo:n}}resetAutoplayStartTime(){this.autoplayStartTime=Date.now()}showAutoplay(){this.logInfo&&this.logManager.logAutoplayView(this.logInfo),this.startAutoStartTimeout()}startAutoStartTimeout(){if(!this.autoplayStartTime||Date.now()-this.autoplayStartTime>this.autoStartInterval){this.updateCountdownLabel();return}this.updateCountdownLabel(this.startCountdownSeconds),this.autoStartSub=$i(0,1e3).pipe(P(e=>this.startCountdownSeconds-e),C0(e=>e>=0,!0)).subscribe(e=>{e>=0?this.updateCountdownLabel(e):(this.autoStartSubject.next(void 0),this.clearAutoStartInterval())})}updateCountdownLabel(e){e!==void 0?this.autoplayButtonLabel.set(this.autoStartLabel.replace("$1",e.toString())):this.autoplayButtonLabel.set(this.config.getTranslation(Sh.autoplay_start_manually))}clearAutoStartInterval(){this.autoStartSub?.unsubscribe(),this.autoStartSub=void 0}autoStart(){this.logInfo&&this.logManager.logAutoplayAction(this.logInfo,ff.NO_INTERACTION)}manualStart(){this.logInfo&&this.logManager.logAutoplayAction(this.logInfo,ff.MANUAL)}cancelStart(){this.logInfo&&this.logManager.logAutoplayAction(this.logInfo,ff.CLOSE)}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(st),h(en),h(nn),h(bu),h(Xa),h(Vr),h(tn),h(dn),h(Jn),h(xn))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Cu=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y){this.streamingApi=e,this.streamRequest=n,this.aaApi=r,this.business=o,this.config=s,this.purchaseCache=a,this.session=l,this.autoplayManager=c,this.messages=d,this.environment=p,this.popup=y,this.assetTitle=V(""),this.assetSubTitle=V(new En),this.assetImage=V(""),this.showLive=V(!1),this.canSeek=V(!1),this.canPause=V(!1),this.position=V(0),this.duration=V(0),this.paused=V(!1),this.buffering=V(!1),this.visible=V(!1),this.updateMediaInfo=()=>{if(!this.castSession){this.resetVisual();return}let b=this.castSession.getMediaSession();if(!b){this.resetVisual();return}let T=b.media?.metadata;if(T){this.assetTitle.set(T.title);let W=new En;T.subtitle&&W.add(T.subtitle);let j=this.config.getTranslation(Xy.casting_to_title_web),ee=this.castSession.getCastDevice().friendlyName;W.add(j.replace("$1",ee)),this.assetSubTitle.set(W);let De=T.images&&T.images.length>0?T.images[0].url:void 0;De&&this.assetImage.set(De)}switch(this.canSeek.set(b.supportedMediaCommands.includes(chrome.cast.media.MediaCommand.SEEK)),this.showLive.set(b.customData.streamType===q.LINEAR),this.canPause.set(b.supportedMediaCommands.includes(chrome.cast.media.MediaCommand.PAUSE)),b.playerState){case chrome.cast.media.PlayerState.PAUSED:this.paused.set(!0),this.buffering.set(!1),this.showUi();break;case chrome.cast.media.PlayerState.PLAYING:this.paused.set(!1),this.buffering.set(!1),this.showUi();break;case chrome.cast.media.PlayerState.BUFFERING:this.buffering.set(!0),this.showUi();break;default:this.resetVisual()}}}configureRemotes(e,n){this.remotePlayer=e,this.remoteController=n,this.remoteController?.addEventListener(cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,this.updateMediaInfo),this.remoteController.addEventListener(cast.framework.RemotePlayerEventType.ANY_CHANGE,()=>{this.updateTimes()})}get isConnected(){return this.remotePlayer.isConnected}startAsset(e,n,r){if(this.session.isAnonymous){this.popup.showAuthPopup.emit();return}this.playInfo=e,this.loadCastDeviceId().pipe(fe(o=>We({stream:this.startStreamForChromecast(e,o,n),purchases:this.checkForPurchases(e.streamType),deviceId:C(o)}))).subscribe({next:({stream:o,purchases:s,deviceId:a})=>{this.startOnChromecast(e,o,s,a,r)},error:o=>{this.messages.showErrorMessage(this.config.getTranslation(o?.code??"",ge.error_streaming))}})}get castSession(){return cast.framework.CastContext.getInstance().getCurrentSession()??void 0}startStreamForChromecast(e,n,r){return(r?C(r):this.streamingApi.startStream(this.createStreamRequest
15(e,n))).pipe(z(o=>{throw new vt(o.error?.message??"",ht.START_STREAM,!0,o.error?.code,o.error?.errorId)}))}createReserveRequest(e){return this.loadCastDeviceId().pipe(P(n=>this.createStreamRequest(e,n)))}createStreamRequest(e,n){return this.streamRequest.newStreamRequest(e,{packaging:this.environment.defaultStreamPackageType,encryption:fi.WIDEVINE,isApple:!1},ra.CHROMECAST,n)}loadCastDeviceId(){let e=this.castSession?.getMediaSession()?.media?.customData;if(e?.castDeviceId)return C(e.castDeviceId);let n=this.castSession?.getCastDevice();return n&&(!this.castDevice||this.castDevice.identifier!==n.label)?this.aaApi.registerChromecastDevice({type:ra.CHROMECAST,identifier:n.label,name:n.friendlyName.trim()}).pipe(P(r=>(this.castDevice=r,r.id)),z(()=>(this.castDevice=void 0,C(void 0)))):C(this.castDevice?.id)}checkForPurchases(e){return e===q.TVOD?this.purchaseCache.getPurchases(!0).pipe(z(()=>C(void 0))):C(void 0)}startOnChromecast(e,n,r,o,s){let a=new chrome.cast.media.MediaInfo("","");a.metadata=this.createMetaData(e),a.streamType=this.getChromecastStreamType(e),a.customData={streamType:e?.streamType,castDeviceId:o};let l=new chrome.cast.media.LoadRequest(a);l.customData=this.createCustomData(e,n,r,o,s),l.autoplay=!0,this.castSession&&this.castSession.loadMedia(l).catch(()=>{this.messages.showErrorMessage(this.config.getTranslation(ge.error_streaming))})}createMetaData(e){let n=new chrome.cast.media.MovieMediaMetadata,r=this.business.client.bootstrap.discovery.imageLocation;if(e instanceof gc){if(n.title=e.channel.name,e.channel.squareLogo){let o=ot.createImageUrl(e.channel.squareLogo,me.CHANNEL_SQUARE_1);n.images=[new chrome.cast.Image(o?.startsWith("http")?o:r+o)]}}else{n.title=e.title;let o="";if(e.episode&&e.season?(o=this.config.getTranslation(Io.ribbon_season_episode),o=o?o.replace("$1",e.season.toString()).replace("$2",e.episode.toString()):""):e.episode&&(o=this.config.getTranslation(Io.ribbon_episode),o=o?o.replace("$1",e.episode.toString()):""),o&&(n.subtitle=o),e.image){let s=ot.createImageUrl(e.image,cs(e.streamType)?me.VOD_CARD_3:me.EPG_CARD_3);n.images=[new chrome.cast.Image(s.startsWith("http")?s:r+s)]}}return n}getChromecastStreamType(e){return e.isLive?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED}createCustomData(e,n,r,o,s=!1){return{version:2,customerId:this.session.customerId,assetId:e.assetId,streamId:n.sid,streamType:e.streamType,trailer:e.isTrailer,keepaliveInterval:n.keepalive/1e3,resumeFromBookmark:!!e?.startPosition||s,resourceId:e.resourceId,quoteId:e.quoteId??"",schedulePublishedStart:e.startTime,schedulePublishedEnd:e.endTime,bookmarkType:cs(e.streamType)?vo.VOD:vo.PROGRAM,quotes:r?z1(r):[],entitlementId:this.session.entitlementId,logInfo:{userId:this.session.loginName,profileId:this.session.profileId,catalogId:this.session.catalogId,deviceId:o??"",assetName:e.title,scheduleId:e.scheduleId,programId:e.programId,channelId:e.channelId,channelName:e.channelName,seasonNumber:e.season,episodeNumber:e.episode},autoplay:this.autoplayManager.userEnabled}}resetVisual(){this.visible.set(!1),this.assetTitle.set(""),this.assetSubTitle.set(new En),this.assetImage.set(""),this.showLive.set(!1),this.canSeek.set(!1),this.canPause.set(!1),this.position.set(0),this.duration.set(0),this.paused.set(!1),this.buffering.set(!1)}showUi(){this.visible.set(!0)}stopCasting(){this.castSession&&(this.resetVisual(),this.castSession.endSession(!0))}togglePlayPause(){this.castSession&&this.remoteController.playOrPause()}updateTimes(){if(!this.castSession)return;let e=this.castSession.getMediaSession();if(!e)return;let n=e.media;if(n!=null){this.position.set(e.getEstimatedTime());let r=e.getEstimatedLiveSeekableRange();this.duration.set(n.duration&&n.duration>=0?n.duration:r?.end?r.end:0)}}seekRelative(e){let n=this.position()+e;this.seekTo(n)}seekTo(e){!this.castSession||!this.castSession.getMediaSession()||(this.remotePlayer.currentTime=e,this.remoteController?.seek())}static{this.\u0275fac=function(n){return new(n||t)(h(Lr),h(ey),h(Or),h(st),h(O),h(es),h(ne),h(il),h(_e),h(ae),h(Ft))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function ek(t,i){localStorage.setItem(t,i)}function tk(t){return localStorage.getItem(t)??void 0}function nk(t){return localStorage.removeItem(t)}function ik(t,i){localStorage.setItem(t,i.toString())}function rk(t){let i=localStorage.getItem(t),e;return i!==null&&(e=parseFloat(i)),e}function ok(t,i){localStorage.setItem(t,i?"true":"false")}function sk(t){let i=localStorage.getItem(t),e;return i!==null&&(e=i==="true"),e}var rl=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-close-button"]],decls:1,vars:0,consts:[["src","./assets/theme/svg/exit.svg",1,"close-button"]],template:function(n,r){n&1&&Qe(0,"img",0)},styles:[".close-button[_ngcontent-%COMP%]{width:100%;height:100%;cursor:pointer}"]})}}return t})();function ZW(t,i){if(t&1&&M(0,"img",4),t&2){let e=_(2);S("src",e.detail().poster,Je)}}function JW(t,i){if(t&1&&M(0,"app-tag-list",7),t&2){let e=_(2);S("tags",e.detail().episodeInfo)}}function XW(t,i){if(t&1&&M(0,"app-tag-list",10),t&2){let e=_(2);S("tags",e.detail().programInfo)}}function KW(t,i){if(t&1){let e=B();m(0,"div",1),A("click",function(r){return r.stopPropagation()}),M(1,"img",2),m(2,"div",3),E(3,ZW,1,1,"img",4),m(4,"div",5)(5,"span",6),N(6),g(),E(7,JW,1,1,"app-tag-list",7),m(8,"span",8),N(9),g(),m(10,"div")(11,"div",9),E(12,XW,1,1,"app-tag-list",10),M(13,"a
15pp-icon-list",11),g()(),M(14,"app-icon-list",11),m(15,"app-text-button",12),A("click",function(r){k(e);let o=_();return L(o.startAutoplay(r))}),g()()(),m(16,"app-close-button",13),A("click",function(r){k(e);let o=_();return L(o.closeAutoplay(r))}),g()()}if(t&2){let e=_();u(),S("srcset",e.detail().background),u(2),I(e.detail().poster?3:-1),u(3),ce(" ",e.detail().title),u(),I(e.detail().episodeInfo.tags.length>0?7:-1),u(2),Q(e.detail().description),u(3),I(e.detail().programInfo.tags.length>0?12:-1),u(),S("icons",e.detail().icons),u(),S("icons",e.detail().parentalIcons),u(),S("label",e.autoplayManager.autoplayButtonLabel())("active",!0)}}var ak=(()=>{class t{constructor(e,n,r){this.playerState=e,this.autoplayManager=n,this.playerController=r,this.detail=Xe(()=>this.playerState.autoplayDetail())}ngOnInit(){this.autoplayManager.autoStartSubject.subscribe({next:()=>{let e=this.detail()?.playInfo;e&&(this.autoplayManager.autoStart(),this.playerController.startAsset(e,!0))}}),this.autoplayManager.showAutoplay()}closeAutoplay(e){e.stopPropagation(),this.autoplayManager.cancelStart(),this.playerState.autoplayDetail.set(void 0)}startAutoplay(e){e.preventDefault();let n=this.detail()?.playInfo;n&&(this.autoplayManager.manualStart(),this.playerController.startAsset(n,!0))}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(il),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-autoplay-detail"]],decls:1,vars:1,consts:[[1,"autoplay"],[1,"autoplay",3,"click"],[1,"autoplay-background",3,"srcset"],[1,"autoplay-detail"],[1,"autoplay-poster",3,"src"],[1,"autoplay-detail-info"],[1,"font-title-1"],[1,"font-highlighted-label",3,"tags"],[1,"autoplay-detail-description","font-text"],[1,"autoplay-detail-row"],[1,"autoplay-detail-program-info","font-label",3,"tags"],[3,"icons"],[1,"autoplay-start",3,"click","label","active"],["id","icon",3,"click"]],template:function(n,r){n&1&&E(0,KW,17,10,"div",0),n&2&&I(r.detail()?0:-1)},dependencies:[rl,mu,Q1,Ke],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.autoplay[_ngcontent-%COMP%]{background-color:#030d2b;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.autoplay-background[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;object-fit:cover}#icon[_ngcontent-%COMP%]{position:absolute;top:1rem;right:1rem;height:2.7rem;width:2.7rem}.autoplay-detail[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:4rem;padding:2rem;width:100%;z-index:0}.autoplay-poster[_ngcontent-%COMP%]{height:100%;max-width:21.875rem;max-height:31.25rem;border-radius:1.25rem}.autoplay-detail-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:1rem;width:100%;min-width:0;max-width:40rem;flex-shrink:1;margin-top:4.625rem}.autoplay-detail-description[_ngcontent-%COMP%]{overflow:hidden;display:-webkit-box;-webkit-line-clamp:7;line-clamp:7;-webkit-box-orient:vertical}.autoplay-detail-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.autoplay-detail-program-info[_ngcontent-%COMP%]{min-width:0;flex-shrink:1;color:#ca7ef1}.autoplay-start[_ngcontent-%COMP%]{align-self:center}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.autoplay-detail-description[_ngcontent-%COMP%]{-webkit-line-clamp:3;line-clamp:3}.autoplay-poster[_ngcontent-%COMP%]{max-width:15rem;
15max-height:21.4285714286rem}}@media only screen and (orientation:portrait){.autoplay-detail[_ngcontent-%COMP%]{flex-direction:column}}@media only screen and (orientation:landscape){.autoplay-detail[_ngcontent-%COMP%]{flex-wrap:nowrap}}"]})}}return t})();var WI=(function(t){return t.PREROLL="PREROLL",t.POSTROLL="POSTROLL",t.BREAK="BREAK",t.NOTSUBSCRIBED="NOTSUBSCRIBED",t})(WI||{});var uy=(()=>{class t{constructor(e,n,r,o,s,a,l){this.state=e,this.engine=n,this.config=r,this.streamingApi=o,this.info=s,this.logManager=a,this.business=l,this._hasPreRoll=!1,this._hasMidRoll=!1,this._hasPostRoll=!1,this._inPostRoll=!1,this._manifestReloaded=!1,this.breakVertisements=[],this.breakVertisementIndex=0,this.nextBreakSubject=new wn(1,0),this.breakAdvertisement=V(void 0),this.breakDelay=this.config.getSettingNumber(x.playerBreakvertisingTime,-1),this.imageLocation=this.business.client.bootstrap.discovery.imageLocation}handleAdsAdded(e){this._hasPreRoll=this._manifestReloaded?!1:e.hasPreRoll,this._hasMidRoll=this._manifestReloaded?!1:e.hasMidRoll,this._hasPostRoll=e.hasPostRoll}reset(e=!1){this._hasPreRoll=!1,this._hasMidRoll=!1,this._hasPostRoll=!1,this._inPostRoll=!1,this._manifestReloaded=e}handleAdBreakEvent(e){return this.state.adBreak.set(e.starting),e.starting?(this.state.showContentControls.set(!1),this.state.showAdControls.set(!0),this.state.adPlaying.set(!0),this._inPostRoll=e.breakType===Ar.POST_ROLL,this.clearBreakVertisement()):(this.state.adPlaying.set(!1),this.state.showAdControls.set(!1)),!e.starting&&e.breakType===Ar.POST_ROLL}handleAdPlayingEvent(){this.state.adPlaying.set(!0)}handleAdPausedEvent(){this.state.adPlaying.set(!1)}get hasPreRoll(){return this._hasPreRoll}get hasMidRoll(){return this._hasMidRoll}get hasPostRoll(){return this._hasPostRoll}get inPostRoll(){return this._inPostRoll}startBreakTimeout(){this.state.adBreak()||this.breakDelay<0||(this.clearBreakVertisement(),this.breakTimeout=setTimeout(()=>{this.loadBreakVertisements()},this.breakDelay))}loadBreakVertisements(){let e=this.info.streamInfo;e.sid&&e.mid&&this.streamingApi.getBreakvertising(e.sid,e.mid).subscribe({next:n=>{let r=n.filter(o=>o.image.imageType===Wy.FULLSCREEN);this.startBreakRotation(r),this.nextBreakSub=this.nextBreakSubject.subscribe({next:()=>this.selectNextBreak()})},error:()=>{}})}clearBreakVertisement(){this.clearBreakRotateTimeout(),this.nextBreakSub?.unsubscribe(),this.breakTimeout&&(clearTimeout(this.breakTimeout),this.breakTimeout=void 0),this.logBreakAdEnd(),this.breakAdvertisement.set(void 0)}startBreakRotation(e){this.breakVertisements=e.map(n=>({image:n.image.imageUrl.startsWith("http")?n.image.imageUrl:this.imageLocation+n.image.imageUrl,action:n.action,logInfo:this.createBreakLogInfo(n),skipTime:n.image.skipTime})),this.breakVertisementIndex=0,this.breakVertisements.length>0&&(this.clearBreakRotateTimeout(),this.selectNextBreak())}selectNextBreak(){this.logBreakAdEnd();let e=this.breakVertisements[this.breakVertisementIndex];this.breakVertisementIndex++,this.breakVertisementIndex>=this.breakVertisements.length&&(this.breakVertisementIndex=0),this.breakAdvertisement.set(e),e.logInfo.start=new Date,e.skipTime!==void 0&&this.startBreakRotateTimeout(e.skipTime)}logBreakAdEnd(){let e=this.breakAdvertisement();e&&this.logManager.logAdEnd(e.logInfo)}createBreakLogInfo(e){return{type:WI.BREAK,campaignId:e.adIdentifier.campaignId,campaignReportingId:e.adIdentifier.campaignReportingId,advertisementId:e.adIdentifier.advertisementId,advertisementReportingId:e.adIdentifier.advertisementReportingId,resourceType:"IMAGE_URL",actionMethod:e.action?.method,actionType:e.action?.type,actionId:e.action?.id,actionPerformed:!1,start:new Date}}startBreakRotateTimeout(e){this.breakRotateTimeout=setTimeout(()=>{this.nextBreakSubject.next(),this.breakRotateTimeout=void 0},e)}clearBreakRotateTimeout(){this.breakRotateTimeout&&(clearTimeout(this.breakRotateTimeout),this.breakRotateTimeout=void 0)}static{this.\u0275fac=function(n){return new(n||t)(h(Be),h(Dn),h(O),h(Lr),h(nn),h(Vr),h(st))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function ez(t,i){if(t&1){let e=B();m(0,"app-text-button",3),A("click",function(r){k(e);let o=_(2);return L(o.goToAdvertisement(r))}),g()}if(t&2){let e=_(2);S("label",e.actionText())("active",!0)}}function tz(t,i){if(t&1&&(m(0,"div",1),E(1,ez,1,2,"app-text-button",2),g()),t&2){let e=_();bt("background-image","url("+e.imgFullUrl()+")"),u(),I(!e.state.pipMode()&&e.actionText()?1:-1)}}var ck=(()=>{class t{constructor(e,n,r,o,s){this.adsManager=e,this.state=n,this.config=r,this.playerController=o,this.cmsAction=s,this.imgFullUrl=Xe(()=>{let a=this.adsManager.breakAdvertisement()?.image??"";return a?ot.createImageUrl(a,me.BREAKVERTISING_1):""}),this.actionText=Xe(()=>{switch(this.adsManager.breakAdvertisement()?.action?.method){case Xt.DETAIL:return this.config.getTranslation(Mt.player_ad_action_method_detail_ott);case Xt.PLAY:return this.config.getTranslation(Mt.player_ad_action_method_play_ott);case Xt.PLAY_TRAILER:return this.config.getTranslation(Mt.player_ad_action_method_play_trailer_ott);default:return""}})}goToAdvertisement(e){e.preventDefault();let n=this.adsManager.breakAdvertisement();if(n?.action?.id&&n.action.type){let r={actionId:n.action.id,actionType:n.action.type,actionMethod:n.action.method};r.actionMethod===Xt.DETAIL&&this.playerController.setPipMode(!0),n.logInfo.actionPerformed=!0,this.adsManager.breakAdvertisement.set(n),this.cmsAction.doAction(r,!1,!0)}}static{this.\u0275fac=function(n){return new(n||t)(f(uy),f(Be),f(O),f(yt),f(hu))}}static{this.\u0275cmp=D({type:t,selectors:[["app-break-advertisement-overlay"]],decls:1,vars:1,consts:[[1,"fullscreen-image",3,"background-image"],[1,"fullscreen-image"],[1,"action-button",3,"label","active"],[1,"action-button",3,"click","label","active"]],template:function(n,r){n&1&&E(0,tz,2,3,"div",0),n&2&&I(r.adsManager.breakAdvertisement()?0:-1)},dependencies:[Ke],styles:[".fullscreen-image[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;background-position:center;background-size:contain;background-repeat:no-repeat;-webkit-transition:background-image .86s ease-in-out;transition:background-image .86s ease-in-out}.action-button[_ngcontent-%COMP%]{position:absolute;top:1rem;left:50%;transform:translate(-50%);z-index:1}"]})}}return t})();function nz(t,i){if(t&1&&(te(0,"span",4),N(1),te(2,"span",6),N(3,"\xB7"),J()()),t&2){let e=i.$implicit;u(),ce(" ",e," ")}}function iz(t,i){if(t&1){let e=B();te(0,"img",7),qe("click",function(r){k(e);let o=_();return L(o.toPrevious(r))}),J(),Qe(1,"div",8),te(2,"img",9),qe("click",function(r){k(e);let o=_();return L(o.toNext(r))}),J()}if(t&2){let e=_();H("disabled",!e.playerState.hasPrevSchedule()),u(2),H("disabled",!e.playerState.hasNextSchedule())}}var dk=(()=>{class t{constructor(e,n){this.playerState=e,this.playerController=n}toPrevious(e){e.preventDefault(),this.playerState.hasPrevSchedule()&&this.playerController.navigateToSchedule(!1)}toNext(e){e.preventDefault(),this.playerState.hasNextSchedule()&&this.playerController.navigateToSchedule(!0)}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-asset-info"]],decls:9,vars:2,consts:[[1,"asset-info"],[1,"asset-meta"],[1,"asset-title","font-large-title"],[1,"asset-subtitle","font-highlighted-label"],[1,"asset-subtitle-part"],[1,"schedule-prev-next"],[1,"dot-gray"],["src","./assets/theme/svg/left_normal.svg","alt","previous schedule",1,"clickable",3,"click"],[1,"navigation-divider"],["src","./assets/theme/svg/right_normal.svg","alt","next schedule",1,"clickable",3,"click"]],template:function(n,r){n&1&&(te(0,"div",0)(1,"div",1)(2,"div",2),N(3),J(),te(4,"div",3),X(5,nz,4,1,"span",4,se),J()(),te(7,"div",5),E(8,iz,3,4),J()()),n&2&&(u(3),Q(r.playerState.assetTitle()),u(2),K(r.playerState.assetSubt
15itleParts()),u(3),I(r.playerState.hasPrevSchedule()||r.playerState.hasNextSchedule()?8:-1))},styles:[".asset-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.asset-meta[_ngcontent-%COMP%]{flex-shrink:1;overflow:hidden}.asset-title[_ngcontent-%COMP%], .asset-subtitle[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.asset-subtitle[_ngcontent-%COMP%]{margin-top:.39rem}.asset-subtitle-part[_ngcontent-%COMP%]:last-child   .dot-gray[_ngcontent-%COMP%]{display:none}.schedule-prev-next[_ngcontent-%COMP%]{align-self:flex-end;display:flex;gap:1rem;height:1.64356rem}.clickable.disabled[_ngcontent-%COMP%]{opacity:.4;cursor:not-allowed}"]})}}return t})();function rz(t,i){if(t&1){let e=B();m(0,"app-dropdown-list",3),A("itemSelected",function(r){k(e);let o=_(2);return L(o.select(r))}),g()}if(t&2){let e=_(2);S("items",e.playerState.audioTrackOptions())}}function oz(t,i){if(t&1){let e=B();m(0,"div",0)(1,"div",1),A("click",function(){k(e);let r=_();return L(r.toggleShowOptions())}),g(),E(2,rz,1,1,"app-dropdown-list",2),g()}if(t&2){let e=_();u(2),I(e.showDropdown()?2:-1)}}var uk=(()=>{class t extends gt{constructor(e,n){super(),this.playerState=e,this.playerController=n}hideDropdown(){this.showDropdown.set(!1)}toggleShowOptions(){this.showDropdown()?this.hideDropdown():this.openDropdown()}select(e){let n=e;this.hideDropdown(),this.playerController.selectAudioTrack(n)}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-audio"]],features:[Ee],decls:1,vars:1,consts:[[1,"player-settings-wrapper"],[1,"player-control","player-control-audio",3,"click"],["verPlacement","top","horPlacement","left",3,"items"],["verPlacement","top","horPlacement","left",3,"itemSelected","items"]],template:function(n,r){if(n&1&&E(0,oz,3,1,"div",0),n&2){let o;I(((o=r.playerState.audioTrackOptions())==null?null:o.length)>1?0:-1)}},dependencies:[Ka],styles:[".player-control-audio[_ngcontent-%COMP%]{background-image:url(assets/theme/svg/audio-select_normal.svg);background-repeat:no-repeat;background-size:contain}"]})}}return t})();var pk=(()=>{class t{constructor(e,n){this.playerState=e,this.playerController=n}toggleFullscreen(e){e.preventDefault(),this.playerController.toggleFullscreen()}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-fullscreen"]],decls:1,vars:2,consts:[["id","icon",1,"player-control",3,"click"]],template:function(n,r){n&1&&(te(0,"div",0),qe("click",function(s){return r.toggleFullscreen(s)}),J()),n&2&&H("is-fullscreen",r.playerState.fullscreen())},styles:["#icon[_ngcontent-%COMP%]{background-image:url(assets/theme/svg/seekbar_fullscreen.svg);background-repeat:no-repeat;background-size:contain}#icon.is-fullscreen[_ngcontent-%COMP%]{background-image:url(assets/theme/svg/seekbar_normalscreen.svg)}"]})}}return t})();var fk=(()=>{class t{constructor(e){this.playerController=e}enablePipMode(e){e.preventDefault(),this.playerController.setPipMode(!0)}static{this.\u0275fac=function(n){return new(n||t)(f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-pip"]],decls:1,vars:0,consts:[["id","icon",1,"player-control",3,"click"]],template:function(n,r){n&1&&(te(0,"div",0),qe("click",function(s){return r.enablePipMode(s)}),J())},styles:["#icon[_ngcontent-%COMP%]{background-image:url(assets/theme/svg/pip.svg);background-repeat:no-repeat;background-size:contain}"]})}}return t})();function sz(t,i){if(t&1){let e=B();m(0,"app-dropdown-list",3),A("itemSelected",function(r){k(e);let o=_(2);return L(o.select(r))}),g()}if(t&2){let e=_(2);S("items",e.playerState.videoTrackOptions())}}function az(t,i){if(t&1){let e=B();m(0,"div",0)(1,"div",1),A("click",function(){k(e);let r=_();return L(r.toggleShowOptions())}),g(),E(2,sz,1,1,"app-dropdown-list",2),g()}if(t&2){let e=_();u(2),I(e.showDropdown()?2:-1)}}var hk=(()=>{class t extends gt{constructor(e,n){super(),this.playerState=e,this.playerController=n}hideDropdown(){this.showDropdown.set(!1)}toggleShowOptions(){this.showDropdown()?this.hideDropdown():this.openDropdown()}select(e){let n=e;this.hideDropdown(),this.playerController.selectVideoTrack(n)}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-quality"]],features:[Ee],decls:1,vars:1,consts:[[1,"player-settings-wrapper"],[1,"player-control","player-control-quality",3,"click"],["verPlacement","top","horPlacement","left",3,"items"],["verPlacement","top","horPlacement","left",3,"itemSelected","items"]],template:function(n,r){if(n&1&&E(0,az,3,1,"div",0),n&2){let o;I(((o=r.playerState.videoTrackOptions())==null?null:o.length)>1?0:-1)}},dependencies:[Ka],styles:[".player-control-quality[_ngcontent-%COMP%]{background-image:url(assets/theme/svg/quality-select_normal.svg);background-repeat:no-repeat;background-size:contain}"]})}}return t})();var lz=["seekbar"],cz=["targetToolTip"],mk=t=>({width:t}),gk=t=>({left:t});function dz(t,i){if(t&1&&M(0,"div",4),t&2){let e=_();S("ngStyle",br(1,mk,e.seekTargetPercent()+"%"))}}function uz(t,i){if(t&1&&(m(0,"div",7),M(1,"img",8),g()),t&2){let e=_();u(),S("src",e.playerState.thumbnailUrl(),Je)("ngStyle",br(2,gk,e.thumbnailOffset()))}}var _k=(()=>{class t{constructor(e,n){this.playerState=e,this.playerController=n,this.seekTargetPercent=V(0),this.targetTooltipOffset=V(""),this.targetTooltipLabel=V(""),this.thumbnailOffset=V("0"),this.seekTargetSec=-1}ngAfterViewInit(){let e=this.seekbar.nativeElement;this.handleTargetPosition(e),this.handleMouseLeave(e),this.handleSeekTo(e)}handleTargetPosition(e){let n=Gt(e,"mousemove").pipe(P(o=>o.clientX)),r=Yr(Gt(e,"touchstart"),Gt(e,"touchmove")).pipe(we(o=>{o.stopPropagation()}),ke(o=>o?.touches?.length>0),P(o=>(this.playerController.lockControls(),o.touches.item(0)?.clientX??0)));this.updateUserPositionSubscription=Yr(n,r).pipe(ke(()=>this.playerState.canSeek()),ur(),P(o=>{let s=e.getBoundingClientRect();return(o-(s.x??s.left))/s.width*100})).subscribe(o=>{this.seekTargetPercent.set(o),this.targetTooltipOffset.set(`calc(${o}% - ${this.tToolTip.nativeElement.clientWidth/2}
15px`),this.seekTargetSec=this.playerState.timeFromPercentage(o),this.targetTooltipLabel.set($.secondsToHHMMSS(this.seekTargetSec)),this.playerController.loadThumbnail(this.playerState.timeFromPercentage(o,!1)),this.thumbnailOffset.set(`calc(${o}% - 5rem`)})}handleMouseLeave(e){this.mouseLeaveSubscription=Gt(e,"mouseleave").subscribe(()=>{this.resetSeekTarget()})}resetSeekTarget(){this.seekTargetPercent.set(0),this.targetTooltipOffset.set(""),this.targetTooltipLabel.set(""),this.playerController.loadThumbnail(void 0),this.thumbnailOffset.set(""),this.seekTargetSec=-1}handleSeekTo(e){this.finishedSeekingSubscription=Yr(Gt(e,"click"),Gt(e,"touchend")).pipe(we(n=>n.preventDefault()),ke(()=>this.playerState.canSeek())).subscribe(n=>{this.playerController.seekAbsolute(this.seekTargetSec+this.playerState.startOffset()),n.pointerType!=="mouse"&&(this.resetSeekTarget(),this.playerController.showControls())})}ngOnDestroy(){this.updateUserPositionSubscription?.unsubscribe(),this.mouseLeaveSubscription?.unsubscribe(),this.finishedSeekingSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-seekbar"]],viewQuery:function(n,r){if(n&1&&Ve(lz,5)(cz,5),n&2){let o;be(o=Ce())&&(r.seekbar=o.first),be(o=Ce())&&(r.tToolTip=o.first)}},decls:9,vars:11,consts:[["seekbar",""],["targetToolTip",""],[1,"seekbar-container","clickable"],[1,"seekbar"],[1,"seekbar-target",3,"ngStyle"],[1,"seekbar-playhead",3,"ngStyle"],[1,"target-tooltip","font-highlighted-label",3,"ngStyle"],[1,"thumbnail-wrapper"],[1,"thumbnail",3,"src","ngStyle"]],template:function(n,r){n&1&&(m(0,"div",2,0)(2,"div",3),E(3,dz,1,3,"div",4),M(4,"div",5),g(),m(5,"div",6,1),N(7),g(),E(8,uz,2,4,"div",7),g()),n&2&&(u(3),I(r.seekTargetPercent()>0?3:-1),u(),S("ngStyle",br(7,mk,r.playerState.positionPercentage()+"%")),u(),H("hidden",!r.targetTooltipOffset()),S("ngStyle",br(9,gk,r.targetTooltipOffset())),u(2),ce(" ",r.targetTooltipLabel()," "),u(),I(r.playerState.thumbnailUrl()?8:-1))},dependencies:[Us],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.seekbar-container[_ngcontent-%COMP%]{position:relative;width:100%;margin-top:1rem;padding-top:.29rem;margin-bottom:1rem;padding-bottom:.5rem}.seekbar[_ngcontent-%COMP%]{position:relative;width:100%;border-radius:.31rem;background-color:#fff;height:.58rem;overflow:hidden}.seekbar-target[_ngcontent-%COMP%]{position:absolute;background-color:#ca7ef180;height:100%}.target-tooltip[_ngcontent-%COMP%]{position:absolute;padding:.39rem;top:-2rem;background-color:#ca7ef1;color:var(--atv-icon-text-color)}.seekbar-playhead[_ngcontent-%COMP%]{position:absolute;background-color:#ca7ef1;height:100%}.thumbnail-wrapper[_ngcontent-%COMP%]{width:100%;position:absolute;bottom:9.5rem}.seekbar-container[_ngcontent-%COMP%]   .thumbnail-wrapper[_ngcontent-%COMP%]{display:none}.seekbar-container[_ngcontent-%COMP%]:hover   .thumbnail-wrapper[_ngcontent-%COMP%]{display:block}img.thumbnail[_ngcontent-%COMP%]{border:white solid 2px;width:10rem;position:absolute}"]})}}return t})();function pz(t,i){if(t&1){let e=B();m(0,"app-dropdown-list",3),A("itemSelected",function(r){k(e);let o=_(2);return L(o.select(r))}),g()}if(t&2){let e=_(2);S("items",e.playerState.textTrackOptions())}}function fz(t,i){if(t&1){let e=B();m(0,"div",0)(1,"div",1),A("click",function(){k(e);let r=_();return L(r.toggleShowOptions())}),g(),E(2,pz,1,1,"app-dropdown-list",2),g()}if(t&2){let e=_();u(2),I(e.showDropdown()?2:-1)}}var vk=(()=>{class t extends gt{constructor(e,n){super(),this.playerState=e,this.playerController=n}hideDropdown(){this.showDropdown.set(!1)}toggleShowOptions(){this.showDropdown()?this.hideDropdown():this.openDropdown()}select(e){let n=e;this.hideDropdown(),this.playerController.selectTextTrack(n)}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-text"]],features:[Ee],decls:1,vars:1,consts:[[1,"player-settings-wrapper"],[1,"player-control","player-control-text",3,"click"],["verPlacement","top","horPlacement","left",3,"items"],["verPlacement","top","horPlacement","left",3,"itemSelected","items"]],template:function(n,r){if(n&1&&E(0,fz,3,1,"div",0),n&2){let o;I(((o=r.playerState.textTrackOptions())==null?null:o.length)>1?0:-1)}},dependencies:[Ka],styles:[".player-control-text[_ngcontent-%COMP%]{background-image:url(assets/theme/svg/subtitle-select_normal.svg);background-repeat:no-repeat;background-size:contain}"]})}}return t})();var hz=["sliderWrapperRef"],yk=(()=>{class t{constructor(e,n){this.playerState=e,this.playerController=n,this.mouseDown=!1,this.volumeIcon=Xe(()=>this.playerState.muted()?"./assets/theme/svg/volume_mute.svg":this.playerState.volume()>.5?"./assets/theme/svg/volume.svg":"./assets/theme/svg/volume_half.svg"),this.volumePercent=Xe(()=>this.playerState.muted()?"0":`${this.playerState.volume()*100}%`)}ngOnInit(){let e=this.sliderWrapperRef.nativeElement;e.onmousemove=n=>{this.mouseDown&&(n.preventDefault(),this.newVolume(n,e))},e.ontouchmove=n=>{this.mouseDown&&(n.preventDefault(),this.newVolume(n,e))},e.onmousedown=()=>{this.mouseDown=!0},e.ontouchstart=()=>{this.mouseDown=!0},e.onmouseup=()=>{this.mouseDown=!1},e.ontouchend=()=>{this.mouseDown=!1},e.onmouseleave=n=>{this.mouseDown&&this.newVolume(n,e),this.mouseDown=!1},e.ontouchcancel=n=>{this.mouseDown&&this.newVolume(n,e),this.mouseDown=!1},e.onclick=n=>{this.newVolume(n,e)},e.ontouchstart=n=>{this.newVolume(n,e)}}newVolume(e,n){let r;"touches"in e&&e.touches&&e.touches.length>0?r=(e.touches[0].clientX-(n.getBoundingClientRect().x||n.getBoundingClientRect().left))/n.getBoundingClientRect().width:"clientX"in e&&e.clientX&&(r=(e.clientX-(n.getBoundingClientRect().x||n.getBoundingClientRect().left))/n.getBoundingClientRect().width),r&&(r=
15Math.min(Math.max(0,r),1),this.playerController.adjustVolume(r))}toggleMute(e){e.preventDefault(),this.playerController.toggleMuted()}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-volume"]],viewQuery:function(n,r){if(n&1&&Ve(hz,7),n&2){let o;be(o=Ce())&&(r.sliderWrapperRef=o.first)}},decls:6,vars:3,consts:[["sliderWrapperRef",""],[1,"player-settings-wrapper"],[1,"volume-icon",3,"click","touchstart","src"],[1,"volume-slider-wrapper"],[1,"volume-slider"],[1,"volume-slider-filler"]],template:function(n,r){n&1&&(te(0,"div",1)(1,"img",2),qe("click",function(s){return r.toggleMute(s)})("touchstart",function(s){return r.toggleMute(s)}),J(),te(2,"div",3,0)(4,"div",4),Qe(5,"div",5),J()()()),n&2&&(u(),Gn("src",r.volumeIcon(),Je),u(4),bt("width",r.volumePercent()))},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.volume-icon[_ngcontent-%COMP%]{margin-right:.5rem;cursor:pointer}.volume-slider-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;padding:.5rem 0}.volume-slider[_ngcontent-%COMP%]{width:5.4rem;height:.2rem;border-radius:.1rem;background:#fff6}.volume-slider-filler[_ngcontent-%COMP%]{background:#fff;border-radius:.1rem;height:100%}"]})}}return t})();function mz(t,i){if(t&1&&(m(0,"span",3),N(1),g()),t&2){let e=_();u(),ce(" ",e.liveIndicator()," ")}}function gz(t,i){if(t&1&&(m(0,"span",4),N(1),g()),t&2){let e=_();u(),Hg(" ",e.formattedRelPosition()," / ",e.formattedRelDuration()," ")}}function _z(t,i){t&1&&M(0,"google-cast-launcher",6)}function vz(t,i){if(t&1){let e=B();m(0,"button",8),A("click",function(){k(e);let r=_();return L(r.configureAirplay())}),g()}if(t&2){let e=_();H("active",e.playerState.isAirplaying())}}var bk=(()=>{class t{constructor(e,n,r,o,s,a){this.playerState=e,this.config=n,this.environment=r,this.playerController=o,this.playerInfo=s,this.player=a,this.liveIndicator=V(""),this.formattedRelPosition=Xe(()=>$.secondsToHHMMSS(Math.floor(this.playerState.relPosition()))),this.formattedRelDuration=Xe(()=>$.secondsToHHMMSS(Math.floor(this.playerState.relDuration()))),this.liveIndicator.set(this.config.getTranslation(Mt.live_indicator_text,"LIVE"))}configureAirplay(){this.playerController.showAirplaySelect()}onControlsClicked(e){e.preventDefault()}hideTimeContainerWhenLive(){let e=!!this.playerInfo.playInfo?.isLive;return this.environment.hidePlayerTimeContainerWhenLive&&e}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(O),f(ae),f(yt),f(nn),f(ds))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-bottom-controls"]],decls:16,vars:6,consts:[[1,"controls-container",3,"click"],[1,"control-group"],[1,"control-group-left"],[1,"live-badge","font-large-label"],[1,"time-container","font-highlighted-label"],[1,"control-group-right",3,"click"],[1,"player-control"],["id","airplay",1,"player-control",3,"active"],["id","airplay",1,"player-control",3,"click"]],template:function(n,r){n&1&&(m(0,"div",0),A("click",function(s){return s.preventDefault()}),M(1,"app-player-asset-info")(2,"app-player-seekbar"),m(3,"div",1)(4,"div",2),E(5,mz,2,1,"span",3),E(6,gz,2,2,"span",4),g(),m(7,"div",5),A("click",function(s){return r.onControlsClicked(s)}),M(8,"app-player-volume")(9,"app-player-audio")(10,"app-player-text")(11,"app-player-quality"),E(12,_z,1,0,"google-cast-launcher",6),E(13,vz,1,2,"button",7),M(14,"app-player-pip")(15,"app-player-fullscreen"),g()()()),n&2&&(H("hidden",!r.playerState.showContentControls()),u(5),I(r.playerState.isLive()?5:-1),u(),I(r.hideTimeContainerWhenLive()?-1:6),u(6),I(r.player.castAvailable()?12:-1),u(),I(r.playerState.canAirplay()?13:-1))},dependencies:[dk,_k,yk,hk,uk,vk,fk,pk],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.controls-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.control-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.control-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center}.control-group-left[_ngcontent-%COMP%]{display:flex;column-gap:.75rem;white-space:nowrap}#airplay[_ngcontent-%COMP%]{-webkit-mask:url(assets/theme/svg/airplay.svg) no-repeat;mask:url(assets/theme/svg/airplay.svg) no-repeat;background-color:#fff;height:1.375rem}#airplay.active[_ngcontent-%COMP%]{background-color:#ca7ef1}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){app-player-volume[_ngcontent-%COMP%]{display:none}}"]})}}return t})();var Su=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-loading-indicator"]],decls:1,vars:0,consts:[[1,"loading-indicator"]],template:function(n,r){n&1&&Qe(0,"div",0)},styles:[".loading-indicator[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;border:.25rem solid #fff;border-bottom-color:transparent;display:inline-block;box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite;background-clip:padding-box;text-align:left}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]})}}return t})();function yz(t,i){if(t&1){let e=B();m(0,"div",6),A("click",function(r){k(e);let o=_();return L(o.seekRelative(r,!1))}),M(1,"img",7),m(2,"span",8),N(3),g()()}if(t&2){let e=_();u(3),ce(" ",e.rewindLabel()," ")}}function bz(t,i){t&1&&M(0,"app-loading-indicator",3)}
15function Cz(t,i){if(t&1){let e=B();m(0,"img",9),A("click",function(r){k(e);let o=_();return L(o.pause(r))}),g()}}function Sz(t,i){if(t&1){let e=B();m(0,"img",10),A("click",function(r){k(e);let o=_();return L(o.play(r))}),g()}}function Ez(t,i){if(t&1){let e=B();m(0,"div",6),A("click",function(r){k(e);let o=_();return L(o.seekRelative(r,!0))}),M(1,"img",11),m(2,"span",8),N(3),g()()}if(t&2){let e=_();u(3),ce(" ",e.forwardLabel()," ")}}var Ck=(()=>{class t{constructor(e,n,r){this.config=e,this.playerController=n,this.playerState=r,this.rewindLabel=V(""),this.forwardLabel=V(""),this.showPause=Xe(()=>this.playerState.showContentControls()&&this.playerState.playback()===Ei.PLAYING&&this.playerState.canPause()||this.playerState.showAdControls()&&this.playerState.adPlaying()),this.showPlay=Xe(()=>this.playerState.showContentControls()&&this.playerState.playback()===Ei.PAUSED||this.playerState.showAdControls()&&!this.playerState.adPlaying()),this.PlayerState=Ei,this.rewindSeconds=e.getSettingNumber(x.playerRewindVod,1e4)/1e3,this.forwardSeconds=e.getSettingNumber(x.playerFastForwardVod,1e4)/1e3,this.rewindLabel.set(`-${this.getSeekLabel(this.rewindSeconds)}`),this.forwardLabel.set(`+${this.getSeekLabel(this.forwardSeconds)}`)}getSeekLabel(e){let n=Math.floor(e/60),r=e%60;return n===0?this.config.getTranslation(Mt.player_controls_skip_button_seconds).replace("$1",r.toString()):r==0?this.config.getTranslation(Mt.player_controls_skip_button_minutes).replace("$1",n.toString()):this.config.getTranslation(Mt.player_controls_skip_button_minutes_and_seconds).replace("$1",n.toString()).replace("$2",r.toString())}pause(e){e.preventDefault(),this.playerController.pause()}play(e){e.preventDefault(),this.playerController.play()}seekRelative(e,n){e.preventDefault(),n?this.playerController.seekRelative(this.forwardSeconds):this.playerController.seekRelative(-this.rewindSeconds)}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(yt),f(Be))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-center-buttons"]],decls:7,vars:4,consts:[[1,"center-buttons"],[1,"seek-button"],[1,"center-button"],[1,"spinner"],["src","./assets/theme/svg/seekbar_pause_normal.svg",1,"pause"],["src","./assets/theme/svg/seekbar_play_normal.svg",1,"play"],[1,"seek-button",3,"click"],["src","./assets/theme/svg/seek_backward.svg"],[1,"font-label"],["src","./assets/theme/svg/seekbar_pause_normal.svg",1,"pause",3,"click"],["src","./assets/theme/svg/seekbar_play_normal.svg",1,"play",3,"click"],["src","./assets/theme/svg/seek_forward.svg"]],template:function(n,r){n&1&&(m(0,"div",0),E(1,yz,4,1,"div",1),m(2,"div",2),E(3,bz,1,0,"app-loading-indicator",3),E(4,Cz,1,0,"img",4)(5,Sz,1,0,"img",5),g(),E(6,Ez,4,1,"div",1),g()),n&2&&(u(),I(r.playerState.showContentControls()&&r.playerState.canJump()?1:-1),u(2),I(r.playerState.buffering()?3:-1),u(),I(r.showPause()?4:r.showPlay()?5:-1),u(2),I(r.playerState.showContentControls()&&r.playerState.canJump()?6:-1))},dependencies:[Su],styles:[".center-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;column-gap:5.5rem}.seek-button[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;cursor:pointer}.seek-button[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:3.125rem;height:2.65rem}.seek-button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-top:.14rem}.center-button[_ngcontent-%COMP%]{position:relative}.center-button[_ngcontent-%COMP%]{width:4.5rem;height:4.5rem}.spinner[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.play[_ngcontent-%COMP%], .pause[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;cursor:pointer}"]})}}return t})();var Sk=(()=>{class t{constructor(e,n){this.playerState=e,this.playerController=n}closePlayer(e){e.stopPropagation(),this.playerController.close()}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-close-player-button"]],decls:1,vars:2,consts:[["id","icon",3,"click"]],template:function(n,r){n&1&&(m(0,"app-close-button",0),A("click",function(s){return r.closePlayer(s)}),g()),n&2&&H("pip-mode",r.playerState.pipMode())},dependencies:[rl],styles:["#icon[_ngcontent-%COMP%]{position:absolute;top:1rem;right:1rem;height:2.7rem;width:2.7rem}#icon.pip-mode[_ngcontent-%COMP%]{height:2rem;width:2rem}"]})}}return t})();var Iz=["scrollableDiv"];function wz(t,i){if(t&1&&Qe(0,"div",13),t&2){let e=_(2);bt("background-image","url("+e.playerState.currentChannel().image
15+")")}}function Tz(t,i){if(t&1&&(te(0,"div",12),N(1),J()),t&2){let e=_(2);u(),ce(" ",e.playerState.currentChannel().data.name," ")}}function Dz(t,i){if(t&1){let e=B();te(0,"div",9),qe("click",function(r){k(e);let o=_();return L(o.toggleBar(r))}),Qe(1,"img",10),E(2,wz,1,2,"div",11)(3,Tz,2,1,"div",12),J()}if(t&2){let e,n=_();H("open",n.playerState.zapbarOpen()),u(2),I((e=n.playerState.currentChannel())!=null&&e.image?2:3)}}function Az(t,i){if(t&1&&Qe(0,"div",13),t&2){let e=_().$implicit;bt("background-image","url("+e.image+")")}}function Rz(t,i){if(t&1&&(te(0,"div",16),N(1),J()),t&2){let e=_().$implicit;u(),ce(" ",e.data.name," ")}}function xz(t,i){if(t&1){let e=B();te(0,"div",14),qe("click",function(r){let o=k(e).$implicit,s=_();return L(s.selectChannel(r,o.data))}),te(1,"img",15),qe("click",function(r){let o=k(e).$implicit,s=_();return L(s.toggleFavorite(r,o.id))}),J(),E(2,Az,1,2,"div",11)(3,Rz,2,1,"div",16),J()}if(t&2){let e,n=i.$implicit,r=_();H("selected",n.id===((e=r.playerState.currentChannel())==null?null:e.id)),Gn("id",yr("channel-",n.id)),u(),Gn("src",r.favoriteIcon(n.favorite),Je),u(),I(n.image?2:3)}}var Ek=(()=>{class t{constructor(e,n){this.playerState=e,this.playerController=n,this.canScrollTop=V(!1),this.canScrollBottom=V(!1),bn(()=>{this.playerState.zapbarOpen()||this.scrollableDiv?.nativeElement.scrollTo({top:0,behavior:"instant"})})}toggleBar(e){e.preventDefault(),this.playerState.zapbarOpen.set(!this.playerState.zapbarOpen()),this.playerState.zapbarOpen()&&this.checkCanScroll()}scroll(e,n=!1){if(e.preventDefault(),!(n&&!this.canScrollBottom()||!n&&!this.canScrollTop())&&this.scrollableDiv?.nativeElement?.firstElementChild){let r=this.scrollableDiv.nativeElement.firstElementChild.getBoundingClientRect().height;if(!r)return;r*=n?1:-1;let s=this.scrollableDiv.nativeElement.scrollTop+4*r;this.scrollableDiv.nativeElement.scrollTop=s,this.checkCanScroll(s)}}checkCanScroll(e){setTimeout(()=>{this.scrollableDiv?.nativeElement?.firstElementChild&&(e||(e=this.scrollableDiv.nativeElement.scrollTop),this.canScrollTop.set(e>0),this.canScrollBottom.set(e+20<this.scrollableDiv.nativeElement.scrollHeight-this.scrollableDiv.nativeElement.offsetHeight))})}favoriteIcon(e){return $.getFavoriteIcon(e)}updateVisibility(){this.playerController.showControls()}selectChannel(e,n){e.defaultPrevented||(e.preventDefault(),this.playerController.zapToChannel(n))}toggleFavorite(e,n){e.preventDefault(),this.playerController.toggleFavoriteChannel(n)}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-zapbar"]],viewQuery:function(n,r){if(n&1&&Ve(Iz,5),n&2){let o;be(o=Ce())&&(r.scrollableDiv=o.first)}},decls:11,vars:9,consts:[["scrollableDiv",""],[1,"channelbar-wrapper"],[1,"channel","current-channel",3,"open"],[1,"channelbar"],[1,"channelbar-scrollbutton",3,"click"],["src","./assets/theme/svg/up_normal.svg"],[1,"channelbar-items",3,"scroll"],[1,"channel","selectable",3,"selected","id"],["src","./assets/theme/svg/down_normal.svg"],[1,"channel","current-channel",3,"click"],["src","./assets/theme/svg/dropdown_normal.svg",1,"channel-icon"],[1,"channel-logo",3,"background-image"],[1,"channel-text"],[1,"channel-logo"],[1,"channel","selectable",3,"click","id"],[1,"channel-icon",3,"click","src"],[1,"channel-text","font-title-4"]],template:function(n,r){n&1&&(te(0,"div",1),E(1,Dz,4,3,"div",2),te(2,"div",3)(3,"div",4),qe("click",function(s){return r.scroll(s)}),Qe(4,"img",5),J(),te(5,"div",6,0),qe("scroll",function(){return r.updateVisibility()}),X(7,xz,4,6,"div",7,se),J(),te(9,"div",4),qe("click",function(s){return r.scroll(s,!0)}),Qe(10,"img",8),J()()()),n&2&&(H("hidden",r.playerState.channels().length<=1||!r.playerState.showContentControls()),u(),I(r.playerState.currentChannel()?1:-1),u(),H("hidden",!r.playerState.zapbarOpen()),u(),H("disabled",!r.canScrollTop()),u(4),K(r.playerState.channels()),u(2),H("disabled",!r.canScrollBottom()))},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}[_nghost-%COMP%]{height:100%}.channelbar-wrapper[_ngcontent-%COMP%]{height:100%;width:12rem;display:flex;flex-direction:column-reverse;align-items:stretch}.channel[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;height:5rem;flex-shrink:0;column-gap:.75rem;padding:1.125rem;cursor:pointer}.current-channel.open[_ngcontent-%COMP%]{opacity:.4}.current-channel[_ngcontent-%COMP%]   .channel-icon[_ngcontent-%COMP%]{transition:.2s;transform:rotate(180deg)}.current-channel.open[_ngcontent-%COMP%]   .channel-icon[_ngcontent-%COMP%]{transform:rotate(0)}.channel-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.channel-logo[_ngcontent-%COMP%]{flex-grow:1;align-self:stretch;background-repeat:no-repeat;background-position:center;background-size:contain}.channel-text[_ngcontent-%COMP%]{flex-grow:1;text-align:center;display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
15.channel-text[_ngcontent-%COMP%]:hover{white-space:unset}.channel.selectable[_ngcontent-%COMP%]{transition:.3s}.channel.selectable[_ngcontent-%COMP%]:hover, .channel.selectable.selected[_ngcontent-%COMP%]{background-color:#ca7ef13d}.channel.selectable.selected[_ngcontent-%COMP%]{border-right:2px solid #ca7ef1}.channelbar[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;min-height:0}.channelbar-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;border-top:1px solid rgba(255,255,255,.16);border-bottom:1px solid rgba(255,255,255,.16);overflow:scroll;scroll-behavior:smooth}.channelbar-items[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.channelbar-scrollbutton[_ngcontent-%COMP%]{height:3rem;flex-shrink:0;display:flex;justify-content:center;align-items:center;cursor:pointer}.channelbar-scrollbutton[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:1.16rem;height:1.625rem}.channelbar-scrollbutton.disabled[_ngcontent-%COMP%]{opacity:.4;cursor:not-allowed}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.channelbar-scrollbutton[_ngcontent-%COMP%]{display:none}}@media only screen and (orientation:portrait)and (max-width:600px){[_nghost-%COMP%]{flex-grow:1;min-height:0}}"]})}}return t})();var Mz=["playerPage"];function Pz(t,i){t&1&&(m(0,"div",2),M(1,"app-break-advertisement-overlay"),g())}function Oz(t,i){t&1&&M(0,"div",3)}function Nz(t,i){t&1&&M(0,"div",4)}function kz(t,i){t&1&&M(0,"app-autoplay-detail",8)}var Ik=(()=>{class t{constructor(e,n,r,o){this.playerState=e,this.playerController=n,this.playerEngine=r,this.playerInfo=o,this.handleFullscreen()}ngAfterViewInit(){this.playerEngine.containerElement&&this.playerPageEl.nativeElement.prepend(this.playerEngine.containerElement),this.playerPageEl.nativeElement.prepend(this.playerEngine.videoElement),this.interactionSubscription=Yr(Gt(this.playerPageEl.nativeElement,"click"),this.playerInfo.mobile?Gt(this.playerPageEl.nativeElement,"touchmove"):Gt(this.playerPageEl.nativeElement,"mousemove"),Gt(this.playerPageEl.nativeElement,"onmousewheel")).pipe(S0(500)).subscribe(e=>{!e.defaultPrevented&&(this.playerState.showContentControls()||this.playerState.showAdControls())&&this.playerInfo.mobile&&e.type==="click"?this.playerController.hideControls():this.playerController.showControls()}),window.addEventListener("keyup",e=>{e.key===" "&&this.playerState.visible()&&!this.playerState.pipMode()&&this.playerController.togglePlayPause()})}handleFullscreen(){bn(()=>{this.playerState.fullscreen()?this.playerPageEl?.nativeElement.requestFullscreen():document.fullscreenElement&&document.exitFullscreen()})}containerClicked(e){e.defaultPrevented||(this.playerState.pipMode()?this.playerController.setPipMode(!1):this.playerInfo.mobile||this.playerController.togglePlayPause())}ngOnDestroy(){this.interactionSubscription?.unsubscribe(),this.interactionSubscription=void 0}static{this.\u0275fac=function(n){return new(n||t)(f(Be),f(yt),f(Dn),f(nn))}}static{this.\u0275cmp=D({type:t,selectors:[["app-player-page"]],viewQuery:function(n,r){if(n&1&&Ve(Mz,5),n&2){let o;be(o=Ce())&&(r.playerPageEl=o.first)}},decls:11,vars:10,consts:[["playerPage",""],[1,"player-wrapper",3,"click"],[1,"breakvertisement"],[1,"bottom-controls","controls-gradient"],[1,"zapbar-gradient"],[1,"bottom-controls"],[1,"controls-container"],[1,"center-buttons"],[1,"autoplay-detail"]],template:function(n,r){n&1&&(m(0,"div",1,0),A("click",function(s){return r.containerClicked(s)}),E(2,Pz,2,0,"div",2),E(3,Oz,1,0,"div",3),E(4,Nz,1,0,"div",4),m(5,"div",5),M(6,"app-player-zapbar")(7,"app-player-bottom-controls",6),g(),M(8,"app-close-player-button")(9,"app-player-center-buttons",7),g(),E(10,kz,1,0,"app-autoplay-detail",8)),n&2&&(H("hidden",!r.playerState.visible())("pip-mode",r.playerState.pipMode()),u(2),I(r.playerState.adBreak()?-1:2),u(),I(r.playerState.showContentControls()&&!r.playerState.adBreak()?3:-1),u(),I(r.playerState.zapbarOpen()&&!r.playerState.adBreak()?4:-1),u(),H("hidden",r.playerState.adBreak()),u(5),I(r.playerState.autoplayDetail()?10:-1))},dependencies:[Sk,Ck,bk,Ek,ak,ck],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.player-wrapper[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;background-color:#000;bottom:0;right:0;z-index:15;transition:all .3s ease}.pip-mode[_ngcontent-%COMP%]{width:25vw;height:14.0625vw;bottom:20px;right:20px;cursor:zoom-in}.center-buttons[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin:auto}
15.bottom-controls[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;height:100%;display:flex;align-items:flex-end}.breakvertisement[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;height:100%}.controls-container[_ngcontent-%COMP%]{flex-grow:1;padding:1.25rem;width:100%}.controls-gradient[_ngcontent-%COMP%]{height:40%;background:linear-gradient(to top,#030d2b,#030d2b85 33.85%,#030d2b42 58.85%,#030d2b21 73.44%,#030d2b00)}.zapbar-gradient[_ngcontent-%COMP%]{position:absolute;width:20rem;height:100%;left:0;bottom:0;background:linear-gradient(to right,#030d2b,#030d2bc7 33.85%,#030d2b85 58.85%,#030d2b42 73.44%,#030d2b00)}.autoplay-detail[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:#030d2b;z-index:15}@media only screen and (orientation:portrait)and (max-width:600px){.bottom-controls[_ngcontent-%COMP%]{flex-direction:column;justify-content:flex-end;align-items:flex-start}}"]})}}return t})();var vc=(function(t){return t.Success="SUCCESS",t.Error="ERROR",t.Cancelled="CANCEL",t})(vc||{}),Zs=class t{constructor(i,e){this.type=i,this.data=e}static success(i){return new t(vc.Success,i)}static cancel(i){return new t(vc.Cancelled,i)}static error(i){return new t(vc.Error,i)}get isSuccess(){return this.type===vc.Success}get isCancelled(){return this.type===vc.Cancelled}get isError(){return this.type===vc.Error}};var zI=(()=>{class t{static config(){return{}}constructor(e,n,r,o){this.dlgConfig=e,this.dlgRef=n,this.config=r,this.log=o,this.stillWatchingBody=V(""),this.continueWatching=V(""),this.stillWatchingBody.set(this.config.getTranslation(ni.popup_still_watching_body)),this.continueWatching.set(this.config.getTranslation(ni.popup_still_watching_btn_continue));let s=this.config.getSettingNumber(x.continueWatchingPopupDuration,3e5);this.log.popUpShown(IE.CONTINUE_WATCHING),this.timeout=setTimeout(()=>{this.timeExpired(),this.timeout=void 0},s)}ngOnDestroy(){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}continueClicked(){this.dlgRef.close(Zs.success())}timeExpired(){this.dlgRef.close(Zs.error())}static{this.\u0275fac=function(n){return new(n||t)(f(Zo),f(go),f(O),f(ct))}}static{this.\u0275cmp=D({type:t,selectors:[["app-still-watching-dialog"]],decls:5,vars:2,consts:[[1,"still-watching-container"],[1,"still-watching-action"],[3,"click","label"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"div"),N(2),g(),m(3,"div",1)(4,"app-text-button",2),A("click",function(){return r.continueClicked()}),g()()()),n&2&&(u(2),Q(r.stillWatchingBody()),u(2),S("label",r.continueWatching()))},dependencies:[Ke],styles:[".still-watching-container[_ngcontent-%COMP%]{padding:.875rem 2.625rem}.still-watching-action[_ngcontent-%COMP%]{width:fit-content;margin:.875rem auto auto}@media only screen and (max-width:400px){.still-watching-container[_ngcontent-%COMP%]{padding:0}}"]})}}return t})();var py=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y){this.epgApi=e,this.epgUtility=n,this.channelCache=r,this.playerState=o,this.playerInfo=s,this.config=a,this.streamingApi=l,this.logManager=c,this.environment=d,this.favoriteCache=p,this.popup=y,this.channelSchedules=[],this.scheduleIndex=-1,this.playerWatchlistTime=this.config.getSettingNumber(x.playerWatchlistTime,300*1e3),this.playerWatchlistTimeRandom=this.config.getSettingNumber(x.playerWatchlistTimeRandomMs,300*1e3)}get linearPlayInfo(){let e=this.playerInfo.playInfo;return e instanceof gc?e:void 0}loadLiveDataForAsset(){let e=this.linearPlayInfo;e?(this.playerState.currentChannel.set(HI(e.channel)),this.loadChannelSchedules(e.channel).subscribe({next:()=>{this.startScheduleEndTimeout()},error:()=>{}}),this.loadLiveChannels(),this.reloadChannels()):(this.resetChannelInfo(),this.playerState.channels.set([]),this.clearReloadChannels())}fetchChannelLineup(e){let n=this.epgUtility.getTodayFromUntil();return this.epgApi.getScheduleForChannelFromUntil(e,n.from,n.until)}loadChannelSchedules(e){return this.fetchChannelLineup(e.id).pipe(P(n=>{let r=n.schedules??[];this.channelSchedules=this.epgUtility.fillScheduleGaps(r,new Date,e.id),this.channelLineup=n,this.channel=e,this.scheduleIndex=this.findCurrentSchedule(),this.setCanNavigateSchedules()}),z(n=>{throw this.resetChannelInfo(),console.warn("Failed to load schedules for current channel",n),n}))}loadLiveChannels(){this.channelCache.loadZappableChannels().subscribe({next:e=>{this.playerState.channels.set(e.map(HI))},error:e=>{this.playerState.channels.set([]),console.warn("Failed to load live channels",e)}})}resetChannelInfo(){this.channelSchedules=[],this.channelLineup=void 0,this.scheduleIndex=-1,this.channel=void 0}findCurrentSchedule(){let e=Date.now();return this.channelSchedules.findIndex(n=>{let r=n.published.start.getTime(),o=n.published.end.getTime();return r<=e&&o>e})}setCanNavigateSchedules(){this.channelSchedules.length!==0&&(this.scheduleIndex===-1&&(this.scheduleIndex=0),this.playerState.hasPrevSchedule.set(this.scheduleIndex>0),this.playerState.hasNextSchedule.set(this.scheduleIndex<this.channelSchedules.length-1))}navigateThroughSchedules(e){e?this.scheduleIndex+=1:this.scheduleIndex-=1,this.updateAssetTexts()}navigateToCurrentSchedule(){this.scheduleIndex=this.findCurrentSchedule(),this.updateAssetTexts()}updateAssetTexts(){this.setCanNavigateSchedules();let e=this.channelSchedules[this.scheduleIndex],n=this.channelLineup?.programs?.find(r=>r.programId===e.programId);
15this.playerState.assetTitle.set(n?.text.title??""),this.playerState.assetSubtitleParts.set(el(this.channel,e?.scheduleId?e.published:void 0))}liveToReplayAllowed(){let e=this.linearPlayInfo;return e?.epgInfo.schedule?this.epgUtility.scheduleHasRight(e.epgInfo.schedule,q.REPLAY):!1}convertToReplay(e){let n=this.linearPlayInfo;if(!n)return;let r=n.epgInfo.schedule;if(!r)throw new vt("Channel has no live schedule, cannot switch to replay",ht.PLAYER,!0);return gu.fromLinear(n,r,e)}startWatchlistTimeout(){if(this.playerInfo.playInfo?.streamType!==q.LINEAR)return;this.stopWatchlistTimeout();let e=$.randIntInRange(this.playerWatchlistTime,this.playerWatchlistTime+this.playerWatchlistTimeRandom);this.playerWatchlistTimeout=setTimeout(()=>this.updateWatchlist(),e)}stopWatchlistTimeout(){this.playerWatchlistTimeout&&(clearTimeout(this.playerWatchlistTimeout),this.playerWatchlistTimeout=void 0)}updateWatchlist(){let e=this.playerInfo.streamInfo;this.streamingApi.addToWatchList(e.sid,e.mid).subscribe({error:n=>{console.warn("Failed to update watchlist",n)}})}updateScheduleInfo(){this.playerScheduleEndTimeout=void 0;let e=this.linearPlayInfo;if(!e){console.warn("No Linear stream info available");return}if(e.scheduleId&&this.logManager.logPlayStop(li.SCHEDULE_END),!e){console.warn("No Linear stream info available");return}this.loadChannelSchedules(e.channel).subscribe({next:()=>{this.channelLineup&&e.updateForNewSchedule(this.scheduleEpgInfo(this.channelSchedules[this.scheduleIndex],this.channelLineup)),this.playerInfo.playInfo=e,this.playerInfo.logInfo?.updateStreamInfo(this.playerInfo.streamInfo.sid,this.playerInfo.manifestInfo.url),this.logManager.logPlayStart(),this.startScheduleEndTimeout()},error:()=>{}})}scheduleEpgInfo(e,n){let r=n?.programs?.find(a=>a.programId===e?.programId),o;r&&(o=n?.seasons?.find(a=>a.seasonId===r?.seasonId));let s;return o&&(s=n?.series?.find(a=>a.seriesId===o?.seriesId)),{program:r,schedule:e,season:o,series:s}}stopScheduleEndTimeout(){this.playerScheduleEndTimeout&&(clearTimeout(this.playerScheduleEndTimeout),this.playerScheduleEndTimeout=void 0)}startScheduleEndTimeout(){let e=this.channelSchedules[this.scheduleIndex];if(e){let n=e.published.end.getTime()-Date.now();this.playerScheduleEndTimeout=setTimeout(()=>this.updateScheduleInfo(),n)}}toggleFavoriteChannel(e){let n=this.playerState.channels().find(r=>r.id===e);n&&(n.favorite?(this.favoriteCache.deleteFavorite(cn.CHANNEL,n.id),n.favorite=!1):(this.favoriteCache.setFavorite(cn.CHANNEL,n.id),n.favorite=!0))}zapToChannel(e){return this.channel?.id===e.id?C(void 0):this.fetchChannelLineup(e.id).pipe(P(n=>{let r=tn.findCurrentScheduleV5(n.schedules??[]);if(r&&!this.epgUtility.scheduleHasRight(r,q.LINEAR)||!r&&!e.hasOttRight(q.LINEAR))throw new vt("Do not have Linear right, cannot zap",ht.PLAYER,!1,ge.error_no_rights);let o=this.scheduleEpgInfo(r,n);return new gc(e,o,q.LINEAR)}))}reloadChannels(){this.reloadSub||(this.reloadSub=this.popup.reloadCurrentPageEvent.subscribe({next:()=>{this.loadLiveChannels()}}))}clearReloadChannels(){this.reloadSub?.unsubscribe(),this.reloadSub=void 0}static{this.\u0275fac=function(n){return new(n||t)(h(dn),h(tn),h(Jn),h(Be),h(nn),h(O),h(Lr),h(Vr),h(ae),h(ui),h(Ft))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ui=(function(t){return t.PREF_NONE="none",t})(Ui||{}),Js=(function(t){return t[t.AUDIO=0]="AUDIO",t[t.TEXT=1]="TEXT",t})(Js||{});var fy=(()=>{class t{constructor(e,n,r,o){this.session=e,this.config=n,this.historyApi=r,this.messages=o,this.preferredAudio=[],this.preferredText=[],this._deviceSettingsLoaded=!1,this._preferredAudioLanguage1="",this._preferredAudioLanguage2="",this._audioLanguageOptions=[],this._preferredTextLanguage1="",this._preferredTextLanguage2="",this._textLanguageOptions=[],this.langNames=new Intl.DisplayNames([this.config.getLocale().replace("_","-")],{type:"language"});try{let s=localStorage.getItem(Te.preferred_channel_audio_language);if(s){let a=JSON.parse(s);Array.isArray(a)&&(this.preferredAudio=a)}}catch(s){this.preferredAudio=[]}try{let s=localStorage.getItem(Te.preferred_channel_text_language);if(s){let a=JSON.parse(s);Array.isArray(a)&&(this.preferredText=a)}}catch(s){this.preferredText=[]}}storePreferredLanguage(e,n,r){let o=this.session.profileId;if(n===Js.AUDIO){let s=this.preferredAudio.findIndex(a=>a.channelId===r&&a.profileId===o);s===-1?this.preferredAudio.push({channelId:r,profileId:o,language:e}):this.preferredAudio[s].language=e,localStorage.setItem(Te.preferred_channel_audio_language,JSON.stringify(this.preferredAudio))}else{let s=this.preferredText.findIndex(a=>a.channelId===r&&a.profileId===o);s===-1?this.preferredText.push({channelId:r,profileId:o,language:e}):this.preferredText[s].language=e,localStorage.setItem(Te.preferred_channel_text_language,JSON.stringify(this.preferredText))}}clearPreferredChannelLanguages(){localStorage.removeItem(Te.preferred_channel_audio_language),this.preferredAudio=[],localStorage.removeItem(Te.preferred_channel_text_language),this.preferredText=[]}getChannelPreferredLanguage(e,n){if(e===Js.AUDIO){let r=this.preferredAudio.find(o=>o.channelId===n&&o.profileId===this.session.profileId);if(r)return r.language}else{let r=this.preferredText.find(o=>o.channelId===n&&o.profileId===this.session.profileId);if(r)return r.language}}loadPreferredLanguages(){return We({audio1:this.historyApi.getSettingForDevice(this.session.deviceId,St.player_audio_language_1).pipe(z(()=>C(void 0))),audio2:this.historyApi.getSettingForDevice(this.session.deviceId,St.player_audio_language_2).pi
15pe(z(()=>C(void 0))),text1:this.historyApi.getSettingForDevice(this.session.deviceId,St.player_subtitle_language_1).pipe(z(()=>C(void 0))),text2:this.historyApi.getSettingForDevice(this.session.deviceId,St.player_subtitle_language_2).pipe(z(()=>C(void 0)))}).pipe(fe(({audio1:e,audio2:n,text1:r,text2:o})=>(this.loadOptions(),this.loadSavedSettings(e?.value,n?.value,r?.value,o?.value),this._deviceSettingsLoaded=!0,C(void 0))))}get deviceSettingsLoaded(){return this._deviceSettingsLoaded}get preferredAudioLanguage1(){return this._preferredAudioLanguage1}get preferredAudioLanguage2(){return this._preferredAudioLanguage2}get audioLanguageOptions(){return this._audioLanguageOptions}get preferredTextLanguage1(){return this._preferredTextLanguage1}get preferredTextLanguage2(){return this._preferredTextLanguage2}get textLanguageOptions(){return this._textLanguageOptions}isSameLanguage(e,n){return e&&(e=this.translateLangCode(e)),n&&(n=this.translateLangCode(n)),e===n}saveAudioLanguages(e,n){let r=[];e&&(r.push(this.historyApi.setSettingForDevice(this.session.deviceId,St.player_audio_language_1,e)),this._preferredAudioLanguage1=e),n&&(r.push(this.historyApi.setSettingForDevice(this.session.deviceId,St.player_audio_language_2,n)),this._preferredAudioLanguage2=n),this.handleSaveLanguages(r)}saveTextLanguages(e,n){let r=[];e&&(r.push(this.historyApi.setSettingForDevice(this.session.deviceId,St.player_subtitle_language_1,e)),this._preferredTextLanguage1=e),n&&(r.push(this.historyApi.setSettingForDevice(this.session.deviceId,St.player_subtitle_language_2,n)),this._preferredTextLanguage2=n),this.handleSaveLanguages(r)}handleSaveLanguages(e){e.length>0&&We(e).subscribe({next:()=>{this.messages.showSuccessMessage(this.config.getTranslation($t.settings_saved))},error:()=>{this.messages.showErrorMessage(this.config.getTranslation($t.setting_save_failed))}})}loadSavedSettings(e,n,r,o){e&&this._audioLanguageOptions.some(s=>s.value===e)?this._preferredAudioLanguage1=e:this._preferredAudioLanguage1=this.config.getSettingString(x.defaultAudioOption1,Ui.PREF_NONE),n&&this._audioLanguageOptions.some(s=>s.value===n)?this._preferredAudioLanguage2=n:this._preferredAudioLanguage2=this.config.getSettingString(x.defaultAudioOption2,Ui.PREF_NONE),r&&this._textLanguageOptions.some(s=>s.value===r)?this._preferredTextLanguage1=r:this._preferredTextLanguage1=this.config.getSettingString(x.defaultSubtitleOption1,Ui.PREF_NONE),o&&this._textLanguageOptions.some(s=>s.value===o)?this._preferredTextLanguage2=o:this._preferredTextLanguage2=this.config.getSettingString(x.defaultSubtitleOption2,Ui.PREF_NONE)}loadOptions(){let e=this.config.getSettingArray(x.languageAudioOptions,r=>r,[]);this._audioLanguageOptions=e.map(r=>({title:this.makeLanguageLabel(r),value:r}));let n=this.config.getSettingArray(x.languageSubtitleOptions,r=>r,[]);this._textLanguageOptions=n.map(r=>({title:this.makeLanguageLabel(r),value:r}))}makeLanguageLabel(e){let n;return e===Ui.PREF_NONE?n=this.config.getTranslation(Mt.player_subtitle_none):n=this.translateLangCode(e),n}translateLangCode(e){let n="";try{n=this.langNames.of(e)??e}catch(r){n=e}return n}static{this.\u0275fac=function(n){return new(n||t)(h(ne),h(O),h(en),h(_e))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var hy=(()=>{class t{constructor(e,n,r,o,s,a,l){this.playerState=e,this.playerInfo=n,this.config=r,this.playerEngine=o,this.environment=s,this.languageManager=a,this.browserManager=l,this.videoTranslationText=this.config.getTranslation(Mt.player_quality_unit),this.videoFpsTranslationText=this.config.getTranslation(Mt.player_quality_unit_fps),this.hideFps=this.config.getSettingNumber(x.playerQualityHideFps,25),this.videoAutoLabel=this.config.getTranslation(Mt.player_quality_auto),this.textNoneLabel=this.config.getTranslation(Mt.player_subtitle_none),this.languageManager.deviceSettingsLoaded||this.languageManager.loadPreferredLanguages().subscribe()}updateAvailableTracks(e){this.browserManager.browserConfig.isApple||this.playerState.videoTrackOptions.set(this.configureVideoTracks(e.videoTracks)),this.disableAudioSelectionForShakaOnSafari()||this.playerState.audioTrackOptions.set(this.configureAudioTracks(e.audioTracks)),this.playerState.textTrackOptions.set(this.configureTextTracks(e.textTracks)),this.selectPreferredTracks()}configureVideoTracks(e){if(e.length<2||this.playerInfo.manifestInfo.playerPolicy?.hideVideoSelection)return[];e.sort((r,o)=>{let s=o.height-r.height;return s===0&&o.frameRate&&r.frameRate?o.frameRate-r.frameRate:s});let n=e;
15return n.forEach(r=>{r.title=this.makeVideoTrackLabel(r),r.active=!1}),n.push({title:this.videoAutoLabel,active:!1,height:0}),n}makeVideoTrackLabel(e){return e.frameRate===void 0||this.hideFps===e.frameRate?this.videoTranslationText.replace("$1",e.height.toString()):this.videoFpsTranslationText.replace("$1",e.height.toString()).replace("$2",e.frameRate.toString())}selectPreferredTracks(){this.selectPreferredVideo(),this.selectPreferredAudio(),this.selectPreferredText()}selectPreferredVideo(){if(this.playerInfo.manifestInfo.playerPolicy?.hideVideoSelection||this.browserManager.browserConfig.isApple)return;let e=tk(Te.preferred_video_rendition),n;e&&(n=this.playerState.videoTrackOptions().find(r=>r.title&&r.title===e)),this.selectVideoTrack(n)}selectVideoTrack(e){e?.title?ek(Te.preferred_video_rendition,e.title):nk(Te.preferred_video_rendition),this.playerEngine.selectVideoTrack(e?.id),this.playerState.videoTrackOptions().forEach(n=>{n.active=n.id===e?.id})}configureAudioTracks(e){if(e.length<2||this.playerInfo.manifestInfo.playerPolicy?.hideAudioSelection)return[];let n=this.playerEngine.activeAudioTrack,r=e;return r.forEach(o=>{o.title=this.makeAudioTrackLabel(o),o.active=o.id===n?.id}),r}makeAudioTrackLabel(e){let n=e.language??e.label??"",r=this.config.getTranslation(Mt.player_audio_language_xx.replace("xx",n));return r.startsWith("*")&&(r=this.languageManager.translateLangCode(n)),e.channelsCount&&(r=`${r} (${this.config.getTranslation(`player_audio_channels_${e.channelsCount}`)})`),r}selectPreferredAudio(){if(this.playerInfo.manifestInfo.playerPolicy?.hideAudioSelection||this.disableAudioSelectionForShakaOnSafari())return;let e,n=!1,r=this.playerState.audioTrackOptions();if(this.playerInfo.playInfo?.channelId){let s=this.languageManager.getChannelPreferredLanguage(Js.AUDIO,this.playerInfo.playInfo.channelId);s&&(e=r.find(a=>a.id===s.id&&this.languageManager.isSameLanguage(a.language,s.language)),n=!!e,n||(e=r.find(a=>this.languageManager.isSameLanguage(a.language,s.language)),n=!!e))}let o=this.languageManager.preferredAudioLanguage1;!n&&o!==Ui.PREF_NONE?(e=r.find(s=>
15this.languageManager.isSameLanguage(s.language,o)),n=!!e):n||(n=!0),o=this.languageManager.preferredAudioLanguage2,!n&&o!==Ui.PREF_NONE&&(e=r.find(s=>this.languageManager.isSameLanguage(s.language,o))),e&&this.selectAudioTrack(e)}selectAudioTrack(e,n=!1){if(!e.id)return;let r=e.language??e.label;n&&this.playerInfo.playInfo?.channelId&&r&&this.languageManager.storePreferredLanguage({id:e.id,language:r},Js.AUDIO,this.playerInfo.playInfo.channelId),this.playerEngine.selectAudioTrack(e.id),this.playerState.audioTrackOptions().forEach(o=>{o.active=o.id===e.id})}configureTextTracks(e){if(e.length<1||this.playerInfo.manifestInfo.playerPolicy?.hideSubtitleSelection)return[];let n=e;return n.forEach(r=>{r.title=this.makeTextTrackLabel(r),r.active=!1}),n.push({title:this.textNoneLabel,active:!1}),n}makeTextTrackLabel(e){let n=e.language??e.label??"",r=this.config.getTranslation(Mt.player_subtitle_language_xx.replace("xx",n));return r.startsWith("*")&&(r=this.languageManager.translateLangCode(n)),r}selectPreferredText(){if(this.playerInfo.manifestInfo.playerPolicy?.hideSubtitleSelection){this.selectTextTrack(void 0);return}let e,n=!1,r=this.playerState.textTrackOptions();if(this.playerInfo.playInfo?.channelId){let s=this.languageManager.getChannelPreferredLanguage(Js.TEXT,this.playerInfo.playInfo.channelId);s&&(s.language===Ui.PREF_NONE?n=!0:(e=r.find(a=>a.representationId===s.id&&this.languageManager.isSameLanguage(a.language,s.language)),n=!!e,n||(e=r.find(a=>this.languageManager.isSameLanguage(a.language,s.language)),n=!!e)))}let o=this.languageManager.preferredTextLanguage1;!n&&o!==Ui.PREF_NONE?(e=r.find(s=>
15this.languageManager.isSameLanguage(s.language,o)),n=!!e):n||(n=!0),o=this.languageManager.preferredTextLanguage2,!n&&o!==Ui.PREF_NONE&&(e=r.find(s=>this.languageManager.isSameLanguage(s.language,o))),this.selectTextTrack(e)}selectTextTrack(e,n=!1){let r=e?e?.language??e?.label:Ui.PREF_NONE;n&&this.playerInfo.playInfo?.channelId&&r&&this.languageManager.storePreferredLanguage({id:e?.representationId,language:r},Js.TEXT,this.playerInfo.playInfo.channelId),this.playerEngine.selectTextTrack(e?.id),this.playerState.textTrackOptions().forEach(o=>{o.active=o.id===e?.id})}disableAudioSelectionForShakaOnSafari(){return this.environment.playerEngine===uo.SHAKA&&this.browserManager.browserConfig.isApple}static{this.\u0275fac=function(n){return new(n||t)(h(Be),h(nn),h(O),h(Dn),h(ae),h(fy),h(yu))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var qI=(()=>{class t{constructor(e){this.viewContainerRef=e}static{this.\u0275fac=function(n){return new(n||t)(f(Bo))}}static{this.\u0275dir=Bt({type:t,selectors:[["","appAtvDialogContent",""]]})}}return t})();function Lz(t,i){if(t&1){let e=B();m(0,"app-close-button",6),A("click",function(){k(e);let r=_();return L(r.close())}),g()}}function Fz(t,i){}var Ak=(()=>{class t{constructor(e,n,r){this.dialogRef=e,this.config=n,this.cd=r}close(){this.dialogRef.close(Zs.cancel())}maskClicked(e){this.config.dismissableMask&&!e.defaultPrevented&&this.close()}ngAfterViewInit(){this.childComponentType&&(this.loadChildComponent(this.childComponentType),this.cd.detectChanges())}loadChildComponent(e){let n=this.insertionPoint.viewContainerRef;n.clear(),this.componentRef=n.createComponent(e)}static{this.\u0275fac=function(n){return new(n||t)(f(go),f(Zo),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-atv-dialog"]],viewQuery:function(n,r){if(n&1&&Ve(qI,5),n&2){let o;be(o=Ce())&&(r.insertionPoint=o.first)}},decls:8,vars:4,consts:[[1,"dialog-mask",3,"click"],[1,"dialog-container",3,"click"],[1,"dialog-header"],[1,"dialog-header-title","font-title-2"],[1,"dialog-content"],["appAtvDialogContent",""],[3,"click"]],template:function(n,r){n&1&&(m(0,"div",0),A("click",function(s){return r.maskClicked(s)}),m(1,"div",1),A("click",function(s){return s.preventDefault()}),m(2,"div",2)(3,"div",3),N(4),g(),E(5,Lz,1,0,"app-close-button"),g(),m(6,"div",4),Lg(7,Fz,0,0,"ng-template",5),g()()()),n&2&&(u(4),Q(r.config.header),u(),I(r.config.closable?5:-1),u(),H("header-content-spacing",r.config.closable||!!r.config.header))},dependencies:[rl,qI],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.dialog-mask[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:20;background:#030d2be0}.dialog-container[_ngcontent-%COMP%]{padding:1.75rem;background-color:#000b1c;border-radius:.875rem}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.header-content-spacing[_ngcontent-%COMP%]{margin-top:1rem}"]})}}return t})();var Eu=(()=>{class t{constructor(e){this.appRef=e}open(e,n){let r=this.createDialogComponent(n);return this.dialogComponentRef&&(this.dialogComponentRef.instance.childComponentType=e),r}createDialogComponent(e){let n=new go,r=n.onClose.subscribe(()=>{this.removeDialogComponentFromBody(n),r.unsubscribe()}),o=Ut.create({providers:[{provide:Zo,useValue:e},{provide:go,useValue:n}]});this.dialogComponentRef=sd(Ak,{environmentInjector:this.appRef.injector,elementInjector:o}),this.appRef.attachView(this.dialogComponentRef.hostView);let s=this.dialogComponentRef.hostView.rootNodes[0];return document.body.appendChild(s),n}removeDialogComponentFromBody(e){!e||!this.dialogComponentRef||(this.dialogComponentRef?.destroy(),this.dialogComponentRef=void 0)}static{this.\u0275fac=function(n){return new(n||t)(h(si))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Rk=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T,W,j,ee,De,tt){this.streamManager=e,this.eventManager=n,this.engine=r,this.info=o,this.environment=s,this.session=a,this.config=l,this.state=c,this.liveManager=d,this.trackManager=p,this.unload=y,this.logManager=b,this.messages=T,this.bookmarkManager=W,this.browserManager=j,this.dialog=ee,this.autoplayManager=De,this.adsManager=tt,this.engineLoaded=!1,this.handlePlayerEvent=Se=>{switch(!0){case Se instanceof ka:this.handlePlayingEvent(Se);break;case Se instanceof La:this.handlePausedEvent(Se);break;case Se instanceof Cd:this.handleBufferingEvent(Se);break;case Se instanceof wr:this.handleTimeUpdateEvent(Se);break;case Se instanceof Sd:this.trackManager.updateAvailableTracks(Se);break;case Se instanceof Fa:this.handleEndedEvent();break;case Se instanceof Ed:this.handleAirplayEvent(Se);break;case Se instanceof Tr:this.eventManager.error.next(Se.error);break;case Se instanceof Id:this.adsManager.handleAdsAdded(Se);break;case Se instanceof wd:this.adsManager.handleAdBreakEvent(Se)&&this.postRollEnd();break;case Se instanceof Td:this.handleUpdateStartTime();break;default:console.warn("Unknown player event: ",Se.type)}},this.eventManager.error.subscribe({next:Se=>this.handleError(Se)}),this.engine.playerEvents.subscribe({next:Se=>{this.handlePlayerEvent(Se)}}),this.unload.stopPlayerEvent.subscribe({next:()=>{this.info.playInfo&&this.terminate()}}),this.eventManager.continueWatching.subscribe({next:()=>{this.askStillWatching()}})}startPlayer(e,n=!1,r){this.resetForNewAsset(n),this.updateUiAssetData(e),this.streamManager.startStream(e,r).pipe(fe(()=>(this.state.startOffset.set(this.info.streamInfo.bookmarkOffset/1e3),this.streamManager.getManifest())),fe(()=>(this.info.logInfo?.updateStreamInfo(this.info.streamInfo.sid,this.info.manifestInfo.url),this.logManager.logPlayStart(),this.loadEngine())),fe(()=>this.loadPlayer())).subscribe({next:()=>{this.setAllowedControls(e),this.loadStorageValues(),this.browserManager.startSuspendCheckInterval(),this.browserManager.configureMetadata(this.state.assetTitle()),this.handleReady(),console.log("ready to play")},error:o=>this.eventManager.error.next(o)})}stopPlayer(e,n,r){this.stopTimers(),this.browserManager.reset(),this.closeStillWatchingDialog(),this.adsManager.clearBreakVertisement(),this.logManager.logPlayStop(e),this.bookmarkManager.storeBookmark(),this.engine.release().pipe(fe(()=>this.streamManager.deleteStream())).subscribe({next:()=>{this.finalizeStopPlayer(n,r)},error:o=>{this.handleError(o,!0),this.finalizeStopPlayer(n,r)}})}finalizeStopPlayer(e,n=!1){e?this.startPlayer(e):this.checkClosePlayer(n)}closePlayer(e){if(this.adsManager.inPostRoll)return this.postRollEnd();this.stopPlayer(li.USER_INITIATED,void 0,e)}reloadManifest(){let e=this.bookmarkManager.generateBookmark();this.info.playInfo&&(this.info.playInfo.startPosition=e?.position);let n=this.relativeStartPosition();this.streamManager.getManifest().pipe(fe(()=>(this.info.logInfo&&(this.info.logInfo.manifest=this.info.manifestInfo.url),this.adsManager.reset(!0),this.loadPlayer(n)))).subscribe({next:()=>{this.loadStorageValues(),this.handleReady(),console.log("ready to play")},error:r=>this.eventManager.error.next(r)})}terminate(){this.adsManager.inPostRoll||(this.bookmarkManager.stopBookmarkInterval(),this.logManager.logPlayStop(li.USER_INITIATED)),this.streamManager.terminateStream(),this.browserManager.reset()}contentEnd(){this.stopTimers(),this.closeStillWatchingDialog(),this.logManager.logPlayStop(li.FINISHED)}postRollEnd(){this.browserManager.reset(),this.engine.release().pipe(fe(()=>this.streamManager.deleteStream())).subscribe({next:()=>{this.finalizeStopPlayer()},error:e=>{this.handleError(e,!0),this.finalizeStopPlayer()}})}stopTimers(){this.liveManager.stopWatchlistTimeout(),this.bookmarkManager.stopBookmarkInterval(),this.liveManager.stopScheduleEndTimeout(),this.browserManager.stopSuspendCheckInterval()}checkClosePlayer(e){e?this.info.reset():this.state.autoplayDetail.set(this.autoplayManager.autoplayDetail),this.state.visible.set(!1),this.liveManager.clearReloadChannels()}handleError(e,n=!1){if(e.fatal){console.error(e),this.logManager.logPlayError(e);let r=this.config.getTranslation(ge.error_streaming);e.code&&(r=this.config.getTranslation(e.code,ge.error_streaming)),this.messages.showErrorMessage(r),n||this.stopPlayer(li.ERROR)}else console.warn(e),this.logManager.logPlayWarning(e)}loadEngine(){return this.engineLoaded?C(void 0):this.engine.loadLib().pipe(we(()=>{this.engineLoaded=!0}))}loadPlayer(e){let n={sources:[{manifest:Xv(this.info.manifestInfo.url),streamType:this.info.playInfo?.streamType}],startPosition:this.loadStartPosition(),initialBitrate:this.getInitialBitrate(),broadpeakConfig:this.getBroadpeakConfig(),drmConfig:this.prepDrmConfig(),vast:this.getVastConfig(e)};return this.engine.load(n)}updateUiAssetData(e){this.info.playInfo=e,this.state.assetTitle.set(e.title),this.state.assetSubt
15itleParts.set(e.subTitleParts),this.state.playback.set(Ei.IDLE),this.state.isLive.set(e.streamType===q.LINEAR),this.liveManager.loadLiveDataForAsset()}loadStorageValues(){let e=sk(Te.player_muted)??!1,n=rk(Te.player_volume)??1;this.engine.muted=e,this.state.muted.set(e),this.engine.volume=n,this.state.volume.set(n)}setAllowedControls(e){let n=e.streamType!==q.LINEAR||this.liveManager.liveToReplayAllowed();this.state.canPause.set(n),this.state.canSeek.set(n),this.state.canJump.set(e.streamType!==q.LINEAR),this.state.canAirplay.set(this.engine.canAirplay)}prepDrmConfig(){if(this.info.manifestInfo.drm)return{assetId:this.info.manifestInfo.assetId,userId:this.info.manifestInfo.drmUserId??this.session.customerId,sessionId:this.info.manifestInfo.drmSessionId,merchant:this.environment.drmMerchant,environment:this.environment.drmStaging?"DRMtoday_STAGING":"DRMtoday",authToken:this.info.manifestInfo.drmAuthToken,keySystem:this.browserManager.browserConfig.encryption}}getInitialBitrate(){return screen.height>2e3?this.config.getSettingNumber(x.playerInitialBitrate4K,3e6):this.config.getSettingNumber(x.playerInitialBitrate,3e6)}getBroadpeakConfig(){if(this.config.getSettingBoolean(x.broadpeakAnalyticsEnabled,!1))return{analyticsDomain:this.config.getSettingString(x.broadpeakAnalyticsDomain,""),analyticsServer:this.config.getSettingString(x.broadpeakAnalyticsServer,"")}}getVastConfig(e){if(this.info.streamInfo.vastUrl)return{url:this.info.streamInfo.vastUrl,playAdsFrom:e!==void 0?Math.max(e,1):void 0}}handlePlayingEvent(e){if(this.info.streamInfo.setPlayingStatus(),e.isAd)this.adsManager.handleAdPlayingEvent();else{if(this.streamManager.reloadManifestRequired){this.reloadManifest();return}this.info.contentStarted||this.seekToLiveEdge(),this.info.contentStarted=!0,this.state.playback.set(Ei.PLAYING),this.logManager.logPlayState(!0),this.bookmarkManager.startBookmarkInterval(),this.liveManager.startWatchlistTimeout(),this.browserManager.updateState("playing"),this.adsManager.clearBreakVertisement(),this.streamManager.stopReloadManifestTimeout(),this.delayedSeek!==void 0&&(this.engine.seekAbsolute(this.delayedSeek),this.delayedSeek=void 0)}}handlePausedEvent(e){this.info.streamInfo.setPausedStatus(),e.isAd?this.adsManager.handleAdPausedEvent():(this.state.playback.set(Ei.PAUSED),this.logManager.logPlayState(!1),this.stopTimers(),this.bookmarkManager.storeBookmark(),this.browserManager.updateState("paused"),this.adsManager.startBreakTimeout(),this.streamManager.startReloadManifestTimeout())}handleBufferingEvent(e){this.state.buffering.set(e.isBuffering)}handleTimeUpdateEvent(e){let n=this.info.playInfo,r=this.info.streamInfo.bookmarkOffset/1e3;if(this.engine.isLive&&n)this.updateLivePlayerTimes(n,e.position,r);else{let o=e.position-r,s=e.duration-r,a=e.position/e.duration,l=e.duration;this.updatePlayerTimes(o,s,a,l)}}updateLivePlayerTimes(e,n,r){let o,s,a,l;if(e.streamType===q.LINEAR&&!e.scheduleId)o=0,s=0,a=1,l=0;else{let c=this.info.streamInfo.event,d,p;c?(d=c.start.getTime()/1e3,p=c.end.getTime()/1e3,o=n-(d+r),l=p-d,s=l-r):(d=e.startTime?e.startTime/1e3:0,p=e.endTime?e.endTime/1e3:0,o=n-d,s=p-d,l=s),a=d?(n-this.info.absStartSec)/l:100}this.updatePlayerTimes(o,s,a,l),o>s&&this.stopForSchedule(e)}updatePlayerTimes(e,n,r,o){this.state.relPosition.set(e),this.state.relDuration.set(n),this.state.positionPercentage.set(Math.max(r,0)*100),this.state.absDuration.set(o),this.browserManager.updatePlayerTime(e,n),this.checkAutoplay(e,n)}stopForSchedule(e){(e.streamType===q.REPLAY||e.streamType===q.NPVR)&&this.stopPlayer(li.FINISHED)}checkAutoplay(e,n){let r=this.info.playInfo?.startTime,o=this.info.playInfo?.endTime;r&&o&&(n=(o-r)/1e3),this.autoplayManager.checkNextAsset(e/n)}handleEndedEvent(){this.adsManager.hasPostRoll?this.contentEnd():this.stopPlayer(li.FINISHED)}resetForNewAsset(e){this.state.reset(),this.info.reset(),this.adsManager.reset(),this.autoplayManager.reset(),e||this.autoplayManager.resetAutoplayStartTime()}checkLiveToReplay(e){try{let n=this.liveManager.convertToReplay(e*1e3);return n?(this.stopPlayer(li.USER_INITIATED,n),!0):!1}catch(n){return n instanceof vt&&this.eventManager.error.next(n),!1}}handleAirplayEvent(e){this.state.isAirplaying.set(e.isActive);let n=this.info.playInfo;n&&this.streamManager.updateStreamOptions(n).subscribe({error:r=>{throw new vt(r.error?.message??"",ht.PLAYER,!0,r.error?.code,r.error?.errorId)}})}askStillWatching(){let e=zI.config();this.stillWatchingRef=this.dialog.open(zI,e);let n=this.stillWatchingRef.onClose.subscribe(r=>{this.stillWatchingRef=void 0,r&&(r.isSuccess?this.stopPlayer(li.RESTART,this.info.playInfo):r.isError&&this.stopPlayer(li.NO_INTERACTION)),n.unsubscribe()})}closeStillWatchingDialog(){this.stillWatchingRef?.close(Zs.cancel())}seekToLiveEdge(){if(this.info.playInfo?.streamType===q.LINEAR){let e=this.engine.seekRange;e.end&&this.engine.seekAbsolute(e.end)}}handleReady(){if(this.streamManager.startReloadManifestTimeout(),this.info.playInfo?.streamType===q.LINEAR||this.loadStartPosition()!==void 0){this.tryAutoplay();return}this.delayedSeek=this.calculateUpdatedStartTime(),this.tryAutoplay()}calculateUpdatedStartTime(){if(this.info.playInfo?.streamType===q.LINEAR||this.loadStartPosition()!==void 0)return;let e=this.relativeStartPosition(),n=this.engine.seekRange,r=n.start+e;if(r>n.end-20&&(r=n.end-20),r===0)return;let o=this.streamEventDiff();return r+o}handleUpdateStartTime(){let e=this.calculateUpdatedStartTime();e!==void 0&&this.engine.updateStartTime(e)}loadStartPosition(){let e=this.info.streamInfo.event;if(!(this.info.playInfo?.streamType===q.LINEAR||e&&e.end.getTime()>Date.now()))return this.relativeStartPosition()}streamEventDiff(){let e=0;if(this.info.streamInfo.event?.start!==void 0){let n=this.engine.seekRange;n.start>0?e=this.info.streamInfo.event?.start.getTime()/1e3-n.start-this.engine.presentationStartTime:this.engine.presentationStartTime>0&&(e=this.info.streamInfo.event?.start.getTime()/1e3-this.engine.presentationStartTime)}return e}relativeStartPosition(){return this.info.playInfo?.startPosition?(this.info.playInfo.startPosition+this.info.streamInfo.bookmarkOffset)/1e3:this.info.streamInfo.bookmarkOffset/1e3}tryAutoplay(){this.state.playback.set(Ei.PAUSED),this.logManager.logPlayState(!1),this.browserManager.updateState("paused"),this.engine.play().subscribe({next:()=>{console.log("autoplay successful")},error:e=>{console.log("failed to autoplay:",e)}})}static{this.\u0275fac=function(n){return new(n||t)(h(bu),h(ay),h(Dn),h(nn),h(ae),h(ne),h(O),h(Be),h(py),h(hy),h(Kd),h(Vr),h(_e),h(ly),h(yu),h(Eu),h(il),h(uy))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var yt=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T){this.appRef=e,this.state=n,this.logic=r,this.engine=o,this.info=s,this.trackManager=a,this.liveManager=l,this.config=c,this.logManager=d,this.adultService=p,this.messages=y,this.streamManager=b,this.htmlMeta=T,this.hideControlsTime=this.config.getSettingNumber(x.playerHideControlsPeriod,5*1e3),this.zapRateLimit=this.config.getSettingNumber(x.playerZapChannelRateLimit,1e3),this.addBrowserActionHandlers(),this.seekThumbnailsEnabled=this.config.getSettingBoolean(x.seekThumbnailsEnabled,!1),this.backButtonListener(),bn(()=>{this.state.visible()&&!this.state.pipMode()?this.state.assetTitle()?this.htmlMeta.updateTitleForPlayer(this.state.assetTitle()):this.state.assetSubt
15itleParts().length>0?this.htmlMeta.updateTitleForPlayer(this.state.assetSubtitleParts()[0]):this.htmlMeta.updateTitleForPlayer(""):this.htmlMeta.reloadLastTitle()})}backButtonListener(){window.onpopstate=()=>{this.state.visible()&&!this.state.pipMode()&&(this.close(),history.go(1))}}startAsset(e,n=!1,r){this.state.visible()||this.openPlayerPage(),this.logic.startPlayer(e,n,r),this.showControls()}get currentPlayInfo(){return this.info.playInfo}createReservedRequest(e){return C(this.streamManager.newStreamRequest(e))}get playerOverlayVisible(){return this.state.visible()&&!this.state.pipMode()}openPlayerPage(){if(!this.pageRef){this.pageRef=sd(Ik,{environmentInjector:this.appRef.injector}),this.appRef.attachView(this.pageRef.hostView),this.pageRef.changeDetectorRef.detectChanges();let e=this.pageRef.hostView.rootNodes[0];document.body.appendChild(e)}this.state.visible.set(!0),this.logManager.logPageOpen()}close(e=!1){this.info.playInfo&&this.logic.closePlayer(e)}setPipMode(e){this.state.pipMode.set(e),e?this.hideControls():this.showControls()}showControls(){this.state.pipMode()||(this.state.adBreak()?this.state.showAdControls.set(!0):this.state.showContentControls.set(!0),this.startHideControlsTimeout())}hideControls(){this.clearHideControlsTimeout(),this.state.showContentControls.set(!1),this.state.showAdControls.set(!1),this.state.zapbarOpen.set(!1),this.info.playInfo?.streamType===q.LINEAR&&this.liveManager.navigateToCurrentSchedule()}lockControls(){this.clearHideControlsTimeout(),this.state.showContentControls.set(!0)}startHideControlsTimeout(){this.clearHideControlsTimeout(),this.hideControlsTimeout=setTimeout(()=>{this.hideControlsTimeout=void 0,this.hideControls()},this.hideControlsTime)}clearHideControlsTimeout(){this.hideControlsTimeout&&(clearTimeout(this.hideControlsTimeout),this.hideControlsTimeout=void 0)}toggleFullscreen(){this.state.fullscreen.set(!this.state.fullscreen())}play(){this.state.adBreak()?this.engine.playAd():(this.state.playback()!==Ei.PAUSED||!this.info.contentStarted||!this.logic.checkLiveToReplay(this.state.relPosition()))&&this.engine.play()}pause(){this.state.adBreak()?this.engine.pauseAd():this.state.canPause()&&this.engine.pause()}togglePlayPause(){this.state.isLive()||this.state.adBreak()||(this.showControls(),this.state.playback()===Ei.PAUSED?this.play():this.pause())}seekRelative(e){if(this.state.canJump()){let n=this.seekInRange(this.engine.position+e);this.engineSeek(n)}}seekAbsolute(e){this.state.canSeek()&&(this.logic.checkLiveToReplay(e)||(e=this.correctedPlayerTime(e),e=this.seekInRange(e),this.engineSeek(e)))}correctedPlayerTime(e){let n=this.engine.seekRange;return this.engine.isLive&&n.start>0&&(e=n.start+e),e+=this.logic.streamEventDiff(),e}seekInRange(e){let n=this.engine.seekRange;return e=n.start>e?n.start:e,e=n.end<e?n.end:e,e}engineSeek(e){this.engine.seekAbsolute(e)}adjustVolume(e){this.engine.volume=e,this.state.volume.set(e),ik(Te.player_volume,e),this.state.muted()&&this.toggleMuted()}toggleMuted(){let e=!this.state.muted();this.engine.muted=e,this.state.muted.set(e),ok(Te.player_muted,e)}selectVideoTrack(e){this.trackManager.selectVideoTrack(e)}selectAudioTrack(e){this.trackManager.selectAudioTrack(e,!0)}selectTextTrack(e){this.trackManager.selectTextTrack(e,!0)}navigateToSchedule(e){this.liveManager.navigateThroughSchedules(e)}toggleFavoriteChannel(e){this.liveManager.toggleFavoriteChannel(e)}zapToChannel(e){let n=this.lastZap?Date.now()-this.lastZap:this.zapRateLimit,r=n<this.zapRateLimit?this.zapRateLimit-n:0;this.zapSub?.unsubscribe(),this.zapSub=void 0,this.zapSub=C(void 0).pipe(v0(r),fe(()=>(this.lastZap=Date.now(),this.liveManager.zapToChannel(e)))).subscribe({next:o=>{o&&this.checkAdultAndLoad(o),this.zapSub?.unsubscribe(),this.zapSub=void 0},error:o=>{o instanceof vt&&o.code&&this.messages.showErrorMessage(this.config.getTranslation(o.code))}})}checkAdultAndLoad(e){e.isAdult?this.adultService.checkAdultMode({successCallback:()=>{this.logic.stopPlayer(li.USER_INITIATED,e)},errorCallback:()=>{this.messages.showErrorMessage(this.config.getTranslation(pe.detail_adult_warning))}}):this.logic.stopPlayer(li.USER_INITIATED,e)}showAirplaySelect(){this.state.canAirplay()&&this.engine.showAirplaySelect()}addBrowserActionHandlers(){if(!vu())return;navigator.mediaSession.setActionHandler("pause",()=>{this.canDoAction&&this.pause()}),navigator.mediaSession.setActionHandler("play",()=>{this.canDoAction&&this.play()}),navigator.mediaSession.setActionHandler("stop",()=>{this.canDoAction&&this.close()}),navigator.mediaSession.setActionHandler("seekto",({seekTime:r})=>{r&&this.canDoAction&&this.seekAbsolute(r)});let e=this.config.getSettingNumber(x.playerFastForwardVod,1e4)/1e3;navigator.mediaSession.setActionHandler("seekforward",({seekOffset:r})=>{this.canDoAction&&this.seekRelative(r??e)});let n=this.config.getSettingNumber(x.playerRewindVod,1e4)/1e3;navigator.mediaSession.setActionHandler("seekbackward",({seekOffset:r})=>{this.canDoAction&&this.seekRelative(-(r??n))})}get canDoAction(){return!!this.info.playInfo}loadThumbnail(e){if(e=e!==void 0?this.correctedPlayerTime(e):void 0,!this.seekThumbnailsEnabled||!e||e>this.engine.seekRange.end){this.state.thumbnailUrl.set("");return}
15this.clearThumbnailSub(),this.thumbnailSub=this.engine.loadThumbnail(e).subscribe({next:n=>{this.state.thumbnailUrl.set(n),this.clearThumbnailSub()},error:n=>{console.warn("Failed to load thumbnail for time",e,n)}})}clearThumbnailSub(){this.thumbnailSub?.unsubscribe(),this.thumbnailSub=void 0}static{this.\u0275fac=function(n){return new(n||t)(h(si),h(Be),h(Rk),h(Dn),h(nn),h(hy),h(py),h(O),h(Vr),h($e),h(_e),h(bu),h(un))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Uz=["seekbar"],Bz=["targetToolTip"],xk=t=>({width:t}),jz=t=>({left:t});function Hz(t,i){if(t&1&&M(0,"div",4),t&2){let e=_();S("ngStyle",br(1,xk,e.seekTargetPercent()+"%"))}}var Mk=(()=>{class t{constructor(e){this.chromecastManager=e,this.seekTargetPercent=V(0),this.targetTooltipOffset=V(""),this.targetTooltipLabel=V(""),this.positionPercentage=Xe(()=>this.chromecastManager.position()/this.chromecastManager.duration()*100),this.seekTargetSec=-1}ngAfterViewInit(){let e=this.seekbar.nativeElement;this.handleTargetPosition(e),this.handleMouseLeave(e),this.handleSeekTo(e)}handleTargetPosition(e){let n=Gt(e,"mousemove").pipe(P(o=>o.clientX)),r=Yr(Gt(e,"touchstart"),Gt(e,"touchmove")).pipe(we(o=>{o.stopPropagation()}),ke(o=>o?.touches?.length>0),P(o=>o.touches.item(0)?.clientX??0));this.updateUserPositionSubscription=Yr(n,r).pipe(ur(),P(o=>{let s=e.getBoundingClientRect();return(o-(s.x??s.left))/s.width*100})).subscribe(o=>{this.seekTargetPercent.set(o),this.targetTooltipOffset.set(`calc(${o}% - ${this.tToolTip.nativeElement.clientWidth/2}px`),this.seekTargetSec=o/100*this.chromecastManager.duration(),this.targetTooltipLabel.set($.secondsToHHMMSS(this.seekTargetSec))})}handleMouseLeave(e){this.mouseLeaveSubscription=Gt(e,"mouseleave").subscribe(()=>{this.resetSeekTarget()})}resetSeekTarget(){this.seekTargetPercent.set(0),this.targetTooltipOffset.set(""),this.targetTooltipLabel.set(""),this.seekTargetSec=-1}handleSeekTo(e){this.finishedSeekingSubscription=Yr(Gt(e,"click"),Gt(e,"touchend")).pipe(we(n=>n.preventDefault())).subscribe(n=>{this.chromecastManager.seekTo(this.seekTargetSec),n.pointerType!=="mouse"&&this.resetSeekTarget()})}ngOnDestroy(){this.updateUserPositionSubscription?.unsubscribe(),this.mouseLeaveSubscription?.unsubscribe(),this.finishedSeekingSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(Cu))}}static{this.\u0275cmp=D({type:t,selectors:[["app-cast-overlay-seekbar"]],viewQuery:function(n,r){if(n&1&&Ve(Uz,5)(Bz,5),n&2){let o;be(o=Ce())&&(r.seekbar=o.first),be(o=Ce())&&(r.tToolTip=o.first)}},decls:8,vars:10,consts:[["seekbar",""],["targetToolTip",""],[1,"seekbar-container","clickable"],[1,"seekbar"],[1,"seekbar-target",3,"ngStyle"],[1,"seekbar-playhead",3,"ngStyle"],[1,"target-tooltip","font-highlighted-label",3,"ngStyle"]],template:function(n,r){n&1&&(m(0,"div",2,0)(2,"div",3),E(3,Hz,1,3,"div",4),M(4,"div",5),g(),m(5,"div",6,1),N(7),g()()),n&2&&(u(3),I(r.seekTargetPercent()>0?3:-1),u(),S("ngStyle",br(6,xk,r.positionPercentage()+"%")),u(),H("hidden",!r.targetTooltipOffset()),S("ngStyle",br(8,jz,r.targetTooltipOffset())),u(2),ce(" ",r.targetTooltipLabel()," "))},dependencies:[Us],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.seekbar-container[_ngcontent-%COMP%]{position:relative;width:100%}.seekbar[_ngcontent-%COMP%]{position:relative;width:100%;border-radius:.31rem;background-color:#fff;height:.58rem;overflow:hidden}.seekbar-target[_ngcontent-%COMP%]{position:absolute;background-color:#ca7ef180;height:100%}.target-tooltip[_ngcontent-%COMP%]{position:absolute;padding:.39rem;top:-2rem;background-color:#ca7ef1;color:#000}.seekbar-playhead[_ngcontent-%COMP%]{position:absolute;background-color:#ca7ef1;height:100%}"]})}}return t})();function $z(t,i){if(t&1&&M(0,"img",4),t&2){let e=_(2);S("src",e.chromecastManager.assetImage(),Je)}}function Gz(t,i){if(t&1&&(m(0,"span",8),N(1),g()),t&2){let e=_(2);u(),ce(" ",e.liveLabel()," ")}}function Wz(t,i){if(t&1){let e=B();m(0,"div",18),A("click",function(r){k(e);let o=_(2);return L(o.seekRelative(r,!1))}),M(1,"img",19),m(2,"span",20),N(3),g()()}if(t&2){let e=_(2);u(3),ce(" ",e.rewindLabel()," ")}}function zz(t,i){t&1&&M(0,"app-loading-indicator",13)}function qz(t,i){if(t&1){let e=B();m(0,"img",21),A("click",function(r){k(e);let o=_(2);return L(o.togglePlayPause(r))}),g()}}function Yz(t,i){if(t&1){let e=B();m(0,"img",22),A("click",function(r){k(e);let o=_(2);return L(o.togglePlayPause(r))}),g()}}function Qz(t,i){if(t&1){let e=B();m(0,"div",18),A("click",function(r){k(e);let o=_(2);return L(o.seekRelative(r,!0))}),M(1,"img",23),m(2,"span",20),N(3),g()()}if(t&2){let e=_(2);u(3),ce(" ",e.forwardLabel()," ")}}function Zz(t,i){if(t&1&&(M(0,"app-cast-overlay-seekbar"),m(1,"span",24),N(2),g()),t&2){let e=_(2);u(2),ce(" ",e.progressTime()," ")}}function Jz(t,i){if(t&1){let e=B();m(0,"div",1),A("click",function(r){k(e);let o=_();return L(o.containerClicked(r))}),m(1,"div",2)(2,"div",3),E(3,$z,1,1,"img",4),m(4,"div",5)(5,"div",6)(6,"span",7),N(7),g(),E(8,Gz,2,1,"span",8),g(),M(9,"app-tag-list",9),g(),m(10,"div",10),E(11,Wz,4,1,"div",11),m(12,"div",12),E(13,zz,1,0,"app-loading-indicator",13),E(14,qz,1,0,"img",14)(15,Yz,1,0,"img",15),g(),E(16,Qz,4,1,"div",11),g(),m(17,"div",16)(18,"app-close-button",17),A("click",function(r){k(e);let o=_();return L(o.stopCasting(r))}),g()()(),E(19,Zz,3,1),g()()}if(t&2){let e=_();u(3),I(e.chromecastManager.assetImage()?3:-1),u(4),Q(e.chromecastManager.assetTitle()),u(),I(e.chromecastManager.showLive()?8:-1),u(),S("tags",e.chromecastManager.assetSubTitle()),u(2),I(e.chromecastManager.canSeek()&&!e.chromecastManager.showLive()?11:-1),u(2),I(e.chromecastManager.buffering()?13:-1),u(),I(!e.chromecastManager.paused()&&!e.chromecastManager.buffering()&&e.chromecastManager.canPause()?14:e.chromecastManager.paused()&&!e.chromecastManager.buffering()?15:-1),u(2),I(e.chromecastManager.canSeek()&&!e.chromecastManager.showLive()?16:-1),u(3),I(e.chromecastManager.showLive()?-1:19)}}var Pk=(()=>{class t{constructor(e,n,r){this.chromecastManager=e,this.config=n,this.cdr=r,this.liveLabel=V(""),this.progressTime=Xe(()=>`${$.secondsToHHMMSS(this.chromecastManager.position())} / ${$.secondsToHHMMSS(this.chromecastManager.duration())}`),this.rewindLabel=V(""),this.forwardLabel=V(""),this.liveLabel.set(this.config.getTranslation(Mt.live_indicator_text)),bn(()=>{(this.chromecastManager.paused()||this.chromecastManager.buffering()||this.chromecastManager.position())&&this.cdr.detectChanges()}
15),this.rewindSeconds=n.getSettingNumber(x.playerRewindVod,1e4)/1e3,this.forwardSeconds=n.getSettingNumber(x.playerFastForwardVod,1e4)/1e3,this.rewindLabel.set(`-${this.getSeekLabel(this.rewindSeconds)}`),this.forwardLabel.set(`+${this.getSeekLabel(this.forwardSeconds)}`)}containerClicked(e){e.stopPropagation()}togglePlayPause(e){e.stopPropagation(),this.chromecastManager.togglePlayPause()}stopCasting(e){e.stopPropagation(),this.chromecastManager.stopCasting()}getSeekLabel(e){let n=Math.floor(e/60),r=e%60;return n===0?this.config.getTranslation(Mt.player_controls_skip_button_seconds).replace("$1",r.toString()):r==0?this.config.getTranslation(Mt.player_controls_skip_button_minutes).replace("$1",n.toString()):this.config.getTranslation(Mt.player_controls_skip_button_minutes_and_seconds).replace("$1",n.toString()).replace("$2",r.toString())}seekRelative(e,n){e.stopPropagation(),n?this.chromecastManager.seekRelative(this.forwardSeconds):this.chromecastManager.seekRelative(-this.rewindSeconds)}static{this.\u0275fac=function(n){return new(n||t)(f(Cu),f(O),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-cast-overlay"]],decls:1,vars:1,consts:[[1,"chromecast-controller-wrapper"],[1,"chromecast-controller-wrapper",3,"click"],[1,"chromecast-controller"],[1,"chromecast-controller-top"],[1,"chromecast-controller-thumbnail",3,"src"],[1,"chromecast-controller-left"],[1,"chromecast-controller-title"],[1,"font-title-2"],[1,"player-controls-live","font-large-label"],[1,"font-highlighted-label",3,"tags"],[1,"center-buttons"],[1,"seek-button"],[1,"center-button"],[1,"spinner"],["src","./assets/theme/svg/seekbar_pause_normal.svg",1,"pause"],["src","./assets/theme/svg/seekbar_play_normal.svg",1,"play"],[1,"chromecast-controller-right"],[3,"click"],[1,"seek-button",3,"click"],["src","./assets/theme/svg/seek_backward.svg"],[1,"font-label"],["src","./assets/theme/svg/seekbar_pause_normal.svg",1,"pause",3,"click"],["src","./assets/theme/svg/seekbar_play_normal.svg",1,"play",3,"click"],["src","./assets/theme/svg/seek_forward.svg"],[1,"time-container","font-highlighted-label"]],template:function(n,r){n&1&&E(0,Jz,20,9,"div",0),n&2&&I(r.chromecastManager.visible()?0:-1)},dependencies:[rl,mu,Su,Mk],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.chromecast-controller-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;position:fixed;bottom:0;left:0;right:0;z-index:20;padding:0 1rem;margin-left:9rem;margin-bottom:1rem}.chromecast-controller[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:.625rem;padding:1rem;border-radius:.675rem;width:100%;max-width:75rem;background-image:linear-gradient(to right,#030d2b,#030d2b),linear-gradient(to right,#0006,#0006);background-blend-mode:overlay}.chromecast-controller-top[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;column-gap:.75rem}.chromecast-controller-left[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;margin-right:auto;min-width:0;row-gap:.125rem}.chromecast-controller-right[_ngcontent-%COMP%]{margin-left:auto;justify-self:flex-start;flex-shrink:0}.chromecast-controller-thumbnail[_ngcontent-%COMP%]{max-height:3rem}.chromecast-controller-title[_ngcontent-%COMP%]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.player-controls-live[_ngcontent-%COMP%]{margin-left:.5rem}app-close-button[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.center-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;column-gap:2.75rem}.center-button[_ngcontent-%COMP%]{width:2.25rem;height:2.25rem;position:relative}.spinner[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.play[_ngcontent-%COMP%], .pause[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;cursor:pointer}.seek-button[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;cursor:pointer}.seek-button[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:1.5625rem;height:1.325rem}.seek-button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-top:.14rem}"],changeDetection:0})}}return t})();var ds=(()=>{class t{constructor(e,n,r,o){this.injector=e,this.streamingApi=n,this.session=r,this.appRef=o,this.castAvailable=V(!1),this.castConnectionChange=new Y;let a=this.injector.get(O).getSettingBoolean(x.chromeCastEnabled,!1),l=this.injector.get(ae).chromecastReceiverAppId;if(a&&l){window.__onGCastApiAvailable=d=>{d&&this.initializeCastApi(l)};let c=document.createElement("script");
15c.src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",document.head.appendChild(c)}}get controller(){return this._controller||(this._controller=this.injector.get(yt)),this._controller}get playerOverlayVisible(){return this.controller.playerOverlayVisible}startAsset(e){let n=this.reservedInfo&&this.reservedInfo.playInfo.assetId===e.assetId?this.reservedInfo.stream:void 0;this.reservedInfo=n?void 0:this.reservedInfo,this.chromecastManager?.isConnected?this.chromecastManager.startAsset(e):this.controller.startAsset(e,!1,n)}close(){this.controller.close()}get isAvailable(){return!!this._controller}get castConnected(){return!!this.chromecastManager&&this.chromecastManager.isConnected}initializeCastApi(e){cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:e,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),this.castAvailable.set(!0);let n=new cast.framework.RemotePlayer,r=new cast.framework.RemotePlayerController(n);r.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,(
15)=>{this.chromecastManager||(this.chromecastManager=this.injector.get(Cu),this.chromecastManager.configureRemotes(n,r)),this.castOverlayRef||this.createCastOverlayComponent(),this.castConnectionChange.emit(this.chromecastManager.isConnected);let o=this.controller.currentPlayInfo;o&&(this.controller.close(!0),this.chromecastManager.startAsset(o,void 0,o.streamType!==q.LINEAR))})}reserveStream(e){return this.deleteReservedStream(),this.newStreamRequest(e).pipe(fe(n=>this.streamingApi.startStream(n)),P(n=>{this.reservedInfo={stream:n,playInfo:e}}),z(n=>{throw new vt(n.error?.message??"",ht.START_STREAM,!0,n.error?.code,n.error?.errorId)}))}commitReservedStream(e){let n=this.reservedInfo?.stream.asset?.mid;if(!this.reservedInfo||!n)throw new Error("no reserved stream");return this.streamingApi.commitReservedStream(this.reservedInfo.stream.sid,n,e)}deleteReservedStream(){this.reservedInfo&&(this.streamingApi.deleteStream(this.reservedInfo.stream.sid).subscribe({error:e=>{console.warn("Could not delete reserved stream",e)}}),this.reservedInfo=void 0)}playDeviceId(){return!this.castConnected||!this.chromecastManager?C(this.session.deviceId):this.chromecastManager.loadCastDeviceId().pipe(P(e=>e??this.session.deviceId),z(()=>C(this.session.deviceId)))}newStreamRequest(e){return this.chromecastManager?.isConnected?this.chromecastManager.createReserveRequest(e):this.controller.createReservedRequest(e)}createCastOverlayComponent(){this.castOverlayRef=sd(Pk,{environmentInjector:this.appRef.injector}),this.appRef.attachView(this.castOverlayRef.hostView);let e=this.castOverlayRef.hostView.rootNodes[0];document.body.appendChild(e)}static{this.\u0275fac=function(n){return new(n||t)(h(Ut),h(Lr),h(ne),h(si))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Xz(t,i){if(t&1){let e=B();m(0,"app-rent-options",2),A("submitDiscount",function(r){k(e);let o=_();return L(o.submitDiscount(r))})("deselectOption",function(){k(e);let r=_();return L(r.deselectOption())})("commit",function(r){k(e);let o=_();return L(o.commitPurchase(r))}),g()}if(t&2){let e=_();S("options",e.options)("selectOption",e.selectOption)}}var Ok=(()=>{class t extends gt{constructor(e,n,r,o,s,a,l){super(),this.config=e,this.purchaseCache=n,this.pricingApi=r,this.sessionService=o,this.player=s,this.messagesService=a,this.log=l,this.label="",this.selectOption=c=>this.loader.reserveOption?this.loader.reserveOption(c.itemId).pipe(z(d=>(this.messagesService.showErrorMessage(this.config.getTranslation(d?.error.code??void 0,ge.error_general)),C(!1)))):C(!0),this.label=e.getTranslation(pe.detail_btn_rent_now)}hideDropdown(){this.options=void 0,this.showDropdown.set(!1),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0),this.pendingQuote&&(this.pricingApi.cancelPurchase(this.pendingQuote.purchaseId).subscribe(),this.deselectOption())}showOptions(){this.options?this.hideDropdown():this.loader&&(this.log.pageView(new Qt({pageURL:Zt.vod_detail,pageTitle:"Select stream",pageLocale:this.config.getLocale()})),this.purchaseCache.getPurchases().pipe(z(()=>(this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_general)),C([])))).subscribe(e=>{if(!this.loader.updateAndCheckRentable(e)){this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_no_rentoptions));return}this.player.playDeviceId().subscribe(n=>{this.loader.createQuote(this.sessionService.catalogId,n).pipe(z(()=>C(void 0))).subscribe(r=>{if(!r){this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_no_rentoptions));return}this.updatePendingQuote(r)})})}))}submitDiscount(e){this.pricingApi.updatePurchase(this.pendingQuote.purchaseId,e).pipe(z(n=>(this.messagesService.showErrorMessage(this.config.getTranslation(n?.error.code??void 0,ge.PRICING_COUPON_NOT_FOUND)),C(void 0)))).subscribe(n=>{n&&this.updatePendingQuote(n)})}deselectOption(){this.loader.unreserveOption&&this.loader.unreserveOption()}commitPurchase(e){this.pricingApi.commitPurchase(this.pendingQuote.purchaseId,e).pipe(fe(n=>this.loader.reserveOption?this.player.commitReservedStream(n.purchaseId).pipe(P(()=>n)):C(n)),z(n=>(this.messagesService.showErrorMessage(this.config.getTranslation(n?.error.code??void 0,ge.AA_INVALID_PINCODE)),C(void 0)))).subscribe(n=>{n&&(this.purchaseCache.addPurchase(n),this.pendingQuote=void 0,this.hideDropdown(),this.loader.successCallback(n,e.itemId))})}updatePendingQuote(e){this.pendingQuote=e,this.options=this.loader.getRentOptions(e),this.openDropdown();
15let n=Math.max($.timeStringToMs(e.validUntil)-new Date().getTime(),0);this.closeTimeout=setTimeout(()=>{this.hideDropdown()},n)}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(es),f(iu),f(ne),f(ds),f(_e),f(ct))}}static{this.\u0275cmp=D({type:t,selectors:[["app-rent-button"]],inputs:{loader:"loader"},features:[Ee],decls:2,vars:3,consts:[[3,"click","label","active"],[3,"options","selectOption"],[3,"submitDiscount","deselectOption","commit","options","selectOption"]],template:function(n,r){n&1&&(m(0,"app-text-button",0),A("click",function(){return r.showOptions()}),g(),E(1,Xz,1,2,"app-rent-options",1)),n&2&&(S("label",r.label)("active",!!r.options),u(),I(r.showDropdown()?1:-1))},dependencies:[Ke,G1],encapsulation:2})}}return t})();var my=(()=>{class t{constructor(e,n,r,o,s,a,l,c){this.config=e,this.api=n,this.stbCache=r,this.channelCache=o,this.historyApi=s,this.sessionService=a,this.messagesService=l,this.log=c}getAvailableDevices(e){let n=this.sessionService.stbList;if(n.hasNpvrBox()&&e.hasOttRight(q.NPVR))return n.getNpvrStb()}loadRecordingCustomerSettings(e,n,r,o){let s={episodes:this.historyApi.getSettingForDevice(e,St.recording_episodes).pipe(z(()=>C(void 0))),beginBuffer:this.historyApi.getSettingForDevice(e,St.recording_before_time).pipe(z(()=>C(void 0))),endBuffer:this.historyApi.getSettingForDevice(e,St.recording_after_time).pipe(z(()=>C(void 0))),deleteProtected:this.historyApi.getSettingForDevice(e,St.recording_delete_protection).pipe(z(()=>C(void 0)))};return We(s).pipe(P(a=>{let l=this.validateBufferTime(a.beginBuffer,St.recording_before_time,x.recordingDefaultBeforeTime,x.recordingBeforeTimes,e),c=this.validateBufferTime(a.endBuffer,St.recording_after_time,x.recordingDefaultAfterTime,x.recordingAfterTimes,e),d;a.episodes?(d=a.episodes?.value,(d===Le.SERIES&&!r&&!n||d===Le.SEASON&&!o&&!n)&&(d=Le.EPISODE),Object.values(Le).includes(d)||(d=Le.EPISODE)):d=Le.EPISODE;let p=a.deleteProtected?.value??this.config.getSettingString(x.recordingDefaultDeleteProtection,"OFF");return{deviceId:e,type:d,beginBuffer:l,endBuffer:c,deleteProtected:p!=="OFF"}}))}getSubscriptionSettings(e){let n=e instanceof hc?Le.EPISODE:e instanceof fc?Le.SEASON:Le.SERIES;return{deviceId:e.device,type:n,beginBuffer:e.beginBuffer,endBuffer:e.endBuffer,deleteProtected:e.deleteProtected}}getRecordingSettings(e){return{deviceId:void 0,type:void 0,beginBuffer:void 0,endBuffer:void 0,deleteProtected:e.deleteProtected}}getCancelOptions(e){let n=[Le.EPISODE];return e.seasonSubscription&&n.push(Le.SEASON),e.seriesSubscription&&(n.push(Le.
15SEASON),n.push(Le.SERIES)),n}createSubscription(e,n){let r={beginBuffer:e.beginBuffer,endBuffer:e.endBuffer,deleteProtected:e.deleteProtected},o;e.type===Le.EPISODE?o=this.api.createProgramSubscription(e.deviceId,n.programId,n.channel.id,r):e.type===Le.SEASON?o=this.api.createSeasonSubscription(e.deviceId,n.season.seasonId,n.channel.id,r):e.type===Le.SERIES&&(o=this.api.createSeriesSubscription(e.deviceId,n.series.seriesId,n.channel.id,r));let s=new Ua(e,n,void 0,this.sessionService.stbList.getNpvrStb());o.pipe(z(a=>{throw this.log.recPlanned(s,new Yn(a)),this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_recording_start_failed)),a})).subscribe(()=>{this.log.recPlanned(s,void 0),this.stbCache.clearCacheForDevice(e.deviceId),this.stbCache.stbRecordingChange.emit()})}updateSubscription(e,n,r){let o=e.device;e.device=n.deviceId,e.beginBuffer=n.beginBuffer,e.endBuffer=n.endBuffer,e.deleteProtected=n.deleteProtected;let s;n.type===Le.EPISODE?s=this.api.editProgramSubscription(o,e):n.type===Le.SEASON?s=this.api.editSeasonSubscription(o,e):n.type===Le.SERIES&&(s=this.api.editSeriesSubscription(o,e)),r.subscriptionId=e.identifier,r.recordingId=void 0,s?.pipe(z(a=>{throw this.log.recChanged(r,new Yn(a)),this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_recording_edit_failed)),a})).subscribe(()=>{this.log.recChanged(r,void 0),this.stbCache.clearCacheForDevice(o),this.stbCache.clearCacheForDevice(n.deviceId),this.stbCache.stbRecordingChange.emit()})}cancelSubscription(e,n,r){let o=new Ua(void 0,r,n,this.sessionService.stbList.getNpvrStb()),s=[];return n.isInProgress()&&s.push(this.api.deleteRecording(n).pipe(P(()=>{this.log.recRemoved(o,void 0)}),z(a=>{throw this.log.recRemoved(o,new Yn(a)),a}))),e===Le.EPISODE?s.push(this.api.deleteProgramSubscription(n)):e===Le.SEASON?s.push(this.api.deleteSeasonSubscription(n)):e===Le.SERIES&&s.push(this.api.deleteSeriesSubscription(n)),We(s).pipe(z(a=>{throw this.log.recCancel(o,new Yn(a)),this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_recording_cancel_failed)),this.stbCache.clearCacheForDevice(n.device),this.stbCache.stbRecordingChange.emit(),a})).subscribe(()=>{this.log.recCancel(o,void 0),this.stbCache.clearCacheForDevice(n.device),this.stbCache.stbRecordingChange.emit()})}updateRecording(e,n){this.api.editRecording(e).pipe(z(r=>{throw this.log.recChanged(n,new Yn(r)),this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_recording_edit_failed)),r})).subscribe(()=>{this.log.recChanged(n,void 0),this.stbCache.clearCacheForDevice(e.device),this.stbCache.stbRecordingChange.emit()})}deleteRecording(e,n){let r=new Ua(void 0,n,e,this.sessionService.stbList.getNpvrStb());this.api.deleteRecording(e).pipe(z(o=>{throw this.log.recRemoved(r,new Yn(o)),this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_recording_delete_failed)),o})).subscribe(()=>{this.log.recRemoved(r,void 0),this.stbCache.clearCacheForDevice(e.device),this.stbCache.stbRecordingChange.emit()})}validateBufferTime(e,n,r,o,s){let a=e?.value?parseInt(e.value,10):this.config.getSettingNumber(r,0)*6e4,l=this.config.getSettingArray(o,d=>parseInt(d,10)*6e4,EE),c=0;return l.some((d,p)=>{let y=d;return y===a?(c=a,!0):y>a&&p>=1?(c=l[p-1],!0):!1}),c!==a&&this.historyApi.setSettingForDevice(s,n,`${c}`).subscribe(),c??0}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(wv),h(xn),h(Jn),h(en),h(ne),h(_e),h(ct))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Kz(t,i){if(t&1&&M(0,"app-rent-button",1),t&2){let e,n=_();S("loader",(e=n.actions())==null?null:e.rent)}}function e6(t,i){if(t&1){let e=B();m(0,"app-recording-button",10),A("confirm",function(r){k(e);let o=_();return L(o.createRecording(r))}),g()}if(t&2){let e=_();S("label",e.createRecordingLabel)("confirmLabel",e.createRecordingConfirm)("options",e.recordingOptions)("dropdownConfig",e.recordingDropdownConfig)}}function t6(t,i){if(t&1){let e=B();m(0,"app-dropdown-list-button",11),A("itemSelected",function(r){k(e);let o=_();return L(o.cancelRecording(r))}),g()}if(t&2){let e=_();S("label",e.cancelRecordingLabel)("items",e.cancelRecordingOptions())("quickSelect",!1)}}function n6(t,i){if(t&1){let e=B();m(0,"app-confirm-button",12),A("confirm",function(){k(e);let r=_();return L(r.deleteRecording())}),g()}if(t&2){let e=_();S("label",e.deleteRecordingLabel)("confirmMessage",e.deleteRecordingConfirm)}}function i6(t,i){if(t&1){let e=B();m(0,"app-recording-button",10),A("confirm",function(r){k(e);let o=_();return L(o.editRecording(r))}),g()}if(t&2){let e=_();S("label",e.editRecordingLabel)("confirmLabel",e.editRecordingConfirm)("options",e.recordingOptions)("dropdownConfig",e.recordingDropdownConfig)}}function r6(t,i){if(t&1){let e=B();m(0,"app-dropdown-list-button",13),A("activated",function(){k(e);let r=_();return L(r.logTrailer())})("itemSelected",function(r){k(e);let o=_();return L(o.watchTrailer(r))}),g()}if(t&2){let e,n=_();S("label",n.trailerLabel)("items",(e=n.actions())==null?null:e.trailers)}}function o6(t,i){if(t&1){let e=B();m(0,"app-dropdown-list-button",14),A("itemSelected",function(r){k(e);let o=_();return L(o.openBundle(r))}),g()}if(t&2){let e,n=_();S("label",n.bundleLabel)("items",(e=n.actions())==null?null:e.bundles)}}function s6(t,i){if(t&1){let e=B();m(0,"app-text-button",15),A("click",function(){k(e);let r=_();return L(r.openSeries())}),g()}if(t&2){let e=_();S("label",e.seriesLabel)}}function a6(t,i){if(t&1){let e=B();m(0,"img",16),A("click",function(){k(e);let r=_();return L(r.toggleReminder())}),g()}if(t&2){let e=_();S("src",e.getReminderIcon(),Je)}}function l6(t,i){if(t&1){let e=B();m(0,"img",17),A("click",function(){k(e);let r=_();return L(r.share())}),g()}}function c6(t,i){if(t&1){let e=B();m(0,"img",16),A("click",function(){k(e);let r=_();return L(r.toggleFavorite())}),g()}if(t&2){let e=_();S("src",e.getFavoriteIcon(),Je)}}var gy=class{constructor(){this.share=!1}},cFe=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y,b){this.config=e,this.recordingService=n,this.stbCache=r,this.sessionService=o,this.adultService=s,this.player=a,this.favoriteCache=l,this.reminderCache=c,this.messagesService=d,this.log=p,this.cdr=y,this.popup=b,this.actions=Ct(),this.title=Ct(),this.recordingActions=Ct(),this.recordingConfig=V(void 0),this.seriesSelected=Ps(),this.bundleSelected=Ps(),this.seriesLabel="",this.bundleLabel="",this.trailerLabel="",this.createRecordingLabel="",this.createRecordingConfirm="",this.editRecordingLabel="",this.editRecordingConfirm="",this.cancelRecordingLabel="",this.deleteRecordingLabel="",this.deleteRecordingConfirm="",this.favoriteIcon="",this.cancelRecordingOptions=V(void 0),this.seriesLabel=e.getTranslation(pe.detail_btn_series),this.bundleLabel=e.getTranslation(pe.detail_btn_bundle),this.trailerLabel=e.getTranslation(pe.detail_btn_trailer),this.createRecordingLabel=e.getTranslation(pe.detail_recording_start),this.createRecordingConfirm=e.getTranslation(pe.detail_btn_record_record),this.editRecordingLabel=e.getTranslation(pe.detail_btn_recording_edit),this.editRecordingConfirm=e.getTranslation(ni.popup_btn_ok),this.cancelRecordingLabel=e.getTranslation(pe.detail_recording_cancel),this.deleteRecordingLabel=e.getTranslation(pe.detail_recording_delete),this.deleteRecordingConfirm=e.getTranslation(pe.detail_recording_delete_confirm),bn(()=>{let T=this.recordingActions();this.recordingConfig.set(T),T?.create?this.loadDefaultRecordingSettings():T?.edit&&T.recording&&this.loadRecordingSettings(T.recording),T?.cancel&&T.recording&&this.cancelRecordingOptions.set(this.getCancelRecordingOptions(T.recording))})}getFavoriteIcon(){return $.getFavoriteIcon(this.actions()?.favorite?.isFavorite??!1)}getReminderIcon(){return $.getReminderIcon(this.actions()?.reminder?.reminderSet??!1)}openSeries(){let e=this.actions()?.series;e&&this.seriesSelected.emit(e)}openBundle(e){let n=e;this.bundleSelected.emit(n.id)}logTrailer(){this.log.pageView(new Qt({pageURL:Zt.vod_detail,pageTitle:"Select trailer",pageLocale:this.config.getLocale()}
15))}watchTrailer(e){let n=e;this.checkAdultAndContinue(n.playInfo.isAdult,()=>{this.player.startAsset(n.playInfo)})}createRecording(e){let n=this.recordingConfig(),r=n?.epgInfo;!n||!r||this.checkAdultAndContinue(r.isAdult,()=>{this.recordingService.createSubscription(e,r),n.create=!1})}editRecording(e){let n=this.recordingConfig(),r=n?.recording,o=n?.epgInfo;if(!r||!o)return;let s=new Ua(e,o,r,this.sessionService.stbList.getNpvrStb(),e.type);r.isPlanned()?this.editSubscription&&this.recordingService.updateSubscription(this.editSubscription,e,s):e.deleteProtected!==r.deleteProtected&&(r.deleteProtected=e.deleteProtected,this.recordingService.updateRecording(r,s))}cancelRecording(e){let n=this.recordingConfig();if(n?.recording&&n.epgInfo){let r=e.type;this.recordingService.cancelSubscription(r,n.recording,n.epgInfo),n.cancel=!1,n.edit=!1}}deleteRecording(){let e=this.recordingConfig();e?.recording&&e.epgInfo&&(this.recordingService.deleteRecording(e.recording,e.epgInfo),e.delete=!1,e.edit=!1)}share(){navigator.share?navigator.share({url:document.URL,title:this.title()}).catch(e=>{e instanceof DOMException||this.popup.showSharePopup.emit()}):this.popup.showSharePopup.emit()}toggleFavorite(){let e=this.actions()?.favorite;e&&(e.isFavorite?(this.favoriteCache.deleteFavorite(e.favoriteType,e.favoriteId),e.isFavorite=!1):(this.favoriteCache.setFavorite(e.favoriteType,e.favoriteId),e.isFavorite=!0))}toggleReminder(){let e=this.actions()?.reminder;e&&this.reminderCache.toggleReminder(e.reminderType,e.reminderId).subscribe(n=>e.reminderSet=n??!1)}loadDefaultRecordingSettings(){let e=this.recordingConfig(),n=e?.epgInfo;if(!e||!n?.channel)return;let r=this.recordingService.getAvailableDevices(n.channel);r?this.recordingService.loadRecordingCustomerSettings(r.id,!1,n.series?.seriesId,n.season?.seasonId).subscribe({next:o=>{this.recordingDropdownConfig={showEpisodesSelection:!!(n.series&&n.season),showBufferSelection:!0}
15,this.recordingOptions=o,this.cdr.detectChanges()}}):e.create=!1}loadRecordingSettings(e){e.isPlanned()?this.stbCache.getSubscription(e).subscribe({next:n=>{this.recordingDropdownConfig={showEpisodesSelection:!1,showBufferSelection:!0},this.recordingOptions=this.recordingService.getSubscriptionSettings(n),this.editSubscription=n,this.cdr.detectChanges()}}):(this.recordingDropdownConfig={showEpisodesSelection:!1,showBufferSelection:!1},this.recordingOptions=this.recordingService.getRecordingSettings(e),this.cdr.detectChanges())}getCancelRecordingOptions(e){return this.recordingService.getCancelOptions(e).map(n=>({type:n,title:this.getCancelTitle(n)}))}getCancelTitle(e){switch(e){case Le.EPISODE:return this.config.getTranslation(pe.detail_recording_cancel_program);case Le.SEASON:return this.config.getTranslation(pe.detail_recording_cancel_season);case Le.SERIES:return this.config.getTranslation(pe.detail_recording_cancel_series);default:return""}}checkAdultAndContinue(e,n){e?this.adultService.checkAdultMode({successCallback:()=>{n()},errorCallback:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(pe.detail_adult_warning))}}):n()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(my),f(xn),f(ne),f($e),f(ds),f(ui),f(ns),f(_e),f(ct),f(Pe),f(Ft))}}static{this.\u0275cmp=D({type:t,selectors:[["app-detail-actions"]],inputs:{actions:[1,"actions"],title:[1,"title"],recordingActions:[1,"recordingActions"]},outputs:{seriesSelected:"seriesSelected",bundleSelected:"bundleSelected"},decls:13,vars:11,consts:[[1,"detail-info-actions"],[3,"loader"],[3,"label","confirmLabel","options","dropdownConfig"],[3,"label","items","quickSelect"],[3,"label","confirmMessage"],[3,"label","items"],[3,"label"],[1,"detail-info-actions-icons"],[3,"src"],["src","./assets/theme/svg/share_normal.svg"],[3,"confirm","label","confirmLabel","options","dropdownConfig"],[3,"itemSelected","label","items","quickSelect"],[3,"confirm","label","confirmMessage"],[3,"activated","itemSelected","label","items"],[3,"itemSelected","label","items"],[3,"click","label"],[3,"click","src"],["src","./assets/theme/svg/share_normal.svg",3,"click"]],template:function(n,r){if(n&1&&(m(0,"div",0),E(1,Kz,1,1,"app-rent-button",1),E(2,e6,1,4,"app-recording-button",2),E(3,t6,1,3,"app-dropdown-list-button",3),E(4,n6,1,2,"app-confirm-button",4),E(5,i6,1,4,"app-recording-button",2),E(6,r6,1,2,"app-dropdown-list-button",5),E(7,o6,1,2,"app-dropdown-list-button",5),E(8,s6,1,1,"app-text-button",6),m(9,"div",7),E(10,a6,1,1,"img",8),E(11,l6,1,0,"img",9),E(12,c6,1,1,"img",8),g()()),n&2){let o,s,a,l,c,d,p,y,b,T,W;u(),I((o=r.actions())!=null&&o.rent?1:-1),u(),I((s=r.recordingConfig())!=null&&s.create&&r.recordingOptions?2:-1),u(),I((a=r.recordingConfig())!=null&&a.cancel&&r.cancelRecordingOptions()?3:-1),u(),I((l=r.recordingConfig())!=null&&l.delete?4:-1),u(),I((c=r.recordingConfig())!=null&&c.edit&&r.recordingOptions?5:-1),u(),I(!((d=r.actions())==null||d.trailers==null)&&d.trailers.length?6:-1),u(),I(!((p=r.actions())==null||p.bundles==null)&&p.bundles.length?7:-1),u(),I((y=r.actions())!=null&&y.series?8:-1),u(2),I((b=r.actions())!=null&&b.reminder?10:-1),u(),I((T=r.actions())!=null&&T.share?11:-1),u(),I((W=r.actions())!=null&&W.favorite?12:-1)}},dependencies:[Ok,H1,j1,Vv,Ke],styles:[".detail-info-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.67rem}.detail-info-actions-icons[_ngcontent-%COMP%]{display:flex;column-gap:1.015rem;padding-left:1.53rem;margin-left:auto}.detail-info-actions-icons[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:2.3rem;height:2.3rem;cursor:pointer}"]})}}return t})();var ol=(function(t){return t.detailBaseRoute="/detail/",t.epgDetailRoute="detail/epg",t.vodDetailRoute="detail/vod",t.articleDetailRoute="detail/article",t.bundleDetailRoute="detail/bundle",t})(ol||{}),d6=(function(t){return t.EPG="epg",t.VOD="vod",t.BUNDLE="bundle",t})(d6||{}),kk=class{constructor(){this.title="",this.shortSynopsis="",this.image="",this.metadataMessages=[],this.blackoutMessage="",this.extraInfoMessage="",this.isRecordingDetail=!1,this.isSeriesDetail=!1,this.actions=new gy,this.subscriptions=[]}};var Iu=(()=>{class t{constructor(e,n,r,o){this.router=e,this.location=n,this.session=r,this.htmlMeta=o,this.closeDetailEvent=ne
15w Y}isOverlayOpen(){return this.router.url.startsWith(ol.detailBaseRoute)||this.router.url.includes("detailOverlay")}closeDetail(){this.router.url.includes("detailOverlay")?(this.router.navigate([{outlets:{detailOverlay:null}}]),this.htmlMeta.reloadLastPageTitle()):this.session.goToPreviousRoute(),setTimeout(()=>{this.closeDetailEvent.emit()},0)}openDetail(e,n){this.navigateDetail(`${e}/${n}`)}openEpgDetail(e,n,r){this.navigateDetail(`${ol.epgDetailRoute}/${e}/${n}/${r}`)}navigateDetail(e){this.router.url.startsWith("/main/")?this.router.navigate([{outlets:{detailOverlay:e}}]).then(()=>this.location.replaceState(e)):this.router.navigate([e],{replaceUrl:this.isOverlayOpen()})}static{this.\u0275fac=function(n){return new(n||t)(h(ft),h(Rr),h(Xd),h(un))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var u6=["banner"],p6=["video"];function f6(t,i){if(t&1&&M(0,"div",9,1),t&2){let e=_(2);H("hidden",!e.bannerModel.isVisible)}}function h6(t,i){if(t&1&&(m(0,"div",10)(1,"p",11),N(2),g(),m(3,"p",12),N(4),g(),m(5,"p",13),N(6),g()()),t&2){let e=_(2);bt("opacity",e.bannerModel.textOpacity1),H("hidden",!e.bannerModel.isVisible),u(2),Q(e.bannerModel.textLines1.line1),u(2),Q(e.bannerModel.textLines1.line2),u(2),ce(" ",e.bannerModel.textLines1.line3," ")}}function m6(t,i){if(t&1&&(m(0,"div",10)(1,"p",14),N(2),g(),m(3,"p",15),N(4),g(),m(5,"p",16),N(6),g()()),t&2){let e=_(2);bt("opacity",e.bannerModel.textOpacity2),H("hidden",!e.bannerModel.isVisible),u(2),Q(e.bannerModel.textLines2.line1),u(2),Q(e.bannerModel.textLines2.line2),u(2),ce(" ",e.bannerModel.textLines2.line3," ")}}function g6(t,i){if(t&1){let e=B();m(0,"app-paging-indicator",17),A("switchPage",function(r){k(e);let o=_(2);return L(o.goToBanner(r))}),g()}if(t&2){let e=_(2);S("pageCount",e.bannerModel.bannerLength)("currentPage",e.bannerModel.currentBannerIndex)}}function _6(t,i){if(t&1){let e=B();m(0,"div",2,0)(2,"div",3),A("click",function(){k(e);let r=_();return L(r.doAction())}),E(3,f6,2,2,"div",4),m(4,"div",5),M(5,"img",6),g(),m(6,"div",5),M(7,"img",6),g(),E(8,h6,7,7,"div",7),E(9,m6,7,7,"div",7),g(),E(10,g6,1,2,"app-paging-indicator",8),g()}if(t&2){let e=_();u(2),$o(e.bannerModel.bannerClass),u(),I(e.enableVideoBanners?3:-1),u(),bt("opacity",e.imageOpacity1()),H("hidden",!e.bannerModel.isVisible),u(),S("srcset",e.bannerModel.srcSet1),u(),bt("opacity",e.imageOpacity2()),H("hidden",!e.bannerModel.isVisible),u(),S("srcset",e.bannerModel.srcSet2),u(),I(e.enableVideoBanners&&(e.bannerModel!=null&&e.bannerModel.textLines1)?8:-1),u(),I(e.enableVideoBanners&&(e.bannerModel!=null&&e.bannerModel.textLines2)?9:-1),u(),I(e.bannerModel.bannerLength>1?10:-1)}}var Lk=(()=>{class t{constructor(e,n,r,o,s,a,l){this.cmsAction=e,this.log=n,this.cdr=r,this.detailService=o,this.environment=s,this.videoBanner=a,this.business=l,this.visibilityChanged=new Y,this.imageOpacity1=Xe(()=>this.videoBanner.showVideo()?0:this.bannerModel?.imageOpacity1()||0),this.imageOpacity2=Xe(()=>this.videoBanner.showVideo()?0:this.bannerModel?.imageOpacity2()||0),this.erroredBanners=0,this.transitionTimeout=0,this.intersectionSubject=ne
15w Ot,this.enableVideoBanners=this.environment.atvFeatureList.includes(ln.VIDEO_BANNERS),this.imageLocation=this.business.client.bootstrap.discovery.imageLocation,this.closeDetailSubscription=this.detailService.closeDetailEvent.subscribe(()=>{this.intersectionObserver?.observe(this.bannerRef.nativeElement)}),this.videoBannerEndedSubscription=this.videoBanner.videoEnded.subscribe(()=>{if(this.bannerStart&&this.currentBannerImageTime){let d=new Date().getTime()-this.bannerStart.getTime();if(d<this.currentBannerImageTime){this.setNextBannerTimeout(this.currentBannerImageTime-d);return}this.nextBanner()}})}set customCmsBanners(e){this.enableVideoBanners||(e=e.filter(n=>n.image)),this.bannerModel=new Yv(e)}ngOnChanges(){this.bannerModel&&(this.bannerModel.currentBannerIndex=-1,this.viewIntersection(void 0,!document.hidden)),this.erroredBanners=0}ngAfterViewInit(){this.bannerRef&&(this.intersectionSubject.pipe(ur()).subscribe(e=>{this.viewIntersection(e)}),this.intersectionObserver=new IntersectionObserver(e=>{e.length>0&&this.intersectionSubject.next(e[0].isIntersecting)},{rootMargin:"400px"}),this.intersectionObserver.observe(this.bannerRef.nativeElement),CSS.supports("aspect-ratio","1")||this.keepAspectRatioManually()),this.addVideoElement()}pageVisibilityChanged(){this.viewIntersection(void 0,!document.hidden)}addVideoElement(){let e=this.videoBanner.videoElement;this.videoRef&&e&&(this.videoRef.nativeElement.appendChild(e),this.videoBanner.listenForEvents())}goToBanner(e){e<0||!this.bannerModel||e>=this.bannerModel.customCmsBanners.length||(this.clearTimeout(),this.bannerModel.currentBannerIndex=e,this.showBannerAtCurrentIndex())}nextBanner(){this.clearTimeout(),this.bannerModel?.isVisible&&(this.bannerModel.currentBannerIndex++,this.bannerModel.currentBannerIndex>=this.bannerModel.customCmsBanners.length&&(this.bannerModel.currentBannerIndex=0),this.showBannerAtCurrentIndex())}doAction(){if(this.bannerModel?.customCmsBanners[this.bannerModel.currentBannerIndex].action){this.videoBanner.pause();let e=this.bannerModel.customCmsBanners[this.bannerModel.currentBannerIndex].action;if(e.type&&e.id){let n={actionType:e.type,actionId:e.id,actionMethod:e.method};this.log.bannerAction(n,this.pageContext),this.cmsAction.doAction(n,!0)}}}keepAspectRatioManually(){let e=()=>{this.bannerModel&&(this.bannerRef.nativeElement.style.height=`${this.bannerRef.nativeElement.clientWidth/this.bannerModel.aspectRatio}px`)};this.resizeSubscription=Gt(this.bannerRef.nativeElement,"resize").pipe(Ti(500)).subscribe(e),e()}detectChanges(){this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges()}viewIntersection(e,n){this.bannerModel&&(e!==void 0&&(this.bannerModel.bannerVisible=e),n!==void 0&&(this.bannerModel.pageVisible=n),this.bannerModel.isVisible?this.bannerModel.isNextBanner?this.nextBanner():this.videoBanner.canContinue?this.videoBanner.continuePlay():(this.bannerModel.showCurrentBannerImage(),this.detectChanges()):this.videoBanner.pause())}showBannerAtCurrentIndex(){let e=this.bannerModel?.getCurrentBanner();this.bannerStart=new Date,e?.time&&!e.video&&this.setNextBannerTimeout(e.time),this.prepareVisualModel()}setNextBannerTimeout(e){this.currentTimeout=setTimeout(()=>{this.nextBanner()},e)}clearTimeout(){this.currentTimeout&&(this.bannerModel&&(this.bannerModel.isNextBanner=!0),clearTimeout(this.currentTimeout),this.currentTimeout=void 0),this.videoBanner.clearPlayTimeout()}prepareVisualModel(){if(!this.bannerModel)return;this.bannerModel.isNextBanner=!1;let e=this.bannerModel.getCurrentBanner();if(!e)return;let n=e.image.startsWith("http")?e.image:this.imageLocation+e.image,r=ot.getSourceSet(n,this.aspectRatioToImageRecipeCategory(e.size)),o=new Image;r&&(o.srcset=r),o.onload=()=>{this.visibilityChanged.emit(),this.bannerModel?.showNextBanner(r),this.videoBanner.pause(),setTimeout(()=>{this.videoBanner.stop(),e.video&&this.loadManifest(e.video)},this.transitionTimeout),this.transitionTimeout===0&&(this.transitionTimeout=850),this.detectChanges()},o.onerror=()=>{++this.erroredBanners,this.erroredBanners>=(this.bannerModel?.bannerLength??0)?this.visibilityChanged.emit():this.nextBanner()}}get currentBannerImageTime(){return this.bannerModel?.customCmsBanners[this.bannerModel?.currentBannerIndex]?.time}playManifest(e,n){this.videoBanner.playManifest(e,n)}loadManifest(e){let n=this.getSources(e.manifests??[]);n.length>0&&this.playManifest(n,e.time)}
15getSources(e){let r=[...e.filter(o=>o.type===this.environment.defaultStreamPackageType),...e];return Array.from(new Set(r.map(o=>o.manifest)))}aspectRatioToImageRecipeCategory(e){switch(e){case Da.ASPECT_RATIO_7_3:return nr.BANNER_7_3;case Da.ASPECT_RATIO_7_2:return nr.BANNER_7_2;default:return nr.BANNER_7_1}}ngOnDestroy(){this.videoBanner.destroy(),this.leftRightSubscription?.unsubscribe(),this.returnSubscription?.unsubscribe(),this.closeDetailSubscription?.unsubscribe(),this.videoBannerEndedSubscription?.unsubscribe(),this.clearTimeout(),this.intersectionObserver?.disconnect(),this.resizeSubscription?.unsubscribe(),this.videoContainerMutationObserver?.disconnect()}static{this.\u0275fac=function(n){return new(n||t)(f(hu),f(ct),f(Pe),f(Iu),f(ae),f(Kv),f(st))}}static{this.\u0275cmp=D({type:t,selectors:[["app-banner"]],viewQuery:function(n,r){if(n&1&&Ve(u6,5)(p6,5),n&2){let o;be(o=Ce())&&(r.bannerRef=o.first),be(o=Ce())&&(r.videoRef=o.first)}},hostBindings:function(n,r){n&1&&A("visibilitychange",function(){return r.pageVisibilityChanged()},Rp)},inputs:{pageContext:"pageContext",customCmsBanners:"customCmsBanners"},outputs:{visibilityChanged:"visibilityChanged"},features:[Ta([Kv,F1]),Un],decls:1,vars:1,consts:[["banner",""],["video",""],[1,"banner","left-right-page-padding"],[1,"banner-content",3,"click"],["id","video-container",3,"hidden"],[1,"banner-image"],[3,"srcset"],[1,"banner-text",3,"hidden","opacity"],[1,"page-indicator",3,"pageCount","currentPage"],["id","video-container"],[1,"banner-text"],[1,"banner-text-line-1","font-title-2"],[1,"banner-text-line-2","font-title-1"],[1,"banner-text-line-3","font-highlighted-label"],[1,"font-title-2","banner-text-line-1"],[1,"font-title-1","banner-text-line-2"],[1,"font-highlighted-label","banner-text-line-3"],[1,"page-indicator",3,"switchPage","pageCount","currentPage"]],template:function(n,r){n&1&&E(0,_6,11,16,"div",2),n&2&&I(r.bannerModel&&r.bannerModel.bannerLength>0?0:-1)},dependencies:[V1],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;row-gap:1.5rem;margin:2rem 0 1.5rem}.banner-content[_ngcontent-%COMP%]{position:relative;width:100%;border-radius:.625rem;overflow:hidden;cursor:pointer}.banner-content.aspect-ratio-7-1[_ngcontent-%COMP%]{aspect-ratio:7/1;font-size:.625rem}.banner-content.aspect-ratio-7-2[_ngcontent-%COMP%]{aspect-ratio:7/2;font-size:1rem}.banner-content.aspect-ratio-7-3[_ngcontent-%COMP%]{aspect-ratio:7/3;font-size:1rem}.banner-image[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;transition:all .86s ease-in-out;background-repeat:no-repeat;background-size:cover}.banner-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:.75rem;position:absolute;bottom:0;width:100%;padding:2rem;z-index:1;transition:opacity .86s ease-in-out;background:radial-gradient(at 20% 100%,#00000080 50%,#0000 70%)}.banner-text-line-1[_ngcontent-%COMP%], .banner-text-line-2[_ngcontent-%COMP%], .banner-text-line-3[_ngcontent-%COMP%]{width:100%;max-width:62.5rem;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.banner-text-line-1[_ngcontent-%COMP%]{color:#e2d8fe;font-size:1.25em}.banner-text-line-2[_ngcontent-%COMP%]{font-size:1.5625em}.banner-text-line-3[_ngcontent-%COMP%]{color:#ca7ef1;font-size:.9375em}.banner-image[_ngcontent-%COMP%]:not(:first-of-type){position:absolute;top:0;left:0}#video-container[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;-webkit-transform:translateZ(0)}video[_ngcontent-%COMP%]{object-fit:cover}img[_ngcontent-%COMP%]{width:inherit;height:inherit;position:absolute;top:0;left:0;object-fit:cover}@media only screen and (max-width:768px){.banner-text[_ngcontent-%COMP%]{row-gap:.5rem;padding:1rem}.banner-content.aspect-ratio-7-1[_ngcontent-%COMP%]   .banner-text[_ngcontent-%COMP%]{font-size:.75em}}@media only screen and (max-width:480px){.banner-text[_ngcontent-%COMP%]{row-gap:.125rem;padding:.5rem}.banner-content.aspect-ratio-7-1[_ngcontent-%COMP%]   .banner-text[_ngcontent-%COMP%]{font-size:.5em}}"],changeDetection:0})}}return t})();
15var _y=class{constructor(i,e,n){this.orientation=i,this.size=e,this.image1={raw:""},this.image2={raw:""},this.canShowDetail=n}},Ht=(function(t){return t.NONE="none",t.TOGGLE="toggle",t.LOGO="logo",t})(Ht||{});var fn=class{getOrientation(){if(!this.orientation)throw new Error("orientation not initialized");return this.orientation}getChannelCardMode(){return Ht.NONE}};var vy=class extends fn{constructor(i,e,n,r,o,s,a,l=Cc.TITLE,c=Hr.ASC){super(),this.vodApi=i,this.catalogId=e,this.allowedAdultMode=n,this.tags=r,this.productionYear=o,this.minOperatorScore=s,this.maxOperatorScore=a,this.sortBy=l,this.sortDir=c,this.hasMore=!0,this.page=0,this.orientation=nt.LANDSCAPE}getItems(){return this.vodApi.getCmsVods(this.catalogId,this.allowedAdultMode,this.tags,this.productionYear,this.minOperatorScore,this.maxOperatorScore,this.sortBy,this.sortDir,this.page).pipe(P(i=>(this.hasMore=i.nextPage||!1,this.page+=1,this.orientation=i.type,i.items??[])))}hasNext(){return this.hasMore}resetPaging(){this.hasMore=!0,this.page=0}};function v6(t,i){t&1&&M(0,"div")}function y6(t,i){if(t&1&&M(0,"app-tag-list",0),t&2){let e=_();S("tags",e.info.line1)}}function b6(t,i){if(t&1&&M(0,"img",5),t&2){let e=i.$implicit;S("src",e,Je)}}function C6(t,i){if(t&1&&(m(0,"div",6)(1,"span"),N(2),g()()),t&2){let e=_(2);u(2),Q(e.info.folderNr)}}function S6(t,i){if(t&1&&(m(0,"div",1),M(1,"app-tag-list",3),m(2,"div",4),X(3,b6,1,1,"img",5,se),E(5,C6,3,1,"div",6),g()()),t&2){let e=_();u(),S("tags",e.info.line2),u(2),K(e.info.icons),u(2),I(e.info.folderNr?5:-1)}}function E6(t,i){if(t&1&&M(0,"img",5),t&2){let e=i.$implicit;S("src",e,Je)}}function I6(t,i){if(t&1&&(m(0,"div",6)(1,"span"),N(2),g()()),t&2){let e=_(2);u(2),Q(e.info.folderNr)}}function w6(t,i){if(t&1&&(m(0,"div",1),M(1,"app-tag-list",7),m(2,"div",4),X(3,E6,1,1,"img",5,se),g(),E(5,I6,3,1,"div",6),g()),t&2){let e=_();u(),S("tags",e.info.line2),u(2),K(e.info.icons),u(2),I(e.useOldStyle&&e.info.folderNr?5:-1)}}function T6(t,i){if(t&1&&(m(0,"div",2),N(1),g()),t&2){let e=_();u(),ce(" ",e.oldTitle," ")}}var us=class{constructor(){this.icons=[]}},Fk=(()=>{class t{constructor(){this.useOldStyle=!1,this.oldTitle=""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-generic-card-labels"]],inputs:{info:"info",useOldStyle:"useOldStyle",oldTitle:"oldTitle"},decls:5,vars:5,consts:[[1,"card-labels-line1","font-title-3",3,"tags"],[1,"card-labels-line2"],[1,"card-labels-line1","font-title-3"],[1,"card-labels-line2-text","font-highlighted-label-small",3,"tags"],[1,"card-icons"],[3,"src"],[1,"card-folder-icon"],[1,"card-labels-line2-text","font-caption-small",3,"tags"]],template:function(n,r){n&1&&(E(0,v6,1,0,"div"),E(1,y6,1,1,"app-tag-list",0),E(2,S6,6,2,"div",1),E(3,w6,6,2,"div",1),E(4,T6,2,1,"div",2)),n&2&&(I(r.useOldStyle?-1:0),u(),I(r.info.line1?1:-1),u(),I(r.info.line2?2:-1),u(),I(r.useOldStyle&&r.info.line1?3:-1),u(),I(r.useOldStyle?4:-1))},dependencies:[mu],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.card-labels-line1[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.card-labels-line2[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.card-labels-line2-text[_ngcontent-%COMP%]{color:#ca7ef1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.card-icons[_ngcontent-%COMP%]{display:flex;column-gap:.39rem;margin-left:.39rem}.card-icons[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:1.125rem;height:1.125rem}.card-folder-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem;background-image:url(assets/theme/svg/recording_folder.svg);background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center;align-items:flex-end}.card-folder-icon[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-bottom:.1rem;font-size:.75rem;color:var(--atv-icon-text-color)}"]})}}return t})();var yy=(()=>{class t{calculateProgressStyleWidth(){return this.progressPercentage??=0,this.progressPercentage=this.progressPercentage<0?0:this.progressPercentage,this.progressPercentage=this.progressPercentage>100?100:this.progressPercentage,!this.progressPercentage||this.progressPercentage===0?"0%":this.progressPercentage+"%"}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-progress-bar"]],inputs:{progressPercentage:"progressPercentage"},decls:3,vars:2,consts:[["progressRef",""],[1,"progress-bar-container"],[1,"progress-bar-progress"]],template:function(n,r){n&1&&(te(0,"div",1),Qe(1,"div",2,0),J()),n&2&&(u(),bt("width",r.calculateProgressStyleWidth()))},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.progress-bar-container[_ngcontent-%COMP%]{display:block;height:100%;max-height:.51rem;background-color:#003c58;border-radius:.25rem}.progress-bar-progress[_ngcontent-%COMP%]{height:100%;background-color:#ca7ef1;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}"]})}}return t})();var by=(()=>{class t{constructor(e){this.router=e}setCurrentMenu(e){this.currentMenu=e}getListRouteForCurrentTopRoute(){let e=this.router.url;e.startsWith("/")&&(e=e.substring(1));let n=e.split("/");if(!this.currentMenu?.items||n?.length<2||n?.[0]!=="main")return;let r=this.currentMenu.items.find(o=>o.tag===n[1]&&!o.pageType&&o.items?.length>0)?.items?.find(o=>o.pageType===it.LIST_PAGE);return r?`${n[0]}/${n[1]}/${r.tag}`:void 0}static{this.\u0275fac=function(n){return new(n||t)(h(ft))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ps=class{};
15var Cy=class extends ps{constructor(i,e,n,r,o){super(),this.cardModelFactory=i,this.config=e,this.sessionService=n,this.adultService=r,this.cardConfig=o}createCard(i,e,n){this.scheduleChannel=n;let r=n?.program?n.program:i.asset;this.cardModelFactory.useLiveThumbnail(this.cardConfig)&&i.asset.type===he.CHANNEL&&n?.channel?.thumbnail?this.setLiveThumbnail(e,n.channel):e.image1.raw=this.getEpgCardImage(r,e.orientation,e.size),(this.cardModelFactory.useBestSchedule(this.cardConfig)||this.cardModelFactory.showScheduleInfo(this.cardConfig))&&(e.channelImage=this.setChannelLogo(n?.channel)),e.labels=this.getLabels(r,n?.schedule,n?.channel),this.cardConfig.useOldEpgCardContent&&this.cardModelFactory.showInfo(this.cardConfig)&&(e.oldTitle=this.getOldTitle(r),this.cardModelFactory.showScheduleInfo(this.cardConfig)&&(e.oldScheduleText=this.getOldScheduleInfo(n?.schedule?.published))),e.action=this.getEpgAction(i,n?.schedule)}getEpgCardImage(i,e,n){return this.cardModelFactory.getImageUrl(i,this.cardModelFactory.getImageRecipe(this.cardConfig.channelCardMode,e,n),e,this.cardConfig.allowedAdultMode)}setChannelLogo(i){return(this.cardModelFactory.showScheduleInfo(this.cardConfig)||this.cardModelFactory.useBestSchedule(this.cardConfig)||this.cardModelFactory.useLiveThumbnail(this.cardConfig))&&this.cardConfig.channelCardMode===Ht.NONE&&this.cardModelFactory.showInfo(this.cardConfig)&&i?.defaultLogo?ot.createImageUrl(i.defaultLogo,me.CHANNEL_1):""}setLiveThumbnail(i,e){i.thumbnailUrl=e.thumbnail?.liveImage,i.thumbnailRefresh=e.thumbnail?.liveRefresh}getLabels(i,e,n){let r=new us,o=new En;if(!this.cardModelFactory.showInfo(this.cardConfig))return o.addShortEpisodeInfo(i.season,i.episode),o.tags.length>0&&(r.line2=o),r;if(this.cardConfig.useOldEpgCardContent||this.cardConfig.channelCardMode===Ht.TOGGLE||this.cardConfig.channelCardMode===Ht.LOGO)o.addChannelInfo(this.sessionService,n);else{let s=this.getEpisodeTitle(i);s&&(r.line1=new En(s)),this.cardModelFactory.showScheduleInfo(this.cardConfig)&&o.addShortScheduleInfo(this.config,e?.published),this.cardModelFactory.showEpisodeInfo(this.cardConfig)&&o.addShortEpisodeInfo(i.season,i.episode)}return o.tags.length>0&&(r.line2=o),this.scheduleChannel?.schedule&&(r.icons=this.getAccessibilityIcons(this.scheduleChannel.schedule)),r}getEpisodeTitle(i){return i.adult&&!this.adultService.showAdult(this.cardConfig.allowedAdultMode)?this.config.getTranslation(wo.guide_adult_title):this.cardModelFactory.showEpisodeInfo(this.cardConfig)?i.episodeTitle?i.episodeTitle:i.episode?`${this.config.getTranslation(pe.detail_episode)??""} ${i.episode}`:i.title:i.title}getOldTitle(i){return Pn.containsProperty(oe.SHOW_EPISODE_INFO,this.cardConfig.ribbonProperties,this.cardConfig.pageProperties)?this.cardModelFactory.getEpisodeProgramString(i.episode,i.episodeTitle,i.title):i.title}getOldScheduleInfo(i){if(i){let e=$.dateToDateTime(i.start).toFormat("dd/MM, HH:mm"),n=$.dateToDateTime(i.end).toFormat("HH:mm");return e.toString()+" - "+n.toString()}else return""}getEpgAction(i,e){return this.cardModelFactory.useBestSchedule(this.cardConfig)&&e?{actionId:e.scheduleId,actionMethod:i.method,actionType:he.SCHEDULE}:{actionId:i.asset.id,actionMethod:i.method,actionType:i.asset.type}}getExtraAction(){if(!this.scheduleChannel?.channel||!this.scheduleChannel.schedule)return C(void 0);let i=this.cardModelFactory.getLinearPlayAction(this.scheduleChannel);return i||(i=this.cardModelFactory.getReplayPlayAction(this.scheduleChannel)),i?C(i):this.cardModelFactory.getRecordingPlayAction(this.scheduleChannel,this.cardConfig.allowedAdultMode)}getAccessibilityIcons(i){return this.config.getSettingBoolean(x.showAccessibilityIcons,!1)?$.getAccessibilityIcons(i.accessibilityOptions):[]}};var Sy=class extends ps{constructor(i,e){super(),this.cardModelFactory=i,this.cardConfig=e}createCard(i,e){e.image1.raw=this.cardModelFactory.getImageUrl(i.asset,this.cardModelFactory.getImageRecipe(this.cardConfig.channelCardMode,e.orientation,e.size),e.orientation,this.cardConfig.allowedAdultMode),this.cardModelFactory.showInfo(this.cardConfig)&&i.asset.title&&(e.labels=new us,e.labels.line1=new En(i.asset.title)),e.action={actionId:i.asset.id,actionMethod:i.method,actionType:i.asset.type}}getExtraAction(){return C(void 0)}};
15var Ey=class extends ps{constructor(i,e,n,r,o){super(),this.cardModelFactory=i,this.config=e,this.sessionService=n,this.adultService=r,this.cardConfig=o}createCard(i,e,n){this.scheduleChannel=n;let r=n?.program?n.program:i.asset;e.image1.raw=this.getRecordingCardImage(r,e.orientation,e.size),(this.cardModelFactory.useBestSchedule(this.cardConfig)||this.cardModelFactory.showScheduleInfo(this.cardConfig))&&(e.channelImage=this.setChannelLogo(n?.channel)),this.cardModelFactory.showInfo(this.cardConfig)&&(e.labels=this.getLabels(r,n?.schedule,n?.channel),this.cardConfig.useOldEpgCardContent&&(e.oldTitle=this.getOldTitle(r),this.cardModelFactory.showScheduleInfo(this.cardConfig)&&(e.oldScheduleText=this.getOldScheduleInfo(n?.schedule?.published)))),e.action=this.getRecordingAction(i)}getRecordingCardImage(i,e,n){return this.cardModelFactory.getImageUrl(i,this.cardModelFactory.getImageRecipe(this.cardConfig.channelCardMode,e,n),e,this.cardConfig.allowedAdultMode)}setChannelLogo(i){return i?.defaultLogo?ot.createImageUrl(i.defaultLogo,me.CHANNEL_1):""}getLabels(i,e,n){let r=new us,o=new En;if(this.cardConfig.useOldEpgCardContent)o.addChannelInfo(this.sessionService,n);else{let s=this.getEpisodeTitle(i);s&&(r.line1=new En(s)),this.cardModelFactory.showScheduleInfo(this.cardConfig)&&o.addShortScheduleInfo(this.config,e?.published),this.cardModelFactory.showEpisodeInfo(this.cardConfig)&&o.addShortEpisodeInfo(i.season,i.episode)}return o.tags.length>0&&(r.line2=o),this.scheduleChannel?.schedule&&(r.icons=this.getAccessibilityIcons(this.scheduleChannel.schedule)),r}getOldTitle(i){return Pn.containsProperty(oe.SHOW_EPISODE_INFO,this.cardConfig.ribbonProperties,this.cardConfig.pageProperties)?this.cardModelFactory.getEpisodeProgramString(i.episode,i.episodeTitle,i.title):i.title}getOldScheduleInfo(i){if(i){let e=$.dateToDateTime(i.start).toFormat("dd/MM, HH:mm"),n=$.dateToDateTime(i.end).toFormat("HH:mm");return e.toString()+" - "+n.toString()}else return""}getEpisodeTitle(i){return i.adult&&!this.adultService.showAdult(this.cardConfig.allowedAdultMode)?this.config.getTranslation(wo.guide_adult_title):this.cardModelFactory.showEpisodeInfo(this.cardConfig)?i.episodeTitle?i.episodeTitle:i.episode?`${this.config.getTranslation(pe.detail_episode)??""} ${i.episode}`:i.title:i.title}getRecordingAction(i){return{actionId:i.asset.id,actionMethod:i.method,actionType:i.asset.type}}getExtraAction(){return!this.scheduleChannel?.channel||!this.scheduleChannel.schedule?C(void 0):this.cardModelFactory.getRecordingPlayAction(this.scheduleChannel,this.cardConfig.allowedAdultMode)}getAccessibilityIcons(i){return this.config.getSettingBoolean(x.showAccessibilityIcons,!1)?$.getAccessibilityIcons(i.accessibilityOptions):[]}};var Iy=class{selectValidQuote(){return this.validQuotes[0]}getStreamId(){return this.stream.streamId}getStreamType(){return this.stream.contentType}constructor(i,e){this.validQuotes=[],this.stream=i,this.validQuotes=e??[]}},ZI=class{constructor(i){this.stb=i}},JI=class{getStreamType(){return this.stream?this.stream.contentType:void 0}constructor(i,e,n,r){this.validQuotes=[],this.upsell=void 0,this.stream=i,this.validQuotes=e,this.stb=n,this.upsell=r}},wy=class{constructor(i,e,n,r,o){this.stbs=[],this.trailerStreams=[],this.watchableOttStreams=[],this.watchableStbStreams=[],this.upsellStbs=[],this.rentableOttStreams=[],this.vodId=i,this.quotes=e||[],this.ottPrice=n,this.stbPrices=r||[],this.stbs=o||[],this.calculateStreamRights()}calculateStreamRightsForNewQuotes(i){this.trailerStreams=[],this.watchableOttStreams=[],this.watchableStbStreams=[],this.upsellStbs=[],this.rentableOttStreams=[],this.upsell=void 0,this.quotes=i,this.calculateStreamRights()}calculateStreamRights(){this.checkForTrailerStreams(this.ottPrice),this.checkForPrice(this.quotes,this.ottPrice,!0),this.stbPrices.forEach((i,e)=>{this.checkForPrice(this.quotes,i,!1,this.stbs[e])})}getWatchableStbStream(i){let e=this.watchableStbStreams.filter(r=>r.stb&&r.stb.id===i),n;return e.forEach(r=>{(!n||$.resolutionTypeToNumber(r.stream.resolution)>$.resolutionTypeToNumber(n.stream.resolution))&&(n=r)}),n}ottStreamsLeftToRent(){return this.rentableOttStreams!==void 0&&this.rentableOttStreams.length!==0}isUpsellStb(i){return this.upsellStbs.some(e=>e.stb&&e.stb.id===i)}getWatchableOttStream(){let i;
15return this.watchableOttStreams.forEach(e=>{(!i||$.resolutionTypeToNumber(e.stream.resolution)>$.resolutionTypeToNumber(i.stream.resolution))&&(i=e)}),i}getUniqueStbsFromWatchabelStbStreamsAndUpsellStbsStreams(){let i=new Map;return this.watchableStbStreams.forEach(e=>{e.stb&&i.set(e.stb.id,e.stb)}),this.upsellStbs.forEach(e=>{e.stb&&i.set(e.stb.id,e.stb)}),Array.from(i.values())}hasWatchableOttSVOD(){return this.canWatch()&&this.watchableOttStreams.some(i=>i.stream&&i.stream.contentType===q.SVOD)}hasWatchableOttTVOD(){return this.canWatch()&&this.watchableOttStreams.some(i=>i.stream&&i.stream.contentType===q.TVOD)}hasWatchableOttFVOD(){return this.canWatch()&&this.watchableOttStreams.some(i=>i.stream&&i.stream.contentType===q.FVOD)}hasTrailer(){return this.trailerStreams.length>0}canRent(){return this.rentableOttStreams.length>0}canWatch(){return this.watchableOttStreams.length>0||this.watchableStbStreams.length>0||this.upsellStbs.length>0}hasBundles(){return this.ottPrice?.upsell?.bundles&&this.ottPrice.upsell.bundles.length>0||this.stbPrices.some(i=>i.upsell?.bundles&&i.upsell.bundles.length>0)}isWatchableBecauseOfBundle(){return this.canWatch()&&this.watchableOttStreams.some(i=>i.validQuotes.some(e=>e.purchaseType===as.BUNDLE))}hasWatchableStbSVOD(){return this.canWatch()&&this.watchableStbStreams.some(i=>i.stream&&i.stream.contentType===q.SVOD)}getValidQuotesForTVODS(i,e,n,r){let o=new Date().getTime(),s=n.filter(l=>l.purchaseType===as.TVOD&&l.resourceId===this.vodId&&l.items?.some(c=>c.itemId===e.streamId||i.some(d=>l.resourceId===d.streamId&&$.resolutionTypeToNumber(d.resolution)>$.resolutionTypeToNumber(e.resolution)))&&$.timeStringToMs(l.validFrom)<o&&$.timeStringToMs(l.validUntil)>o),a=[];return r&&r.forEach(l=>{if(l.resolutions){let c=n.filter(d=>d.resourceId===l.bundleId&&$.timeStringToMs(d.validUntil)>o&&d.items?.some(p=>l.resolutions?.some(y=>p.itemId===y.resolutionId&&$.resolutionTypeToNumber(y.resolution)>=$.resolutionTypeToNumber(e.resolution))));c&&(a=a.concat(c))}}),s.concat(a)}checkForPrice(i,e,n,r){this.upsell||(this.upsell=e?.upsell?.products?.at(0)?.products?.at(0)),e?.streams&&e.streams.length>0&&e.streams.forEach(s=>{if(s.streamType===lr.FULL){let a=this.getValidQuotesForTVODS(e.streams??[],s,i,e.upsell?.bundles??[]);s.contentType===q.FVOD||e.streams?.some(l=>l.streamType===lr.FULL&&l.contentType===q.FVOD&&$.resolutionTypeToNumber(l.resolution)>$.resolutionTypeToNumber(s.resolution))||s.contentType===q.SVOD||a.length>0||!n&&this.upsell!==void 0?n?this.watchableOttStreams.push(new Iy(s,a)):r&&this.watchableStbStreams.push(new JI(s,a,r)):n&&a.length===0&&s.contentType===q.TVOD&&this.rentableOttStreams.push(new Iy(s))}}),r&&e?.upsell?.products&&e?.upsell?.products.length>0&&this.upsellStbs.push(new ZI(r));let o=this.highestResolution(this.watchableOttStreams);this.rentableOttStreams=this.rentableOttStreams.filter(s=>!o||$.resolutionTypeToNumber(s.stream.resolution)>$.resolutionTypeToNumber(o)),this.rentableOttStreams.sort((s,a)=>$.resolutionTypeToNumber(s.stream.resolution)>$.resolutionTypeToNumber(a.stream.resolution)?-1:$.resolutionTypeToNumber(s.stream.resolution)<$.resolutionTypeToNumber(a.stream.resolution)?1:0)}highestResolution(i){let e;return i.forEach(n=>{(!e||$.resolutionTypeToNumber(n.stream.resolution)>$.resolutionTypeToNumber(e))&&(e=n.stream.resolution)}),e}checkForTrailerStreams(i){i?.streams&&i.streams.forEach(e=>{e.streamType===lr.TRAILER&&(e.contentType===q.FVOD||e.contentType===q.SVOD)&&this.trailerStreams.push(e)})}hasUpsell(){return!!this.upsell||this.upsellStbs.length>0}getFullVodStreams(){let i=[];return this.ottPrice?.streams&&(i=i.concat(this.ottPrice.streams.filter(e=>e.streamType===lr.FULL))),this.stbPrices&&this.stbPrices.forEach(e=>{e?.streams&&(i=i.concat(e.streams.filter(n=>n.streamType===lr.FULL)))}),i}getLatestValiQuoteForType(i){let e=[];return this.watchableOttStreams.forEach(n=>
15n.validQuotes.forEach(r=>{r.purchaseType===i&&e.push(r)})),$.getLastValidQuote(e)}getBundles(){let i=this.ottPrice?.upsell?.bundles??[],e=[];return this.stbPrices.forEach(n=>n.upsell?.bundles&&n.upsell.bundles.length>0?e=e.concat(n.upsell.bundles):void 0),e=e.filter((n,r)=>r===e.findIndex(o=>o.bundleId===n.bundleId)),e.filter(n=>!i.some(r=>r.bundleId===n.bundleId)).concat(i)}getBundle(i){let e;return this.ottPrice?.upsell?.bundles&&(e=this.ottPrice?.upsell?.bundles.find(n=>n.bundleId===i)),e||this.stbPrices.find(n=>!!n.upsell?.bundles?.find(r=>r.bundleId===i)),e}getLatestValidQuoteForBundle(i){let e=[];return this.watchableOttStreams.forEach(n=>n.validQuotes.forEach(r=>{r.purchaseType===as.BUNDLE&&r.resourceId===i&&e.push(r)})),$.getLastValidQuote(e)}};var Ty=class extends ps{constructor(i,e,n,r,o,s,a,l){super(),this.cardModelFactory=i,this.config=e,this.cardConfig=n,this.sessionService=r,this.adultService=o,this.purchaseCache=s,this.pricingApi=a,this.contentType=l}createCard(i,e){this.assetId=i.asset.id,e.image1.raw=this.cardModelFactory.getImageUrl(i.asset,this.cardModelFactory.getImageRecipe(this.cardConfig.channelCardMode,e.orientation,e.size),e.orientation,this.cardConfig.allowedAdultMode),e.labels=this.getCardLabels(i.asset),e.action={actionId:i.asset.id,actionMethod:i.method,actionType:i.asset.type}}getCardLabels(i){let e=new us;e.line1=new En,this.cardModelFactory.showEpisodeInfo(this.cardConfig)&&e.line1.addShortEpisodeInfo(i.season,i.episode);let n=this.getEpisodeTitle(i);if(n&&e.line1.add(n),e.line1.tags.length>0)return e}getEpisodeTitle(i){return this.cardModelFactory.showInfo(this.cardConfig)?this.cardModelFactory.showEpisodeInfo(this.cardConfig)&&i.episodeTitle||i.title:""}getExtraAction(){return!this.assetId||this.contentType===he.BUNDLE?C(void 0):this.cardConfig.ribbonProperties.includes(oe.SAVE_ASSET)?C({actionId:this.assetId,actionType:he.VOD,actionMethod:Xt.SAVE}):this.createPlayAction(this.assetId)}createPlayAction(i){return We({quotes:this.purchaseCache.getPurchases(),price:this.getPriceCall(i)}).pipe(P(({quotes:e,price:n})=>{let r=new wy(i,e,n);if(r?.watchableOttStreams&&r.watchableOttStreams.length>0)return{actionId:i,actionType:he.VOD,actionMethod:Xt.PLAY}}))}getPriceCall(i){let e=this.sessionService.entitlementId;return this.pricingApi.getVodPrice(i,ra.WEB,e)}};var wu=(()=>{class t{constructor(e,n){this.router=e,this.business=n,this.showGradientSubject=new qt(!0),this.router.events.subscribe(r=>{if(r instanceof Ci){let o=r.urlAfterRedirects?r.urlAfterRedirects:r.url;this.isSamePage(o,this.currentUrl)||(this.showGradientSubject.next(!1),this.currentBackdropImage=void 0),this.currentUrl=o}}),this.imageLocation=this.business.client.bootstrap.discovery.imageLocation}getBackDropImage(){return this.currentBackdropImage}setBackdropImage(e){e.includes("://")||(e=this.imageLocation+e),this.currentBackdropImage=e,this.showGradientSubject.next(!0)}isBackdropVisible(){return!!this.currentBackdropImage}isSamePage(e,n){let r=e?.split("?")[0],o=n?.split("?")[0];return r===o}static{this.\u0275fac=function(n){return new(n||t)(h(ft),h(st))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Uk=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p){this.adultService=e,this.backdropService=n,this.epgUtility=r,this.config=o,this.sessionService=s,this.business=a,this.environment=l,this.purchaseCache=c,this.pricingApi=d,this.stbCache=p,this.imageLocation=this.business.client.bootstrap.discovery.imageLocation}createCardModelFactory(e,n){switch(e){case he.CHANNEL:case he.PROGRAM:case he.SERIES:case he.SCHEDULE:return new Cy(this,this.config,this.sessionService,this.adultService,n);case he.BUNDLE:case he.VOD:return new Ty(this,this.config,n,this.sessionService,this.adultService,this.purchaseCache,this.pricingApi,e);case he.ARTICLE:case he.PAGE:return new Sy(this,n);case he.RECORDING:return new Ey(this,this.config,this.sessionService,this.adultService,n);default:throw new Error("Unsupported content type")}}getScheduledInfo(e,n,r){let o;if(e.channels&&(this.showScheduleInfo(n)||this.useBestSchedule(n))){let s=this.getValidSchedules(e.channels,r,n
15);return o=this.findScheduleAndChannel(s,r,n),(this.useBestSchedule(n)||this.showScheduleInfo(n)||e.asset.type===he.SCHEDULE)&&(o.program=this.findProgramDetail(e,o.schedule)),o}else if(e.asset.type===he.CHANNEL)return{channel:r.find(s=>s.id===e.asset.id)}}showInfo(e){return!Pn.containsProperty(oe.HIDE_INFO,e.ribbonProperties,e.pageProperties)}showScheduleInfo(e){return Pn.containsProperty(oe.SHOW_SCHEDULE_INFO,e.ribbonProperties,e.pageProperties)}useBestSchedule(e){return Pn.containsProperty(oe.USE_BEST_SCHEDULE,e.ribbonProperties,e.pageProperties)}showEpisodeInfo(e){return Pn.containsProperty(oe.SHOW_EPISODE_INFO,e.ribbonProperties,e.pageProperties)}isReplay(e){return Pn.isReplay(e.ribbonProperties,e.pageProperties)}useLiveThumbnail(e){return this.environment.atvFeatureList.includes(ln.CHANNEL_LIVE_THUMBNAIL)&&Pn.containsProperty(oe.LIVE_THUMBNAIL,e.ribbonProperties,e.pageProperties)}getImageUrl(e,n,r,o){if(!e.image)return this.getDefaultImage(r);let s=`${e.image.includes("://")?"":this.imageLocation}${e.image}`;return $.getPosterImage(s,n,e.adult&&!this.adultService.showAdult(o),r)}getImageRecipe(e,n,r){if(e===Ht.TOGGLE||e===Ht.LOGO)return me.CHANNEL_1;if(n===nt.LANDSCAPE)switch(r){case rn.SMALL:return me.CARD_LANDSCAPE_SMALL_2;case rn.MEDIUM:return me.CARD_LANDSCAPE_MEDIUM_2;case rn.NORMAL:return me.CARD_LANDSCAPE_NORMAL_2;case rn.LARGE:return me.CARD_LANDSCAPE_LARGE_2;case rn.EXTRA_LARGE:return me.CARD_LANDSCAPE_EXTRA_LARGE_2}else switch(r){case rn.SMALL:return me.CARD_PORTRAIT_SMALL_2;case rn.MEDIUM:return me.CARD_PORTRAIT_MEDIUM_2;case rn.NORMAL:return me.CARD_PORTRAIT_NORMAL_2;case rn.LARGE:return me.CARD_PORTRAIT_LARGE_2;case rn.EXTRA_LARGE:return me.CARD_PORTRAIT_EXTRA_LARGE_2}}getDefaultImage(e){return e===nt.LANDSCAPE?"./assets/theme/images/default_landscape_poster.png":"./assets/theme/images/default_portrait_poster.png"}getValidSchedules(e,n,r){let o=[],s=[];return e.forEach(a=>{let l=n?.find(c=>c.id===a.id);l&&this.isReplay(r)&&(l.hasOttRight(q.REPLAY)||l.hasOttRight(q.LINEAR))?a.schedules?.forEach(c=>{o.push({scheduleId:c.id??"",programId:c.programId??"",published:{start:new Date(c.published.start),end:new Date(c.published.end)},blackouts:c.blackouts,channelId:l.id,accessibilityOptions:c.accessibilityOptions,rights:c.rights})}):a.schedules?.forEach(c=>{s.push({scheduleId:c.id??"",programId:c.programId??"",published:{start:new Date(c.published.start),end:new Date(c.published.end)},blackouts:c.blackouts,channelId:l?l.id:"",accessibilityOptions:c.accessibilityOptions,rights:c.rights})})}),o.length===0?s:o}findScheduleAndChannel(e,n,r){let o=this.epgUtility.findClosestScheduleV5(e,this.isReplay(r),n??[]),s;return o&&(s=n?.find(a=>a.id===o.channelId)),{schedule:o,channel:s}}findProgramDetail(e,n){return e.asset.type===he.PROGRAM?e.asset:e.resources?.find(r=>r.type===he.PROGRAM&&n&&r.id===n.programId)}getLinearPlayAction(e){if(e.schedule&&tn.scheduleIsLive(e.schedule)&&this.epgUtility.scheduleHasRight(e.schedule,q.LINEAR))return{actionId:e.channel.i
15d,actionType:he.CHANNEL,actionMethod:Xt.PLAY}}getReplayPlayAction(e){if(e.schedule&&this.epgUtility.scheduleIsReplay(e.schedule)&&this.epgUtility.scheduleHasRight(e.schedule,q.REPLAY))return{actionId:e.schedule.scheduleId,actionType:he.SCHEDULE,actionMethod:Xt.PLAY}}getRecordingPlayAction(e,n){return this.stbCache.getRecordingForProgram(e.schedule?.programId,e.channel.id,this.adultService.showAdult(n)).pipe(P(r=>{if(this.epgUtility.canPlayRecording(r,e.schedule,e.channel))return{actionId:r.identifier,actionType:he.RECORDING,actionMethod:Xt.PLAY}}))}getEpisodeProgramString(e,n,r){let o="";return e=e||0,n=n||"",e>0?n?o=`${this.config.getTranslation(pe.detail_episode_short)||""} ${e.toString()} \xB7 ${n}`:o=`${this.config.getTranslation(pe.detail_episode)||""} ${e.toString()}`:n?o=n:o=r||"",o}static{this.\u0275fac=function(n){return new(n||t)(h($e),h(wu),h(tn),h(O),h(ne),h(st),h(ae),h(es),h(iu),h(xn))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Bk=(()=>{class t{constructor(e,n){this.business=e,this.http=n,this.thumbnailLocation=this.business.client.bootstrap.discovery.thumbnailLocation}getThumbnail(e){let n=this.thumbnailLocation.replace(/\/$/,""),r=e.replace(/^\//,""),o=e.includes("://")?e:`${n}/${encodeURIComponent(r)}`;return this.http.get(o,{responseType:"blob"}).pipe(P(s=>URL.createObjectURL(s)))}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(on))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var R6=["card"],x6=["cardSize",""],M6=(t,i)=>({"-webkit-mask":t,mask:i});function P6(t,i){if(t&1&&M(0,"div",14),t&2){let e=_(2);H("portrait-count",e.cardModel.orientation!==e.CardOrientation.LANDSCAPE)("landscape-count",e.cardModel.orientation===e.CardOrientation.LANDSCAPE)("extra-large",e.cardSize===e.CardSize.EXTRA_LARGE)("large",e.cardSize===e.CardSize.LARGE)("medium",e.cardSize===e.CardSize.MEDIUM)("normal",e.cardSize===e.CardSize.NORMAL)("small",e.cardSize===e.CardSize.SMALL),S("ngStyle",od(15,M6,"url(assets/theme/svg/top"+e.countNumber+".svg) no-repeat center / cover}","url(assets/theme/svg/top"+e.countNumber+".svg) no-repeat center / cover"))}}function O6(t,i){if(t&1&&M(0,"img",6),t&2){let e=_(2);S("src",wa(e.cardModel.favoriteIcon),Je)}}function N6(t,i){if(t&1){let e=B();m(0,"div",15),A("click",function(r){k(e);let o=_(2);return L(o.doOverrideAction(r))}),M(1,"div",16),g()}if(t&2){let e=_(2);H("full",!e.cardModel.canShowDetail),u(),H("card-play-icon",e.cardModel.overrideAction.actionMethod===e.CmsActionMethod.PLAY)("card-save-icon",e.cardModel.overrideAction.actionMethod===e.CmsActionMethod.SAVE)}}function k6(t,i){if(t&1&&M(0,"img",18),t&2){let e=_(3);S("src",wa(e.cardModel.channelImage),Je)}}function L6(t,i){if(t&1&&(m(0,"div",17),E(1,k6,1,2,"img",18),g()),t&2){let e=_(2);H("gradient",!e.useOldEpgCardContent),u(),I(e.useOldEpgCardContent?-1:1)}}function F6(t,i){if(t&1&&(m(0,"div",19),M(1,"img",20)(2,"img",20),g()),t&2){let e=_(2);H("background-contain",e.isChannelBackgroundImg())("background-cover",!e.isChannelBackgroundImg()),u(),H("img-visible",e.img1Visible),S("src",e.cardModel.image1.url||e.cardModel.image1.raw,Je),u(),H("img-visible",!e.img1Visible),S("src",e.cardModel.image2.url||e.cardModel.image2.raw,Je)}}function V6(t,i){if(t&1&&(m(0,"div",12),N(1),g()),t&2){let e=_(2);u(),ce(" ",e.cardModel.oldScheduleText," ")}}function U6(t,i){if(t&1&&M(0,"app-generic-card-labels",13),t&2){let e=_(2);S("info",e.cardModel.labels)("useOldStyle",e.useOldEpgCardContent)("oldTitle",e.cardModel.oldTitle)}}function B6(t,i){if(t&1){let e=B();m(0,"div",2),E(1,P6,1,18,"div",3),m(2,"a",4,0),A("click",function(r){k(e);let o=_();return L(o.doAction(r))})("keyup",function(r){k(e);let o=_();return L(o.doAction(r))}),m(4,"div",5),E(5,O6,1,2,"img",6),E(6,N6,2,6,"div",7),E(7,L6,2,3,"div",8),E(8,F6,3,10,"div",9),m(9,"div",10),M(10,"app-progress-bar",11),E(11,V6,2,1,"div",12),g()(),E(12,U6,1,3,"app-generic-card-labels",13),g()()}if(t&2){let e=_();H("card-count-container-landscape",e.cardModel.orientation===e.CardOrientation.LANDSCAPE),u(),I(e.countNumber!==void 0?1:-1),u(),H("portrait-card",e.cardModel.orientation!==e.CardOrientation.LANDSCAPE)("landscape-card",e.cardModel.orientation===e.CardOrientation.LANDSCAPE)("extra-large",e.cardSize===e.CardSize.EXTRA_LARGE)("large",e.cardSize===e.CardSize.LARGE)("medium",e.cardSize===e.CardSize.MEDIUM)("normal",e.cardSize===e.CardSize.NORMAL)("small",e.cardSize===e.CardSize.SMALL),u(3),I(e.channelCardMode===e.ChannelCardModes.TOGGLE?5:-1),u(),I(e.cardModel.overrideAction?6:-1),u(),I(e.cardModel.channelImage?7:-1),u(),I(e.showImage?8:-1),u(2),H("hidden",e.cardModel.progressPercentage===void 0)("old-styling",e.useOldEpgCardContent),S("progressPercentage",e.cardModel.progressPercentage),u(),I(e.useOldEpgCardContent&&e.cardModel.oldScheduleText?11:-1),u(),I(e.cardModel.labels?12:-1)}}var Dy=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T,W,j,ee,De,tt,Se,ar){this.cdr=e,this.config=n,this.bookmarkCache=r,this.adultService=o,this.actionService=s,this.epgUtility=a,this.stbCache=l,this.channelCache=c,this.router=d,this.favoriteCacheService=p,this.listPageResolver=y,this.cardModelFactory=b,this.activatedRoute=T,this.is=W,this.sanitizer=j,this.auth=ee,this.detailService=De,this.player=tt,this.environment=Se,this.purchaseCache=ar,this.cardOrientation=nt.LANDSCAPE,this.isOnDetailPage=!1,this.isOnSearchPage=!1,this.ChannelCardModes=Ht,this.CardOrientation=nt,this.CardSize=rn,this.showImage=!1,this.show
15FullDetail=!0,this.useOldEpgCardContent=!1,this.img1Visible=!0,this.CmsActionMethod=Xt,this.useOldEpgCardContent=this.config.getSettingBoolean(x.useOldEpgCards,!1),this.showInfo=this.config.getSettingBoolean(x.showVodTitles,!1),this.liveThumbnailMaxDuration=this.config.getSettingNumber(x.epgLiveThumbnailMaxDuration,600)}set asset(e){if(e.asset){switch(this.rootItem=e,this.cardModel=new _y(this.cardOrientation,this.cardSize,this.environment.detailFeature),e.asset.type){case he.CHANNEL:this.channelCache.getChannels().subscribe(n=>{this.createEpgCard(e,n),this.detectChanges()});break;case he.PROGRAM:case he.SERIES:case he.SCHEDULE:case he.RECORDING:this.cardModelFactory.showScheduleInfo(this.getCardConfig())||this.cardModelFactory.useBestSchedule(this.getCardConfig())||this.cardModelFactory.useLiveThumbnail(this.getCardConfig())?this.channelCache.getChannels().subscribe(n=>{this.createEpgCard(e,n),this.detectChanges()}):this.createEpgCard(e);break;case he.BUNDLE:case he.VOD:this.createVodCard(e);break;case he.ARTICLE:case he.PAGE:this.createGenericCard(e);break}this.detectChanges()}}ngAfterViewInit(){if(this.cardRef){let e=new Ot;e.pipe(Ti(0)).subscribe(n=>{n?(this.showImage||this.checkExtraAction(),this.showImage=!0,!this.cardModel.image1.raw&&this.cardModel.thumbnailUrl&&this.refreshThumbnail(),this.setThumbnailRefreshTimeout(),this.detectChanges()):this.clearThumbnailRefreshTimeout()}),this.intersectionObserver=new IntersectionObserver(n=>{n.length>0&&e.next(n[0].isIntersecting)},{rootMargin:"400px"}),this.intersectionObserver.observe(this.cardRef.nativeElement)}}doAction(e){if(!(e instanceof KeyboardEvent&&e.key!=="Enter")){if(e.preventDefault(),this.rootItem.asset.type===he.CHANNEL){if(this.channelCardMode===Ht.LOGO){let n={};n[G.CHANNEL]=this.rootItem.asset.id;let r=this.listPageResolver.getListRouteForCurrentTopRoute();r&&this.router.navigate([r],{queryParams:n}).then();return}else if(this.channelCardMode===Ht.TOGGLE){this.toggleFavorite();return}}if(this.rootItem.asset.type===he.RECORDING&&this.rootItem.resources.length>1){this.isOnSearchPage?this.router.navigate(["recordings",this.rootItem.asset.id]).then():this.router.navigate([this.removePathParams(this.router.url),this.rootItem.asset.id],{replaceUrl:window.location.pathname.includes(ol.detailBaseRoute)}).then();return}this.cardModel?.action&&this.actionService.doAction(this.cardModel.action)}}doOverrideAction(e){e.preventDefault(),e.stopImmediatePropagation(),this.getOverrideAction().subscribe(n=>{n?this.actionService.doAction(n):this.doAction(e)})}getOverrideAction(){return this.cardFactory&&!this.isRecordingFolder()&&this.auth.isAuthorized()?this.cardFactory.getExtraAction():C(void 0)}showProgress(){return Pn.containsProperty(oe.SHOWPROGRESS,this.ribbonProperties,this.pageProperties)&&!!this.rootItem&&(!this.rootItem.asset.adult||this.adultService.showAdult(this.allowedAdultMode))}isRecordingFolder(){return this.rootItem.asset.type===he.RECORDING&&this.rootItem.resources.length>1}getFolderNumber(){return Math.min(this.rootItem.resources.length,99)}isChannelBackgroundImg(){return this.cardModel.action&&this.cardModel.action.actionType===he.CHANNEL}createVodCard(e){this.cardFactory=this.cardModelFactory.createCardModelFactory(e.asset.type,this.getCardConfig()),this.cardFactory.createCard(e,this.cardModel),this.showProgress()&&this.setProgressFromBookmark(vo.VOD,e.asset.id),this.purchaseRefreshSubscription=this.purchaseCache.purchaseUpdateEvent.subscribe({next:()=>{this.showImage&&this.checkExtraAction()}})}createEpgCard(e,n){let r=this.cardModelFactory.getScheduledInfo(e,this.getCardConfig(),n);this.cardFactory=this.cardModelFactory.createCardModelFactory(e.asset.type,this.getCardConfig()),this.cardFactory.createCard(e,this.cardModel,r);let o=r?.program?r?.program:e.asset;this.setFavoriteIcon(o),this.showProgress()?!this.setProgressFromSchedule(r?.schedule)&&o.type===he.PROGRAM&&this.setProgressFromBookmark(vo.PROGRAM,o.id):this.setProgressFromSchedule(r?.schedule),r?.program&&this.setRecordingInformation(r.program,r.schedule,r.channel),this.showImage&&!this.cardModel.image1.raw&&(this.refreshThumbnail(),this.setThumbnailRefreshTimeout())}checkExtraAction(){this.getOverrideAction().subscribe(e=>{this.cardModel&&(e&&(this.cardModel.overrideAction=e),this.detectChanges())})}setThumbnailRefreshTimeout(){if(this.cardModel.thumbnailUrl&&!this.thumbnailRefreshSubscription){let e=this.cardModel.thumbnailRefresh*1e3+Math.random()*1e4,n=Math.floor(this.liveThumbn
15ailMaxDuration*1e3/e);this.thumbnailRefreshSubscription=qu(e).pipe(hi(n)).subscribe(()=>{this.showImage&&!this.detailService.isOverlayOpen()&&!this.player.playerOverlayVisible&&this.refreshThumbnail()})}}clearThumbnailRefreshTimeout(){this.thumbnailRefreshSubscription?.unsubscribe(),this.thumbnailRefreshSubscription=void 0}refreshThumbnail(){this.is.getThumbnail(this.cardModel.thumbnailUrl).subscribe({next:e=>{let n;this.img1Visible&&this.cardModel.image1.url?(n=this.cardModel.image1.raw,this.cardModel.image2.url=this.sanitizer.bypassSecurityTrustUrl(e),this.cardModel.image2.raw=e,this.img1Visible=!1):(n=this.cardModel.image2.raw,this.cardModel.image1.url=this.sanitizer.bypassSecurityTrustUrl(e),this.cardModel.image1.raw=e,this.img1Visible=!0),n&&URL.revokeObjectURL(n),this.detectChanges()},error:()=>{if(this.cardModel.image1.raw)return;let n=this.cardModelFactory.getImageUrl(this.rootItem.asset,me.CHANNEL_1,this.cardOrientation,this.allowedAdultMode);this.cardModel.image1.url=this.sanitizer.bypassSecurityTrustUrl(n),this.cardModel.image1.raw=n,this.img1Visible=!0,this.detectChanges()}})}createGenericCard(e){this.cardFactory=this.cardModelFactory.createCardModelFactory(e.asset.type,this.getCardConfig()),this.cardFactory.createCard(e,this.cardModel)}setProgressFromSchedule(e){return e&&tn.scheduleIsLive(e)?(this.cardModel.progressPercentage=this.epgUtility.calculateProgressPercentage(e.published),!0):!1}setProgressFromBookmark(e,n){this.loadBookmarkFromCache(e,n),this.bookmarkCache.bookmarkUpdateEvent.subscribe(()=>{this.loadBookmarkFromCache(e,n)})}setFavoriteIcon(e){this.channelCardMode===Ht.TOGGLE&&e.type===he.CHANNEL&&this.getFavoriteIcon(cn.CHANNEL,e.id).subscribe(n=>this.cardModel.favoriteIcon=n)}setRecordingInformation(e,n,r){e&&r&&this.cardModelFactory.showInfo(this.getCardConfig())&&this.stbCache.getRecordingForProgram(e.id,r.id,this.adultService.showAdult(Me.ANY)).subscribe({next:o=>{let s=this.rootItem.asset.type===he.RECORDING;if(o&&this.isRecordingFolder())this.cardModel?.labels?.icons.push(o.getIcon()),this.cardModel.labels.folderNr=this.getFolderNumber(),s&&o.deleteProtected&&this.cardModel?.labels?.icons.push("./assets/theme/svg/recording_locked.svg");else{let a=this.epgUtility.getPlayIcon(n,r,o,s);a&&this.cardModel?.labels?.icons.push(a),o&&this.cardModel?.labels?.icons.push(o.getIcon()),s&&o?.deleteProtected&&this.cardModel?.labels?.icons.push("./assets/theme/svg/recording_locked.svg"),this.detectChanges()}this.detectChanges()},error:()=>{let o=this.rootItem.asset.type===he.RECORDING;this.detectChanges();let s=this.epgUtility.getPlayIcon(n,r,void 0,o);s&&(this.cardModel?.labels?.icons.push(s),this.detectChanges())}})}getCardConfig(){return{ribbonProperties:this.ribbonProperties,pageProperties:this.pageProperties,allowedAdultMode:this.allowedAdultMode,useOldEpgCardContent:this.useOldEpgCardContent,showInfo:this.showInfo,channelCardMode:this.channelCardMode}}removePathParams(e){let n=this.activatedRoute.snapshot.params;if(n){let r=Object.values(n);r.every(o=>e.includes(o))&&r.forEach(o=>e=e.replace("/"+o,""))}return e}loadBookmarkFromCache(e,n){this.bookmarkCache.getBookmark(e,n).subscribe(r=>{r&&this.cardModel&&(this.cardModel.progressPercentage=r.position/r.size*100,this.detectChanges())})}toggleFavorite(){let e=this.cmsToFavoriteContentType(this.rootItem.asset.type);this.favoriteCacheService.isFavorite(e,this.rootItem.asset.id).subscribe(n=>{n?(this.cardModel.favoriteIcon="./assets/theme/svg/favoritesicon_normal.svg",this.favoriteCacheService.deleteFavorite(e,this.rootItem.asset.id)):(this.cardModel.favoriteIcon="./assets/theme/svg/favoritesicon_selected.svg",this.favoriteCacheService.setFavorite(e,this.rootItem.asset.id))})}getFavoriteIcon(e,n){return this.favoriteCacheService.isFavorite(e,n).pipe(P(r=>$.getFavoriteIcon(r)))}cmsToFavoriteContentType(e){switch(e){case he.VOD:return cn.VOD;case he.PROGRAM:return cn.PROGRAM;case he.SERIES:return cn.SERIES;case he.CHANNEL:return cn.CHANNEL;default:throw new Error(`invalid favorite content type ${e}`)}}detectChanges(){this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges()}ngOnDestroy(){this.intersectionObserver?.disconnect(),this.stbRecordingChangeSubscription?.unsubscribe(),this.purchaseRefreshSubscription?.unsubscribe(),this.clearThumbn
15ailRefreshTimeout()}static{this.\u0275fac=function(n){return new(n||t)(f(Pe),f(O),f(eu),f($e),f(hu),f(tn),f(xn),f(Jn),f(ft),f(ui),f(by),f(Uk),f(_t),f(Bk),f(FE),f(et),f(Iu),f(ds),f(ae),f(es))}}static{this.\u0275cmp=D({type:t,selectors:[["app-generic-card","cardSize",""]],viewQuery:function(n,r){if(n&1&&Ve(R6,5),n&2){let o;be(o=Ce())&&(r.cardRef=o.first)}},inputs:{ribbonProperties:"ribbonProperties",pageProperties:"pageProperties",channelCardMode:"channelCardMode",cardOrientation:"cardOrientation",cardSize:"cardSize",allowedAdultMode:"allowedAdultMode",isOnDetailPage:"isOnDetailPage",scrollElement:"scrollElement",isOnSearchPage:"isOnSearchPage",countNumber:"countNumber",asset:"asset"},attrs:x6,decls:1,vars:1,consts:[["card",""],[1,"card-count-container",3,"card-count-container-landscape"],[1,"card-count-container"],[1,"count-background",3,"portrait-count","landscape-count","extra-large","large","medium","normal","small","ngStyle"],["tabindex","0",1,"card",3,"click","keyup"],[1,"card-info"],["alt","",1,"favorite-icon",3,"src"],[1,"card-play-icon-container",3,"full"],[1,"channel-image-container",3,"gradient"],[1,"main-image-container",3,"background-contain","background-cover"],[1,"card-overlay"],["background","white",1,"card-progress",3,"progressPercentage"],[1,"card-info-old-schedule","font-highlighted-label-small"],[1,"card-detail-info",3,"info","useOldStyle","oldTitle"],[1,"count-background",3,"ngStyle"],[1,"card-play-icon-container",3,"click"],[1,"card-action-icon"],[1,"channel-image-container"],["alt","",3,"src"],[1,"main-image-container"],["alt","",1,"main-image",3,"src"]],template:function(n,r){n&1&&E(0,B6,13,28,"div",1),n&2&&I(r.cardModel?0:-1)},dependencies:[yy,Fk,Us],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}[_nghost-%COMP%]:hover   .card-info[_ngcontent-%COMP%]{border-color:#ca7ef1;transition:border-color .3s ease}.card[_ngcontent-%COMP%]{cursor:pointer;display:flex;flex-direction:column}.card-info[_ngcontent-%COMP%]{border-radius:.67rem;border:2px solid transparent;overflow:hidden;position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.card-action-icon[_ngcontent-%COMP%]{width:4rem;height:4rem;margin:auto;background-size:contain;border-radius:100%}.card-play-icon[_ngcontent-%COMP%]{background-image:url(assets/theme/svg/play.svg);background-color:#030d2b}.card-save-icon[_ngcontent-%COMP%]{background-image:url(assets/theme/svg/download.svg)}.card-play-icon-container[_ngcontent-%COMP%]{width:4rem;height:4rem;position:absolute;z-index:1;opacity:0;transition:all .3s ease}.full[_ngcontent-%COMP%]{width:100%;height:100%;display:flex}.card-play-icon[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-left:.5rem;height:1.875rem;align-self:center}.card[_ngcontent-%COMP%]:hover   .card-play-icon-container[_ngcontent-%COMP%]{transform:scale(1);opacity:1;transition:all .3s ease}.card-count-container[_ngcontent-%COMP%]{display:flex;align-items:center}.card-count-container-landscape[_ngcontent-%COMP%]{align-items:baseline}.count-background[_ngcontent-%COMP%]{background-color:#ca7ef1;margin-right:2px}.landscape-card.small[_ngcontent-%COMP%]{width:15.3125rem}.landscape-card.small[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:8rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.small[_ngcontent-%COMP%]{width:10.5rem}.landscape-card.small[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:5rem}}.landscape-card.medium[_ngcontent-%COMP%]{width:18.59375rem}.landscape-card.medium[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:10rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.medium[_ngcontent-%COMP%]{width:12.75rem}.landscape-card.medium[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:7rem}}.landscape-card.normal[_ngcontent-%COMP%]{width:21.875rem}.landscape-card.normal[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:12rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.normal[_ngcontent-%COMP%]{width:15rem}.landscape-card.normal[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:8rem}}
15.landscape-card.large[_ngcontent-%COMP%]{width:25.15625rem}.landscape-card.large[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:14rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.large[_ngcontent-%COMP%]{width:17.25rem}.landscape-card.large[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:9rem}}.landscape-card.extra-large[_ngcontent-%COMP%]{width:28.4375rem}.landscape-card.extra-large[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:15rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.extra-large[_ngcontent-%COMP%]{width:19.5rem}.landscape-card.extra-large[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:10rem}}.portrait-card.small[_ngcontent-%COMP%]{width:10.0625rem}.portrait-card.small[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:14rem}.portrait-card.small[_ngcontent-%COMP%]   .main-image[_ngcontent-%COMP%]{height:100%}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.small[_ngcontent-%COMP%]{width:6.86875rem}.portrait-card.small[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:9rem}}.portrait-card.medium[_ngcontent-%COMP%]{width:12.21875rem}.portrait-card.medium[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:17rem}.portrait-card.medium[_ngcontent-%COMP%]   .main-image[_ngcontent-%COMP%]{height:100%}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.medium[_ngcontent-%COMP%]{width:8.340625rem}.portrait-card.medium[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:11rem}}.portrait-card.normal[_ngcontent-%COMP%]{width:14.375rem}.portrait-card.normal[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:20rem}.portrait-card.normal[_ngcontent-%COMP%]   .main-image[_ngcontent-%COMP%]{height:100%}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.normal[_ngcontent-%COMP%]{width:9.8125rem}.portrait-card.normal[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:14rem}}.portrait-card.large[_ngcontent-%COMP%]{width:16.53125rem}.portrait-card.large[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:23rem}.portrait-card.large[_ngcontent-%COMP%]   .main-image[_ngcontent-%COMP%]{height:100%}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.large[_ngcontent-%COMP%]{width:11.284375rem}.portrait-card.large[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:16rem}}.portrait-card.extra-large[_ngcontent-%COMP%]{width:18.6875rem}.portrait-card.extra-large[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:26rem}.portrait-card.extra-large[_ngcontent-%COMP%]   .main-image[_ngcontent-%COMP%]{height:100%}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.extra-large[_ngcontent-%COMP%]{width:12.75625rem}.portrait-card.extra-large[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{height:18rem}}.landscape-count.small[_ngcontent-%COMP%]{height:6rem;width:3rem}.portrait-count.small[_ngcontent-%COMP%]{height:10rem;width:5rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-count.small[_ngcontent-%COMP%]{height:4rem;width:2rem}.portrait-count.small[_ngcontent-%COMP%]{height:6rem;width:3rem}}.landscape-count.medium[_ngcontent-%COMP%]{height:7rem;width:3.5rem}.portrait-count.medium[_ngcontent-%COMP%]{height:12rem;width:6rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-count.medium[_ngcontent-%COMP%]{height:5rem;width:2.5rem}
15.portrait-count.medium[_ngcontent-%COMP%]{height:8rem;width:4rem}}.landscape-count.normal[_ngcontent-%COMP%]{height:8rem;width:4rem}.portrait-count.normal[_ngcontent-%COMP%]{height:14rem;width:7rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-count.normal[_ngcontent-%COMP%]{height:5rem;width:2.5rem}.portrait-count.normal[_ngcontent-%COMP%]{height:9rem;width:4.5rem}}.landscape-count.large[_ngcontent-%COMP%]{height:9rem;width:4.5rem}.portrait-count.large[_ngcontent-%COMP%]{height:16rem;width:8rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-count.large[_ngcontent-%COMP%]{height:6rem;width:3rem}.portrait-count.large[_ngcontent-%COMP%]{height:11rem;width:5.5rem}}.landscape-count.extra-large[_ngcontent-%COMP%]{height:11rem;width:5.5rem}.portrait-count.extra-large[_ngcontent-%COMP%]{height:18rem;width:9rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-count.extra-large[_ngcontent-%COMP%]{height:7rem;width:3.5rem}.portrait-count.extra-large[_ngcontent-%COMP%]{height:12rem;width:6rem}}.channel-image-container[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:10.9375rem;height:6.15234375rem;display:flex;justify-content:flex-end;z-index:5}.channel-image-container.gradient[_ngcontent-%COMP%]{background-image:radial-gradient(ellipse at top right,#000000b3 0,#0000 70%)}.channel-image-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{padding:10px;max-height:3.69140625rem;max-width:6.5625rem;object-fit:contain}.main-image-container[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;background-repeat:no-repeat;background-position:center;background-color:#292a2b;display:flex;flex-direction:column;justify-content:center}.main-image[_ngcontent-%COMP%]{position:absolute;width:100%;background-size:cover;transition:opacity .86s ease-in-out;transform:translateZ(0)}.main-image.img-visible[_ngcontent-%COMP%]{opacity:1}.main-image[_ngcontent-%COMP%]:not(.img-visible){opacity:0}.background-cover[_ngcontent-%COMP%]{background-size:cover}.background-contain[_ngcontent-%COMP%]{background-size:contain}.favorite-icon[_ngcontent-%COMP%]{z-index:6;width:1.875rem;margin-top:.3125rem;margin-right:.3125rem;position:absolute;top:0;right:0}.card-overlay[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse;position:absolute;bottom:0;width:100%}.card-progress[_ngcontent-%COMP%]{margin:.34rem 0;padding:0 .67rem;width:100%;height:.34rem}.card-progress.old-styling[_ngcontent-%COMP%]{margin:0;padding:0}.card-info-old-schedule[_ngcontent-%COMP%]{align-self:flex-end;padding:.55rem;margin:.55rem;border-radius:1.015rem;background:#000000b3}.card-detail-info[_ngcontent-%COMP%]{margin-top:calc(.5rem - 2px)}"],changeDetection:0})}}return t})();var j6=["placeholder"];function H6(t,i){if(t&1&&(m(0,"h4",3),N(1),g()),t&2){let e=_();u(),ce(" ",e.gridVisualModel.title," ")}}function $6(t,i){if(t&1&&(m(0,"div",7),M(1,"app-generic-card",11),g()),t&2){let e=i.$implicit,n=_(),r=Ho(6);u(),S("cardOrientation",n.cardOrientation)("pageProperties",n.pageProperties)("channelCardMode",n.gridChannelCardMode)("ribbonProperties",n.grid.properties)("allowedAdultMode",n.allowedAdultMode)("scrollElement",r)("cardSize",n.CardSize.NORMAL)("asset",e)("isOnSearchPage",n.isOnSearchPage)}}var KI=class{constructor(){this.title="",this.contentMessage=""}},fs=(()=>{class t{constructor(e){this.cdr=e,this.noResultText="",this.pageProperties=[],this.isOnSearchPage=!1,this.visibilityChanged=new Y,this.gridVisualModel=new KI,this.CardSize=rn,this.CardOrientation=nt,this.gridPage=0,this.gridContents=[],this.allDataRetrieved=!1,this.gettingResults=!1,this.hideGrid=!1,this.showContentMessage=!1,this.contentRequests=[],this.hasResults=!0,this.endOfPageVisible=!1,this.gridRequestsSubject=new qt(null),this.gridChannelCardMode=Ht.NONE}ngOnInit(){this.gridRequestsSubject.pipe(Ti(50),dr(()=>C(void 0))).subscribe(()=>{this.endOfPageVisible&&this.getGridContent()})}ngAfterViewInit(){this.detectChanges(),this.intersectionObserver=new IntersectionObserver(e=>{e[0]?.isIntersecting?(this.endOfPageVisible=!0,!this.gettingResults&&!this.allDataRetrieved&&this.gridRequestsSubject.next(null)):this.endOfPageVisible=!1},{rootMargin:"400px"}),this.intersectionObserver.observe(this.placeholder.nativeElement)}ngOnChanges(){this.resetGrid(),this.gridVisualModel.title=this.grid?.title,this.grid.contentProvider?.resetPaging(),this.gridRequestsSubject.next(null),this.detectChanges()}getPlaceholderItemStyling(){return this.grid.orientation===nt.LANDSCAPE?"landscape-card-placeholder":"portrait-card-placeholder"}checkHasResults(){if(this.gettingResults){this.hasResults=!0;return}if((!this.gridContents||this.gridContents.length===0)&&this.allDataRetrieved){this.hasResults=!1;return}this.hasResults=!0}
15resetGrid(){this.gridPage=0,this.contentRequests.forEach(e=>e.unsubscribe()),this.contentRequests=[],this.gridContents=[],this.allDataRetrieved=!1,this.gettingResults=!1,this.hideGrid=!1,this.visibilityChanged.emit(),this.showContentMessage=!1}detectChanges(){this.checkHasResults(),this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges()}getGridContent(){if(!this.grid){this.hideGrid=!0,this.visibilityChanged.emit(),this.detectChanges();return}if(this.allDataRetrieved){this.detectChanges();return}if(this.grid.contentProvider?.hasNext()){this.gettingResults=!0;let e=this.grid.contentProvider.getItems().pipe(Gi(()=>{this.gridContents.length===0&&this.gridBackupContent()})).subscribe(n=>(this.gettingResults=!1,this.handleItems(n)));this.contentRequests.push(e)}else this.grid.contentProvider||this.gridBackupContent()}handleItems(e){if(!e||e.length===0){this.allDataRetrieved=!0;return}this.cardOrientation=this.grid.contentProvider?.getOrientation(),this.allDataRetrieved=!this.grid.contentProvider?.hasNext(),this.gridContents||(this.gridContents=[]),this.gridContents=this.gridContents.concat(e),this.visibilityChanged.emit(),this.detectChanges(),this.endOfPageVisible&&this.gridRequestsSubject.next(null)}gridBackupContent(){if(!this.grid){this.hideGrid=!0,this.visibilityChanged.emit(),this.detectChanges();return}this.grid.contents&&this.grid.contents.length!==0?(this.gridContents=this.grid.contents,this.allDataRetrieved=!0):this.grid.contentMessage&&this.grid.contentMessage!==""?(this.gridVisualModel.contentMessage=this.grid.contentMessage,this.showContentMessage=!0,this.allDataRetrieved=!0):(this.hideGrid=!0,this.visibilityChanged.emit(),this.allDataRetrieved=!0),this.detectChanges()}ngOnDestroy(){this.intersectionObserver?.disconnect()}static{this.\u0275fac=function(n){return new(n||t)(f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-grid"]],viewQuery:function(n,r){if(n&1&&Ve(j6,5),n&2){let o;be(o=Ce())&&(r.placeholder=o.first)}},inputs:{noResultText:"noResultText",grid:"grid",pageProperties:"pageProperties",allowedAdultMode:"allowedAdultMode",isOnSearchPage:"isOnSearchPage"},outputs:{visibilityChanged:"visibilityChanged"},features:[Un],decls:15,vars:19,consts:[["gridContentEl",""],["placeholder",""],[1,"grid-wrapper","left-right-page-padding"],[1,"grid-title","font-headline"],[1,"grid-content-message","font-label"],[1,"grid"],[1,"grid-content"],[1,"grid-item"],[1,"grid-loading"],["alt","loading","src","./assets/theme/images/loading.svg"],[1,"list-no-results"],[3,"cardOrientation","pageProperties","channelCardMode","ribbonProperties","allowedAdultMode","scrollElement","cardSize","asset","isOnSearchPage"]],template:function(n,r){n&1&&(m(0,"div",2),E(1,H6,2,1,"h4",3),m(2,"div",4),N(3),g(),m(4,"div",5)(5,"div",6,0),X(7,$6,2,9,"div",7,se),M(9,"div",7,1),g()(),m(11,"div",8),M(12,"img",9),g()(),m(13,"div",10),N(14),g()),n&2&&(H("hidden",r.hideGrid),u(),I(r.gridVisualModel.title?1:-1),u(),H("hidden",!r.showContentMessage),u(),ce(" ",r.gridVisualModel.contentMessage," "),u(),H("hidden",r.showContentMessage),u(),H("landscape",r.cardOrientation===r.CardOrientation.LANDSCAPE)("portrait",r.cardOrientation!==r.CardOrientation.LANDSCAPE),u(2),K(r.gridContents),u(2),$o(r.getPlaceholderItemStyling()),u(2),H("hidden",!r.gettingResults),u(2),H("hidden",r.hasResults),u(),Q(r.noResultText))},dependencies:[Dy],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.grid-wrapper[_ngcontent-%COMP%]{width:100%}.grid-title[_ngcontent-%COMP%]{color:#ca7ef1;margin-top:1rem}.grid-content-message[_ngcontent-%COMP%]{text-align:left;margin:2rem .25rem}.grid[_ngcontent-%COMP%]{padding:1rem 0}.grid-content[_ngcontent-%COMP%]{display:grid;width:100%;column-gap:1.375rem;row-gap:1.625rem}@supports not (display: grid){.grid-content[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}}.grid-content.landscape[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(21.875rem,1fr))}.grid-content.portrait[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(14.375rem,1fr))}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.grid-content[_ngcontent-%COMP%]{column-gap:.75rem;row-gap:1rem}.grid-content.landscape[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(15rem,1fr))}.grid-content.portrait[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(9.8125rem,1fr))}}.landscape-card-placeholder[_ngcontent-%COMP%], .portrait-card-placeholder[_ngcontent-%COMP%]{height:1px}.grid-loading[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:1.25rem;margin-bottom:1.25rem}.grid-loading[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:2.5rem;height:2.5rem}.grid-item[_ngcontent-%COMP%]{width:fit-content}"],changeDetection:0})}}return t})();window.requestIdleCallback=window.requestIdleCallback||function(t){var i=Date.now();return setTimeout(function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)};window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)};var G6=["navLeft"],W6=["navRight"],z6=["*"],ew=(()=>{class t{constructor(){this.left=new Y,this.right=new Y}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-paging-controller"]],viewQuery:function(n,r){if(n&1&&Ve(G6,5)(W6,5),n&2){let o;be(o=Ce())&&(r.navLeft=o.first),be(o=Ce())&&(r.navRight=o.first)}},inputs:{canLeft:"canLeft",canRight:"canRight"},outputs:{left:"left",right:"right"},ngContentSelectors:z6,decls:8,vars:4,consts:[["navLeft",""],["navRight",""],[1,"paging-controller"],[1,"nav-left",3,"click"],["src","./assets/theme/svg/chevron_left.svg","alt",""],[1,"nav-right",3,"click"],["src","./assets/theme/svg/chevron_right.svg","alt",""]],template:function(n,r){n&1&&(io(),te(0,"div",2)(1,"div",3,0),qe("click",function(){return r.left.emit()}),Qe(3,"img",4),J(),te(4,"div",5,1),qe("click",function(){return r.right.emit()}),Qe(6,"img",6),J(),ro(7),J()),n&2&&(u(),H("can-left",r.canLeft),u(3),H("can-right",r.canRight))},styles:[".paging-controller[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;overflow:hidden}.nav-left[_ngcontent-%COMP%], .nav-right[_ngcontent-%COMP%]{display:flex;align-items:center;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;z-index:5;width:2.32rem;height:2.32rem;height:5.93rem;background-color:#2b2b2b66;cursor:not-allowed}.nav-left[_ngcontent-%COMP%]   img[_ngcontent-%COMP%], .nav-right[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:2.32rem;height:2.32rem}.nav-left[_ngcontent-%COMP%]:hover, .nav-right[_ngcontent-%COMP%]:hover{background-color:#2b2b2b;transition:all .3s ease}.nav-left[_ngcontent-%COMP%]{left:-2.32rem;border-top-right-radius:.77rem;border-bottom-right-radius:.77rem;transition:all 1s ease}.nav-left[_ngcontent-%COMP%]:hover{left:0}.nav-left.can-left[_ngcontent-%COMP%]{left:0;cursor:pointer}.nav-right[_ngcontent-%COMP%]{right:-2.32rem;border-top-left-radius:.77rem;border-bottom-left-radius:.77rem;transition:all 1s ease}.nav-right[_ngcontent-%COMP%]:hover{right:0}.nav-right.can-right[_ngcontent-%COMP%]{right:0;cursor:pointer}"]})}}return t})();var jk=(()=>{class t{getStyleVar(e){let n=window.getComputedStyle(document.body);if(n)return n.getPropertyValue(e)}getStyleVarAsInt(e){let n=this.getStyleVar(e);return n?parseInt(n):void 0}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Y6=["ribbonItems"],Q6=t=>({"background-image":t}),Hk=(t,i)=>({height:t,width:i}),Z6=(t,i,e,n,r,o,s)=>({"landscape-card":t,"portrait-card":i,"extra-large":e,large:n,medium:r,normal:o,small:s}),J6=()=>[];function X6(t,i){if(t&1){let e=B();m(0,"button",14),A("click",function(){k(e);let r=_().$implicit;return L(r.iconClick())}),M(1,"img",15),g()}if(t&2){let e=_().$implicit;H("hidden",!e.iconImage()),u(),S("ngStyle",od(4,Hk,e.iconHeight?e.iconHeight+"px":"17px",e.iconHeight?e.iconHeight+"px":"17px"))("src",e.iconImage(),Je)}}function K6(t,i){if(t&1&&M(0,"img",16),t&2){let e=_().$implicit;H("hidden",!e.iconImage()),S("ngStyle",od(4,Hk,e.iconHeight?e.iconHeight+"px":"17px",e.iconHeight?e.iconHeight+"px":"17px"))("src",e.iconImage(),Je)}}function eq(t,i){if(t&1&&E(0,X6,2,7,"button",12)(1,K6,1,7,"img",13),t&2){let e=i.$implicit;I(e.iconClick?0:1)}}function tq(t,i){if(t&1&&(m(0,"div",3)(1,"h2",11),N(2),g(),X(3,eq,2,1,null,null,se),g()),t&2){let e=_();u(),S("id",yr("ribbon-",e.ribbonId)),u(),ce(" ",e.ribbonVisualModel.title()," "),u(),K(e.ribbonVisualModel==null?null:e.ribbonVisualModel.titleIcons)}}function nq(t,i){if(t&1&&(m(0,"li",9),M(1,"img",17),g()),t&2){let e=_();S("ngClass",hS(2,Z6,e.cardOrientation()===e.RibbonContainerType.LANDSCAPE,e.cardOrientation()!==e.RibbonContainerType.LANDSCAPE,e.cardSize===e.CardSize.EXTRA_LARGE,e.cardSize===e.CardSize.LARGE,e.cardSize===e.CardSize.MEDIUM,e.cardSize===e.CardSize.NORMAL,e.cardSize===e.CardSize.SMALL)),u(),S("src",e.ribbonVisualModel.brandImage,Je)}}function iq(t,i){if(t&1&&(m(0,"li",10),M(1,"app-generic-card",18),g()),t&2){let e=i.$implicit,n=i.$index,r=_(),o=Ho(10);u(),S("isOnDetailPage",(r.ribbon==null?null:r.ribbon.isOnDetailPage)??!1)("ribbonProperties",(r.ribbon==null?null:r.ribbon.properties)??Wl(11,J6))("pageProperties",r.pageProperties)("cardOrientation",r.cardOrientation())("cardSize",r.cardSize)("channelCardMode",r.ribbonChannelCardMode)("allowedAdultMode",r.allowedAdultMode)("asset",e)("scrollElement",o)("isOnSearchPage",r.isOnSearchPage)("countNumber",r.showCount()?n+1:void 0)}}var Ay=(function(t){return t[t.PREV=-1]="PREV",t[t.NEXT=1]="NEXT",t})(Ay||{}),Ry=class{constructor(){this.title=V(""),this.titleIcons=[],this.placeholder="",this.canNext=!1,this.canPrev=!1,this.backgroundImage="",this.brandImage=""}}
15,Tu=(()=>{class t{constructor(e,n,r,o){this.cdr=e,this.ribbonElementRef=n,this.sassService=r,this.business=o,this.pageProperties=[],this.hideTitle=!1,this.allowedAdultMode=Me.ANY,this.isOnSearchPage=!1,this.ribbonId=-1,this.visibilityChanged=new Y,this.cardOrientation=V(nt.PORTRAIT),this.cardSize=rn.NORMAL,this.showingLastRibbonItem=!1,this.hideRibbon=!1,this.hasNoCards=!0,this.ribbonContents=[],this.visibleRibbonContents=[],this.ribbonChannelCardMode=Ht.NONE,this.firstVisibleItemIndex=0,this.ribbonVisualModel=new Ry,this.ribbonPage=0,this.allDataRetrieved=!1,this.gettingResults=!1,this.contentRequests=[],this.CardSize=rn,this.RibbonContainerType=nt,window.addEventListener("resize",()=>this.onWindowResize()),this.imageLocation=this.business.client.bootstrap.discovery.imageLocation}set registerOnObserver(e){e&&(e.observe(this.ribbonElementRef.nativeElement),this.ribbonObserver=e)}ngAfterViewInit(){this.ribbon&&(this.ribbon.contentProvider?.resetPaging(),this.cardSize=this.ribbon.cardSize,this.getRibbonContent())}ngAfterViewChecked(){let e=this.checkCanNext(),n=this.checkCanPrev();(e!==this.ribbonVisualModel.canNext||n!==this.ribbonVisualModel.canPrev)&&(this.ribbonVisualModel.canNext=e,this.ribbonVisualModel.canPrev=n,this.detectChanges())}ngOnChanges(e){e.ribbon?.currentValue&&(this.resetRibbon(),this.ribbonVisualModel.titleIcons=this.ribbon?.titleIcons??[],this.ribbonVisualModel.title.set(this.ribbon?.title??"")),this.ribbonItems&&this.getRibbonContent()}prev(){this.slideRibbon(Ay.PREV)}checkCanPrev(){return this.firstVisibleItemIndex>0}next(){this.checkVisibleRibbonContents(),this.slideRibbon(Ay.NEXT)}detectChanges(){this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges(),setTimeout(()=>{this.ribbonVisualModel.canNext=this.checkCanNext(),this.ribbonVisualModel.canPrev=this.checkCanPrev(),this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges()},0)}resetRibbon(){this.showingLastRibbonItem=!1,this.hideRibbon=!1,this.visibilityChanged.emit(),this.hasNoCards=!0,this.ribbonContents=[],this.visibleRibbonContents=[],this.ribbonChannelCardMode=this.ribbon?.contentProvider?.getChannelCardMode()??Ht.NONE,this.contentRequests.forEach(e=>e.unsubscribe()),this.contentRequests=[],this.ribbonPage=0,this.allDataRetrieved=!1,this.gettingResults=!1,this.firstVisibleItemIndex=0,this.ribbonVisualModel=new Ry,this.ribbonItems&&(this.ribbonItems.nativeElement.style.transform="translateX(0px)")}getRibbonContent(){if(!this.ribbon){this.hideRibbon=!0,this.visibilityChanged.emit();return}if(!(this.allDataRetrieved||this.gettingResults))if(this.ribbon?.contentProvider?.hasNext()){this.gettingResults=!0;let e=this.ribbon.contentProvider.getItems().pipe(Gi(()=>{this.gettingResults=!1,this.ribbonContents.length===0&&this.ribbonBackUpContent()})).subscribe(n=>this.handleItems(n));this.contentRequests.push(e)}else this.ribbon.contentProvider||this.ribbonBackUpContent()}handleItems(e){if(!e||e.length===0){this.allDataRetrieved=!0;return}this.cardOrientation.set(this.ribbon?.contentProvider?.getOrientation()??nt.LANDSCAPE),this.ribbonChannelCardMode=this.ribbon?.contentProvider?.getChannelCardMode()??Ht.NONE,this.allDataRetrieved=!this.ribbon?.contentProvider?.hasNext()||this.showCount(),this.ribbonContents||(this.ribbonContents=[]),this.showCount()&&(e=e.slice(0,10)),this.ribbonContents=this.ribbonContents.concat(e),this.checkVisibleRibbonContents()}ribbonBackUpContent(){if(!this.ribbon){this.hideRibbon=!0,this.visibilityChanged.emit();return}this.cardOrientation.set(this.ribbon.orientation??nt.LANDSCAPE),this.ribbonVisualModel.title.set(this.ribbon.title),this.ribbon.contents?.length>0?(this.ribbonContents=this.ribbon.contents,this.allDataRetrieved=!0,this.hasNoCards=!1,this.setBackgroundImage(),this.setBrandImage(),this.checkVisibleRibbonContents()):this.ribbon.contentMessage?(this.ribbonVisualModel.placeholder=this.ribbon.contentMessage,this.allDataRetrieved=!0):(this.hideRibbon=!0,this.visibilityChanged.emit(),this.allDataRetrieved=!0),this.detectChanges()}checkVisibleRibbonContents(){if(!this.ribbonItems?.nativeElement.parentElement)return;
15let e=this.getRibbonItemsWidth(),n=this.getParentWidth(),r=Math.trunc(n/e);this.visibleRibbonContents.length===0?this.assignVisibleContent(r):(this.visibleRibbonContents.length!==this.ribbonContents.length||!this.allDataRetrieved)&&this.firstVisibleItemIndex+3*r>this.visibleRibbonContents.length&&this.assignVisibleContent(r),this.detectChanges()}assignVisibleContent(e){!this.allDataRetrieved&&this.visibleRibbonContents.length+3*e>this.ribbonContents.length&&this.getRibbonContent(),this.visibleRibbonContents=this.visibleRibbonContents.concat(this.ribbonContents.slice(this.visibleRibbonContents.length,this.visibleRibbonContents.length+(this.visibleRibbonContents.length===0?2:1)*e+2)),this.hasNoCards=!1,this.setBackgroundImage(),this.setBrandImage(),this.detectChanges(),this.visibilityChanged.emit()}slideRibbon(e){if(!this.ribbonItems?.nativeElement.parentElement)return;this.showingLastRibbonItem=!1;let n=this.ribbonItems?.nativeElement.children.length,r=this.getRibbonItemsWidth(),o=this.getParentWidth(),s=this.firstVisibleItemIndex===0?this.getBrandWidth():0,a=Math.trunc((o-s)/r);s>0&&(a+=Math.trunc(s/r)),a=a===0?1:a,this.firstVisibleItemIndex+=e*a,e===Ay.PREV&&(this.showingLastRibbonItem=!1),this.firstVisibleItemIndex<0?this.firstVisibleItemIndex=0:n-this.firstVisibleItemIndex<=a&&(this.showingLastRibbonItem=!0,this.firstVisibleItemIndex=n-a),this.firstVisibleItemIndex>n&&(this.showingLastRibbonItem=!0,this.firstVisibleItemIndex=n-a);let l;this.showingLastRibbonItem?l=this.getRightAlignPosition():l=this.getLeftAlignPosition(),this.ribbonItems.nativeElement.style.transform="translateX("+l+"px)",this.detectChanges()}getLeftAlignPosition(){if(!this.ribbonItems||this.firstVisibleItemIndex===0)return 0;let e=this.ribbonItems.nativeElement.children[this.firstVisibleItemIndex];if(!e)return 0;let n=e.getBoundingClientRect(),r=this.ribbonItems.nativeElement.getBoundingClientRect(),o=this.controls.navLeft.nativeElement.getBoundingClientRect().width;return-Math.floor(n.left-r.left-o)}getRightAlignPosition(){if(!this.ribbonItems?.nativeElement.parentElement)return 0;let e=this.ribbonItems.nativeElement.parentElement.getBoundingClientRect(),n=this.ribbonItems.nativeElement.getBoundingClientRect().width;return Math.ceil(e.right-e.left-n)}onWindowResize(){if(!this.ribbonItems||this.ribbonItems.nativeElement.children.length===0)return;this.checkVisibleRibbonContents();let e=this.getRibbonItemsWidth()??200,n=this.ribbonItems.nativeElement.children.length,r=this.ribbonItems.nativeElement.lastElementChild?.getBoundingClientRect(),o=this.ribbonItems.nativeElement.parentElement?.getBoundingClientRect(),s=Math.trunc((o?.width??window.innerWidth)/e);s=s===0?1:s;let a;this.ribbonItems.nativeElement.getBoundingClientRect().width<(o?.width??0)?(this.firstVisibleItemIndex=0,a=this.getLeftAlignPosition(),this.showingLastRibbonItem=!1):this.showingLastRibbonItem||(r?.right??0)<(o?.right??0)?(this.firstVisibleItemIndex=n-s,this.showingLastRibbonItem=!0,a=this.getRightAlignPosition()):a=this.getLeftAlignPosition(),this.ribbonItems.nativeElement.style.transform="translateX("+a+"px)"}checkCanNext(){if(this.getRightAlignPosition()===this.getLeftAlignPosition()||!this.ribbonItems?.nativeElement.children||this.ribbonItems.nativeElement.children.length===0||this.showingLastRibbonItem)return!1;let e=this.getContainerWidth(),n=this.getParentWidth();return Math.floor(e)>n}getContainerWidth(){let e=this.ribbonItems?.nativeElement.getBoundingClientRect().width;if(!e){let n=this.ribbonItems?.nativeElement.childElementCount??0,r=this.getRibbonItemsWidth();e=n*r}return e}getParentWidth(){let e=this.ribbonItems?.nativeElement.parentElement?.getBoundingClientRect().width;return e===void 0||e===0?window.innerWidth:e}getRibbonItemsWidth(){let e=this.ribbonItems?.nativeElement.children[0];if(e?.classList.contains("brand-border")&&(e=this.ribbonItems?.nativeElement.children[1]),!e)return this.getCardWidth()??0;let n=window.getComputedStyle(e,null);return this.getStylePropertyValueAsInt(n,"margin-left")+this.getStylePropertyValueAsInt(n,"margin-right")+this.getStylePropertyValueAsInt(n,"width")||(this.getCardWidth()??
150)}getBrandWidth(){let e=this.ribbonItems?.nativeElement.firstElementChild;if(!e?.classList.contains("brand-border"))return 0;let n=window.getComputedStyle(e,null);return this.getStylePropertyValueAsInt(n,"margin-left")+this.getStylePropertyValueAsInt(n,"margin-right")+this.getStylePropertyValueAsInt(n,"width")??0}getCardWidth(){let e=this.cardOrientation().toLowerCase(),n=this.cardSize.toLowerCase().replace("_","-"),r=`--atv-card-${e}-${n}-width`;return this.sassService.getStyleVarAsInt(r)}getStylePropertyValueAsInt(e,n){return parseInt(e.getPropertyValue(n),10)}setBackgroundImage(){let e=this.ribbon?.backgroundLandscapeImage;if(e&&!this.hasNoCards){let n=e.startsWith("http")?e:this.imageLocation+e;this.ribbonVisualModel.backgroundImage=ot.createImageUrl(n,me.RIBBON_BACKGROUND_LANDSCAPE_3)}else this.ribbonVisualModel.backgroundImage=""}setBrandImage(){let e=this.ribbon?.brandImage;if(e){let n=e.startsWith("http")?e:this.imageLocation+e;this.ribbonVisualModel.brandImage=ot.createImageUrl(n,me.RIBBON_BRAND_3)}else this.ribbonVisualModel.brandImage=""}showCount(){return this.ribbon?.properties?.includes(oe.SHOW_COUNT)??!1}ngOnDestroy(){this.contentRequests.forEach(e=>e.unsubscribe()),this.ribbonObserver?.unobserve(this.ribbonElementRef.nativeElement),this.ribbonObserver?.disconnect()}static{this.\u0275fac=function(n){return new(n||t)(f(Pe),f(Cn),f(jk),f(st))}}static{this.\u0275cmp=D({type:t,selectors:[["app-ribbon"]],viewQuery:function(n,r){if(n&1&&Ve(Y6,5)(ew,5),n&2){let o;be(o=Ce())&&(r.ribbonItems=o.first),be(o=Ce())&&(r.controls=o.first)}},inputs:{pageProperties:"pageProperties",ribbon:"ribbon",hideTitle:"hideTitle",allowedAdultMode:"allowedAdultMode",isOnSearchPage:"isOnSearchPage",ribbonId:"ribbonId",registerOnObserver:"registerOnObserver"},outputs:{visibilityChanged:"visibilityChanged"},features:[Un],decls:14,vars:31,consts:[["controls",""],["ribbonItems",""],[1,"ribbon-wrapper"],[1,"ribbon-title","left-right-page-padding"],[1,"ribbon-items-wrapper"],[3,"ngStyle"],[1,"placeholder","left-right-page-padding","font-label"],[3,"left","right","canLeft","canRight"],[1,"ribbon-items","left-right-page-padding","horizontal-scroller"],["aria-hidden","true",1,"ribbon-item","brand-border",3,"ngClass"],[1,"ribbon-item"],[1,"ribbon-title-text","font-headline",3,"id"],[1,"ribbon-title-icon",3,"hidden"],["alt","ribbon icon",1,"ribbon-title-icon",3,"hidden","ngStyle","src"],[1,"ribbon-title-icon",3,"click"],["alt","",3,"ngStyle","src"],["alt","ribbon icon",1,"ribbon-title-icon",3,"ngStyle","src"],["alt","",1,"brand-image",3,"src"],[3,"isOnDetailPage","ribbonProperties","pageProperties","cardOrientation","cardSize","channelCardMode","allowedAdultMode","asset","scrollElement","isOnSearchPage","countNumber"]],template:function(n,r){n&1&&(m(0,"div",2)(1,"section"),E(2,tq,5,3,"div",3),m(3,"div",4)(4,"div",5)(5,"p",6),N(6),g(),m(7,"app-paging-controller",7,0),A("left",function(){return r.prev()})("right",function(){return r.next()}),m(9,"ul",8,1),E(11,nq,2,10,"li",9),X(12,iq,2,12,"li",10,se),g()()()()()()),n&2&&(H("hidden",r.hideRibbon),u(),jo("aria-labelledby","ribbon-"+r.ribbonId),u(),I(!r.hideTitle&&r.ribbonVisualModel.title()?2:-1),u(2),H("ribbon-background",r.ribbonVisualModel.backgroundImage!==""),S("ngStyle",br(29,Q6,"url("+r.ribbonVisualModel.backgroundImage+")")),u(),H("hidden",!r.hasNoCards)("portrait",r.cardOrientation()!==r.RibbonContainerType.LANDSCAPE)("landscape",r.cardOrientation()===r.RibbonContainerType.LANDSCAPE)("extra-large",r.cardSize===r.CardSize.EXTRA_LARGE)("large",r.cardSize===r.CardSize.LARGE)("medium",r.cardSize===r.CardSize.MEDIUM)("normal",r.cardSize===r.CardSize.NORMAL)("small",r.cardSize===r.CardSize.SMALL),u(),ce(" ",r.ribbonVisualModel.placeholder," "),u(),H("hidden",r.hasNoCards),S("canLeft",r.ribbonVisualModel.canPrev)("canRight",r.ribbonVisualModel.canNext),u(4),I(r.ribbonVisualModel.brandImage?11:-1),u(),K(r.visibleRibbonContents))},dependencies:[Bs,ec,Us,Dy,ew],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.ribbon-wrapper[_ngcontent-%COMP%]{width:100%;display:block}.ribbon-title[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:1rem;color:#ca7ef1}.ribbon-title-icon[_ngcontent-%COMP%]{margin-left:.3125rem;height:1.0625rem}.ribbon-title-icon-clickable[_ngcontent-%COMP%]{cursor:pointer}.ribbon-items[_ngcontent-%COMP%]{display:inline-block;white-space:nowrap;transition:all 1s ease;padding-top:1rem;padding-bottom:1.5rem}.ribbon-item[_ngcontent-%COMP%]{display:inline-block;vertical-align:top}.ribbon-item[_ngcontent-%COMP%]:not(:last-of-type){margin-right:1.375rem}.placeholder[_ngcontent-%COMP%]{margin-top:1rem;margin-bottom:1.5rem;display:flex;align-items:center}.placeholder.portrait.small[_ngcontent-%COMP%]{height:14.375rem}.placeholder.landscape.small[_ngcontent-%COMP%]{height:8.61328125rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.placeholder.portrait.small[_ngcontent-%COMP%]{height:9.8125rem}.placeholder.landscape.small[_ngcontent-%COMP%]{height:5.90625rem}}
15.placeholder.portrait.medium[_ngcontent-%COMP%]{height:17.4553571429rem}.placeholder.landscape.medium[_ngcontent-%COMP%]{height:10.458984375rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.placeholder.portrait.medium[_ngcontent-%COMP%]{height:11.9151785714rem}.placeholder.landscape.medium[_ngcontent-%COMP%]{height:7.171875rem}}.placeholder.portrait.normal[_ngcontent-%COMP%]{height:20.5357142857rem}.placeholder.landscape.normal[_ngcontent-%COMP%]{height:12.3046875rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.placeholder.portrait.normal[_ngcontent-%COMP%]{height:14.0178571429rem}.placeholder.landscape.normal[_ngcontent-%COMP%]{height:8.4375rem}}.placeholder.portrait.large[_ngcontent-%COMP%]{height:23.6160714286rem}.placeholder.landscape.large[_ngcontent-%COMP%]{height:14.150390625rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.placeholder.portrait.large[_ngcontent-%COMP%]{height:16.1205357143rem}.placeholder.landscape.large[_ngcontent-%COMP%]{height:9.703125rem}}.placeholder.portrait.extra-large[_ngcontent-%COMP%]{height:26.6964285714rem}.placeholder.landscape.extra-large[_ngcontent-%COMP%]{height:15.99609375rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.placeholder.portrait.extra-large[_ngcontent-%COMP%]{height:18.2232142857rem}.placeholder.landscape.extra-large[_ngcontent-%COMP%]{height:10.96875rem}}.ribbon-background[_ngcontent-%COMP%]{background-repeat:no-repeat;background-size:cover;border-top-left-radius:.5rem;border-bottom-left-radius:.5rem;background-position-y:center}.ribbon-items-wrapper[_ngcontent-%COMP%]{padding:1rem 0 1rem 1rem}@media only screen and (max-width:1100px){.ribbon-background[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.ribbon-items-wrapper[_ngcontent-%COMP%]{padding:1rem 0}}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.ribbon-item[_ngcontent-%COMP%]:not(:last-of-type){margin-right:.75rem}}.landscape-card[_ngcontent-%COMP%]{width:fit-content}.landscape-card.small[_ngcontent-%COMP%]{height:8.61328125rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.small[_ngcontent-%COMP%]{height:5.90625rem}}.landscape-card.medium[_ngcontent-%COMP%]{height:10.458984375rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.medium[_ngcontent-%COMP%]{height:7.171875rem}}.landscape-card.normal[_ngcontent-%COMP%]{height:12.3046875rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.normal[_ngcontent-%COMP%]{height:8.4375rem}}.landscape-card.large[_ngcontent-%COMP%]{height:14.150390625rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.large[_ngcontent-%COMP%]{height:9.703125rem}}.landscape-card.extra-large[_ngcontent-%COMP%]{height:15.99609375rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.landscape-card.extra-large[_ngcontent-%COMP%]{height:10.96875rem}}.portrait-card[_ngcontent-%COMP%]{width:fit-content}.portrait-card.small[_ngcontent-%COMP%]{height:14rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.small[_ngcontent-%COMP%]{height:9rem}}.portrait-card.medium[_ngcontent-%COMP%]{height:17rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.medium[_ng
15content-%COMP%]{height:11rem}}.portrait-card.normal[_ngcontent-%COMP%]{height:20rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.normal[_ngcontent-%COMP%]{height:14rem}}.portrait-card.large[_ngcontent-%COMP%]{height:23rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.large[_ngcontent-%COMP%]{height:16rem}}.portrait-card.extra-large[_ngcontent-%COMP%]{height:26rem}@media only screen and (orientation:portrait)and (max-width:600px),only screen and (orientation:landscape)and (max-height:600px){.portrait-card.extra-large[_ngcontent-%COMP%]{height:18rem}}.brand-image[_ngcontent-%COMP%]{height:100%}.brand-border[_ngcontent-%COMP%]{border:2px solid transparent}"],changeDetection:0})}}return t})();var xy=class extends fn{constructor(i,e,n,r,o,s){super(),this.cmsApi=i,this.url=e,this.focusType=n,this.sessionService=r,this.adultService=o,this.allowedAdultMode=s,this.nextPage=!0,this.currentPage=0}getItems(){return this.cmsApi.getContent(this.url,this.currentPage,this.sessionService.isAnonymous,this.sessionService.entitlementId,this.sessionService.catalogId,this.sessionService.profileId,this.adultService.getAdultMode(this.allowedAdultMode),this.focusType).pipe(P(i=>(i&&(this.currentPage++,this.orientation=i.type,this.nextPage=i.nextPage??!1),i?.items??[])))}hasNext(){return this.nextPage}resetPaging(){this.nextPage=!0,this.currentPage=0}};var My=class extends fn{constructor(i,e,n,r,o,s,a,l){if(super(),this.url=i,this.session=e,this.environment=n,this.favoriteCacheService=r,this.allowedAdultMode=o,this.adultService=s,this.contentProviderFactory=a,this.channelRightsService=l,this.channelCardMode=Ht.NONE,this.hasMoreItems=!0,this.url=i.toLowerCase(),this.url.includes(Gs.CHANNEL.toLowerCase())&&(this.type=Gs.CHANNEL),this.type===Gs.CHANNEL){for(let c in Ht)if(this.url.includes(c.toLowerCase())){this.channelCardMode=Ht[c];break}this.channelCardMode||(this.channelCardMode=Ht.NONE),this.orientation=nt.LANDSCAPE}}getItems(){let i=this.environment.atvOttRights.concat(this.environment.atvReplayOttRights);return this.channelRightsService.getValidChannels(i,this.session.catalogId).pipe(fe(e=>this.favoriteCacheService.getFavoritesForType(this.type,e.validChannels).pipe(we(()=>this.hasMoreItems=!1),fe(n=>We(n.map(r=>this.favoriteToAsset(r))).pipe(Di([]))))),P(e=>e.filter(n=>!!n&&(!n.asset.adult||this.adultService.showAdult(this.allowedAdultMode)))))}hasNext(){return this.hasMoreItems}resetPaging(){this.hasMoreItems=!0}favoriteToAsset(i){return i.channel?i.assetType===cn.CHANNEL?this.contentProviderFactory.channelToRibbon2Asset(i.channel,this.channelCardMode===Ht.NONE):C(void 0):C(void 0)}getChannelCardMode(){return this.channelCardMode}};var Ur=(()=>{class t{constructor(e,n,r,o,s,a,l,c){this.cmsApiService=e,this.sessionService=n,this.environment=r,this.adultService=o,this.favoriteCacheService=s,this.epgApiService=a,this.epgUtilityService=l,this.channelRightsService=c,this.fromUntil=this.epgUtilityService.getEpgDaysFromUntil()}createContentProvider(e,n,r){return e.startsWith(`nebula-cache://favorite/${Gs.CHANNEL}`)?new My(e,this.sessionService,this.environment,this.favoriteCacheService,n,this.adultService,this,this.channelRightsService):new xy(this.cmsApiService,e,r,this.sessionService,this.adultService,n)}channelToRibbon2Asset(e,n){return(n?this.epgApiService.getScheduleForChannelFromUntil(e.id,this.fromUntil.from,this.fromUntil.until).pipe(z(()=>C(void 0))):C(void 0)).pipe(P(o=>({asset:{type:he.CHANNEL,id:e.id,image:e.posterLogo?e.posterLogo:e.defaultLogo??"",title:e.name,adult:e.adult,minimumAge:e.minimumAge,resolution:e.resolution,channelNumber:e.getChannelNumberForCatalog(this.sessionService.catalogId)},method:Xt.DETAIL,channels:o?this.createChannelsInfo(o.schedules??[]):void 0,resources:o?this.createEpgResources(o.programs,o.seasons):void 0})))}createEpgResources(e,n){let r=[];return e?.forEach(o=>r.push(this.programToRibbonDetail(o,n))),r}programToRibbonDetail(e,n){return{type:he.PROGRAM,id:e.programId,season:n?.find(r=>r.seasonId===e.seasonId)?.seasonNumber,episode:e.episodeNumber,image:e.image.poster??"",title:e.text.t
15itle,adult:e.adult,synopsis:e.text.shortDescription,genres:e.genres,episodeTitle:e.text.episodeTitle}}createChannelsInfo(e){let n=new Set(e.map(o=>o.channelId)),r=[];return n.forEach(o=>{let s=e.filter(a=>a.channelId===o).map(a=>({id:a.scheduleId,programId:a.programId,published:{start:a.published.start,end:a.published.end},blackouts:a.blackouts,accessibilityOptions:a.accessibilityOptions,rights:a.rights}));r.push({id:o,schedules:s})}),r}scheduleToRibbon2Asset(e){return{asset:{type:he.SCHEDULE,id:e.schedule.scheduleId,image:e.program.image.poster??""},method:Xt.DETAIL,channels:this.createChannelsInfo([e.schedule]),resources:[this.programToRibbonDetail(e.program,e.season?[e.season]:[])]}}recordingFolderToRibbon2Asset(e,n){return this.epgApiService.getSchedule(e.schedule).pipe(P(r=>({asset:{type:he.RECORDING,id:r.series&&n.length>0?r.series.seriesId:e.identifier,image:r.program.image.poster??"",title:r.series?.text.title},method:Xt.DETAIL,channels:this.createChannelsInfo([r.schedule]),resources:this.createRecordingResources(n,r.program)})),z(()=>this.recordingFallbackProgram(e,n)))}recordingToRibbon2Asset(e,n){return this.epgApiService.getSchedule(e.schedule).pipe(P(r=>({asset:{type:he.RECORDING,id:e.identifier,image:r.program.image.poster??"",title:n===sn.expires?r.series?.text.title:"",episode:e.programOrdinal},method:Xt.DETAIL,channels:this.createChannelsInfo([r.schedule]),resources:[this.programToRibbonDetail(r.program,r.season?[r.season]:[])]})),z(()=>this.recordingFallbackProgram(e)))}createRecordingResources(e,n){let r=[];return n&&r.push(this.programToRibbonDetail(n)),e.forEach(o=>r.push({type:he.RECORDING,id:o.identifier,image:""})),r}recordingFallbackProgram(e,n){return this.epgApiService.getProgram(e.program).pipe(P(r=>({asset:{type:he.RECORDING,id:n&&n.length>0&&e.series?e.series:e.identifier,image:r.program.image.poster??"",title:n?r.series?.text.title:r.program.text.title,episode:e.programOrdinal},method:Xt.DETAIL,channels:[{id:e.channel,schedules:[{id:e.schedule,programId:r.program.programId,published:{start:$.timeStringToDate(e.start),end:$.timeStringToDate(e.end)}}]}],resources:this.createRecordingResources(n??[],r.program)})),z(()=>this.recordingFallbackNoEpg(e,n??[])))}recordingFallbackNoEpg(e,n){return C({asset:{type:he.RECORDING,id:n&&n.length>0&&e.series?e.series:e.identifier,image:"",episode:e.programOrdinal},method:Xt.DETAIL,channels:[{id:e.channel,schedules:[{id:e.schedule,published:{start:$.timeStringToDate(e.start),end:$.timeStringToDate(e.end)}}]}],resources:this.createRecordingResources(n??[])})}groupRecordingsBySeries(e){let n=[];return e.forEach(r=>{let o=n.find(s=>s.main.series!==void 0&&s.main.series===r.series&&s.main.channel!==void 0&&s.main.channel===r.channel);o?o.others.push(r):n.push({main:r,others:[]})}),n}static{this.\u0275fac=function(n){return new(n||t)(h(sl),h(ne),h(ae),h($e),h(ui),h(dn),h(tn),h(Jn))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function rq(t,i){if(t&1&&M(0,"app-banner",3),t&2){let e=_();S("customCmsBanners",e.fixedTopBanner.banners)("pageContext",e.pageContext)}}function oq(t,i){if(t&1&&M(0,"app-category-filter",6),t&2){let e=_(2);S("categoryProvider",e.categoryProvider)("allowedAdultMode",e.allowedAdultMode)("categoryRoot",e.categoryRoot)}}function sq(t,i){if(t&1&&M(0,"app-year-filter",7),t&2){let e=_(2);S("allowedAdultMode",e.allowedAdultMode)("categoryRoot",e.categoryRoot)}}function aq(t,i){t&1&&M(0,"app-score-filter")}function lq(t,i){t&1&&M(0,"app-clear-all-filters")}function cq(t,i){if(t&1&&(m(0,"div",4),E(1,oq,1,3,"app-category-filter",6),E(2,sq,1,2,"app-year-filter",7),E(3,aq,1,0,"app-score-filter"),E(4,lq,1,0,"app-clear-all-filters"),g()),t&2){let e=_();u(),I(e.activeFilters.has(e.FilterType.TAG)?1:-1),u(),I(e.activeFilters.has(e.FilterType.YEAR)?2:-1),u(),I(e.activeFilters.has(e.FilterType.SCORE)?3:-1),u(),I(e.hasFilters()?4:-1)}}function dq(t,i){if(t&1&&M(0,"app-banner",8),t&2){let e=_().$implicit,n=_();S("customCmsBanners",e.banners)("pageContext",n.pageContext)}}function uq(t,i){if(t&1&&M(0,"app-ribbon",9),t&2){let e=_(),n=e.$implicit,r=e.$index,o=_();S("allowedAdultMode",o.allowedAdultMode)("pageProperties",o.pageProperties)("ribbon",n.ribbon)("ribbonId",r)}}function pq(t,i){if(t&1&&M(0,"app-grid",10),t&2){let e=_().$implicit,n=_();S("allowedAdultMode",n.allowedAdultMode)("grid",e.grid)("pageProperties",n.pageProperties)}}function fq(t,i){if(t&1&&(m(0,"div"),E(1,dq,1,2,"app-banner",8),E(2,uq,1,4,"app-ribbon",9),E(3,pq,1,3,"app-grid",10),g()),t&2){let e=i.$implicit,n=i.$index,r=_();$o(yr("cms-page-row row-",n)),u(),I(e.type===r.CustomCmsRowTypes.BANNER?1:-1),u(),I(e.type===r.CustomCmsRowTypes.RIBBON?2:-1),u(),I(e.type===r.CustomCmsRowTypes.GRID?3:-1)}}function hq(t,i){if(t&1&&(m(0,"div"),M(1,"app-grid",10),g()),t&2){let e=_();$o(yr("cms-page-row row-",e.cmsRows.length)),u(),S("allowedAdultMode",e.allowedAdultMode)("grid",e.filterResultGrid)("pageProperties",e.pageProperties)}}var $k=(()=>{class t extends du{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T,W,j,ee){super(o,l,a,p,c,W,j,ee),this.activatedRoute=e,this.cmsApi=n,this.vodApi=r,this.adult=s,this.filterService=d,this.log=y,this.backdropService=b,this.contentProviderFactory=T,this.cmsRows=[],this.allowedAdultMode=Me._FALSE,this.CustomCmsRowTypes=oo,this.cmsPageRows=[],this.FilterType=G,this.activeFilters=new Set,this.categoryRoot=[],this.pageTitle=V(""),this.pageId=this.activatedRoute.snapshot.data.pageId}ngOnInit(){this.filterSubscription=this.filterService.filterChanged.pipe(ke(e=>this.activeFilters.has(e))).subscribe(()=>this.manageFilters()),super.start()}loadPage(){if(!this.page){console.error("page not loaded");return}if(this.filterService.loadUrlFilters(),this.pageTitle.set(this.page.title),this.updateHtmlTitle(this.page.title),this.pageContext=new Qt({pageURL:this.pageId,pageTitle:this.page.title,pageLocale:this.config.getLocale()}),this.log.pageView(this.pageContext),this.pageProperties=this.page.cmsPage?.properties||[],this.pageProperties.includes(oe.ADULT_REQUIRED)&&(this.allowedAdultMode=Me._TRUE),this.cmsPageRows=[],this.filterResultGrid=void 0,this.fixedTopB
15anner=void 0,this.page.cmsPage?.rows?.length>0){let e=this.page.cmsPage;this.pageProperties.includes(oe.ALLOW_ADULT)&&this.allowedAdultMode!==Me._TRUE&&(this.allowedAdultMode=Me.ANY),this.activeFilters=this.getActiveFilters(this.pageProperties),this.activeFilters.has(G.TAG)&&(this.categoryRoot=e?.categoryTags??[],this.categoryProvider=new uu(this.vodApi,this.sessionService.catalogId));let n=e?.rows??[];n&&n[0].type===oo.BANNER&&(this.fixedTopBanner={type:oo.BANNER,banners:n.splice(0,1)[0].banners}),this.cmsPageRows=n,this.cmsRows=this.convertRows(this.cmsPageRows)}this.page.backgroundImage&&this.backdropService.setBackdropImage(this.page.backgroundImage),this.page=void 0,this.manageFilters()}getPageProperties(){return this.page?C(this.page.cmsPage.properties):this.cmsApi.getDynamicPage(this.pageId,this.sessionService.entitlementId,this.adult.getAdultMode(this.allowedAdultMode===Me._TRUE?this.allowedAdultMode:Me.ANY)).pipe(we(e=>{this.page=e}),P(e=>e.cmsPage.properties))}hasFilters(){return this.filterService.hasAny(this.activeFilters)}manageFilters(){let e=this.filterService.getFilterList(G.TAG),n=this.filterService.getFilterNumber(G.YEAR),r=this.filterService.getFilterNumber(G.SCORE);if(e.length===0&&!r&&!n){let o=()=>{this.cmsRows=this.convertRows(this.cmsPageRows),this.filterResultGrid=void 0};this.allowedAdultMode===Me._TRUE?this.adultService.checkAdultMode({successCallback:()=>{o()},errorCallback:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(pe.detail_adult_warning))}}):o()}else{let o=this.categoryRoot.concat(e);this.cmsRows=[],this.filterResultGrid=new yi({title:"",properties:this.config.getSettingArray(x.propertiesVodFilteredRibbon,s=>oe[s],[oe.SHOWPROGRESS,oe.HIDE_INFO]),contentProvider:new vy(this.vodApi,this.sessionService.catalogId,this.allowedAdultMode,o,n,r?(r-1)*25+1:0,r&&r*25)})}}convertRows(e){return e.map(n=>{switch(n.type){case oo.BANNER:return{type:oo.BANNER,banners:n.banners};case oo.RIBBON:return{type:oo.RIBBON,ribbon:this.convertRibbon(n.ribbon)};case oo.GRID:return{type:oo.GRID,grid:this.convertGrid(n.grid)}}})}convertRibbon(e){let n=e.properties||[];return{title:e.title,properties:e.properties,cardSize:e.cardSize,isOnDetailPage:!1,contentMessage:e.message,contentProvider:this.contentProviderFactory.createContentProvider(e.url,this.allowedAdultMode,Pn.getFocusType(n,this.pageProperties)),backgroundLandscapeImage:e.backgroundLandscapeImage,brandImage:e.brandImage}}convertGrid(e){let n=e.properties||[];return{title:e.title,properties:e.properties,contentUrl:e.url,contentMessage:e.message,contentProvider:this.contentProviderFactory.createContentProvider(e.url,this.allowedAdultMode,Pn.getFocusType(n,this.pageProperties))}}getActiveFilters(e){let n=new Set;return e.forEach(r=>{r===oe.VOD_FILTER_CATEGORY?n.add(G.TAG):r===oe.VOD_FILTER_RATING?n.add(G.SCORE):r===oe.VOD_FILTER_PRODUCTIONYEAR&&n.add(G.YEAR)}),n}ngOnDestroy(){super.stop(),this.filterSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(_t),f(sl),f(Xa),f(ne),f($e),f($e),f(et),f(O),f(dt),f(_e),f(ct),f(wu),f(Ur),f(Zn),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["app-cms-page"]],features:[Ee],decls:9,vars:4,consts:[[1,"page-wrapper"],[1,"page-container"],[1,"screen-reader"],[1,"top-banner",3,"customCmsBanners","pageContext"],[1,"page-filters","left-right-page-padding"],[3,"class"],[3,"categoryProvider","allowedAdultMode","categoryRoot"],[3,"allowedAdultMode","categoryRoot"],[3,"customCmsBanners","pageContext"],[3,"allowedAdultMode","pageProperties","ribbon","ribbonId"],[3,"allowedAdultMode","grid","pageProperties"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"div",1)(2,"h1",2),N(3),g(),E(4,rq,1,2,"app-banner",3),E(5,cq,5,4,"div",4),X(6,fq,4,6,"div",5,se),E(8,hq,2,6,"div",5),g()()),n&2&&(u(3),Q(r.pageTitle()),u(),I(r.fixedTopBanner?4:-1),u(),I(r.activeFilters.size>0?5:-1),u(),K(r.cmsRows),u(2),I(r.filterResultGrid?8:-1))},dependencies:[fs,Lk,ss,L1,k1,pu,Tu],encapsulation:2})}}return t})();var mq=["schedule"],gq=["title"],_q=["time"],vq=["icons"],yq=["iconImg"];function bq(t,i){if(t&1&&(N(0),Bp(1,"date")),t&2){let e=_();ce(" ",jp(1,1,e.startTime,"HH:mm")," ")}}
15function Cq(t,i){if(t&1&&Qe(0,"img",13,4),t&2){let e=i.$implicit;Gn("src",e,Je)}}var Gk=(()=>{class t{#e;constructor(e,n,r,o,s,a,l,c,d){this.stbCache=e,this.config=n,this.adultService=r,this.messagesService=o,this.reminderCache=s,this.detailService=a,this.zone=l,this.cdr=c,this.epgUtility=d,this.selectedDate=new Date,this.widthPerHour=500,this.allowedAdultMode=Me.ANY,this.categoryTags=[],this.scheduleWidth=0,this.schedulePosition=0,this.finishingToday=!1,this.isEntry=!1,this.scrollLeft=0,this.iconSrcs=[],this.iconWidth=21,this.showTime=!1,this.showAccessibility=this.config.getSettingBoolean(x.showAccessibilityIcons,!1)}set schedule(e){this.#e=e;let n=$.dateToDateTime(this.#e.published.start),r=$.dateToDateTime(this.#e.published.end);this.startTime=n.toJSDate(),this.endTime=r.toJSDate();let o=ie.fromJSDate(this.selectedDate),s=o.endOf("day");n<o&&(n=o),r>s?(r=s,this.finishingToday=!1):this.finishingToday=!0;let a=r.diff(n,"hours").hours,l=n.diff(o,"hours").hours;this.scheduleWidth=a*this.widthPerHour,this.schedulePosition=l*this.widthPerHour,this.showAccessibility&&this.addAccessibility(),window.requestIdleCallback(()=>{!this.#e?.scheduleId||!this.channel||this.stbCache.getRecordingForProgram(this.#e.programId,this.channel.id,this.adultService.showAdult(this.allowedAdultMode)).pipe(z(()=>C(void 0)),fe(c=>(c?(this.recording=c,this.spaceForIcon()&&this.iconSrcs.push(c.getIcon())):this.recording=void 0,this.spaceForIcon()&&this.getPlayIcon(),this.getReminderIcon()))).subscribe({next:()=>{this.setShowTime(),this.detectChanges()},error:()=>{this.setShowTime(),this.detectChanges()}})}),this.generateUrl()}ngAfterViewInit(){this.scheduleItemIntersectionObserver&&this.scheduleDiv&&this.scheduleItemIntersectionObserver.observe(this.scheduleDiv.nativeElement),this.guideFocusSubscription=this.guideFocusEvent?.subscribe(e=>{this.currentFocus=e}),this.guideScrollSubscription=this.guideScrollEvent?.subscribe(e=>{this.scrollLeft=e,this.alignTitleAndStartTime()}),this.iconImagesSubscription=this.iconImages?.changes.subscribe(()=>{this.alignTitleAndStartTime()})}getProgramTitle(){return this.program?this.program.adult&&!this.adultService.showAdult(this.allowedAdultMode)?this.config.getTranslation(wo.guide_adult_title):this.program.text.title:this.config.getTranslation(wo.guide_no_information)}scheduleClicked(e){e.preventDefault(),this.program&&(this.program.adult?this.adultService.checkAdultMode({successCallback:()=>{this.zone.run(()=>{this.navigate()})},errorCallback:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(pe.detail_adult_warning))}}):this.zone.run(()=>{this.navigate()}))}matchesFilter(){let e=!1;return this.accessibilityFilter&&(e=this.#e?.accessibilityOptions?.includes(this.accessibilityFilter)??!1),this.categoryTags?.length!==0&&(this.accessibilityFilter||(e=!0),e&&=this.categoryTags.every(n=>this.program?.categoryTags?.includes(n))),e}getPlayIcon(){if(!this.#e)return;let e=this.epgUtility.getPlayIcon(this.#e,this.channel,this.recording);e&&this.iconSrcs.push(e)}getReminderIcon(){return this.#e?.scheduleId&&this.spaceForIcon()?this.reminderCache.getReminder(kr.SCHEDULE,this.#e?.scheduleId).pipe(dr(e=>(e&&this.iconSrcs.push("./assets/theme/svg/reminders_selected.svg"),C(void 0)))):C(void 0)}generateUrl(){this.#e&&(this.refUrl=`${$.getFullDetailUrl(ol.epgDetailRoute)}/0/${qg.SCHEDULE.toLowerCase()}/${this.#e.scheduleId}`)}navigate(){this.#e?.scheduleId&&this.detailService.openEpgDetail(0,qg.SCHEDULE.toLowerCase(),this.#e.scheduleId)}alignTitleAndStartTime(){if(!(!this.titleDiv||!this.timeDiv))if(this.schedulePosition<this.scrollLeft&&this.schedulePosition+this.scheduleWidth>this.scrollLeft){let e=this.scrollLeft-this.schedulePosition-30,n=Math.min(e,this.scheduleWidth-this.titleDiv.nativeElement.offsetWidth-25);n=Math.max(0,n),this.titleDiv.nativeElement.style.transform=`translateX(${n}px)`;let r=Math.min(e,this.scheduleWidth-this.timeDiv.nativeElement.offsetWidth-(this.iconsDiv?.nativeElement.clientWidth??0)-25);r=Math.max(0,r),this.timeDiv.nativeElement.style.transform=`translateX(${r}px)`}else this.titleDiv.nativeElement.style.transform&&this.titleDiv.nativeElement.style.transform!=="translateX(0px)"&&(this.titleDiv.nativeElement.style.transform="translateX(0px)"),this.timeDiv.nativeElement.style.transform&&this.timeDiv.nativeElement.style.transform!=="translateX(0px)"&&(this.timeDiv.nativeElement.style.transform="translateX(0px)")}ngOnDestroy(){this.scheduleDiv?.nativeElement&&this.scheduleItemIntersectionObserver?.unobserve(this.scheduleDiv?.nativeElement),this.guideFocusSubscription?.unsubscribe(),this.guideScrollSubscription?.unsubscribe(),this.iconImagesSubscription?.unsubscribe()}detectChanges(){this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges()}addAccessibility(){$.getAccessibilityIcons(this.#e?.accessibilityOptions).forEac
15h(n=>{this.spaceForIcon()&&this.iconSrcs.push(n)})}spaceForIcon(){let e=(this.iconSrcs.length+1)*this.iconWidth;return this.scheduleWidth-e>24}setShowTime(){let e=this.iconSrcs.length*this.iconWidth;this.showTime=this.scheduleWidth-e>80}static{this.\u0275fac=function(n){return new(n||t)(f(xn),f(O),f($e),f(_e),f(ns),f(Iu),f(ut),f(Pe),f(tn))}}static{this.\u0275cmp=D({type:t,selectors:[["app-schedule"]],viewQuery:function(n,r){if(n&1&&Ve(mq,5)(gq,5)(_q,5)(vq,5)(yq,5),n&2){let o;be(o=Ce())&&(r.scheduleDiv=o.first),be(o=Ce())&&(r.titleDiv=o.first),be(o=Ce())&&(r.timeDiv=o.first),be(o=Ce())&&(r.iconsDiv=o.first),be(o=Ce())&&(r.iconImages=o)}},inputs:{program:"program",selectedDate:"selectedDate",widthPerHour:"widthPerHour",channel:"channel",allowedAdultMode:"allowedAdultMode",categoryTags:"categoryTags",accessibilityFilter:"accessibilityFilter",scheduleItemIntersectionObserver:"scheduleItemIntersectionObserver",guideFocusEvent:"guideFocusEvent",guideScrollEvent:"guideScrollEvent",schedule:"schedule"},decls:16,vars:24,consts:[["schedule",""],["title",""],["time",""],["icons",""],["iconImg",""],[3,"click","href"],[1,"schedule"],[1,"schedule-padding"],[1,"schedule-title","font-highlighted-label"],[1,"schedule-info"],[2,"flex-grow","1","display","flex"],[1,"schedule-time","font-caption"],[1,"schedule-icons"],[3,"src"]],template:function(n,r){n&1&&(te(0,"a",5),qe("click",function(s){return r.scheduleClicked(s)}),te(1,"div",6,0)(3,"div",7)(4,"div",8,1),N(6),J(),te(7,"div",9)(8,"div",10)(9,"div",11,2),E(11,bq,2,4),J()(),te(12,"div",12,3),X(14,Cq,2,1,"img",13,se),J()()()()()),n&2&&(H("no-info",!r.program),Gn("href",r.refUrl,Je),u(),bt("width",r.scheduleWidth,"px")("left",r.schedulePosition,"px"),H("finishing-today",r.finishingToday)("filter-match",r.matchesFilter())("entry",r.isEntry),jo("channel",r.channel==null?null:r.channel.id),u(3),bt("max-width",r.scheduleWidth-30<0?0:r.scheduleWidth-30,"px"),H("hidden",r.scheduleWidth<10),u(2),ce(" ",r.getProgramTitle()," "),u(),H("invisible",r.scheduleWidth<10),u(4),I(r.showTime?11:-1),u(),bt("max-width",r.scheduleWidth-24<0?0:r.scheduleWidth-24,"px"),u(2),K(r.iconSrcs))},dependencies:[yE],styles:['[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.schedule[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;row-gap:.125rem;position:absolute;height:3.875rem;transition:.2s}.schedule-padding[_ngcontent-%COMP%]{padding:.4375rem min(50%,.75rem);height:100%;display:flex;flex-direction:column;justify-content:space-around}.schedule.in-view[_ngcontent-%COMP%]   .schedule-title[_ngcontent-%COMP%], .schedule.in-view[_ngcontent-%COMP%]   .schedule-time[_ngcontent-%COMP%]{position:sticky;left:14rem}@media only screen and (max-width:600px){.schedule.in-view[_ngcontent-%COMP%]   .schedule-title[_ngcontent-%COMP%], .schedule.in-view[_ngcontent-%COMP%]   .schedule-time[_ngcontent-%COMP%]{left:10rem}}.schedule.filter-match[_ngcontent-%COMP%]{color:#ca7ef1}.schedule[_ngcontent-%COMP%]:hover{background:#ffffff1a;cursor:pointer}.schedule.finishing-today[_ngcontent-%COMP%]:before{content:"";position:absolute;right:-1px;top:.4375rem;bottom:.4375rem;width:2px;background:#ca7ef1}.schedule-title[_ngcontent-%COMP%]{display:inline-block;align-self:flex-start;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.schedule-icons[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;height:1.125rem}.schedule-icons[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:1.125rem;height:1.125rem;margin-left:.25rem}.schedule-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-end}.schedule-time[_ngcontent-%COMP%]{display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding-right:2px}a.no-info[_ngcontent-%COMP%]{cursor:default;pointer-events:none}']})}}return t})();var Sq=["scheduleGrid"],Eq=()=>[];function Iq(t,i){if(t&1&&M(0,"app-schedule",2),t&2){let e=i.$implicit,n=_();S("categoryTags",n.categoryTags??Wl(11,Eq))("accessibilityFilter",n.accessibilityFilter)("selectedDate",n.selectedDate)("widthPerHour",n.widthPerHour)("channel",n.channel)("allowedAdultMode",n.allowedAdultMode)("program",e.programId?n.programsMap==null?null:n.programsMap.get(e.programId):void 0)("scheduleItemIntersectionObserver",n.scheduleItemIntersectionObserver)("schedule",e)("guideFocusEvent",n.guideFocusEvent)("guideScrollEvent",n.guideScrollEvent)}}var Oy=(()=>{class t{constructor(e,n,r,o){this.epgApiService=e,this.cdr=n,this.environment=r,this.epgUtility=o,this.selectedDate=new Date,this.programsMap=new Map,this.totalHours=24,this.allowedAdultMode=Me.ANY,this.initialFetchDone=!1,this.focusAfterFetch=!1,this.widthPerHour=500}ngAfterViewInit(){this.scheduleGrid?this.channelSchedulesIntersectionObserver?.observe(this.scheduleGrid.nativeElement):console.log("oh no...")}ngOnChanges(e){if(e.selectedDate){let n=ie.fromJSDate(this.selectedDate);this.totalHours=n.endOf("day").diff(n.startOf("day"),"hours").hours}}update(e){this.schedules=this.epgUtility.fillScheduleGaps(e.schedules??[],this.selectedDate,this.channel?.id??""),e.programs&&e.programs.forEac
15h(n=>{this.programsMap?.set(n.programId,n)}),this.cdr.detectChanges(),this.focusAfterFetch&&(this.focusCurrentSchedule(),this.focusAfterFetch=!1)}fetchSchedulesIfInView(){if(!this.selectedDate||!this.channel||!this.scheduleGrid?.nativeElement.classList.contains("in-view")||this.initialFetchDone){this.focusAfterFetch&&this.schedules&&(this.focusCurrentSchedule(),this.focusAfterFetch=!1);return}let e=ie.fromJSDate(this.selectedDate),n=e.plus({days:1});this.initialFetchDone=!0,this.scheduleSubscription&&this.scheduleSubscription.unsubscribe(),this.scheduleSubscription=this.epgApiService.getScheduleForChannelFromUntil(this.channel.id,e.toJSDate(),n.toJSDate()).subscribe(r=>{this.update(r)})}dateChange(){this.clear(),this.fetchSchedulesIfInView()}clear(){this.initialFetchDone=!1,this.schedules=[],this.programsMap=new Map,this.cdr.detectChanges()}getCurrentOffsetLeft(){return this.currentFocus?.currentOffsetLeft?this.currentFocus.currentOffsetLeft:Math.abs(ie.now().startOf("day").diffNow("hours").hours)*500}focusCurrentSchedule(){let e=this.getCurrentOffsetLeft();this.scheduleGrid?.nativeElement.querySelectorAll("app-schedule div.schedule")?.forEach(r=>{let o=r.offsetLeft,s=r.offsetWidth;e>=o&&e<o+s&&(r.classList.add("in-view"),this.channel&&(this.currentFocus?this.currentFocus.channel=this.channel.id:this.currentFocus={channel:this.channel.id}))})}ngOnDestroy(){this.scheduleGrid&&this.channelSchedulesIntersectionObserver?.unobserve(this.scheduleGrid.nativeElement)}static{this.\u0275fac=function(n){return new(n||t)(f(dn),f(Pe),f(ae),f(tn))}}static{this.\u0275cmp=D({type:t,selectors:[["app-channel-schedule"]],viewQuery:function(n,r){if(n&1&&Ve(Sq,5),n&2){let o;be(o=Ce())&&(r.scheduleGrid=o.first)}},inputs:{selectedDate:"selectedDate",channel:"channel",allowedAdultMode:"allowedAdultMode",scheduleItemIntersectionObserver:"scheduleItemIntersectionObserver",channelSchedulesIntersectionObserver:"channelSchedulesIntersectionObserver",categoryTags:"categoryTags",accessibilityFilter:"accessibilityFilter",guideFocusEvent:"guideFocusEvent",guideScrollEvent:"guideScrollEvent"},features:[Un],decls:4,vars:4,consts:[["scheduleGrid",""],[1,"schedule-grid",3,"id"],[3,"categoryTags","accessibilityFilter","selectedDate","widthPerHour","channel","allowedAdultMode","program","scheduleItemIntersectionObserver","schedule","guideFocusEvent","guideScrollEvent"]],template:function(n,r){n&1&&(m(0,"div",1,0),X(2,Iq,1,12,"app-schedule",2,se),g()),n&2&&(bt("width",r.totalHours*r.widthPerHour,"px"),S("id",yr("channel-",r.channel==null?null:r.channel.id)),u(2),K(r.schedules))},dependencies:[Gk],styles:[".schedule-grid[_ngcontent-%COMP%]{position:relative}"],changeDetection:0})}}return t})();function wq(t,i){if(t&1&&M(0,"app-clear-filter",1),t&2){let e=_();S("filter",e.filterType())}}function Tq(t,i){if(t&1){let e=B();m(0,"div",4),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.itemSelected(r))}),N(1),g()}if(t&2){let e=i.$implicit,n=_(2);H("selected",e.value===(n.selectedFilter==null?null:n.selectedFilter.label)),u(),ce(" ",n.translate()?n.config.getTranslation(e.label):e.label," ")}}function Dq(t,i){if(t&1&&(m(0,"div",2),X(1,Tq,2,3,"div",3,se),g()),t&2){let e=_();u(),K(e.options())}}var Ny=(()=>{class t extends gt{constructor(e,n){super(),this.filterService=e,this.config=n,this.label=Ct.required(),this.filterType=Ct.required(),this.options=Ct.required(),this.clearable=Ct(!1),this.autoSelectFirst=Ct(!1),this.translate=Ct(!0)}ngOnInit(){this.validateCurrentFilter(),this.tryAutoSelectFirst(),this.filterChangeSubscription=this.filterService.filterChanged.pipe(ke(e=>e===this.filterType())).subscribe(()=>this.validateCurrentFilter())}hideDropdown(){this.showDropdown.set(!1)}itemSelected(e){this.selectedFilter=e,this.filterService.updateFilter(this.filterType(),this.selectedFilter?.value),this.hideDropdown()}getButtonLabel(){return(this.translate()?this.config.getTranslation(this.selectedFilter?.label):this.selectedFilter?.label)??this.label()}validateCurrentFilter(){let e=this.filterService.getFilterString(this.filterType());e!==this.selectedFilter?.value&&(this.selectedFilter=this.options().find(n=>n.value===e),this.selectedFilter||this.filterService.clearFilter(this.filterType()))}tryAutoSelectFirst(){if(!this.autoSelectFirst()||this.filterService.getFilterString(this.filterType()))return;let n=this.options()?.[0];n&&this.itemSelected(n)}ngOnDestroy(){this.filterChangeSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(dt),f(O))}}static{this.\u0275cmp=D({type:t,selectors:[["app-basic-filter"]],inputs:{label:[1,"label"],filterType:[1,"f
15ilterType"],options:[1,"options"],clearable:[1,"clearable"],autoSelectFirst:[1,"autoSelectFirst"],translate:[1,"translate"]},features:[Ee],decls:4,vars:4,consts:[[1,"filter-button",3,"click","active"],[3,"filter"],[1,"dropdown"],[1,"dropdown-item","selectable","font-label",3,"selected"],[1,"dropdown-item","selectable","font-label",3,"click"]],template:function(n,r){n&1&&(m(0,"app-generic-button",0),A("click",function(){return r.showDropdown.set(!r.showDropdown())}),E(1,wq,1,1,"app-clear-filter",1),N(2),g(),E(3,Dq,3,0,"div",2)),n&2&&(S("active",r.showDropdown()||!!r.selectedFilter),u(),I(r.clearable()&&r.selectedFilter?1:-1),u(),ce(" ",r.getButtonLabel(),`
16`),u(),I(r.showDropdown()?3:-1))},dependencies:[Za,Pr],encapsulation:2})}}return t})();var ky=(()=>{class t{constructor(e){this.clearable=!1,this.FilterType=G,this.label=e.getTranslation(cr.lists_filter_accessibility),this.options=[{value:ms.AUDIO_DESCRIPTION,label:e.getTranslation(Fu.accessibility_audio_description)},{value:ms.SIGN_LANGUAGE,label:e.getTranslation(Fu.accessibility_sign_language)},{value:ms.SUBTITLES,label:e.getTranslation(Fu.accessibility_subtitles)}]}static{this.\u0275fac=function(n){return new(n||t)(f(O))}}static{this.\u0275cmp=D({type:t,selectors:[["app-accessibility-filter"]],inputs:{clearable:"clearable"},decls:1,vars:5,consts:[[3,"label","filterType","options","clearable","translate"]],template:function(n,r){n&1&&M(0,"app-basic-filter",0),n&2&&S("label",r.label)("filterType",r.FilterType.ACCESSIBILITY)("options",r.options)("clearable",!0)("translate",!1)},dependencies:[Ny],encapsulation:2})}}return t})();var tw=(()=>{class t{static config(e){return{dismissableMask:!0,closable:!0,header:e}}constructor(e){this.allowedAdultMode=Me.ANY,this.categoryProvider=new Ja(e)}static{this.\u0275fac=function(n){return new(n||t)(f(dn))}}static{this.\u0275cmp=D({type:t,selectors:[["app-filter-dialog"]],decls:3,vars:4,consts:[[1,"filter-dialog"],[3,"categoryProvider","allowedAdultMode","clearable"],[3,"clearable"]],template:function(n,r){n&1&&(m(0,"div",0),M(1,"app-category-filter",1)(2,"app-accessibility-filter",2),g()),n&2&&(u(),S("categoryProvider",r.categoryProvider)("allowedAdultMode",r.allowedAdultMode)("clearable",!0),u(),S("clearable",!0))},dependencies:[ss,ky],styles:[".filter-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}"]})}}return t})();var Wk=(()=>{class t{constructor(e,n,r,o){this.filterService=e,this.dialogService=n,this.config=r,this.label=this.config.getTranslation(wo.guide_filter_title),this.active=this.isButtonActive(),e.filterChanged.pipe(ke(s=>s===G.TAG||s===G.ACCESSIBILITY)).subscribe(()=>{this.active=this.isButtonActive(),o.detectChanges()})}getFilterIcon(){return this.active?"./assets/theme/svg/filter_selected.svg":"./assets/theme/svg/filter_normal.svg"}showDialog(){this.dialogService.open(tw,tw.config(this.label))}isButtonActive(){let e=new Set([G.TAG,G.ACCESSIBILITY]);return this.filterService.hasAny(e)}static{this.\u0275fac=function(n){return new(n||t)(f(dt),f(Eu),f(O),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-filter-button"]],decls:1,vars:3,consts:[[3,"click","icon","label","active"]],template:function(n,r){n&1&&(m(0,"app-text-button",0),A("click",function(){return r.showDialog()}),g()),n&2&&S("icon",r.getFilterIcon())("label",r.label)("active",r.active)},dependencies:[Ke],encapsulation:2,changeDetection:0})}}return t})();var Aq=["timeline"];function Rq(t,i){t&1&&M(0,"app-filter-button",2)}function xq(t,i){if(t&1&&M(0,"app-category-filter",3),t&2){let e=_();S("allowedAdultMode",e.allowedAdultMode)("categoryProvider",e.categoryProvider)("clearable",!0)}}function Mq(t,i){if(t&1&&(m(0,"span",7),N(1),g()),t&2){let e=i.$implicit,n=_();bt("width",n.widthPerHour/2,"px"),u(),ce(" ",n.getTimeStr(e)," ")}}var zk=(()=>{class t{constructor(e,n,r){this.cdr=e,this.environment=n,this.widthPerHour=500,this.totalHours=24,this.timelineElements=[],this.showAccessibilityFilter=r.getSettingBoolean(x.showAccessibilityIcons,!1)}scroll(e){this.container.nativeElement.scrollLeft=e,this.cdr.detectChanges()}update(e){this.totalHours=e.endOf("day").diff(e.startOf("day")).as("hours"),this.timelineElements=[];let n=e.startOf("day"),r=e.endOf("day");for(;n<r;)this.timelineElements.push(ie.fromMillis(n.toMillis())),n=n.plus({minutes:30});this.cdr.detectChanges()}getTimeStr(e){return e.toFormat("HH:mm")}static{this.\u0275fac=function(n){return new(n||t)(f(Pe),f(ae),f(O))}}static{this.\u0275cmp=D({type:t,selectors:[["app-timeline"]],viewQuery:function(n,r){if(n&1&&Ve(Aq,5),n&2){let o;be(o=Ce())&&(r.container=o.first)}}
16,inputs:{categoryProvider:"categoryProvider",allowedAdultMode:"allowedAdultMode"},decls:9,vars:4,consts:[["timeline",""],[1,"timeline-wrapper"],[1,"guide-filter"],[1,"guide-filter",3,"allowedAdultMode","categoryProvider","clearable"],[1,"timeline-container"],[1,"timeline"],[1,"timeline-point","font-highlighted-caption",3,"width"],[1,"timeline-point","font-highlighted-caption"]],template:function(n,r){n&1&&(m(0,"div",1),E(1,Rq,1,0,"app-filter-button",2),E(2,xq,1,3,"app-category-filter",3),m(3,"div",4,0)(5,"div")(6,"div",5),X(7,Mq,2,3,"span",6,se),g()()()()),n&2&&(u(),I(r.showAccessibilityFilter?1:-1),u(),I(r.showAccessibilityFilter?-1:2),u(3),bt("width",r.totalHours*r.widthPerHour,"px"),u(2),K(r.timelineElements))},dependencies:[Wk,ss],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.timeline-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;height:3rem;border-bottom:1px solid rgba(255,255,255,.16)}.guide-filter[_ngcontent-%COMP%]{position:absolute;left:.625rem;background:#030d2b;z-index:1}.timeline-container[_ngcontent-%COMP%]{width:100%;overflow:hidden}.timeline[_ngcontent-%COMP%]{margin-left:14rem;display:flex;align-items:center}.timeline-point[_ngcontent-%COMP%]{top:.75rem;opacity:.64;flex-shrink:0}@media only screen and (max-width:600px){.category-filter[_ngcontent-%COMP%]{padding:0 .3125rem}.timeline[_ngcontent-%COMP%]{margin-left:10rem}}"],changeDetection:0})}}return t})();function Pq(t,i){if(t&1){let e=B();te(0,"img",8),qe("click",function(){k(e);let r=_();return L(r.toggleFavorite())}),J()}if(t&2){let e=_();Gn("src",e.currentChannel!=null&&e.currentChannel.isFavorite()?"./assets/theme/svg/favoritesicon_selected.svg":"./assets/theme/svg/favoritesicon_normal.svg",Je)}}function Oq(t,i){if(t&1&&Qe(0,"div",9),t&2){let e=_();bt("background-image","url("+e.getChannelLogo(e.currentChannel)+")")}}function Nq(t,i){if(t&1&&(te(0,"div",5),N(1),J()),t&2){let e=_();u(),ce(" ",e.currentChannel==null?null:e.currentChannel.name," ")}}function kq(t,i){t&1&&Qe(0,"span",6)}function Lq(t,i){if(t&1&&Qe(0,"img",7),t&2){let e=_();Gn("src",e.currentChannel==null?null:e.currentChannel.recordableIcon,Je)}}var qk=(()=>{class t{set channel(e){e&&(this.currentChannel=e,this.channelNumber=e.getChannelNumberForCatalog(this.sessionService.catalogId))}constructor(e,n,r,o,s,a){this.favoriteCacheService=e,this.auth=n,this.sessionService=r,this.messagesService=o,this.config=s,this.adultService=a,this.userIsAuthorized=!1,this.userIsAuthorized=this.auth.isAuthorized()}toggleFavorite(){!this.userIsAuthorized||!this.currentChannel||(this.currentChannel.adult?this.adultService.checkAdultMode({successCallback:()=>{this.doToggle()},errorCallback:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(pe.detail_adult_warning))}}):this.doToggle())}doToggle(){this.currentChannel&&(this.currentChannel.isFavorite()?(this.favoriteCacheService.deleteFavorite(cn.CHANNEL,this.currentChannel.id),this.currentChannel.setFavorite(!1)):(this.favoriteCacheService.setFavorite(cn.CHANNEL,this.currentChannel.id),this.currentChannel.setFavorite(!0)))}getChannelLogo(e){return e?.defaultLogo?ot.createImageUrl(e.defaultLogo,me.CHANNEL_1):void 0}static{this.\u0275fac=function(n){return new(n||t)(f(ui),f(et),f(ne),f(_e),f(O),f($e))}}static{this.\u0275cmp=D({type:t,selectors:[["app-channel"]],inputs:{channel:"channel"},decls:9,vars:7,consts:[[1,"channel"],[1,"channel-left"],[1,"font-highlighted-caption"],[1,"channel-favorite",3,"src"],["onerror","style.display = 'none'",1,"channel-logo",3,"background-image"],[1,"channel-text"],[1,"filler"],[1,"channel-recordable-icon",3,"src"],[1,"channel-favorite",3,"click","src"],["onerror","style.display = 'none'",1,"channel-logo"]],template:function(n,r){n&1&&(te(0,"div",0)(1,"div",1)(2,"span",2),N(3),J(),E(4,Pq,1,1,"img",3),J(),E(5,Oq,1,2,"div",4)(6,Nq,2,1,"div",5),E(7,kq,1,0,"span",6),E(8,Lq,1,1,"img",7),J()),n&2&&(u(),H("favorite",r.currentChannel==null?null:r.currentChannel.isFavorite()),u(2),Q(r.channelNumber),u(),I(r.userIsAuthorized?4:-1),u(),I(r.currentChannel!=null&&r.currentChannel.defaultLogo?5:6),u(2),I(r.currentChannel!=null&&r.currentChannel.recordableIcon?-1:7),u(),I(r.currentChannel!=null&&r.currentChannel.recordableIcon?8:-1))},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.channel[_ngcontent-%COMP%]{display:flex;align-items:center;column-gap:1rem;width:100%;height:100%;padding:.4375rem 0}.channel-left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;row-gap:.125rem;opacity:.56}.channel-left.favorite[_ngcontent-%COMP%]{color:#ca7ef1;opacity:1}.channel-logo[_ngcontent-%COMP%]{height:100%;width:6rem;background-position:center;background-size:contain;background-repeat:no-repeat}.channel-text[_ngcontent-%COMP%]{max-height:100%;width:6rem;text-align:center;display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
16.channel-favorite[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem;cursor:pointer}.channel-recordable-icon[_ngcontent-%COMP%]{margin-left:auto;width:1.25rem;height:1.25rem}.filler[_ngcontent-%COMP%]{width:1.25rem}@media only screen and (max-width:1100px){.channel[_ngcontent-%COMP%]{column-gap:.75rem}.channel-logo[_ngcontent-%COMP%]{width:4rem}}"]})}}return t})();var Fq=["tab"],Ly=(()=>{class t{constructor(e){this.container=e}ngAfterContentInit(){this.activeTabIndex&&this.scrollTo(this.activeTabIndex,"instant")}onResize(){this.activeTabIndex&&this.scrollTo(this.activeTabIndex)}scrollTo(e,n="auto"){let r=this.tabs.get(e);if(!r){console.warn("could not scroll to tab");return}let o=this.getTabCenter(r),s=this.getContainerCenter(),l=this.container.nativeElement.scrollLeft+o-s;this.container.nativeElement.scroll({left:l,behavior:n})}getTabCenter(e){let n=e.nativeElement.getBoundingClientRect();return n?(n?.left+n?.right)/2:0}getContainerCenter(){let e=this.container.nativeElement.getBoundingClientRect();return e?(e?.left+e?.right)/2:0}static{this.\u0275fac=function(n){return new(n||t)(f(Cn))}}static{this.\u0275dir=Bt({type:t,selectors:[["","appAutoScrollTabs",""]],contentQueries:function(n,r,o){if(n&1&&Ia(o,Fq,5),n&2){let s;be(s=Ce())&&(r.tabs=s)}},hostBindings:function(n,r){n&1&&A("resize",function(){return r.onResize()},OC)},inputs:{activeTabIndex:"activeTabIndex"}})}}return t})();var Au=(()=>{class t{constructor(e,n){this.configService=e,this.route=n,this.today=ie.now().startOf("day"),this.tomorrow=this.today.plus({day:1}),this.yesterday=this.today.minus({day:1}),this.fullDayKeys=[],this.selectedDate=void 0,this.dateSelectedEvent=new qt(this.today);let r=this.configService.getSettingNumber(x.epgPastDays,7),o=this.configService.getSettingNumber(x.epgFutureDays,7);this.days=Array.from(new Array(r+o+1),(a,l)=>ie.now().startOf("day").plus({days:-r+l}));let s=parseInt(this.route.snapshot.queryParams.date,10);if(s){let a=ie.fromMillis(s);Oa.fromDateTimes(this.days[0],this.days[this.days.length-1]).contains(a)&&(this.selectedDate=a.startOf("day"))}this.selectedDate||(this.selectedDate=this.today),this.dateSelectedEvent.next(this.selectedDate),this.fullDayKeys[1]=Fe.time_day_monday,this.fullDayKeys[2]=Fe.time_day_tuesday,this.fullDayKeys[3]=Fe.time_day_wednesday,this.fullDayKeys[4]=Fe.time_day_thursday,this.fullDayKeys[5]=Fe.time_day_friday,this.fullDayKeys[6]=Fe.time_day_saturday,this.fullDayKeys[7]=Fe.time_day_sunday}getSelectedDate(){return this.selectedDate}setSelectedDate(e){this.selectedDate=e||this.today,this.dateSelectedEvent.next(this.selectedDate)}getSelectedDateIndex(){let e=this.days.findIndex(n=>n.equals(this.selectedDate));return e>=0?e:void 0}getDays(){return this.days}getFullDayString(e){if(this.today.toMillis()===e.toMillis())return this.configService.getTranslation(Fe.time_today);if(this.tomorrow.toMillis()===e.toMillis())return this.configService.getTranslation(Fe.time_tomorrow);if(this.yesterday.toMillis()===e.toMillis())return this.configService.getTranslation(Fe.time_yesterday);{let n=e.weekday;return this.configService.getTranslation(this.fullDayKeys[n])}}getDateString(e){return e.setLocale(this.configService.getLocale().replace("_","-")).toFormat("dd LLL")}static{this.\u0275fac=function(n){return new(n||t)(h(O),h(_t))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Yk=(()=>{class t{#e;constructor(e,n){this.daySelectorService=e,this.cdr=n,this.isToday=!1,this.today=ie.now().startOf("day")}ngOnInit(){this.daySelectorService.dateSelectedEvent.subscribe(()=>this.cdr.detectChanges())}set date(e){this.#e=e,this.dateStr=this.daySelectorService.getDateString(e),this.today.toMillis()===e.toMillis()&&(this.isToday=!0),this.fullDayStr=this.daySelectorService.getFullDayString(e)}isDaySelected(){return this.daySelectorService.getSelectedDate()&&this.daySelectorService.getSelectedDate()?.toMillis()===this.#e?.toMillis()||!1}static{this.\u0275fac=function(n){return new(n||t)(f(Au),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-day-selector-element"]],inputs:{date:"date"},decls:5,vars:6,consts:[[1,"day-option"],[1,"font-highlighted-caption"],[1,"font-headline"]],template:function(n,r){n&1&&(te(0,"div",0)(1,"span",1),N(2),J(),te(3,"h4",2),N(4),J()()),n&2&&(H("selected",r.isDaySelected())("is-today",r.isToday),u(2),Q(r.dateStr),u(2),Q(r.fullDayStr))},styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.day-option[_ngcontent-%COMP%]{transition:all .3s;display:flex;flex-direction:column;text-align:center;color:#ca7ef1;opacity:.48}.day-option[_ngcontent-%COMP%]:hover{opacity:1;cursor:pointer}.day-option.selected[_ngcontent-%COMP%]{opacity:1;color:#ca7ef1}.day-option.selected[_ngcontent-%COMP%]:hover:not(.is-today){cursor:default}"]})}}return t})();function Vq(t,i){if(t&1){let e=B();m(0,"li",3,0)(2,"app-day-selector-element",4),A("click",function(){let r=k(e),o=r.$implicit,s=r.$index,a=_();return L(a.selectDate(o,s))}),g()()}if(t&2){let e=i.$implicit;u(2),S("date",e)}}var Qk=(()=>{class t{constructor(e){this.daySelectorService=e}selectDate(e,n){this.daySelectorService.setSelectedDate(e),this.scroller.scrollTo(n)}getSelectedDateIndex(){return this.daySelectorService.getSelectedDateIndex()}getDays(){return this.daySelectorService.getDays()}static{this.\u0275fac=function(n){return new(n||t)(f(Au))}}static{this.\u0275cmp=D({type:t,selectors:[["app-day-selector"]],viewQuery:function(n,r){if(n&1&&Ve(Ly,5),n&2){let o;be(o=Ce())&&(r.scroller=o.first)}},decls:4,vars:1,consts:[["tab",""],["appAutoScrollTabs","",1,"day-selector-wrapper",3,"activeTabIndex"],[1,"day-selector"],[1,"day"],[3,"click","date"]],template:function(n,r){n&1&&(m(0,"nav",1)(1,"ul",2),X(2,Vq,3,1,"li",3,se),g()()),n&2&&(S("activeTabIndex",r.getSelectedDateIndex()),u(2),K(r.getDays()))},dependencies:[Ly,Yk],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.day-selector-wrapper[_ngcontent-%COMP%]{width:100%;display:flex;margin:auto;overflow-x:scroll;scrollbar-width:none;scroll-behavior:smooth;background:#030d2b}.day-selector[_ngcontent-%COMP%]{display:flex;margin:auto;margin-top:1rem;margin-bottom:.625rem;white-space:nowrap}.day[_ngcontent-%COMP%]{margin:0 1rem}.day-selector-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}"]})}}return t})();var Uq=["currentTime"],Zk=(t,i)=>i.id;
16function Bq(t,i){if(t&1&&M(0,"app-channel",8),t&2){let e=i.$implicit;S("channel",e)}}function jq(t,i){if(t&1&&(m(0,"div",10),M(1,"app-channel-schedule",11),g()),t&2){let e=i.$implicit,n=_();u(),S("channel",e)("selectedDate",n.selectedDate)("allowedAdultMode",n.allowedAdultMode)("scheduleItemIntersectionObserver",n.scheduleItemIntersectionObserver)("channelSchedulesIntersectionObserver",n.channelSchedulesIntersectionObserver)("categoryTags",n.categoryTags)("accessibilityFilter",n.accessibilityFilter)}}var Jk=(()=>{class t extends Li{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T,W,j,ee,De){super(a,d,p,y,s,b,ee,De),this.cdr=e,this.activatedRoute=n,this.zone=r,this.log=o,this.channelCacheService=l,this.epgApi=c,this.daySelectorService=T,this.queryFilterService=W,this.environment=j,this.replay=!1,this.allowedAdultMode=Me.ANY,this.currentTimePosition=0,this.isTodaySelected=V(!1),this.initialized=!1,this.categoryTags=[];let tt=this.activatedRoute.snapshot.data;tt.properties.includes(oe.FOCUS_FUTURE)?this.replay=!1:tt.properties.includes(oe.FOCUS_PAST)&&(this.replay=!0),this.queryFilterService.loadUrlFilters(),this.initMenuSubscription=b.ready.subscribe(()=>{this.initMenus(),this.initMenuSubscription?.unsubscribe(),this.initMenuSubscription=void 0}),this.pageTitle=this.config.getTranslation(Hn.menu_guide)}ngOnInit(){this.scheduleItemIntersectionObserver||(this.scheduleItemIntersectionObserver=new IntersectionObserver(e=>{e.forEach(n=>{n.isIntersecting&&!n.target.classList.contains("in-view")?n.target.classList.add("in-view"):!n.isIntersecting&&n.target.classList.contains("in-view")&&n.target.classList.remove("in-view")})})),this.channelSchedulesIntersectionObserver||(this.channelSchedulesIntersectionObserver=new IntersectionObserver(e=>{e.forEach(n=>{n.isIntersecting&&!n.target.classList.contains("in-view")?n.target.classList.add("in-view"):!n.isIntersecting&&n.target.classList.contains("in-view")&&n.target.classList.remove("in-view"),n.target.classList.contains("schedule-grid")&&n.target.classList.contains("in-view")&&this.channelChildren.forEach(r=>r.fetchSchedulesIfInView())})},{rootMargin:"100px"})),this.categoryTags=this.queryFilterService.getFilterList(G.TAG),this.accessibilityFilter=this.queryFilterService.getFilterString(G.ACCESSIBILITY),this.filterSubscription=this.queryFilterService.filterChanged.subscribe(e=>{switch(e){case G.ACCESSIBILITY:this.accessibilityFilter=this.queryFilterService.getFilterString(G.ACCESSIBILITY);break;case G.TAG:this.categoryTags=this.queryFilterService.getFilterList(G.TAG);break}}),super.start()}ngAfterViewInit(){this.updateCurrentTimePosition(),this.detectChanges(),this.channelChildrenSubscription?.unsubscribe(),this.channelChildren.length>0?this.addEventListeners():this.channelChildrenSubscription=this.channelChildren.changes.subscribe(()=>{this.addEventListeners()}),this.initMenus()}initMenus(){this.windowManager.clearMenus(),this.windowManager.injectScrollableMenu(Qk),this.timeline=this.windowManager.injectFixedMenu(zk)?.instance,this.timeline&&(this.timeline.categoryProvider=new Ja(this.epgApi),this.timeline.allowedAdultMode=this.allowedAdultMode),this.daySelectorService.dateSelectedEvent.subscribe(e=>this.dateSelected(e))}loadPage(){this.updateHtmlTitle(this.pageTitle);let e=this.replay?this.environment.atvReplayOttRights:this.environment.atvOttRights;this.channelCacheService.getValidChannels(e,this.sessionService.catalogId).subscribe({next:n=>{this.initialized=!1,this.guideChannels=n.validChannels,this.logPageView()},error:n=>{console.error("Could not load channels",n)}})}getPageProperties(){return C(this.activatedRoute.snapshot.data.properties)}logPageView(){this.log.pageView(new Qt({pageURL:this.replay?Zt.replay_epg_guide:Zt.epg_guide,pageTitle:this.pageTitle,pageLocale:this.config.getLocale()}))}detectChanges(){this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges()}addEventListeners(){let e=this.queryFilterService.getFilterNumber(G.DATE),n=this.queryFilterService.getFilterNumber(G.GUIDE_Y);e?this.scrollToTime(ie.fromMillis(e),"instant"):this.scrollToCurrentTime("instant"),this.windowManager.scrollTo({top:n}),this.scrollSubscription=this.windowManager.scroll.pipe(we(r=>this.timeline?.scroll(r.x)),Ti(300)).subscribe(({x:r,y:o})=>this.updateCoords(r,o)),this.initialized=!0,this.channelChildrenSub
16scription&&this.channelChildrenSubscription.unsubscribe()}dateSelected(e){let n=this.selectedDate||e.toJSDate();this.selectedDate=e.toJSDate(),this.detectChanges(),this.initialized&&this.selectedDate.getTime()!==n.getTime()&&this.channelChildren.forEach(r=>r.dateChange()),this.updateTodaySelected(),this.isTodaySelected()?(this.timerSubscription||this.zone.runOutsideAngular(()=>{this.timerSubscription=qu(5e3).subscribe(()=>this.updateCurrentTimePosition())}),this.updateCurrentTimePosition(),this.scrollToCurrentTime("smooth")):this.timerSubscription&&(this.timerSubscription.unsubscribe(),this.timerSubscription=void 0),this.timeline?.update(e)}updateCoords(e,n){if(!this.initialized||!this.selectedDate)return;let r=ie.fromJSDate(this.selectedDate).plus({hours:e/500});this.queryFilterService.updateFilters([{key:G.DATE,value:r.toMillis().toString()},{key:G.GUIDE_Y,value:n.toString()}])}updateCurrentTimePosition(){this.zone.runOutsideAngular(()=>{let e=ie.now().diff(ie.now().startOf("day")).as("hours");this.currentTimePosition=e*500-7,this.currentTime.nativeElement.style.left=this.currentTimePosition+"px"})}scrollToTime(e,n="auto"){let r=e.diff(e.startOf("day"),"hours",{conversionAccuracy:"longterm"}).hours*500;this.windowManager.scrollTo({left:r,behavior:n})}scrollToCurrentTime(e="auto"){let n=this.currentTimePosition-500/2;this.windowManager.scrollTo({left:n,behavior:e})}updateTodaySelected(){if(!this.selectedDate){this.isTodaySelected.set(!1);return}this.isTodaySelected.set(ie.now().startOf("day").toMillis()===ie.fromJSDate(this.selectedDate).toMillis())}ngOnDestroy(){this.scheduleItemIntersectionObserver?.disconnect(),this.channelSchedulesIntersectionObserver?.disconnect(),this.timerSubscription?.unsubscribe(),this.channelChildrenSubscription?.unsubscribe(),this.scrollSubscription?.unsubscribe(),this.filterSubscription?.unsubscribe(),this.initMenuSubscription?.unsubscribe(),this.windowManager.clearMenus(),super.stop()}static{this.\u0275fac=function(n){return new(n||t)(f(Pe),f(_t),f(ut),f(ct),f(O),f(ne),f(Jn),f(dn),f(et),f($e),f(_e),f(Zn),f(Au),f(dt),f(ae),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["app-guide-page"]],viewQuery:function(n,r){if(n&1&&Ve(Uq,5)(Oy,5),n&2){let o;be(o=Ce())&&(r.currentTime=o.first),be(o=Ce())&&(r.channelChildren=o)}},features:[Ee],decls:13,vars:2,consts:[["currentTime",""],[1,"guide-container"],[1,"current-time"],["src","./assets/theme/svg/guide_now_line_top.svg",1,"now-icon"],[1,"now-line"],["width","100%","height","100%","xmlns","http://www.w3.org/2000/svg"],["x1","1.5","y1","0","x2","1.5","y2","100%","stroke-dasharray","4.8","stroke-width","3"],[1,"channel-container"],[1,"guide-row","channel",3,"channel"],[1,"channel-schedule-container"],[1,"guide-row"],[3,"channel","selectedDate","allowedAdultMode","scheduleItemIntersectionObserver","channelSchedulesIntersectionObserver","categoryTags","accessibilityFilter"]],template:function(n,r){n&1&&(m(0,"div",1)(1,"div",2,0),M(3,"img",3),m(4,"div",4),Lm(),m(5,"svg",5),M(6,"line",6),g()()(),Fm(),m(7,"div",7),X(8,Bq,1,1,"app-channel",8,Zk),g(),m(10,"div",9),X(11,jq,2,7,"div",10,Zk),g()()),n&2&&(u(),H("hidden",!r.isTodaySelected()),u(7),K(r.guideChannels),u(3),K(r.guideChannels))},dependencies:[qk,Oy],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.guide-container[_ngcontent-%COMP%]{position:relative;display:flex}.current-time[_ngcontent-%COMP%]{width:.875rem;position:absolute;top:0;bottom:0;z-index:1;margin-left:14rem;display:flex;align-items:center;flex-direction:column}.now-icon[_ngcontent-%COMP%]{width:100%;height:fit-content}.now-line[_ngcontent-%COMP%]{width:3px;height:100%;stroke:#e2d8fe;stroke-opacity:.4}.channel-container[_ngcontent-%COMP%]{position:sticky;display:flex;flex-direction:column;left:0;width:14rem;background:#030d2b;z-index:1}.channel-schedule-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.guide-row[_ngcontent-%COMP%]{display:flex;flex-shrink:0;height:3.875rem}.guide-row[_ngcontent-%COMP%]:not(:first-child){border-top:1px solid rgba(255,255,255,.16)}.channel[_ngcontent-%COMP%]{padding:0 1.25rem}
16@media only screen and (max-width:600px){.current-time[_ngcontent-%COMP%]{margin-left:10rem}.channel-container[_ngcontent-%COMP%]{width:10rem}.channel[_ngcontent-%COMP%]{padding:0 .625rem}}"]})}}return t})();var Fy=class extends fn{constructor(i,e,n,r,o,s,a){super(),this.epgApi=i,this.channel=e,this.from=n,this.until=r,this.useReplay=o,this.tags=s,this.accessibilityOptions=a,this.hasMore=!0,this.page=0,this.orientation=nt.LANDSCAPE}getItems(){return this.epgApi.getLineupRibbon(this.channel,Me.ANY,this.page,this.tags,this.accessibilityOptions,this.from,this.until,this.useReplay?Hr.DESC:Hr.ASC).pipe(P(i=>{this.hasMore=i.nextPage??!1,this.page+=1,this.orientation=i.type;let e=i.items??[];return this.useReplay?e.filter(n=>this.hasValidSchedule(n,r=>r<new Date().getTime())):e.filter(n=>this.hasValidSchedule(n,r=>r>new Date().getTime()))}))}hasNext(){return this.hasMore}resetPaging(){this.hasMore=!0,this.page=0}hasValidSchedule(i,e){return i.channels?.some(n=>n.schedules?.some(r=>e(r.published.end.getTime())))??!1}};function Hq(t,i){if(t&1){let e=B();m(0,"div",4),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.selectChannel(r))}),M(1,"div",5),N(2),g()}if(t&2){let e=i.$implicit,n=_(2);H("selected",e.id===(n.selectedChannel==null?null:n.selectedChannel.id)),u(),bt("background-image","url("+n.getChannelLogo(e)+")"),u(),ce(" ",e.name," ")}}function $q(t,i){if(t&1&&(m(0,"div",2),X(1,Hq,3,5,"div",3,se),g()),t&2){let e=_();u(),K(e.validChannels)}}var Xk=(()=>{class t extends gt{constructor(e,n,r){super(),this.filterService=n,this.cdr=r,this.label=e.getTranslation(cr.lists_filter_channel)}set channels(e){this.validChannels=e,this.validateCurrentFilter()}ngOnInit(){this.filterChangeSubscription=this.filterService.filterChanged.pipe(ke(e=>e===G.CHANNEL)).subscribe(()=>this.validateCurrentFilter())}hideDropdown(){this.showDropdown.set(!1)}showFilters(){this.showDropdown()?this.hideDropdown():this.validChannels&&this.validChannels.length>0&&this.showDropdown.set(!0)}selectChannel(e){this.selectedChannel=e,this.filterService.updateFilter(G.CHANNEL,e?.id),this.hideDropdown()}isButtonActive(){return this.showDropdown()||!!this.selectedChannel}getButtonLabel(){return this.selectedChannel?this.selectedChannel.name:this.label}getChannelLogo(e){return e?.defaultLogo?ot.createImageUrl(e.defaultLogo,me.CHANNEL_1):void 0}validateCurrentFilter(){if(!this.validChannels||this.validChannels.length===0)return;let e=this.filterService.getFilterString(G.CHANNEL);this.selectedChannel&&e===this.selectedChannel.id||(this.selectedChannel=this.validChannels.find(n=>n.id===e),e&&!this.selectedChannel&&this.filterService.clearFilter(G.CHANNEL),this.cdr.detectChanges())}ngOnDestroy(){this.filterChangeSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(dt),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-channel-filter"]],inputs:{channels:"channels"},features:[Ee],decls:3,vars:3,consts:[[1,"filter-container"],[3,"click","label","active"],[1,"dropdown"],[1,"dropdown-item","selectable","font-label",3,"selected"],[1,"dropdown-item","selectable","font-label",3,"click"],[1,"channel-logo"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"app-text-button",1),A("click",function(){return r.showFilters()}),g(),E(2,$q,3,0,"div",2),g()),n&2&&(u(),S("label",r.getButtonLabel())("active",r.isButtonActive()),u(),I(r.showDropdown()&&r.validChannels?2:-1))},dependencies:[Ke],styles:[".dropdown-item[_ngcontent-%COMP%]{justify-content:flex-start;align-items:center;column-gap:1rem}.channel-logo[_ngcontent-%COMP%]{background-position:center;background-size:contain;background-repeat:no-repeat;width:2.5rem;height:2.5rem}"]})}}return t})();function Gq(t,i){if(t&1){let e=B();m(0,"div",4),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.selectDay(r))}),N(1),g()}if(t&2){let e=i.$implicit,n=_(2);H("selected",e===n.selectedDay),u(),ce(" ",n.getDayString(e)," ")}}function Wq(t,i){if(t&1&&(m(0,"div",2),X(1,Gq,2,3,"div",3,se),g()),t&2){let e=_();u(),K(e.filterDays)}}var Kk=(()=>{class t extends gt{constructor(e,n,r){super(),this.config=e,this.filterService=n,this.cdr=r,this.label=e.getTranslation(cr.lists_filter_day)}ngOnInit(){this.validateCurrentFilter(),this.filterChangeSubscription=this.filterService.filterChanged.pipe(ke(e=>e===G.DATE)).subscribe(()=>this.validateCurrentFilter())}hideDropdown(){this.showDropdown.set(!1)}showFilters(){this.showDropdown()?this.hideDropdown():this.showDropdown.set(!0)}selectDay(e){this.selectedDay=e,this.filterService.updateFilterDate(G.DATE,e),this.hideDropdown()}isButtonActive(){return this.showDropdown()||!!this.selectedDay}getDayString(e){return $.getDayInfo(e.toMillis(),!1,this.config)}getButtonLabel(){return this.selectedDay?this.getDayString(this.selectedDay):this.label}validateCurrentFilter(){let e=this.filterService.getFilterDate(G.DATE)?.startOf("day");
16if(e?.toMillis()!==this.selectedDay?.toMillis()){if(this.selectedDay=e,!this.selectedDay){this.cdr.detectChanges();return}this.selectedDay&&!this.filterDays.some(n=>n===this.selectedDay)&&(this.selectedDay=void 0,this.filterService.clearFilter(G.DATE),this.cdr.detectChanges())}}ngOnDestroy(){this.filterChangeSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(dt),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-day-filter"]],inputs:{filterDays:"filterDays"},features:[Ee],decls:3,vars:3,consts:[[1,"filter-container"],[3,"click","label","active"],[1,"dropdown"],[1,"dropdown-item","selectable","font-label",3,"selected"],[1,"dropdown-item","selectable","font-label",3,"click"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"app-text-button",1),A("click",function(){return r.showFilters()}),g(),E(2,Wq,3,0,"div",2),g()),n&2&&(u(),S("label",r.getButtonLabel())("active",r.isButtonActive()),u(),I(r.showDropdown()?2:-1))},dependencies:[Ke],encapsulation:2})}}return t})();var zq=["placeholder"];function qq(t,i){t&1&&M(0,"app-accessibility-filter")}function Yq(t,i){t&1&&M(0,"app-clear-all-filters")}function Qq(t,i){if(t&1&&M(0,"app-ribbon",7),t&2){let e=i.$implicit,n=i.$index,r=_(2);S("pageProperties",r.pageProperties)("allowedAdultMode",r.allowedAdultMode)("ribbon",e)("registerOnObserver",r.ribbonIntersectionObserver)("ribbonId",n)}}function Zq(t,i){if(t&1&&(m(0,"div",2)(1,"div",3),M(2,"app-day-filter",4)(3,"app-channel-filter",5)(4,"app-category-filter",6),E(5,qq,1,0,"app-accessibility-filter"),E(6,Yq,1,0,"app-clear-all-filters"),g(),X(7,Qq,1,5,"app-ribbon",7,se),M(9,"div",8,0),m(11,"div",9),M(12,"img",10),g(),m(13,"div",11),N(14),g()()),t&2){let e=_();u(2),S("filterDays",e.filterDays),u(),S("channels",e.validChannels),u(),S("categoryProvider",e.categoryProvider)("allowedAdultMode",e.allowedAdultMode),u(),I(e.showAccessibilityFilter?5:-1),u(),I(e.hasFilters()?6:-1),u(),K(e.ribbons),u(4),H("hidden",e.itemsLeftFetching===0||!e.ready),u(2),H("hidden",e.hasResults()),u(),ce(" ",e.noResultText," ")}}var eL=(()=>{class t extends Li{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T,W,j,ee,De,tt){super(c,b,p,y,o,ee,De,tt),this.channelCache=e,this.epgApi=n,this.epgUtility=r,this.favoriteCache=s,this.log=a,this.cdr=l,this.activatedRoute=d,this.filterService=T,this.contentProviderFactoryService=W,this.environment=j,this.pageLoaded=!1,this.filterDays=[],this.validChannels=[],this.pageProperties=[],this.allowedAdultMode=Me.ANY,this.useReplay=!1,this.itemsLeftFetching=0,this.allChannels=[],this.shownListItemIndex=0,this.firstLoadAmount=4,this.loadAmount=2,this.ready=!1,this.ribbons=[],this.epgFutureDays=this.config.getSettingNumber(x.epgFutureDays,7),this.epgPastDays=this.config.getSettingNumber(x.epgPastDays,7),this.noResultText=this.config.getTranslation(ge.error_filter_no_results),this.categoryProvider=new Ja(n),this.showAccessibilityFilter=this.config.getSettingBoolean(x.showAccessibilityIcons,!1),this.pageTitle=this.config.getTranslation(Hn.menu_lists)}loadPage(){this.updateHtmlTitle(this.pageTitle),this.pageLoaded=!0,this.filterService.loadUrlFilters();let e=this.activatedRoute.snapshot.data;this.pageProperties=e.properties,this.useReplay=Pn.isReplay(this.pageProperties),this.filterDays=this.getFilterDates();let n=this.useReplay?this.environment.atvReplayOttRights:this.environment.atvOttRights;this.channelCache.getValidChannels(n,this.sessionService.catalogId).pipe(Gi(()=>this.detectChanges())).subscribe(r=>{this.allChannels=r.allChannels,this.validChannels=r.validChannels,this.addQueryChannelToFilter(),this.prepareDataForRibbons()}),this.log.pageView(new Qt({pageURL:this.useReplay?Zt.replay_epg_lists:Zt.epg_lists,pageTitle:this.pageTitle,pageLocale:this.config.getLocale()}))}addQueryChannelToFilter(){let e=this.filterService.getFilterString(G.CHANNEL);if(e&&this.validChannels.findIndex(r=>
16r.id===e)<0){let r=this.allChannels.find(o=>o.id===e);r&&this.validChannels.push(r)}}getPageProperties(){return C(this.activatedRoute.snapshot.data.properties)}ngOnInit(){this.filterService.filterChanged.pipe(ke(e=>e===G.DATE||e===G.CHANNEL||e===G.TAG||e===G.ACCESSIBILITY)).subscribe(()=>this.manageFilters()),super.start()}ngAfterViewInit(){this.ribbonIntersectionObserver=new IntersectionObserver(e=>{e.filter(n=>n.target===this.placeholderDiv.nativeElement).forEach(n=>{this.filterService.hasFilter(G.CHANNEL)&&this.filterService.hasFilter(G.DATE)||n.isIntersecting&&this.itemsLeftFetching===0&&this.prepareDataForRibbons()})},{rootMargin:"100px"})}hasResults(){return this.itemsLeftFetching!==0||!this.ready?!0:!this.ribbons||this.ribbons.length===0?!1:!!this.ribbons.find(e=>e!==void 0)}detectChanges(){this.cdr!==null&&this.cdr!==void 0&&!this.cdr.destroyed&&this.cdr.detectChanges()}hasFilters(){let e=new Set([G.DATE,G.CHANNEL,G.TAG,G.ACCESSIBILITY]);return this.filterService.hasAny(e)}manageFilters(){this.shownListItemIndex=0,this.ribbons=[],this.itemsLeftFetching=0,this.addQueryChannelToFilter(),this.prepareDataForRibbons()}getFilterDates(){let e=[],n=ie.now().startOf("day");e.push(n);let r;this.useReplay?r=this.epgPastDays:r=this.epgFutureDays;let o=n.toJSDate(),s=this.useReplay?-1:1;for(let a=0;a<r;a++)o.setDate(o.getDate()+s),e.push(ie.fromJSDate(o));return e}prepareDataForRibbons(){this.ready=!0,this.filterService.hasFilter(G.CHANNEL)?this.makeDayRibbons():this.makeChannelRibbons()}makeDayRibbons(){this.ribbonIntersectionObserver?.unobserve(this.placeholderDiv.nativeElement);let e=this.filterService.getFilterDate(G.DATE),n=this.filterService.getFilterString(G.CHANNEL),r=this.allChannels.find(o=>o.id===n);if(r)if(e){this.itemsLeftFetching=1,this.detectChanges();let o=this.epgUtility.getFromUntilFromTimeForDay(e.toJSDate(),this.useReplay);this.makeRibbon(!1,r,this.shownListItemIndex,this.getDayString(e.toMillis()),o.from,o.until)}else{let o;for(this.shownListItemIndex===0?o=this.shownListItemIndex+this.firstLoadAmount:o=this.shownListItemIndex+this.loadAmount;this.shownListItemIndex<this.filterDays.length&&this.shownListItemIndex<=o;){this.itemsLeftFetching++,this.ribbons.push(void 0);let s=this.epgUtility.getFromUntilFromTimeForDay(this.filterDays[this.shownListItemIndex].toJSDate(),this.useReplay);this.makeRibbon(!1,r,this.shownListItemIndex,this.getDayString(this.filterDays[this.shownListItemIndex].toMillis()),s.from,s.until),this.shownListItemIndex++,this.detectChanges()}this.ribbonIntersectionObserver?.observe(this.placeholderDiv.nativeElement)}}getDayString(e){return $.getDayInfo(e,!1,this.config)}makeChannelRibbons(){this.ribbonIntersectionObserver?.unobserve(this.placeholderDiv.nativeElement);let e=0;this.shownListItemIndex===0?e=this.shownListItemIndex+this.firstLoadAmount:e=this.shownListItemIndex+this.loadAmount,this.filterChannels().subscribe(n=>{for(;this.shownListItemIndex<n.length&&this.shownListItemIndex<=e;){this.itemsLeftFetching++,this.ribbons.push(void 0);let r,o=this.filterService.getFilterDate(G.DATE);o?r=this.epgUtility.getFromUntilFromTimeForDay(o.toJSDate(),this.useReplay):r=this.epgUtility.getFromUntilFromTime(new Date,this.useReplay),this.makeRibbon(!0,n[this.shownListItemIndex],this.shownListItemIndex,n[this.shownListItemIndex].name,r.from,r.until),this.shownListItemIndex++,this.detectChanges(),this.ribbonIntersectionObserver?.observe(this.placeholderDiv.nativeElement)}})}filterChannels(){let e=this.filterService.getFilterList(G.TAG),n=this.filterService.getFilterString(G.ACCESSIBILITY);if(e.length>0||n){let r,o=this.filterService.getFilterDate(G.DATE);return o?r=this.epgUtility.getFromUntilFromTime(o.toJSDate(),this.useReplay):r=this.epgUtility.getFromUntilFromTime(new Date,this.useReplay),this.epgApi.filterChannels(e,n?[n]:[],r.from,r.until).pipe(P(s=>this.validChannels.filter(a=>s.some(l=>l===a.id))),z(()=>C(this.validChannels)))}else return C(this.validChannels)}makeRibbon(e,n,r,o,s,a){let l=this.filterService.getFilterString(G.ACCESSIBILITY);this.ribbons[r]={title:o,contentMessage:this.config.getTranslation(Io.ribbon_no_content_ott),properties:this.config.getSettingArray(x.propertiesListRibbon,c=>oe[c],[oe.SHOWPROGRESS,oe.USE_BEST_SCHEDULE,oe.SHOW_SCHEDULE_INFO]),cardSize:rn.NORMAL,isOnDetailPage:!1,titleIcons:this.getRibbonTitleIcons(e,n),contentProvider:new Fy(this.epgApi,n.id,s,a,this.useReplay,this.filterService.getFilterList(G.TAG),l?[l]:[])},this.itemsLeftFetching--,this.detectChanges()}getRibbonTitleIcons(e,n){return e&&this.authorizationService.isAuthorized()?this.environment.applicationName==="nowo"?[this.getFavoriteRibbonTitleIcon(n)]:[this.getFavoriteRibbonTitleIcon(n),this.getRecordingRibbonTitleIcon(n)]:[]}getRecordingRibbonTitleIcon(e){return{iconImage:()=>e.recordableIcon,iconHeight:17}}getFavoriteRibbonTitleIcon(e){return{iconImage:()=>e.isFavorite()?"./assets/theme/svg/favoritesicon_selected.svg":"./assets/theme/svg/favoritesicon_normal.svg",iconHeight:23,iconClick:()=>{e.adult?this.adultService.checkAdultMode({successCallback:()=>{this.toggleChannelFavorite(e)},errorCallback:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(pe.detail_adult_warning))}}):this.toggleChannelFavorite(e)}}}toggleChannelFavorite(e){e.isFavorite()?(this.favoriteCache.deleteFavorite(cn.CHANNEL,e.id),e.setFavorite(!1)):(this.favoriteCache.setFavorite(cn.CHANNEL,e.id),e.setFavorite(!0))}ngOnDestroy(){super.stop(),this.ribbonIntersectionObserver?.disconnect()}static{this.\u0275fac=function(n){return new(n||t)(f(Jn),f(dn),f(tn),f(O),f(ui),f(ct),f(Pe),f(ne),f(_t),f($e),f(_e),f(et),f(dt),f(Ur),f(ae),f(Zn),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["app-list-page"]],viewQuery:function(n,r){if(n&1&&Ve(zq,5),n&2){let o;be(o=Ce())&&(r.placeholderDiv=o.first)}},features:[Ee],decls:2,vars:1,consts:[["placeholder",""],[1,"page-wrapper"],[1,"page-container"],[1,"page-filters","left-right-page-padding"],[3,"filterDays"],[3,"channels"],[3,"categoryProvi
16der","allowedAdultMode"],[3,"pageProperties","allowedAdultMode","ribbon","registerOnObserver","ribbonId"],[2,"width","100%","height","1px"],[1,"list-loading"],["alt","loading","src","./assets/theme/images/loading.svg"],[1,"list-no-results","font-label"]],template:function(n,r){n&1&&(m(0,"div",1),E(1,Zq,15,11,"div",2),g()),n&2&&(u(),I(r.pageLoaded?1:-1))},dependencies:[Kk,Xk,ss,ky,pu,Tu],styles:[".list-loading[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:1.25rem;margin-bottom:1.25rem}.list-loading[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:2.5rem;height:2.5rem}.list-no-results[_ngcontent-%COMP%]{text-align:center;margin-top:3.75rem}"],changeDetection:0})}}return t})();var Vy=class{constructor(i){i!==void 0&&Object.keys(i).forEach(e=>this[e]=i[e])}};var Uy=class extends fn{constructor(i,e,n,r,o){super(),this.stbCache=i,this.contentProviderFactoryService=e,this.deviceId=n,this.pageType=r,this.showAdult=o,this.hasMoreItems=!0,this.orientation=nt.LANDSCAPE}hasNext(){return this.hasMoreItems}getItems(){return this.stbCache.getRecordingsForDeviceForType(this.deviceId,this.pageType,this.showAdult).pipe(we(()=>this.hasMoreItems=!1),fe(i=>{if(i.length===0)return C([]);if(this.pageType!==sn.expires){let e=this.contentProviderFactoryService.groupRecordingsBySeries(i);return We(e.map(n=>this.contentProviderFactoryService.recordingFolderToRibbon2Asset(n.main,n.others)))}else return We(i.map(e=>this.contentProviderFactoryService.recordingToRibbon2Asset(e,this.pageType)))}))}resetPaging(){this.hasMoreItems=!0}};var Ru=class extends fn{constructor(i,e,n){super(),this.contentProviderFactoryService=i,this.seasonRecordings=e,this.pageType=n,this.hasMoreItems=!0,this.orientation=nt.LANDSCAPE}hasNext(){return this.hasMoreItems}getItems(){return this.hasMoreItems=!1,We(this.seasonRecordings.map(i=>this.contentProviderFactoryService.recordingToRibbon2Asset(i,this.pageType))).pipe(Di([]))}resetPaging(){this.hasMoreItems=!0}};var yc=(function(t){return t.TOP="TOP",t.BOTTOM="BOTTOM",t.LEFT="LEFT",t.RIGHT="RIGHT",t})(yc||{}),tL=(()=>{class t{set appTooltip(e){this.tooltipText=e,this.tooltipChild&&(this.onMouseLeave(),this.onMouseEnter())}constructor(e,n){this.render=e,this.elRef=n}ngOnInit(){}getTooltipPositionClass(){switch(this.appTooltipPosition){case yc.TOP:return"tooltip-top";case yc.BOTTOM:return"tooltip-bottom";case yc.LEFT:return"tooltip-left";case yc.RIGHT:return"tooltip-right";default:return"tooltip-top"}}onMouseEnter(){this.tooltipChild=this.render.createElement("span"),this.render.addClass(this.elRef.nativeElement,"tooltip-parent"),this.render.addClass(this.tooltipChild,"tooltip"),this.render.addClass(this.tooltipChild,this.getTooltipPositionClass());let e=this.render.createText(this.tooltipText);this.render.appendChild(this.tooltipChild,e),this.render.appendChild(this.elRef.nativeElement,this.tooltipChild)}onMouseLeave(){this.render.removeChild(this.elRef.nativeElement,this.tooltipChild),this.tooltipChild=void 0}ngOnDestroy(){}static{this.\u0275fac=function(n){return new(n||t)(f(Zi),f(Cn))}}static{this.\u0275dir=Bt({type:t,selectors:[["","appTooltip",""]],hostBindings:function(n,r){n&1&&A("mouseenter",function(){return r.onMouseEnter()})("mouseleave",function(){return r.onMouseLeave()})},inputs:{appTooltip:"appTooltip",appTooltipPosition:"appTooltipPosition"}})}}return t})();function Jq(t,i){if(t&1){let e=B();m(0,"div",5)(1,"img",10),A("click",function(){k(e);let r=_();return L(r.toggleAdultMode())}),g()()}if(t&2){let e=_();S("appTooltip",e.tooltipText1)("appTooltipPosition",e.tooltipPosition),u(),S("src",e.showAdultRecordings?"./assets/theme/svg/recordings_adultmode_selected.svg":"./assets/theme/svg/recordings_adultmode_normal.svg",Je)}}function Xq(t,i){if(t&1){let e=B();m(0,"div",5)(1,"img",11),A("click",function(){k(e);let r=_();return L(r.deleteAllRecordings())}),g()()}if(t&2){let e=_();S("appTooltip",e.tooltipText2)("appTooltipPosition",e.tooltipPosition)}}function Kq(t,i){if(t&1&&M(0,"app-grid",9),t&2){let e=i.$implicit,n=_();S("grid",e)("noResultText",n.noResultText)("allowedAdultMode",n.allowedAdultMode)}}var nL=(()=>{class t extends Li{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T,W,j,ee){super(e,y,o,d,s,W,j,ee),this.channelCache=n,this.stbCache=r,this.activatedRoute=a,this.epgApi=l,this.router=c,this.log=p,this.contentProviderFactoryService=b,this.environment=T,this.allowedAdultMode=Me.ANY,this.grids=[],this.stbProgressPercent=void 0,this.stbProgressText="",this.showAdultRecordings=!1,this.showAdultToggleButton=!1,this.inFolder=!1,this.noResultText="",this.enableAdultText="",this.disableAdultText="",this.tooltipPosition=yc.LEFT,this.enableAdultText=this.config.getTranslation(Ye.mystuff_adultmode_activate),this.disableAdultText=this.config.getTranslation(Ye.mystuff_adultmode_stop)}ngOnInit(){if(this.getRecordingPageType(),this.recordingPageType===void 0){this.noResultText=this.config.getTranslation(ge.error_recording_no_recordings);return}this.recordingPageType===sn.conflict?this.noResultText=this.config.getTranslation(ge.error_recording_no_conflicts):this.recordingPageType===sn.recorded?this.noResultText=this.config.getTranslation(ge.error_recording_no_recordings):this.recordingPageType===sn.planned?this.noResultText=this.config.getTranslation(Ye.mystuff_rec_no_planned_recordings):this.recordingPageType===sn.expires&&(this.noResultText=this.config.getTranslation(Ye.mystuff_rec_no_expired)),this.showAdultToggleButton=this.environment.allowAdult&&(this.allowedAdultMode===Me.ANY||this.allowedAdultMode===Me._TRUE),this.stbCache.stbRecordingChange.subscribe(()=>{super.checkLoadPage()}),this.setPageInfo(),this.doLog(),super.start()}getRecordingPageType(){switch(this.activatedRoute.snapshot.data.pageType){case it.RECORDINGS_CONFLICT_PAGE:this.recordingPageType=sn.conflict;return;case it.RECORDINGS_EXPIRE_PAGE:this.recordingPageType=sn.expires;return;case it.RECORDINGS_PLANNED_PAGE:this.recordingPageType=sn.planned;return;case it.RECORDINGS_RECORDED_PAGE:this.recordingPageType=sn.recorded;return}}toggleAdultMode(e){e&&(e.cancelBubble=!0,e.preventDefault()),this.showAdultToggleButton&&(this.adultService.showAdult(this.allowedAdultMode)?(this.adultService.stopAdultMode(),super.checkLoadPage()):this.adultService.checkAdultMode({successCallback:()=>{super.checkLoadPage()},errorCallback:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(pe.detail_adult_warning))}})),this.showAdultRecordings=this.adultService.showAdult(this.allowedAdultMode)}loadPage(){this.updateHtmlTitle(this.pageTitle??""),this.showAdultRecordings=this.adultService.showAdult(this.allowedAdultMode),this.setTooltipTexts();let e=this.activatedRoute.snapshot.params.seriesId;e&&(this.inFolder=!0);let n=this.sessionService.stbList;this.stb=n.getNpvrStb(),this.channelCache.getChannels().pipe(z(()=>C(void 0))).subscribe(r=>{if(!this.stb?.id){this.grids=[new yi({title:"",contents:[],properties:this.config.getSettingArray(x.propertiesRecordingsRibbon,o=>oe[o],[oe.SHOWPROGRESS,oe.USE_BEST_SCHEDULE,oe.SHOW_SCHEDULE_INFO]),orientation:nt.LANDSCAPE})];return}this.channels=r||[],e?this.initForStbSeriesAndChannel(this.stb.id,e):this.initForStb(this.stb.id)})}getPageProperties(){return C(this.activatedRoute.snapshot.data.properties)}setTooltipTexts(){this.tooltipText1=this.showAdultRecordings?this.config.getTranslation(Ye.mystuff_adultmode_stop):this.config.getTranslation(Ye.mystuff_adultmode_activate),this.tooltipText2=this.config.getTranslation(ji.recordings_delete_all)}initForStb(e){this.serieRecordings=[],this.showAvailableSpace(e),this.grids=[],this.grids=[new yi({title:"",contentProvider:new Uy(this.stbCache,this.contentProviderFactoryService,e,this.recordingPageType,this.showAdultRecordings),properties:this.config.getSettingArray(x.propertiesRecordingsRibbon,n=>oe[n],[oe.SHOWPROGRESS,oe.USE_BEST_SCHEDULE,oe.SHOW_SCHEDULE_INFO]),orientation:nt.LANDSCAPE})]}setPageInfo(){this.recordingPageType===sn.conflict?(this.pageURL=Zt.my_stuff_recordings_conflict,this.pageTitle=this.config.getTranslation(Hn.menu_recordings_conflicts)):this.recordingPageType===sn.expires?(this.pageURL=Zt.my_stuff_recordings_expired,this.pageTitle=this.config.getTranslation(Hn.menu_recordings_expire)):this.recordingPageType===sn.planned?(this.pageURL=Zt.my_stuff_recordings_planned,this.pageTitle=this.config.getTranslation(Hn.menu_recordings_planned)):this.recordingPageType===sn.recorded&&(this.pageURL=Zt.my_stuff_recordings_recorded,this.pageTitle=this.config.getTranslation(Hn.menu_recordings_recorded))}doLog(){this.pageURL&&this.pageTitle&&this.log.pageView(new Qt({pageURL:this.pageURL,pageTitle:this.pageTitle,pageLocale:this.config.getLocale()}
16))}initForStbSeriesAndChannel(e,n){this.serieRecordings=[],this.showAvailableSpace(e),this.grids=[],We({series:this.epgApi.getSeries(n),recordings:this.stbCache.getRecordingsForDeviceForTypeForSeries(e,n,this.recordingPageType,this.showAdultRecordings)}).subscribe(({series:r,recordings:o})=>{let s=r?r.series.text.title:"";this.serieRecordings=o;let a=this.convertToSeasonGroupedRecordingCard(o,n,s);this.setEpgLogInfo(r?.series),a.forEach(l=>{this.grids.push(new yi({title:l.title,contentProvider:new Ru(this.contentProviderFactoryService,l.recordings,this.recordingPageType),properties:this.config.getSettingArray(x.propertiesRecordingEpisodesRibbon,c=>oe[c],[oe.SHOWPROGRESS,oe.USE_BEST_SCHEDULE,oe.SHOW_SCHEDULE_INFO,oe.SHOW_EPISODE_INFO]),orientation:nt.LANDSCAPE}))})})}setEpgLogInfo(e){let n=this.serieRecordings.length>0?this.channels.find(r=>r.id===this.serieRecordings[0].channel):void 0;n&&(this.recordingEpgInfo=new Vy({channel:n,name:e?.text.title||"",programId:"",seasonId:"",seriesId:e?.seriesId,isAdult:e?.adult??!1,series:e,season:void 0}))}showAvailableSpace(e){this.stbCache.getAvailableUsedMaxSpace(e).subscribe(n=>{this.stbProgressPercent=n.used/n.max*100,this.stbProgressText=n.available},()=>{this.stbProgressPercent=void 0,this.stbProgressText=""})}convertToSeasonGroupedRecordingCard(e,n,r){let o=[];return e.sort((s,a)=>s.seasonOrdinal<a.seasonOrdinal?-1:s.seasonOrdinal>a.seasonOrdinal?1:0),e.forEach(s=>{if(n!==void 0&&s.series===n){let a=o.find(l=>l.seasonId===s.season);if(a)a.recordings.push(s);else{let l=s.seasonOrdinal&&s.seasonOrdinal!==0?(r?r+": ":"")+this.config.getTranslation(pe.detail_season)+" "+s.seasonOrdinal:r||this.config.getTranslation(pe.detail_season);o.push({title:l,seasonId:s.season,recordings:[s]})}}}),o}deleteAllRecordings(){this.stbCache.showDeleteAllRecordingsPopup.emit({recordingPageType:this.recordingPageType,serieRecordings:this.serieRecordings,routerParams:this.activatedRoute.snapshot.params,recordingEpgInfo:this.recordingEpgInfo})}goBack(){this.router.navigate([$.removePathParams(this.router.url,this.activatedRoute.snapshot.params)])}ngOnDestroy(){super.stop()}static{this.\u0275fac=function(n){return new(n||t)(f(ne),f(Jn),f(xn),f($e),f(O),f(_t),f(dn),f(ft),f(_e),f(ct),f(et),f(Ur),f(ae),f(Zn),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["app-recordings-page"]],features:[Ee],decls:13,vars:8,consts:[[1,"page-wrapper"],[1,"page-container"],[1,"page-filters","left-right-page-padding"],[1,"back",3,"click"],[1,"page-filters","right"],[3,"appTooltip","appTooltipPosition"],[1,"recording-space"],[1,"font-title-4"],[1,"recording-space-progress",3,"progressPercentage"],[3,"grid","noResultText","allowedAdultMode"],[1,"adult-toggle",3,"click","src"],["src","./assets/theme/svg/delete.svg",1,"delete-all-recordings",3,"click"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),A("click",function(){return r.goBack()}),g(),m(4,"div",4),E(5,Jq,2,3,"div",5),E(6,Xq,2,2,"div",5),m(7,"div",6)(8,"div",7),N(9),g(),M(10,"app-progress-bar",8),g()()(),X(11,Kq,1,3,"app-grid",9,se),g()()),n&2&&(u(3),H("hidden",!r.inFolder),u(2),I(r.showAdultToggleButton?5:-1),u(),I(r.inFolder?6:-1),u(3),Q(r.stbProgressText),u(),H("hidden",r.stbProgressPercent===void 0),S("progressPercentage",r.stbProgressPercent),u(),K(r.grids))},dependencies:[tL,yy,fs],styles:['[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.back[_ngcontent-%COMP%]:before{font-family:fontawesome-bold;font-size:20px;color:#fff;cursor:pointer;content:"\\f060"}.back[_ngcontent-%COMP%]:hover:before{color:#ca7ef1}.page-filters.right[_ngcontent-%COMP%]{margin:0 0 0 auto}.recording-space[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:.5rem;align-items:center}.recording-space-progress[_ngcontent-%COMP%]{width:11rem;height:.34rem}.adult-toggle[_ngcontent-%COMP%], .delete-all-recordings[_ngcontent-%COMP%]{height:2rem;width:2rem;cursor:pointer}']})}}return t})();var By=class extends fn{constructor(i,e){super(),this.reminderCache=i,this.contentProviderFactory=e,this.hasMoreItems=!0,this.orientation=nt.LANDSCAPE}hasNext(){return this.hasMoreItems}resetPaging(){this.hasMoreItems=!0}getItems(){return this.reminderCache.getReminders().pipe(we(()=>this.hasMoreItems=!1),fe(i=>We(i.map(e=>C(this.contentProviderFactory.scheduleToRibbon2Asset(e.schedule)))).pipe(Di([]))))}};function e8(t,i){if(t&1&&M(0,"app-grid",1),t&2){let e=_();S("grid",e.grid)("noResultText",e.noResultText)("allowedAdultMode",e.allowedAdultMode)}}var iL=(()=>{class t extends Li{constructor(e,n,r,o,s,a,l,c,d,p,y,b){super(s,a,l,c,n,p,y,b),this.activatedRoute=e,this.reminderCache=r,this.log=o,this.contentProviderFactoryService=d,this.allowedAdultMode=Me.ANY,this.noResultText="",this.pageTitle=this.config.getTranslation(Hn.menu_reminders)}ngOnInit(){this.log.pageView(new Qt({pageURL:Zt.my_stuff_reminders,pageTitle:this.pageTitle,pageLocale:this.config.getLocale()}
16)),super.start()}loadPage(){this.updateHtmlTitle(this.pageTitle),this.grid=new yi({title:"",contentProvider:new By(this.reminderCache,this.contentProviderFactoryService),properties:this.config.getSettingArray(x.propertiesRemindersRibbon,e=>oe[e],[oe.SHOWPROGRESS,oe.USE_BEST_SCHEDULE,oe.SHOW_SCHEDULE_INFO])}),this.noResultText=this.config.getTranslation(ge.error_no_reminders)}getPageProperties(){return C(this.activatedRoute.snapshot.data.properties)}ngOnDestroy(){super.stop()}static{this.\u0275fac=function(n){return new(n||t)(f(_t),f(O),f(ns),f(ct),f(ne),f(et),f($e),f(_e),f(Ur),f(Zn),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["app-reminders-page"]],features:[Ee],decls:2,vars:1,consts:[[1,"page-wrapper"],[1,"page-container",3,"grid","noResultText","allowedAdultMode"]],template:function(n,r){n&1&&(m(0,"div",0),E(1,e8,1,3,"app-grid",1),g()),n&2&&(u(),I(r.grid?1:-1))},dependencies:[fs],styles:[".page-container[_ngcontent-%COMP%]{margin-top:2rem}"]})}}return t})();var jy=class extends fn{constructor(i,e,n,r,o,s){super(),this.searchApi=i,this.adultService=e,this.sessionService=n,this.searchElements=r,this.term=o,this.allowedAdultMode=s,this.hasMore=!0,this.page=0,this.searchElements.elements&&(this.orientation=this.searchElements.elements.type)}getItems(){return this.page===0?(this.hasMore=this.searchElements.elements.nextPage??!1,this.page+=1,C(this.searchElements.elements.items??[])):this.searchApi.search(this.term,[this.searchElements.type],this.adultService.getAdultMode(this.allowedAdultMode),this.sessionService.catalogId,!1,this.page).pipe(P(i=>!i?.results||i.results.length===0?(this.hasMore=!1,[]):(this.hasMore=i.results[0].elements.nextPage??!1,this.page+=1,i.results[0].elements.items??[])))}hasNext(){return this.hasMore}resetPaging(){this.hasMore=!0,this.page=0}};var eh=class extends fn{constructor(i,e,n,r){super(),this.stbCache=i,this.allowAdult=e,this.contentProviderFactoryService=n,this.container=r,this.hasMore=!0,this.programIds=[],this.seriesIds=[],this.orientation=this.container.type,this.container.items?.forEach(o=>{o.asset.type===he.SERIES?this.seriesIds.push(o.asset.id):o.asset.type===he.PROGRAM&&this.programIds.push(o.asset.id)})}getItems(){return this.hasMore=!1,this.stbCache.getRecordingsForAllDevices(this.allowAdult).pipe(fe(i=>this.getFilteredResults(i)))}hasNext(){return this.hasMore}resetPaging(){this.hasMore=!0}getFilteredResults(i){let e=i.filter(n=>this.programIds.includes(n.program)||this.seriesIds.includes(n.series));return We(this.contentProviderFactoryService.groupRecordingsBySeries(e).map(n=>this.contentProviderFactoryService.recordingFolderToRibbon2Asset(n.main,n.others))).pipe(Di([]))}};var Hy=class extends fn{constructor(i,e,n,r,o,s,a,l,c){super(),this.searchApi=i,this.adultService=e,this.sessionService=n,this.searchElement=r,this.term=o,this.allowedAdultMode=s,this.filterField=a,this.filterTerm=l,this.sort=c,this.hasMore=!0,this.searchElement&&(this.orientation=this.searchElement.type)}getItems(){return this.nextToken===void 0?(this.nextToken=this.searchElement?.nextToken,this.hasMore=!!this.nextToken,C(this.searchElement.items??[])):this.searchApi.vodSearch(this.sessionService.catalogId,this.adultService.getAdultMode(this.allowedAdultMode),this.term,this.filterField,this.filterTerm,this.sort,this.nextToken).pipe(P(i=>i?.items?.length?(this.nextToken=i.nextToken,this.hasMore=!!i.nextToken,i.items):(this.hasMore=!1,[])))}hasNext(){return this.hasMore}resetPaging(){this.hasMore=!0,this.nextToken=void 0}};function rL(t){t||(t=U($n));let i=new Re(e=>{if(t.destroyed){e.next();return}return t.onDestroy(e.next.bind(e))});return e=>e.pipe(El(i))}function oL(t,i){let e=i?.injector??U(Ut),n=new wn(1),r=bn(()=>{let o;try{o=t()}catch(s){lt(()=>n.error(s));return}lt(()=>n.next(o))},{injector:e,manualCleanup:!0});return e.get($n).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}var t8=["filterInput"];function n8(t,i){if(t&1&&M(0,"app-clear-filter",3),t&2){let e=_();S("filter",e.filterType())}}function i8(t,i){if(t&1){let e=B();m(0,"input",6,0),A("input",function(r){k(e);let o=_();
16return L(o.updateValue(r.target.value))})("click",function(r){return r.stopPropagation()}),g()}if(t&2){let e=_();S("value",e.value()??"")("placeholder",e.field())}}function r8(t,i){if(t&1&&N(0),t&2){let e=_();ce(" ",e.getButtonLabel()," ")}}function o8(t,i){if(t&1){let e=B();m(0,"li",7)(1,"button",9),A("click",function(){let r=k(e).$implicit,o=_(2);return L(o.selectResult(r))}),N(2),g()()}if(t&2){let e=i.$implicit;u(2),ce(" ",e," ")}}function s8(t,i){if(t&1&&(m(0,"div",8),N(1),g()),t&2){let e=_(2);u(),Q(e.noResultsFoundLabel)}}function a8(t,i){if(t&1&&(m(0,"ul",5),X(1,o8,3,1,"li",7,se),E(3,s8,2,1,"div",8),g()),t&2){let e=_();u(),K(e.completions()),u(2),I(!e.loading()&&e.value()&&e.completions().length===0?3:-1)}}var sL=(()=>{class t extends gt{constructor(e,n){super(),this.config=e,this.filterService=n,this.field=Ct.required(),this.filterType=Ct.required(),this.clearable=Ct(!1),this.completions=Ct(),this.searchChange=Ps(),this.filterInput=AM("filterInput"),this.value=xM(null),this.loading=V(!1),this.request=Xe(()=>({search:this.value(),filter:this.filterType()})),this.noResultsFoundLabel=this.config.getTranslation(ge.error_search_no_completions),this.searchKeyTimeout=this.config.getSettingNumber(x.searchCompletionsKeyTimeout,500),this.searchMinChars=this.config.getSettingNumber(x.searchCompletionsMinChars,1),bn(()=>{if(this.completions()===void 0){this.loading.set(!0);return}this.loading.set(!1)}),bn(()=>{let r=this.filterInput()?.nativeElement;r&&r.focus()}),oL(this.value).pipe(ke(r=>typeof r=="string"),ke(r=>r.length>=this.searchMinChars),Ti(this.searchKeyTimeout),ur(),rL()).subscribe(r=>{this.searchChange.emit({search:r,filter:this.filterType()})})}ngOnInit(){this.validateCurrentFilter(),this.filterChangeSubscription=this.filterService.filterChanged.pipe(ke(e=>e===this.filterType())).subscribe(()=>this.validateCurrentFilter())}validateCurrentFilter(){let e=this.filterService.getFilterString(this.filterType());this.value.set(e)}hideDropdown(){this.value()&&this.filterService.updateFilter(this.filterType(),this.value()),this.showDropdown.set(!1)}updateValue(e){this.value.set(e)}selectResult(e){this.value.set(e),this.hideDropdown()}getButtonLabel(){return this.value()||this.field()}isButtonActive(){return this.showDropdown()||!!this.value()}isClearable(){return this.clearable()&&!!this.value()}onButtonClick(e){e.detail!==0&&this.toggleCompletionList()}toggleCompletionList(){this.showDropdown()?this.hideDropdown():(this.openDropdown(),this.loading.set(!0),this.searchChange.emit(this.request()))}ngOnDestroy(){this.filterChangeSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(dt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-complete-filter"]],viewQuery:function(n,r){n&1&&jg(r.filterInput,t8,5),n&2&&fS()},inputs:{field:[1,"field"],filterType:[1,"filterType"],clearable:[1,"clearable"],completions:[1,"completions"],value:[1,"value"]},outputs:{searchChange:"searchChange",value:"valueChange"},features:[Ee],decls:6,vars:4,consts:[["filterInput",""],[1,"filter-container"],[3,"click","keydown.enter","active"],[3,"filter"],[1,"field-input",3,"value","placeholder"],["role","menu",1,"dropdown"],[1,"field-input",3,"input","click","value","placeholder"],["role","none"],[1,"font-label","dropdown-item"],["type","button","role","menuitem",1,"font-label","dropdown-item","selectable",3,"click"]],template:function(n,r){n&1&&(m(0,"div",1)(1,"app-generic-button",2),A("click",function(s){return r.onButtonClick(s)})("keydown.enter",function(){return r.toggleCompletionList()}),E(2,n8,1,1,"app-clear-filter",3),E(3,i8,2,2,"input",4)(4,r8,1,1),g(),E(5,a8,4,1,"ul",5),g()),n&2&&(u(),S("active",r.isButtonActive()),u(),I(r.isClearable()?2:-1),u(),I(r.showDropdown()?3:4),u(2),I(r.showDropdown()?5:-1))},dependencies:[Za,Pr],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.field-input[_ngcontent-%COMP%]{padding:0rem .25rem;outline:none}.field-input[_ngcontent-%COMP%]::placeholder{color:#000;opacity:.75}"]})}}return t})();function l8(t,i){if(t&1&&(m(0,"label"),N(1),g()),t&2){let e=_();u(),Q(e.label())}}var aL=(()=>{class t{constructor(){this.label=Ct(""),this.minDate=Ct(void 0),this.maxDate=Ct(void 0),this.value=Ct(null),this.valueChange=Ps(),this.tempValue=null}formatDate(e){return e?e.toISOString().substring(0,10):""}onInputChange(e){let n=new Date(e);this.tempValue=isNaN(n.getTime())?null:n}onBlur(){this.tempValue&&this.valueChange.emit(this.tempValue)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-date-picker"]],inputs:{label:[1,"label"],minDate:[1,"minDate"],maxDate:[1,"maxDate"],value:[1,"value"]},outputs:{valueChange:"valueChange"},decls:4,vars:4,consts:[["type","date",3,"ngModelChange","blur","ngModel","min","max"]],template:function(n,r){n&1&&(m(0,"div"),E(1,l8,2,1,"label"),M(2,"br"),m(3,"input",0),A("ngModelChange",function(s){return r.onInputChange(s)})("blur",function(){return r.onBlur()}),g()()),n&2&&(u(),I(r.label()?1:-1),u(2),S("ngModel",r.formatDate(r.value()))("min",r.formatDate(r.minDate(
16)))("max",r.formatDate(r.maxDate())))},dependencies:[os,rs,Qa,Qs],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}input[type=date][_ngcontent-%COMP%]{width:100%;margin-top:.5rem;padding:.75rem 1rem;border:1px solid white;border-radius:6px;color:#ca7ef1;cursor:pointer;position:relative}input[type=date][_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{filter:invert(1);cursor:pointer;padding:5px}"]})}}return t})();function c8(t,i){if(t&1&&M(0,"app-clear-filter",2),t&2){let e=_();S("filter",e.FilterType.DATE)}}function d8(t,i){if(t&1){let e=B();m(0,"span",8),N(1,"\u2192"),g(),m(2,"app-date-picker",7),A("valueChange",function(r){k(e);let o=_(2);return L(o.onToDateChange(r))}),g()}if(t&2){let e=_(2);u(2),S("label",e.toLabel)("value",e.toDate())("minDate",e.fromDate())("maxDate",e.maxDate)}}function u8(t,i){if(t&1){let e=B();m(0,"div",3)(1,"div",4)(2,"app-toggle-button",5),A("valueChange",function(r){k(e);let o=_();return L(o.range.set(r))}),N(3,">"),g(),N(4),g(),m(5,"div",6)(6,"app-date-picker",7),A("valueChange",function(r){k(e);let o=_();return L(o.onFromDateChange(r))}),g(),E(7,d8,3,4),g()()}if(t&2){let e=_();u(2),S("value",e.range()),u(2),ce("",e.rangeLabel," "),u(2),S("label",e.range()?e.fromLabel:e.dayLabel)("value",e.fromDate())("minDate",e.minFromDate())("maxDate",e.maxDate),u(),I(e.range()?7:-1)}}var lL=(()=>{class t extends gt{constructor(e,n,r){super(),this.filterService=n,this.cdr=r,this.extra=Ct.required(),this.clearable=Ct(!1),this.range=V(!1),this.fromDate=V(void 0),this.toDate=V(void 0),this.maxDate=new Date,this.FilterType=G,this.minFromDate=Xe(()=>{let o=this.extra();return o&&typeof o.startYear=="number"?new Date(o.startYear,0,1,12,0,0):new Date}),this.dayLabel=e.getTranslation(cr.lists_filter_day),this.rangeLabel=e.getTranslation(Vu.date_picker_type_period),this.rangeSymbol=e.getTranslation(dl.search_filter_time_range),this.fromLabel=e.getTranslation(Vu.date_picker_from_date),this.toLabel=e.getTranslation(Vu.date_picker_to_date),bn(()=>{let o=this.range(),s=this.fromDate(),a=this.toDate();!o&&s&&a?.getTime()!==s.getTime()&&(this.toDate.set(new Date(s)),queueMicrotask(()=>this.updateDateFilter()))})}ngOnInit(){this.validateCurrentFilter(),this.filterChangeSubscription=this.filterService.filterChanged.pipe(ke(e=>e===G.DATE)).subscribe(()=>this.validateCurrentFilter())}
16showDatePicker(){this.showDropdown()?this.hideDropdown():(this.onFromDateChange(this.fromDate()||new Date),this.onToDateChange(this.toDate()||new Date),this.openDropdown())}hideDropdown(){this.showDropdown.set(!1)}isButtonActive(){return this.showDropdown()||!!(this.fromDate()||this.toDate())}isClearable(){return this.clearable&&!!this.fromDate()&&!!this.toDate()}getButtonLabel(){if(!this.fromDate()||!this.toDate())return this.dayLabel;let e=this.formatDate(this.fromDate()),n=this.formatDate(this.toDate());return!this.range()||e===n?e:this.rangeSymbol.replace("$1",e).replace("$2",n)}validateCurrentFilter(){let e=this.filterService.getFilterList(G.DATE);if(e.length===0){this.fromDate.set(void 0),this.toDate.set(void 0),this.cdr.detectChanges();return}let n=new Date(e[0]),r=new Date(e[1]);if(!(!isNaN(n.getTime())&&!isNaN(r.getTime()))){this.filterService.clearFilter(G.DATE);return}this.fromDate.set(n),this.toDate.set(r),this.range.set(e.length>1&&e[0]!==e[1]),this.cdr.detectChanges()}ngOnDestroy(){this.filterChangeSubscription?.unsubscribe()}formatDate(e){let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${n}-${r}-${o}`}get fromDateString(){return this.formatDate(this.fromDate())}get toDateString(){return this.formatDate(this.toDate())}onFromDateChange(e){this.fromDate.set(e),(!this.range()||this.toDate()&&this.fromDate()>this.toDate())&&this.toDate.set(new Date(this.fromDate())),this.updateDateFilter(),this.range()||this.hideDropdown()}onToDateChange(e){this.toDate.set(e),this.fromDate()&&this.toDate()<this.fromDate()&&this.fromDate.set(new Date(this.toDate())),this.updateDateFilter()}updateDateFilter(){!this.fromDate()||!this.toDate()||this.filterService.updateFilterList(G.DATE,[this.formatDate(this.fromDate()),this.formatDate(this.toDate())])}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(dt),f(Pe))}}static{this.\u0275cmp=D({type:t,selectors:[["app-date-range-filter"]],inputs:{extra:[1,"extra"],clearable:[1,"clearable"]},features:[Ee],decls:5,vars:4,consts:[[1,"filter-container"],[3,"click","active"],[3,"filter"],[1,"dropdown"],[1,"range"],[3,"valueChange","value"],[1,"date-range"],[3,"valueChange","label","value","minDate","maxDate"],[1,"arrow"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"app-generic-button",1),A("click",function(){return r.showDatePicker()}),E(2,c8,1,1,"app-clear-filter",2),N(3),g(),E(4,u8,8,7,"div",3),g()),n&2&&(u(),S("active",r.isButtonActive()),u(),I(r.isClearable()?2:-1),u(),ce(" ",r.getButtonLabel()," "),u(),I(r.showDropdown()?4:-1))},dependencies:[Za,Pr,os,Qo,aL],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.date-range[_ngcontent-%COMP%]{display:flex;gap:1rem;padding:.75rem;align-items:center}@media only screen and (max-width:600px){.date-range[_ngcontent-%COMP%]{flex-direction:column}}.range[_ngcontent-%COMP%]{display:flex;gap:1rem;padding:.5rem 0 0 .75rem}.arrow[_ngcontent-%COMP%]{padding-top:1.5rem}"]})}}return t})();function p8(t,i){if(t&1&&M(0,"app-category-filter",1),t&2){let e=_().$implicit,n=_();S("categoryProvider",n.categoryProvider)("allowedAdultMode",n.allowedAdultMode())("categoryRoot",e.categoryExtra.tags)("clearable",!0)}}function f8(t,i){if(t&1&&M(0,"app-date-range-filter",2),t&2){let e=_().$implicit;S("clearable",!0)("extra",e.datePickerExtra)}}function h8(t,i){if(t&1){let e=B();m(0,"app-complete-filter",4),A("searchChange",function(r){k(e);let o=_(2);return L(o.searchChange.emit(r))}),g()}if(t&2){let e=_().$implicit,n=_();S("field",n.config.getTranslation(e.labelKey))("filterType",n.toFilterType(e.field))("clearable",!0)("completions",n.completions())}}function m8(t,i){if(t&1&&(E(0,p8,1,4,"app-category-filter",1),E(1,f8,1,2,"app-date-range-filter",2),E(2,h8,1,4,"app-complete-filter",3)),t&2){let e=i.$implicit,n=_();I(e.type===n.SearchFilterType.CATEGORY?0:-1),u(),I(e.type===n.SearchFilterType.DATE?1:-1),u(),I(e.type===n.SearchFilterType.TEXT?2:-1)}}function g8(t,i){if(t&1&&M(0,"app-basic-filter",5)(1,"app-clear-all-filters"),t&2){let e=_();S("filterType",e.FilterType.SORT)("options",e.options())("autoSelectFirst",!0)("translate",!1)}}var cL=(()=>{class t{constructor(e,n,r,o){this.vodApi=e,this.sessionService=n,this.filterService=r,this.config=o,this.searchSettings=Ct.required(),this.activeFilters=Ct.required(),this.allowedAdultMode=Ct(Me._FALSE),this.completions=Ct(),this.searchChange=Ps(),this.options=Xe(()=>this.searchSettings().sortings.map(s=>({value:s.field,label:this.config.getTranslation(s.labelKey)}))),this.SearchFilterType=Bi,this.FilterType=G,this.categoryProvi
16der=new uu(this.vodApi,this.sessionService.catalogId)}hasFilters(){let e=this.activeFilters().filter(n=>n!=G.SEARCH&&n!=G.SORT);return this.filterService.hasAny(new Set(e))}toFilterType(e){return e}static{this.\u0275fac=function(n){return new(n||t)(f(Xa),f(ne),f(dt),f(O))}}static{this.\u0275cmp=D({type:t,selectors:[["app-search-filters"]],inputs:{searchSettings:[1,"searchSettings"],activeFilters:[1,"activeFilters"],allowedAdultMode:[1,"allowedAdultMode"],completions:[1,"completions"]},outputs:{searchChange:"searchChange"},decls:4,vars:1,consts:[[1,"filter-container"],[3,"categoryProvider","allowedAdultMode","categoryRoot","clearable"],[3,"clearable","extra"],[3,"field","filterType","clearable","completions"],[3,"searchChange","field","filterType","clearable","completions"],["label","",3,"filterType","options","autoSelectFirst","translate"]],template:function(n,r){n&1&&(m(0,"div",0),X(1,m8,3,3,null,null,se),E(3,g8,2,4),g()),n&2&&(u(),K(r.searchSettings().filters),u(2),I(r.hasFilters()?3:-1))},dependencies:[ss,lL,sL,pu,Ny],styles:[".filter-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}"]})}}return t})();var dL=(()=>{class t{transform(e,n){if(n&&e){let r=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");r=r.split(" ").filter(s=>s.length>0).join("|");let o=new RegExp(r,"gi");return e.replace(o,s=>`<span class="highlight">${s}</span>`)}else return e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=kp({name:"highlight",type:t,pure:!0})}}return t})();var _8=["searchBarInput"];function v8(t,i){if(t&1){let e=B();te(0,"img",8),qe("click",function(){k(e);let r=_();return L(r.clearSearch())}),J()}}function y8(t,i){if(t&1){let e=B();te(0,"div",9),Bp(1,"highlight"),qe("click",function(){let r=k(e).$implicit,o=_();return L(o.completionSelected(r.fullValue))}),J()}if(t&2){let e=i.$implicit;_();let n=Ho(4);Gn("innerHTML",jp(1,1,e.displayValue,n.value),xC)}}var uL=(()=>{class t{constructor(e,n){this.config=e,this.filterService=n,this.completions=[],this.cancelSearch=new Y,this.cleared=!1,this.placeholder=e.getTranslation(dl.search_placeholder),this.minSearchChars=this.config.getSettingNumber(x.searchMinChars,3),this.searchKeyTimeout=this.config.getSettingNumber(x.searchKeyTimeout,500),this.maxSuggestionLength=this.config.getSettingNumber(x.searchMaxSuggestionLength,20)}ngAfterViewInit(){this.searchBarInput.nativeElement.focus();let e=this.getInitialTerm();e&&(this.searchBarInput.nativeElement.value=e),this.searchFieldSubscription=Gt(this.searchBarInput.nativeElement,"keyup").pipe(we(()=>{this.cancelSearch.emit()}),Ti(this.searchKeyTimeout),P(()=>this.searchBarInput.nativeElement.value),ur((n,r)=>!this.cleared&&n===r)).subscribe(n=>{this.cleared=!1,this.filterService.updateFilter(G.SEARCH,n?encodeURI(n):void 0)})}getInitialTerm(){let e=this.filterService.getFilterString(G.SEARCH);return e?decodeURI(e):void 0}completionSelected(e){this.searchBarInput.nativeElement.value=e,this.filterService.updateFilter(G.SEARCH,encodeURI(e))}setCompletions(e){this.completions=e.map(n=>({fullValue:n,displayValue:n.length>this.maxSuggestionLength?n.slice(0,this.maxSuggestionLength).concat("..."):n}))}clearSearch(){this.searchBarInput.nativeElement.value.length>0&&(this.cleared=!0,this.searchBarInput.nativeElement.value="",this.filterService.clearFilter(G.SEARCH))}ngOnDestroy(){this.searchFieldSubscription?.unsubscribe(),this.searchFieldNavigationSubscription?.unsubscribe(),this.inputBlurSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(dt))}}static{this.\u0275cmp=D({type:t,selectors:[["app-searchbar"]],viewQuery:function(n,r){if(n&1&&Ve(_8,5),n&2){let o;be(o=Ce())&&(r.searchBarInput=o.first)}},outputs:{cancelSearch:"cancelSearch"},decls:9,vars:2,consts:[["searchBarInput",""],[1,"searchbar","left-right-page-padding"],[1,"search-field"],["src","./assets/theme/svg/searchbar.svg",1,"searchbar-button"],["type","text","id","search","name","search","autocomplete","off",1,"font-label",3,"placeholder"],["src","./assets/theme/svg/clear_disabled.svg",1,"searchbar-clear"],[1,"completions"],["tabindex","-1",1,"completion","font-label",3,"innerHTML"],["src","./assets/theme/svg/clear_disabled.svg",1,"searchbar-clear",3,"click"],["tabindex","-1",1,"completion","font-label",3,"click","innerHTML"]],template:function(n,r){if(n&1&&(te(0,"div",1)(1,"div",2),Qe(2,"img",3)(3,"input",4,0),E(5,v8,1,0,"img",5),J(),te(6,"div",6),X(7,y8,2,4,"div",7,se),J()()),n&2){let o=Ho(4);u(3),Gn("placeholder",r.placeholder),u(2),I(o.value?5:-1),u(2),K(r.completions)}},dependencies:[dL],styles:["[_ngcontent-%COMP%]:root{--atv-icon-text-color: #000000}.searchbar[_ngcontent-%COMP%]{position:relative}.search-field[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;column-gap:.25rem;padding:0 1rem 0 .75rem;border:2px solid #ca7ef1;border-radius:2rem}.searchbar[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:100%;padding:.75rem 0;border:none;outline:none;background:none;color:#fff;border-radius:0;cursor:text}.searchbar-button[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.searchbar-clear[_ngcontent-%COMP%]{width:1rem;height:1rem;margin-left:auto;cursor:pointer}.completions[_ngcontent-%COMP%]{display:flex;column-gap:.5rem;margin-top:.75rem;overflow:hidden;-webkit-mask-image:linear-gradient(to right,rgb(0,0,0) 95%,transparent);mask-image:linear-gradient(to right,rgb(0,0,0) 95%,transparent)}.completion[_ngcontent-%COMP%]{padding:.25rem .75rem;border-radius:2rem;color:#ffffff80;cursor:pointer;flex-shrink:0;background-color:#ffffff4d;transition:all .2s}.completion[_ngcontent-%COMP%]:hover, .completion[_ngcontent-%COMP%]:focus{background-color:#ca7ef1}[_nghost-%COMP%]     .completion .highlight{font-weight:700;color:#fff}"]})}}return t})();var pL=(()=>{class t{constructor(e,n,r){this.environment=e,this.apiClient=n,this.session=r,this.searchApi=new hh(this.apiClient)}search(e,n,r,o,s,a=0){return re(this.searchApi.search(e,o,this.environment.platform,this.session.entitlementId,s,a,_s.NONE,r,n))}vodSearch(e,n,r,o,s,a,l){return re(this.searchApi.vodSearch(e,this.environment.platform,this.session.entitlementId,_s.NONE,n,r,o,s,a,l))}getCompletions(e,n,r,o,s,a){return re(this.searchApi.getCompletions(e,n,r,o,s,a))}static{this.\u0275fac=function(n){return new(n||t)(h(ae),h(Ni),h(ne))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();
16var C8=["searchbar"];function S8(t,i){if(t&1){let e=B();m(0,"app-search-filters",7),A("searchChange",function(r){k(e);let o=_();return L(o.complete(r))}),g()}if(t&2){let e=_();S("searchSettings",e.searchSettings)("activeFilters",e.enabledSearchFilters)("completions",e.filterCompletions)}}function E8(t,i){t&1&&M(0,"app-loading-indicator")}function I8(t,i){if(t&1&&(m(0,"div"),M(1,"app-ribbon",10),g()),t&2){let e=i.$implicit,n=i.$index,r=_(2);$o(yr("result row-",n)),u(),S("allowedAdultMode",r.allowedAdultMode)("pageProperties",r.searchPageLayout.properties)("ribbon",e.ribbon)("isOnSearchPage",!0)("ribbonId",n)}}function w8(t,i){if(t&1&&(m(0,"div",9),M(1,"app-grid",11),g()),t&2){let e=_(2);u(),S("allowedAdultMode",e.allowedAdultMode)("grid",e.searchGrid.grid)("pageProperties",e.searchPageLayout.properties)("isOnSearchPage",!0)}}function T8(t,i){if(t&1&&(m(0,"div",5),X(1,I8,2,8,"div",8,Vp),E(3,w8,2,4,"div",9),g()),t&2){let e=_();u(),K(e.searchRows),u(2),I(e.searchGrid?3:-1)}}function D8(t,i){if(t&1&&(m(0,"div",6),N(1),g()),t&2){let e=_();u(),Q(e.noResultsText)}}var fL=(()=>{class t extends du{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T,W,j,ee,De,tt){super(l,p,a,y,n,ee,De,tt),this.searchApi=e,this.channelCache=r,this.activatedRoute=o,this.router=s,this.cmsApi=c,this.stbCache=d,this.backdropService=b,this.log=T,this.contentProviderFactory=W,this.filterService=j,this.pageTitle="",this.noResults=!1,this.noResultsText="",this.allowedAdultMode=Me._FALSE,this.completions=[],this.filterCompletions=void 0,this.loading=!1,this.noResultsText=this.config.getTranslation(ge.error_search_no_results),this.minSearchChars=this.config.getSettingNumber(x.searchMinChars,3);let Se=this.config.getSettingString(x.searchSettings,null);this.searchSettings=JSON.parse(Se)}ngOnInit(){super.start(),this.filterService.loadUrlFilters(),this.enabledSearchFilters=this.buildEnabledSearchFilters(this.searchSettings?.filters??[]),this.searchTermSubscription=this.filterService.filterChanged.pipe(ke(e=>this.enabledSearchFilters.includes(e))).subscribe(()=>{this.filterCompletions=void 0,this.search()})}buildEnabledSearchFilters(e){return[G.SEARCH,...e.map(n=>{switch(n.type){case Bi.CATEGORY:return G.TAG;case Bi.DATE:return G.DATE;case Bi.TEXT:return n.field;default:return}}).filter(Boolean),G.SORT]}loadPage(){if(!this.page){console.error("page not loaded");return}this.pageTitle=this.page?.title??this.config.getTranslation(dl.search_placeholder),this.logPageView(),this.updateHtmlTitle(this.pageTitle),this.page.type===it.SEARCH_PAGE&&(this.page.searchPage?.properties?.includes(oe.ALLOW_ADULT)&&this.allowedAdultMode!==Me._TRUE&&(this.allowedAdultMode=Me.ANY),this.searchPageLayout=new zg(this.page.searchPage),this.search(),this.stbCache.stbRecordingChange.subscribe(()=>{this.search()})),this.page.backgroundImage&&this.backdropService.setBackdropImage(this.page.backgroundImage),this.page=void 0}getPageProperties(){return this.page?C(this.page.searchPage?.properties??[]):(this.pageId=this.activatedRoute.snapshot.data.pageId,this.cmsApi.getDynamicPage(this.pageId,this.sessionService.entitlementId,this.adultService.getAdultMode(this.allowedAdultMode===Me._TRUE?this.allowedAdultMode:Me.ANY)).pipe(we(e=>{this.page=e}),P(e=>e.searchPage?.properties??[])))}logPageView(){this.log.pageView(new Qt({pageLocale:this.config.getLocale(),pageTitle:this.pageTitle,pageURL:this.pageId}))}search(){let e=this.filterService.getFilterString(G.SEARCH),n=this.buildActiveFilters(),r=Object.keys(n).filter(s=>s!==G.SORT).length>0;if(!this.isValidSearch(e,r)){this.resetResults(e);return}e=e?decodeURI(e):void 0,this.cancelSearchRequest();let o=this.searchPageLayout?.getUniqueSearchTypes();this.loading=!0,this.clearResults(),r?this.performFilteredSearch(e,n):this.performDefaultSearch(e,o)}buildActiveFilters(){let e={};for(let r of this.searchSettings?.filters??[]){let o;switch(r.type){case Bi.CATEGORY:o=this.filterService.getFilterList(G.TAG);break;case Bi.DATE:o=this.filterService.getFilterString(G.DATE);break;case Bi.TEXT:o=this.filterService.getFilterString(r.field);break}(Array.isArray(o)?o.length:o)&&(e[r.field]=o)}let n=this.filterService.getFilterString(G.SORT);return n&&(e[G.SORT]=n),e}isValidSearch(e,n){return n||!!e&&e.length>=this.minSearchChars&&!!this.searchPageLayout}performDefaultSearch(e,n){this.searchRequestSubscription=this.searchApi.search(e,n,this.adultService.getAdultMode(this.allowedAdultMode),this.sessionService.catalogId,!0).subscribe({next:r=>{this.searchbar.setCompletions(r.completions??[]),this.handleSearchResult(r.results??[],e,n)},error:()=>this.handleError()})}performFilteredSearch(e,n){let{filterField:r,filterTerm:o}=this.buildVodFilters(n),s=n?.[G.SORT];this.searchbar.setCompletions([]),this.searchRequestSubscription=this.searchApi.vodSearch(this.sessionService.catalogId,this.adultService.getAdultMode(this.allowedAdultMode),e,r,o,s).subscribe({next:a=>{if(this.loading=!1,a?.items?.length)this.noResults=!1;else{this.clearResults(),this.noResults=!0;return}this.searchGrid={replay:!1,grid:new yi({title:"",contentProvider:this.createV
16odSearchContentProvider(a,e,r,o,s),properties:this.searchPageLayout?.properties??this.config.getSettingArray(x.propertiesVodFilteredRibbon,l=>oe[l],[])})}},error:()=>this.handleError()})}buildVodFilters(e){let n=[],r=[];for(let o of this.searchSettings.filters){let s=o.field,a=e[s];if(a)switch(o.type){case Bi.CATEGORY:{n.push(o.field);let l=o.categoryExtra?.tags??[],c=a,d=[...l,...c].join("/");r.push(d);break}case Bi.DATE:{let[l,c]=a.split("||"),d=o.datePickerExtra;l&&c&&l===c&&d?.exactField?(n.push(d.exactField),r.push(l)):(l&&d?.afterField&&(n.push(d.afterField),r.push(l)),c&&d?.beforeField&&(n.push(d.beforeField),r.push(c)));break}case Bi.TEXT:{n.push(o.field),r.push(Array.isArray(a)?a.join(","):a);break}}}return{filterField:n,filterTerm:r}}handleSearchResult(e,n,r){if(this.loading=!1,!e.length){this.searchRows=[],this.searchGrid=void 0,this.noResults=!0;return}this.noResults=!1,this.fetchChannelsObservable(r).subscribe(()=>{this.createContent(e,n)})}handleError(){this.loading=!1,this.searchRows=[],this.searchGrid=void 0}resetResults(e){this.clearResults(),e||this.searchbar.setCompletions([])}clearResults(){this.searchRows=[],this.searchGrid=void 0,this.noResults=!1}cancelSearchRequest(){this.searchRequestSubscription&&(this.searchRequestSubscription.unsubscribe(),this.searchRequestSubscription=void 0)}fetchChannelsObservable(e){return e.includes($r.LINEAR)||e.includes($r.REPLAY)||e.includes($r.RECORDING)?this.channelCache.getChannels().pipe(we(n=>{this.channels=n}),z(()=>(this.channels=[],C([])))):C([])}createContent(e,n){e?.length===1?this.createGrid(e[0],n):this.createRibbons(e,n)}createRibbons(e,n){this.searchRows=[],this.searchGrid=void 0,this.searchPageLayout?.rows.forEach(r=>{let o={replay:r.type===$r.REPLAY,ribbon:this.createRibbon(e,r,n)};o?.ribbon&&this.searchRows?.push(o)})}createRibbon(e,n,r){let o=e.find(s=>s.type===n.type);if(o?.elements&&o.elements.items?.length!==0){let s;return o.type===$r.RECORDING?s=new eh(this.stbCache,this.adultService.showAdult(this.allowedAdultMode),this.contentProviderFactory,o.elements):s=this.createSearchContentProvider(o,r),{title:n.title,contentProvider:s,properties:this.getRowProperties(n.properties??[],n.type),isOnDetailPage:!1,cardSize:rn.NORMAL}}}getRowProperties(e,n){switch(n){case $r.LINEAR:e.push(oe.FOCUS_FUTURE);break;case $r.REPLAY:e.push(oe.FOCUS_PAST);break}return e}updateSearchQueryParam(e){e&&this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{q:encodeURI(e)},queryParamsHandling:"merge",replaceUrl:!0})}createGrid(e,n){this.searchRows=[],this.searchGrid=void 0;let r=this.searchPageLayout?.rows.find(o=>o.type===e.type);if(r){let o;e.type===$r.RECORDING?o=new eh(this.stbCache,this.adultService.showAdult(this.allowedAdultMode),this.contentProviderFactory,e.elements):o=this.createSearchContentProvider(e,n),o&&(this.searchGrid={replay:r.type===$r.REPLAY,grid:new yi({title:r.title,contentProvider:o,properties:this.getRowProperties(r.properties??[],r.type)})})}}createSearchContentProvider(e,n){return new jy(this.searchApi,this.adultService,this.sessionService,e,n,this.allowedAdultMode)}createVodSearchContentProvider(e,n,r,o,s){return new Hy(this.searchApi,this.adultService,this.sessionService,e,n,this.allowedAdultMode,r,o,s)}complete(e){if(this.filterCompletions=void 0,!e.search)return;let n=this.buildActiveFilters(),{filterField:r,filterTerm:o}=this.buildVodFilters(n);this.searchApi.getCompletions(this.sessionService.catalogId,e.filter,e.search,this.adultService.getAdultMode(this.allowedAdultMode),r,o).subscribe({next:s=>{this.filterCompletions=s,this.loading=!1},error:()=>{this.filterCompletions=[],this.loading=!1}})}ngOnDestroy(){super.stop(),this.cancelSearchRequest(),this.searchTermSubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(f(pL),f(O),f(Jn),f(_t),f(ft),f($e),f(ne),f(sl),f(xn),f(et),f(_e),f(wu),f(ct),f(Ur),f(dt),f(Zn),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["app-search-page"]],viewQuery:function(n,r){if(n&1&&Ve(C8,5),n&2){let o;be(o=Ce())&&(r.searchbar=o.first)}},features:[Ee],decls:8,vars:4,consts:[["searchbar",""],[1,"page-wrapper"],[1,"page-container","search-page-container"],[3,"cancelSearch"],[1,"page-container","page-filters","left-right-page-padding",3,"searchSettings","activeFilters","completions"],[1,"results"],[1,"n
16o-results","font-label"],[1,"page-container","page-filters","left-right-page-padding",3,"searchChange","searchSettings","activeFilters","completions"],[3,"class"],[1,"result","row-0"],[3,"allowedAdultMode","pageProperties","ribbon","isOnSearchPage","ribbonId"],[3,"allowedAdultMode","grid","pageProperties","isOnSearchPage"]],template:function(n,r){n&1&&(m(0,"div",1)(1,"div",2)(2,"app-searchbar",3,0),A("cancelSearch",function(){return r.cancelSearchRequest()}),g(),E(4,S8,1,3,"app-search-filters",4),E(5,E8,1,0,"app-loading-indicator"),E(6,T8,4,1,"div",5),E(7,D8,2,1,"div",6),g()()),n&2&&(u(4),I(r.searchSettings?4:-1),u(),I(r.loading?5:-1),u(),I(r.loading?-1:6),u(),I(!r.loading&&r.noResults?7:-1))},dependencies:[uL,Su,Tu,fs,cL],styles:[".search-page-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}app-searchbar[_ngcontent-%COMP%]{display:block;margin:auto;margin-top:1.5rem;width:100%;max-width:50rem}app-loading-indicator[_ngcontent-%COMP%]{display:block;width:3.5rem;height:3.5rem;margin-top:4rem}.results[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.no-results[_ngcontent-%COMP%]{text-align:center;margin-top:5rem}"]})}}return t})();var A8=["*"],Br=(()=>{class t{constructor(){this.save=new Y}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-settings-category"]],inputs:{label:"label",confirmLabel:"confirmLabel"},outputs:{save:"save"},ngContentSelectors:A8,decls:5,vars:2,consts:[[1,"settings-category"],[1,"font-title-2","settings-category-title"],[1,"settings-confirm",3,"click","label"]],template:function(n,r){n&1&&(io(),m(0,"div",0)(1,"div",1),N(2),g(),ro(3),m(4,"app-text-button",2),A("click",function(){return r.s
16ave.emit()}),g()()),n&2&&(u(2),Q(r.label),u(2),S("label",r.confirmLabel))},dependencies:[Ke],styles:[".settings-confirm[_ngcontent-%COMP%]{align-self:flex-end;margin-top:2rem}"]})}}return t})();function R8(t,i){if(t&1&&M(0,"app-select-option",5),t&2){let e=i.$implicit;S("value",e.value)("title",e.title)}}function x8(t,i){if(t&1&&M(0,"app-select-option",5),t&2){let e=i.$implicit;S("value",e.value)("title",e.title)}}function M8(t,i){if(t&1){let e=B();m(0,"app-settings-category",1),A("save",function(){k(e);let r=_(2);return L(r.saveAudio())}),m(1,"div",2)(2,"div",3),N(3),g(),m(4,"app-select-button",4),xt("valueChange",function(r){k(e);let o=_(2);return Pt(o.audioLanguageValue1,r)||(o.audioLanguageValue1=r),L(r)}),X(5,R8,1,2,"app-select-option",5,se),g()(),m(7,"div",2)(8,"div",3),N(9),g(),m(10,"app-select-button",4),xt("valueChange",function(r){k(e);let o=_(2);return Pt(o.audioLanguageValue2,r)||(o.audioLanguageValue2=r),L(r)}),X(11,x8,1,2,"app-select-option",5,se),g()()()}if(t&2){let e=_(2);S("label",e.audioLabel())("confirmLabel",e.confirmLabel()),u(3),Q(e.audioLanguage1Label()),u(),Rt("value",e.audioLanguageValue1),u(),K(e.languageManager.audioLanguageOptions),u(4),Q(e.audioLanguage2Label()),u(),Rt("value",e.audioLanguageValue2),u(),K(e.languageManager.audioLanguageOptions)}}function P8(t,i){if(t&1&&M(0,"app-select-option",5),t&2){let e=i.$implicit;S("value",e.value)("title",e.title)}}function O8(t,i){if(t&1&&M(0,"app-select-option",5),t&2){let e=i.$implicit;S("value",e.value)("title",e.title)}}function N8(t,i){if(t&1){let e=B();m(0,"app-settings-category",1),A("save",function(){k(e);let r=_(2);return L(r.saveText())}),m(1,"div",2)(2,"div",3),N(3),g(),m(4,"app-select-button",4),xt("valueChange",function(r){k(e);let o=_(2);return Pt(o.textLanguageValue1,r)||(o.textLanguageValue1=r),L(r)}),X(5,P8,1,2,"app-select-option",5,se),g()(),m(7,"div",2)(8,"div",3),N(9),g(),m(10,"app-select-button",4),xt("valueChange",function(r){k(e);let o=_(2);return Pt(o.textLanguageValue2,r)||(o.textLanguageValue2=r),L(r)}),X(11,O8,1,2,"app-select-option",5,se),g()()()}if(t&2){let e=_(2);S("label",e.textLabel())("confirmLabel",e.confirmLabel()),u(3),Q(e.textLanguage1Label()),u(),Rt("value",e.textLanguageValue1),u(),K(e.languageManager.textLanguageOptions),u(4),Q(e.textLanguage2Label()),u(),Rt("value",e.textLanguageValue2),u(),K(e.languageManager.textLanguageOptions)}}function k8(t,i){if(t&1&&(E(0,M8,13,6,"app-settings-category",0),E(1,N8,13,6,"app-settings-category",0)),t&2){let e=_();I(e.languageManager.audioLanguageOptions.length>0?0:-1),u(),I(e.languageManager.textLanguageOptions.length>0?1:-1)}}var hL=(()=>{class t{constructor(e,n){this.config=e,this.languageManager=n,this.confirmLabel=V(""),this.loaded=V(!1),this.audioLabel=V(""),this.audioLanguage1Label=V(""),this.audioLanguage2Label=V(""),this.audioLanguageValue1="",this.audioLanguageValue2="",this.textLabel=V(""),this.textLanguage1Label=V(""),this.textLanguage2Label=V(""),this.textLanguageValue1="",this.textLanguageValue2=""}ngOnInit(){this.languageManager.deviceSettingsLoaded?(this.loadValues(),this.loaded.set(!0)):this.languageManager.loadPreferredLanguages().subscribe({next:()=>{this.loadValues(),this.loaded.set(!0)}}),this.loadLabels()}loadLabels(){this.confirmLabel.set(this.config.getTranslation(Ye.mystuff_adultmode_save_btn)),this.audioLabel.set(this.config.getTranslation($t.settings_title_audio)),this.audioLanguage1Label.set(this.config.getTranslation($t.settings_language_audio_1)),this.audioLanguage2Label.set(this.config.getTranslation($t.settings_language_audio_2)),this.textLabel.set(this.config.getTranslation($t.settings_title_sub)),this.textLanguage1Label.set(this.config.getTranslation($t.settings_language_sub_1)),this.textLanguage2Label.set(this.config.getTranslation($t.settings_language_sub_2))}loadValues(){this.audioLanguageValue1=this.languageManager.preferredAudioLanguage1,this.audioLanguageValue2=this.languageManager.preferredAudioLanguage2,this.textLanguageValue1=this.languageManager.preferredTextLanguage1,this.textLanguageValue2=this.languageManager.preferredTextLanguage2}saveAudio(){this.languageManager.saveAudioLanguages(this.audioLanguageValue1,this.audioLanguageValue2),this.languageManager.clearPreferredChannelLanguages()}saveText(){this.languageManager.saveTextLanguages(this.textLanguageValue1,this.textLanguageValue2),this.languageManager.clearPreferredChannelLanguages()}
16static{this.\u0275fac=function(n){return new(n||t)(f(O),f(fy))}}static{this.\u0275cmp=D({type:t,selectors:[["app-language-settings"]],decls:1,vars:1,consts:[[3,"label","confirmLabel"],[3,"save","label","confirmLabel"],[1,"settings-item"],[1,"font-label"],[1,"settings-item-value",3,"valueChange","value"],[3,"value","title"]],template:function(n,r){n&1&&E(0,k8,2,2),n&2&&I(r.loaded()?0:-1)},dependencies:[Br,Yo,Mr],encapsulation:2})}}return t})();function L8(t,i){if(t&1&&M(0,"app-select-option",4),t&2){let e=i.$implicit;S("title",e.title)("value",e.value)}}var mL=(()=>{class t{constructor(e,n,r,o,s){this.config=e,this.historyApi=n,this.adultService=r,this.sessionService=o,this.messagesService=s,this.label=this.config.getTranslation(Ye.mystuff_adult_settings),this.confirmLabel=e.getTranslation(Ye.mystuff_adultmode_save_btn),this.adultDurationLabel=this.config.getTranslation(Ye.mystuff_adultmode),this.ottAdultLabel=this.config.getTranslation($t.settings_allow_adult_androidtv_title),this.adultDurationOptions=[{value:0,title:this.config.getTranslation(Ye.mystuff_adultmode_never)},{value:5,title:"5 "+this.config.getTranslation(Ye.mystuff_minutes)},{value:10,title:"10 "+this.config.getTranslation(Ye.mystuff_minutes)},{value:60,title:"1 "+this.config.getTranslation(Ye.mystuff_hour)},{value:120,title:"2 "+this.config.getTranslation(Ye.mystuff_hours)}]}ngOnInit(){this.adultService.getNumberOfMinutesAdultMode(!0).subscribe(e=>{let n=this.adultDurationOptions.find(r=>r.value===e);n?this.adultDuration=n.value:this.adultDuration=void 0}),this.historyApi.getCustomerSetting(Ns.ott_adult_mode_allowed).subscribe({next:e=>{e&&(e.value==="true"||e.value==="TRUE")?this.currentOttAdultAllowed=this.ottAdultAllowed=!0:this.currentOttAdultAllowed=this.ottAdultAllowed=!1},error:()=>{this.currentOttAdultAllowed=this.ottAdultAllowed=!1}})}save(){let e=[];this.adultDuration!==void 0&&e.push(this.historyApi.setSettingForDevice(this.sessionService.deviceId,St.adult_mode,this.adultDuration?.toString())),this.ottAdultAllowed!==void 0&&this.currentOttAdultAllowed!==this.ottAdultAllowed&&e.push(this.historyApi.setCustomerSetting(Ns.ott_adult_mode_allowed,this.ottAdultAllowed?"true":"false")),e.length>0&&We(e).subscribe({next:()=>{if(this.messagesService.showSuccessMessage(this.config.getTranslation(Ye.mystuff_adultmode_successfully_saved)),this.adultService.getNumberOfMinutesAdultMode(!0).subscribe(),this.ottAdultAllowed!==this.currentOttAdultAllowed){let n=this.ottAdultAllowed?this.config.getTranslation(Ch.android_tv_check_adult_mode_enabled):this.config.getTranslation(Ch.android_tv_check_adult_mode_disabled);n&&this.messagesService.showInfoMessage(n,!1),this.currentOttAdultAllowed=this.ottAdultAllowed}},error:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_general))}})}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(en),f($e),f(ne),f(_e))}}static{this.\u0275cmp=D({type:t,selectors:[["app-adult-settings"]],decls:11,vars:6,consts:[[3,"save","label","confirmLabel"],[1,"settings-item"],[1,"font-label"],[1,"settings-item-value",3,"valueChange","value"],[3,"title","value"]],template:function(n,r){n&1&&(m(0,"app-settings-category",0),A("save",function(){return r.s
16ave()}),m(1,"div",1)(2,"div",2),N(3),g(),m(4,"app-select-button",3),xt("valueChange",function(s){return Pt(r.adultDuration,s)||(r.adultDuration=s),s}),X(5,L8,1,2,"app-select-option",4,se),g()(),m(7,"div",1)(8,"div",2),N(9),g(),m(10,"app-toggle-button",3),xt("valueChange",function(s){return Pt(r.ottAdultAllowed,s)||(r.ottAdultAllowed=s),s}),g()()()),n&2&&(S("label",r.label)("confirmLabel",r.confirmLabel),u(3),Q(r.adultDurationLabel),u(),Rt("value",r.adultDuration),u(),K(r.adultDurationOptions),u(4),Q(r.ottAdultLabel),u(),Rt("value",r.ottAdultAllowed))},dependencies:[Br,Yo,Mr,Qo],encapsulation:2})}}return t})();var gL=(()=>{class t{constructor(e,n,r,o){this.config=e,this.historyApi=n,this.messagesService=r,this.autoplayManager=o,this.label=e.getTranslation($t.settings_autoplay_title),this.confirmLabel=e.getTranslation(Ye.mystuff_adultmode_save_btn),this.autoplayEnabledLabel=e.getTranslation($t.settings_autoplay)}ngOnInit(){this.historyApi.getCustomerSetting(Ns.autoplay_enabled).subscribe({next:e=>{!e||e.value==="true"||e.value==="TRUE"?this.currentAutoplayEnabled=this.autoplayEnabled=!0:this.currentAutoplayEnabled=this.autoplayEnabled=!1},error:()=>{this.currentAutoplayEnabled=this.autoplayEnabled=this.config.getSettingBoolean(x.autoplayCustomerDefault,!0)}})}save(){this.autoplayEnabled!==void 0&&this.currentAutoplayEnabled!==this.autoplayEnabled&&this.historyApi.setCustomerSetting(Ns.autoplay_enabled,this.autoplayEnabled?"true":"false").subscribe({next:()=>{this.currentAutoplayEnabled=this.autoplayEnabled,this.autoplayManager.userEnabled=this.currentAutoplayEnabled??!1,this.messagesService.showSuccessMessage(this.config.getTranslation(Ye.mystuff_adultmode_successfully_saved))},error:()=>{this.autoplayEnabled=this.currentAutoplayEnabled,this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_general))}})}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(en),f(_e),f(il))}}static{this.\u0275cmp=D({type:t,selectors:[["app-autoplay-settings"]],decls:5,vars:4,consts:[[3,"save","label","confirmLabel"],[1,"settings-item"],[1,"font-label"],[1,"settings-item-value",3,"valueChange","value"]],template:function(n,r){n&1&&(m(0,"app-settings-category",0),A("save",function(){return r.s
16ave()}),m(1,"div",1)(2,"div",2),N(3),g(),m(4,"app-toggle-button",3),xt("valueChange",function(s){return Pt(r.autoplayEnabled,s)||(r.autoplayEnabled=s),s}),g()()()),n&2&&(S("label",r.label)("confirmLabel",r.confirmLabel),u(3),Q(r.autoplayEnabledLabel),u(),Rt("value",r.autoplayEnabled))},dependencies:[Br,Qo],encapsulation:2})}}return t})();var iw=class{constructor(){this.old="",this.new="",this.confirm=""}},_L=(()=>{class t{constructor(e,n,r){this.config=e,this.apiApi=n,this.messagesService=r,this.settings=new iw,this.confirmLabel=e.getTranslation(Ye.mystuff_change_pincode),this.pincodeOldTitle=e.getTranslation(Ye.mystuff_old_pincode),this.pincodeNewTitle=e.getTranslation(Ye.mystuff_new_pincode),this.pincodeConfirmTitle=e.getTranslation(Ye.mystuff_confirm_pincode)}ngOnInit(){switch(this.type){case zd.ADULT:this.label=this.config.getTranslation(Ye.mystuff_change_adult_pincode);break;case zd.VOD:this.label=this.config.getTranslation(Ye.mystuff_change_vod_pincode);break}}save(){if(this.settings.new!==this.settings.confirm||this.settings.old===""||this.settings.new===""||this.settings.confirm===""){this.messagesService.showErrorMessage(this.config.getTranslation(Ye.mystuff_pincodes_must_match));return}let e={type:this.type,oldPincode:this.settings.old,newPincode:this.settings.new};this.settings.old=this.settings.new=this.settings.confirm="",this.apiApi.changePincode(e).subscribe({next:()=>{this.messagesService.showSuccessMessage(this.config.getTranslation(Ye.mystuff_pincodechange_succes))},error:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(Ye.mystuff_pincodechange_failed))}})}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(Ba),f(_e))}}static{this.\u0275cmp=D({type:t,selectors:[["app-pincode-settings"]],inputs:{type:"type"},decls:13,vars:8,consts:[[3,"save","label","confirmLabel"],[1,"settings-item"],[1,"font-label"],["autocomplete","off","type","password",1,"settings-item-input",3,"keydown.enter","ngModelChange","ngModel"],["autocomplete","off","type","password",1,"settings-item-input",3,"ngModelChange","keydown.enter","ngModel"]],template:function(n,r){n&1&&(m(0,"app-settings-category",0),A("save",function(){return r.s
16ave()}),m(1,"div",1)(2,"div",2),N(3),g(),m(4,"input",3),A("keydown.enter",function(){return r.save()}),xt("ngModelChange",function(s){return Pt(r.settings.old,s)||(r.settings.old=s),s}),g()(),m(5,"div",1)(6,"div",2),N(7),g(),m(8,"input",4),xt("ngModelChange",function(s){return Pt(r.settings.new,s)||(r.settings.new=s),s}),A("keydown.enter",function(){return r.save()}),g()(),m(9,"div",1)(10,"div",2),N(11),g(),m(12,"input",4),xt("ngModelChange",function(s){return Pt(r.settings.confirm,s)||(r.settings.confirm=s),s}),A("keydown.enter",function(){return r.save()}),g()()()),n&2&&(S("label",r.label)("confirmLabel",r.confirmLabel),u(3),Q(r.pincodeOldTitle),u(),Rt("ngModel",r.settings.old),u(3),Q(r.pincodeNewTitle),u(),Rt("ngModel",r.settings.new),u(3),Q(r.pincodeConfirmTitle),u(),Rt("ngModel",r.settings.confirm))},dependencies:[Br,os,rs,Qa,Qs],encapsulation:2})}}return t})();function F8(t,i){if(t&1){let e=B();m(0,"app-settings-category",1),A("save",function(){k(e);let r=_();return L(r.save())}),M(1,"app-recording-options",2),g()}if(t&2){let e=_();S("label",e.label)("confirmLabel",e.confirmLabel),u(),S("options",e.recordingOptions)("dropdownConfig",e.recordingConfig)}}var vL=(()=>{class t{constructor(e,n,r,o){this.config=e,this.recordingService=n,this.historyApi=r,this.messagesService=o,this.label=e.getTranslation($t.settings_title_recording_npvr),this.confirmLabel=e.getTranslation(Ye.mystuff_adultmode_save_btn),this.recordingConfig={showBufferSelection:!0,showEpisodesSelection:!0}}set stb(e){e&&(this.recordingStb=e,this.recordingService.loadRecordingCustomerSettings(e.id,!0).subscribe(n=>this.recordingOptions=n))}save(){if(this.recordingStb&&this.recordingOptions){let e=[];this.recordingOptions.type!==void 0&&e.push(this.historyApi.setSettingForDevice(this.recordingStb.id,St.recording_episodes,this.recordingOptions.type)),this.recordingOptions.beginBuffer!==void 0&&e.push(this.historyApi.setSettingForDevice(this.recordingStb.id,St.recording_before_time,`${this.recordingOptions.beginBuffer}`)),this.recordingOptions.endBuffer!==void 0&&e.push(this.historyApi.setSettingForDevice(this.recordingStb.id,St.recording_after_time,`${this.recordingOptions.endBuffer}`)),this.recordingOptions.deleteProtected!==void 0&&e.push(this.historyApi.setSettingForDevice(this.recordingStb.id,St.recording_delete_protection,this.recordingOptions.deleteProtected?"ON":"OFF")),e.length>0&&We(e).subscribe({next:()=>{this.messagesService.showSuccessMessage(this.config.getTranslation($t.settings_saved))},error:()=>{this.messagesService.showErrorMessage(this.config.getTranslation(ge.error_general))}})}}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(my),f(en),f(_e))}}static{this.\u0275cmp=D({type:t,selectors:[["app-recording-settings"]],inputs:{stb:"stb"},decls:1,vars:1,consts:[[3,"label","confirmLabel"],[3,"save","label","confirmLabel"],["itemClass","settings-item",3,"options","dropdownConfig"]],template:function(n,r){n&1&&E(0,F8,2,4,"app-settings-category",0),n&2&&I(r.recordingOptions?0:-1)},dependencies:[Br,x_],encapsulation:2})}}return t})();function V8(t,i){if(t&1&&M(0,"app-select-option",4),t&2){let e=i.$implicit;S("value",e.value)("title",e.title)}}var yL=(()=>{class t{constructor(e,n,r,o,s){this.config=e,this.historyApi=n,this.reminderCache=r,this.sessionService=o,this.messagesService=s,this.label=this.config.getTranslation($t.settings_title_reminder_ott),this.confirmLabel=e.getTranslation(Ye.mystuff_adultmode_save_btn),this.reminderBeforeTitle=this.config.getTranslation($t.settings_reminder_before_time),this.reminderBeforeOptions=this.getTimeOptions(x.reminderBeforeTimes)}ngOnInit(){this.historyApi.getSettingForDevice(this.sessionService.deviceId,St.reminder_before_time).subscribe({next:e=>{this.reminderBefore=e?.value?parseInt(e.value):0},error:()=>{this.reminderBefore=0}})}save(){this.historyApi.setSettingForDevice(this.sessionService.deviceId,St.reminder_before_time,`${this.reminderBefore}`).subscribe({next:()=>{this.messagesService.showSuccessMessage(this.config.getTranslation($t.settings_saved)),this.reminderCache.reset()},error:()=>{this.messagesService.showErrorMessage(this.config.getTranslation($t.setting_save_failed))}})}getTimeOptions(e){let n=this.config.getSettingArray(e,o=>parseInt(o,10)*6e4,[0,3e5,6e5,9e5,12e5,18e5]),r=this.config.getTranslation(pe.detail_duration_min);return n.map(o=>({value:o,title:`${o/6e4} ${r}`}))}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(en),f(ns),f(ne),f(_e))}}static{this.\u0275cmp=D({type:t,selectors:[["app-reminder-settings"]],decls:7,vars:4,consts:[[3,"save","label","confirmLabel"],[1,"settings-item"],[1,"font-label"],[1,"settings-item-value",3,"valueChange","value"],[3,"value","title"]],template:function(n,r){n&1&&(m(0,"app-settings-category",0),A("save",function(){return r.s
16ave()}),m(1,"div",1)(2,"div",2),N(3),g(),m(4,"app-select-button",3),xt("valueChange",function(s){return Pt(r.reminderBefore,s)||(r.reminderBefore=s),s}),X(5,V8,1,2,"app-select-option",4,se),g()()()),n&2&&(S("label",r.label)("confirmLabel",r.confirmLabel),u(3),Q(r.reminderBeforeTitle),u(),Rt("value",r.reminderBefore),u(),K(r.reminderBeforeOptions))},dependencies:[Br,Yo,Mr],encapsulation:2})}}return t})();function U8(t,i){t&1&&M(0,"app-autoplay-settings")}var bL=(()=>{class t extends Li{constructor(e,n,r,o,s,a,l,c,d,p,y){super(n,a,l,r,e,d,p,y),this.log=o,this.activatedRoute=s,this.environment=c,this.isAuthorized=!1,this.SessionPinRequestTypes=zd,this.pageTitle=this.config.getTranslation(Hn.menu_settings),this.isAuthorized=this.authorizationService.isAuthorized(),this.autoplayAllowed=(e.getSettingBoolean(x.autoplayWatchingEnabledVod,!1)||e.getSettingBoolean(x.autoplayWatchingEnabledEpg,!1))??!1}ngOnInit(){this.log.pageView(new Qt({pageURL:Zt.my_stuff_settings,pageTitle:this.pageTitle,pageLocale:this.config.getLocale()})),super.start()}loadPage(){this.updateHtmlTitle(this.pageTitle),this.environment.atvFeatureList.includes(ln.RECORDING)&&(this.npvrStb=this.sessionService.stbList.getNpvrStb())}getPageProperties(){return C(this.activatedRoute.snapshot.data.properties)}ngOnDestroy(){super.stop()}static{this.\u0275fac=function(n){return new(n||t)(f(O),f(ne),f(_e),f(ct),f(_t),f(et),f($e),f(ae),f(Zn),f(Ft),f(un))}}static{this.\u0275cmp=D({type:t,selectors:[["app-settings-page"]],features:[Ee],decls:9,vars:6,consts:[[1,"settings-wrapper","left-right-page-padding"],[1,"settings"],[3,"stb"],[3,"type"]],template:function(n,r){n&1&&(m(0,"div",0)(1,"div",1),M(2,"app-recording-settings",2)(3,"app-language-settings")(4,"app-reminder-settings")(5,"app-pincode-settings",3)(6,"app-pincode-settings",3)(7,"app-adult-settings"),E(8,U8,1,0,"app-autoplay-settings"),g()()),n&2&&(H("hidden",!r.isAuthorized),u(2),S("stb",r.npvrStb),u(3),S("type",r.SessionPinRequestTypes.ADULT),u(),S("type",r.SessionPinRequestTypes.VOD),u(2),I(r.autoplayAllowed?8:-1))},dependencies:[vL,yL,_L,mL,gL,hL],encapsulation:2})}}return t})();var $y=(()=>{class t{constructor(){this._topLevelMenus=[],this._subLevelMenus=[],this.currentMenu={id:"",items:[]}}updateMenu(e){this.currentMenu=e}get menu(){return this.currentMenu}updateUIMenu(e,n){this._topLevelMenus=e,this._subLevelMenus=n}get topLevelMenus(){return this._topLevelMenus}get subLevelMenus(){return this._subLevelMenus}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var SL=(()=>{class t{constructor(e,n,r){this.info=e,this.session=n,this.config=r,this.clientAreaItem=V(void 0),this.clientAreaTitle=V(void 0)}createMenu(){let e=[],n=[];this.info.menu.items&&(this.info.menu.items.forEach(r=>{let o=[];if(r.items&&r.items.length>0)o=this.createSubLeveMenuItems(r,n);else if(!r.pageType)return;e.push({pageType:r.pageType,title:r.title,route:r.tag,icon:this.getIconString(r.icon,!1),icon_selected:this.getIconString(r.icon,!0),submenu:o})}),this.info.updateUIMenu(e,n),this.findClientAreaItem(),this.getClientAreaTitle())}createSubLeveMenuItems(e,n){let r={forTopLevel:e.tag,forTopLevelTitle:e.title,subLevelMenuItems:[]};return e.items?.forEach(o=>{r.subLevelMenuItems.push({pageType:o.pageType,title:o.title,route:`${e.tag}/${o.tag}`,icon:this.getIconString(o.icon,!1),icon_selected:this.getIconString(o.icon,!0)})}),n.push(r),r.subLevelMenuItems}getIconString(e,n){switch(e){case Ze.ADULT_ICON:return n?"./assets/theme/svg/18_selected.svg":"./assets/theme/svg/18_normal.svg";case Ze.CATCHUP_ICON:return n?"./assets/theme/svg/flashback_selected.svg":"./assets/theme/svg/flashback_normal.svg";case Ze.CLIENTAREA_ICON:return n?"./assets/theme/svg/user_selected.svg":"./assets/theme/svg/user_normal.svg";case Ze.CONFLICTS_ICON:return n?"./assets/theme/svg/conflicts_selected.svg":"./assets/theme/svg/conflicts_normal.svg";case Ze.EXPIRE_ICON:return n?"./assets/theme/svg/expired_selected.svg":"./assets/theme/svg/expired_normal.svg";case Ze.HEART_ICON:return n?"./assets/theme/svg/recommended_selected.svg":"./assets/theme/svg/recommended_normal.svg";case Ze.LIST_ICON:return n?"./assets/theme/svg/lists_selected.svg":"./assets/theme/svg/lists_normal.svg";case Ze.LOGOUT_ICON:return n?"./assets/theme/svg/logout_selected.svg":"./assets/theme/svg/logout_normal.svg";case Ze.MOVIE_ICON:return n?"./assets/theme/svg/movies_selected.svg":"./assets/theme/svg/movies_normal.svg";case Ze.MY_WORLD_ICON:return n?"./assets/theme/svg/mystuff_selected.svg":"./assets/theme/svg/mystuff.svg";case Ze.NEW_ICON:return n?"./assets/theme/svg/new_selected.svg":"./assets/theme/svg/new_normal.svg";case Ze.NOW_ICON:return n?"./assets/theme/svg/now_selected.svg":"./assets/theme/svg/now.svg";
16case Ze.ON_DEMAND_ICON:return n?"./assets/theme/svg/videoclub_selected.svg":"./assets/theme/svg/videoclub.svg";case Ze.PLAY_TV_ICON:return n?"./assets/theme/svg/guide_selected.svg":"./assets/theme/svg/guide_normal.svg";case Ze.RECORDED_ICON:return n?"./assets/theme/svg/recorded_selected.svg":"./assets/theme/svg/recorded_normal.svg";case Ze.PLANNED_ICON:return n?"./assets/theme/svg/planned_selected.svg":"./assets/theme/svg/planned_normal.svg";case Ze.REMINDERS_ICON:return n?"./assets/theme/svg/reminders_selected.svg":"./assets/theme/svg/reminders_normal.svg";case Ze.SEARCH_ICON:return n?"./assets/theme/svg/search_selected.svg":"./assets/theme/svg/search_normal.svg";case Ze.SERIES_ICON:return n?"./assets/theme/svg/series_selected.svg":"./assets/theme/svg/series_normal.svg";case Ze.STAR_ICON:return n?"./assets/theme/svg/star_selected.svg":"./assets/theme/svg/star_normal.svg";case Ze.RECENT_ICON:return n?"./assets/theme/svg/recent_selected.svg":"./assets/theme/svg/recent_normal.svg";case Ze.TV_ICON:return n?"./assets/theme/svg/recent_selected.svg":"./assets/theme/svg/recent_normal.svg";case Ze.SETTINGS_ICON:return n?"./assets/theme/svg/settings_selected.svg":"./assets/theme/svg/settings_normal.svg";case Ze.HORSESHOE_ICON:return n?"./assets/theme/svg/horseshoe_selected.svg":"./assets/theme/svg/horseshoe_normal.svg";case Ze.HORSE_ICON:return n?"./assets/theme/svg/horse_selected.svg":"./assets/theme/svg/horse_normal.svg";case Ze.MESSAGE_ICON:return n?"./assets/theme/svg/message_selected.svg":"./assets/theme/svg/message_normal.svg";case Ze.BELL_ICON:return n?"./assets/theme/svg/bell_selected.svg":"./assets/theme/svg/bell_normal.svg";case Ze.DOCUMENTS_ICON:return n?"./assets/theme/svg/documents_selected.svg":"./assets/theme/svg/documents_normal.svg";case Ze.SULKY_ICON:return n?"./assets/theme/svg/sulky_selected.svg":"./assets/theme/svg/sulky_normal.svg";case Ze.PEOPLE_ICON:return n?"./assets/theme/svg/people_selected.svg":"./assets/theme/svg/people_normal.svg";case Ze.VIDEOFOLDER_ICON:return n?"./assets/theme/svg/videofolder_selected.svg":"./assets/theme/svg/videofolder_normal.svg";case Ze.HORSEHEAD_ICON:return n?"./assets/theme/svg/horsehead_selected.svg":"./assets/theme/svg/horsehead_normal.svg";case Ze.HORSE_WITH_DRIVER_ICON:return n?"./assets/theme/svg/horsewithdriver_selected.svg":"./assets/theme/svg/horsewithdriver_normal.svg";case Ze.BIKE_ICON:return n?"./assets/theme/svg/bike_selected.svg":"./assets/theme/svg/bike_normal.svg";case Ze.HEALING_ICON:return n?"./assets/theme/svg/healing_selected.svg":"./assets/theme/svg/healing_normal.svg";case Ze.MEDICAL_ICON:return n?"./assets/theme/svg/medical_selected.svg":"./assets/theme/svg/medical_normal.svg";default:return""}}findClientAreaItem(){for(let e of this.info.topLevelMenus){if(e.pageType===it.CLIENT_AREA_PAGE){this.clientAreaItem.set(e);return}let n=e.submenu.find(r=>r.pageType===it.CLIENT_AREA_PAGE);if(n){this.clientAreaItem.set({pageType:n.pageType,route:n.route,title:n.title,icon:n.icon,icon_selected:n.icon_selected,submenu:[]});return}}this.clientAreaItem.set(void 0)}getClientAreaTitle(){if(this.session.isAnonymous){let e=this.session.catalogId,n=this.config.getAnonymousSettings()?.catalogs;this.clientAreaTitle.set(n?.find(r=>r.id===e)?.name)}else this.clientAreaTitle.set(this.session.getDisplayName)}static{this.\u0275fac=function(n){return new(n||t)(h($y),h(ne),h(O))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var EL=(()=>{class t{constructor(e,n,r,o,s,a,l,c){this.cmsApi=e,this.session=n,this.info=r,this.environment=o,this.config=s,this.listPageResolver=a,this.router=l,this.menuUi=c}loadNewMenu(){return new Re(e=>{this.cmsApi.getMenu(this.session.catalogId).subscribe({next:n=>{this.filterMenu(n),this.defineRoutesForMenu(),this.menuUi.createMenu(),e.next(),e.complete()},error:()=>{let n={id:"",items:[]};this.info.updateMenu(n),this.info.updateUIMenu([],[]),this.listPageResolver.setCurrentMenu(n),this.defineRoutesForMenu(),e.next(),e.complete()}})})}filterMenu(e){let n={id:e.id,items:[]},r=!1;e?.items&&e.items.forEach(o=>{if(this.mayAddMenuItem(o.pageType,o.properties)){if(o.pageType)n.items?.push(o);else if(o.items&&o.items.length>0){let s=this.filterValidSubLevels(o.items);s.length!==0&&(o.items=s,n.items?.push(o))}else if(!o.pageType)return}r=r||o.pageType===it.CLIENT_AREA_PAGE||!!o.items&&o.items.some(s=>s.pageType===it.CLIENT_AREA_PAGE)}),r||n.items?.push(this.createClientAreaItem()),this.info.updateMenu(n),this.listPageResolver.setCurrentMenu(n)}mayAddMenuItem(e,n){return e&&this.convertPageTypeToComponent(e)===void 0||(e===it.RECORDINGS_CONFLICT_PAGE||e===it.RECORDINGS_EXPIRE_PAGE||e===it.RECORDINGS_PLANNED_PAGE||e===it.RECORDINGS_RECORDED_PAGE)&&!this.environment.atvFeatureList.includes(ln.RECORDING)||n&&n.includes(oe.NPVR_REQUIRED)&&!this.session.stbList.hasNpvrBox()||n?.includes(oe.ADULT_REQUIRED)&&(this.config.getSettingString(x.showAdultPage,"ON")!=="ON"||!this.environment.allowAdult)?!1:!n?.some(r=>!Object.keys(oe).includes(r))}
16convertPageTypeToComponent(e){switch(e){case it.LIST_PAGE:return eL;case it.TV_GUIDE_PAGE:return Jk;case it.SEARCH_PAGE:return fL;case it.SETTINGS_PAGE:return bL;case it.CLIENT_AREA_PAGE:return O1;case it.REMINDERS_PAGE:return iL;case it.RECORDINGS_CONFLICT_PAGE:case it.RECORDINGS_EXPIRE_PAGE:case it.RECORDINGS_PLANNED_PAGE:case it.RECORDINGS_RECORDED_PAGE:return nL;case it.CMS_PAGE:return $k;default:return}}filterValidSubLevels(e){let n=[];return e.forEach(r=>{r.pageType&&(r.items===void 0||r.items.length<=0)&&this.mayAddMenuItem(r.pageType,r.properties)&&n.push(r)}),n}createClientAreaItem(){return{tag:"client-area",pageType:it.CLIENT_AREA_PAGE,title:this.config.getTranslation(Hn.menu_clientarea),icon:Ze.CLIENTAREA_ICON}}defineRoutesForMenu(){let e=[];if(this.info.menu?.items&&this.info.menu.items.length!==0&&(this.info.menu.items.forEach(r=>{let o;if(r.pageType)o={path:r.tag,component:this.convertPageTypeToComponent(r.pageType),data:{pageType:r.pageType,pageId:r.pageId,properties:r.properties}},o&&this.isSearchPage(r.pageType)&&e.unshift({path:`${r.tag}/recordings/:seriesId`,component:rw}),o&&this.isRecordingPage(r.pageType)&&e.unshift({path:`${r.tag}/:seriesId`,component:this.convertPageTypeToComponent(r.pageType),data:{pageType:r.pageType,pageId:r.pageId,properties:r.properties}});else if(r.items&&r.items.length>0){let s=this.getTopLevelChildren(r);s.length!==0&&(o={path:r.tag,children:s})}else return;o&&(e.unshift(o),r.isDefault&&e.push({path:"**",redirectTo:r.tag}))}),!e.some(r=>r.path==="**"))){let r=e.findIndex(o=>!o.path?.includes(":"));r>=0&&e.push({path:"**",redirectTo:e[r].path})}let n=[{path:"main",loadComponent:()=>import("./chunk-XX2STWKR.js").then(r=>r.MainComponent),children:e,canActivate:[Gf]},{path:"custom/:pageId",loadComponent:()=>import("./chunk-7YOQQBV4.js").then(r=>r.CustomPageComponent),canActivate:[Gf]},{path:"recordings/:seriesId",loadComponent:()=>import("./chunk-C5PA3DFW.js").then(r=>r.SearchRecordingFolderComponent)},{path:"login",loadComponent:()=>import("./chunk-3CXQYGR7.js").then(r=>r.LoginDevicePageComponent)}];this.environment.detailFeature&&n.push({path:"detail",loadChildren:()=>import("./chunk-IT7XKQG2.js").then(r=>r.AtvDetailModule),canActivate:[Gf],outlet:"detailOverlay"},{path:"detail",loadChildren:()=>import("./chunk-IT7XKQG2.js").then(r=>r.AtvDetailModule),canActivate:[Gf]}),n.push({path:"**",redirectTo:"/main",pathMatch:"full"}),this.router.resetConfig(n)}getTopLevelChildren(e){let n=[];return e.items?.forEach(r=>{r.pageType&&(n.unshift({path:r.tag,component:this.convertPageTypeToComponent(r.pageType),data:{pageType:r.pageType,pageId:r.pageId,properties:this.mergeProperties(r.properties??[],e.properties??[])}}),this.isSearchPage(r.pageType)&&n.unshift({path:`${r.tag}/recordings/:seriesId`,component:rw}),this.isRecordingPage(r.pageType)&&n.unshift({path:`${r.tag}/:seriesId`,component:this.convertPageTypeToComponent(r.pageType),data:{pageType:r.pageType,pageId:r.pageId,properties:this.mergeProperties(r.properties??[],e.properties??[])}}),r.isDefault&&n.push({path:"**",redirectTo:r.tag}))}),n.some(r=>r.path==="**")||n.push({path:"**",redirectTo:n[n.length-1].path}),n}mergeProperties(...e){return[...new Set(e.flat())]}isSearchPage(e){return e===it.SEARCH_PAGE}isRecordingPage(e){return e===it.RECORDINGS_CONFLICT_PAGE||e===it.RECORDINGS_EXPIRE_PAGE||e===it.RECORDINGS_PLANNED_PAGE||e===it.RECORDINGS_RECORDED_PAGE}static{this.\u0275fac=function(n){return new(n||t)(h(sl),h(ne),h($y),h(ae),h(O),h(by),h(ft),h(SL))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var is=(()=>{class t{constructor(e,n,r,o,s,a,l,c,d,p,y,b,T,W,j,ee,De,tt,Se,ar,hs){this.messages=e,this.config=n,this.authorization=r,this.session=o,this.sessionInfo=s,this.log=a,this.bookmarkCache=l,this.favoriteCache=c,this.purchaseCache=d,this.reminderCache=p,this.stbCache=y,this.adult=b,this.menuManager=T,this.tokenCommunication=W,this.popup=j,this.router=ee,this.player=De,this.redirect=tt,this.dialog=Se,this.unload=ar,this.environment=hs,this._startupFinished=!1,this.handleBroadcastedSession=On=>{let th=this.authorization.setBroadcastedToken(On.sessionId);th&&this._startupFinished?this.loadSession(!0,On).subscribe({next:()=>{this.popup.reloadCurrentPageEvent.emit()}}):th&&(this.startupSession=On)},this.handleBroadcastedLogout=()=>{this.logoutUser(!0)},this.broadcastActiveSession=()=>{let On=this.sessionInfo.authorizedSession;On&&this.tokenCommunication.broadcastActiveSession(On)},this.tokenCommunication.setActiveSessionAction(this.handleBroadcastedSe
16ssion),this.tokenCommunication.setLogoutAction(this.handleBroadcastedLogout),this.tokenCommunication.setSessionRequestAction(this.broadcastActiveSession),this.unload.removeActiveTabEvent.subscribe(()=>{let On=this.authorization.getSessionToken();this.tokenCommunication.stopActiveTabBeacon(On?{accessToken:On}:void 0)}),this.tokenCommunication.startActiveTabBeacon()}set startupFinished(e){this._startupFinished=e}logoutUser(e){if(!e)this.session.endAuthorizedSession().pipe(z(()=>C(void 0))).subscribe({next:()=>{this.authorization.deleteTokens(),this.authorization.logout(!1)}});else{let n=this.authorization.deleteTokens();this.authorization.logout(),this.switchToAnonymousSession(n)}}switchToAnonymousSession(e){e?(this.player.isAvailable&&this.player.close(),this.loadAnonymousSession().subscribe({next:()=>{this.router.navigate([])},error:()=>{location.reload()}})):location.reload()}refreshToken(){return this.refreshSessionPromise===void 0&&(this.refreshSessionPromise=this.generateNewToken().then(e=>(this.refreshLoginPromise=new Promise(n=>{n(e)}),e)).catch(e=>{throw this.refreshLoginPromise=new Promise((n,r)=>{r(e)}),e}).then(()=>new Promise((e,n)=>{this.loadSession(!1).subscribe({next:()=>{this.refreshSessionPromise=void 0,e(this.authorization.getSessionToken())},error:()=>{this.refreshSessionPromise=void 0,n(new Error("Refresh failed"))}})})).catch(e=>{throw this.refreshSessionPromise=void 0,e})),this.refreshSessionPromise}generateNewToken(){return this.authorization.refreshToken().then(()=>this.authorization.getLoginToken()).catch(e=>{throw this.messages.showErrorMessage(this.config.getTranslation(ge.error_general)),e})}provideLoginToken(){return this.refreshLoginPromise??Promise.resolve(this.authorization.getLoginToken())}provideSessionToken(){return this.refreshSessionPromise??Promise.resolve(this.authorization.getSessionToken())}loadForUser(e){return new Re(n=>{if(location.href.startsWith(this.environment.oauthRedirectUri)){let r=new URL(location.href);this.authorization.handleOauthResult(r).subscribe({next:()=>{this.loadSession().subscribe({next:()=>{n.next({success:!0}),n.complete()},error:()=>{n.error()}})},error:o=>{n.error(o)}})}else this.redirect.save(e),this.authorization.startupLogin().subscribe({next:r=>{if(r.success){let o=this.startupSession;this.startupSession=void 0,this.loadSession(!0,o).subscribe({next:()=>{n.next({success:!0}),n.complete()},error:()=>{n.error()}})}else n.next(r),n.complete()},error:r=>
16{this.endSilentRefreshInProgress(),n.error(r)}})})}endSilentRefreshInProgress(){localStorage.removeItem(Te.refreshing_token)}selectLoginProvider(e,n=!0){let r=RE.config(e,n),s=this.dialog.open(RE,r).onClose.subscribe(()=>{s.unsubscribe()})}switchProfile(e){let n=this.sessionInfo.profileId;this.session.switchProfile(e).subscribe({next:()=>{this.logProfileSwitch(n),this.menuManager.loadNewMenu().subscribe({next:()=>{this.router.navigate(["/"])}})}})}updateExistingProfile(e){let n=this.sessionInfo.profileId;this.session.updateProfile(e),this.logCatalogSwitch(n),this.menuManager.loadNewMenu().subscribe({next:()=>{this.router.navigate([])}})}loadSession(e=!0,n){return new Re(r=>{if(this.authorization.isLoggedIn()||n){let o=this.sessionInfo.catalogId;this.session.loadAuthorizedSession(n).subscribe({next:()=>{n||this.broadcastActiveSession(),this.log.deviceInfoId=this.sessionInfo.deviceId,this.endSilentRefreshInProgress(),this.log.authenticateState(!0),this.prepareNewSession(),this.logCatalogSwitch(o),this.menuManager.loadNewMenu().subscribe({next:()=>{r.next(),r.complete()}})},error:s=>{(s instanceof b_||s instanceof Go)&&this.log.authenticateState(!1,s.status.toString(),new Yn(s)),this.messages.showErrorMessage(this.config.getTranslation(ge.error_authentication_failed)),this.endSilentRefresh
16InProgress();let a=this.authorization.deleteTokens();this.tokenCommunication.broadcastLogout(),a&&e?this.loadAnonymousSession().subscribe({next:()=>{r.next(),r.complete()},error:()=>{r.error()}}):r.error()}})}else this.loadAnonymousSession().subscribe({next:()=>{r.next(),r.complete()},error:()=>{r.error()}})})}loadAnonymousSession(){let e=this.sessionInfo.catalogId;return new Re(n=>{this.session.loadAnonymousSession().subscribe({next:()=>{this.log.deviceInfoId=this.sessionInfo.deviceId,this.prepareNewSession(),this.logCatalogSwitch(e),this.menuManager.loadNewMenu().subscribe({next:()=>{n.next(),n.complete()}})},error:()=>{n.error()}})})}switchAnonymousCatalog(e){let n=this.sessionInfo.catalogId;n!==e&&(this.session.switchCatalog(e),this.logCatalogSwitch(n),this.menuManager.loadNewMenu().subscribe({next:()=>{this.router.navigate([])}}))}logCatalogSwitch(e){let n=this.sessionInfo.catalogId;e!==""&&e!==n&&this.log.catalogSwitch(e,n)}logProfileSwitch(e){let n=this.sessionInfo.profileId;e!==""&&e!==n&&this.log.profileSwitch(e,n)}prepareNewSession(){this.resetCaches(),this.adult.stopAdultMode()}resetCaches(){this.bookmarkCache.clearForSession(),this.favoriteCache.clearForSession(),this.purchaseCache.clearForSession(),this.reminderCache.reset(),this.stbCache.clearCacheForAllDevices()}static{this.\u0275fac=function(n){return new(n||t)(h(_e),h(O),h(et),h(Xd),h(ne),h(ct),h(eu),h(ui),h(es),h(ns),h(xn),h($e),h(EL),h(ja),h(Ft),h(ft),h(ds),h(O_),h(Eu),h(Kd),h(ae))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ni=(()=>{class t{constructor(e){this.httpBackend=e,this.baseUrl="",this.auth=new y_,this.http=new on(this.httpBackend)}injectServices(e){this.auth=e.get(is),this.http=e.get(on)}delete(e){let n=this.convertHeaders(e.headers),r=this.addBaseUrl(e.url);return Cs(this.http.delete(r,{headers:n}))}get(e){let n=this.convertHeaders(e.headers),r=this.addBaseUrl(e.url);return Cs(this.http.get(r,{headers:n}))}getTokenProvider(){return this.auth}post(e){let n=this.convertHeaders(e.headers),r=this.addBaseUrl(e.url);return Cs(this.http.post(r,e.body,{headers:n}))}put(e){let n=this.convertHeaders(e.headers),r=this.addBaseUrl(e.url);return Cs(this.http.put(r,e.body,{headers:n}))}addBaseUrl(e){return!e.startsWith("http")&&this.baseUrl?`${this.baseUrl}${e}`:e}convertHeaders(e){return new Wo(new Headers(e))}postJson(e){let n=this.convertHeaders(e.headers),r=this.addBaseUrl(e.url);return Cs(this.http.post(r,e.body,{headers:n}))}static{this.\u0275fac=function(n){return new(n||t)(h(Ql))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var st=(()=>{class t{constructor(e,n){this.environment=e,this.angularApi=n}createBusiness(){let e={discoveryUrl:this.environment.discoveryUrl,platform:this.environment.platform,httpClient:this.angularApi,appVersion:co.version,fallbackConfig:EO};this.client=new Ph(e)}static{this.\u0275fac=function(n){return new(n||t)(h(ae),h(Ni))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var sl=(()=>{class t{constructor(e,n,r){this.business=e,this.http=n,this.environment=r,this.location=this.business.client.bootstrap.discovery.location}getMenu(e){let n=new mt().append("deviceType",this.environment.device).append("catalogId",e);return this.http.get(`${this.location}/cms/v1/menu`,{params:n})}getUrlMapping(e,n){let r=new mt().append("url",e).append("actionFilter",this.environment.actionFilter).append("catalogId",n);return this.http.get(`${this.location}/cms/v1/urlmapping/open`,{params:r})}getDynamicPage(e,n,r){let o=new mt().append("deviceType",this.environment.device).append("entitlementId",n).append("actionFilter",this.environment.actionFilter).append("adult",r);return this.http.get(`${this.location}/cms/v3/custom-page/${encodeURIComponent(e)}`,{params:o})}getArticle(e,n){let r=new mt().append("catalogId",n).append("platform",this.environment.platform).append("actionFilter",this.environment.actionFilter);return this.http.get(`${this.location}/cms/v1/article/${encodeURIComponent(e)}`,{params:r})}getContent(e,n,r,o,s,a,l,c){return e=v_.expandUrl(e,n,r,o,s,a,l,c,this.environment.device,this.environment.platform,this.environment.actionFilter),e?this.http.get(e).pipe(P(d=>pi(d))):C({type:nt.LANDSCAPE})}static{this.\u0275fac=function(n){return new(n||t)(h(st),h(on),h(ae))}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function H8(t,i){if(t&1&&M(0,"app-grid",1),t&2){let e=i.$implicit,n=_();S("grid",e)("allowedAdultMode",n.allowedAdultMode)}}var rw=(()=>{class t{constructor(e,n,r,o,s,a,l){this.activatedRoute=e,this.stbCache=n,this.adultService=r,this.sessionService=o,this.config=s,this.epgApi=a,this.contentProviderFactoryService=l,this.allowedAdultMode=Me.ANY,this.grids=[];let c=this.activatedRoute.snapshot.params;c.seriesId&&(this.showRecordingForSeries(c.seriesId),this.stbCache.stbRecordingChange.subscribe(()=>{this.showRecordingForSeries(c.seriesId)}))}goBack(){this.sessionService.goToPreviousRoute()}showRecordingForSeries(e){this.grids=[],this.stbCache.getRecordingsForSeries(e,this.adultService.showAdult(this.allowedAdultMode)).subscribe(n=>{let r=n;
16r&&r.length!==0&&this.epgApi.getSchedule(r[0].schedule).subscribe({next:o=>{let s=n&&o.series?o.series.text.title:"";this.createGrids(r,e,s)},error:()=>{this.createGrids(r,e,"")}})})}createGrids(e,n,r){this.convertToSeasonGroupedRecordingCard(e,n,r).forEach(s=>{this.grids.push(new yi({title:s.title,contentProvider:new Ru(this.contentProviderFactoryService,s.recordings),properties:this.config.getSettingArray(x.propertiesRecordingsRibbon,a=>oe[a],[oe.SHOWPROGRESS,oe.USE_BEST_SCHEDULE,oe.SHOW_SCHEDULE_INFO]),orientation:nt.LANDSCAPE}))})}convertToSeasonGroupedRecordingCard(e,n,r){let o=[];return e.sort((s,a)=>s.seasonOrdinal<a.seasonOrdinal?-1:s.seasonOrdinal>a.seasonOrdinal?1:s.programOrdinal<a.programOrdinal?-1:s.programOrdinal>a.programOrdinal||parseInt(s.plannedStart,10)>parseInt(a.plannedStart,10)?1:parseInt(s.plannedStart,10)<parseInt(a.plannedStart,10)?-1:0),e.forEach(s=>{if(n!==void 0&&s.series===n){let a=o.find(l=>l.seasonId===s.season);if(a)a.recordings.push(s);else{let l=s.seasonOrdinal&&s.seasonOrdinal!==0?(r?r+": ":"")+this.config.getTranslation(pe.detail_season)+" "+s.seasonOrdinal:r||this.config.getTranslation(pe.detail_season);o.push({title:l,seasonId:s.season,recordings:[s]})}}}),o}static{this.\u0275fac=function(n){return new(n||t)(f(_t),f(xn),f($e),f(Xd),f(O),f(dn),f(Ur))}}static{this.\u0275cmp=D({type:t,selectors:[["app-search-recording-folder"]],decls:3,vars:0,consts:[[1,"search-back",3,"click"],[3,"grid","allowedAdultMode"]],template:function(n,r){n&1&&(m(0,"div",0),A("click",function(){return r.goBack()}),g(),X(1,H8,1,2,"app-grid",1,se)),n&2&&(u(),K(r.grids))},dependencies:[fs],encapsulation:2})}}return t})();export{Re as a,ZL as b,re as c,C as d,P as e,_n as f,We as g,ke as h,z as i,Di as j,fe as k,we as l,w as m,Ri as n,le as o,h as p,U as q,Ts as r,LD as s,k as t,L as u,Ut as v,Yt as w,Y as x,V as y,bn as z,Cn as A,Tp as B,xC as C,Je as D,OC as E,u as F,f as G,Bo as H,D as I,Ji as J,Bt as K,Ee as L,Lg as M,qx as N,Bg as O,jo as P,Zm as Q,Jm as R,E as S,I as T,Vp as U,se as V,X as W,K as X,S as Y,m as Z,g as _,M as $,te as aa,J as ba,Qe as ca,Kx as da,B as ea,Gn as fa,A as ga,qe as ha,_ as ia,io as ja,ro as ka,Ia as la,Ve as ma,be as na,Ce as oa,Ho as pa,bt as qa,H as ra,$o as sa,N as ta,Q as ua,ce as va,Hg as wa,Rt as xa,Pt as ya,xt as za,pM as Aa,fj as Ba,hj as Ca,wa as Da,Wl as Ea,Cj as Fa,lt as Ga,Xe as Ha,Ps as Ia,Ct as Ja,xM as Ka,cbe as La,Pe as Ma,zl as Na,S_ as Oa,Rr as Pa,R3 as Qa,Bs as Ra,$Se as Sa,lG as Ta,mG as Ua,mt as Va,Go as Wa,on as Xa,yH as Ya,bH as Za,XO as _a,FE as $a,Ci as ab,_t as bb,lI as cb,ft as db,gv as eb,q5 as fb,Z5 as gb,J5 as hb,X5 as ib,Pd as jb,_e as kb,Me as lb,wL as mb,he as nb,TL as ob,Hr as pb,Cc as qb,DL as rb,AL as sb,nt as tb,q as ub,PL as vb,DT as wb,x as xb,Nn as yb,bh as zb,ji as Ab,Ye as Bb,ge as Cb,Hn as Db,pe as Eb,ni as Fb,OL as Gb,zd as Hb,rl as Ib,gt as Jb,Mr as Kb,Yo as Lb,Ke as Mb,co as Nb,ln as Ob,cd as Pb,uo as Qb,Dn as Rb,ae as Sb,me as Tb,nr as Ub,ot as Vb,$ as Wb,Le as Xb,x_ as Yb,Yn as Zb,Qt as _b,Zt as $b,Ua as ac,jO as bc,Or as cc,Ba as dc,Md as ec,O_ as fc,go as gc,et as hc,cn as ic,vo as jc,kr as kc,ne as lc,Xd as mc,Kd as nc,ct as oc,eu as pc,ui as qc,iu as rc,es as sc,dn as tc,ns as uc,o1 as vc,sn as wc,xn as xc,Ft as yc,$e as zc,Xt as Ac,it as Bc,oe as Cc,rn as Dc,sl as Ec,Gf as Fc,Zn as Gc,un as Hc,rs as Ic,Qa as Jc,UAe as Kc,j4 as Lc,Qs as Mc,jAe as Nc,os as Oc,N1 as Pc,Xa as Qc,Gv as Rc,zv as Sc,qv as Tc,V1 as Uc,B1 as Vc,U1 as Wc,hu as Xc,Ka as Yc,H1 as Zc,$1 as _c,G1 as $c,as as ad,gc as bd,En as cd,mu as dd,ty as ed,tn as fd,gu as gd,ny as hd,Y1 as id,_c as jd,Q1 as kd,Jn as ld,Su as md,Eu as nd,ds as od,Ok as pd,cFe as qd,ol as rd,d6 as sd,kk as td,Iu as ud,fn as vd,yy as wd,wy as xd,wu as yd,ew as zd,Tu as Ad,xy as Bd,Ur as Cd,$k as Dd,Ly as Ed,Vy as Fd,Ru as Gd,fL as Hd,rw as Id,$y as Jd,SL as Kd,is as Ld,Ni as Md,st as Nd,O as Od};
17/*! Bundled license information:
18
19@angular/core/fesm2022/_effect-chunk.mjs:
20@angular/core/fesm2022/_not_found-chunk.mjs:
21@angular/core/fesm2022/_untracked-chunk.mjs:
22@angular/core/fesm2022/primitives-signals.mjs:
23@angular/core/fesm2022/primitives-di.mjs:
24@angular/core/fesm2022/_effect-chunk2.mjs:
25@angular/core/fesm2022/_debug_node-chunk.mjs:
26@angular/core/fesm2022/_resource-chunk.mjs:
27@angular/core/fesm2022/core.mjs:
28@angular/common/fesm2022/_xhr-chunk.mjs:
29@angular/common/fesm2022/_platform_location-chunk.mjs:
30@angular/common/fesm2022/_module-chunk.mjs:
31@angular/common/fesm2022/http.mjs:
32@angular/common/fesm2022/_location-chunk.mjs:
33@angular/common/fesm2022/_common_module-chunk.mjs:
34@angular/common/fesm2022/common.mjs:
35@angular/platform-browser/fesm2022/_dom_renderer-chunk.mjs:
36@angular/platform-browser/fesm2022/_browser-chunk.mjs:
37@angular/platform-browser/fesm2022/platform-browser.mjs:
38@angular/router/fesm2022/_router-chunk.mjs:
39@angular/router/fesm2022/_router_module-chunk.mjs:
40@angular/router/fesm2022/router.mjs:
41@angular/forms/fesm2022/forms.mjs:
42@angular/core/fesm2022/rxjs-interop.mjs:
43  (**
44   * @license Angular v21.2.8
45   * (c) 2010-2026 Google LLC. https://angular.dev/
46   * License: MIT
47   *)
48*/

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.