1"use strict";(self.webpackChunkthe_union_gk=self.webpackChunkthe_union_gk||[]).push([[8903],{72856:(Ie,xt,b)=>{b.d(xt,{Z:()=>D});var r=b(8239),N=b(88692),V=b(23854),G=b(42384),X=b(99558),J=b(84539),mt=b(38023),O=b(13528),U=b(59735),$=b(30404),vt=b(22274),t=b(67030),it=b(59302),st=b(82104),oe=b(37524),ft=b.n(oe),Lt=b(57311),_t=b(56257),rt=b(98508),St=b(36748),d=b(49371),ut=b(58217),Ct=b(26877),ie=b(16738),ne=b.n(ie),Wt=b(67246),Qt=b(25874),Ft=b(91205),Nt=b(92110),It=b(71823),Rt=b(86370),at=b(13773),c=b(64537),lt=b(75728),W=b(61354),se=b(76553),qt=b(88489),Bt=b(21306),gt=b(17427),Et=b(16);const l=["videoPlayer"],bt=["videoElement"],nt=["unlockModal"];function yt(v,L){1&v&&(c.TgZ(0,"div",33),c._UZ(1,"app-loader"),c.qZA())}function ct(v,L){1&v&&c._UZ(0,"div",34)}function Q(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"a",38),c.NdJ("click",function(F){c.CHM(f);const y=c.oxw(2);return c.KtG(y.closeModal(F))}),c._UZ(1,"em",39),c.qZA()}}function Mt(v,L){if(1&v&&c._UZ(0,"div",42),2&v){const f=c.oxw(3);c.Q6J("innerHTML",f.currentVideo.description,c.oJD)}}function Tt(v,L){if(1&v&&(c.ynx(0),c.TgZ(1,"div",40),c._uU(2),c.qZA(),c.YNc(3,Mt,1,1,"div",41),c.BQk()),2&v){const f=c.oxw(2);c.xp6(2),c.Oqu(null==f.currentVideo?null:f.currentVideo.videoTitle),c.xp6(1),c.Q6J("ngIf",null==f.currentVideo?null:f.currentVideo.description)}}function kt(v,L){if(1&v&&(c.TgZ(0,"div",35),c.YNc(1,Q,2,0,"a",36),c.YNc(2,Tt,4,2,"ng-container",37),c.qZA()),2&v){const f=c.oxw();c.xp6(1),c.Q6J("ngIf",f.showControlsOnMove||!f.isPlaying),c.xp6(1),c.Q6J("ngIf",!f.isPlaying&&f.currentVideo)}}function Yt(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"app-button",51),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.purchaseVideo(F.PURCHASE_TYPE.INDIVIDUAL))}),c.qZA()}if(2&v){const f=c.oxw(2);c.Q6J("btnField",f.individualPurchaseBtnField)}}function Ht(v,L){if(1&v&&(c.TgZ(0,"div",52),c._uU(1),c.qZA()),2&v){const f=c.oxw(2);c.xp6(1),c.hij(" ",f.MUSIC_PLAYER_CONST.OR," ")}}function re(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"app-button",51),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.purchaseVideo(F.PURCHASE_TYPE.SUBSCRIPTION))}),c.qZA()}if(2&v){const f=c.oxw(2);c.Q6J("btnField",f.subscriptionPurchaseBtnField)}}function wt(v,L){if(1&v&&(c.TgZ(0,"div",52),c._uU(1),c.qZA()),2&v){const f=c.oxw(2);c.xp6(1),c.hij(" ",f.MUSIC_PLAYER_CONST.OR," ")}}function At(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"app-button",51),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.purchaseVideo(F.PURCHASE_TYPE.NFT))}),c.qZA()}if(2&v){const f=c.oxw(2);c.Q6J("btnField",f.nftPurchaseBtnField)}}function ae(v,L){if(1&v&&(c.TgZ(0,"div",52),c._uU(1),c.qZA()),2&v){const f=c.oxw(2);c.xp6(1),c.hij(" ",f.MUSIC_PLAYER_CONST.OR," ")}}function le(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",53),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.openUnlockCurrentVideoWithPoints())}),c.TgZ(1,"span",54),c._uU(2),c.qZA(),c._UZ(3,"img",55),c.TgZ(4,"span",56),c._uU(5),c.ALo(6,"number"),c.qZA()()}if(2&v){const f=c.oxw(2);c.Q6J("disabled",(null==f.currentVideo||null==f.currentVideo.unlocked_through?null:f.currentVideo.unlocked_through.hasOwnProperty("is_outer_unlocked"))&&!(null!=f.currentVideo&&null!=f.currentVideo.unlocked_through&&f.currentVideo.unlocked_through.is_outer_unlocked)),c.xp6(2),c.Oqu(f.LOCKED_POST_MESSAGES.UNLOCK_POST_LOYALTY_PREFIX),c.xp6(1),c.uIk("alt",f.LOYALTY_POINTS_TEXT.COIN_ALT),c.xp6(2),c.AsE(" ",c.lcZ(6,5,null==f.lockedThrough||null==f.lockedThrough.individual?null:f.lockedThrough.individual.loyalty_points)," ",f.LOYALTY_POINTS_AMOUNT_SUFFIX," ")}}function ce(v,L){if(1&v&&(c.TgZ(0,"div",52),c._uU(1),c.qZA()),2&v){const f=c.oxw(3);c.xp6(1),c.hij(" ",f.MUSIC_PLAYER_CONST.OR," ")}}function de(v,L){if(1&v){const f=c.EpF();c.ynx(0),c.YNc(1,ce,2,1,"div",47),c.TgZ(2,"app-button",51),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.purchaseMasterData())}),c.qZA(),c.BQk()}if(2&v){const f=c.oxw(2);c.xp6(1),c.Q6J("ngIf",!f.isOnlyLockedByAlbum),c.xp6(1),c.Q6J("btnField",f.masterDataPurchaseBtnField)}}function pe(v,L){if(1&v&&c._UZ(0,"app-unlock-content",57,58),2&v){const f=c.oxw(2);c.Q6J("contentId",null==f.currentVideo?null:f.currentVideo.sk)("lockDetail
1s",f.currentVideo)("userProfile",f.userProfile)("userSubscriptionList",f.userSubscriptionList)("contentType",f.paymentForType.MUSIC_PORTFOLIO)("headerType",f.PORTFOLIO_TITLE_HEADING_MAP[f.portfolioType])("userId",null==f.userProfile?null:f.userProfile.email)("isLocked",!(null!=f.currentVideo&&null!=f.currentVideo.unlocked_through&&f.currentVideo.unlocked_through.is_outer_unlocked))}}function ue(v,L){if(1&v&&(c.TgZ(0,"div",43)(1,"div",44)(2,"div",45),c.YNc(3,Yt,1,1,"app-button",46),c.YNc(4,Ht,2,1,"div",47),c.YNc(5,re,1,1,"app-button",46),c.YNc(6,wt,2,1,"div",47),c.YNc(7,At,1,1,"app-button",46),c.YNc(8,ae,2,1,"div",47),c.YNc(9,le,7,7,"button",48),c.YNc(10,de,3,2,"ng-container",37),c.qZA(),c.TgZ(11,"div",49),c.YNc(12,pe,2,8,"app-unlock-content",50),c.qZA()()()),2&v){const f=c.oxw();c.xp6(3),c.Q6J("ngIf",!f.isOnlyLockedByAlbum&&(null==f.lockedThrough||null==f.lockedThrough.individual?null:f.lockedThrough.individual.individual_price)),c.xp6(1),c.Q6J("ngIf",f.showOrBeforeSubscription),c.xp6(1),c.Q6J("ngIf",!f.isOnlyLockedByAlbum&&(null==f.lockedThrough||null==f.lockedThrough.subscription?null:f.lockedThrough.subscription.length)),c.xp6(1),c.Q6J("ngIf",f.showOrBeforeNft),c.xp6(1),c.Q6J("ngIf",!f.isOnlyLockedByAlbum&&(null==f.lockedThrough||null==f.lockedThrough.nft?null:f.lockedThrough.nft.length)),c.xp6(1),c.Q6J("ngIf",f.showOrBeforeLoyaltyVideoTrack),c.xp6(1),c.Q6J("ngIf",!f.isOnlyLockedByAlbum&&(null==f.lockedThrough||null==f.lockedThrough.individual?null:f.lockedThrough.individual.loyalty_points)&&(null==f.authService?null:f.authService.isWhiteLabelWebsite())),c.xp6(1),c.Q6J("ngIf",f.masterDataLockThrough),c.xp6(2),c.Q6J("ngIf",f.currentVideo)}}function ge(v,L){if(1&v&&(c.ynx(0),c._uU(1),c.BQk()),2&v){const f=c.oxw(2);c.xp6(1),c.hij(" ",null==f.currentVideo?null:f.currentVideo.albumTitle," ")}}function me(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"div",67)(1,"button",68),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.onShareClick())}),c._UZ(2,"em",69),c.qZA()()}}function _e(v,L){if(1&v&&(c.ynx(0),c._uU(1),c.BQk()),2&v){const f=c.oxw(2);c.xp6(1),c.AsE(" ",f.isReleaseYearType?f.MUSIC_PLAYER_CONST.RELEASED_YEAR:f.MUSIC_PLAYER_CONST.RELEASED,": ",f.currentVideo.dateOfRelease," ")}}function he(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"p",70),c.NdJ("click",function(F){c.CHM(f);const y=c.oxw(2);return F.stopPropagation(),c.KtG(y.seeLessMore())}),c.ALo(1,"bioFormat"),c.ALo(2,"contentLengthHandler"),c.qZA()}if(2&v){const f=c.oxw(2);c.Q6J("innerHTML",c.lcZ(1,1,c.Dn7(2,3,f.currentVideo,f.descriptionMaxLength,3)),c.oJD)}}function fe(v,L){if(1&v&&(c.TgZ(0,"div",59)(1,"div",60)(2,"span",61),c.YNc(3,ge,2,1,"ng-container",37),c.qZA(),c.YNc(4,me,3,0,"div",62),c.qZA(),c.TgZ(5,"div",63)(6,"span",64),c._uU(7),c.qZA(),c.TgZ(8,"span",65),c.YNc(9,_e,2,2,"ng-container",37),c.qZA()(),c.YNc(10,he,3,7,"p",66),c.qZA()),2&v){const f=c.oxw();c.xp6(3),c.Q6J("ngIf",null==f.currentVideo?null:f.currentVideo.albumTitle),c.xp6(1),c.Q6J("ngIf",!f.hideShare&&!f.isMobileOrAndroidDevice()),c.xp6(3),c.hij(" ",null==f.currentVideo?null:f.currentVideo.videoTitle," "),c.xp6(2),c.Q6J("ngIf",null==f.currentVideo?null:f.currentVideo.dateOfRelease),c.xp6(1),c.Q6J("ngIf",null==f.currentVideo?null:f.currentVideo.description)}}function Gt(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",79),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.playPreviousVideo())}),c._UZ(1,"em",80),c.qZA()}if(2&v){const f=c.oxw(2);c.Udp("color",f.buttonColor),c.ekj("disabled",!f.hasPreviousVideo()),c.Q6J("disabled",!f.hasPreviousVideo())}}function Ot(v,L){1&v&&(c.TgZ(0,"span",81),c._UZ(1,"em",82),c.qZA())}function Ce(v,L){1&v&&(c.TgZ(0,"span",83),c._UZ(1,"em",84),c.qZA())}function Ut(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",79),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.playNextVideo())}),c._UZ(1,"em",85),c.qZA()}if(2&v){const f=c.oxw(2);c.Udp("color",f.buttonColor),c.ekj("disabled",!f.hasNextVideo()),c.Q6J("disabled",!f.hasNextVideo()),c.uIk("aria-label","Next video")}}function be(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"div",71),c.YNc(1,Gt,2,5,"button",25),c.TgZ(2,"button",72),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.rewind15())}),c._UZ(3,"em",73),c.qZA(),c.TgZ(4,"button",74),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.togglePlayPause())}),c.YNc(5,Ot,2,0,"span",75),c.YNc(6,Ce,2,0,"span",76),c.qZA(),c.TgZ(7,"button",77),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.fastForward15())}),c._UZ(8,"em",78),c.qZA(),c.YNc(9,Ut,2,6,"button",25),c.qZA()}if(2&v){const f=c.oxw();c.xp6(1),c.Q6J("ngIf",f.videoList.length),c.xp6(1),c.Udp("color",f.buttonColor),c.Q6J("disabled",f.isLocked&&!(null!=f.currentVideo&&f.currentVideo.canPreview)),c.xp6(2),c.Q6J("disabled",f.isLocked&&!(null!=f.currentVideo&&f.currentVideo.canPreview)),c.xp6(1),c.Q6J("ngIf",!f.isPlaying),c.xp6(1),c.Q6J("ngIf",f.isPlaying),c.xp6(1),c.Udp("color",f.buttonColor),c.Q6J("disabled",f.isLocked&&!(null!=f.currentVideo&&f.currentVideo.canPreview)),c.xp6(2),c.Q6J("ngIf",f.videoList.length)}}function zt(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",88),c.NdJ("click",function(){const y=c.CHM(f).$implicit,j=c.oxw(2);return c.KtG(j.setPlaybackRate(y))}),c._uU(1),c.qZA()}if(2&v){const f=L.$implicit,T=c.oxw(2);c.ekj("active",f===T.playbackRate),c.xp6(1),c.hij(" ",f,"x ")}}function Pe(v,L){if(1&v&&(c.TgZ(0,"div",86),c.YNc(1,zt,2,3,"button",87),c.qZA()),2&v){const f=c.oxw();c.xp6(1),c.Q6J("ngForOf",f.playbackRates)}}function Dt(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",79),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.downloadVideo())}),c._UZ(1,"em",89),c.qZA()}if(2&v){const f=c.oxw();c.Udp("color",f.buttonColor),c.Q6J("disabled",f.isLocked)}}function Y(v,L){1&v&&c._UZ(0,"em",95)}function w(v,L){1&v&&c._UZ(0,"em",96)}function Kt(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"div",97)(1,"input",98),c.NdJ("input",function(F){c.CHM(f);const y=c.oxw(2);return c.KtG(y.onVolumeChange(F))})("click",function(F){return F.stopPropagation()}),c.qZA()()}if(2&v){const f=c.oxw(2);c.xp6(1),c.Q6J("min",f.Application.ZERO)("max",f.Application.ONE)("step",f.Application.ZERO_POINT_ZERO_ONE)("value",f.volume)}}function Zt(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"div",90)(1,"button",91),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.toggleVolumeSlider())})("contextmenu",function(F){return c.CHM(f),c.oxw().toggleMute(),c.KtG(F.preventDefault())}),c.YNc(2,Y,1,0,"em",92),c.YNc(3,w,1,0,"em",93),c.qZA(),c.YNc(4,Kt,2,4,"div",94),c.qZA()}if(2&v){const f=c.oxw();c.xp6(1),c.Udp("color",f.buttonColor),c.xp6(1),c.Q6J("ngIf",!f.isMuted&&f.volume>f.Application.ZERO),c.xp6(1),c.Q6J("ngIf",f.isMuted||f.volume===f.Application.ZERO),c.xp6(1),c.Q6J("ngIf",f.showVolumeSlider)}}function jt(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",79),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.playPreviousVideo())}),c._UZ(1,"em",80),c.qZA()}if(2&v){const f=c.oxw(2);c.Udp("color",f.buttonColor),c.ekj("disabled",!f.hasPreviousVideo()),c.Q6J("disabled",!f.hasPreviousVideo())}}function Oe(v,L){1&v&&(c.TgZ(0,"span",81),c._UZ(1,"em",82),c.qZA())}function B(v,L){1&v&&(c.TgZ(0,"span",83),c._UZ(1,"em",84),c.qZA())}function R(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",79),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.playNextVideo())}),c._UZ(1,"em",85),c.qZA()}if(2&v){const f=c.oxw(2);c.Udp("color",f.buttonColor),c.ekj("disabled",!f.hasNextVideo()),c.Q6J("disabled",!f.hasNextVideo())}}function Z(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",88),c.NdJ("click",function(){const y=c.CHM(f).$implicit,j=c.oxw(3);return c.KtG(j.setPlaybackRate(y))}),c._uU(1),c.qZA()}if(2&v){const f=L.$implicit,T=c.oxw(3);c.ekj("active",f===T.playbackRate),c.xp6(1),c.hij(" ",f,"x ")}}function g(v,L){if(1&v&&(c.TgZ(0,"div",86),c.YNc(1,Z,2,3,"button",87),c.qZA()),2&v){const f=c.oxw(2);c.xp6(1),c.Q6J("ngForOf",f.playbackRates)}}function k(v,L){1&v&&c._UZ(0,"em",95)}function x(v,L){1&v&&c._UZ(0,"em",96)}function C(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"div",97)(1,"input",98),c.NdJ("input",function(F){c.CHM(f);const y=c.oxw(3);return c.KtG(y.onVolumeChange(F))})("click",function(F){return F.stopPropagation()}),c.qZA()()}if(2&v){const f=c.oxw(3);c.xp6(1),c.Q6J("min",f.Application.ZERO)("max",f.Application.ONE)("step",f.Application.ZERO_POINT_ZERO_ONE)("value",f.volume)}}function H(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"div",90)(1,"button",91),c.NdJ("click",function(){c.CHM(f);const F=c.oxw(2);return c.KtG(F.toggleVolumeSlider())})("contextmenu",function(F){return c.CHM(f),c.oxw(2).toggleMute(),c.KtG(F.preventDefault())}),c.YNc(2,k,1,0,"em",92),c.YNc(3,x,1,0,"em",93),c.qZA(),c.YNc(4,C,2,4,"div",94),c.qZA()}if(2&v){const f=c.oxw(2);c.xp6(1),c.Udp("color",f.buttonColor),c.xp6(1),c.Q6J("ngIf",!f.isMuted&&f.volume>f.Application.ZERO),c.xp6(1),c.Q6J("ngIf",f.isMuted||f.volume===f.Application.ZERO),c.xp6(1),c.Q6J("ngIf",f.showVolumeSlider)}}function P(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"div",99)(1,"div",100)(2,"div",14)(3,"span"),c._uU(4),c.qZA()(),c.TgZ(5,"div",101)(6,"div",15),c.NdJ("click",function(F){c.CHM(f);const y=c.oxw();return c.KtG(y.seek(F))})("mousedown",function(F){c.CHM(f);const y=c.oxw();return c.KtG(y.onProgressBarMouseDown(F))})("touchstart",function(F){c.CHM(f);const y=c.oxw();return c.KtG(y.onProgressBarMouseDown(F))}),c._UZ(7,"div",16)(8,"div",17),c.qZA()(),c.TgZ(9,"span",19),c._uU(10),c.qZA()(),c.TgZ(11,"div",102)(12,"div",71),c.YNc(13,jt,2,5,"button",25),c.TgZ(14,"button",72),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.rewind15())}),c._UZ(15,"em",73),c.qZA(),c.TgZ(16,"button",74),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.togglePlayPause())}),c.YNc(17,Oe,2,0,"span",75),c.YNc(18,B,2,0,"span",76),c.qZA(),c.TgZ(19,"button",77),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.fastForward15())}),c._UZ(20,"em",78),c.qZA(),c.YNc(21,R,2,5,"button",25),c.qZA(),c.TgZ(22,"div",18)(23,"div",20)(24,"button",21),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.toggleSpeedMenu())}),c.TgZ(25,"span",22),c._uU(26),c.qZA(),c._UZ(27,"em",23),c.qZA(),c.YNc(28,g,2,1,"div",24),c.qZA(),c.YNc(29,H,5,5,"div",26),c.TgZ(30,"button",27),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.toggleFullscreen())}),c._UZ(31,"em",28),c.qZA()()()()}if(2&v){const f=c.oxw();c.xp6(4),c.Oqu(f.formatTime(f.currentTime)),c.xp6(2),c.ekj("disabled",f.isLocked&&!(null!=f.currentVideo&&f.currentVideo.canPreview))("dragging",f.isDragging)("switching-video",f.isSwitchingVideo),c.xp6(1),c.Udp("background-color",f.progressBarColor)("width",f.getProgressPercent(),"%"),c.xp6(1),c.Udp("left",f.getProgressPercent(),"%")("background-color",f.progressBarColor),c.xp6(2),c.Oqu(f.formatTime(f.duration)),c.xp6(3),c.Q6J("ngIf",f.videoList.length),c.xp6(1),c.Udp("color",f.buttonColor),c.Q6J("disabled",f.isLocked&&!(null!=f.currentVideo&&f.currentVideo.canPreview)),c.xp6(2),c.Q6J("disabled",f.isLocked&&!(null!=f.currentVideo&&f.currentVideo.canPreview)),c.xp6(1),c.Q6J("ngIf",!f.isPlaying),c.xp6(1),c.Q6J("ngIf",f.isPlaying),c.xp6(1),c.Udp("color",f.buttonColor),c.Q6J("disabled",f.isLocked&&!(null!=f.currentVideo&&f.currentVideo.canPreview)),c.xp6(2),c.Q6J("ngIf",f.videoList.length),c.xp6(3),c.Udp("color",f.buttonColor),c.xp6(2),c.hij("",f.playbackRate,"x"),c.xp6(2),c.Q6J("ngIf",f.showSpeedMenu),c.xp6(1),c.Q6J("ngIf",!f.isMobileOrAndroidDevice()),c.xp6(1),c.Udp("color",f.buttonColor)}}
1function S(v,L){if(1&v){const f=c.EpF();c.TgZ(0,"button",103),c.NdJ("click",function(){c.CHM(f);const F=c.oxw();return c.KtG(F.closeModal())}),c.TgZ(1,"span"),c._uU(2,"\u2715"),c.qZA()()}if(2&v){const f=c.oxw();c.Udp("color",f.closeButtonColor)}}let D=(()=>{const L=class{getVideoOptions(){const T="string"==typeof this.videoUrl?this.videoUrl.replace("+","%2B"):this.videoUrl;return{sources:[{src:T,type:(0,rt.kc)(T)}],fluid:!0,autoplay:!0,muted:!1,controls:!1,aspectRatio:"16:9"}}constructor(T,F,y,j,ot,Jt,ve,Je,We,Qe,qe,Re){this.modalService=T,this.cs=F,this.modalRef=y,this.mediaService=j,this.authService=ot,this.apiCallService=Jt,this.cdr=ve,this.portfolioUnlockService=Je,this.downloadService=We,this.currencyPipe=Qe,this.shareDialogService=qe,this.portfolioRecordPlayService=Re,this.videoUrl="",this.posterUrl="",this.buttonColor=rt.DM.DEFAULT_BUTTON_COLOR,this.closeButtonColor=rt.DM.DEFAULT_CLOSE_BUTTON_COLOR,this.progressBarColor=rt.DM.DEFAULT_PROGRESS_BAR_COLOR,this.userSubscriptionList=[],this.pUserSubscriptionList=[],this.videoList=[],this.currentIndex=U.Mx.ZERO,this.isPlaying=!1,this.currentTime=U.Mx.ZERO,this.duration=U.Mx.ZERO,this.volume=U.Mx.ONE,this.isMuted=!1,this.playbackRate=U.Mx.ONE,this.playbackRates=[.5,.75,1,1.25,1.5,2],this.showSpeedMenu=!1,this.showVolumeSlider=!1,this.isFullscreen=!1,this.showControlsOnMove=!1,this.rafId=null,this.destroy$=new mt.x,this.hideControlsTimer=null,this.orientationLocked=!1,this.isDragging=!1,this.dragPercent=U.Mx.ZERO,this.justFinishedDragging=!1,this.targetSeekTime=U.Mx.ZERO,this.isSwitchingVideo=!1,this.isOnlyLockedByAlbum=!1,this.isLocked=!1,this.lockedThrough=null,this.userProfile=null,this.videoId="",this.videoSK="",this.isMyProfile=!1,this.initialState=null,this.paymentForType=J.Vw,this.currentVideo=null,this.Application=U.Mx,this.isLoadingVideo=!1,this.portfolioType=J.fD.TYPE.VIDEO,this.PORTFOLIO_CONSTS=J.fD,this.descriptionMaxLength=U.Mx.FIVE_HUNDRED,this.masterData=null,this.PURCHASE_MASTER_DATA_TEXT=rt.dC,this.MUSIC_PLAYER_CONST=rt.UU,this.selectedItem=null,this.unlockModalHeader="",this.isReleaseYearType=!1,this.playSessionId=null,this.playLastRecordedTime=U.Mx.ZERO,this.PURCHASE_TYPE=rt.Im,this.PORTFOLIO_TITLE_HEADING_MAP=Nt.JX,this.currentVideoMode=null,this.LOCKED_POST_MESSAGES=Rt.mA,this.LOYALTY_POINTS_TEXT=at.ZZ,this.LOYALTY_POINTS_AMOUNT_SUFFIX=at.ZZ.POINTS_SUFFIX,this.portfolioTypeId="",this.portfolioCreatorUserName="",this.isIndividualPortfolio=!1,this.hideShare=!1,this.onProgressBarMouseMove=Ee=>{this.isDragging&&(Ee.preventDefault(),this.updateDragPosition(Ee))},this.onProgressBarMouseUp=Ee=>{if(this.isDragging){if(Ee.preventDefault(),this.player&&this.duration){const Te=this.dragPercent/U.Mx.ONE_HUNDRED*this.duration,$t=this.player.currentTime();this.playSessionId&&1e3*($t-this.playLastRecordedTime)>0?this.sendRecordPlay($t,Te):this.playLastRecordedTime=Te,this.targetSeekTime=Te,this.currentTime=Te,this.player.currentTime(Te)}this.isDragging=!1,this.justFinishedDragging=!0,this.cs.isBrowser&&(document.removeEventListener("mousemove",this.onProgressBarMouseMove),document.removeEventListener("mouseup",this.onProgressBarMouseUp),document.removeEventListener("touchmove",this.onProgressBarMouseMove),document.removeEventListener("touchend",this.onProgressBarMouseUp)),setTimeout(()=>{this.justFinishedDragging&&(this.justFinishedDragging=!1,this.targetSeekTime=U.Mx.ZERO)},U.Mx.INTERVAL_TWO_THOUSAND)}}}ngOnInit(){if(this.cs.isBrowser){const T=this.modalService?.config?.initialState;if(this.resetState(),this.loadSavedVolume(),this.mediaService.musicPlayerStarted$.pipe((0,O.R)(this.destroy$)).subscribe(()=>{this.player&&this.isPlaying&&!this.isMuted&&this.player.muted(!0)}),T&&(this.isLocked=T.isLocked||!1,this.lockedThrough=T.lock_through||null,this.userProfile=T.userProfile||null,this.portfolioType=T.portfolioType||J.fD.TYPE.VIDEO,this.isMyProfile=T.isMyProfile||!1,this.onPurchaseSubscription=T.onPurchaseSubscription,this.onPurchaseIndividual=T.onPurchaseIndividual,this.onPurchaseNft=T.onPurchaseNft,this.onPurchaseLoyaltyPoints=T.onPurchaseLoyaltyPoints,this.pUserSubscriptionList=T.pUserSubscriptionList||[],this.initialState=T,this.userSubscriptionList=T.userSubscriptionList||[],this.masterData=T.masterData||null,this.portfolioCreatorUserName=T.portfolioCreatorUserName||this.userProfile?.user_name||"",this.portfolioTypeId=T.portfolioTypeId||"",this.isIndividualPortfolio=T.isIndividualPortfolio??!1,this.hideShare=T.hideShare??!1,T.videoList&&T.videoList.length>U.Mx.ZERO)){const F=void 0!==T.currentIndex?T.currentIndex:U.Mx.ZERO,y=F<T.videoList.length?T.videoList[F]:null;if(this.videoList=T.videoList.filter(j=>j.showTime&&j.videoUrl),this.videoList.length>U.Mx.ZERO)if(y&&y.showTime){const j=this.videoList.findIndex(ot=>ot===y||ot.videoUrl===y.videoUrl&&ot.videoTitle===y.videoTitle);this.currentIndex=j>=U.Mx.ZERO?j:U.Mx.ZERO}else this.currentIndex=U.Mx.ZERO;else this.currentIndex=U.Mx.ZERO;this.loadCurrentVideo()}this.cs.isWhiteLabelWeb&&(this.progressBarColor="var(--configThemeColor)")}}ngAfterViewInit(){setTimeout(()=>{if(this.videoPlayer?.player)this.player=this.videoPlayer.player;else if(this.videoPlayer){const T=this.videoPlayer.player;T&&(this.player=T)}this.hideDefaultControls(),this.setupPlayerEvents()},U.Mx.ONE_HUNDRED)}get isEngagable(){return this.currentVideo?.pk&&this.currentVideo?.sk&&!this.isMyProfile}
1hideDefaultControls(){if(this.player&&this.cs.isBrowser&&this.player.el()){[".vjs-control-bar",".vjs-big-play-button",".vjs-loading-spinner"].forEach(j=>{const ot=this.player.el().querySelector(j);ot&&(ot.style.display="none")});const y=this.player;y.controlBar&&y.controlBar.hide(),y.bigPlayButton&&y.bigPlayButton.hide()}}setupPlayerEvents(){this.player&&(this.player.off("loadeddata"),this.player.off("loadstart"),this.player.off("error"),this.player.off("timeupdate"),this.player.off("play"),this.player.off("pause"),this.player.off("ended"),this.player.off("volumechange"),this.player.off("ratechange"),this.player.off("seeked"),this.player.off("seeking"),this.player.off("canplay"),this.player.muted(!1),this.player.volume(this.volume),this.player.on("loadeddata",()=>{this.duration=Math.floor(this.player.duration()),this.isLoadingVideo=!1}),this.player.on("loadstart",()=>{this.isLoadingVideo=!0}),this.player.on("error",()=>{this.isLoadingVideo=!1}),this.player.on("seeking",()=>{this.isLoadingVideo=!0}),this.player.on("seeked",()=>{this.isLoadingVideo=!1}),this.player.on("canplay",()=>{!this.isDragging&&!this.justFinishedDragging&&(this.isLoadingVideo=!1)}),this.player.on("timeupdate",()=>{null!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{const T=this.player.currentTime();this.currentTime=T,this.justFinishedDragging&&this.targetSeekTime>U.Mx.ZERO&&Math.abs(T-this.targetSeekTime)<=U.Mx.ZERO_POINT_FIVE&&(this.justFinishedDragging=!1,this.targetSeekTime=U.Mx.ZERO),this.rafId=null}),"mediaSession"in navigator&&(navigator.mediaSession.metadata=new MediaMetadata({title:this.currentVideo?.videoTitle||"",artist:"",album:this.currentVideo?.albumTitle||"",artwork:[{src:this.currentVideo?.posterUrl,sizes:"96x96",type:"image/webp"}]}))}),this.player.on("play",()=>{this.ensurePlaySession(),this.isPlaying=!0,this.mediaService.notifyVideoUnmuted()}),this.player.on("pause",()=>{if(this.playSessionId){const T=this.player.currentTime();this.sendRecordPlay(T)}this.isPlaying=!1}),this.player.on("ended",()=>{if(this.playSessionId){const T=this.player.currentTime();this.sendRecordPlay(T)}this.hasNextVideo()&&!this.isLocked&&setTimeout(()=>{this.playNextVideo(!0)},U.Mx.INTERVAL_TWO_THOUSAND)}),this.player.on("volumechange",()=>{const T=this.isMuted;this.volume=this.player.volume(),this.isMuted=this.player.muted(),T&&!this.isMuted&&this.mediaService.notifyVideoUnmuted()}),this.player.on("ratechange",()=>{this.playbackRate=this.player.playbackRate()}))}togglePlayPause(){this.isLocked&&!this.currentVideo?.canPreview||this.player&&(this.isPlaying?this.player.pause():this.player.play())}onVideoClick(T){if(this.isLocked&&!this.currentVideo?.canPreview)return;const F=T.target;F.closest(".video-controls")||F.closest(".control-btn")||F.closest(".progress-bar-container")||F.closest(".close-button")||F.closest(".subscription-option")||this.togglePlayPause()}rewind15(){if((!this.isLocked||this.currentVideo?.canPreview)&&this.player){const T=Math.max(U.Mx.ZERO,this.currentTime-U.Mx.FIFTEEN);this.player.currentTime(T)}}fastForward15(){if((!this.isLocked||this.currentVideo?.canPreview)&&this.player){const T=Math.min(this.duration,this.currentTime+U.Mx.FIFTEEN);this.player.currentTime(T)}}playPreviousVideo(){this.hasPreviousVideo()&&(this.sendRecordPlayForCurrentVideo(),this.isSwitchingVideo=!0,this.currentIndex--,this.currentVideo=null,setTimeout(()=>{this.loadCurrentVideo()},U.Mx.TEN))}playNextVideo(T=!1){this.hasNextVideo()&&(T||this.sendRecordPlayForCurrentVideo(),this.isSwitchingVideo=!0,this.currentIndex++,this.currentVideo=null,setTimeout(()=>{this.loadCurrentVideo()},U.Mx.TEN))}hasPreviousVideo(){return this.videoList.length>U.Mx.ZERO&&this.currentIndex>U.Mx.ZERO}hasNextVideo(){return this.videoList.length>U.Mx.ZERO&&this.currentIndex<this.videoList.length-U.Mx.ONE}get showLockedContent(){return!(!this.currentVideo||this.isLoadingVideo||(this.currentVideo?.canPreview||!this.isLocked)&&!(this.currentVideo?.canPreview&&this.player&&this.duration-(this.player.currentTime()||U.Mx.ZERO)<U.Mx.TWO&&(this.isLocked||this.isOnlyLockedByAlbum)))}toggleMute(){if(this.player){const T=this.isMuted;this.player.muted(!this.isMuted),T&&!this.player.muted()&&this.mediaService.n
1otifyVideoUnmuted()}}toggleVolumeSlider(){this.showVolumeSlider=!this.showVolumeSlider,this.showSpeedMenu&&(this.showSpeedMenu=!1)}onVolumeChange(T){const y=parseFloat(T.target.value);this.updateVolume(y)}updateVolume(T){if(this.player){const F=this.isMuted;this.player.volume(T),this.volume=T,T>U.Mx.ZERO&&this.isMuted&&(this.player.muted(!1),F&&this.mediaService.notifyVideoUnmuted()),this.saveVolume(T)}}setPlaybackRate(T){this.player&&(this.player.playbackRate(T),this.showSpeedMenu=!1)}toggleSpeedMenu(){this.showSpeedMenu=!this.showSpeedMenu,this.showVolumeSlider&&(this.showVolumeSlider=!1)}seek(T){if(!this.isDragging&&!this.justFinishedDragging&&(!this.isLocked||this.currentVideo?.canPreview)&&this.player&&T.target){const y=T.currentTarget.getBoundingClientRect(),j="touches"in T?T.touches[0]?.clientX:T.clientX;if(void 0===j)return;const Jt=Math.max(U.Mx.ZERO,Math.min(U.Mx.ONE,(j-y.left)/y.width))*this.duration,ve=this.player.currentTime();this.playSessionId&&(ve-this.playLastRecordedTime)*J.QG.SECONDS_TO_MILLISECONDS>U.Mx.ZERO?this.sendRecordPlay(ve,Jt):this.playLastRecordedTime=Jt,this.player.currentTime(Jt)}}onProgressBarMouseDown(T){this.isLocked&&!this.currentVideo?.canPreview||(T.preventDefault(),T.stopPropagation(),this.dragPercent=this.duration?this.currentTime/this.duration*U.Mx.ONE_HUNDRED:U.Mx.ZERO,this.isDragging=!0,this.updateDragPosition(T),this.cs.isBrowser&&(document.addEventListener("mousemove",this.onProgressBarMouseMove),document.addEventListener("mouseup",this.onProgressBarMouseUp),document.addEventListener("touchmove",this.onProgressBarMouseMove),document.addEventListener("touchend",this.onProgressBarMouseUp)))}updateDragPosition(T){const F=document.querySelectorAll(".progress-bar-container");if(0===F.length)return;const y=Array.from(F).find(ve=>null!==ve.offsetParent);if(!y)return;const j=y.getBoundingClientRect(),Jt=Math.max(U.Mx.ZERO,Math.min(U.Mx.ONE,(("touches"in T?T.touches[0].clientX:T.clientX)-j.left)/j.width));this.dragPercent=Jt*U.Mx.ONE_HUNDRED,this.cdr.detectChanges()}toggleFullscreen(){if(!this.cs.isBrowser)return;const T=document.querySelector(".video-modal-content");if(T)if(this.isFullscreen){if(this.isIOSDevice())return void this.exitIOSFullscreen();this.orientationLocked&&this.unlockOrientation(),document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}else{if(this.isIOSDevice())return void this.enterIOSFullscreen(T);this.isMobileOrAndroidDevice()&&!this.isIOSDevice()&&this.lockOrientationToLandscape(),T.requestFullscreen?T.requestFullscreen():T.webkitRequestFullscreen?T.webkitRequestFullscreen():T.mozRequestFullScreen?T.mozRequestFullScreen():T.msRequestFullscreen&&T.msRequestFullscreen()}}enterIOSFullscreen(T){(()=>T.requestFullscreen?T.requestFullscreen().then(()=>{this.isFullscreen=!0,this.cdr.detectChanges()}).catch(()=>!1):T.webkitRequestFullscreen?T.webkitRequestFullscreen().then(()=>{this.isFullscreen=!0,this.cdr.detectChanges()}).catch(()=>!1):Promise.resolve(!1))().then(y=>{y||(this.isFullscreen=!0,this.cdr.detectChanges(),T.classList.add("ios-fullscreen"),document.body.style.overflow="hidden")})}exitIOSFullscreen(){const T=document.querySelector(".video-modal-content");T&&(document.fullscreenElement===T||document.webkitFullscreenElement===T?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(T.classList.remove("ios-fullscreen"),document.body.style.overflow="",this.isFullscreen=!1,this.cdr.detectChanges()))}lockOrientationToLandscape(){var T=this;return(0,r.Z)(function*(){if(T.cs.isBrowser)try{"orientation"in screen&&"lock"in screen.orientation?(yield screen.orientation.lock("landscape"),T.orientationLocked=!0):screen.lockOrientation?(screen.lockOrientation("landscape"),T.orientationLocked=!0):screen.mozLockOrientation?(screen.mozLockOrientation("landscape"),T.orientationLocked=!0):screen.msLockOrientation&&(screen.msLockOrientation("landscape"),T.orientationLocked=!0)}catch(F){console.warn("Failed to lock screen orientation:",F),T.orientationLocked=!1}})()}unlockOrientation(){if(this.cs.isBrowser&&this.orientationLocked)try{"orientation"in screen&&"unlock"in screen.orientation?(screen.orientation.unlock(),this.orientationLocked=!1):screen.unlockOrientation?(screen.unlockOrientation(),this.orientationLocked=!1):screen.mozUnlockOrientation?(screen.mozUnlockOrientation(),this.orientationLocked=!1):screen.msUnlockOrientation&&(screen.msUnlockOrientation(),this.orientationLocked=!1)}catch(T){console.warn("Failed to unlock screen orientation:",T)}}downloadVideo(){this.authService.isLogin||!this.isLocked?!this.cs.isBrowser||this.isLocked||(0,_t.bL)(this.downloadService,{download_urls:this.currentVideo?.download_urls,download_url:this.currentVideo?.download_url,videoTitle:this.currentVideo?.videoTitle}):this.loginDialog()}loginDialog(){this.modalService.show(d.D,{})}formatTime(T){return(0,_t.gW)(T)}getProgressPercent(){if(this.isDragging)return this.dragPercent;if(this.justFinishedDragging&&this.targetSeekTime>U.Mx.ZERO){if(Math.abs(this.currentTime-this.targetSeekTime)>U.Mx.ZERO_POINT_FIVE)return this.dragPercent;this.justFinishedDragging=!1,this.targetSeekTime=U.Mx.ZERO}return this.duration?this.currentTime/this.duration*U.Mx.ONE_HUNDRED:U.Mx.ZERO}closeModal(T){T?.stopPropagation();const F=this.player?.currentTime()??this.currentTime??U.Mx.ZERO;this.playSessionId&&this.sendRecordPlay(F),this.modalRef.hide(),this.modalService.hide(),this.player&&this.player.pause()}closePlayerModalForLoyaltyPaymentRedirect(){const T=this.player?.currentTime()??this.currentTime??U.Mx.ZERO;this.playSessionId&&this.sendRecordPlay(T),this.modalRef.hide(),this.player&&this.player.pause()}handleKeyboardEvent(T){if(!this.cs.isBrowser)return;const F=T.target;if(F.tagName!==J.Ge.INPUT&&F.tagName!==J.Ge.TEXTAREA&&!F.isContentEditable)switch(T.preventDefault(),T.key){case J.Ge.ESCAPE:this.isFullscreen?this.toggleFullscreen():this.closeModal(T);break;case J.Ge.SPACE:this.togglePlayPause();break;case J.Ge.ARROW_LEFT:this.rewind15();break;case J.Ge.ARROW_RIGHT:this.fastForward15()}}handleDocumentClick(T){this.showVolumeSlider&&this.cs.isBrowser&&(T.target.closest(".volume-control")||(this.showVolumeSlider=!1))}onFullscreenChange(T){if(this.cs.isBrowser){const F=document.querySelector(".video-modal-content"),y=this.isFullscreen,j=document.fullscreenElement===F||document.webkitFullscreenElement===F||document.mozFullScreenElement===F||document.msFullscreenElement===F;if(this.isIOSDevice()&&!j){const ot=F?.classList.contains("ios-fullscreen");this.isFullscreen=ot||!1}else this.isFullscreen=j;!this.isFullscreen&&F&&(F.classList.remove("ios-fullscreen"),document.body.style.overflow=""),this.isFullscreen||(this.showControlsOnMove=!1,this.clearHideControlsTimer(),y&&this.orientationLocked&&this.unlockOrientation())}}
1onMouseMove(){!this.isFullscreen||!this.cs.isBrowser||(this.showControlsOnMove=!0,this.clearHideControlsTimer(),this.hideControlsTimer=setTimeout(()=>{this.showControlsOnMove=!1,this.cdr.detectChanges()},U.Mx.INTERVAL_THREE_THOUSAND),this.cdr.detectChanges())}clearHideControlsTimer(){this.hideControlsTimer&&(clearTimeout(this.hideControlsTimer),this.hideControlsTimer=null)}isMobileOrAndroidDevice(){if(!this.cs.isBrowser)return!1;const T=window.navigator.userAgent.toLowerCase();return/android|iphone|ipad|ipod|mobile|webos|blackberry|windows phone/i.test(T)}isIOSDevice(){if(!this.cs.isBrowser)return!1;const T=window.navigator.userAgent.toLowerCase();return/iphone|ipad|ipod/i.test(T)}resolveVideoMode(T,F){if(!T||"string"!=typeof T)return this.currentVideoMode=U.Mx.LANDSCAPE,void this.cdr.detectChanges();if(!0===F)return this.currentVideoMode=U.Mx.PORTRAIT,void this.cdr.detectChanges();const y=(0,Ct.p4)(T,[U.Mx.PORTFOLIO.toLowerCase()]);if(y)return this.currentVideoMode=y,void this.cdr.detectChanges();this.currentVideoMode=U.Mx.LANDSCAPE,this.cdr.detectChanges()}loadCurrentVideo(){if(this.videoList.length===U.Mx.ZERO)return;const T=ft()(this.videoList[this.currentIndex]);if(T){this.playSessionId=null,this.playLastRecordedTime=U.Mx.ZERO,this.player&&(this.player.pause(),this.player.currentTime(U.Mx.ZERO),this.currentTime=U.Mx.ZERO,this.duration=U.Mx.ZERO,this.isPlaying=!1),this.isSwitchingVideo&&setTimeout(()=>{this.isSwitchingVideo=!1,this.cdr.detectChanges()},U.Mx.ONE_HUNDRED);const F=(0,Ct.NH)(T.dateOfRelease);F.type===ut.vI.RELEASE_TYPE_YEAR?(T.dateOfRelease=F.value,this.isReleaseYearType=!0):F.type===ut.vI.RELEASE_TYPE_DATE?(T.dateOfRelease=ne()(new Date(F.value)).format("MMM D, YYYY"),this.isReleaseYearType=!1):(T.dateOfRelease="",this.isReleaseYearType=!1),this.isLocked=T?.isLocked||!1,this.isOnlyLockedByAlbum=T?.onlyLockedByAlbum||!1,this.lockedThrough=T.lock_through||null,this.currentVideo=ft()(T),this.videoUrl=T.videoUrl,this.resolveVideoMode(T.videoUrl,!0===T.is_portrait),this.posterUrl=T.posterUrl||"",this.portfolioType!=U.Mx.COURSE_CAPS&&this.callEngagementAPI(),(!this.isLocked||this.currentVideo?.canPreview)&&(this.isLoadingVideo=!0,this.cdr.detectChanges(),setTimeout(()=>{if(this.videoPlayer?.player){if(this.player=this.videoPlayer.player,this.hideDefaultControls(),this.setupPlayerEvents(),this.player&&this.player.src){const y="string"==typeof this.videoUrl?this.videoUrl.replace("+","%2B"):this.videoUrl;this.player.src({src:y,type:(0,rt.kc)(y)}),this.player.load()}}else if(this.videoPlayer){const y=this.videoPlayer.player;y&&(this.player=y,this.hideDefaultControls(),this.setupPlayerEvents(),this.player&&this.player.poster&&this.player.poster(this.posterUrl||""))}},U.Mx.ONE_HUNDRED))}}resetState(){this.isPlaying=!1,this.currentTime=U.Mx.ZERO,this.duration=U.Mx.ZERO,this.isMuted=!1,this.playbackRate=U.Mx.ONE,this.showSpeedMenu=!1,this.showVolumeSlider=!1,this.videoList=[],this.currentIndex=U.Mx.ZERO,this.currentVideoMode=null,null!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null)}loadSavedVolume(){this.cs.isBrowser&&(this.volume=(0,rt.uJ)())}saveVolume(T){if(this.cs.isBrowser)try{localStorage.setItem(rt.GG,T.toString())}catch{}}callEngagementAPI(){this.isEngagable&&this.authService.isLogin&&this.apiCallService.post(it.Y9.portfolioEngagement,{pk:this.currentVideo.pk,sk:this.currentVideo.sk},!1).pipe((0,O.R)(this.destroy$)).subscribe()}ensurePlaySession(){this.playSessionId||(this.playSessionId=`session_${(0,Ct.D1)()}`,this.playLastRecordedTime=U.Mx.ZERO)}sendRecordPlay(T,F){if(!this.isEngagable||!this.playSessionId)return;const y=Math.max(U.Mx.ZERO,(T-this.playLastRecordedTime)*J.QG.SECONDS_TO_MILLISECONDS);this.playLastRecordedTime=void 0!==F?F:T,this.portfolioRecordPlayService.recordPlay({pk:this.currentVideo.pk,sk:this.currentVideo.sk,duration_played:y,session_id:this.playSessionId})}sendRecordPlayForCurrentVideo(){const T=this.player?.currentTime()??this.currentTime??U.Mx.ZERO;this.playSessionId&&this.sendRecordPlay(T)}purchaseVideo(T){this.currentVideo?.unlocked_through?.hasOwnProperty("is_outer_unlocked")&&!this.currentVideo?.unlocked_through?.is_outer_unlocked||(T===rt.Im.SUBSCRIPTION&&this.onPurchaseSubscription?this.onPurchaseSubscription(this.currentVideo):T===rt.Im.INDIVIDUAL&&this.onPurchaseIndividual?this.onPurchaseIndividual(this.currentVideo):T===rt.Im.NFT&&this.onPurchaseNft&&this.onPurchaseNft(this.currentVideo))}get showOrBeforeLoyaltyVideoTrack(){return(!!this.lockedThrough?.individual?.individual_price||!!this.lockedThrough?.subscription?.length||!!this.lockedThrough?.nft?.length)&&!!this.lockedThrough?.individual?.loyalty_points&&this.authService.isWhiteLabelWebsite()&&!this.isOnlyLockedByAlbum}openUnlockCurrentVideoWithPoints(){if(this.cs.isBrowser&&this.currentVideo){if(this.onPurchaseLoyaltyPoints)return void this.onPurchaseLoyaltyPoints(this.currentVideo);this.selectedItem={...this.currentVideo},this.cdr.detectChanges(),this.unlockModal?.openUnlockWithPoints
1Modal()}}purchaseMasterData(T){if(!this.masterData||!this.masterData.isLocked)return;const F=this.getUnlockConfig();this.portfolioUnlockService.handleLockClick(this.masterData,T||new Event("click"),F)&&(this.selectedItem=this.masterData,this.unlockModalHeader="Unlock "+this.portfolioType.charAt(0).toUpperCase()+this.portfolioType.slice(1).toLowerCase()+rt.UU.SPACE_SERIES)}onPurchaseMasterIndividual(){this.portfolioUnlockService.purchaseIndividual(this.getUnlockConfig())}onPurchaseMasterSubscription(){this.portfolioUnlockService.purchaseSubscription(this.getUnlockConfig())}onPurchaseMasterNft(){this.portfolioUnlockService.purchaseNft(this.getUnlockConfig())}onPortfolioUnlockedWithPoints(){const T=this.selectedItem||this.masterData;if(!T?.sk)return;const F=(0,It.B)(T.unlocked_through,{is_unlocked:!0});T.isLocked=!1,T.unlocked_through=F,this.masterData?.sk===T.sk?(this.masterData.isLocked=!1,this.masterData.unlocked_through=F):this.currentVideo?.sk===T.sk&&(this.currentVideo.isLocked=!1,this.currentVideo.unlocked_through=F,this.isLocked=!1),this.videoList?.forEach(y=>{y.sk===T.sk&&(y.isLocked=!1,y.unlocked_through=(0,It.B)(y.unlocked_through,{is_unlocked:!0}))}),this.cdr.detectChanges()}getUnlockConfig(){return{selectedItem:this.selectedItem||this.masterData,visitedUserProfile:this.userProfile,userSubscriptionList:this.userSubscriptionList,pUserSubscriptionList:this.pUserSubscriptionList,portfolioType:this.portfolioType,unlockModal:this.unlockModal,destroy$:this.destroy$,isIndividual:!1,userId:this.userProfile?.user_name||this.userProfile?.email,portfolioTypeId:this.masterData?.sk?this.cs.decodeToUTF(this.masterData.sk):"",isAlbumLocking:!0,onMusicPlayerModalClose:()=>{this.closeModal()}}}get individualPurchaseBtnField(){return{type:"button",label:this.individualPurchaseText,class:"btn btn-primary w-100",disabled:this.currentVideo?.unlocked_through?.hasOwnProperty("is_outer_unlocked")&&!this.currentVideo?.unlocked_through?.is_outer_unlocked}}get subscriptionPurchaseBtnField(){return{type:"button",label:Ft.dQ[this.portfolioType].SINGLE.SUBSCRIPTION,class:"btn btn-primary w-100",disabled:this.currentVideo?.unlocked_through?.hasOwnProperty("is_outer_unlocked")&&!this.currentVideo?.unlocked_through?.is_outer_unlocked}}get nftPurchaseBtnField(){return{type:"button",label:Ft.dQ[this.portfolioType].SINGLE.NFT,class:"btn btn-primary w-100",disabled:this.currentVideo?.unlocked_through?.hasOwnProperty("is_outer_unlocked")&&!this.currentVideo?.unlocked_through?.is_outer_unlocked}}get masterDataPurchaseBtnField(){return{type:"button",label:this.PURCHASE_MASTER_DATA_TEXT[this.portfolioType],class:"btn btn-primary w-100"}}get masterDataLockThrough(){return this.masterData?.isLocked&&(this.masterData?.lock_through?.individual?.individual_price||this.masterData?.lock_through?.subscription?.length||this.masterData?.lock_through?.nft?.length)}seeLessMore(){this.currentVideo?.description?.length&&(this.currentVideo={...this.currentVideo,isMore:!this.currentVideo.isMore},this.cdr.detectChanges())}ngOnDestroy(){if(null!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.clearHideControlsTimer(),this.cs.isBrowser&&(document.removeEventListener("mousemove",this.onProgressBarMouseMove),document.removeEventListener("mouseup",this.onProgressBarMouseUp),document.removeEventListener("touchmove",this.onProgressBarMouseMove),document.removeEventListener("touchend",this.onProgressBarMouseUp)),this.orientationLocked&&this.unlockOrientation(),this.cs.isBrowser){const T=document.querySelector(".video-modal-content");T&&(T.classList.remove("ios-fullscreen"),document.body.style.overflow="")}this.destroy$.next(),this.destroy$.complete()}onShareClick(){this.shareModal()}shareModal(){if(!this.currentVideo?.sk||!this.userProfile)return;let T;const F=this.currentVideo.sk.split("#");F.length>=U.Mx.TWO&&F[U.Mx.ZERO]===U.Mx.PORTFOLIO?T=F[U.Mx.ONE]:F.length>=U.Mx.THREE&&(T=F[U.Mx.TWO]);const{msg:y,url:j,userName:ot}=(0,_t.mV)(this.userProfile,this.currentVideo.sk,this.portfolioType,T),Jt=Object.assign({isMyProfile:this.isMyProfile,gsi4pk:this.userProfile?.gsi4pk,firstName:this.userProfile?.first_name,lastName:this.userProfile?.last_name,pk:this.userProfile?.pk,sk:this.currentVideo.sk,sharingResource:Qt.PL.PORTFOLIO_SHARE,url:j,image:this.currentVideo?.cover_image_url||this.currentVideo?.posterUrl||"",username:ot,otherUserEmail:this.userProfile?.email,portfolioMsg:y});this.shareDialogService.openShareDialog(Jt,{backdrop:"static"})}get individualPurchaseText(){return Ft.dQ[this.portfolioType].SINGLE.INDIVIDUAL_PURCHASE+" "+this.currencyPipe.transform(this.currentVideo?.price?this.currentVideo.price:this.lockedThrough?.individual?.individual_price,this.currentVideo?.currency_symbol)}get hasIndividualPrice(){return!!this.currentVideo?.lock_through?.individual?.individual_price}get hasSubscription(){return!!this.currentVideo?.lock_through?.subscription?.length}get hasNft(){return!!this.currentVideo?.lock_through?.nft?.length}get showOrBeforeSubscription(){return this.hasIndividualPrice&&this.hasSubscription}get showOrBeforeNft(){return(this.hasIndividualPrice||this.hasSubscription)&&this.hasNft}};let v=L;return L.\u0275fac=function(F){return new(F||L)(c.Y36(lt.tT),c.Y36(G.v),c.Y36(lt.UZ),c.Y36(X.y),c.Y36(vt.AuthService),c.Y36(t.F),c.Y36(c.sBO),c.Y36(Lt.A),c.Y36(St.K),c.Y36(N.H9),c.Y36(Wt.h),c.Y36(st.r))},L.\u0275cmp=c.Xpm({type:L,selectors:[["app-video-player-modal"]],viewQuery:function(F,y){if
1(1&F&&(c.Gf(l,5),c.Gf(bt,5),c.Gf(nt,5)),2&F){let j;c.iGM(j=c.CRH())&&(y.videoPlayer=j.first),c.iGM(j=c.CRH())&&(y.videoElement=j.first),c.iGM(j=c.CRH())&&(y.unlockModal=j.first)}},hostBindings:function(F,y){1&F&&c.NdJ("keydown",function(ot){return y.handleKeyboardEvent(ot)},!1,c.evT)("click",function(ot){return y.handleDocumentClick(ot)},!1,c.evT)("fullscreenchange",function(ot){return y.onFullscreenChange(ot)},!1,c.evT)("webkitfullscreenchange",function(ot){return y.onFullscreenChange(ot)},!1,c.evT)("mozfullscreenchange",function(ot){return y.onFullscreenChange(ot)},!1,c.evT)("MSFullscreenChange",function(ot){return y.onFullscreenChange(ot)},!1,c.evT)},inputs:{videoUrl:"videoUrl",posterUrl:"posterUrl",buttonColor:"buttonColor",closeButtonColor:"closeButtonColor",progressBarColor:"progressBarColor"},standalone:!0,features:[c.jDz],decls:38,vars:64,consts:[[1,"video-modal-container"],[1,"video-modal-wrapper"],[1,"video-modal-content",3,"mousemove"],[1,"video-wrapper",3,"click"],["class","video-loader-overlay",4,"ngIf"],[1,"ivs_video",3,"options"],["videoPlayer",""],["class","black-overlay",4,"ngIf"],["class","fullscreen-title-description-overlay",4,"ngIf"],["class","d-flex flex-column subscription-option",4,"ngIf"],["class","video-title-description-container",4,"ngIf"],[1,"video-controls"],["class","control-group-center",4,"ngIf"],[1,"controls-row"],[1,"time-display-left"],[1,"progress-bar-container",3,"click","mousedown","touchstart"],[1,"progress-bar"],[1,"progress-indicator"],[1,"control-group-right"],[1,"time-display-right"],[1,"speed-control"],[1,"control-btn","speed-btn",3,"click"],[1,"speed-rate"],[1,"icon-litechevron_down"],["class","speed-menu",4,"ngIf"],["class","control-btn",3,"color","disabled","click",4,"ngIf"],["class","volume-control",4,"ngIf"],[1,"control-btn",3,"click"],[1,"icon-litefullscreen"],["class","fullscreen-controls-layout",4,"ngIf"],["class","close-button",3,"color","click",4,"ngIf"],[3,"selectedItem","userProfile","userSubscriptionList","contentType","headerType","userId","userName","portfolioTypeId","isIndividualPortfolio","isLocked","portfolioType","isAlbumLocking","unlockModalHeader","isAllowedToRedirect","onLoyaltyPointsPurchaseNavigate","purchaseIndividual","purchaseSubscription","purchaseNft","unlockedWithPoints"],["unlockModal",""],[1,"video-loader-overlay"],[1,"black-overlay"],[1,"fullscreen-title-description-overlay"],["class","back-arrow-btn",3,"click",4,"ngIf"],[4,"ngIf"],[1,"back-arrow-btn",3,"click"],[1,"icon-arrow-back"],[1,"fullscreen-title"],["class","fullscreen-description",3,"innerHTML",4,"ngIf"],[1,"fullscreen-description",3,"innerHTML"],[1,"d-flex","flex-column","subscription-option"],[1,"locked-system"],[1,"d-flex","flex-column","buttons"],[3,"btnField","click",4,"ngIf"],["class","or-text",4,"ngIf"],["type","button","class","btn btn-primary medium unlock-with-points-btn w-100",3,"disabled","click",4,"ngIf"],[1,"purchase-via-subscription-lock"],["class","unlock-content merchandise",3,"contentId","lockDetails","userProfile","userSubscriptionList","contentType","headerType","userId","isLocked",4,"ngIf"],[3,"btnField","click"],[1,"or-text"],["type","button",1,"btn","btn-primary","medium","unlock-with-points-btn","w-100",3,"disabled","click"],[1,"unlock-with-points-btn__label"],["src","assets/images/svg/feature-icons/point-coin.svg","width","24","height","24","loading","lazy","decoding","async",1,"unlock-with-points-btn__coin"],[1,"unlock-with-points-btn__points"],[1,"unlock-content","merchandise",3,"contentId","lockDetails","userProfile","userSubscriptionList","contentType","headerType","userId","isLocked"],["shopifyUnlocker",""],[1,"video-title-description-container"],[1,"album-title-share"],[1,"title","full-album-title"],["class","share-button-container",4,"ngIf"],[1,"video-title-description-container-top"],[1,"title"],[1,"date-of-release"],["class","item-description",3,"innerHTML","click",4,"ngIf"],[1,"share-button-container"],["aria-label","Share",1,"share-button",3,"click"],[1,"icon-profile-share"],[1,"item-description",3,"innerHTML","click"],[1,"control-group-center"],[1,"control-btn","rewind-15",3,"disabled","click"],[1,"icon-litebackward-15"],[1,"control-btn","play-pause-btn",3,"disabled","click"],["class","play-icon",4,"ngIf"],["class","pause-icon",4,"ngIf"],[1,"control-btn","forward-15",3,"disabled","click"],[1,"icon-liteforward-15"],[1,"control-btn",3,"disabled","click"],[1,"icon-liteGroup"],[1,"play-icon"],[1,"icon-liteplay"],[1,"pause-icon"],[1,"icon-litepause"],[1,"icon-liteGroup1"],[1,"speed-menu"],["class","speed-option",3,"active","click",4,"ngFor","ngForOf"],[1,"speed-option",3,"click"],[1,"icon-litedownload"],[1,"volume-control"],[1,"control-btn","volume-btn",3,"click","contextmenu"],["class","icon-liteic-volume",4,"ngIf"],["class","icon-litespeaker-mute",4,"ngIf"],["class","volume-slider-container",4,"ngIf"],[1,"icon-liteic-volume"],[1,"icon-litespeaker-mute"],[1,"volume-slider-container"],["type","range",1,"volume-slider",3,"min","max","step","value","input","click"],[1,"fullscreen-controls-layout"],[1,"d-flex"],[1,"progress-bar-row"],[1,"fullscreen-controls-row"],[1,"close-button",3,"click"]],template:function(F,y){1&F&&(c.TgZ(0,"div",0)(1,"div",1)(2,"div",2),c.NdJ("mousemove",function(){return y.onMouseMove()}),c.TgZ(3,"div",3),c.NdJ("click",function(ot){return y.onVideoClick(ot)}),c.YNc(4,yt,2,0,"div",4),c._UZ(5,"vjs-ivs-player",5,6),c.YNc(7,ct,1,0,"div",7),c.YNc(8,kt,3,2,"div",8),c.YNc(9,ue,13,9,"div",9),c.qZA(),c.TgZ(10,"div"),c.YNc(11,fe,11,5,"div",10),c.TgZ(12,"div",11),c.YNc(13,be,10,11,"div",12),c.TgZ(14,"div",13)(15,"div",14)(16,"span"),c._uU(17),c.qZA()(),c.TgZ(18,"div",15),c.NdJ("click",function(ot){return y.seek(ot)})("mousedown",function(ot){return y.onProgressBarMouseDown(ot)})("touchstart",function(ot){return y.onProgressBarMouseDown(ot)}),c._UZ(19,"div",16)(20,"div",17),c.qZA(),c.TgZ(21,"div",18)(22,"span",19),c._uU(23),c.qZA(),c.TgZ(24,"div",20)(25,"button",21),c.NdJ("click",function(){return y.toggleSpeedMenu()}),c.TgZ(26,"span",22),c._uU(27),c.qZA(),c._UZ(28,"em",23),c.qZA(),c.YNc(29,Pe,2,1,"div",24),c.qZA(),c.YNc(30,Dt,2,3,"button",25),c.YNc(31,Zt,5,5,"div",26),c.TgZ(32,"button",27),c.NdJ("click",function(){return y.toggleFullscreen()}),c._UZ(33,"em",28),c.qZA()()(),c.YNc(34,P,32,34,"div",29),c.qZA()()(),c.YNc(35,S,3,2,"button",30),c.qZA()(),c.TgZ(36,"app-portfolio-unlock-modal",31,32),c.NdJ("purchaseIndividual",function(){return y.onPurchaseMasterIndiv
1idual()})("purchaseSubscription",function(){return y.onPurchaseMasterSubscription()})("purchaseNft",function(){return y.onPurchaseMasterNft()})("unlockedWithPoints",function(){return y.onPortfolioUnlockedWithPoints()}),c.qZA()),2&F&&(c.xp6(2),c.ekj("fullscreen-mode",y.isFullscreen)("video-modal-content-portrait",y.currentVideoMode===y.Application.PORTRAIT),c.xp6(1),c.ekj("video-locked",y.isLocked)("video-portrait",y.currentVideoMode===y.Application.PORTRAIT),c.xp6(1),c.Q6J("ngIf",y.isLoadingVideo&&(!y.isLocked||(null==y.currentVideo?null:y.currentVideo.canPreview))),c.xp6(1),c.Q6J("options",y.getVideoOptions()),c.xp6(2),c.Q6J("ngIf",y.isFullscreen&&!y.isPlaying||y.showLockedContent||y.showControlsOnMove),c.xp6(1),c.Q6J("ngIf",y.isFullscreen),c.xp6(1),c.Q6J("ngIf",y.showLockedContent&&(y.lockedThrough||y.masterDataLockThrough)&&!y.isFullscreen),c.xp6(1),c.ekj("video-title-description-container-wrapper",y.currentVideoMode===y.Application.PORTRAIT),c.xp6(1),c.Q6J("ngIf",!y.isFullscreen&&y.currentVideo&&!y.isMobileOrAndroidDevice()),c.xp6(1),c.ekj("show-on-hover",y.isFullscreen)("controls-visible",y.isFullscreen&&y.showControlsOnMove)("controls-disabled",y.isLocked&&!(null!=y.currentVideo&&y.currentVideo.canPreview)),c.xp6(1),c.Q6J("ngIf",!y.isFullscreen),c.xp6(4),c.Oqu(y.formatTime(y.currentTime)),c.xp6(1),c.ekj("disabled",y.isLocked&&!(null!=y.currentVideo&&y.currentVideo.canPreview))("dragging",y.isDragging)("switching-video",y.isSwitchingVideo),c.xp6(1),c.Udp("background-color",y.progressBarColor)("width",y.getProgressPercent(),"%"),c.xp6(1),c.Udp("left",y.getProgressPercent(),"%")("background-color",y.progressBarColor),c.xp6(3),c.Oqu(y.formatTime(y.duration)),c.xp6(2),c.Udp("color",y.buttonColor),c.xp6(2),c.hij("",y.playbackRate,"x"),c.xp6(2),c.Q6J("ngIf",y.showSpeedMenu),c.xp6(1),c.Q6J("ngIf",null==y.currentVideo?null:y.currentVideo.isDownloadable),c.xp6(1),c.Q6J("ngIf",!y.isMobileOrAndroidDevice()),c.xp6(1),c.Udp("color",y.buttonColor),c.xp6(2),c.Q6J("ngIf",y.isFullscreen),c.xp6(1),c.Q6J("ngIf",!y.isFullscreen),c.xp6(1),c.Q6J("selectedItem",y.selectedItem)("userProfile",y.userProfile)("userSubscriptionList",y.userSubscriptionList)("contentType",y.paymentForType.MUSIC_PORTFOLIO)("headerType",y.PORTFOLIO_TITLE_HEADING_MAP[y.portfolioType])("userId",null==y.userProfile?null:y.userProfile.email)("userName",y.portfolioCreatorUserName||(null==y.userProfile?null:y.userProfile.user_name)||"")("portfolioTypeId",y.portfolioTypeId||(null!=y.masterData&&y.masterData.sk?y.cs.decodeToUTF(y.masterData.sk):""))("isIndividualPortfolio",y.isIndividualPortfolio)("isLocked",null==y.selectedItem?null:y.selectedItem.isLocked)("portfolioType",y.portfolioType)("isAlbumLocking",(null==y.selectedItem?null:y.selectedItem.sk)&&(null==y.masterData?null:y.masterData.sk)&&(null==y.selectedItem?null:y.selectedItem.sk)===(null==y.masterData?null:y.masterData.sk))("unlockModalHeader",y.unlockModalHeader)("isAllowedToRedirect",!1)("onLoyaltyPointsPurchaseNavigate",y.closePlayerModalForLoyaltyPaymentRedirect.bind(y)))},dependencies:[N.ez,N.sg,N.O5,N.JJ,V.i,V.q,$.m,W.r,se.R,qt.Q,Bt.w,gt.dY,Et.F],styles:[".video-modal-container{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;display:flex;align-items:center;justify-content:center}@media screen and (max-width: 992px){ .video-modal-container:has(.video-modal-content.video-modal-content-portrait):not(:has(.video-modal-content.fullscreen-mode)):not(:has(.video-modal-content.ios-fullscreen)):not(:has(.video-modal-content:fullscreen)){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);place-items:center;align-content:center;justify-items:center;width:100%;box-sizing:border-box;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);min-height:100vh;min-height:100svh;min-height:100dvh;height:100vh;height:100svh;height:100dvh} .video-modal-container:has(.video-modal-content.video-modal-content-portrait):not(:has(.video-modal-content.fullscreen-mode)):not(:has(.video-modal-content.ios-fullscreen)):not(:has(.video-modal-content:fullscreen)):not(.mobile-fullscreen){background:transparent}} .video-modal-container:has(.video-modal-content.ios-fullscreen){position:fixed!important;top:0!important;left:0!important;width:100vw!important;height:100vh!important;z-index:999999!important;background:#000!important} .video-modal-container .share-button-container .share-button{width:30px;height:30px;border-radius:50%;background:var(--configThemeColor, #013956);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}@media (max-width: 768px){ .video-modal-container .share-button-container .share-button{width:25px;height:25px}} .video-modal-container .share-button-container .share-button:hover{opacity:1;transform:scale(1.05)} .video-modal-container .share-button-container .share-button em{color:var(--configButtonTextColor);font-size:14px} .video-modal-container .video-js:after{background:transparent} .video-modal-container .icon-liteGroup, .video-modal-container .icon-liteGroup1{font-size:20px;color:var(--configBgTextColor)} .video-modal-container .icon-litebackward-15, .video-modal-container .icon-liteforward-15{font-size:26px;color:var(--configBgTextColor)} .video-modal-container .video-js:after{background:transparent!important}.icon-litebackward-15[_ngcontent-%COMP%], .icon-liteforward-15[_ngcontent-%COMP%], .icon-liteGroup[_ngcontent-%COMP%], .icon-liteGroup1[_ngcontent-%COMP%], .icon-litedownload[_ngcontent-%COMP%], .icon-liteic-volume[_ngcontent-%COMP%], .icon-litespeaker-mute[_ngcontent-%COMP%], .icon-litefullscreen[_ngcontent-%COMP%], .icon-liteplay[_ngcontent-%COMP%], .icon-litepause[_ngcontent-%COMP%]{color:var(--configBgTextColor)}.icon-litebackward-15[_ngcontent-%COMP%]:hover, .icon-liteforward-15[_ngcontent-%COMP%]:hover, .icon-liteGroup[_ngcontent-%COMP%]:hover, .icon-liteGroup1[_ngcontent-%COMP%]:hover, .icon-litedownload[_ngcontent-%COMP%]:hover, .icon-liteic-volume[_ngcontent-%COMP%]:hover, .icon-litespeaker-mute[_ngcontent-%COMP%]:hover, .icon-litefullscreen[_ngcontent-%COMP%]:hover, .icon-liteplay[_ngcontent-%COMP%]:hover, .icon-litepause[_ngcontent-%COMP%]:hover{transform:scale(1.3);transition:transform .7s ease}.icon-litedownload[_ngcontent-%COMP%], .icon-liteic-volume[_ngcontent-%COMP%], .icon-litespeaker-mute[_ngcontent-%COMP%], .icon-litefullscreen[_ngcontent-%COMP%]{font-size:19px}.icon-litedownload[_ngcontent-%COMP%]:before, .icon-liteic-volume[_ngcontent-%COMP%]:before, .icon-litespeaker-mute[_ngcontent-%COMP%]:before, .icon-litefullscreen[_ngcontent-%COMP%]:before{color:var(--configBgTextColor)!important}.video-modal-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;background:rgba(0,0,0,.6)}.video-modal-wrapper[_ngcontent-%COMP%]{position:relative;z-index:2;min-width:65%;max-width:min(80%,1250px);margin:0 auto}@media screen and (max-width: 992px){.video-modal-wrapper[_ngcontent-%COMP%]{min-width:100%;max-width:100%;width:100%;display:flex;flex-direction:column}}@media screen and (max-width: 992px){.video-modal-container[_ngcontent-%COMP%]:not(:has(.video-modal-content.fullscreen-mode)):not(:has(.video-modal-content.ios-fullscreen)):not(:has(.video-modal-content:fullscreen)):has(.video-modal-content.video-modal-content-portrait) .video-modal-wrapper[_ngcontent-%COMP%]{height:98vh;height:98svh;height:98dvh;max-height:98vh;max-height:98svh;max-height:98dvh;min-height:0;width:100%;margin:0 auto;box-sizing:border-box}}.video-title-description-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex:1;min-height:0}.video-title-description-container-wrapper[_ngcontent-%COMP%] .video-title-description-container[_ngcontent-%COMP%]{padding:20px 20px 0!important}@media screen and (max-width: 992px){.video-title-description-container-wrapper[_ngcontent-%COMP%]{flex:0 0 auto}}.video-modal-content[_ngcontent-%COMP%]{position:relative;z-index:2;width:100%;background:var(--configSecondaryBgColor);border-radius:20px;overflow:hidden;transition:all .3s ease;display:flex;flex-direction:column}.video-modal-content.fullscreen-mode[_ngcontent-%COMP%]{width:100%;height:100%;max-width:100%;border-radius:0;display:flex;flex-direction:column;background:#000!important;position:relative}.video-modal-content.ios-fullscreen[_ngcontent-%COMP%]{position:fixed!important;top:0!important;left:0!important;width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important;background:#000!important;display:flex!important;flex-direction:column!important;z-index:999999!important;margin:0!important;padding:0!important}.video-modal-content[_ngcontent-%COMP%]:fullscreen, .video-modal-content[_ngcontent-%COMP%]:-webkit-full-screen, .video-modal-content[_ngcontent-%COMP%]:-moz-full-screen, .video-modal-content[_ngcontent-%COMP%]:-ms-fullscreen{position:fixed;top:0;left:0;width:100vw;height:100vh;max-width:100vw;max-height:100vh;border-radius:0;background:#000;display:flex;flex-direction:column;z-index:999999;margin:0;padding:0}.video-modal-content.video-modal-content-portrait[_ngcontent-%COMP%]{flex-direction:row}@media screen and (max-width: 992px){.video-modal-content.video-modal-content-portrait[_ngcontent-%COMP%]{flex-direction:column}}@media screen and (max-width: 992px){.video-modal-content[_ngcontent-%COMP%]:not(.fullscreen-mode):not(.ios-fullscreen):not(:fullscreen).video-modal-content-portrait{height:100%;max-height:98vh;max-height:98svh;max-height:98dvh;min-height:0;justify-content:center;flex:1;border-radius:20px;padding-top:env(safe-area-inset-top);overflow:hidden}}.video-modal-container[_ngcontent-%COMP%]:has(.video-modal-content:fullscreen) .video-modal-overlay[_ngcontent-%COMP%], .video-modal-container[_ngcontent-%COMP%]:has(.video-modal-content:-webkit-full-screen) .video-modal-overlay[_ngcontent-%COMP%], .video-modal-container[_ngcontent-%COMP%]:has(.video-modal-content:-moz-full-screen) .video-modal-overlay[_ngcontent-%COMP%], .video-modal-container[_ngcontent-%COMP%]:has(.video-modal-content:-ms-fullscreen) .video-modal-overlay[_ngcontent-%COMP%], .video-modal-container[_ngcontent-%COMP%]:has(.video-modal-content.ios-fullscreen) .video-modal-overlay[_ngcontent-%COMP%]{display:none!important}.close-button[_ngcontent-%COMP%]{position:absolute;top:-15px;right:-8px;width:30px;height:30px;border:none;border-radius:50%;background:var(--configThemeColor);color:var(--configButtonTextColor)!important;display:grid;place-items:center;cursor:pointer;z-index:10001;transition:opacity .3s ease}@media screen and (max-width: 992px){.close-button[_ngcontent-%COMP%]{top:calc(8px + env(safe-area-inset-top));right:12px}}.close-button[_ngcontent-%COMP%]:hover{opacity:.8;transform:scale(1.1)}.close-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{line-height:1;font-weight:800;padding-left:1px;color:var(--configButtonTextColor)!important}@media screen and (max-width: 992px){ .fullscreen-mode .locked-system .app-btn{font-size:18px}} .fullscreen-mode .video-modal-overlay{display:none} .fullscreen-mode .close-button{top:20px;right:20px;opacity:0;pointer-events:none} .fullscreen-mode:hover .close-button{opacity:1;pointer-events:auto} .video-wrapper{position:relative;width:100%;aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;cursor:pointer} .video-wrapper.video-portrait{max-width:400px;aspect-ratio:9/16;margin:0 auto} .video-wrapper.video-portrait .ivs_video{padding-bottom:20px!important} .video-wrapper.video-portrait .video-js{height:100%!important}@media screen and (max-width: 992px){ .video-wrapper.video-portrait{flex:1 1 0;min-height:0;max-width:100%;width:auto;margin:0 auto} .video-wrapper.video-portrait .ivs_video{padding:12px 12px 0!important}} .video-wrapper .ivs_video{position:absolute;top:0;left:0;width:100%;height:100%;padding:20px 20px 0;display:flex;align-items:center;justify-content:center} .video-wrapper .video-js{width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:20px} .video-wrapper .video-js .vjs-tech{border-radius:20px;width:100%;max-width:100%;height:100%;max-height:100%;object-fit:cover!important} .video-wrapper .video-js video{width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important;object-fit:contain!important}.fullscreen-mode[_ngcontent-%COMP%] .video-wrapper{padding-top:0;flex:1;display:flex;align-items:center;justify-content:center;cursor:pointer;min-height:100%;height:100%}.fullscreen-mode[_ngcontent-%COMP%] .video-wrapper .ivs_video{position:relative;width:100%;height:100%;max-width:100%;max-height:100%;padding:0}.fullscreen-mode[_ngcontent-%COMP%] .video-wrapper .video-js{width:100%;height:100%;max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center;background:#000!important}.fullscreen-mode[_ngcontent-%COMP%] .video-wrapper .video-js .vjs-tech{border-radius:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain!important}@media screen and (max-width: 992px){.fullscreen-mode[_ngcontent-%COMP%] .video-wrapper .video-js .vjs-tech{padding:5% 0}}.fullscreen-mode[_ngcontent-%COMP%] .video-wrapper .video-js video{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}.fullscreen-mode[_ngcontent-%COMP%] .video-wrapper.video-portrait{max-width:100%;flex:unset!important}.fullscreen-mode[_ngcontent-%COMP%] .video-controls[_ngcontent-%COMP%]{position:absolute;bottom:env(safe-area-inset-bottom);left:0;right:0;z-index:1002;background:transparent!important}[_nghost-%COMP%] .vjs-control-bar{display:none!important}[_nghost-%COMP%] .vjs-big-play-button{display:none!important}[_nghost-%COMP%] .vjs-loading-spinner{display:none!important}.video-modal-container[_ngcontent-%COMP%] .vjs-control-bar{display:none!important}.video-modal-container[_ngcontent-%COMP%] .vjs-big-play-button{display:none!important}.video-modal-container[_ngcontent-%COMP%] .vjs-poster{display:none!important;border-radius:20px}.video-modal-container[_ngcontent-%COMP%] .vjs-loading-spinner{display:none!important}.video-controls[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor);padding:12px 20px;border-radius:0;transition:opacity .3s ease,transform .3s ease,background .3s ease;position:relative;z-index:1002;margin-top:auto}@media screen and (max-width: 992px){.video-controls[_ngcontent-%COMP%]{padding:10px 12px calc(10px + env(safe-area-inset-bottom)) 12px;flex-shrink:0}}.video-controls.controls-disabled[_ngcontent-%COMP%]{opacity:.6}.video-controls.show-on-hover[_ngcontent-%COMP%]{opacity:0;transform:translateY(10px);pointer-events:none;background:transparent;position:relative;z-index:10;transition:opacity .3s ease,transform .3s ease,background .3s ease}.album-title-share[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px}.full-album-title[_ngcontent-%COMP%]{font-size:16px!important;opacity:.8;line-height:2!important}.fullscreen-mode[_ngcontent-%COMP%] .video-controls.show-on-hover.controls-visible[_ngcontent-%COMP%]{opacity:1;transform:translateY(0);pointer-events:auto;transition:opacity .3s ease,transform .3s ease,background .3s ease}.fullscreen-mode[_ngcontent-%COMP%] .control-btn.play-pause-btn[_ngcontent-%COMP%]{width:42px;height:42px}.fullscreen-mode[_ngcontent-%COMP%] .video-controls[_ngcontent-%COMP%] .controls-row[_ngcontent-%COMP%]{display:none}.fullscreen-mode[_ngcontent-%COMP%] .video-controls[_ngcontent-%COMP%] .control-group-center[_ngcontent-%COMP%]:not(.fullscreen-controls-row .control-group-center)[_ngcontent-%COMP%]{display:none}.fullscreen-mode[_ngcontent-%COMP%] .video-controls[_ngcontent-%COMP%] .fullscreen-controls-layout[_ngcontent-%COMP%] .control-btn[_ngcontent-%COMP%] .play-icon[_ngcontent-%COMP%]{color:var(--configBgTextColor);margin-left:5px;margin-top:3px}.fullscreen-mode[_ngcontent-%COMP%] .video-controls[_ngcontent-%COMP%] .fullscreen-controls-layout[_ngcontent-%COMP%] .control-btn[_ngcontent-%COMP%] .pause-icon[_ngcontent-%COMP%]{color:var(--configBgTextColor)}.fullscreen-mode[_ngcontent-%COM
1P%] .video-controls[_ngcontent-%COMP%] .fullscreen-controls-layout[_ngcontent-%COMP%] .control-btn[_ngcontent-%COMP%] .icon-liteplay[_ngcontent-%COMP%], .fullscreen-mode[_ngcontent-%COMP%] .video-controls[_ngcontent-%COMP%] .fullscreen-controls-layout[_ngcontent-%COMP%] .control-btn[_ngcontent-%COMP%] .icon-litepause[_ngcontent-%COMP%]{font-size:18px;color:var(--configBgColor)!important}.fullscreen-mode[_ngcontent-%COMP%] .video-controls[_ngcontent-%COMP%] .fullscreen-controls-layout[_ngcontent-%COMP%] .control-group-center[_ngcontent-%COMP%]{flex:1 0 auto;justify-content:center;padding:0}.fullscreen-mode[_ngcontent-%COMP%] .video-controls[_ngcontent-%COMP%] .fullscreen-controls-layout[_ngcontent-%COMP%] .control-group-right[_ngcontent-%COMP%]{flex:0 0 auto;justify-content:flex-end}.progress-bar-container[_ngcontent-%COMP%]{position:relative;width:100%;height:6px;background:var(--configBgColor);border-radius:2px;cursor:pointer;-webkit-user-select:none;user-select:none}.progress-bar-container[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;background-color:var(--theme-interactive-link);border-radius:2px;transition:width .8s ease-out;will-change:width}.progress-bar-container[_ngcontent-%COMP%] .progress-indicator[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translate(-50%,-50%);width:14px;height:14px;background-color:var(--theme-interactive-link);border-radius:50%;cursor:pointer;transition:left .8s ease-out;will-change:left;box-shadow:0 0 4px #00bfff80}.progress-bar-container.dragging[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%], .progress-bar-container.dragging[_ngcontent-%COMP%] .progress-indicator[_ngcontent-%COMP%], .progress-bar-container.switching-video[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%], .progress-bar-container.switching-video[_ngcontent-%COMP%] .progress-indicator[_ngcontent-%COMP%]{transition:none}.time-display-left[_ngcontent-%COMP%]{color:var(--configBgTextColor);font-size:14px;font-weight:500}.time-display-right[_ngcontent-%COMP%]{color:var(--configBgTextColor);font-size:14px;font-weight:500;margin-right:5px}.controls-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:15px;z-index:10;position:relative}.fullscreen-controls-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:12px}.fullscreen-controls-layout[_ngcontent-%COMP%] .time-display-left[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .fullscreen-controls-layout[_ngcontent-%COMP%] .time-display-right[_ngcontent-%COMP%]{color:#fff!important}.progress-bar-row[_ngcontent-%COMP%]{width:100%;padding:0 20px;display:flex;align-items:center}.fullscreen-controls-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 20px;gap:15px}@media screen and (max-width: 992px){.fullscreen-controls-row[_ngcontent-%COMP%]{padding:0}.fullscreen-controls-row[_ngcontent-%COMP%] .control-group-center[_ngcontent-%COMP%]{gap:15px}}.control-group-center[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:20px;flex:1;padding:10px 0;z-index:10;position:relative}.control-group-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px}.control-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:var(--button-color, #00bfff);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;border-radius:4px}.control-btn.disabled[_ngcontent-%COMP%], .control-btn[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.control-btn.play-pause-btn[_ngcontent-%COMP%]{width:56px;height:56px;background-color:var(--configBgTextColor);color:var(--configBgColor);border-radius:50%}.control-btn.play-pause-btn[_ngcontent-%COMP%]:hover{transform:scale(1.05)}.control-btn.play-pause-btn[_ngcontent-%COMP%] .play-icon[_ngcontent-%COMP%]{margin-left:5px;margin-top:4px}.control-btn.play-pause-btn[_ngcontent-%COMP%] .pause-icon[_ngcontent-%COMP%]{margin-top:4px}.control-btn.play-pause-btn[_ngcontent-%COMP%] .icon-liteplay[_ngcontent-%COMP%], .control-btn.play-pause-btn[_ngcontent-%COMP%] .icon-litepause[_ngcontent-%COMP%]{font-size:24px}
1.control-btn.play-pause-btn[_ngcontent-%COMP%] .icon-liteplay[_ngcontent-%COMP%]:before, .control-btn.play-pause-btn[_ngcontent-%COMP%] .icon-litepause[_ngcontent-%COMP%]:before{color:var(--configSecondaryBgColor)}.control-btn.rewind-15[_ngcontent-%COMP%], .control-btn.forward-15[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;gap:2px}.control-btn.rewind-15[_ngcontent-%COMP%] .time-badge[_ngcontent-%COMP%], .control-btn.forward-15[_ngcontent-%COMP%] .time-badge[_ngcontent-%COMP%]{position:absolute;top:-8px;right:-8px;width:18px;height:18px;background:var(--button-color, #00bfff);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:600;border:1px solid #fff}.control-btn[_ngcontent-%COMP%] .icon-double-left[_ngcontent-%COMP%], .control-btn[_ngcontent-%COMP%] .icon-double-right[_ngcontent-%COMP%]{font-size:18px}.control-btn[_ngcontent-%COMP%] .icon-left[_ngcontent-%COMP%], .control-btn[_ngcontent-%COMP%] .icon-right[_ngcontent-%COMP%]{font-size:16px}.control-btn[_ngcontent-%COMP%] .download-icon[_ngcontent-%COMP%], .control-btn[_ngcontent-%COMP%] .volume-icon[_ngcontent-%COMP%], .control-btn[_ngcontent-%COMP%] .volume-mute-icon[_ngcontent-%COMP%], .control-btn[_ngcontent-%COMP%] .fullscreen-icon[_ngcontent-%COMP%]{font-size:18px}.control-btn[_ngcontent-%COMP%] .chevron-down[_ngcontent-%COMP%]{font-size:10px;margin-left:4px}.volume-control[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center}.volume-control[_ngcontent-%COMP%] .volume-btn[_ngcontent-%COMP%]{flex-shrink:0}.volume-control[_ngcontent-%COMP%] .volume-slider-container[_ngcontent-%COMP%]{position:absolute;top:-75px;left:50%;background:var(--configBgColor);border:1px solid var(--configSecondaryBgColor);transform:translate(-50%) translateY(-8px) rotate(-90deg);padding:4px 10px 10px;transform-origin:center;animation:_ngcontent-%COMP%_slideInVertical .3s ease;transition:all .3s ease}.volume-control[_ngcontent-%COMP%] .volume-slider[_ngcontent-%COMP%]{width:100px;height:4px;accent-color:#00b6ea;border-radius:2px;outline:none;cursor:pointer;z-index:10}.volume-control[_ngcontent-%COMP%] .volume-slider[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.3)}.volume-control[_ngcontent-%COMP%] .volume-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{appearance:none;width:12px;height:12px;background:var(--button-color, #00bfff);border-radius:50%;border:2px solid #fff;cursor:pointer;box-shadow:0 0 4px #00bfff80;-webkit-transition:all .2s ease;transition:all .2s ease}.volume-control[_ngcontent-%COMP%] .volume-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.2)}.volume-control[_ngcontent-%COMP%] .volume-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:12px;height:12px;background:var(--button-color, #00bfff);border-radius:50%;border:2px solid #fff;cursor:pointer;box-shadow:0 0 4px #00bfff80;-moz-transition:all .2s ease;transition:all .2s ease}.volume-control[_ngcontent-%COMP%] .volume-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.2)}.volume-control[_ngcontent-%COMP%] .volume-slider[_ngcontent-%COMP%]::-moz-range-track{background:rgba(255,255,255,.2);border-radius:2px;height:4px}@keyframes _ngcontent-%COMP%_slideIn{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}@keyframes _ngcontent-%COMP%_slideInVertical{0%{opacity:0;transform:translate(-50%) translateY(-18px) rotate(-90deg)}to{opacity:1;transform:translate(-50%) translateY(-8px) rotate(-90deg)}}.speed-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:14px;padding:8px}.speed-control[_ngcontent-%COMP%]{position:relative;background:var(--configBgColor);border-radius:8px}.speed-control[_ngcontent-%COMP%] .speed-rate[_ngcontent-%COMP%]{color:var(--configBgTextColor)}.speed-control[_ngcontent-%COMP%] .icon-litechevron_down[_ngcontent-%COMP%]{font-size:7px;color:var(--configBgTextColor);padding-left:5px}.speed-control[_ngcontent-%COMP%] .speed-menu[_ngcontent-%COMP%]{position:absolute;bottom:100%;left:50%;transform:translate(-50%);margin-bottom:8px;background:var(--configBgColor);border-radius:6px;padding:4px 0;min-width:70px;border:1px solid var(--configSecondaryBgColor);z-index:10}.speed-control[_ngcontent-%COMP%] .speed-menu[_ngcontent-%COMP%] .speed-option[_ngcontent-%COMP%]{display:block;width:100%;padding:6px 12px;background:transparent;border:none;color:var(--configBgTextColor);cursor:pointer;text-align:center;font-size:13px;transition:all .2s ease}.speed-control[_ngcontent-%COMP%] .speed-menu[_ngcontent-%COMP%] .speed-option[_ngcontent-%COMP%]:hover{background:var(--configThemeColor)}.speed-control[_ngcontent-%COMP%] .speed-menu[_ngcontent-%COMP%] .speed-option.active[_ngcontent-%COMP%]{color:var(--configPostTextColor);font-weight:600;background:var(--configThemeColor)}@media screen and (max-width: 768px){.control-btn.play-pause-btn[_ngcontent-%COMP%]{width:50px;height:50px}.control-btn.play-pause-btn[_ngcontent-%COMP%] .play-icon[_ngcontent-%COMP%], .control-btn.play-pause-btn[_ngcontent-%COMP%] .pause-icon[_ngcontent-%COMP%]{font-size:18px}.time-display-left[_ngcontent-%COMP%], .time-display-right[_ngcontent-%COMP%]{font-size:12px}.controls-row[_ngcontent-%COMP%]{gap:16px}.volume-control[_ngcontent-%COMP%] .volume-slider[_ngcontent-%COMP%]{width:60px}} .theme-whiteLabel .video-modal-container .purchase-via-subscription-lock .lock-image-contain{background:var(--configThemeColor)!important} .theme-whiteLabel .video-modal-container .share-button-container .share-button{background:var(--configThemeColor, #013956)} .theme-whiteLabel .video-modal-container .share-button-container .share-button em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .video-modal-container .icon-liteGroup:before, .theme-whiteLabel .video-modal-container .icon-liteGroup1:before{color:var(--configThemeColor)!important} .theme-whiteLabel .video-modal-container .icon-litebackward-15:before, .theme-whiteLabel .video-modal-container .icon-liteforward-15:before{color:var(--configThemeColor)!important} .theme-whiteLabel .video-modal-container .icon-litedownload:before, .theme-whiteLabel .video-modal-container .icon-liteic-volume:before, .theme-whiteLabel .video-modal-container .icon-litespeaker-mute:before, .theme-whiteLabel .video-modal-container .icon-litefullscreen:before{color:var(--configThemeColor)!important} .theme-whiteLabel .video-modal-container .video-modal-content{background:var(--configSecondaryBgColor)} .theme-whiteLabel .video-modal-container .close-button{background:var(--configThemeColor);color:var(--configButtonTextColor)!important} .theme-whiteLabel .video-modal-container .video-controls{background:var(--configSecondaryBgColor)} .theme-whiteLabel .video-modal-container .progress-bar-container{background:var(--configBgTextColor)!important} .theme-whiteLabel .video-modal-container .time-display-left span{color:var(--configPostTextColor)} .theme-whiteLabel .video-modal-container .content-length-handle{color:var(--configThemeColor)!important} .theme-whiteLabel .video-modal-container .time-display-right{color:var(--configPostTextColor)} .theme-whiteLabel .video-modal-container .control-btn{color:var(--button-color, #00bfff)} .theme-whiteLabel .video-modal-container .control-btn.play-pause-btn{background-color:var(--configThemeColor)!important;color:var(--configBgColor)} .theme-whiteLabel .video-modal-container .control-btn.play-pause-btn .icon-liteplay:before, .theme-whiteLabel .video-modal-container .control-btn.play-pause-btn .icon-litepause:before{color:var(--configButtonTextColor)!important} .theme-whiteLabel .video-modal-container .control-btn.rewind-15 .time-badge, .theme-whiteLabel .video-modal-container .control-btn.forward-15 .time-badge{background:var(--button-color, #00bfff)} .theme-whiteLabel .video-modal-container .volume-control .volume-slider-container{background:var(--configSecondaryBgColor)!important;border:1px solid var(--configPostTextColor)!important} .theme-whiteLabel .video-modal-container .volume-control .volume-slider{accent-color:var(--configThemeColor)!important} .theme-whiteLabel .video-modal-container .volume-control .volume-slider::-webkit-slider-thumb{background:var(--button-color, #00bfff)} .theme-whiteLabel .video-modal-container .volume-control .volume-slider::-moz-range-thumb{background:var(--button-color, #00bfff)} .theme-whiteLabel .video-modal-container .speed-control{background:var(--configThemeColor)} .theme-whiteLabel .video-modal-container .speed-control .speed-rate{color:var(--configButtonTextColor)!important} .theme-whiteLabel .video-modal-container .speed-control .icon-litechevron_down{color:var(--configButtonTextColor)!important} .theme-whiteLabel .video-modal-container .speed-control .speed-menu{background:var(--configSecondaryBgColor)!important;border:1px solid var(--configPostTextColor)!important} .theme-whiteLabel .video-modal-container .speed-control .speed-menu .speed-option{color:var(--configPostTextColor)!important} .theme-whiteLabel .video-modal-container .speed-control .speed-menu .speed-option:hover{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .video-modal-container .speed-control .speed-menu .speed-option.active{color:var(--configButtonTextColor)!important;background:var(--configThemeColor)!important}.video-title-description-container[_ngcontent-%COMP%]{padding:10px 20px 0}@media screen and (max-width: 992px){.video-title-description-container[_ngcontent-%COMP%]{display:none}}.video-title-description-container[_ngcontent-%COMP%] .video-title-description-container-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.video-title-description-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;font-size:20px;line-height:22px;letter-spacing:0px;margin-top:-10px}.video-title-description-container[_ngcontent-%COMP%] .date-of-release[_ngcontent-%COMP%]{color:var(--configBgTextColor, #ffffff);font-size:14px;font-weight:400;opacity:.7}.video-title-description-container[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%]{color:var(--configBgTextColor, #ffffff);font-size:14px;font-weight:400;opacity:.8;margin:0;line-height:1.4;padding-top:10px} .video-wrapper{position:relative;width:100%}
1 .video-wrapper.video-locked{cursor:default} .video-wrapper .black-overlay{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;padding:0;box-sizing:border-box;background:radial-gradient(circle at center,rgba(0,0,0,.5) 60%,rgba(0,0,0,.7) 100%);z-index:1000;border-radius:20px;pointer-events:none}.fullscreen-mode[_ngcontent-%COMP%] .video-wrapper .black-overlay{width:100%;height:100%;padding:0;border-radius:0;margin:0}.fullscreen-title-description-overlay[_ngcontent-%COMP%]{position:absolute;top:60px;left:70px;z-index:1001;max-width:45%}.fullscreen-title-description-overlay[_ngcontent-%COMP%] .fullscreen-title[_ngcontent-%COMP%]{font-weight:700;font-size:26px;line-height:25px;color:#fff!important;margin-bottom:10px;text-shadow:0 2px 4px rgba(0,0,0,.5);pointer-events:none}.fullscreen-title-description-overlay[_ngcontent-%COMP%] .fullscreen-description[_ngcontent-%COMP%]{font-weight:500;font-size:16px;line-height:1.7;color:#cbcbcb!important;opacity:.9;text-shadow:0 2px 4px rgba(0,0,0,.5);pointer-events:none}@media screen and (max-width: 992px){.fullscreen-title-description-overlay[_ngcontent-%COMP%] .fullscreen-description[_ngcontent-%COMP%]{display:none}}@media screen and (max-width: 992px){.fullscreen-title-description-overlay[_ngcontent-%COMP%]{top:20px;left:50px;max-width:70%}.fullscreen-title-description-overlay[_ngcontent-%COMP%] .fullscreen-title[_ngcontent-%COMP%]{font-size:18px;margin-bottom:6px}}@media screen and (max-width: 992px) and (max-width: 768px){.fullscreen-title-description-overlay[_ngcontent-%COMP%] .fullscreen-title[_ngcontent-%COMP%]{margin-bottom:4px}}@media screen and (max-width: 992px){.fullscreen-title-description-overlay[_ngcontent-%COMP%] .fullscreen-description[_ngcontent-%COMP%]{font-size:12px}}.video-loader-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:20px 20px 0;background:transparent;border-radius:20px;z-index:100;pointer-events:none}.subscription-option[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1001;width:90%;max-width:500px;gap:10px;padding:20px;text-align:center;pointer-events:auto}.subscription-option[_ngcontent-%COMP%] .free-preview-heading[_ngcontent-%COMP%]{margin:0;font-weight:700;font-size:24px;line-height:100%;letter-spacing:0px;text-align:center;color:#fff!important}@media screen and (max-width: 768px){.subscription-option[_ngcontent-%COMP%] .free-preview-heading[_ngcontent-%COMP%]{font-size:20px}}.subscription-option[_ngcontent-%COMP%] .free-preview-subheading[_ngcontent-%COMP%]{margin:0;font-weight:400;font-size:14px;line-height:140%;letter-spacing:0px;text-align:center;color:#fff!important}@media screen and (max-width: 768px){.subscription-option[_ngcontent-%COMP%] .free-preview-subheading[_ngcontent-%COMP%]{font-size:12px}}.subscription-option[_ngcontent-%COMP%] .locked-system[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;margin-top:20px}@media screen and (max-width: 992px){.subscription-option[_ngcontent-%COMP%] .locked-system[_ngcontent-%COMP%] .app-btn[_ngcontent-%COMP%]{font-size:10px}.subscription-option[_ngcontent-%COMP%] .locked-system[_ngcontent-%COMP%] .lock-image-contain[_ngcontent-%COMP%]{height:32px;width:32px}.subscription-option[_ngcontent-%COMP%] .locked-system[_ngcontent-%COMP%] .lock-image-contain[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{font-size:18px!important}}.subscription-option[_ngcontent-%COMP%] .lock-image-contain[_ngcontent-%COMP%]{background:var(--configThemeColor);margin-left:10px;border-radius:100%;padding:12px 11px;cursor:pointer;display:flex;justify-content:center;align-items:center;width:36px;height:36px;padding:0!important}.subscription-option[_ngcontent-%COMP%] .purchase-via-subscription-lock[_ngcontent-%COMP%]{z-index:100}.subscription-option[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{margin:0;gap:10px;flex-wrap:wrap;justify-content:center}.or-text[_ngcontent-%COMP%]{font-size:16px;font-weight:900;color:#fff!important}.unlock-with-points-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;max-width:100%;box-sizing:border-box}.unlock-with-points-btn__coin[_ngcontent-%COMP%]{flex-shrink:0;width:24px;height:24px;max-width:24px;object-fit:contain;margin:0;background:none;border-radius:0}.unlock-with-points-btn__points[_ngcontent-%COMP%], .unlock-with-points-btn__label[_ngcontent-%COMP%]{font-size:14px}@media (max-width: 992px){.unlock-with-points-btn__points[_ngcontent-%COMP%]{font-size:10px}.unlock-with-points-btn__coin[_ngcontent-%COMP%]{width:16px;height:16px}.unlock-with-points-btn__label[_ngcontent-%COMP%]{font-size:10px}}.title-description-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;align-items:center;margin-bottom:15px;padding:20px 20px 0}.title-description-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:400;font-size:16px;line-height:150%;letter-spacing:0px;text-align:center;vertical-align:bottom;opacity:.9;color:var(--configBgTextColor)}@media screen and (max-width: 992px){.title-description-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14px}}.title-description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-weight:500;font-size:20px;line-height:100%;letter-spacing:0px;text-align:center;vertical-align:bottom;color:var(--configBgTextColor)}@media screen and (max-width: 992px){.title-description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:18px}}.title-description-container[_ngcontent-%COMP%] .date-of-release[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:100%;letter-spacing:0px;opacity:.8;color:var(--configBgTextColor)}@media screen and (max-width: 992px){.title-description-container[_ngcontent-%COMP%] .date-of-release[_ngcontent-%COMP%]{font-size:12px}}.back-arrow-btn[_ngcontent-%COMP%]{text-decoration:none;font-size:24px;position:absolute;top:0;left:-30px;color:#fff!important;cursor:pointer}.fullscreen-tile-center[_ngcontent-%COMP%]{font-size:20px;font-weight:800;color:#fff!important}@media screen and (max-width: 992px){.fullscreen-tile-center[_ngcontent-%COMP%]{display:none}} .purchase-via-subscription-lock .lock-image-contain{margin-left:10px;border-radius:100%;padding:12px 10px;background:linear-gradient(95deg,#1de9b6 0%,#00b6ea 100%);cursor:pointer}"]}),v})()},95868:(Ie,xt,b)=>{b.d(xt,{r:()=>G});var r=b(88692),N=b(26695),V=b(64537);let G=(()=>{const J=class{};let X=J;return J.\u0275fac=function(U){return new(U||J)},J.\u0275cmp=V.Xpm({type:J,selectors:[["app-music-album-skeleton"]],standalone:!0,features:[V.jDz],decls:42,vars:0,consts:[[1,"album-header-card","d-flex","flex-column","gap-3"],[1,"d-flex","gap-3","flex-column","flex-lg-row","align-items-stretch"],["className","h-180 w-180 r-12 c-post"],[1,"d-flex","flex-column","gap-2","justify-content-end"],["className","h-24 w-250 r-4 c-bgt"],["className","h-14 w-180 r-4 c-bgt"],[1,"d-flex","flex-column","gap-2"],["className","h-16 w-150 r-4 c-bgt"],["className","h-14 w-100% r-4 c-bgt"],["className","h-14 w-90% r-4 c-bgt"],["className","h-14 w-70% r-4 c-bgt"],[1,"items-section","d-flex","flex-column","gap-3"],[1,"item-card","d-flex","flex-column","gap-2"],[1,"d-flex","gap-3","align-items-center"],["className","h-70 w-70 r-8 c-bgt"],[1,"d-flex","flex-column","gap-2","flex-grow-1"],["className","h-14 w-50% r-4 c-bgt"],["className","h-12 w-30% r-4 c-bgt"],["className","h-12 w-40% r-4 c-bgt"],[1,"d-flex","flex-column","gap-1"],["className","h-12 w-100% r-4 c-bgt"],["className","h-12 w-85% r-4 c-bgt"]],template:function(U,$){1&U&&(V.TgZ(0,"div",0)(1,"div",1),V._UZ(2,"app-skeleton",2),V.TgZ(3,"div",3),V._UZ(4,"app-skeleton",4)(5,"app-skeleton",5),V.qZA()(),V.TgZ(6,"div",6),V._UZ(7,"app-skeleton",7)(8,"app-skeleton",8)(9,"app-skeleton",9)(10,"app-skeleton",10),V.qZA()(),V.TgZ(11,"div",11)(12,"div",12)(13,"div",13),V._UZ(14,"app-skeleton",14),V.TgZ(15,"div",15),V._UZ(16,"app-skeleton",16)(17,"app-skeleton",17)(18,"app-skeleton",18),V.qZA()(),V.TgZ(19,"div",19),V._UZ(20,"app-skeleton",20)(21,"app-skeleton",21),V.qZA()(),V.TgZ(22,"div",12)(23,"div",13),V._UZ(24,"app-skeleton",14),V.TgZ(25,"div",15),V._UZ(26,"app-skeleton",16)(27,"app-skeleton",17)(28,"app-skeleton",18),V.qZA()(),V.TgZ(29,"div",19),V._UZ(30,"app-skeleton",20)(31,"app-skeleton",21),V.qZA()(),V.TgZ(32,"div",12)(33,"div",13),V._UZ(34,"app-skeleton",14),V.TgZ(35,"div",15),V._UZ(36,"app-skeleton",16)(37,"app-skeleton",17)(38,"app-skeleton",18),V.qZA()(),V.TgZ(39,"div",19),V._UZ(40,"app-skeleton",20)(41,"app-skeleton",21),V.qZA()()())},dependencies:[r.ez,N._],styles:[".album-header-card[_ngcontent-%COMP%]{background-color:var(--configSecondaryBgColor);border-radius:32px;padding:16px}.items-section[_ngcontent-%COMP%]{background-color:var(--configSecondaryBgColor);border-radius:32px;padding:16px;margin-top:16px}.item-card[_ngcontent-%COMP%]{background-color:var(--configBgColor);border-radius:12px;padding:16px}"]}),X})()},45178:(Ie,xt,b)=>{b.d(xt,{V:()=>X});var r=b(88692),N=b(26695),V=b(64537);function G(J,mt){1&J&&(V.TgZ(0,"div",13)(1,"div",14),V._UZ(2,"app-skeleton",15),V.qZA(),V.TgZ(3,"div",16),V._UZ(4,"app-skeleton",17)(5,"app-skeleton",18),V.qZA()())}let X=(()=>{const mt=class{constructor(){this.itemIndices=[1,2,3]}};let J=mt;return mt.\u0275fac=function($){return new($||mt)},mt.\u0275cmp=V.Xpm({type:mt,selectors:[["app-portfolio-banner-skeleton"]],standalone:!0,features:[V.jDz],decls:13,vars:1,consts:[[1,"skeleton-portfolio"],[1,"skeleton-portfolio-heading"],["className","h-24 w-400 r-6 c-bgt"],[1,"skeleton-portfolio-banner-container"],[1,"skeleton-portfolio-banner"],["className","h-100% w-100% r-30 c-bg"],[1,"skeleton-portfolio-title"],["className","h-20 w-180 r-6 c-post"],[1,"skeleton-portfolio-content"],[1,"skeleton-portfolio-tab"],["className","h-16 w-160 r-4 c-post"],[1,"skeleton-portfolio-items"],["class","skeleton-portfolio-item",4,"ngFor","ngForOf"],[1,"skeleton-portfolio-item"],[1,"skeleton-portfolio-thumb"],["className","h-100% w-100% r-12 c-bg"],[1,"skeleton-portfolio-item-text"],["className","h-14 w-120 r-6 c-sbg"],["className","h-12 w-60 r-6 c-sbg"]],template:function($,vt){1&$&&(V.TgZ(0,"div",0)(1,"div",1),V._UZ(2,"app-skeleton",2),V.qZA(),V.TgZ(3,"div",3)(4,"div",4),V._UZ(5,"app-skeleton",5),V.qZA(),V.TgZ(6,"div",6),V._UZ(7,"app-skeleton",7),V.qZA()(),V.TgZ(8,"div",8)(9,"div",9),V._UZ(10,"app-skeleton",10),V.qZA(),V.TgZ(11,"div",11),V.YNc(12,G,6,0,"div",12),V.qZA()()()),2&$&&(V.xp6(12),V.Q6J("ngForOf",vt.itemIndices))},dependencies:[r.ez,r.sg,N._],styles:[".skeleton-portfolio[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.skeleton-portfolio[_ngcontent-%COMP%] .skeleton-portfolio-banner-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:16px;border-radius:30px;position:relative;background:var(--configSecondaryBgColor)}.skeleton-portfolio-heading[_ngcontent-%COMP%]{margin-bottom:0}.skeleton-portfolio-banner[_ngcontent-%COMP%]{aspect-ratio:2/1;width:100%;border-radius:30px;overflow:hidden}.skeleton-portfolio-title[_ngcontent-%COMP%]{margin-top:-8px}.skeleton-portfolio-content[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor);border-radius:30px;padding:24px}.skeleton-portfolio-tab[_ngcontent-%COMP%]{padding:12px 0 0;margin-bottom:16px}.skeleton-portfolio-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.skeleton-portfolio-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:16px;border-radius:16px;background:var(--configBgColor);margin-bottom:12px}.skeleton-portfolio-thumb[_ngcontent-%COMP%]{width:80px;height:80px;flex-shrink:0;border-radius:12px;overflow:hidden}.skeleton-portfolio-item-text[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:8px}@media screen and (max-width: 992px){.skeleton-portfolio-banner[_ngcontent-%COMP%]{border-radius:20px}.skeleton-portfolio-content[_ngcontent-%COMP%]{border-radius:20px;padding:16px}.skeleton-portfolio-thumb[_ngcontent-%COMP%]{width:64px;
1height:64px}}"]}),J})()},45049:(Ie,xt,b)=>{b.d(xt,{F:()=>B});var r=b(64537),N=b(84539),V=b(38023),G=b(42384),X=b(59302),J=b(13528),mt=b(37652),O=b(59735),U=b(26877),$=b(91205),vt=b(32401),t=b(22274),it=b(44689),st=b(89321),oe=b(37524),ft=b.n(oe),Lt=b(73794),_t=b(92110),rt=b(6677),St=b(56257),d=b(22864),ut=b(88692),Ct=b(61354),ie=b(22348),ne=b(95868),Wt=b(58642),Qt=b(67246),Ft=b(49371),Nt=b(98508),It=b(57311),Rt=b(58217),at=b(75728),c=b(16570),lt=b(21306),W=b(6913),se=b(36194),qt=b(57144),Bt=b(94077);const gt=["unlockModal"],Et=function(R,Z){return{"status-disabled":R,"status-drafted":Z}};function l(R,Z){if(1&R&&(r.TgZ(0,"div",21)(1,"div",22),r._uU(2),r.qZA()()),2&R){const g=r.oxw();r.xp6(1),r.Q6J("ngClass",r.WLB(2,Et,g.isStatusInactive(),g.isStatusDraft())),r.xp6(1),r.hij(" ",g.getItemStatus()," ")}}function bt(R,Z){if(1&R&&(r.TgZ(0,"span"),r._uU(1),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.Oqu(g.PORTFOLIO_MASTER_ITEM_TYPE[g.portfolioType])}}const nt=function(R){return{"selector-used-lock-button":R}};function yt(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"div",23)(1,"button",24),r.NdJ("click",function(x){r.CHM(g);const C=r.oxw();return r.KtG(C.onLockClick(C.albumHeaderData,x))}),r._UZ(2,"em",25),r.YNc(3,bt,2,1,"span",26),r.qZA()()}if(2&R){const g=r.oxw();r.xp6(1),r.Q6J("ngClass",r.VKq(2,nt,g.isSelectorUsed)),r.xp6(2),r.Q6J("ngIf",!g.isSelectorUsed)}}function ct(R,Z){1&R&&(r.TgZ(0,"div",23)(1,"button",27),r._UZ(2,"em",28),r.qZA()())}function Q(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"div",29)(1,"button",30),r.NdJ("click",function(){r.CHM(g);const x=r.oxw();return r.KtG(x.onEditClickHandler())}),r._UZ(2,"em",31),r.qZA()()}}function Mt(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"div",32)(1,"button",33),r.NdJ("click",function(){r.CHM(g);const x=r.oxw();return r.KtG(x.onShareClick())}),r._UZ(2,"em",34),r.qZA()()}}function Tt(R,Z){if(1&R&&r._UZ(0,"img",35),2&R){const g=r.oxw();r.Q6J("src",null==g.albumHeaderData?null:g.albumHeaderData.cover_image_url,r.LSH)("alt",g.title)("originalUrl",null==g.albumHeaderData?null:g.albumHeaderData.cover_image_url)("format","webp")}}function kt(R,Z){1&R&&(r.TgZ(0,"div",36),r._UZ(1,"em",37),r.qZA())}function Yt(R,Z){if(1&R&&(r.TgZ(0,"span"),r._uU(1),r.ALo(2,"date"),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.AsE(" ",g.isReleaseYearType?g.MUSIC_PLAYER_CONST.RELEASED_YEAR:g.MUSIC_PLAYER_CONST.RELEASED,": ",g.isReleaseYearType?g.dateOfRelease:r.xi3(2,2,g.dateOfRelease,"MMM d, yyyy")," ")}}function Ht(R,Z){1&R&&(r.TgZ(0,"span"),r._uU(1," | "),r.qZA())}function re(R,Z){if(1&R&&(r.TgZ(0,"span"),r._uU(1),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.Oqu(g.songCountText)}}function wt(R,Z){if(1&R&&(r.TgZ(0,"div",38),r.YNc(1,Yt,3,5,"span",26),r.YNc(2,Ht,2,0,"span",26),r.YNc(3,re,2,1,"span",26),r.qZA()),2&R){const g=r.oxw();r.xp6(1),r.Q6J("ngIf",g.dateOfRelease),r.xp6(1),r.Q6J("ngIf",g.dateOfRelease&&(null==g.albumHeaderData||null==g.albumHeaderData.items?null:g.albumHeaderData.items.length)),r.xp6(1),r.Q6J("ngIf",null==g.albumHeaderData||null==g.albumHeaderData.items?null:g.albumHeaderData.items.length)}}function At(R,Z){if(1&R&&(r.TgZ(0,"div",39),r._UZ(1,"app-dsp-list",40),r.qZA()),2&R){const g=r.oxw();r.xp6(1),r.Q6J("dsps",null==g.albumHeaderData?null:g.albumHeaderData.dsp)("portfolioType",g.portfolioType)}}function ae(R,Z){if(1&R&&(r.TgZ(0,"div",41),r._UZ(1,"app-dsp-list",40),r.qZA()),2&R){const g=r.oxw();r.xp6(1),r.Q6J("dsps",null==g.albumHeaderData?null:g.albumHeaderData.dsp)("portfolioType",g.portfolioType)}}function le(R,Z){1&R&&(r.TgZ(0,"p",46),r._uU(1,"-"),r.qZA())}function ce(R,Z){if(1&R&&r._UZ(0,"p",47),2&R){const g=r.oxw(2);r.Q6J("lines",2)("innerHTML",g.albumHeaderData.description,r.oJD)}}function de(R,Z){if(1&R&&(r.TgZ(0,"div",42)(1,"h3",43),r._uU(2),r.qZA(),r.YNc(3,le,2,0,"p",44),r.YNc(4,ce,1,2,"p",45),r.qZA()),2&R){const g=r.oxw();r.xp6(2),r.Oqu(g.PORTFOLIO_MASTER_DESCRIPTION_TITLE_MAP[g.portfolioType]),r.xp6(1),r.Q6J("ngIf",!(null!=g.albumHeaderData&&g.albumHeaderData.description)),r.xp6(1),r.Q6J("ngIf",null==g.albumHeaderData?null:g.albumHeaderData.description)}}function pe(R,Z){if(1&R&&(r.TgZ(0,"div",48)(1,"div",49),r._uU(2),r.qZA(),r._UZ(3,"app-dsp-modal-body",50),r.qZA()),2&R){const g=r.oxw();r.xp6(2),r.Oqu(g.Fields.AVAILABLE_ON),r.xp6(1),r.Q6J("dsps",null==g.albumHeaderData?null:g.albumHeaderData.dsp)}}const ue=function(R){return{"music-header-selector-used":R}},ge=function(R){return{"video-art-container":R}};let me=(()=>{const Z=class{constructor(k,x,C,H,P,S){this.shareDialogService=k,this.modalService=x,this.router=C,this.cs=H,this.cdr=P,this.musicUnlockService=S,this.albumHeaderData=null,this.portfolioType=N.fD.TYPE.MUSIC,this.category=$.fD.MUSIC_ALBUM_CATEGORY,this.isSelectorUsed=!1,this.userData=null,this.isMyProfile=!1,this.shareUrl="",this.isDashboardRoute=!1,this.userSubscriptionList=[],this.pUserSubscriptionList=[],this.userId="",this.portfolioTypeId="",this.isLivestreamContext=!1,this.onTranslationChanged=new r.vpe,this.portfolioContentUnlockedWithPoints=new r.vpe,this.selectedItem=null,this.unlockModalHeader=N.fD.UNLOCK_MODAL_HEADER,this.unlockModalMessage=N.fD.UNLOCK_MODAL_MESSAGE,this.destroy$=new V.x,this.dateOfRelease=null,this.isReleaseYearType=!1,this.Fields=N.Iv,this.descriptionMaxLength=O.Mx.TWO_HUNDRED,this.PORTFOLIO_CONSTS_CONST=$.fD,this.PORTFOLIO_TYPE_CONSTS=st.W,this.CONSTS=_t.oM,this.MUSIC_PLAYER_CONST=Nt.UU,this.PAYMENT_FOR_TYPE=N.Vw,this.PORTFOLIO_MASTER_DESCRIPTION_TITLE_MAP=_t.kt,this.PORTFOLIO_MASTER_TYPE_LABEL_MAP=_t.Gn,this.PORTFOLIO_MASTER_ITEM_TYPE=$.gV}ngOnChanges(k){k.albumHeaderData&&this.albumHeaderData&&this.calculateReleaseDate()}calculateReleaseDate(){const k=(0,U.NH)(this.albumHeaderData?.release_date);k.type===Rt.vI.RELEASE_TYPE_YEAR?(this.dateOfRelease=k.value,this.isReleaseYearType=!0):k.type===Rt.vI.RELEASE_TYPE_DATE?(this.dateOfRelease=(0,U.Tl)(this.albumHeaderData?.release_date),this.isReleaseYearType=!1):(this.dateOfRelease=null,this.isReleaseYearType=!1)}seeLessMore(){this.albumHeaderData?.description?.length&&(this.albumHeaderData={...this.albumHeaderData,isMore:!this.albumHeaderData.isMore},this.cdr.detectChanges())}onShareClick(){this.shareModal()}loginDialog(){return this.modalService.show(Ft.D,{})}onLockClick(k,x){if(this.isMyProfile)return;this.selectedItem=k,this.unlockModalHeader="Unlock "+this.portfolioType.charAt(0).toUpperCase()+this.portfolioType.slice(1).toLowerCase()+(this.portfolioType.toLowerCase()===N.fD.TYPE.MUSIC.toLowerCase()?Nt.UU.SPACE_ALBUM:Nt.UU.SPACE_SERIES),this.cdr.detectChanges();const C=this.getUnlockConfig();this.musicUnlockService.handleLockClick(k,x,C)}getUnlockConfig(){return{selectedItem:this.selectedItem,visitedUserProfile:this.userData,userSubscriptionList:this.userSubscriptionList,pUserSubscriptionList:this.pUserSubscriptionList,portfolioType:this.portfolioType,unlockModal:this.unlockModal,destroy$:this.destroy$,isIndividual:!1,userId:this.userId,portfolioTypeId:this.portfolioTypeId,isAlbumLocking:!0,isLivestreamContext:this.isLivestreamContext}}onPurchaseIndividual(){this.musicUnlockService.purchaseIndividual(this.getUnlockConfig())}onPurchaseSubscription(){this.musicUnlockService.purchaseSubscription(this.getUnlockConfig())}onPurchaseNft(){this.musicUnlockService.purchaseNft(this.getUnlockConfig())}onPortfolioUnlockedWithPoints(){this.portfolioContentUnlockedWithPoints.emit()}onEditClickHandler(){this.albumHeaderData?.sk&&this.router.navigate(["/monetize/portfolio",st.W.ADD_EDIT_ROUTE_PATH[this.portfolioType],this.cs.encodeToUTF(this.albumHeaderData.sk)])}shareModal(){if(!this.albumHeaderData?.sk)return;const k=this.cs.decodeToUTF(this.albumHeaderData.sk),{msg:x,url:C,userName:H}=(0,St.hr)(this.userData,this.albumHeaderData.sk,this.portfolioType,k,this.shareUrl||void 0),P=(0,St.a4)({userData:this.userData,sk:this.albumHeaderData.sk,portfolioMsg:x,url:C,userName:H,image:this.albumHeaderData?.cover_image_url||"",isMyProfile:this.isMyProfile});this.shareDialogService.openShareDialog(P,{backdrop:"static"})}get songCountText(){return this.albumHeaderData?.items?.length===O.Mx.ONE?O.Mx.ONE+" "+st.W.PORTFOLIO_MASTER_CHILD_TYPE[this.portfolioType]:`${this.albumHeaderData?.items?.length} ${st.W.PORTFOLIO_MASTER_CHILD_TYPE_MULTIPLE[this.portfolioType]}`}getItemStatus(){if(!this.albumHeaderData?.status)return null;
1const k=this.albumHeaderData.status.toUpperCase();return k===st.W.PORTFOLIO_STATUS.INACTIVE.toUpperCase()?this.CONSTS.DISABLED:k===st.W.PORTFOLIO_STATUS.DRAFT.toUpperCase()?this.CONSTS.DRAFTED:null}shouldShowStatus(){return null!==this.getItemStatus()}isStatusInactive(){return this.albumHeaderData?.status?.toUpperCase()===st.W.PORTFOLIO_STATUS.INACTIVE.toUpperCase()}isStatusDraft(){return this.albumHeaderData?.status?.toUpperCase()===st.W.PORTFOLIO_STATUS.DRAFT.toUpperCase()}get isVideoPortrait(){if(this.portfolioType!==st.W.PORTFOLIO_TYPE.VIDEO||!this.albumHeaderData)return!1;if(!0===this.albumHeaderData.is_portrait)return!0;const k=this.albumHeaderData?.items?.[0];return!0===k?.is_portrait||!!k?.file&&(0,U.p4)(k.file,[O.Mx.PORTFOLIO.toLowerCase()])===O.Mx.PORTRAIT}};let R=Z;return Z.\u0275fac=function(x){return new(x||Z)(r.Y36(Qt.h),r.Y36(at.tT),r.Y36(d.F0),r.Y36(G.v),r.Y36(r.sBO),r.Y36(It.A))},Z.\u0275cmp=r.Xpm({type:Z,selectors:[["app-music-album-header"]],viewQuery:function(x,C){if(1&x&&r.Gf(gt,5),2&x){let H;r.iGM(H=r.CRH())&&(C.unlockModal=H.first)}},inputs:{albumHeaderData:"albumHeaderData",portfolioType:"portfolioType",category:"category",isSelectorUsed:"isSelectorUsed",userData:"userData",isMyProfile:"isMyProfile",shareUrl:"shareUrl",isDashboardRoute:"isDashboardRoute",userSubscriptionList:"userSubscriptionList",pUserSubscriptionList:"pUserSubscriptionList",userId:"userId",portfolioTypeId:"portfolioTypeId",isLivestreamContext:"isLivestreamContext"},outputs:{onTranslationChanged:"onTranslationChanged",portfolioContentUnlockedWithPoints:"portfolioContentUnlockedWithPoints"},features:[r.TTD],decls:24,vars:32,consts:[[1,"portfolio-album-header-container",3,"ngClass"],[1,"action-buttons-container"],["class","status-badge-container",4,"ngIf"],["class","lock-button-container",4,"ngIf"],["class","edit-button-container",4,"ngIf"],["class","share-button-container",4,"ngIf"],[1,"album-content-wrapper"],[1,"album-art-section"],[1,"album-art-container",3,"ngClass"],["class","album-art-image","loading","lazy","decoding","async","appDisableRightClick","","appMobileOptimization","",3,"src","alt","originalUrl","format",4,"ngIf"],["class","album-art-placeholder",4,"ngIf"],[1,"album-details-section"],[1,"album-header-info"],[1,"album-title"],["class","album-meta",4,"ngIf"],["class","dsp-section",4,"ngIf"],["class","dsp-section selector-used-dsp-section",4,"ngIf"],["class","album-description-section",4,"ngIf"],["class","album-dsp-modal-body-container",4,"ngIf"],[3,"selectedItem","userProfile","userSubscriptionList","pUserSubscriptionList","contentType","headerType","userId","isLocked","portfolioType","isAlbumLocking","unlockModalHeader","isAllowedToRedirect","isLivestreamContext","purchaseIndividual","purchaseSubscription","purchaseNft","unlockedWithPoints"],["unlockModal",""],[1,"status-badge-container"],[1,"status-badge",3,"ngClass"],[1,"lock-button-container"],["aria-label","Locked",1,"lock-button","lock-icon","btn","btn-primary",3,"ngClass","click"],[1,"icon-lock"],[4,"ngIf"],["aria-label","Locked",1,"unlock-button","lock-icon"],[1,"icon-liteunlock-filled-white"],[1,"edit-button-container"],["aria-label","Edit",1,"edit-button",3,"click"],[1,"icon-profileedit"],[1,"share-button-container"],["aria-label","Share",1,"share-button",3,"click"],[1,"icon-profile-share"],["loading","lazy","decoding","async","appDisableRightClick","","appMobileOptimization","",1,"album-art-image",3,"src","alt","originalUrl","format"],[1,"album-art-placeholder"],[1,"icon-litemusic-node-2"],[1,"album-meta"],[1,"dsp-section"],[3,"dsps","portfolioType"],[1,"dsp-section","selector-used-dsp-section"],[1,"album-description-section"],[1,"description-heading"],["class","description-text-",4,"ngIf"],["class","description-text","appReadMore","",3,"lines","innerHTML",4,"ngIf"],[1,"description-text-"],["appReadMore","",1,"description-text",3,"lines","innerHTML"],[1,"album-dsp-modal-body-container"],[1,"album-dsp-modal-body-title"],[3,"dsps"]],template:function(x,C){1&x&&(r.TgZ(0,"div",0)(1,"div",1),r.YNc(2,l,3,5,"div",2),r.ynx(3),r.YNc(4,yt,4,4,"div",3),r.YNc(5,ct,3,0,"div",3),r.BQk(),r.YNc(6,Q,3,0,"div",4),r.YNc(7,Mt,3,0,"div",5),r.qZA(),r.TgZ(8,"div",6)(9,"div",7)(10,"div",8),r.YNc(11,Tt,1,4,"img",9),r.YNc(12,kt,2,0,"div",10),r.qZA()(),r.TgZ(13,"div",11)(14,"div",12)(15,"h1",13),r._uU(16),r.qZA(),r.YNc(17,wt,4,3,"div",14),r.qZA(),r.YNc(18,At,2,2,"div",15),r.qZA()(),r.YNc(19,ae,2,2,"div",16),r.YNc(20,de,5,3,"div",17),r.YNc(21,pe,4,2,"div",18),r.qZA(),r.TgZ(22,"app-portfolio-unlock-modal",19,20),r.NdJ("purchaseIndividual",function(){return C.onPurchaseIndividual()})("purchaseSubscription",function(){return C.onPurchaseSubscription()})("purchaseNft",function(){return C.onPurchaseNft()})("unlockedWithPoints",function(){return C.onPortfolioUnlockedWithPoints()}),r.qZA()),2&x&&(r.Q6J("ngClass",r.VKq(28,ue,C.isSelectorUsed)),r.xp6(2),r.Q6J("ngIf",C.shouldShowStatus()&&C.isMyProfile&&!C.isDashboardRoute),r.xp6(2),r.Q6J("ngIf",C.isMyProfile&&(null==C.albumHeaderData?null:C.albumHeaderData.is_locked)||(null==C.albumHeaderData?null:C.albumHeaderData.isLocked)),r.xp6(1),r.Q6J("ngIf",!C.isMyProfile&&(null==C.albumHeaderData?null:C.albumHeaderData.is_locked)&&!(null!=C.albumHeaderData&&C.albumHeaderData.isLocked)),r.xp6(1),r.Q6J("ngIf",C.isMyProfile&&!C.isDashboardRoute),r.xp6(1),r.Q6J("ngIf",!C.isSelectorUsed),r.xp6(3),r.Q6J("ngClass",r.VKq(30,ge,C.portfolioType===C.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_TYPE.VIDEO)),r.xp6(1),r.Q6J("ngIf",null==C.albumHeaderData?null:C.albumHeaderData.cover_image_url),r.xp6(1),r.Q6J("ngIf",!(null!=C.albumHeaderData&&C.albumHeaderData.cover_image_url)),r.xp6(4),r.Oqu(null==C.albumHeaderData?null:C.albumHeaderData.title),r.xp6(1),r.Q6J("ngIf",C.dateOfRelease||(null==C.albumHeaderData||null==C.albumHeaderData.items?null:C.albumHeaderData.items.length)),r.xp6(1),r.Q6J("ngIf",(null==C.albumHeaderData||null==C.albumHeaderData.dsp?null:C.albumHeaderData.dsp.length)&&(null==C.albumHeaderData||null==C.albumHeaderData.items?null:C.albumHeaderData.items.length)&&!C.isSelectorUsed),r.xp6(1),r.Q6J("ngIf",(null==C.albumHeaderData||null==C.albumHeaderData.dsp?null:C.albumHeaderData.dsp.length)&&(null==C.albumHeaderData||null==C.albumHeaderData.items?null:C.albumHeaderData.items.length)&&C.isSelectorUsed),r.xp6(1),r.Q6J("ngIf",null==C.albumHeaderData?null:C.albumHeaderData.description),r.xp6(1),r.Q6J("ngIf",(null==C.albumHeaderData||null==C.albumHeaderData.dsp?null:C.albumHeaderData.dsp.length)&&!(null!=C.albumHeaderData&&null!=C.albumHeaderData.items&&C.albumHeaderData.items.length)),r.xp6(1),r.Q6J("selectedItem",C.selectedItem)("userProfile",C.userData)("userSubscriptionList",C.userSubscriptionList)("pUserSubscriptionList",C.pUserSubscriptionList)("contentType",C.PAYMENT_FOR_TYPE.MUSIC_PORTFOLIO)("headerType",C.PORTFOLIO_MASTER_TYPE_LABEL_MAP[C.portfolioType])("userId",null==C.userData?null:C.userData.email)("isLocked",null==C.selectedItem?null:C.selectedItem.isLocked)("portfolioType",C.portfolioType)("isAlbumLocking",!0)("unlockModalHeader",C.unlockModalHeader)("isAllowedToRedirect",!C.isLivestreamContext)("isLivestreamContext",C.isLivestreamContext))},dependencies:[ut.mk,ut.O5,c.h,lt.w,W.m,se.J,qt.V,Bt.p,ut.uU],styles:[".portfolio-album-header-container[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor);border-radius:32px;padding:24px;position:relative;width:100%}.portfolio-album-header-container[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-shrink:0}.portfolio-album-header-container[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]{background:transparent;border:none;color:var(--configBgTextColor, #ffffff);cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;transition:opacity .2s ease}.portfolio-album-header-container[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:18px}.portfolio-album-header-container[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon.lock-icon[_ngcontent-%COMP%]{color:var(--theme-interactive-link);background:linear-gradient(135deg,rgba(29,233,182,.1) .33%,rgba(0,182,234,.1) 99.62%);border-radius:50%}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%]{padding:8px}}.portfolio-album-header-container[_ngcontent-%COMP%] .action-buttons-container[_ngcontent-%COMP%]{position:absolute;top:24px;right:24px;z-index:10;display:flex;align-items:center;gap:12px}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .action-buttons-container[_ngcontent-%COMP%]{top:20px;right:20px;gap:8px}}.portfolio-album-header-container[_ngcontent-%COMP%] .status-badge-container[_ngcontent-%COMP%] .status-badge[_ngcontent-%COMP%]{padding:10px 12px;border-radius:25px;font-size:16px;font-weight:600;text-align:center}.portfolio-album-header-container[_ngcontent-%COMP%] .status-badge-container[_ngcontent-%COMP%] .status-badge.status-disabled[_ngcontent-%COMP%]{background:#fe4040;color:#fff!important}.portfolio-album-header-container[_ngcontent-%COMP%] .status-badge-container[_ngcontent-%COMP%] .status-badge.status-drafted[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .status-badge-container[_ngcontent-%COMP%] .status-badge[_ngcontent-%COMP%]{padding:8px 20px;width:auto;min-width:80px}}.portfolio-album-header-container[_ngcontent-%COMP%] .edit-button-container[_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;background:var(--configThemeColor, #013956);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .edit-button-container[_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%]{width:32px;height:32px}}.portfolio-album-header-container[_ngcontent-%COMP%] .edit-button-container[_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%]:hover{opacity:1;transform:scale(1.05)}.portfolio-album-header-container[_ngcontent-%COMP%] .edit-button-container[_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:18px}.portfolio-album-header-container[_ngcontent-%COMP%] .edit-button-container[_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{color:var(--configButtonTextColor)}.portfolio-album-header-container[_ngcontent-%COMP%] .selector-used-lock-button[_ngcontent-%COMP%]{padding:8px 10px!important;border-radius:50%}.portfolio-album-header-container[_ngcontent-%COMP%] .selector-used-lock-button[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{margin:0!important}.portfolio-album-header-container[_ngcontent-%COMP%] .share-button-container[_ngcontent-%COMP%] .share-button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;background:var(--configThemeColor, #013956);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .share-button-container[_ngcontent-%COMP%] .share-button[_ngcontent-%COMP%]{width:32px;height:32px}}.portfolio-album-header-container[_ngcontent-%COMP%] .share-button-container[_ngcontent-%COMP%] .share-button[_ngcontent-%COMP%]:hover{opacity:1;transform:scale(1.05)}.portfolio-album-header-container[_ngcontent-%COMP%] .share-button-container[_ngcontent-%COMP%] .share-button[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--configButtonTextColor);font-size:18px}.portfolio-album-header-container[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .lock-button[_ngcontent-%COMP%]{gap:10px;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease;background:var(--configThemeColor)!important}.portfolio-album-header-container[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .lock-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--configButtonTextColor)}.portfolio-album-header-container[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .lock-button[_ngcontent-%COMP%]:hover{opacity:1;transform:scale(1.05)}.portfolio-album-header-container[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .lock-button[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{color:var(--configButtonTextColor);font-size:22px}.portfolio-album-header-container[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .unlock-button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;background:var(--configThemeColor, #013956);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .unlock-button[_ngcontent-%COMP%]{width:32px;height:32px}}.portfolio-album-header-container[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .unlock-button[_ngcontent-%COMP%]:hover{opacity:1;transform:scale(1.05)}.portfolio-album-header-container[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .unlock-button[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{color:var(--configButtonTextColor);font-size:24px}.portfolio-album-header-container[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%]{display:flex;gap:24px;align-items:flex-end}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%]{flex-direction:column;gap:24px;align-items:flex-start}}.portfolio-album-header-container[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%]{flex-shrink:0}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%]{width:100%}}.portfolio-album-header-container[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%] .video-art-container[_ngcontent-%COMP%]{width:100%!important;height:auto!important;max-width:400px!important;aspect-ratio:16/9!important}.portfolio-album-header-container[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%] .album-art-container[_ngcontent-%COMP%]{width:300px;height:300px;border-radius:12px;overflow:hidden;box-shadow:0 4px 12px #0000004d}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%] .album-art-container[_ngcontent-%COMP%]{width:100%!important;margin:0 auto}}.portfolio-album-header-container[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%] .album-art-container[_ngcontent-%COMP%] .album-art-image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.portfolio-album-header-container[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%] .album-art-container[_ngcontent-%COMP%] .album-art-placeholder[_ngcontent-%COMP%]{width:100%;height:100%;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);display:flex;align-items:center;justify-content:center}.portfolio-album-header-container[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%] .album-art-container[_ngcontent-%COMP%] .album-art-placeholder[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:7rem;color:var(--theme-interactive-link)}.portfolio-album-header-container[_ngcontent-%COMP%] .album-details-section[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:24px}.portfolio-album-header-container[_ngcontent-%COMP%] .album-details-section[_ngcontent-%COMP%] .album-header-info[_ngcontent-%COMP%] .album-category[_ngcontent-%COMP%]{display:block;color:var(--configPostTextColor, #ffffff);font-size:14px;font-weight:400;margin-bottom:8px;opacity:.8}.portfolio-album-header-container[_ngcontent-%COMP%] .album-details-section[_ngcontent-%COMP%] .album-header-info[_ngcontent-%COMP%] .album-title[_ngcontent-%COMP%]{color:var(--configPostTextColor, #ffffff);font-size:30px;font-weight:800;margin:0 0 12px;line-height:130%}@media (max-width: 768px){.portfolio-album-header-container[_ngcontent-%COMP%] .album-details-section[_ngcontent-%COMP%] .album-h
1eader-info[_ngcontent-%COMP%] .album-title[_ngcontent-%COMP%]{font-size:24px}}.portfolio-album-header-container[_ngcontent-%COMP%] .album-details-section[_ngcontent-%COMP%] .album-header-info[_ngcontent-%COMP%] .album-meta[_ngcontent-%COMP%]{color:var(--configPostTextColor, #ffffff);font-size:14px;font-weight:400;opacity:.8;display:flex;gap:6px;flex-wrap:wrap}.portfolio-album-header-container[_ngcontent-%COMP%] .album-details-section[_ngcontent-%COMP%] .dsp-section[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content}.portfolio-album-header-container[_ngcontent-%COMP%] .album-description-section[_ngcontent-%COMP%]{margin-top:24px}.portfolio-album-header-container[_ngcontent-%COMP%] .album-description-section[_ngcontent-%COMP%] .description-heading[_ngcontent-%COMP%]{color:var(--configPostTextColor, #ffffff);font-size:18px;font-weight:600;margin:0 0 12px}.portfolio-album-header-container[_ngcontent-%COMP%] .album-description-section[_ngcontent-%COMP%] .description-text[_ngcontent-%COMP%]{color:var(--configPostTextColor, #ffffff);font-size:16px;font-weight:400;line-height:1.6;margin:0;opacity:.9}.portfolio-album-header-container[_ngcontent-%COMP%] .album-description-section[_ngcontent-%COMP%] .description-text.description-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:opacity .2s ease}.portfolio-album-header-container[_ngcontent-%COMP%] .album-description-section[_ngcontent-%COMP%] .description-text.description-clickable[_ngcontent-%COMP%]:hover{opacity:1}.portfolio-album-header-container[_ngcontent-%COMP%] .album-description-section[_ngcontent-%COMP%] .description-text[_ngcontent-%COMP%] .content-length-handle[_ngcontent-%COMP%]{color:var(--theme-interactive-link)!important} .theme-whiteLabel .portfolio-album-header-container{background:var(--configSecondaryBgColor)} .theme-whiteLabel .portfolio-album-header-container .share-button-container .share-button{background:var(--configThemeColor, #013956)} .theme-whiteLabel .portfolio-album-header-container .share-button-container .share-button em{color:var(--configBgColor)} .theme-whiteLabel .portfolio-album-header-container .edit-button-container .edit-button{background:var(--configThemeColor, #013956)} .theme-whiteLabel .portfolio-album-header-container .edit-button-container .edit-button em:before{color:var(--configButtonTextColor)!important} .theme-whiteLabel .portfolio-album-header-container .album-art-section .album-art-container{box-shadow:0 4px 12px #0000004d} .theme-whiteLabel .portfolio-album-header-container .album-art-section .album-art-container .album-art-placeholder{background:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .portfolio-album-header-container .album-art-section .album-art-container .album-art-placeholder em{color:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-album-header-container .icon-profile-share:before{color:var(--configButtonTextColor, #ffffff)!important} .theme-whiteLabel .portfolio-album-header-container .album-details-section .album-header-info .album-category{color:var(--configBgTextColor, #ffffff)} .theme-whiteLabel .portfolio-album-header-container .album-details-section .album-header-info .album-title{color:var(--configBgTextColor, #ffffff)} .theme-whiteLabel .portfolio-album-header-container .album-details-section .album-header-info .album-meta{color:var(--configBgTextColor, #ffffff)} .theme-whiteLabel .portfolio-album-header-container .album-description-section .description-heading{color:var(--configBgTextColor, #ffffff)} .theme-whiteLabel .portfolio-album-header-container .album-description-section .description-text{color:var(--configBgTextColor, #ffffff)} .theme-whiteLabel .portfolio-album-header-container .item-actions .action-icon{color:var(--configBgTextColor, #ffffff)!important} .theme-whiteLabel .portfolio-album-header-container .item-actions .action-icon.lock-icon{color:var(--theme-interactive-link)!important;background:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-album-header-container .item-actions .action-icon .icon-lock:before, .theme-whiteLabel .portfolio-album-header-container .item-actions .action-icon .icon-liteunlock-filled-white:before{color:var(--configButtonTextColor)!important} .theme-whiteLabel .album-dsp-modal-body-container .dsp-item-name{color:var(--configBgTextColor)!important}.album-dsp-modal-body-container[_ngcontent-%COMP%]{background:var(--configBgColor);border-radius:32px;padding:24px;margin-top:40px}.album-dsp-modal-body-container[_ngcontent-%COMP%] .album-dsp-modal-body-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:var(--configBgTextColor)!important;margin-bottom:20px}@media (max-width: 768px){.album-dsp-modal-body-container[_ngcontent-%COMP%] .album-dsp-modal-body-title[_ngcontent-%COMP%]{font-size:18px}}@media (max-width: 768px){.album-dsp-modal-body-container[_ngcontent-%COMP%]{margin-top:20px;padding:20px}}.music-header-selector-used[_ngcontent-%COMP%] .selector-used-dsp-section[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important}
1.music-header-selector-used[_ngcontent-%COMP%] .selector-used-dsp-section[_ngcontent-%COMP%] .dsp-list-container{margin-top:16px!important;background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.music-header-selector-used[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%]{align-items:flex-end;gap:12px;flex-wrap:wrap}.music-header-selector-used[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%] .album-art-section[_ngcontent-%COMP%]:has(.video-art-container){width:100%!important}.music-header-selector-used[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%] .album-art-container[_ngcontent-%COMP%]{width:132px!important;height:auto!important}.music-header-selector-used[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%] .album-art-container.video-art-container[_ngcontent-%COMP%]{width:100%!important;height:auto!important;max-width:100%!important;aspect-ratio:16/9!important}@media (max-width: 992px){.music-header-selector-used[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%] .album-art-container[_ngcontent-%COMP%]{width:100%!important;height:auto!important}}.music-header-selector-used[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%]:has(.video-art-container){flex-direction:column!important;align-items:flex-start!important}@media (max-width: 992px){.music-header-selector-used[_ngcontent-%COMP%] .album-content-wrapper[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.music-header-selector-used[_ngcontent-%COMP%] .album-title[_ngcontent-%COMP%]{font-size:16px!important}.music-header-selector-used[_ngcontent-%COMP%] .description-heading[_ngcontent-%COMP%]{font-size:14px!important;color:var(--configBgTextColor)!important}.music-header-selector-used[_ngcontent-%COMP%] .description-text[_ngcontent-%COMP%]{font-size:12px!important}.music-header-selector-used[_ngcontent-%COMP%] .lock-icon[_ngcontent-%COMP%]{line-height:normal!important}.music-header-selector-used[_ngcontent-%COMP%] .lock-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px!important}.music-header-selector-used[_ngcontent-%COMP%] .album-dsp-modal-body-title{font-size:16px!important}"]}),R})();function _e(R,Z){if(1&R&&(r.TgZ(0,"span",13),r._uU(1),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.Oqu(g.CONSTS.BREADCRUMB_SEPARATOR)}}function he(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"a",9),r.NdJ("click",function(){r.CHM(g);const x=r.oxw(2);return r.KtG(x.navigateToPortfolioBannerView())}),r._uU(1),r.qZA()}if(2&R){const g=r.oxw(2);r.xp6(1),r.Oqu(g.albumPortfolioBreadcrumbLabel)}}function fe(R,Z){if(1&R&&(r.TgZ(0,"span",13),r._uU(1),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.Oqu(g.CONSTS.BREADCRUMB_SEPARATOR)}}function Gt(R,Z){if(1&R&&(r.TgZ(0,"span",14),r._uU(1),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.hij(" ",null==g.albumHeaderData?null:g.albumHeaderData.title," ")}}function Ot(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"div",5)(1,"a",6),r.NdJ("click",function(){r.CHM(g);const x=r.oxw();return r.KtG(x.navigateToMusicPortfolio())}),r._UZ(2,"em",7),r.qZA(),r._UZ(3,"app-user-image"),r.TgZ(4,"span",8)(5,"a",9),r.NdJ("click",function(){r.CHM(g);const x=r.oxw();return r.KtG(x.navigateToPortfolioHub())}),r._uU(6),r.qZA(),r.YNc(7,_e,2,1,"span",10),r.YNc(8,he,2,1,"a",11),r.YNc(9,fe,2,1,"span",10),r.YNc(10,Gt,2,1,"span",12),r.qZA()()}if(2&R){const g=r.oxw();r.xp6(6),r.hij(" ",null!=g.visitedUserProfile&&g.visitedUserProfile.first_name?(g.visitedUserProfile.first_name+(null!=g.visitedUserProfile&&g.visitedUserProfile.last_name?" "+g.visitedUserProfile.last_name:"")).trim():""," "),r.xp6(1),r.Q6J("ngIf",g.albumPortfolioBreadcrumbLabel),r.xp6(1),r.Q6J("ngIf",g.albumPortfolioBreadcrumbLabel),r.xp6(1),r.Q6J("ngIf",null==g.albumHeaderData?null:g.albumHeaderData.title),r.xp6(1),r.Q6J("ngIf",null==g.albumHeaderData?null:g.albumHeaderData.title)}}function Ce(R,Z){if(1&R&&(r.TgZ(0,"span",13),r._uU(1),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.hij(" ",g.CONSTS.BREADCRUMB_SEPARATOR," ")}}function Ut(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"a",9),r.NdJ("click",function(){r.CHM(g);const x=r.oxw(2);return r.KtG(x.navigateToPortfolioBannerView())}),r._uU(1),r.qZA()}if(2&R){const g=r.oxw(2);r.xp6(1),r.Oqu(g.albumPortfolioBreadcrumbLabel)}}function be(R,Z){if(1&R&&(r.TgZ(0,"span",13),r._uU(1),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.hij(" ",g.CONSTS.BREADCRUMB_SEPARATOR," ")}}function zt(R,Z){if(1&R&&(r.TgZ(0,"span",14),r._uU(1),r.qZA()),2&R){const g=r.oxw(2);r.xp6(1),r.hij(" ",null==g.albumHeaderData?null:g.albumHeaderData.title," ")}}function Pe(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"div",15)(1,"div",16)(2,"div",17)(3,"a",18),r.NdJ("click",function(){r.CHM(g);const x=r.oxw();return r.KtG(x.navigateToMusicPortfolio())}),r._UZ(4,"em",7),r.qZA(),r.TgZ(5,"h4")(6,"a",9),r.NdJ("click",function(){r.CHM(g);const x=r.oxw();return r.KtG(x.navigateToPortfolioHub())}),r._uU(7),r.qZA(),r.YNc(8,Ce,2,1,"span",10),r.YNc(9,Ut,2,1,"a",11),r.YNc(10,be,2,1,"span",10),r.YNc(11,zt,2,1,"span",12),r.qZA()()()()}if(2&R){const g=r.oxw();r.xp6(7),r.hij(" ",null!=g.visitedUserProfile&&g.visitedUserProfile.first_name?(g.visitedUserProfile.first_name+(null!=g.visitedUserProfile&&g.visitedUserProfile.last_name?" "+g.visitedUserProfile.last_name:"")).trim():""," "),r.xp6(1),r.Q6J("ngIf",g.albumPortfolioBreadcrumbLabel),r.xp6(1),r.Q6J("ngIf",g.albumPortfolioBreadcrumbLabel),r.xp6(1),r.Q6J("ngIf",null==g.albumHeaderData?null:g.albumHeaderData.title),r.xp6(1),r.Q6J("ngIf",null==g.albumHeaderData?null:g.albumHeaderData.title)}}function Dt(R,Z){1&R&&(r.TgZ(0,"div",19),r._UZ(1,"app-music-album-skeleton"),r.qZA())}function Y(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"div",28)(1,"button",29),r.NdJ("click",function(){r.CHM(g);const x=r.oxw(3);return r.KtG(x.onAddItemInAlbum())}),r.TgZ(2,"span",30),r._uU(3,"+"),r.qZA(),r.TgZ(4,"span"),r._uU(5),r.qZA()()()}if(2&R){const g=r.oxw(3);r.xp6(5),r.Oqu(g.PORTFOLIO_ADD_ITEM_LABEL[g.portfolioType])}}function w(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"div",25),r.YNc(1,Y,6,1,"div",26),r.TgZ(2,"app-music-list",27),r.N
1dJ("songDeleted",function(x){r.CHM(g);const C=r.oxw(2);return r.KtG(C.onSongDeleted(x))}),r.qZA()()}if(2&R){const g=r.oxw(2);r.xp6(1),r.Q6J("ngIf",!g.isDashboardRoute&&!g.isSelectorUsed),r.xp6(1),r.Q6J("userId",g.userId)("isMyProfile",g.isMyProfile)("isIndividual",!1)("albumHeaderData",g.albumHeaderData)("showEditIcon",!0)("items",null==g.albumHeaderData?null:g.albumHeaderData.items)("maxDisplayItems",g.isSelectorUsed&&g.selectorMaxItems&&!g.showAllItems?g.selectorMaxItems:null)("showActions",!0)("showDspLinks",g.portfolioType===g.PORTFOLIO_CONSTS.TYPE.CUSTOM)("portfolioType",g.portfolioType)("isDashboardRoute",g.isDashboardRoute||g.isSelectorUsed)("allowDrag",!g.isDashboardRoute&&!g.isSelectorUsed)("albumTitle",null==g.albumHeaderData?null:g.albumHeaderData.title)("userName",(null==g.visitedUserProfile?null:g.visitedUserProfile.first_name)+" "+(null==g.visitedUserProfile?null:g.visitedUserProfile.last_name))("visitedUserProfile",g.visitedUserProfile)("userSubscriptionList",g.userSubscriptionList)("pUserSubscriptionList",g.pUserSubscriptionList)("isSelectorUsed",g.isSelectorUsed)("isLivestreamContext",g.isLivestreamContext)}}const Kt=function(R){return{label:R,class:"btn see-all-btn w-100"}};function Zt(R,Z){if(1&R){const g=r.EpF();r.TgZ(0,"div",31)(1,"app-button",32),r.NdJ("handleButtonClick",function(){r.CHM(g);const x=r.oxw(2);return r.KtG(x.onSeeAllClick())}),r.qZA()()}if(2&R){const g=r.oxw(2);r.xp6(1),r.Q6J("btnField",r.VKq(1,Kt,g.showAllItems?g.SEE_LESS_LABEL:g.SEE_ALL_LABEL))}}function jt(R,Z){if(1&R){const g=r.EpF();r.ynx(0),r.TgZ(1,"div",20)(2,"div",21)(3,"app-music-album-header",22),r.NdJ("portfolioContentUnlockedWithPoints",function(){r.CHM(g);const x=r.oxw();return r.KtG(x.getAlbumContent())}),r.qZA()(),r.YNc(4,w,3,20,"div",23),r.YNc(5,Zt,2,3,"div",24),r.qZA(),r.BQk()}if(2&R){const g=r.oxw();r.xp6(3),r.Q6J("albumHeaderData",g.albumHeaderData)("portfolioType",g.portfolioType)("category",g.PORTFOLIO_CONSTS_CONST.MUSIC_ALBUM_CATEGORY)("userData",g.visitedUserProfile)("isMyProfile",g.isMyProfile)("isDashboardRoute",g.isDashboardRoute||g.isSelectorUsed)("shareUrl",g.shareUrl)("userSubscriptionList",g.userSubscriptionList)("pUserSubscriptionList",g.pUserSubscriptionList)("userId",g.userId)("portfolioTypeId",g.portfolioTypeId)("isSelectorUsed",g.isSelectorUsed)("isLivestreamContext",g.isLivestreamContext),r.xp6(1),r.Q6J("ngIf",g.albumHeaderData&&!(null!=g.albumHeaderData&&null!=g.albumHeaderData.dsp&&g.albumHeaderData.dsp.length&&(null==g.albumHeaderData||null==g.albumHeaderData.items||!g.albumHeaderData.items.length))&&(g.isDashboardRoute&&(null==g.albumHeaderData||null==g.albumHeaderData.items?null:g.albumHeaderData.items.length)||!g.isDashboardRoute)),r.xp6(1),r.Q6J("ngIf",g.isSelectorUsed&&g.selectorMaxItems&&(null==g.albumHeaderData||null==g.albumHeaderData.items?null:g.albumHeaderData.items.length)>g.selectorMaxItems)}}const Oe=function(R,Z,g){return[R,Z,g]};let B=(()=>{const Z=class{constructor(k,x,C,H,P,S,D,v,L){this.cs=k,this.cacheService=x,this.route=C,this.router=H,this.cdr=P,this.authService=S,this.apiCacheService=D,this.seoService=v,this.location=L,this.previewUserId="",this.previewAlbumSk="",this.previewPortfolioType="",this.previewVisitedUserProfile=null,this.isSelectorUsed=!1,this.customStyle="",this.isDashboardRoute=!1,this.isLivestreamContext=!1,this.selectorMaxItems=O.Mx.ZERO,this.previewLoadFailed=new r.vpe,this.portfolioType="",this.destroy$=new V.x,this.visitedUserProfile=null,this.currentUserProfile=null,this.isMyProfile=!1,this.pUserSubscriptionList=[],this.portfolioTypeId="",this.PORTFOLIO_CONSTS_CONST=$.fD,this.shareUrl="",this.loadingAlbum=!1,this.loadingProfile=!1,this.PORTFOLIO_CONSTS=N.fD,this.PORTFOLIO_TITLE_HEADING_MAP=_t.JX,this.CONSTS=_t.oM,this.SEE_ALL_LABEL=rt.P.SEE_ALL,this.SEE_LESS_LABEL=rt.P.SEE_LESS,this.showAllItems=!1,this.PORTFOLIO_ADD_ITEM_LABEL=$.yZ,this.portfolioReturnUrl=null,this.albumPortfolioBreadcrumbLabel="",this.checkDashboardRoute()}ngOnInit(){if(this.isSelectorUsed||this.capturePortfolioReturnUrl(),this.isSelectorUsed)return this.userId=this.previewVisitedUserProfile?.user_name||this.previewUserId,this.albumSk=this.cs.decodePortfolioSk(this.previewAlbumSk)||this.previewAlbumSk,this.portfolioType=this.previewPortfolioType||N.fD.TYPE.MUSIC,this.authService.isLogin&&this.getCurrentUserProfile(),void(this.previewVisitedUserProfile?.gsi4pk?(this.visitedUserProfile=this.previewVisitedUserProfile,this.loadingProfile=!1,this.getAlbumContent()):this.getUserProfile());
1this.portfolioType=this.route.snapshot.data.portfolioType||N.fD.TYPE.MUSIC,this.route.paramMap.pipe((0,J.R)(this.destroy$)).subscribe(k=>{this.userId=k.get("userId")||"";const x=k.get("sk");x&&(this.albumSk=this.cs.decodePortfolioSk(x)),this.authService.isLogin&&this.getCurrentUserProfile(),this.userId&&this.albumSk&&this.getUserProfile()})}capturePortfolioReturnUrl(){if(!this.cs.isBrowser)return;let k;const x=this.router.getCurrentNavigation();x?.extras?.state&&(k=x.extras.state.portfolioReturnUrl),k||(k=this.location.getState()?.portfolioReturnUrl);const C=k?.trim();this.portfolioReturnUrl=C||null}get cacheType(){return this.isDashboardRoute?it.Y.REFRESH_EVERY_N:it.Y.ALWAYS_FRESH}checkDashboardRoute(){this.isDashboardRoute=this.router.url.includes("/dashboard")}getAlbumContent(){this.loadingAlbum=!0;const x=X.$_.getAlbumContent(this.albumSk,this.portfolioType,this.isSelectorUsed||this.isDashboardRoute?this.visitedUserProfile?.gsi4pk:null);this.apiCacheService.get(x,this.cacheType).pipe((0,J.R)(this.destroy$)).subscribe(C=>{if(this.loadingAlbum=!1,C.status){this.albumHeaderData=ft()(C.data),this.portfolioTypeId=this.albumHeaderData?.sk?.split("#")[O.Mx.ONE]||"";const H=!(!this.albumHeaderData?.is_locked||!this.isMyProfile&&this.albumHeaderData?.unlocked_through?.is_unlocked);this.albumHeaderData.isLocked=H,this.albumHeaderData.is_nft=!!this.albumHeaderData?.lock_through?.individual?.outer_nft?.length,this.albumHeaderData.is_subscription=!!this.albumHeaderData?.lock_through?.individual?.outer_subscription?.length,this.albumHeaderData.subscription=this.albumHeaderData?.lock_through?.individual?.outer_subscription,this.albumHeaderData?.items?.length&&(this.albumHeaderData.items=this.albumHeaderData?.items?.map(P=>{const S=!(!this.isDashboardRoute&&this.isMyProfile||!P?.is_locked||P?.unlocked_through?.is_unlocked),D=(P?.is_locked?!S:!H)&&P?.download_url&&P?.allow_download,v=!!this.isMyProfile||(P?.is_free||(P?.is_locked?!S:!H))&&P?.file&&P?.duration,L=!!((P?.is_locked&&S||H)&&P?.file&&P?.free_preview_time);return{...P,require_authentication:P?.require_authentication||!1,onlyLockedByAlbum:!P.is_free&&!P?.is_locked&&H,isLocked:S,isDownloadable:D,canPlay:v,showTime:!!P?.duration,canPreview:!v&&L,duration:(0,U.LU)(P?.duration),cover_image_url:P?.cover_image_url||this.albumHeaderData?.cover_image_url,is_nft:!!P?.lock_through?.individual?.outer_nft?.length,is_subscription:!!P?.lock_through?.individual?.outer_subscription?.length,subscription:P?.lock_through?.individual?.outer_subscription,previewProcessing:!this.isDashboardRoute&&this.isMyProfile&&!(!P?.is_locked&&!this.albumHeaderData?.is_locked||!P?.free_preview_time)&&P?.transcoding_in_progress}})),this.visitedUserProfile&&this.albumHeaderData&&this.seoService.setPortfolioAlbumSeo(this.albumHeaderData,this.visitedUserProfile,this.fullName,this.portfolioType),this.refreshAlbumPortfolioBreadcrumbLabel()}else this.loadingAlbum=!1,this.albumPortfolioBreadcrumbLabel="",this.isSelectorUsed?this.previewLoadFailed.emit():this.router.navigate([`/${vt._1.NOT_FOUND}`]);this.cdr.detectChanges()},()=>{this.loadingAlbum=!1,this.albumPortfolioBreadcrumbLabel="",this.isSelectorUsed?this.previewLoadFailed.emit():this.router.navigate([`/${vt._1.NOT_FOUND}`]),this.cdr.detectChanges()})}getCurrentUserProfile(){this.apiCacheService.get(X.Y9.getUsers,it.Y.REFRESH_EVERY_N).pipe((0,J.R)(this.destroy$)).subscribe(k=>{k?.data?.user_name&&(this.currentUserProfile=k.data,this.userId||(this.userId=k.data.user_name,this.albumSk&&this.getUserProfile()),this.isMyProfile=this.userId===this.currentUserProfile?.user_name,setTimeout(()=>{!this.isDashboardRoute&&!this.isMyProfile&&!this.isSelectorUsed&&this.router.navigate([`/${vt._1.NOT_FOUND}`])},10))})}getUserProfile(){this.loadingProfile=!0,this.apiCacheService.get(X.$_.user(this.userId),it.Y.REFRESH_EVERY_N).pipe((0,J.R)(this.destroy$)).subscribe({next:k=>{this.loadingProfile=!1,k.status?(this.visitedUserProfile=k.data,this.getAlbumContent(),this.userSubscriptionList=k.subscriptions,this.getAllSubscriptionListOfParentUser()):this.isSelectorUsed&&this.previewLoadFailed.emit()},error:k=>{this.loadingProfile=!1,this.isSelectorUsed?this.previewLoadFailed.emit():this.cs.showErrorMessage(k.message)}})}getAllSubscriptionListOfParentUser(){let k=X.$_.userSubscribe(!1,null),x="subscription-list-default";this.cs.isWhiteLabelWebsite&&(k=X.$_.userSubscribe(!0,this.cs.getHostUrl),x=`subscription-list-${this.cs.getHostUrl}`),this.cacheService.clearCache(x,!0),this.cacheService.get(k,x,{useStore:!0,expiry:216e5}).subscribe({next:C=>{C.status&&this.handleSubscriptionListResponse(C)},error:C=>{this.pUserSubscriptionList=[],this.cs.showErrorMessage(C.message)}})}handleSubscriptionListResponse(k){k.status&&(this.pUserSubscriptionList=k.data,this.userSubscriptionList.forEach(x=>{let C=!1;x?.plan_details?.forEach(H=>{H.is_subscribed=this.checkSubscribeStatus(x,H),H.is_subscribed&&(C=!0)}),x.subscribed=C}))}checkSubscribeStatus(k,x){return this.pUserSubscriptionList.filter(H=>H.active&&H.subplan_id===x.id).filter(H=>H.sk.split("#")[O.Mx.TWO]===k.sk.split("#")[O.Mx.ONE]).length!==O.Mx.ZERO}navigateToPortfolioHub(){if(this.portfolioReturnUrl){const k=this.portfolioReturnUrl;return this.portfolioReturnUrl=null,void this.router.navigateByUrl(k)}this.userId&&this.router.navigate((0,St.nQ)(this.userId,this.isDashboardRoute))}
1navigateToPortfolioBannerView(){if(this.portfolioReturnUrl){const x=this.portfolioReturnUrl;return this.portfolioReturnUrl=null,void this.router.navigateByUrl(x)}const k=this.portfolioTypeId||this.albumHeaderData?.sk?.split("#")[O.Mx.ONE];this.userId&&k&&this.router.navigate((0,St.dP)(this.userId,k,this.isDashboardRoute))}getAlbumHeaderParentDetails(){return this.albumHeaderData?.parent_details}refreshAlbumPortfolioBreadcrumbLabel(){const k=this.albumHeaderData;if(!k)return void(this.albumPortfolioBreadcrumbLabel="");const x=this.getAlbumHeaderParentDetails();if((0,$.Ph)(x?.type)&&x?.title?.trim())return void(this.albumPortfolioBreadcrumbLabel=x.title.trim());const C=k.portfolio_title?.trim();this.albumPortfolioBreadcrumbLabel=C||""}navigateToMusicPortfolio(){this.navigateToPortfolioBannerView()}onSongDeleted(k){this.albumHeaderData?.items?.length&&k?.sk&&(this.albumHeaderData.items=this.albumHeaderData.items.filter(x=>x.sk!==k.sk),this.albumHeaderData.individual_count=this.albumHeaderData.items.length,this.cdr.detectChanges())}get fullName(){return`${this.visitedUserProfile?.first_name||""} ${this.visitedUserProfile?.last_name||""}`.trim()}onSeeAllClick(){this.showAllItems=!this.showAllItems,this.cdr.detectChanges()}onAddItemInAlbum(){if(this.albumHeaderData?.sk&&this.portfolioType&&this.userId){const k=this.cs.encodeToUTF(this.albumHeaderData.sk);this.router.navigate(["/monetize/portfolio",st.W.ADD_EDIT_ROUTE_PATH[this.portfolioType],k],{queryParams:{step:O.Mx.THREE,isAddItem:!0}})}}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.seoService.setDefaultSeoTags()}};let R=Z;return Z.\u0275fac=function(x){return new(x||Z)(r.Y36(G.v),r.Y36(mt.Q),r.Y36(d.gz),r.Y36(d.F0),r.Y36(r.sBO),r.Y36(t.AuthService),r.Y36(it.G),r.Y36(Lt.v),r.Y36(ut.Ye))},Z.\u0275cmp=r.Xpm({type:Z,selectors:[["app-music-album"]],inputs:{previewUserId:"previewUserId",previewAlbumSk:"previewAlbumSk",previewPortfolioType:"previewPortfolioType",previewVisitedUserProfile:"previewVisitedUserProfile",isSelectorUsed:"isSelectorUsed",customStyle:"customStyle",isDashboardRoute:"isDashboardRoute",isLivestreamContext:"isLivestreamContext",selectorMaxItems:"selectorMaxItems"},outputs:{previewLoadFailed:"previewLoadFailed"},decls:5,vars:9,consts:[[1,"portfolio-preview-container",3,"ngClass"],["class","inside-header dashboard-margin",4,"ngIf"],["class","walletform-container preference-privacy-container pb-4",4,"ngIf"],["class","w-100",4,"ngIf"],[4,"ngIf"],[1,"inside-header","dashboard-margin"],[1,"close-btn",3,"click"],[1,"icon-arrow-back"],[1,"mobile-title"],[1,"breadcrumb-link",3,"click"],["class","breadcrumb-separator",4,"ngIf"],["class","breadcrumb-link",3,"click",4,"ngIf"],["class","breadcrumb-current",4,"ngIf"],[1,"breadcrumb-separator"],[1,"breadcrumb-current"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"heading"],[1,"d-flex","align-items-center","gap-3"],[3,"click"],[1,"w-100"],[1,"album-header-list-container"],[1,"preview-content"],[3,"albumHeaderData","portfolioType","category","userData","isMyProfile","isDashboardRoute","shareUrl","userSubscriptionList","pUserSubscriptionList","userId","portfolioTypeId","isSelectorUsed","isLivestreamContext","portfolioContentUnlockedWithPoints"],["class","portfolio-items-section",4,"ngIf"],["class","portfolio-selector-see-all",4,"ngIf"],[1,"portfolio-items-section"],["class","add-item-on-album",4,"ngIf"],[3,"userId","isMyProfile","isIndividual","albumHeaderData","showEditIcon","items","maxDisplayItems","showActions","showDspLinks","portfolioType","isDashboardRoute","allowDrag","albumTitle","userName","visitedUserProfile","userSubscriptionList","pUserSubscriptionList","isSelectorUsed","isLivestreamContext","songDeleted"],[1,"add-item-on-album"],["type","button",1,"btn","btn-add-song-track",3,"click"],[1,"plus-icon"],[1,"portfolio-selector-see-all"],[3,"btnField","handleButtonClick"]],template:function(x,C){1&x&&(r.TgZ(0,"div",0),r.YNc(1,Ot,11,5,"div",1),r.YNc(2,Pe,12,5,"div",2),r.YNc(3,Dt,2,0,"div",3),r.YNc(4,jt,6,15,"ng-container",4),r.qZA()),2&x&&(r.Q6J("ngClass",r.kEZ(5,Oe,C.isDashboardRoute&&!C.isSelectorUsed?"dashboard-portfolio-preview-container":"",C.isSelectorUsed?"portfolio-album-selector-used":"",C.customStyle)),r.xp6(1),r.Q6J("ngIf",C.isDashboardRoute&&!C.loadingProfile&&!C.loadingAlbum&&!C.isSelectorUsed),r.xp6(1),r.Q6J("ngIf",!(C.loadingProfile||C.loadingAlbum||C.isDashboardRoute||C.isSelectorUsed)),r.xp6(1),r.Q6J("ngIf",C.loadingAlbum||C.loadingProfile),r.xp6(1),r.Q6J("ngIf",!C.loadingAlbum&&C.albumHeaderData))},dependencies:[ut.mk,ut.O5,Ct.r,ie.l,ne.r,Wt.S,me],styles:["@media (max-width: 992px){ .monetize-content .portfolio-preview-container{margin-top:30px;margin-left:-12px;margin-right:-12px}}.portfolio-preview-container[_ngcontent-%COMP%]{max-width:1200px}.portfolio-preview-container[_ngcontent-%COMP%] .add-item-on-album[_ngcontent-%COMP%]{margin-bottom:20px;
1display:flex;justify-content:flex-end}.portfolio-preview-container[_ngcontent-%COMP%] .add-item-on-album[_ngcontent-%COMP%] .btn-add-song-track[_ngcontent-%COMP%]{padding:8px 16px;background:var(--configSecondaryBgColor);border:2px solid var(--theme-interactive-link);border-radius:12px;font-size:16px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer;transition:all .3s ease}@media screen and (max-width: 992px){.portfolio-preview-container[_ngcontent-%COMP%] .add-item-on-album[_ngcontent-%COMP%] .btn-add-song-track[_ngcontent-%COMP%]{width:100%;border-radius:28px}}.portfolio-preview-container[_ngcontent-%COMP%] .add-item-on-album[_ngcontent-%COMP%] .btn-add-song-track[_ngcontent-%COMP%]:hover{background:var(rgba(var(--theme-interactive-link-rgb), .1))}.portfolio-preview-container[_ngcontent-%COMP%] .add-item-on-album[_ngcontent-%COMP%] .btn-add-song-track[_ngcontent-%COMP%] .plus-icon[_ngcontent-%COMP%]{font-size:24px;font-weight:400;line-height:1;color:var(--theme-interactive-link)!important}.portfolio-preview-container[_ngcontent-%COMP%] .add-item-on-album[_ngcontent-%COMP%] .btn-add-song-track[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--theme-interactive-link)!important;font-weight:900;font-size:14px;letter-spacing:.4px;text-transform:uppercase}.portfolio-preview-container[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{height:20px!important;margin:0 16px 0 0!important}.portfolio-preview-container[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{font-size:24px!important}@media (max-width: 992px){.portfolio-preview-container[_ngcontent-%COMP%]{padding-top:15px}.portfolio-preview-container[_ngcontent-%COMP%] .album-header-list-container[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor);border-radius:10px}.portfolio-preview-container[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{height:5px!important}}.portfolio-preview-container[_ngcontent-%COMP%] .inside-header[_ngcontent-%COMP%]{margin-bottom:20px;line-height:normal!important;text-transform:none!important}.portfolio-preview-container[_ngcontent-%COMP%] .inside-header[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline!important;text-transform:none!important}.portfolio-preview-container[_ngcontent-%COMP%] .inside-header[_ngcontent-%COMP%] .mobile-title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;line-height:24px;text-transform:none!important}@media screen and (max-width: 992px){.portfolio-preview-container[_ngcontent-%COMP%] .inside-header[_ngcontent-%COMP%] .mobile-title[_ngcontent-%COMP%]{font-size:13px;line-height:16px}}.portfolio-album-selector-used[_ngcontent-%COMP%]{padding-top:0!important}.portfolio-album-selector-used[_ngcontent-%COMP%] .portfolio-album-header-container{background:transparent!important;padding:0!important}.portfolio-album-selector-used[_ngcontent-%COMP%] .portfolio-album-header-container .action-buttons-container{top:16px!important;right:5px!important}.portfolio-album-selector-used[_ngcontent-%COMP%] .music-items-empty-state{padding:40px!important}.portfolio-album-selector-used[_ngcontent-%COMP%] .music-items-empty-state app-loader .lds-spinner div:after{background:var(--configBgTextColor)!important}.lib-portfolio-preview[_ngcontent-%COMP%]{--configBgColor: var(--bgColorLinkInBio);--configBgTextColor: var(--bgTextColorLinkInBio);--configSecondaryBgColor: var(--cardBgLinkInBio);--configPostTextColor: var(--cardTextColorLinkInBio);--configThemeColor: var(--buttonColorLinkInBio);--configButtonTextColor: var(--buttonTextColorLinkInBio);--theme-interactive-link: var(--buttonColorLinkInBio)}.lib-portfolio-fan-preview[_ngcontent-%COMP%]{--configBgColor: var(--fanBgColorLinkInBio);--configBgTextColor: var(--fanBgTextColorLinkInBio);--configSecondaryBgColor: var(--fanCardBgLinkInBio);--configTextColor: var(--fanCardTextColorLinkInBio);--configThemeColor: var(--fanButtonColorLinkInBio);--configButtonTextColor: var(--fanButtonTextColorLinkInBio);--theme-interactive-link: var(--fanButtonColorLinkInBio)}.lib-portfolio-preview[_ngcontent-%COMP%], .lib-portfolio-fan-preview[_ngcontent-%COMP%]{backdrop-filter:blur(5px)}.lib-portfolio-preview[_ngcontent-%COMP%] .item-actions .action-icon.lock-icon, .lib-portfolio-fan-preview[_ngcontent-%COMP%] .item-actions .action-icon.lock-icon{background:var(--configThemeColor)!important}.lib-portfolio-preview[_ngcontent-%COMP%] .item-actions .action-icon.lock-icon .icon-lock:before, .lib-portfolio-fan-preview[_ngcontent-%COMP%] .item-actions .action-icon.lock-icon .icon-lock:before{color:var(--configButtonTextColor)!important}.preview-content[_ngcontent-%COMP%]{border-radius:8px}.portfolio-items-section[_ngcontent-%COMP%]{margin-top:16px;padding:20px;border-radius:32px;background:var(--configSecondaryBgColor)}@media (max-width: 992px){.portfolio-items-section[_ngcontent-%COMP%]{padding:8px}}
1.portfolio-selector-see-all[_ngcontent-%COMP%]{margin-top:16px;display:flex;justify-content:center;align-items:center}.portfolio-selector-see-all[_ngcontent-%COMP%] .see-all-btn{background:transparent;width:-moz-fit-content!important;width:fit-content!important;border-radius:28px;color:var(--theme-interactive-link);border:1px solid var(--theme-interactive-link)!important;padding:10px 16px;font-weight:600}.portfolio-selector-see-all[_ngcontent-%COMP%] .see-all-btn span{color:var(--configThemeColor)!important}.portfolio-selector-see-all[_ngcontent-%COMP%] .see-all-btn:hover{opacity:.9}@media screen and (min-width: 992px){ .dashboard-portfolio-preview-container{width:calc(100% - 290px)!important;margin-left:auto!important}}.music-items-empty-state[_ngcontent-%COMP%]{margin-top:16px;display:flex;justify-content:center;align-items:center;padding:60px 48px;border-radius:32px}.walletform-container[_ngcontent-%COMP%]{background:none!important;color:var(--configBgTextColor)!important;padding:0!important;margin:0 0 24px!important;box-shadow:none!important}.heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;flex-wrap:wrap;gap:16px}.heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:24px;font-weight:700;line-height:24px;margin:0}@media screen and (max-width: 992px){.heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:16px}}.heading[_ngcontent-%COMP%] .label-margin[_ngcontent-%COMP%]{margin:0;white-space:nowrap;font-size:16px;font-weight:500}.heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]{font-size:24px;font-weight:500;cursor:pointer;vertical-align:bottom}.heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]:before{line-height:normal!important} .theme-whiteLabel .portfolio-preview-container{--theme-interactive-link: var(--configThemeColor) !important} .theme-whiteLabel .portfolio-preview-container .inside-header{color:var(--configBgTextColor)!important} .theme-whiteLabel .portfolio-items-section .add-song-track-button .btn-add-song-track{border:2px solid var(--configThemeColor)!important} .theme-whiteLabel .portfolio-items-section .add-song-track-button .btn-add-song-track span{color:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-items-section .add-song-track-button .btn-add-song-track .plus-icon{color:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-items-section .add-song-track-button .btn-add-song-track:hover{background:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;color:var(--configBgTextColor)!important;cursor:pointer;margin:0!important;font:inherit}"]}),R})()},58642:(Ie,xt,b)=>{b.d(xt,{S:()=>Oe});var r=b(64537),N=b(82541),V=b(72856),G=b(84539),X=b(22274),J=b(42384),mt=b(49371),O=b(67030),U=b(59302),$=b(59735),vt=b(13528),t=b(38023),it=b(44350),st=b(96993),oe=b(91205),ft=b(92110),Lt=b(36748),_t=b(98508),rt=b(89321),St=b(56257),d=b(57311),ut=b(26877),Ct=b(58217),ie=b(82104),ne=b(37524),Wt=b.n(ne),Qt=b(75728),Ft=b(22864),Nt=b(25054),It=b(88692),Rt=b(3706),at=b(76553),c=b(16570),lt=b(21306),W=b(6913),se=b(28262),qt=b(50668),Bt=b(36194),gt=b(57144),Et=b(17427);const l=["unlockModal"],bt=["deleteSongModal"];function nt(B,R){1&B&&(r.TgZ(0,"div",31),r.NdJ("click",function(g){return g.stopPropagation()}),r._UZ(1,"em",32),r.qZA())}function yt(B,R){if(1&B&&(r.TgZ(0,"span",33),r._uU(1),r.qZA()),2&B){const Z=r.oxw(2).index;r.xp6(1),r.hij(" ",Z+1," ")}}function ct(B,R){if(1&B&&(r.ynx(0),r.TgZ(1,"span",34),r._uU(2),r.qZA(),r.BQk()),2&B){const Z=r.oxw(4);r.xp6(2),r.hij(" ",Z.PORTFOLIO_CONSTS_CONST.DISABLED_STATUS_MSG," ")}}function Q(B,R){if(1&B){const Z=r.EpF();r.ynx(0),r.TgZ(1,"div",36),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(3).$implicit;return r.oxw(2).onLockClick(x,k),r.KtG(k.stopPropagation())}),r._UZ(2,"em",37),r.qZA(),r.BQk()}}function Mt(B,R){if(1&B&&(r.TgZ(0,"span",34),r._uU(1),r.qZA()),2&B){const Z=r.oxw(6);r.xp6(1),r.hij(" ",Z.PORTFOLIO_CONSTS_CONST.PREVIEW_PROCESSING_MSG," ")}}function Tt(B,R){if(1&B&&r.YNc(0,Mt,2,1,"span",38),2&B){const Z=r.oxw(3).$implicit;r.Q6J("ngIf",Z.previewProcessing)}}function kt(B,R){if(1&B&&(r.YNc(0,Q,3,0,"ng-container",17),r.YNc(1,Tt,1,1,"ng-template",null,35,r.W1O)),2&B){const Z=r.MAs(2),g=r.oxw(2).$implicit,k=r.oxw(2);r.Q6J("ngIf",g.is_locked?k.isMyProfile||g.isLocked:g.onlyLockedByAlbum)("ngIfElse",Z)}}function Yt(B,R){if(1&B&&r._UZ(0,"img",39),2&B){const Z=r.oxw(2).$implicit;r.Q6J("src",Z.cover_image_url,r.LSH)("alt",Z.title)("originalUrl",Z.cover_image_url)("format","webp")}}function Ht(B,R){1&B&&(r.TgZ(0,"div",40)(1,"div",41),r._UZ(2,"em",42),r.qZA()())}function re(B,R){if(1&B&&(r.TgZ(0,"span",43),r._uU(1),r.qZA()),2&B){const Z=r.oxw(2).index;r.xp6(1),r.hij(" ",Z+1,". \xa0 ")}}function wt(B,R){if(1&B&&(r.TgZ(0,"span",44),r._uU(1),r.qZA()),2&B){const Z=r.oxw(2).$implicit;r.xp6(1),r.hij(" ",Z.duration," ")}}function At(B,R){if(1&B&&(r.TgZ(0,"span",44)(1,"span",45),r._uU(2),r.qZA(),r._uU(3),r.ALo(4,"date"),r.qZA()),2&B){const Z=r.oxw(2).$implicit,g=r.oxw(2);r.xp6(2),r.hij("",Z.isReleaseYearType?g.MUSIC_PLAYER_CONST.RELEASED_YEAR:g.MUSIC_PLAYER_CONST.RELEASED,":"),r.xp6(1),r.hij(" ",Z.isReleaseYearType?Z.dateOfRelease:r.xi3(4,2,Z.dateOfRelease,"MMM d, yyyy")," ")}}function ae(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"li",52)(1,"a",53),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(4).$implicit,C=r.oxw(2);return r.KtG(C.onEditClick(x,k))}),r._uU(2),r._UZ(3,"em",54),r.qZA()()}if(2&B){const Z=r.oxw(6);r.xp6(2),r.hij(" ",Z.STEP_1_BASIC_INFO_CONSTS.EDIT," ")}}function le(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"li",52)(1,"a",53),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(4).$implicit,C=r.oxw(2);return r.KtG(C.onDownloadClick(x,k))}),r._uU(2),r._UZ(3,"em",55),r.qZA()()}if(2&B){const Z=r.oxw(6);r.xp6(2),r.hij(" ",Z.STEP_1_BASIC_INFO_CONSTS.DOWNLOAD," ")}}function ce(B,R){if(1&B&&(r.TgZ(0,"ul",50),r.YNc(1,ae,4,1,"li",51),r.YNc(2,le,4,1,"li",51),r.qZA()),2&B){const Z=r.oxw(3).$implicit,g=r.oxw(2);r.xp6(1),r.Q6J("ngIf",!g.isDashboardRoute&&g.showEditIcon),r.xp6(1),r.Q6J("ngIf",Z.isDownloadable&&!Z.isLocked)}}function de(B,R){1&B&&(r.TgZ(0,"div",46),r.NdJ("click",function(g){return g.stopPropagation()}),r.TgZ(1,"button",47),r._UZ(2,"em",48),r.qZA(),r.YNc(3,ce,3,2,"ul",49),r.qZA()),2&B&&r.Q6J("insideClick",!0)}function pe(B,R){if(1&B&&(r.TgZ(0,"div",56),r._UZ(1,"p",57),r.ALo(2,"bioFormat"),r.qZA()),2&B){const Z=r.oxw(2).$implicit;r.xp6(1),r.Q6J("lines",2)("innerHTML",r.lcZ(2,2,Z.description),r.oJD)}}function ue(B,R){if(1&B&&(r.TgZ(0,"div",58),r.NdJ("click",function(g){return g.stopPropagation()}),r._UZ(1,"app-dsp-list",59),r.qZA()),2&B){const Z=r.oxw(2).$implicit,g=r.oxw(2);r.xp6(1),r.Q6J("dsps",null==Z?null:Z.dsp)("portfolioType",g.portfolioType)("isInlist",!0)}}function ge(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"button",66),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(3).$implicit,C=r.oxw(2);return r.KtG(C.onViewDetailClick(x,k))}),r._uU(1),r.qZA()}if(2&B){const Z=r.oxw(5);r.xp6(1),r.hij(" ",Z.PORTFOLIO_CONSTS_CONST.VIEW," ")}}function me(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"button",67),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(3).$implicit,C=r.oxw(2);return r.KtG(C.onLockClick(x,k))}),r._UZ(1,"em",37),r.qZA()}}function _e(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"button",68),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(3).$implicit,C=r.oxw(2);return r.KtG(C.onDownloadClick(x,k))}),r._UZ(1,"em",55),r.qZA()}}function he(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"button",66),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(3).$implicit,C=r.oxw(2);return r.KtG(C.onPlayClick(x,k))}),r._UZ(1,"em",69),r._uU(2),r.qZA()}if(2&B){const Z=r.oxw(3).$implicit,g=r.oxw(2);r.xp6(2),r.hij(" ",g.getActionButtonText(Z)," ")}}function fe(B,R){if(1&B){const Z=r.EpF();
1r.TgZ(0,"button",70),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(3).$implicit,C=r.oxw(2);return r.KtG(C.onEditClick(x,k))}),r._UZ(1,"em",54),r.qZA()}}function Gt(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"button",71),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw(3).$implicit,C=r.oxw(2);return r.KtG(C.onDeleteClick(x,k))}),r._UZ(1,"em",72),r.qZA()}}function Ot(B,R){if(1&B&&(r.TgZ(0,"div",60),r.NdJ("click",function(g){return g.stopPropagation()}),r.YNc(1,ge,2,1,"button",61),r.YNc(2,me,2,0,"button",62),r.YNc(3,_e,2,0,"button",63),r.YNc(4,he,3,1,"button",61),r.YNc(5,fe,2,0,"button",64),r.YNc(6,Gt,2,0,"button",65),r.qZA()),2&B){const Z=r.oxw(2).$implicit,g=r.oxw(2);r.xp6(1),r.Q6J("ngIf",g.portfolioType===g.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_TYPE.CUSTOM),r.xp6(1),r.Q6J("ngIf",Z.is_locked?g.isMyProfile||Z.isLocked:Z.onlyLockedByAlbum),r.xp6(1),r.Q6J("ngIf",Z.isDownloadable&&!Z.isLocked),r.xp6(1),r.Q6J("ngIf",(Z.canPlay||Z.canPreview)&&g.portfolioType!==g.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_TYPE.CUSTOM),r.xp6(1),r.Q6J("ngIf",!g.isDashboardRoute&&g.showEditIcon),r.xp6(1),r.Q6J("ngIf",!g.isDashboardRoute&&g.showDeleteIcon)}}const Ce=function(B){return{"ml-20":B}};function Ut(B,R){if(1&B&&(r.TgZ(0,"div",73),r._UZ(1,"p",57),r.qZA()),2&B){const Z=r.oxw(2).$implicit,g=r.oxw(2);r.Q6J("ngClass",r.VKq(3,Ce,!g.isIndividual&&!g.allowDrag)),r.xp6(1),r.Q6J("lines",2)("innerHTML",Z.description,r.oJD)}}const be=function(B){return{"item-row-container-edit":B}},zt=function(B,R){return{"ml-16":B,"not-edit-mode":R}},Pe=function(B,R){return{"video-thumbnail":B,"video-thumbnail-portrait":R}};function Dt(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"div",10),r.NdJ("click",function(k){r.CHM(Z);const x=r.oxw().$implicit,C=r.oxw(2);return r.KtG(C.onCardClick(x,k))}),r.TgZ(1,"div",11)(2,"div",12),r.YNc(3,nt,2,0,"div",13),r.YNc(4,yt,2,1,"span",14),r.qZA(),r.TgZ(5,"div",15)(6,"div",16),r.YNc(7,ct,3,1,"ng-container",17),r.YNc(8,kt,3,2,"ng-template",null,18,r.W1O),r.YNc(10,Yt,1,4,"img",19),r.YNc(11,Ht,3,0,"div",20),r.qZA(),r.TgZ(12,"div",21)(13,"h3",22),r.YNc(14,re,2,1,"span",23),r._uU(15),r.qZA(),r.TgZ(16,"div",24),r.YNc(17,wt,2,1,"span",25),r.YNc(18,At,5,5,"span",25),r.qZA()(),r.YNc(19,de,4,1,"div",26),r.YNc(20,pe,3,4,"div",27),r.YNc(21,ue,2,3,"div",28),r.YNc(22,Ot,7,6,"div",29),r.qZA()(),r.YNc(23,Ut,2,5,"div",30),r.qZA()}if(2&B){const Z=r.MAs(9),g=r.oxw().$implicit;r.oxw();const k=r.MAs(1),x=r.oxw();r.Udp("cursor",g.canPlay||g.canPreview||g.isLocked?"pointer":"default"),r.Q6J("cdkDragData",g)("cdkDragBoundary",k)("cdkDragDisabled",!x.allowDrag),r.xp6(1),r.Q6J("ngClass",r.VKq(23,be,x.allowDrag)),r.xp6(2),r.Q6J("ngIf",x.allowDrag),r.xp6(1),r.Q6J("ngIf",!x.allowDrag&&!x.isIndividual),r.xp6(1),r.Q6J("ngClass",r.WLB(25,zt,!x.allowDrag,x.allowDrag)),r.xp6(1),r.Q6J("ngClass",r.WLB(28,Pe,x.portfolioType===x.PORTFOLIO_CONSTS.TYPE.VIDEO,x.portfolioType===x.PORTFOLIO_CONSTS.TYPE.VIDEO&&x.isVideoPortrait(g))),r.xp6(1),r.Q6J("ngIf",g.status===x.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_STATUS.INACTIVE)("ngIfElse",Z),r.xp6(3),r.Q6J("ngIf",g.cover_image_url),r.xp6(1),r.Q6J("ngIf",!g.cover_image_url),r.xp6(3),r.Q6J("ngIf",!x.isIndividual),r.xp6(1),r.hij(" ",g.title," "),r.xp6(2),r.Q6J("ngIf",g.showTime),r.xp6(1),r.Q6J("ngIf",g.dateOfRelease),r.xp6(1),r.Q6J("ngIf",!x.isDashboardRoute&&x.showEditIcon||g.isDownloadable&&!g.isLocked),r.xp6(1),r.Q6J("ngIf",g.description),r.xp6(1),r.Q6J("ngIf",x.showDspLinks&&(null==g||null==g.dsp?null:g.dsp.length)),r.xp6(1),r.Q6J("ngIf",x.showActions),r.xp6(1),r.Q6J("ngIf",g.description)}}function Y(B,R){if(1&B&&(r.ynx(0),r.YNc(1,Dt,24,31,"div",9),r.BQk()),2&B){const Z=R.index,g=r.oxw(2);r.xp6(1),r.Q6J("ngIf",null==g.maxDisplayItems||Z<g.maxDisplayItems)}}const w=function(B){return{"music-list-selector-used":B}};function Kt(B,R){if(1&B){const Z=r.EpF();r.TgZ(0,"div",6,7),r.NdJ("cdkDropListDropped",function(k){r.CHM(Z);const x=r.oxw();return r.KtG(x.onDrop(k))}),r.YNc(2,Y,2,1,"ng-container",8),r.qZA()}if(2&B){const Z=r.oxw();r.Q6J("ngClass",r.VKq(4,w,Z.isSelectorUsed))("cdkDropListDisabled",!Z.allowDrag),r.xp6(2),r.Q6J("ngForOf",Z.items)("ngForTrackBy",Z.trackByItemId)}}function Zt(B,R){if(1&B&&(r.TgZ(0,"div",74)(1,"div",75),r._UZ(2,"app-circle-background-icon",76),r.TgZ(3,"p",77),r._uU(4),r.qZA()()()),2&B){const Z=r.oxw();r.xp6(2),r.Q6J("icomoonClassName",Z.PORTFOLIO_CONSTS_CONST.SINGLE_ITEM_EMPTY_ICON[Z.portfolioType]),r.xp6(2),r.hij(" ",Z.PORTFOLIO_CONSTS_CONST.SINGLE_ITEM_EMPTY_MSG[Z.portfolioType]," ")}}function jt(B,R){1&B&&(r.TgZ(0,"div",74),r._UZ(1,"app-loader"),r.qZA())}let Oe=(()=>{const R=class{get lockedThrough(){return this.selectedItem?.lock_through||null}
1get isLocked(){return this.selectedItem?.isLocked||!1}constructor(g,k,x,C,H,P,S,D,v,L){this.modalService=g,this.authService=k,this.cs=x,this.apiCallService=C,this.router=H,this.downloadService=P,this.musicUnlockService=S,this.minimizedPlayerService=D,this.cdr=v,this.portfolioRecordPlayService=L,this.isIndividual=!0,this.items=[],this.showActions=!0,this.showDspLinks=!1,this.portfolioType=G.fD.TYPE.MUSIC,this.userSubscriptionList=[],this.pUserSubscriptionList=[],this.allowDrag=!0,this.isMyProfile=!1,this.loadingSongs=!1,this.portfolioTypeId="",this.isDashboardRoute=!1,this.albumTitle="",this.userName="",this.albumHeaderData=null,this.isSelectorUsed=!1,this.isLivestreamContext=!1,this.maxDisplayItems=null,this.showEditIcon=!1,this.showDeleteIcon=!1,this.songDeleted=new r.vpe,this.editItemClick=new r.vpe,this.portfolioContentUnlockedWithPoints=new r.vpe,this.selectedItem=null,this.currentMusicModalRef=null,this.unlockModalHeader=G.fD.UNLOCK_MODAL_HEADER,this.unlockModalMessage=G.fD.UNLOCK_MODAL_MESSAGE,this.PORTFOLIO_CONSTS=G.fD,this.PORTFOLIO_CONSTS_CONST=oe.fD,this.CONSTS=ft.oM,this.PORTFOLIO_TYPE_CONSTS=rt.W,this.scrSize=$.Mx.ZERO,this.destroy$=new t.x,this.commonEnum=st.i4,this.selectedItemDelete=null,this.userId="",this.MUSIC_PLAYER_CONST=_t.UU,this.paymentForType=G.Vw,this.STEP_1_BASIC_INFO_CONSTS=Ct.vI,this.cs.isBrowser&&(this.scrSize=window.innerWidth)}ngOnChanges(g){g.items&&this.items?.length&&this.items.forEach(k=>{this.calculateReleaseDate(k)})}calculateReleaseDate(g){const k=(0,ut.NH)(g.release_date);k.type===Ct.vI.RELEASE_TYPE_YEAR?(g.dateOfRelease=k.value,g.isReleaseYearType=!0):k.type===Ct.vI.RELEASE_TYPE_DATE?(g.dateOfRelease=(0,ut.Tl)(g.release_date),g.isReleaseYearType=!1):(g.dateOfRelease=null,g.isReleaseYearType=!1)}onCardClick(g,k){!g.require_authentication||this.authService.isLogin?this.isDashboardRoute&&this.isIndividual||this.portfolioType===rt.W.PORTFOLIO_TYPE.CUSTOM?this.onViewDetailClick(g,k):g.canPlay||g.canPreview?this.openPlayerModal(g):g.isLocked&&this.onLockClick(g,k):this.loginDialog()}onPlayClick(g,k){k.stopPropagation(),!g.require_authentication||this.authService.isLogin?g.canPlay||g.canPreview?this.openPlayerModal(g):g.isLocked&&this.onLockClick(g,k):this.loginDialog()}openPlayerModal(g){this.isMyProfile||this.portfolioRecordPlayService.recordPlay({pk:g.pk,sk:g.sk,duration_played:$.Mx.ONE*G.QG.SECONDS_TO_MILLISECONDS,session_id:`session_${(0,ut.D1)()}`}),this.portfolioType===G.fD.TYPE.VIDEO?this.openVideoPlayerModal(g):this.openMusicModal(g)}seeLessMore(g){if(g?.description?.length){const k=this.items.findIndex(x=>x.sk===g.sk||x.id===g.id);-1!==k&&(this.items[k]={...this.items[k],isMore:!this.items[k].isMore},this.cdr.detectChanges())}}isVideoPortrait(g){return this.portfolioType===G.fD.TYPE.VIDEO&&(!0===g?.is_portrait||!!g?.file&&(0,ut.p4)(g.file,["portfolio"])===$.Mx.PORTRAIT)}openVideoPlayerModal(g){const k={...g,videoUrl:g.file,posterUrl:g.cover_image_url||g.poster_url||g.posterUrl,albumTitle:this.isIndividual?"":this.albumTitle,videoTitle:g.title,dateOfRelease:g.release_date||null,isLocked:g.isLocked,lock_through:g.lock_through,canPreview:g.canPreview,showTime:!1!==g.showTime,download_url:g.download_url,download_urls:g.download_urls,isDownloadable:g.isDownloadable,unlocked_through:g.unlocked_through,pk:g.pk,sk:g.sk,is_portrait:this.isVideoPortrait(g)},x=this.items.map(S=>({...S,videoUrl:S.file,posterUrl:S.cover_image_url||S.poster_url||S.posterUrl,albumTitle:this.isIndividual?"":this.albumTitle,videoTitle:S.title,dateOfRelease:S.release_date||null,isLocked:S.isLocked,lock_through:S.lock_through,canPreview:S.canPreview,showTime:!1!==S.showTime,download_url:S.download_url,download_urls:S.download_urls,isDownloadable:S.isDownloadable,unlocked_through:S.unlocked_through,pk:S.pk,sk:S.sk,is_portrait:this.isVideoPortrait(S)})),C=x.findIndex(S=>S.sk===g.sk);this.currentMusicModalRef=this.modalService.show(V.Z,{initialState:{videoList:x.length>$.Mx.ZERO?x:[k],currentIndex:C>=$.Mx.ZERO?C:$.Mx.ZERO,userProfile:this.visitedUserProfile,userSubscriptionList:this.userSubscriptionList,pUserSubscriptionList:this.pUserSubscriptionList,portfolioType:this.portfolioType,isMyProfile:this.isMyProfile,masterData:this.albumHeaderData,portfolioTypeId:this.portfolioTypeId,portfolioCreatorUserName:this.userId,isIndividualPortfolio:this.isIndividual,onPurchaseSubscription:S=>{this.selectedItem=S,this.musicUnlockService.purchaseSubscription(this.getUnlockConfig())},onPurchaseIndividual:S=>{this.selectedItem=S,this.musicUnlockService.purchaseIndividual(this.getUnlockConfig())},onPurchaseNft:S=>{this.selectedItem=S,this.musicUnlockService.purchaseNft(this.getUnlockConfig())}},class:"modal-lg",backdrop:"static",keyboard:!1})}onDownloadClick(g,k){this.authService.isLogin||!g.isLocked?(k.stopPropagation(),this.portfolioType===G.fD.TYPE.VIDEO?this.downloadVideo(g):this.downloadAudio(g)):this.loginDialog()}downloadAudio(g){if(g?.download_url&&this.cs.isBrowser&&!g.isLocked){const k=g.download_url.split(".").pop();let x=g.title||`audio-${Date.now()}`;const C=`${(0,St.eb)(x)}.${k}`;this.downloadService.downloadFile(g.download_url,C)}}downloadVideo(g){!this.cs.isBrowser||g?.isLocked||(0,St.bL)(this.downloadService,{download_urls:g?.download_urls,download_url:g?.download_url,videoTitle:g?.videoTitle||g?.title})}onLockClick(g,k){this.isMyProfile||(g.isLocked?this.onMusicLockClick(g,k):g.onlyLockedByAlbum&&this.onAlbumLockClick(k))}onAlbumLockClick(g){this.selectedItem={...this.albumHeaderData},this.unlockModalHeader="Unlock "+this.portfolioType.charAt(0).toUpperCase()+this.portfolioType.slice(1).toLowerCase()+(this.portfolioType.toLowerCase()===G.fD.TYPE.MUSIC.toLowerCase()?_t.UU.SPACE_ALBUM:_t.UU.SPACE_SERIES),this.cdr.detectChanges();const k=this.getUnlockConfig();this.musicUnlockService.handleLockClick(this.albumHeaderData,g,k)}onMusicLockClick(g,k){this.selectedItem={...g},this.unlockModalHeader="Unlock "+this.portfolioType.charAt(0).toUpperCase()+this.portfolioType.slice(1).toLowerCase(),this.cdr.detectChanges();const x=this.getUnlockConfig();this.musicUnlockService.handleLockClick(g,k,x)}getUnlockConfig(){return{selectedItem:this.selectedItem,visitedUserProfile:this.visitedUserProfile,userSubscriptionList:this.userSubscriptionList,pUserSubscriptionList:this.pUserSubscriptionList,portfolioType:this.portfolioType,unlockModal:this.unlockModal,destroy$:this.destroy$,isIndividual:this.isIndividual,userId:this.userId,portfolioTypeId:this.portfolioTypeId,isLivestreamContext:this.isLivestreamContext,albumHeaderData:this.albumHeaderData,isAlbumLocking:this.selectedItem?.sk&&this.albumHeaderData?.sk&&this.selectedItem?.sk===this.albumHeaderData?.sk,onMusicPlayerModalClose:()=>{this.currentMusicModalRef&&(this.currentMusicModalRef.hide(),this.currentMusicModalRef=null)}}}onPurchaseIndividual(){this.musicUnlockService.purchaseIndividual(this.getUnlockConfig())}onPurchaseSubscription(){this.musicUnlockService.purchaseSubscription(this.getUnlockConfig())}onPurchaseNft(){this.musicUnlockService.purchaseNft(this.getUnlockConfig())}onPortfolioUnlockedWithPoints(){this.portfolioContentUnlockedWithPoints.emit()}onSwitchToAlbumPurchase(){this.albumHeaderData&&(this.selectedItem=Wt()(this.albumHeaderData),this.unlockModalHeader="Unlock "+this.portfolioType.charAt(0).toUpperCase()+this.portfolioType.slice(1).toLowerCase()+(this.portfolioType.toLowerCase()===G.fD.TYPE.MUSIC.toLowerCase()?_t.UU.SPACE_ALBUM:_t.UU.SPACE_SERIES),this.cdr.detectChanges())}getActionButtonText(g){return g.canPreview?G.fD.ACTION.PREVIEW:g.canPlay?this.portfolioType===G.fD.TYPE.VIDEO?G.fD.ACTION.WATCH:G.fD.ACTION.PLAY:""}get portfolioTypeTitle(){return this.selectedItem?.sk&&this.albumHeaderData?.sk&&this.selectedItem?.sk===this.albumHeaderData?.sk?ft.Gn[this.portfolioType]:ft.JX[this.portfolioType]}trackByItemId(g,k){return k.id||g}onDrop(g){if((0,it.bA)(this.items,g.previousIndex,g.currentIndex),g.previousIndex!=g.currentIndex){this.items.forEac
1h((x,C)=>{x.sequence_number=C+$.Mx.ONE});const k=this.items.filter(x=>x.pk&&x.sk).map(x=>({pk:x.pk,sk:x.sk,sequence_number:x.sequence_number||this.items.indexOf(x)+$.Mx.ONE}));k.length&&this.apiCallService.put(U.Y9.portfolioSequenceNumber,{data:k},!1).pipe((0,vt.R)(this.destroy$)).subscribe({next:x=>{this.cs.showSuccessMessage(x.message)},error:x=>{this.cs.showErrorMessage(x.message)}})}}openMusicModal(g){const k={...g,audioUrl:g.file||"",previewImageUrl:g.cover_image_url,albumTitle:this.isIndividual?"":this.userName+": "+this.albumTitle,songTitle:g.title,dateOfRelease:g.release_date||null},x=this.items.map(S=>({...S,audioUrl:S.file||"",previewImageUrl:S.cover_image_url,albumTitle:this.isIndividual?"":this.userName+": "+this.albumTitle,songTitle:S.title,dateOfRelease:S.release_date||null})),C=x.findIndex(S=>S.sk===g.sk),H=x.length>$.Mx.ZERO?x:[k],P=C>=$.Mx.ZERO?C:$.Mx.ZERO;this.minimizedPlayerService?.getState()?.isMinimized?this.minimizedPlayerService.updateCurrentSong(H,P,{userProfile:this.visitedUserProfile,userSubscriptionList:this.userSubscriptionList,portfolioType:this.portfolioType,isMyProfile:this.isMyProfile,masterData:this.albumHeaderData,portfolioTypeId:this.portfolioTypeId,portfolioCreatorUserName:this.userId,isIndividualPortfolio:this.isIndividual,onPurchaseSubscription:S=>{this.selectedItem=S,this.musicUnlockService.purchaseSubscription(this.getUnlockConfig())},onPurchaseIndividual:S=>{this.selectedItem=S,this.musicUnlockService.purchaseIndividual(this.getUnlockConfig())},onPurchaseNft:S=>{this.selectedItem=S,this.musicUnlockService.purchaseNft(this.getUnlockConfig())}}):this.currentMusicModalRef=this.modalService.show(N.K,{initialState:{musicList:H,currentIndex:P,userProfile:this.visitedUserProfile,userSubscriptionList:this.userSubscriptionList,pUserSubscriptionList:this.pUserSubscriptionList,portfolioType:this.portfolioType,isMyProfile:this.isMyProfile,masterData:this.albumHeaderData,portfolioTypeId:this.portfolioTypeId,portfolioCreatorUserName:this.userId,isIndividualPortfolio:this.isIndividual,onPurchaseSubscription:S=>{this.selectedItem=S,this.musicUnlockService.purchaseSubscription(this.getUnlockConfig())},onPurchaseIndividual:S=>{this.selectedItem=S,this.musicUnlockService.purchaseIndividual(this.getUnlockConfig())},onPurchaseNft:S=>{this.selectedItem=S,this.musicUnlockService.purchaseNft(this.getUnlockConfig())}},class:"modal-lg",backdrop:"static",keyboard:!1})}loginDialog(){this.modalService.show(mt.D,{})}onEditClick(g,k){if(k.stopPropagation(),k.preventDefault(),this.albumHeaderData?.sk&&this.portfolioType&&g?.sk){const x=this.cs.encodeToUTF(this.albumHeaderData.sk),C={step:$.Mx.THREE};C.videoSk=this.cs.encodeToUTF(g.sk),this.router.navigate(["/monetize/portfolio",rt.W.ADD_EDIT_ROUTE_PATH[this.portfolioType],x],{queryParams:C})}else this.editItemClick.emit(g)}onDeleteClick(g,k){k.stopPropagation(),this.selectedItemDelete=g,this.deleteSongModalOpen()}deleteSongModalOpen(){this.deleteSongModal?.openModal()}onCancelDeleteSong(){this.deleteSongModal&&(this.deleteSongModal.closeModal(),this.selectedItemDelete=null)}deleteSong(){const g=U.Y9.portfolioContent+"/"+this.cs.encodeToUTF(this.selectedItemDelete?.sk)+"?type="+this.portfolioType.toUpperCase();this.apiCallService.delete(g,!1).pipe((0,vt.R)(this.destroy$)).subscribe({next:k=>{k.status?(this.deleteSongModal.closeModal(),this.cs.showSuccessMessage(k.message),this.songDeleted.emit(this.selectedItemDelete),this.selectedItemDelete=null):this.cs.showErrorMessage(k.message)},error:k=>{this.cs.showErrorMessage(k.message)}})}navigateToAddItem(){this.router.navigate(["/monetize/portfolio",ft.i4[this.portfolioType]],{queryParams:{portfolioType:this.portfolioType,portfolioTypeId:this.portfolioTypeId}})}onViewDetailClick(g,k){k.stopPropagation(),this.isMyProfile||this.portfolioRecordPlayService.recordPlay({pk:g.pk,sk:g.sk,duration_played:$.Mx.ONE*G.QG.SECONDS_TO_MILLISECONDS,session_id:`session_${(0,ut.D1)()}`});const x=this.cs.encodePortfolioSk(g.sk);localStorage.setItem("portfolioItem",JSON.stringify({isAlbum:!this.isIndividual,...g,albumData:this.albumHeaderData})),this.router.navigate(["/dashboard/portfolio",this.userId,ft.b6[this.portfolioType],x])}get deleteAlbumMessage(){return this.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_MESSAGE[this.portfolioType].replace("{{title}}",this.selectedItemDelete?.title||"")}};let B=R;return R.\u0275fac=function(k){return new(k||R)(r.Y36(Qt.tT),r.Y36(X.AuthService),r.Y36(J.v),r.Y36(O.F),r.Y36(Ft.F0),r.Y36(Lt.K),r.Y36(d.A),r.Y36(Nt.d),r.Y36(r.sBO),r.Y36(ie.r))},R.\u0275cmp=r.Xpm({type:R,selectors:[["app-music-list"]],viewQuery:function(k,x){if(1&k&&(r.Gf(l,5),r.Gf(bt,5)),2&k){let C;r.iGM(C=r.CRH())&&(x.unlockModal=C.first),r.iGM(C=r.CRH())&&(x.deleteSongModal=C.first)}},inputs:{isIndividual:"isIndividual",items:"items",showActions:"showActions",showDspLinks:"showDspLinks",portfolioType:"portfolioType",visitedUserProfile:"visitedUserProfile",userSubscriptionList:"userSubscriptionList",pUserSubscriptionList:"pUserSubscriptionList",allowDrag:"allowDrag",isMyProfile:"isMyProfile",loadingSongs:"loadingSongs",portfolioTypeId:"portfolioTypeId",isDashboardRoute:"isDashboardRoute",albumTitle:"albumTitle",userName:"userName",albumHeaderData:"albumHeaderData",isSelectorUsed:"isSelectorUsed",isLivestreamContext:"isLivestreamContext",maxDisplayItems:"maxDisplayItems",showEditIcon:"showEditIcon",showDeleteIcon:"showDeleteIcon",userId:"userId"},outputs:{songDeleted:"songDeleted",editItemClick:"editItemClick",portfolioContentUnlockedWithPoints:"portfolioContentUnlockedWithPoints"},features:[r.TTD],decls:7,vars:24,consts:[["class","portfolio-items-list-container","cdkDropList","",3,"ngClass","cdkDropListDisabled","cdkDropListDropped",4,"ngIf"],["class","music-items-empty-state",4,"ngIf"],[3,"selectedItem","albumHeaderData","userProfile","userSubscriptionList","pUserSubscriptionList","contentType","headerType","isIndividualPortfolio","portfolioTypeId","userId","userName","isLocked","portfolioType","unlockModalHeader","isAllowedToRedirect","isLivestreamContext","isAlbumLocking","purchaseIndividual","purchaseSubscription","purchaseNft","unlockedWithPoints","switchToAlbumPurchase"],["unlockModal",""],[3,"dynamicClass","ConfirmationMessage","headerLabel","commonEnum","confirmDelete","cancelDelete"],["deleteSongModal",""],["cdkDropList","",1,"portfolio-items-list-container",3,"ngClass","cdkDropListDisabled","cdkDropListDropped"],["dropListContainer",""],[4,"ngFor","ngForOf","ngForTrackBy"],["class","portfolio-item-card","cdkDrag","",3,"cdkDragData","cdkDragBoundary","cdkDragDisabled","cursor","click",4,"ngIf"],["cdkDrag","",1,"portfolio-item-card",3,"cdkDragData","cdkDragBoundary","cdkDragDisabled","click"],[1,"item-row-container",3,"ngClass"],[1,"drag-handle"],["cdkDragHandle","",3,"click",4,"ngIf"],["class","item-count d-none d-lg-block",4,"ngIf"],[1,"item-row",3,"ngClass"],[1,"item-thumbnail",3,"ngClass"],[4,"ngIf","ngIfElse"],["notDisabled",""],["class","thumbnail-image","loading","lazy","decoding","async","appDisableRightClick","","appMobileOptimization","",3,"src","alt","originalUrl","format",4,"ngIf"],["class","skeleton-thumbnail",4,"ngIf"],[1,"item-details"],[1,"item-title","d-flex"],["class","d-lg-none",4,"ngIf"],[1,"item-duration-container"],["class","item-duration",4,"ngIf"],["class","btn-group horizontal-btn-group theme-dropdown-2 music-list-kebab d-lg-none","dropdown","",3,"insideClick","click",4,"ngIf"],["class","item-description d-lg-none",4,"ngIf"],["class","item-dsp-links",3,"click",4,"ngIf"],["class","item-actions",3,"click",4,"ngIf"],["class","item-description item-description-desktop",3,"ngClass",4,"ngIf"],["cdkDragHandle","",3,"click"],[1,"icon-drag"],[1,"item-count","d-none","d-lg-block"],[1,"preview-processing"],["checkProcessing",""],["aria-label","Locked",1,"action-icon","lock-icon","d-lg-none","lock-on-image",3,"click"],[1,"icon-lock"],["class","preview-processing",4,"ngIf"],["loading","lazy","decoding","async","appDisableRightClick","","appMobileOptimization","",1,"thumbnail-image",3,"src","alt","originalUrl","format"],[1,"skeleton-thumbnail"],[1,"song-audio-icon"],[1,"icon-litemusic-node-2"],[1,"d-lg-none"],[1,"item-duration"],[1,"d-none","d-lg-inline-block"],["dropdown","",1,"btn-group","horizontal-btn-group","theme-dropdown-2","music-list-kebab","d-lg-none",3,"insideClick","click"],["dropdownToggle","","type","button",1,"dropdown-toggle"],[1,"icon-more"],["class","dropdown-menu dropdown-menu-right","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right"],["role","menuitem",4,"ngIf"],["role","menuitem"],[1,"dropdown-item","action-icon",3,"click"],[1,"icon-res-editfill"],[1,"icon-litedownload"],[1,"item-description","d-lg-none"],["appReadMore","",1,"description-text",3,"lines","innerHTML"],[1,"item-dsp-links",3,"click"],[3,"dsps","portfolioType","isInlist"],[1,"item-actions",3,"click"],["class","action-btn preview-btn",3,"click",4,"ngIf"],["class","action-icon lock-icon d-none d-lg-block","aria-label","Locked",3,"click",4,"ngIf"],["class","action-icon download-icon d-none d-lg-block","aria-label","Download",3,"click",4,"ngIf"],["class","action-icon edit-icon d-none d-lg-block","aria-label","Edit",3,"click",4,"ngIf"],["class","action-icon download-icon d-none d-lg-block","aria-label","Delete",3,"click",4,"ngIf"],[1,"action-btn","preview-btn",3,"click"],["aria-label","Locked",1,"action-icon","lock-icon","d-none","d-lg-block",3,"click"],["aria-label","Download",1,"action-icon","download-icon","d-none","d-lg-block",3,"click"],[1,"icon-liteplay"],["aria-label","Edit",1,"action-icon","edit-icon","d-none","d-lg-block",3,"click"],["aria-label","Delete",1,"action-icon","download-icon","d-none","d-lg-block",3,"click"],[1,"icon-delete-filled"],[1,"item-description","item-description-desktop",3,"ngClass"],[1,"music-items-empty-state"],[1,"empty-state-content"],[3,"icomoonClassName"],[1,"empty-state-text"]],template:function(k,x){1&k&&(r.YNc(0,Kt,3,6,"div",0),r.YNc(1,Zt,5,2,"div",1),r.YNc(2,jt,2,0,"div",1),r.TgZ(3,"a
1pp-portfolio-unlock-modal",2,3),r.NdJ("purchaseIndividual",function(){return x.onPurchaseIndividual()})("purchaseSubscription",function(){return x.onPurchaseSubscription()})("purchaseNft",function(){return x.onPurchaseNft()})("unlockedWithPoints",function(){return x.onPortfolioUnlockedWithPoints()})("switchToAlbumPurchase",function(){return x.onSwitchToAlbumPurchase()}),r.qZA(),r.TgZ(5,"app-confirmation-modal",4,5),r.NdJ("confirmDelete",function(){return x.deleteSong()})("cancelDelete",function(){return x.onCancelDeleteSong()}),r.qZA()),2&k&&(r.Q6J("ngIf",(null==x.items?null:x.items.length)&&!x.loadingSongs),r.xp6(1),r.Q6J("ngIf",!(null!=x.items&&x.items.length||x.loadingSongs||x.isSelectorUsed)),r.xp6(1),r.Q6J("ngIf",x.loadingSongs),r.xp6(1),r.Q6J("selectedItem",x.selectedItem)("albumHeaderData",x.albumHeaderData)("userProfile",x.visitedUserProfile)("userSubscriptionList",x.userSubscriptionList)("pUserSubscriptionList",x.pUserSubscriptionList)("contentType",x.paymentForType.MUSIC_PORTFOLIO)("headerType",x.portfolioTypeTitle)("isIndividualPortfolio",x.isIndividual)("portfolioTypeId",x.portfolioTypeId)("userId",null==x.visitedUserProfile?null:x.visitedUserProfile.email)("userName",x.userId)("isLocked",x.isLocked)("portfolioType",x.portfolioType)("unlockModalHeader",x.unlockModalHeader)("isAllowedToRedirect",!x.isLivestreamContext)("isLivestreamContext",x.isLivestreamContext)("isAlbumLocking",(null==x.selectedItem?null:x.selectedItem.sk)&&(null==x.albumHeaderData?null:x.albumHeaderData.sk)&&(null==x.selectedItem?null:x.selectedItem.sk)===(null==x.albumHeaderData?null:x.albumHeaderData.sk)),r.xp6(2),r.Q6J("dynamicClass","delete-modal portfolio-banner-delete-modal")("ConfirmationMessage",x.deleteAlbumMessage)("headerLabel",x.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_TITLE[x.portfolioType])("commonEnum",x.commonEnum))},dependencies:[It.mk,It.sg,It.O5,Rt.Hz,Rt.Mq,Rt.TO,at.R,c.h,lt.w,W.m,se.Y,qt.z,Bt.J,it.Wj,it.Zt,it.Bh,gt.V,It.uU,Et.dY],styles:[".portfolio-items-list-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;width:100%}.portfolio-items-list-container[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:1!important;background:rgba(255,255,255,.02)!important;border:1px dashed rgba(255,255,255,.1)!important;border-radius:12px!important;padding:10px 16px!important;min-height:84px!important;display:flex!important;flex-direction:column!important;box-sizing:border-box!important;pointer-events:none!important}.portfolio-items-list-container[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%], .portfolio-items-list-container[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%] .item-thumbnail[_ngcontent-%COMP%], .portfolio-items-list-container[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%] .item-details[_ngcontent-%COMP%], .portfolio-items-list-container[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%] .item-dsp-links[_ngcontent-%COMP%], .portfolio-items-list-container[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%], .portfolio-items-list-container[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .portfolio-items-list-container[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%]{opacity:0!important;visibility:hidden!important}.portfolio-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;background:var(--configBgColor);border-radius:16px;padding:10px 16px;cursor:pointer;position:relative}.portfolio-item-card[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--configBgColor) 80%,white 20%)!important;transform:translateY(-2px)}.portfolio-item-card.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.portfolio-item-card[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;width:100%}.portfolio-item-card[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:grab;color:var(--configBgTextColor, #ffffff);transition:opacity .2s ease}.portfolio-item-card[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]:hover{opacity:1}.portfolio-item-card[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.portfolio-item-card[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%] .icon-drag[_ngcontent-%COMP%]{opacity:.6;font-size:18px;display:block}.portfolio-item-card[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]{width:200
1px!important;height:100px!important}@media (max-width: 768px){.portfolio-item-card[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]{width:100px!important;height:70px!important}}.portfolio-item-card[_ngcontent-%COMP%] .item-thumbnail[_ngcontent-%COMP%]{flex-shrink:0;width:100px;height:100px;border-radius:8px;overflow:hidden;background:rgba(255,255,255,.1);position:relative}.portfolio-item-card[_ngcontent-%COMP%] .item-thumbnail[_ngcontent-%COMP%] .thumbnail-image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.portfolio-item-card[_ngcontent-%COMP%] .item-thumbnail.video-thumbnail-portrait[_ngcontent-%COMP%]{width:60px!important;height:auto!important}.portfolio-item-card[_ngcontent-%COMP%] .item-row-container[_ngcontent-%COMP%]{display:flex;gap:8px}.portfolio-item-card[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{top:25%!important;min-width:120px!important}.portfolio-item-card[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] .dropdown-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:15px}.portfolio-item-card[_ngcontent-%COMP%] .music-list-kebab[_ngcontent-%COMP%]{flex-shrink:0;align-items:flex-start;height:90px}.portfolio-item-card[_ngcontent-%COMP%] .item-details[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.portfolio-item-card[_ngcontent-%COMP%] .item-details[_ngcontent-%COMP%] .item-title[_ngcontent-%COMP%]{color:var(--configBgTextColor, #ffffff);font-size:15px;font-weight:500;margin:0;line-height:1.3;overflow:hidden;text-overflow:ellipsis}.portfolio-item-card[_ngcontent-%COMP%] .item-details[_ngcontent-%COMP%] .item-duration[_ngcontent-%COMP%]{color:var(--configBgTextColor, #ffffff);font-size:14px;font-weight:400;opacity:.7}.portfolio-item-card[_ngcontent-%COMP%] .ml-40[_ngcontent-%COMP%]{width:95%;margin-left:40px}.portfolio-item-card[_ngcontent-%COMP%] .ml-20[_ngcontent-%COMP%]{width:98%;margin-left:20px}.portfolio-item-card[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%]{margin-top:10px}.portfolio-item-card[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%] .description-text[_ngcontent-%COMP%]{color:var(--configBgTextColor, #ffffff);font-size:14px;font-weight:400;opacity:.8;margin:0;line-height:1.4;overflow:hidden;text-overflow:ellipsis}@media (max-width: 992px){.portfolio-item-card[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%] .description-text[_ngcontent-%COMP%]{font-size:14px;line-height:1.3;opacity:.7}}@media (min-width: 991px){.portfolio-item-card[_ngcontent-%COMP%] .item-description-mobile[_ngcontent-%COMP%]{display:none}}@media (max-width: 992px){.portfolio-item-card[_ngcontent-%COMP%] .item-description-desktop[_ngcontent-%COMP%]{display:none}}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-shrink:0}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]{background:transparent;border:none;color:var(--configBgTextColor, #ffffff);cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;transition:opacity .2s ease}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]:hover:not(:disabled){opacity:.9;transform:scale(1.05)}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]:disabled{opacity:.7;cursor:not-allowed}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:18px;width:18px}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon.lock-icon[_ngcontent-%COMP%]{height:32px;width:32px;color:var(--theme-interactive-link);background:linear-gradient(135deg,rgba(29,233,182,.1) .33%,rgba(0,182,234,.1) 99.62%);border-radius:50%;min-width:38px;min-height:38px}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon.download-icon[_ngcontent-%COMP%]{color:var(--configBgTextColor, #ffffff);background:linear-gradient(135deg,rgba(29,233,182,.1) .33%,rgba(0,182,234,.1) 99.62%);border-radius:50%;min-width:38px;min-height:38px}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon.edit-icon[_ngcontent-%COMP%]{color:var(--theme-interactive-link);background:linear-gradient(135deg,rgba(29,233,182,.1) .33%,rgba(0,182,234,.1) 99.62%);border-radius:50%;position:relative;z-index:10}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-icon.edit-icon[_ngcontent-%COMP%] .icon-res-editfill[_ng
1content-%COMP%]:before{color:var(--theme-interactive-link)}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .icon-liteplay[_ngcontent-%COMP%]{font-size:11px}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .icon-delete-filled[_ngcontent-%COMP%]:before{color:#15dbc5}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{background:var(--configThemeColor, #00b6ea);color:var(--configButtonTextColor, #ffffff);border:none;border-radius:24px;padding:8px 20px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease;white-space:nowrap}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]:hover{opacity:.9;transform:scale(1.05)}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-btn.play-btn[_ngcontent-%COMP%], .portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] .action-btn.preview-btn[_ngcontent-%COMP%]{background:var(--configThemeColor, #00b6ea)}.action-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{color:var(--theme-interactive-link)}@media (max-width: 400px){.item-dsp-links[_ngcontent-%COMP%]{flex:1 1 calc(100% - 6px)!important;justify-content:flex-end!important}}.preview-processing[_ngcontent-%COMP%]{font-size:12px;position:absolute;color:#fff!important;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6)!important}@media (max-width: 768px){.preview-processing[_ngcontent-%COMP%]{font-size:10px}}.lock-on-image[_ngcontent-%COMP%]{font-size:24px;position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6)!important}@media (max-width: 992px){[_nghost-%COMP%] .portfolio-item-card{padding:12px;gap:12px}[_nghost-%COMP%] .portfolio-item-card .not-edit-mode{background:var(--configSecondaryBgColor);padding:8px;border-radius:16px}[_nghost-%COMP%] .portfolio-item-card .item-description{flex:1 1 calc(100% - 100px)}[_nghost-%COMP%] .portfolio-item-card .item-row-container-edit .dsp-list-container{background:var(--configBgColor)!important}[_nghost-%COMP%] .portfolio-item-card .item-row-container-edit .dropdown-menu{background:var(--configBgColor)!important}[_nghost-%COMP%] .portfolio-item-card .item-row{flex-wrap:wrap;gap:12px}[_nghost-%COMP%] .portfolio-item-card .drag-handle{padding:3px}[_nghost-%COMP%] .portfolio-item-card .drag-handle .icon-drag{font-size:16px}[_nghost-%COMP%] .portfolio-item-card .item-thumbnail{width:100px;height:100px}[_nghost-%COMP%] .portfolio-item-card .item-details{flex:1 1 calc(60% - 100px)!important;min-width:0;margin-right:16px}[_nghost-%COMP%] .portfolio-item-card .item-details .item-title{font-size:13px!important;text-overflow:ellipsis;white-space:pre-line}[_nghost-%COMP%] .portfolio-item-card .item-details .item-duration{font-size:12px}[_nghost-%COMP%] .portfolio-item-card .item-dsp-links{flex:1 1 calc(48% - 6px);min-width:0;order:4;margin-top:8px;display:flex;align-items:center;justify-content:flex-end}[_nghost-%COMP%] .portfolio-item-card .item-actions{flex:1 1 calc(48% - 6px);min-width:0;order:3;gap:8px;margin-top:8px}[_nghost-%COMP%] .portfolio-item-card .item-actions .action-btn{padding:6px 10px;font-size:12px}[_nghost-%COMP%] .portfolio-item-card .item-description-mobile{padding-left:0;flex:1 1 calc(100% - 100px)}}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:12px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;opacity:.9;background:var(--configBgColor)!important;display:flex;flex-direction:column;gap:12px;padding:10px 16px;width:100%}.cdk-drag-preview[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;width:100%}.ml-16[_ngcontent-%COMP%]{margin-left:-16px} .theme-whiteLabel .drag-handle .icon-drag{background:transparent!important} .theme-whiteLabel .drag-handle .icon-drag:before{color:var(--configBgTextColor)!important} .theme-whiteLabel .portfolio-item-card{background:var(--configBgColor)!important} .theme-whiteLabel .portfolio-item-card .lock-on-image em:before{color:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-item-card .dropdown-menu em:before{color:var(--configThemeColor)!important}
1 .theme-whiteLabel .portfolio-item-card .dropdown-toggle .icon-more:before{color:var(--configBgTextColor)} .theme-whiteLabel .portfolio-item-card .dsp-more-link{color:var(--configPostTextColor)!important} .theme-whiteLabel .portfolio-item-card .dropdown-item{color:var(--configPostTextColor)!important}@media (max-width: 992px){ .theme-whiteLabel .portfolio-item-card .item-row-container-edit .item-count{color:var(--configPostTextColor)!important} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .dropdown-item{color:var(--configBgTextColor)!important} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .dropdown-menu{background:var(--configBgColor)!important} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .dropdown-menu em:before{color:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .dropdown-toggle .icon-more:before{color:var(--configPostTextColor)} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .item-details .episode-number-container, .theme-whiteLabel .portfolio-item-card .item-row-container-edit .item-details .item-title{color:var(--configPostTextColor)!important} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .item-details .item-duration{color:var(--configPostTextColor)!important} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .item-description .description-text{color:var(--configPostTextColor)!important} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .dsp-list-container{background:var(--configBgColor)!important} .theme-whiteLabel .portfolio-item-card .item-row-container-edit .dsp-more-link{color:var(--configBgTextColor)!important}} .theme-whiteLabel .portfolio-item-card:hover{background-color:color-mix(in srgb,var(--configBgColor) 80%,white 20%)!important} .theme-whiteLabel .portfolio-item-card .item-thumbnail{background:rgba(255,255,255,.1)!important} .theme-whiteLabel .portfolio-item-card .item-details .episode-number-container, .theme-whiteLabel .portfolio-item-card .item-details .item-title{color:var(--configBgTextColor, #ffffff)!important} .theme-whiteLabel .portfolio-item-card .item-details .item-duration{color:var(--configBgTextColor, #ffffff)!important} .theme-whiteLabel .portfolio-item-card .item-description .description-text{color:var(--configBgTextColor, #ffffff)!important} .theme-whiteLabel .portfolio-item-card .item-actions .action-icon{color:var(--configBgTextColor, #ffffff)!important} .theme-whiteLabel .portfolio-item-card .item-actions .action-icon.lock-icon{color:var(--theme-interactive-link)!important;background:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-item-card .item-actions .action-icon.download-icon, .theme-whiteLabel .portfolio-item-card .item-actions .action-icon.edit-icon{color:var(--configButtonTextColor, #ffffff)!important;background:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-item-card .item-actions .action-icon .icon-litedownload:before, .theme-whiteLabel .portfolio-item-card .item-actions .action-icon .icon-delete-filled:before, .theme-whiteLabel .portfolio-item-card .item-actions .action-icon .icon-lock:before, .theme-whiteLabel .portfolio-item-card .item-actions .action-icon .icon-liteeye-open:before, .theme-whiteLabel .portfolio-item-card .item-actions .action-icon .icon-res-editfill:before{color:var(--configButtonTextColor)!important} .theme-whiteLabel .portfolio-item-card .item-actions .action-btn{background:var(--configThemeColor, #00b6ea)!important;color:var(--configButtonTextColor, #ffffff)!important} .theme-whiteLabel .portfolio-item-card .item-actions .action-btn.play-btn, .theme-whiteLabel .portfolio-item-card .item-actions .action-btn.preview-btn{background:var(--configThemeColor, #00b6ea)!important} .theme-whiteLabel .portfolio-item-card .item-actions .action-btn.edit-icon{color:var(--configThemeColor)!important;background:var(--configThemeColor)!important} .theme-whiteLabel .item-count{color:var(--configBgTextColor, #ffffff)!important}.music-items-empty-state[_ngcontent-%COMP%]{margin-top:16px;display:flex;justify-content:center;align-items:center;padding:60px 48px;background:var(--configSecondaryBgColor);border-radius:32px}.music-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%]{text-align:center;width:100%;max-width:600px}.music-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%] app-circle-background-icon[_ngcontent-%COMP%]{margin-bottom:24px}.music-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%] .empty-state-text[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:var(--configPostTextColor)!important;margin:0;padding-top:20px}.music-items-empty-state[_ngcontent-%COMP%] .mt-15[_ngcontent-%COMP%]{margin-top:15px} .theme-whiteLabel .skeleton-thumbnail{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .skeleton-thumbnail .icon-litemusic-node-2:before{color:var(--configThemeColor)!important}.skeleton-thumbnail[_ngcontent-%COMP%]{border-radius:6px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);display:flex;align-items:center;justify-content:center;height:100%}.skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-litemusic-node-2[_ngcontent-%COMP%]{opacity:.8;font-size:30px}.skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-litemusic-node-2[_ngcontent-%COMP%]:before{color:var(--theme-interactive-link)}.item-count[_ngcontent-%COMP%]{padding-right:15px}.item-duration-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3px}.episode-number-container[_ngcontent-%COMP%]{color:var(--configBgTextColor);opacity:.7;font-weight:500}@media (max-width: 768px){.episode-number-container[_ngcontent-%COMP%]{display:none}}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%]{padding:10px 12px;gap:8px}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%]{flex-wrap:wrap;gap:12px}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .item-thumbnai[_ngcontent-%COMP%]{width:60px;height:60px}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .item-details[_ngcontent-%COMP%]{flex:1 1 calc(60% - 100px)!important;min-width:120px;margin-right:0}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .item-details[_ngcontent-%COMP%] .item-title[_ngcontent-%COMP%]{font-size:14px!important}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .item-details[_ngcontent-%COMP%] .item-duration[_ngcontent-%COMP%]{font-size:12px!important}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%] .description-text[_ngcontent-%COMP%]{font-size:14px!important}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%]{margin-left:auto}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]{width:130px!important;height:90px!important}.music-list-selector-used[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{height:90px!important;align-items:flex-end!important}.music-list-selector-used[_ngcontent-%COMP%] .item-description-mobile[_ngcontent-%COMP%]{display:block}.music-list-selector-used[_ngcontent-%COMP%] .item-description-desktop[_ngcontent-%COMP%]{display:none}"]}),B})()},76547:(Ie,xt,b)=>{b.d(xt,{a:()=>x});var r=b(38023),N=b(13528),V=b(92110),G=b(89321),X=b(59302),J=b(67030),mt=b(42384),O=b(91205),U=b(32401),$=b(96993),vt=b(96630),t=b(59735),it=b(26877),st=b(44689),oe=b
1(22274),ft=b(37524),Lt=b.n(ft),_t=b(73794),rt=b(66089),St=b(56257),d=b(64537),ut=b(22864),Ct=b(88692),ie=b(61354),ne=b(22348),Wt=b(76553),Qt=b(6913),Ft=b(28262),Nt=b(50668),It=b(36194),Rt=b(45178),at=b(44350),c=b(88128),lt=b(98508),W=b(58217),se=b(57311),qt=b(84539),Bt=b(21306);const gt=["deleteAlbumTemplate"],Et=["unlockModal"];function l(C,H){1&C&&d._UZ(0,"span",22)}function bt(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"span",23),d.NdJ("click",function(D){d.CHM(P);const v=d.oxw().$implicit,L=d.oxw(2);return d.KtG(L.onDeleteAlbumClick(v,D))}),d._UZ(1,"em",24),d.qZA()}}const nt=function(C,H){return{"status-disabled":C,"status-drafted":H}};function yt(C,H){if(1&C&&(d.TgZ(0,"div",25),d._uU(1),d.qZA()),2&C){const P=d.oxw().$implicit,S=d.oxw(2);d.Q6J("ngClass",d.WLB(2,nt,S.isStatusInactive(P),S.isStatusDraft(P))),d.xp6(1),d.hij(" ",S.getItemStatus(P)," ")}}function ct(C,H){if(1&C&&(d.TgZ(0,"span"),d._uU(1),d.ALo(2,"date"),d.qZA()),2&C){const P=d.oxw(2).$implicit,S=d.oxw(2);d.xp6(1),d.AsE(" ",P.isReleaseYearType?S.MUSIC_PLAYER_CONST.RELEASED_YEAR:S.MUSIC_PLAYER_CONST.RELEASED,": ",P.isReleaseYearType?P.formattedReleaseDate:d.xi3(2,2,P.formattedReleaseDate,"MMM d, yyyy")," ")}}function Q(C,H){if(1&C&&(d.TgZ(0,"p",26),d.YNc(1,ct,3,5,"span",27),d.qZA()),2&C){const P=d.oxw().$implicit;d.xp6(1),d.Q6J("ngIf",P.formattedReleaseDate)}}const Mt=function(C){return{"video-thumbnail-wrapper":C}};function Tt(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"div",12),d.NdJ("cdkDropListDropped",function(D){d.CHM(P);const v=d.oxw(2);return d.KtG(v.drop(D))}),d.TgZ(1,"div",13),d.NdJ("click",function(){const v=d.CHM(P).$implicit,L=d.oxw(2);return d.KtG(L.onItemClick(v))}),d.YNc(2,l,1,0,"span",14),d.YNc(3,bt,2,0,"span",15),d.TgZ(4,"div",16),d._UZ(5,"img",17),d.YNc(6,yt,2,5,"div",18),d.qZA(),d.TgZ(7,"div",19)(8,"h4",20),d._uU(9),d.qZA(),d.YNc(10,Q,2,1,"p",21),d.qZA()()()}if(2&C){const P=H.$implicit,S=H.index,D=d.oxw(2),v=d.MAs(1);d.Q6J("cdkDropListData",S)("cdkDropListOrientation",null==D.PORTFOLIO_CONSTS?null:D.PORTFOLIO_CONSTS.HORIZONTAL)("cdkDropListDisabled",D.isDashboardRoute||(null==D.albums?null:D.albums.length)===D.Application.ONE),d.xp6(1),d.Q6J("cdkDragData",S)("cdkDragBoundary",v)("cdkDragDisabled",D.isDashboardRoute||(null==D.albums?null:D.albums.length)===D.Application.ONE),d.xp6(1),d.Q6J("ngIf",!D.isDashboardRoute),d.xp6(1),d.Q6J("ngIf",!D.isDashboardRoute),d.xp6(1),d.Q6J("ngClass",d.VKq(15,Mt,D.portfolioType===D.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_TYPE.VIDEO)),d.xp6(1),d.Q6J("alt",P.title)("originalUrl",P.thumbnail)("format","webp"),d.xp6(1),d.Q6J("ngIf",D.shouldShowStatus(P)),d.xp6(3),d.Oqu(P.title),d.xp6(1),d.Q6J("ngIf",P.formattedReleaseDate||void 0!==P.song_count&&P.song_count>D.Application.ZERO)}}function kt(C,H){if(1&C&&(d.TgZ(0,"div",8)(1,"div",9)(2,"div",10),d.YNc(3,Tt,11,17,"div",11),d.qZA()()()),2&C){const P=d.oxw();d.xp6(3),d.Q6J("ngForOf",P.albums)("ngForTrackBy",P.trackByItemId)}}function Yt(C,H){if(1&C&&(d.TgZ(0,"p",33),d._uU(1),d.qZA()),2&C){const P=d.oxw(2);d.xp6(1),d.hij(" ",P.PORTFOLIO_ITEM_MSG[P.portfolioType].MSG," ")}}function Ht(C,H){if(1&C&&(d.TgZ(0,"div",28)(1,"div",29),d._UZ(2,"app-circle-background-icon",30),d.TgZ(3,"h3",31),d._uU(4),d.qZA(),d.YNc(5,Yt,2,1,"p",32),d.qZA()()),2&C){const P=d.oxw();d.xp6(2),d.Q6J("icomoonClassName",P.PORTFOLIO_TYPE_ICON_MAP[P.portfolioType]),d.xp6(2),d.hij(" ",P.PORTFOLIO_ITEM_MSG[P.portfolioType].TITLE," "),d.xp6(1),d.Q6J("ngIf",!P.isDashboardRoute)}}function re(C,H){1&C&&(d.TgZ(0,"div",28),d._UZ(1,"app-loader"),d.qZA())}let wt=(()=>{const H=class{constructor(S,D,v,L,f){this.router=S,this.apiCallService=D,this.cs=v,this.portfolioUnlockService=L,this.cdr=f,this.portfolioType="",this.portfolioTypeId="",this.activeTab="",this.albums=[],this.userId="",this.isDashboardRoute=!1,this.loadingItems=!1,this.isMyProfile=!1,this.visitedUserProfile=null,this.userSubscriptionList=[],this.pUserSubscriptionList=[],this.addItemClick=new d.vpe,this.itemDeleted=new d.vpe,this.portfolioContentUnlockedWithPoints=new d.vpe,this.CONSTS=V.oM,this.PORTFOLIO_TYPE_CONSTS=G.W,this.ALBUM_PORTFOLIO_CONSTS=c.Rh,this.PORTFOLIO_CONSTS=O.fD,this.Ap
1plication=t.Mx,this.MUSIC_PLAYER_CONST=lt.UU,this.PAYMENT_FOR_TYPE=qt.Vw,this.commonEnum=$.i4,this.PORTFOLIO_TYPE_ICON_MAP=V.WT,this.individualSongs=[],this.isLoading=!1,this.selectedAlbumItem=null,this.selectedItem=null,this.unlockModalHeader=qt.fD.UNLOCK_MODAL_HEADER,this.PORTFOLIO_ITEM_MSG=V.xH,this.destroy$=new r.x,this.PORTFOLIO_MASTER_TYPE_LABEL_MAP=V.Gn}ngOnChanges(S){S.albums&&this.albums&&this.processAlbumsReleaseDate()}processAlbumsReleaseDate(){this.albums.forEach(S=>{const D=(0,it.NH)(S.release_date);D.type===W.vI.RELEASE_TYPE_YEAR?(S.formattedReleaseDate=D.value,S.isReleaseYearType=!0):D.type===W.vI.RELEASE_TYPE_DATE?(S.formattedReleaseDate=(0,it.Tl)(S.release_date),S.isReleaseYearType=!1):(S.formattedReleaseDate=null,S.isReleaseYearType=!1)})}onAddItemClick(){this.addItemClick.emit({type:this.portfolioType,tab:this.activeTab||this.CONSTS.TAB_ALBUMS})}onItemClick(S){if(!S.id)return;const D=(this.portfolioType||"").toUpperCase(),v=this.cs.encodePortfolioSk(S.id),L=V.Tf[D];this.router.navigate(this.isDashboardRoute?["/dashboard/portfolio",this.userId,L,v]:["/monetize/portfolio",L,v])}drop(S){if(!S.previousIndex){const D=S.item.data,v=Number(S?.container.data),L=[...this.albums],f=[...this.albums];(0,at.bA)(f,D,v),f.forEach((F,y)=>{F.sequence_number=y+t.Mx.ONE}),this.albums=f;const T=f.filter(F=>F.pk&&F.sk).map(F=>({pk:F.pk,sk:F.sk,sequence_number:F.sequence_number||f.indexOf(F)+t.Mx.ONE}));T.length&&this.apiCallService.put(X.Y9.portfolioSequenceNumber,{data:T},!1).pipe((0,N.R)(this.destroy$)).subscribe({next:F=>{F.status?this.cs.showSuccessMessage(F.message||this.CONSTS.SEQUENCE_NUMBERS_UPDATED_SUCCESS):(this.cs.showErrorMessage(F.message||this.CONSTS.FAILED_TO_UPDATE_SEQUENCE_NUMBERS),this.albums=L)},error:F=>{this.cs.showErrorMessage(F.message||this.CONSTS.FAILED_TO_UPDATE_SEQUENCE_NUMBERS),this.albums=L}})}}trackByItemId(S,D){return D?.id||S}getContentTypeLabel(S){return this.portfolioType?S===t.Mx.ONE?V.U[this.portfolioType]:V.P1[this.portfolioType]:S===t.Mx.ONE?this.CONSTS.ITEM:this.CONSTS.ITEMS}onDeleteAlbumClick(S,D){D.stopPropagation(),this.selectedAlbumItem=S,this.deleteAlbumTemplate&&this.deleteAlbumTemplate.openModal()}deleteAlbum(){if(!this.selectedAlbumItem||!this.selectedAlbumItem.sk)return;const S=(this.portfolioType||"").toUpperCase(),D=X.$_.getAlbumContent(this.selectedAlbumItem.sk,S);this.isLoading=!0,this.apiCallService.delete(D,!0).pipe((0,N.R)(this.destroy$)).subscribe({next:v=>{if(this.isLoading=!1,v.status){this.cs.showSuccessMessage(v.message||this.CONSTS.ALBUM_DELETED_SUCCESS);const L=this.albums.findIndex(f=>f.sk===this.selectedAlbumItem?.sk);-1!==L&&this.albums.splice(L,1),this.selectedAlbumItem&&this.itemDeleted.emit({item:this.selectedAlbumItem,tab:this.activeTab||this.CONSTS.TAB_ALBUMS}),this.selectedAlbumItem=null}else this.cs.showErrorMessage(v.message||this.CONSTS.FAILED_TO_DELETE_ALBUM)},error:v=>{this.isLoading=!1,this.cs.showErrorMessage(v.message||this.CONSTS.FAILED_TO_DELETE_ALBUM)}})}onCancelDelete(){this.deleteAlbumTemplate&&this.deleteAlbumTemplate.closeModal(),this.selectedAlbumItem=null}get deleteAlbumMessage(){return this.CONSTS.DELETE_MASTER_DATA_MESSAGE[this.portfolioType].replace("{{title}}",this.selectedAlbumItem?.title||"")}getItemStatus(S){if(!S.status)return null;const D=S.status.toUpperCase();return D===G.W.PORTFOLIO_STATUS.INACTIVE.toUpperCase()?this.CONSTS.DISABLED:D===G.W.PORTFOLIO_STATUS.DRAFT.toUpperCase()?this.CONSTS.DRAFTED:null}shouldShowStatus(S){return null!==this.getItemStatus(S)}isStatusInactive(S){return S.status?.toUpperCase()===G.W.PORTFOLIO_STATUS.INACTIVE.toUpperCase()}isStatusDraft(S){return S.status?.toUpperCase()===G.W.PORTFOLIO_STATUS.DRAFT.toUpperCase()}onLockClick(S,D){D.stopPropagation(),this.selectedItem=S,this.unlockModalHeader="Unlock "+this.portfolioType.charAt(0).toUpperCase()+this.portfolioType.slice(1).toLowerCase()+(this.portfolioType.toLowerCase()===G.W.PORTFOLIO_TYPE.MUSIC.toLowerCase()?lt.UU.SPACE_ALBUM:lt.UU.SPACE_SERIES),this.cdr.detectChanges();const v=this.getUnlockConfig();this.portfolioUnlockService.handleLockClick(S,D,v)}getUnlockConfig(){return{selectedItem:this.selectedItem,visitedUserProfile:this.visitedUserProfile,userSubscriptionList:this.userSubscriptionList,pUserSubscriptionList:this.pUserSubscriptionList,portfolioType:this.portfolioType,unlockModal:this.unlockModal,destroy$:this.destroy$,isIndividual:!1,userId:this.userId,portfolioTypeId:this.portfolioTypeId,isAlbumLocking:!0}}onPurchaseIndividual(){this.portfolioUnlockService.purchaseIndividual(this.getUnlockConfig())}onPurchaseSubscription(){this.portfolioUnlockService.purchaseSubscription(this.getUnlockConfig())}onPurchaseNft(){this.portfolioUnlockService.purchaseNft(this.getUnlockConfig())}onPortfolioUnlockedWithPoints(){this.portfolioContentUnlockedWithPoints.emit()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let C=H;return H.\u0275fac=function(D){return new(D||H)(d.Y36(ut.F0),d.Y36(J.F),d.Y36(mt.v),d.Y36(se.A),d.Y36(d.sBO))},H.\u0275cmp=d.Xpm({type:H,selectors:[["app-portfolio-items-listing"]],viewQuery:function(D,v){if(1&D&&(d.Gf(gt,5),d.Gf(Et,5)),2&D){let L;d.iGM(L=d.CRH())&&(v.deleteAlbumTemplate=L.first),d.iGM(L=d.CRH())&&(v.unlockModal=L.first)}},inputs:{portfolioType:"portfolioType",portfolioTypeId:"portfolioTypeId",activeTab:"activeTab",albums:"albums",userId:"userId",isDashboardRoute:"isDashboardRoute",loadingItems:"loadingItems",isMyProfile:"isMyProfile",visitedUserProfile:"visitedUserProfile",userSubscriptionList:"userSubscriptionList",pUserSubscriptionList:"pUserSubscriptionList"},outputs:{addItemClick:"addItemClick",itemDeleted:"itemDeleted",portfolioContentUnlockedWithPoints:"portfolioContentUnlockedWithPoints"},features:[d.TTD],decls:9,vars:18,consts:[[1,"portfolio-items-listing-container"],["dropListContainerCard",""],["class","portfolio-items-grid",4,"ngIf"],["class","portfolio-items-empty-state",4,"ngIf"],[3,"dynamicClass","ConfirmationMessage","headerLabel","commonEnum","confirmDelete","cancelDelete"],["deleteAlbumTemplate",""],[3,"selectedItem","userProfile","userSubscriptionList","pUserSubscriptionList","contentType","headerType","userId","isLocked","portfolioType","isAlbumLocking","unlockModalHeader","purchaseIndividual","purchaseSubscription","purchaseNft","unlockedWithPoints"],["unlockModal",""],[1,"portfolio-items-grid"],[1,"portfolio-listing"],["cdkDropListGroup","",1,"listing"],["cdkDropList","","class","portfolio-item-wrapper",3,"cdkDropListData","cdkDropListOrientation","cdkDropListDisabled","cdkDropListDropped",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDropList","",1,"portfolio-item-wrapper",3,"cdkDropListData","cdkDropListOrientation","cdkDropListDisabled","cdkDropListDropped"],["cdkDrag","",1,"portfolio-item-card",3,"cdkDragData","cdkDragBoundary","cdkDragDisabled","click"],["class","icon store-icon icon-drag reorder-dash","cdkDragHandle","",4,"ngIf"],["class","icon delete-icon",3,"click",4,"ngIf"],[1,"card-image-wrapper",3,"ngClass"],["appDisableRightClick","","appMobileOptimization","","loading","lazy","decoding","async",1,"card-image","img-fluid",3,"alt","originalUrl","format"],["class","status-badge",3,"ngClass",4,"ngIf"],[1,"card-content"],[1,"card-title"],["class","card-meta",4,"ngIf"],["cdkDragHandle","",1,"icon","store-icon","icon-drag","reorder-dash"],[1,"icon","delete-icon",3,"click"],[1,"icon-delete-filled"],[1,"status-badge",3,"ngClass"],[1,"card-meta"],[4,"ngIf"],[1,"portfolio-items-empty-state"],[1,"empty-state-content"],[3,"icomoonClassName"],[1,"empty-state-title"],["class","empty-state-text",4,"ngIf"],[1,"empty-state-text"]],template:function(D,v){1&D&&(d.TgZ(0,"div",0,1),d.YNc(2,kt,4,2,"div",2),d.YNc(3,Ht,6,3,"div",3),d.YNc(4,re,2,0,"div",3),d.qZA(),d.TgZ(5,"app-confirmation-modal",4,5),d.NdJ("confirmDelete",function(){return v.deleteAlbum()})("cancelDelete",function(){return v.onCancelDelete()}),d.qZA(),d.TgZ(7,"app-portfolio-unlock-modal",6,7),d.NdJ("purchaseIndividual",function(){return v.onPurchaseIndividual()})("purchaseSubscription",function(){return v.onPurchaseSubscription()})("purchaseNft",function(){return v.onPurchaseNft()})("unlockedWithPoints",function(){return v.onPortfolioUnlockedWithPoints()}),d.qZA()),2&D&&(d.xp6(2),d.Q6J("ngIf",(null==v.albums?null:v.albums.length)>v.Application.ZERO&&!v.loadingItems),d.xp6(1),d.Q6J("ngIf",(null==v.albums?null:v.albums.length)===v.Application.ZERO&&!v.loadingItems),d.xp6(1),d.Q6J("ngIf",v.loadingItems),d.xp6(1),d.Q6J("dynamicClass","delete-modal portfolio-banner-delete-modal")("ConfirmationMessage",v.deleteAlbumMessage)("headerLabel",v.CONSTS.DELETE_MASTER_DATA_TITLE[v.portfolioType])("commonEnum",v.commonEnum),d.xp6(2),d.Q6J("selectedItem",v.selectedItem)("userProfile",v.visitedUserProfile)("userSubscriptionList",v.userSubscriptionList)("pUserSubscriptionList",v.pUserSubscriptionList)("contentType",v.PAYMENT_FOR_TYPE.MUSIC_PORTFOLIO)("headerType",v.PORTFOLIO_MASTER_TYPE_LABEL_MAP[v.portfolioType])("userId",null==v.visitedUserProfile?null:v.visitedUserProfile.email)("isLocked",null==v.selectedItem?null:v.selectedItem.isLocked)("portfolioType",v.portfolioType)("isAlbumLocking",!0)("unlockModalHeader",v.unlockModalHeader))},dependencies:[Ct.mk,Ct.sg,Ct.O5,Wt.R,Bt.w,Qt.m,Ft.Y,Nt.z,It.J,at.Wj,at.Fd,at.Zt,at.Bh,Ct.uU],styles:[".portfolio-items-listing-container[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor)!important;border-radius:30px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-header[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;margin-bottom:24px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:center;justify-content:flex-end}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-grid[_ngcontent-%COMP%] .portfolio-listing[_ngcontent-%COMP%] .listing[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;gap:20px;flex-wrap:wrap;width:100%}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-grid[_ngcontent-%COMP%] .portfolio-listing[_ngcontent-%COMP%] .portfolio-item-wrapper[_ngcontent-%COMP%]{display:flex;flex-shrink:0}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%]{margin-top:32px;display:flex;justify-content:center;align-items:center;padding:60px 48px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%]{text-align:center;width:100%;max-width:600px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%] app-circle-background-icon[_ngcontent-%COMP%]{margin-bottom:24px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%] .empty-state-title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:var(--configPostTextColor)!important;margin:24px 0 12px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%] .empty-state-text[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:var(--configPostTextColor)!important;margin:0}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%] .empty-state-button[_ngcontent-%COMP%]{margin-top:16px;display:flex;justify-content:center}.portfolio-item-wrapper[_ngcontent-%COMP%]{display:flex;flex-shrink:0}.portfolio-item-card[_ngcontent-%COMP%]{background:var(--configBgColor)!important;border-radius:20px;overflow:hidden;cursor:pointer;position:relative;display:flex;flex-direction:column;width:100%;height:auto;will-change:transform;flex-shrink:0}
1.portfolio-item-card.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.portfolio-item-card.cdk-drag-preview[_ngcontent-%COMP%]{cursor:move}.portfolio-item-card.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.portfolio-item-card[_ngcontent-%COMP%] .reorder-dash[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:12px;right:20px;z-index:10;background:var(--configSecondaryBgColor)!important;display:flex;align-items:center;justify-content:center;border-radius:50%;padding:11px 10px}.portfolio-item-card[_ngcontent-%COMP%] .reorder-dash.icon-drag[_ngcontent-%COMP%]{font-size:14px}.portfolio-item-card[_ngcontent-%COMP%] .reorder-dash.icon-drag[_ngcontent-%COMP%]:before{color:var(--configPostTextColor)!important}.portfolio-item-card[_ngcontent-%COMP%] .delete-icon[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:12px;right:60px;z-index:10;background:var(--configSecondaryBgColor)!important;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;padding:4px5px;font-size:14px;transition:opacity .2s ease}.portfolio-item-card[_ngcontent-%COMP%] .delete-icon[_ngcontent-%COMP%] .icon-delete-filled[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important}.portfolio-item-card[_ngcontent-%COMP%] .delete-icon[_ngcontent-%COMP%] .icon-delete-filled[_ngcontent-%COMP%]:before{font-size:20px;color:var(--configPostTextColor)!important}.portfolio-item-card[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%]{position:absolute;top:12px;right:20px;z-index:10}.portfolio-item-card[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .lock-button[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:50%;background:var(--configThemeColor, #013956);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}@media (max-width: 768px){.portfolio-item-card[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .lock-button[_ngcontent-%COMP%]{width:32px;height:32px}}.portfolio-item-card[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .lock-button[_ngcontent-%COMP%]:hover{opacity:1;transform:scale(1.05)}.portfolio-item-card[_ngcontent-%COMP%] .lock-button-container[_ngcontent-%COMP%] .lock-button[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{color:var(--configButtonTextColor);font-size:20px}.portfolio-item-card[_ngcontent-%COMP%] .edit-icon[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:12px;right:60px;z-index:10;background:var(--configSecondaryBgColor)!important;display:flex;align-items:center;justify-content:center;border-radius:50%;padding:11px 10px;font-size:14px;transition:opacity .2s ease}.portfolio-item-card[_ngcontent-%COMP%] .video-thumbnail-wrapper[_ngcontent-%COMP%]{aspect-ratio:5/3!important}.portfolio-item-card[_ngcontent-%COMP%] .card-image-wrapper[_ngcontent-%COMP%]{width:100%;aspect-ratio:1/1;overflow:hidden;position:relative;padding:4px}.portfolio-item-card[_ngcontent-%COMP%] .card-image-wrapper[_ngcontent-%COMP%] .card-image[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%;object-fit:cover;transition:transform .3s ease;border-radius:20px;display:block}.portfolio-item-card[_ngcontent-%COMP%] .card-image-wrapper[_ngcontent-%COMP%] .status-badge[_ngcontent-%COMP%]{position:absolute;top:16px;left:12px;padding:6px 12px;border-radius:16px;font-size:12px;font-weight:600;z-index:5}.portfolio-item-card[_ngcontent-%COMP%] .card-image-wrapper[_ngcontent-%COMP%] .status-badge.status-disabled[_ngcontent-%COMP%]{background:#fe4040;color:#fff!important}.portfolio-item-card[_ngcontent-%COMP%] .card-image-wrapper[_ngcontent-%COMP%] .status-badge.status-drafted[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important}.portfolio-item-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%]{padding:16px;display:flex;height:auto;flex-direction:column;gap:8px}.portfolio-item-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--configBgTextColor)!important;margin:0;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@media (min-width: 993px){.portfolio-item-card[_ngcontent-%COMP%]{width:195px}}@media (min-width: 1025px){.portfolio-item-card[_ngcontent-%COMP%]{width:240px}}@media (min-width: 1165px){.portfolio-item-card[_ngcontent-%COMP%]{width:247px}}@media (min-width: 1281px){.portfolio-item-card[_ngcontent-%COMP%]{width:280px}}.card-meta[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:var(--configBgTextColor)!important;margin:0}.card-meta[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--configBgTextColor)!important}@media screen and (max-width: 992px){.portfolio-items-listing-container[_ngcontent-%COMP%]{padding:16px 0 0;border-radius:20px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-header[_ngcontent-%COMP%]{margin-bottom:16px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%]{width:100%;justify-content:center}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:100%}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-grid[_ngcontent-%COMP%] .portfolio-listing[_ngcontent-%COMP%] .listing[_ngcontent-%COMP%]{gap:16px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-grid[_ngcontent-%COMP%] .portfolio-listing[_ngcontent-%COMP%] .portfolio-item-wrapper[_ngcontent-%COMP%]{width:auto}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%]{width:200
1px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%]{padding:40px 24px;margin-top:24px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%] .empty-state-title[_ngcontent-%COMP%]{font-size:20px;margin:20px 0 10px}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-empty-state[_ngcontent-%COMP%] .empty-state-content[_ngcontent-%COMP%] .empty-state-text[_ngcontent-%COMP%]{font-size:14px}}@media screen and (max-width: 576px){.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-grid[_ngcontent-%COMP%] .portfolio-listing[_ngcontent-%COMP%] .listing[_ngcontent-%COMP%]{flex-direction:column;flex-wrap:nowrap}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-items-grid[_ngcontent-%COMP%] .portfolio-listing[_ngcontent-%COMP%] .portfolio-item-wrapper[_ngcontent-%COMP%]{flex-direction:column}.portfolio-items-listing-container[_ngcontent-%COMP%] .portfolio-item-card[_ngcontent-%COMP%]{width:100%}}"]}),C})();var At=b(58642),ae=b(17427),le=b(16);const ce=["deletePortfolioTemplate"];function de(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"span",12)(1,"a",13),d.NdJ("click",function(){d.CHM(P);const D=d.oxw(2);return d.KtG(D.navigateToPortfolioHub())}),d._uU(2),d.qZA(),d.TgZ(3,"span",14),d._uU(4),d.qZA(),d.TgZ(5,"span",15),d._uU(6),d.qZA()()}if(2&C){const P=d.oxw(2);d.xp6(2),d.Oqu(P.portfolioBannerTypeHubLabel),d.xp6(2),d.Oqu(P.CONSTS.BREADCRUMB_SEPARATOR),d.xp6(2),d.Oqu(P.portfolioType.title)}}function pe(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"div",8)(1,"a",9),d.NdJ("click",function(){d.CHM(P);const D=d.oxw();return d.KtG(D.navigateToBack())}),d._UZ(2,"em",10),d.qZA(),d._UZ(3,"app-user-image"),d.YNc(4,de,7,3,"span",11),d.qZA()}if(2&C){const P=d.oxw();d.xp6(4),d.Q6J("ngIf",P.portfolioType)}}function ue(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"h4")(1,"a",13),d.NdJ("click",function(){d.CHM(P);const D=d.oxw(2);return d.KtG(D.navigateToPortfolioHub())}),d._uU(2),d.qZA(),d.TgZ(3,"span",14),d._uU(4),d.qZA(),d.TgZ(5,"span",15),d._uU(6),d.qZA()()}if(2&C){const P=d.oxw(2);d.xp6(2),d.Oqu(P.portfolioBannerTypeHubLabel),d.xp6(2),d.Oqu(P.CONSTS.BREADCRUMB_SEPARATOR),d.xp6(2),d.Oqu(P.portfolioType.title)}}const ge=function(C){return{"d-none d-lg-flex dashboard-margin":C}};function me(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"div",16)(1,"div",17)(2,"a",18),d.NdJ("click",function(){d.CHM(P);const D=d.oxw();return d.KtG(D.navigateToBack())}),d._UZ(3,"em",10),d.qZA(),d.YNc(4,ue,7,3,"h4",4),d.qZA()()}if(2&C){const P=d.oxw();d.Q6J("ngClass",d.VKq(2,ge,P.isDashboardRoute)),d.xp6(4),d.Q6J("ngIf",P.portfolioType)}}function _e(C,H){1&C&&d._UZ(0,"app-portfolio-banner-skeleton")}function he(C,H){if(1&C&&(d.TgZ(0,"div",33)(1,"span"),d._uU(2),d.qZA()()),2&C){const P=d.oxw(3);d.xp6(2),d.Oqu(P.CONSTS.DISABLED)}}function fe(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"div",34)(1,"div",35),d.NdJ("click",function(){d.CHM(P);const D=d.oxw(3);return d.KtG(D.navigateToPortfolioInsights())}),d._UZ(2,"em",36),d.qZA(),d.TgZ(3,"div",35),d.NdJ("click",function(){d.CHM(P);const D=d.oxw(3);return d.KtG(D.navigateToEdit())}),d._UZ(4,"em",37),d.qZA(),d.TgZ(5,"div",38),d.NdJ("click",function(){d.CHM(P);const D=d.oxw(3);return d.KtG(D.onDeletePortfolio())}),d._UZ(6,"em",39),d.qZA()()}}function Gt(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"div",40)(1,"p",41),d.NdJ("click",function(){d.CHM(P);const D=d.oxw(3);return d.KtG(D.toggleDescription())}),d.ALo(2,"bioFormat"),d.ALo(3,"contentLengthHandler"),d.qZA()()}if(2&C){const P=d.oxw(3);d.xp6(1),d.Q6J("innerHTML",d.lcZ(2,1,d.gM2(3,3,P.portfolioType,150,3,30)),d.oJD)}}function Ot(C,H){1&C&&(d.TgZ(0,"div",42)(1,"div",43),d._UZ(2,"app-loader"),d.qZA()())}function Ce(C,H){if(1&C&&(d.TgZ(0,"p",48),d._uU(1),d.qZA()),2&C){const P=d.oxw(4);d.xp6(1),d.hij(" ",null==P.EMPTY_STATE_MESSAGE_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""]?null:P.EMPTY_STATE_MESSAGE_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""].MSG," ")}}const Ut=function(C){return{type:"button",class:"btn btn-primary add-portfolio-item-btn",label:C,emClass:"icon-newpost-plus mr-10"}};function be(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"app-button",51),d.NdJ("handleButtonClick",function(){d.CHM(P);const D=d.oxw(5);return d.KtG(D.navigateToAddItem("first"))}),d.qZA()}if(2&C){const P=d.oxw(5);d.Q6J("btnField",d.VKq(1,Ut,null==P.OUTER_ADD_BUTTON_LABEL_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""]?null:P.OUTER_ADD_BUTTON_LABEL_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""].MASTER))}}function zt(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"app-button",51),d.NdJ("handleButtonClick",function(){d.CHM(P);const D=d.oxw(5);return d.KtG(D.navigateToAddItem("second"))}),d.qZA()}if(2&C){const P=d.oxw(5);d.Q6J("btnField",d.VKq(1,Ut,null==P.OUTER_ADD_BUTTON_LABEL_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""]?null:P.OUTER_ADD_BUTTON_LABEL_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""].SINGLE))}}function Pe(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"app-button",51),d.NdJ("handleButtonClick",function(){d.CHM(P);const D=d.oxw(5);return d.KtG(D.navigateToAddItem())}),d.qZA()}if(2&C){const P=d.oxw(5);d.Q6J("btnField",d.VKq(1,Ut,P.CONSTS.ADD_ITEM))}}function Dt(C,H){if(1&C&&(d.TgZ(0,"div",49),d.YNc(1,be,1,3,"app-button",50),d.YNc(2,zt,1,3,"app-button",50),d.YNc(3,Pe,1,3,"app-button",50),d.qZA()),2&C){const P=d.oxw(4);d.xp6(1),d.Q6J("ngIf",P.shouldShowTwoButtons()),d.xp6(1),d.Q6J("ngIf",P.shouldShowTwoButtons()),d.xp6(1),d.Q6J("ngIf",!P.shouldShowTwoButtons())}}function Y(C,H){if(1&C&&(d.TgZ(0,"div",42)(1,"div",43),d._UZ(2,"app-circle-background-icon",44),d.TgZ(3,"h3",45),d._uU(4),d.qZA(),d.YNc(5,Ce,2,1,"p",46),d.YNc(6,Dt,4,3,"div",47),d.qZA()()),2&C){const P=d.oxw(3);d.xp6(2),d.Q6J("icomoonClassName",P.PORTFOLIO_TYPE_ICON_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""]),d.xp6(2),d.hij(" ",null==P.EMPTY_STATE_MESSAGE_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""]?null:P.EMPTY_STATE_MESSAGE_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""].TITLE," "),d.xp6(1),d.Q6J("ngIf",!P.isDashboardRoute),d.xp6(1),d.Q6J("ngIf",!P.isDashboardRoute)}}function w(C,H){if(1&C&&(d.TgZ(0,"span"),d._uU(1),d.qZA()),2&C){const P=d.oxw(5);d.xp6(1),d.hij("(",P.albumsCount,")")}}function Kt(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"button",58),d.NdJ("click",function(){d.CHM(P);const D=d.oxw(4);return d.KtG(D.switchTab(D.CONSTS.TAB_ALBUMS))}),d._uU(1),d.YNc(2,w,2,1,"span",4),d.qZA()}if(2&C){const P=d.oxw(4);d.ekj("active",P.activeTab===P.CONSTS.TAB_ALBUMS),d.xp6(1),d.hij(" ",null==P.PORTFOLIO_TAB_LABEL_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""]?null:P.PORTFOLIO_TAB_LABEL_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""].MASTER," "),d.xp6(1),d.Q6J("ngIf",P.albumsCount>=0)}}function Zt(C,H){if(1&C&&(d.TgZ(0,"span"),d._uU(1),d.qZA()),2&C){const P=d.oxw(5);d.xp6(1),d.hij(" (",P.individualSongsCount,") ")}}function jt(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"button",58),d.NdJ("click",function(){d.CHM(P);const D=d.oxw(4);return d.KtG(D.switchTab(D.CONSTS.TAB_INDIVIDUAL))}),d._uU(1),d.YNc(2,Zt,2,1,"span",4),d.qZA()}if(2&C){const P=d.oxw(4);d.ekj("active",P.activeTab===P.CONSTS.TAB_INDIVIDUAL),d.xp6(1),d.hij(" ",null==P.PORTFOLIO_TAB_LABEL_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""]?null:P.PORTFOLIO_TAB_LABEL_MAP[(null==P.portfolioType?null:P.portfolioType.portfolio_type)||""].SINGLE," "),d.xp6(1),d.Q6J("ngIf",P.individualSongsCount>=0)}}function Oe(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"div",59)(1,"div",60)(2,"app-button",51),d.NdJ("handleButtonClick",function(){d.CHM(P);const D=d.oxw(4);return d.KtG(D.onAddItemClick({type:(null==D.portfolioType?null:D.portfolioType.portfolio_type)||"",tab:D.activeTab||D.CONSTS.TAB_ALBUMS}))}),d.qZA()()()}if(2&C){const P=d.oxw(4);d.xp6(2),d.Q6J("btnField",d.VKq(1,Ut,P.getAddButtonLabel()))}}function B(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"div")(1,"app-portfolio-items-listing",61),d.NdJ("addItemClick",function(D){d.CHM(P);const v=d.oxw(4);
1return d.KtG(v.onAddItemClick(D))})("itemDeleted",function(D){d.CHM(P);const v=d.oxw(4);return d.KtG(v.onAlbumDeleted(D))})("portfolioContentUnlockedWithPoints",function(){d.CHM(P);const D=d.oxw(4);return d.KtG(D.loadPortfolioItems())}),d.qZA()()}if(2&C){const P=d.oxw(4);d.xp6(1),d.Q6J("portfolioType",(null==P.portfolioType?null:P.portfolioType.portfolio_type)||"")("portfolioTypeId",P.portfolioTypeId)("activeTab",P.activeTab)("albums",P.albums)("userId",P.userId)("loadingItems",P.isLoadingAlbums)("isMyProfile",P.isMyProfile)("visitedUserProfile",P.visitedUserProfile)("userSubscriptionList",P.userSubscriptionList)("pUserSubscriptionList",P.pUserSubscriptionList)("isDashboardRoute",P.isDashboardRoute)}}function R(C,H){if(1&C){const P=d.EpF();d.TgZ(0,"div",62)(1,"app-music-list",63),d.NdJ("songDeleted",function(D){d.CHM(P);const v=d.oxw(4);return d.KtG(v.onSongDeleted(D))})("editItemClick",function(D){d.CHM(P);const v=d.oxw(4);return d.KtG(v.onEditIndividualSong(D))})("portfolioContentUnlockedWithPoints",function(){d.CHM(P);const D=d.oxw(4);return d.KtG(D.loadPortfolioItems())}),d.qZA()()}if(2&C){const P=d.oxw(4);d.xp6(1),d.Q6J("userId",P.userId)("showActions",!0)("showDspLinks",!0)("showEditIcon",!0)("items",P.individualSongs)("portfolioTypeId",P.portfolioTypeId)("portfolioType",(null==P.portfolioType?null:P.portfolioType.portfolio_type)||"")("isDashboardRoute",P.isDashboardRoute)("allowDrag",!P.isDashboardRoute)("userName",(null==P.visitedUserProfile?null:P.visitedUserProfile.first_name)+" "+(null==P.visitedUserProfile?null:P.visitedUserProfile.last_name))("isMyProfile",P.isMyProfile)("visitedUserProfile",P.visitedUserProfile)("userSubscriptionList",P.userSubscriptionList)("pUserSubscriptionList",P.pUserSubscriptionList)("loadingSongs",P.isLoadingIndividualSongs)}}function Z(C,H){if(1&C&&(d.TgZ(0,"div",52)(1,"div",53)(2,"div",54),d.YNc(3,Kt,3,4,"button",55),d.YNc(4,jt,3,4,"button",55),d.qZA(),d.YNc(5,Oe,3,3,"div",56),d.qZA(),d.YNc(6,B,2,11,"div",4),d.YNc(7,R,2,15,"div",57),d.qZA()),2&C){const P=d.oxw(3);d.xp6(3),d.Q6J("ngIf",P.isDashboardRoute&&P.albumsCount>P.Application.ZERO||!P.isDashboardRoute),d.xp6(1),d.Q6J("ngIf",P.isDashboardRoute&&P.individualSongsCount>P.Application.ZERO||!P.isDashboardRoute),d.xp6(1),d.Q6J("ngIf",!P.isDashboardRoute),d.xp6(1),d.Q6J("ngIf",!P.shouldShowTabs()||P.shouldShowTabsAndContent()&&P.activeTab===P.CONSTS.TAB_ALBUMS),d.xp6(1),d.Q6J("ngIf",!P.shouldShowTabs()||P.shouldShowTabsAndContent()&&P.activeTab===P.CONSTS.TAB_INDIVIDUAL)}}function g(C,H){if(1&C&&(d.TgZ(0,"div",21)(1,"div",22)(2,"div",23),d.YNc(3,he,3,1,"div",24),d._UZ(4,"img",25),d.YNc(5,fe,7,0,"div",26),d.TgZ(6,"div",27)(7,"div",28)(8,"div",29),d._uU(9),d.qZA(),d.YNc(10,Gt,4,8,"div",30),d.qZA()()()(),d.YNc(11,Ot,3,0,"div",31),d.YNc(12,Y,7,4,"div",31),d.YNc(13,Z,8,5,"div",32),d.qZA()),2&C){const P=d.oxw(2);d.xp6(3),d.Q6J("ngIf",!1===P.portfolioType.enable),d.xp6(1),d.Q6J("src",P.portfolioType.thumbnail,d.LSH)("alt",P.portfolioType.title)("originalUrl",P.portfolioType.thumbnail)("format","webp"),d.xp6(1),d.Q6J("ngIf",!P.isDashboardRoute),d.xp6(4),d.hij(" ",P.portfolioType.title," "),d.xp6(1),d.Q6J("ngIf",P.portfolioType.description),d.xp6(1),d.Q6J("ngIf",(P.isLoadingAlbums||P.isLoadingIndividualSongs)&&P.shouldShowBannerEmptyState()),d.xp6(1),d.Q6J("ngIf",!P.isLoadingAlbums&&!P.isLoadingIndividualSongs&&P.shouldShowBannerEmptyState()),d.xp6(1),d.Q6J("ngIf",P.shouldShowTabs()&&P.shouldShowTabsAndContent())}}function k(C,H){if(1&C&&(d.TgZ(0,"div",19),d.YNc(1,g,14,11,"div",20),d.qZA()),2&C){const P=d.oxw();d.xp6(1),d.Q6J("ngIf",P.portfolioType)}}let x=(()=>{const H=class{constructor(S,D,v,L,f,T,F,y){this.router=S,this.route=D,this.cdr=v,this.apiCallService=L,this.cs=f,this.apiCacheService=T,this.authService=F,this.seoService=y,this.isDashboardRoute=!1,this.CONSTS=V.oM,this.PORTFOLIO_CONSTS=O.fD,this.PORTFOLIO_TYPE_CONSTS=G.W,this.Application=t.Mx,this.commonEnum=$.i4,this.portfolioSk="",this.portfolioPk="",this.portfolioType=null,this.isDisabled=!1,this.isLoading=!0,this.albumsCount=t.Mx.ZERO,this.individualSongsCount=t.Mx.ZERO,this.activeTab=this.CONSTS.TAB_ALBUMS,this.albums=[],this.individualSongs=[],this.isLoadingAlbums=!1,this.destroy$=new r.x,this.isLoadingIndividualSongs=!1,this.isMyProfile=!1,this.userSubscriptionList=[],this.pUserSubscriptionList=[],this.whiteLabelConfigData=null,this.skipRouteNavigation=!1,this.PORTFOLIO_TYPE_ICON_MAP=V.WT,this.OUTER_ADD_BUTTON_LABEL_MAP=V.r6,this.EMPTY_STATE_MESSAGE_MAP=V.J_,this.PORTFOLIO_TAB_LABEL_MAP=V.wX,this.PORTFOLIO_TITLE_HEADING_MAP=V.JX,this.portfolioBannerTypeHubLabel="",this.userId=this.route.
1snapshot.paramMap.get("userId")||"",this.portfolioTypeId=this.route.snapshot.paramMap.get("id")||"",this.authService.isLogin&&this.userProfileSubscription()}userProfileSubscription(){this.apiCacheService.get(X.Y9.getUsers,st.Y.REFRESH_EVERY_N).pipe((0,N.R)(this.destroy$)).subscribe(S=>{if(S?.data?.user_name){this.currentUserProfile=S.data;const D=!this.userId;this.userId||(this.userId=S.data.user_name),this.isMyProfile=this.userId===this.currentUserProfile?.user_name,D&&this.portfolioTypeId&&this.getProfileVisitUser(),setTimeout(()=>{!this.isDashboardRoute&&!this.isMyProfile&&this.router.navigate([`/${U._1.NOT_FOUND}`])},10)}})}ngOnInit(){this.cs.getWhiteLabelConfiguration$().pipe((0,N.R)(this.destroy$)).subscribe(D=>{D&&(this.whiteLabelConfigData=D.data)}),this.route.snapshot.queryParamMap.get("tab")===this.CONSTS.TAB_INDIVIDUAL&&(this.activeTab=this.CONSTS.TAB_INDIVIDUAL,this.skipRouteNavigation=!0,this.router.navigate([],{relativeTo:this.route,queryParams:{tab:null},queryParamsHandling:"merge",replaceUrl:!0})),this.portfolioTypeId&&this.getProfileVisitUser()}getProfileVisitUser(){if(!this.userId)return;const S=X.$_.user(this.userId);this.apiCacheService.get(S,st.Y.REFRESH_EVERY_N).pipe((0,N.R)(this.destroy$)).subscribe({next:D=>{D.status&&(this.userSubscriptionList=D.subscriptions,this.visitedUserProfile=D.data,this.loadPortfolioType())},error:D=>{this.cs.showErrorMessage(D.message)}})}getAllSubscriptionListOfParentUser(){let S=X.$_.userSubscribe(!1,null);this.whiteLabelConfigData&&(S=X.$_.userSubscribe(!0,this.cs.getHostUrl)),this.apiCacheService.get(S,st.Y.REFRESH_EVERY_N).pipe((0,N.R)(this.destroy$)).subscribe({next:D=>{D.status&&(this.pUserSubscriptionList=D.data)},error:D=>{this.pUserSubscriptionList=[],this.cs.showErrorMessage(D.message)}})}get cacheType(){return this.isDashboardRoute?st.Y.REFRESH_EVERY_N:st.Y.ALWAYS_FRESH}loadPortfolioType(){if(!this.portfolioTypeId)return;this.isLoading=!0;const S=this.cs.encodeToUTF(this.portfolioTypeId);let D=`${X.Y9.portfolio}/${S}`;this.isDashboardRoute&&(D=`${X.Y9.portfolio}/${S}?creator_id=${this.cs.encodeToUTF(this.visitedUserProfile?.gsi4pk)}`),this.apiCacheService.get(D,this.cacheType).pipe((0,N.R)(this.destroy$)).subscribe({next:v=>{if(this.isLoading=!1,v?.status&&v?.data?.sk){const L=Lt()(v.data);this.portfolioSk=L.sk||"",this.portfolioPk=L.pk||"",this.albumsCount=L.album_count||t.Mx.ZERO,this.individualSongsCount=L.individual_count||t.Mx.ZERO,this.portfolioType={id:L.sk||"",title:L.portfolio_title||"",thumbnail:L.cover_image_url||"",portfolio_type:L.portfolio_type||"",description:L.portfolio_desc||"",enable:L.status===G.W.PORTFOLIO_STATUS.ACTIVE,created_at:L.created_at?new Date(L.created_at).toISOString():void 0,updated_at:L.updated_at?new Date(L.updated_at).toISOString():void 0},this.isDisabled=L.status===G.W.PORTFOLIO_STATUS.INACTIVE,this.portfolioType&&(this.portfolioType.isMore=!1),this.setInitialActiveTab(),this.refreshPortfolioBannerHubLabel(),this.loadPortfolioItems()}else this.router.navigate([`/${U._1.NOT_FOUND}`]);this.updatePortfolioTypeSeo()},error:v=>{this.isLoading=!1,v?.statusCode===t.Mx.FOUR_HUNDRED_FOUR||v?.status===t.Mx.FOUR_HUNDRED_FOUR||this.cs.showErrorMessage(v?.message||V.oM.FAILED_TO_LOAD_PORTFOLIO),this.router.navigate([`/${U._1.NOT_FOUND}`])}})}loadPortfolioItems(){if(!this.portfolioType?.portfolio_type)return;const S=this.portfolioType.portfolio_type.toUpperCase();G.W.PORTFOLIO_TYPE_ARRAY.includes(S)&&(this.activeTab===this.CONSTS.TAB_ALBUMS?(this.albums=[],this.fetchAlbumContent(S)):(this.individualSongs=[],this.fetchIndividualSongsContent(S)))}fetchIndividualSongsContent(S){if(!S)return;this.isLoadingIndividualSongs=!0;let D=`${X.Y9.portfolioContent}?type=${S}&sk=${this.cs.encodeToUTF(this.portfolioSk)}`;this.isDashboardRoute&&(D+=`&creator_id=${this.cs.encodeToUTF(this.visitedUserProfile?.gsi4pk)}`),this.apiCacheService.get(D,this.cacheType).pipe((0,N.R)(this.destroy$)).subscribe({next:v=>{this.isLoadingIndividualSongs=!1,v.status&&v.data&&Array.isArray(v.data)?(this.individualSongs=Lt()(v.data)?.map(L=>{const f=!(!this.isDashboardRoute&&this.isMyProfile||!L?.is_locked||L?.unlocked_through?.is_unlocked);return{...L,require_authentication:L?.require_authentication||!1,isDownloadable:!f&&L?.download_url&&L?.allow_download,isLocked:f,canPlay:!f&&L?.duration,showTime:!!L?.duration,canPreview:!!(f&&L.free_preview_time&&L.file),duration:(0,it.LU)(L.duration),is_nft:L?.lock_through?.individual?.outer_nft?.length,is_subscription:L?.lock_through?.individual?.outer_subscription?.length,subscription:L?.lock_through?.individual?.outer_subscription,previewProcessing:!!(!this.isDashboardRoute&&this.isMyProfile&&L?.is_locked&&L?.free_preview_time&&L?.transcoding_in_progress)}}),this.individualSongsCount=this.individualSongs.length,this.cdr.detectChanges(),this.updatePortfolioTypeSeo()):(this.individualSongsCount=t.Mx.ZERO,this.individualSongs=[],this.updatePortfolioTypeSeo())},error:v=>{this.cs.showErrorMessage(v?.message),this.isLoadingIndividualSongs=!1,this.individualSongs=[]}})}onSongDeleted(S){S?.sk&&(this.individualSongs=this.individualSongs?.filter(D=>D.sk!==S.sk),this.individualSongsCount=this.individualSongs.length,this.cdr.detectChanges())}onAlbumDeleted(S){S?.item?.sk&&(this.albums=this.albums?.filter(D=>D.sk!==S.item.sk),this.albumsCount=this.albums.length,this.cdr.detectChanges())}fetchAlbumContent(S){if(!S)return;this.isLoadingAlbums=!0;let D=`${X.Y9.portfolioAlbumContent}?type=${S}&portfolio_sk=${this.cs.encodeToUTF(this.portfolioSk)}`;this.isDashboardRoute&&(D+=`&creator_id=${this.cs.encodeToUTF(this.visitedUserProfile?.gsi4pk)}`),this.apiCacheService.get(D,this.cacheType).pipe((0,N.R)(this.destroy$)).subscribe({next:v=>{this.isLoadingAlbums=!1,v.status&&v.data&&Array.isArray(v.data)?(this.albums=Lt()(v.data).map((L,f)=>({is_locked:L?.is_locked,isLocked:!this.isMyProfile&&!!L?.is_locked&&!L?.unlocked_through?.is_unlocked,lock_through:L?.lock_through,unlocked_through:L?.unlocked_through,is_nft:!!L?.lock_through?.individual?.outer_nft?.length,is_subscription:!!L?.lock_through?.individual?.outer_subscription?.length,subscription:L?.lock_through?.individual?.outer_subscription,id:L.sk||"",title:L.title||L.album_title||"",thumbnail:L.cover_image_url||"",type:S,description:L.description||L.album_desc||"",song_count:L.individual_count||t.Mx.ZERO,created_at:L.created_at?new Date(L.created_at).toISOString():void 0,updated_at:L.updated_at?new Date(L.updated_at).toISOString():void 0,pk:L.pk||"",sk:L.sk||"",sequence_number:void 0!==L.sequence_number?L.sequence_number:f+1,status:L.status||"",release_date:L.release_date||void 0})),this.albumsCount=this.albums.length,this.cdr.detectChanges(),this.updatePortfolioTypeSeo()):(this.albums=[],this.albumsCount=t.Mx.ZERO,this.updatePortfolioTypeSeo())},error:v=>{this.isLoadingAlbums=!1,this.albums=[],this.albumsCount=t.Mx.ZERO}})}updatePortfolioTypeSeo(){this.visitedUserProfile&&this.portfolioType&&this.seoService.setPortfolioTypeSeo(this.portfolioType,this.albums,this.individualSongs,this.visitedUserProfile,this.fullName)}get fullName(){return`${this.visitedUserProfile?.first_name||""} ${this.visitedUserProfile?.last_name||""}`.trim()}refreshPortfolioBannerHubLabel(){if(!this.visitedUserProfile?.first_name)return void(this.portfolioBannerTypeHubLabel="");const v=`${this.visitedUserProfile.first_name||""}${this.visitedUserProfile.last_name?` ${this.visitedUserProfile.last_name}`:""}`.trim();this.portfolioBannerTypeHubLabel=`${v}`}navigateToPortfolioInsights(){this.router.navigate([U._1.INSIGHTS],{queryParams:{tab:rt.Vr.EARNING,openDetails:rt.IU.PORTFOLIO_EARNING_ANALYTICS}})}navigateToEdit(){this.portfolioSk&&this.router.navigate(["/monetize/portfolio","add-edit-portfolio-type",this.cs.encodeToUTF(this.portfolioSk)])}navigateToPortfolioHub(){this.router.navigate((0,St.nQ)(this.userId,this.isDashboardRoute))}navigateToBack(){this.navigateToPortfolioHub()}onDeletePortfolio(){this.deletePortfolioTemplate&&this.deletePortfolioTemplate.openModal()}deletePortfolio(){if(!this.portfolioSk)return;const S=`${X.Y9.portfolio}/${this.cs.encodeToUTF(this.portfolioSk)}`;this.apiCallService.delete(S,!0).pipe((0,N.R)(this.destroy$)).subscribe({next:D=>{D.status&&(this.cs.showSuccessMessage(D.message||this.CONSTS.PORTFOLIO_DELETED_SUCCESS),this.navigateToBack())},error:D=>{D?.statusCode===t.Mx.FOUR_HUNDRED_FOUR||D?.status===t.Mx.FOUR_HUNDRED_FOUR?this.router.navigate([`/${U._1.NOT_FOUND}`]):this.cs.showErrorMessage(D?.message||vt.Vm.SOMETHING_WENT_WRONG)}})}onCancelDelete(){this.deletePortfolioTemplate&&this.deletePortfolioTemplate.closeModal()}setInitialActiveTab(){this.skipRouteNavigation?this.skipRouteNavigation=!1:this.albumsCount>t.Mx.ZERO?this.activeTab=this.CONSTS.TAB_ALBUMS:this.individualSongsCount>t.Mx.ZERO&&(this.activeTab=this.CONSTS.TAB_INDIVIDUAL)}navigateToAddItem(S=this.CONSTS.TYPE_FIRST){if(!this.portfolioTypeId)return;const D=this.portfolioType?.portfolio_type||G.W.PORTFOLIO_TYPE.CUSTOM;S===this.CONSTS.TYPE_SECOND?this.router.navigate(["/monetize/portfolio",V.i4[D]],{queryParams:{portfolioType:D,portfolioTypeId:this.portfolioTypeId}}):this.router.navigate(["/monetize/portfolio",V.qY[D]],{queryParams:{portfolioTypeId:this.portfolioTypeId}})}onAddItemClick(S){if(!this.portfolioTypeId)return;const D=S.type||this.portfolioType?.portfolio_type||G.W.PORTFOLIO_TYPE.CUSTOM;S.tab===this.CONSTS.TAB_INDIVIDUAL?this.router.navigate(["/monetize/portfolio",V.i4[D]],{queryParams:{portfolioType:D,portfolioTypeId:this.portfolioTypeId}}):this.router.navigate(["/monetize/portfolio",V.qY[D]],{queryParams:{portfolioTypeId:this.portfolioTypeId}})}shouldShowBannerEmptyState(){return!!this.shouldShowTabs()&&this.albumsCount===t.Mx.ZERO&&this.individualSongsCount===t.Mx.ZERO}shouldShowTabsAndContent(){return this.albumsCount>t.Mx.ZERO||this.individualSongsCount>t.Mx.ZERO}shouldShowTwoButtons(){if(!this.portfolioType?.portfolio_type)return!1;const S=(this.portfolioType.portfolio_type||"").toUpperCase();return G.W.PORTFOLIO_TYPE_ARRAY.includes(S)}toggleDescription(){this.portfolioType&&this.portfolioType.description&&(this.portfolioType={...this.portfolioType,isMore:!this.portfolioType.isMore},this.cdr.detectChanges())}shouldShowTabs(){if(!this.portfolioType?.portfolio_type)return!1;const S=(this.portfolioType.portfolio_type||"").toUpperCase();return G.W.PORTFOLIO_TYPE_ARRAY.includes(S)}switchTab(S){this.activeTab=S,this.refreshPortfolioBannerHubLabel(),this.loadPortfolioItems()}onEditIndividualSong(S){S&&S.sk&&this.portfolioTypeId&&this.router.navigate(["/monetize/portfolio",V.i4[this.portfolioType?.portfolio_type],this.cs.encodeToUTF(S.sk)],{queryParams:{portfolioType:this.portfolioType?.portfolio_type,portfolioTypeId:this.portfolioTypeId},state:{songData:S}})}getAddButtonLabel(){return this.activeTab===this.CONSTS.TAB_ALBUMS?this.OUTER_ADD_BUTTON_LABEL_MAP[this.portfolioType?.portfolio_type]?.MASTER:this.OUTER_ADD_BUTTON_LABEL_MAP[this.portfolioType?.portfolio_type]?.SINGLE}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.seoService.setDefaultSeoTags()}};let C=H;return H.\u0275fac=function(D){return new(D||H)(d.Y36(ut.F0),d.Y36(ut.gz),d.Y36(d.sBO),d.Y36(J.F),d.Y36(mt.v),d.Y36(st.G),d.Y36(oe.AuthService),d.Y36(_t.v))},H.\u0275cmp=d.Xpm({type:H,selectors:[["app-portfolio-banner-view"]],viewQuery:function(D,v){if(1&D&&d.Gf(ce,5),2&D){let L;d.iGM(L=d.CRH())&&(v.deletePortfolioTemplate=L.first)}},inputs:{isDashboardRoute:"isDashboardRoute"},decls:8,vars:8,consts:[[1,"inside-container","preference-container","portfolio-banner-view-container"],["class","inside-header",4,"ngIf"],[1,"walletform-container","preference-privacy-container","pb-4"],["class","heading",3,"ngClass",4,"ngIf"],[4,"ngIf"],["class","walletform-content p-0",4,"ngIf"],[3,"dynamicClass","ConfirmationMessage","headerLabel","commonEnum","confirmDelete","cancelDelete"],["deletePortfolioTemplate",""],[1,"inside-header"],[1,"close-btn",3,"click"],[1,"icon-arrow-back"],["class","mobile-title",4,"ngIf"],[1,"mobile-title"],[1,"breadcrumb-link",3,"click"],[1,"breadcrumb-separator"],[1,"breadcrumb-current"],[1,"heading",3,"ngClass"],[1,"d-flex","align-items-center","gap-3"],[3,"click"],[1,"walletform-content","p-0"],["class","portfolio-banner-content",4,"ngIf"],[1,"portfolio-banner-content"],[1,"profile-card","event-card-border"],[1,"profile-card-banner"],["class","card-disable-overlay",4,"ngIf"],["appDisableRightClick","","appMobileOptimization","","loading","lazy","decoding","async",1,"img-fluid",3,"src","alt","originalUrl","format"],["class","profile-card-action d-flex justify-content-center",4,"ngIf"],[1,"banner-overlay-content"],[1,"banner-title-section"],[1,"banner-title"],["class","banner-description-preview",4,"ngIf"],["class","add-items-card",4,"ngIf"],["class","portfolio-items-container",4,"ngIf"],[1,"card-disable-overlay"],[1,"profile-card-action","d-flex","justify-content-center"],[1,"banner-edit-icon",3,"click"],[1,"icon-litebar-graph"],[1,"icon-profileedit"],[1,"banner-delete-icon",3,"click"],[1,"icon-delete-filled"],[1,"banner-description-preview"],[1,"banner-description",3,"innerHTML","click"],[1,"add-items-card"],[1,"add-items-content"],[3,"icomoonClassName"],[1,"no-items-title"],["class","add-first-item-text",4,"ngIf"],["class","add-items-buttons",4,"ngIf"],[1,"add-first-item-text"],[1,"add-items-buttons"],[3,"btnField","handleButtonClick",4,"ngIf"],[3,"btnField","handleButtonClick"],[1,"portfolio-items-container"],[1,"portfolio-tabs-section"],[1,"portfolio-tabs"],["class","portfolio-tab",3,"active","click",4,"ngIf"],["class","portfolio-items-header",4,"ngIf"],["class","portfolio-items-section",4,"ngIf"],[1,"portfolio-tab",3,"click"],[1,"portfolio-items-header"],[1,"header-actions"],[3,"portfolioType","portfolioTypeId","activeTab","albums","userId","loadingItems","isMyProfile","visitedUserProfile","userSubscriptionList","pUserSubscriptionList","isDashboardRoute","addItemClick","itemDeleted","portfolioContentUnlockedWithPoints"],[1,"portfolio-items-section"],[3,"userId","showActions","showDspLinks","showEditIcon","items","portfolioTypeId","portfolioType","isDashboardRoute","allowDrag","userName","isMyProfile","visitedUserProfile","userSubscriptionList","pUserSubscriptionList","loadingSongs","songDeleted","editItemClick","portfolioContentUnlockedWithPoints"]],template:function(D,v){1&D&&(d.TgZ(0,"div",0),d.YNc(1,pe,5,1,"div",1),d.TgZ(2,"div",2),d.YNc(3,me,5,4,"div",3),d.YNc(4,_e,1,0,"app-portfolio-banner-skeleton",4),d.YNc(5,k,2,1,"div",5),d.qZA()(),d.TgZ(6,"app-confirmation-modal",6,7),d.NdJ("confirmDelete",function(){return v.deletePortfolio()})("cancelDelete",function(){return v.onCancelDelete()}),d.qZA()),2&D&&(d.xp6(1),d.Q6J("ngIf",v.isDashboardRoute&&!v.isLoading),d.xp6(2),d.Q6J("ngIf",!v.isLoading),d.xp6(1),d.Q6J("ngIf",v.isLoading),d.xp6(1),d.Q6J("ngIf",!v.isLoading),d.xp6(1),d.Q6J("dynamicClass","delete-modal portfolio-banner-delete-modal")("ConfirmationMessage",v.CONSTS.DELETE_PORTFOLIO_MSG)("headerLabel",v.CONSTS.DELETE_PORTFOLIO)("commonEnum",v.commonEnum))},dependencies:[Ct.mk,Ct.O5,ie.r,ne.l,Wt.R,Qt.m,Ft.Y,Nt.z,It.J,Rt.V,wt,At.S,ae.dY,le.F],styles:["@media screen and (max-width: 992px){ .monetize-content .portfolio-banner-view-container{margin-left:-10px;margin-right:-10px}}.portfolio-banner-view-container[_ngcontent-%COMP%] .walletform-content[_ngcontent-%COMP%]{margin:0!important;box-shadow:none!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{height:5px!important;margin:0 16px 0 0!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{font-size:24px!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .inside-header[_ngcontent-%COMP%]{margin-bottom:20px;line-height:normal!important;text-transform:none!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .inside-header[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline!important;text-transform:none!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .inside-header[_ngcontent-%COMP%] .mobile-title[_ngcontent-%COMP%]{text-transform:none!important;font-size:24px;font-weight:700;line-height:24px}@media screen and (max-width: 992px){.portfolio-banner-view-container[_ngcontent-%COMP%] .inside-header[_ngcontent-%COMP%] .mobile-title[_ngcontent-%COMP%]{font-size:13px;line-heig
1ht:16px}}.portfolio-banner-view-container[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;flex-wrap:wrap;gap:16px;margin-bottom:24px}.portfolio-banner-view-container[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:24px;font-weight:700;line-height:24px;margin:0}@media screen and (max-width: 992px){.portfolio-banner-view-container[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:16px}}.portfolio-banner-view-container[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .label-margin[_ngcontent-%COMP%]{margin:0;white-space:nowrap;font-size:16px;font-weight:500}.portfolio-banner-view-container[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]{font-size:24px;font-weight:500;cursor:pointer;vertical-align:bottom}.portfolio-banner-view-container[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]:before{line-height:normal!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;color:var(--configBgTextColor)!important;cursor:pointer;margin:0!important;font:inherit}.portfolio-banner-view-container[_ngcontent-%COMP%] .breadcrumb-separator[_ng
1content-%COMP%], .portfolio-banner-view-container[_ngcontent-%COMP%] .breadcrumb-current[_ngcontent-%COMP%]{color:var(--configBgTextColor)}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%]{background:var(--configBgColor)!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%]{background:var(--configBgColor)!important;border-radius:30px;overflow:hidden}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%]{position:relative;border-radius:30px 30px 0 0;aspect-ratio:2/1;width:100%;overflow:hidden;height:auto!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%]:after{display:none!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%]{position:absolute;top:20px;right:20px;z-index:2}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-edit-icon[_ngcontent-%COMP%], .portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-delete-icon[_ngcontent-%COMP%]{background:var(--configThemeColor)!important;display:flex;align-items:center;justify-content:center;border-radius:50%;width:40px;height:40px;cursor:pointer;box-shadow:0 2px 8px #0000004d;transition:transform .2s ease;margin:0 5px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-edit-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-delete-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--configButtonTextColor)!important;font-size:20px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-edit-icon[_ngcontent-%COMP%]:hover, .portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-delete-icon[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;padding:40px 20px 20px;background:linear-gradient(to top,var(--configSecondaryBgColor) 0%,transparent 100%)}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-title[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:30px;font-weight:700;display:flex;align-items:center;gap:12px;margin-bottom:12px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-title[_ngcontent-%COMP%] .banner-title-edit[_ngcontent-%COMP%]{background:var(--configThemeColor)!important;display:flex;align-items:center;justify-content:center;border-radius:50%;width:32px;height:32px;
1cursor:pointer;font-size:16px;color:var(--configButtonTextColor)!important;transition:transform .2s ease}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-title[_ngcontent-%COMP%] .banner-title-edit[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-description-preview[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:16px;font-weight:400;line-height:160%;margin:0}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-description-preview[_ngcontent-%COMP%] p[_ngcontent-%COMP%] .read-more-link[_ngcontent-%COMP%]{color:var(--configThemeColor)!important;cursor:pointer;font-weight:600;text-decoration:underline;margin-left:4px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-description-preview[_ngcontent-%COMP%] p[_ngcontent-%COMP%] .read-more-link[_ngcontent-%COMP%]:hover{opacity:.8}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-content[_ngcontent-%COMP%]{margin-top:-100px;padding:0 48px 56px;position:relative;z-index:1}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%]{margin-bottom:24px;display:flex;justify-content:space-between;align-items:center}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-tabs[_ngcontent-%COMP%]{display:flex;gap:0;align-items:center}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-tabs[_ngcontent-%COMP%] .portfolio-tab[_ngcontent-%COMP%]{background:transparent;border:none;padding:12px 24px;color:var(--configPostTextColor);cursor:pointer;position:relative;transition:all .3s ease;border-bottom:2px solid transparent;font-family:Roboto;font-weight:700;font-size:14px;line-height:100%}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-tabs[_ngcontent-%COMP%] .portfolio-tab[_ngcontent-%COMP%]:hover{opacity:.8}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-tabs[_ngcontent-%COMP%] .portfolio-tab[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--configPostTextColor)}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-tabs[_ngcontent-%COMP%] .portfolio-tab.active[_ngcontent-%COMP%]{color:var(--theme-interactive-link);border-bottom-color:var(--theme-interactive-link);font-weight:600}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-tabs[_ngcontent-%COMP%] .portfolio-tab.active[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--theme-interactive-link)}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor)!important;border-radius:30px;margin-top:24px;padding:60px 48px;display:flex;justify-content:center;align-items:center}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%]{text-align:center;width:100%;max-width:600px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%] app-circle-background-icon[_ngcontent-%COMP%]{margin-bottom:24px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%] .no-items-title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:var(--configPostTextColor)!important;margin:24px 0 12px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%] .add-first-item-text[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:var(--configPostTextColor)!important;margin-bottom:32px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%] .add-items-buttons[_ngcontent-%COMP%]{display:flex;gap:16px;justify-content:center;flex-wrap:wrap}.portfolio-banner-view-container[_ngcontent-%COMP%] .mobile-toggle-control
1s[_ngcontent-%COMP%]{padding-bottom:20px;background:var(--configBgColor)!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .mobile-toggle-controls[_ngcontent-%COMP%] .label-margin[_ngcontent-%COMP%]{margin:0;white-space:nowrap;font-size:14px;font-weight:500}@media screen and (max-width: 992px){.portfolio-banner-view-container[_ngcontent-%COMP%]{margin-top:50px}.portfolio-banner-view-container[_ngcontent-%COMP%] .hdr[_ngcontent-%COMP%]{display:none}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%]{height:240px!important}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%]{padding:20px 12px 12px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-title[_ngcontent-%COMP%]{font-size:16px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-title[_ngcontent-%COMP%] .banner-title-edit[_ngcontent-%COMP%]{width:28px;height:28px;font-size:14px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .banner-overlay-content[_ngcontent-%COMP%] .banner-title-section[_ngcontent-%COMP%] .banner-description-preview[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%]{top:12px;right:12px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-edit-icon[_ngcontent-%COMP%], .portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-delete-icon[_ngcontent-%COMP%]{width:36px;height:36px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-edit-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-banner[_ngcontent-%COMP%] .profile-card-action[_ngcontent-%COMP%] .banner-delete-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:18px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .profile-card[_ngcontent-%COMP%] .profile-card-content[_ngcontent-%COMP%]{margin-top:-60px;padding:0 20px 32px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:0;padding:0 10px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-tabs[_ngcontent-%COMP%] .portfolio-tab[_ngcontent-%COMP%]{padding:10px 8px;font-size:12px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%]{margin-top:16px;padding:40px 20px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%] .no-items-title[_ngcontent-%COMP%]{font-size:20px;margin:20px 0 8px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%] .add-first-item-text[_ngcontent-%COMP%]{font-size:14px;margin-bottom:24px}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%] .add-items-buttons[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.portfolio-banner-view-container[_ngcontent-%COMP%] .portfolio-banner-content[_ngcontent-%COMP%] .add-items-card[_ngcontent-%COMP%] .add-items-content[_ngcontent-%COMP%] .add-items-buttons[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:100%;max-width:100%}}.walletform-container[_ngcontent-%COMP%]{color:var(--configBgTextColor)!important}.portfolio-items-container[_ngcontent-%COMP%]{margin-top:24px;background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;border-radius:30px;padding:24px}@media screen and (max-width: 991px){.portfolio-items-container[_ngcontent-%COMP%]{padding:8px}.portfolio-items-container[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-items-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] app-button .app-btn{padding:5px 10px}.portfolio-items-container[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-items-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] app-button .app-btn .btn-text{display:none}.portfolio-items-container[_ngcontent-%COMP%] .portfolio-tabs-section[_ngcontent-%COMP%] .portfolio-items-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] app-button .app-btn em{margin-right:0!important}}.card-disable-overlay[_ngcontent-%COMP%]{padding:6px 12px;border-radius:60px;background-color:#fe4040;position:absolute;top:20px;left:20px;margin:auto;display:flex;justify-content:center;align-items:center;height:40px;width:112px;z-index:2}.card-disable-overlay[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff;font-size:16px}@media screen and (max-width: 991px){.card-disable-overlay[_ngcontent-%COMP%]{width:auto;height:auto;padding:5px 10px;top:14px}.card-disable-overlay[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px}} .theme-whiteLabel .portfolio-banner-view-container .inside-header{color:var(--configBgTextColor)!important} .theme-whiteLabel .portfolio-banner-view-container .inside-header .breadcrumb-separator, .theme-whiteLabel .portfolio-banner-view-container .inside-header .breadcrumb-current{color:var(--configBgTextColor)!important} .theme-whiteLabel .portfolio-banner-view-container .heading .breadcrumb-separator, .theme-whiteLabel .portfolio-banner-view-container .heading .breadcrumb-current{color:var(--configBgTextColor)!important} .theme-whiteLabel .portfolio-banner-view-container .portfolio-banner-content .portfolio-tabs-section .portfolio-tabs .portfolio-tab.active{color:var(--configThemeColor)!important;border-bottom-color:var(--configThemeColor)!important} .theme-whiteLabel .portfolio-banner-view-container .portfolio-banner-content .portfolio-tabs-section .portfolio-tabs .portfolio-tab.active span{color:var(--configThemeColor)!important}.portfolio-items-section[_ngcontent-%COMP%]{border-radius:32px;margin-top:16px;background:var(--configSecondaryBgColor)} .add-portfolio-item-btn{display:flex;align-items:center;justify-content:center}"]}),C})()},88903:(Ie,xt,b)=>{b.r(xt),b.d(xt,{PortfolioModule:()=>xa});var r=b(88692),N=b(20092),V=b(22864),G=b(18796),X=b(38023),J=b(13528);const mt={PORTFOLIO_TYPES:"Portfolios",ADD_PORTFOLIO:"Add Portfolio",EDIT:"Edit",DISABLED:"Disabled",NO_PORTFOLIO_TYPES_MSG:"Add your first Portfolio of Podcasts, Videos, Music Albums, Artwork and more.",LOADING:"Loading...",FAILED_TO_LOAD_PORTFOLIOS:"Failed to load portfolios"};var O=b(89321),U=b(59302),$=b(42384),vt=b(44689),t=b(64537),it=b(61354),st=b(6913),oe=b(50668),ft=b(36194),Lt=b(26695);function _t(a,m){1&a&&(t.TgZ(0,"div",9)(1,"div",10),t._UZ(2,"app-skeleton",11),t.qZA(),t.TgZ(3,"div",12),t._UZ(4,"app-skeleton",13),t.qZA()())}let St=(()=>{const m=class{constructor(){this.cards=Array.from({length:6},(e,i)=>i)}};let a=m;return m.\u0275fac=function(i){return new(i||m)},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-portfolios-skeleton"]],standalone:!0,features:[t.jDz],decls:9,vars:1,consts:[[1,"portfolios-skeleton"],[1,"portfolios-skeleton__heading","heading"],[1,"d-flex","align-items-center","justify-content-between","gap-3"],["className","h-24 w-120 r-6 c-bgt"],["className","h-40 w-190 r-28 c-bgt"],[1,"portfolios-skeleton__body"],[1,"portfolio-type-list-content","portfolios-skeleton__content"],[1,"portfolio-type-grid","portfolios-skeleton__grid"],["class","portfolio-type-card portfolios-skeleton__card",4,"ngFor","ngForOf"],[1,"portfolio-type-card","portfolios-skeleton__card"],[1,"card-image-container","portfolios-skeleton__image"],["className","h-100% w-100% r-12 c-sbg hard"],[1,"card-title","portfolios-skeleton__card-title"],["className","h-16 w-80% r-6 c-bgt"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"app-skeleton",3)(4,"app-skeleton",4),t.qZA()(),t.TgZ(5,"div",5)(6,"div",6)(7,"div",7),t.YNc(8,_t,5,0,"div",8),t.qZA()()()()),2&i&&(t.xp6(8),t.Q6J("ngForOf",o.cards))},dependencies:[r.ez,r.sg,Lt._],styles:[".portfolios-skeleton__heading[_ngcontent-%COMP%]{margin-bottom:24px;min-height:40px}.portfolios-skeleton__body[_ngcontent-%COMP%]{margin:0;padding:0;border-radius:15px;background:var(--configSecondaryBgColor)}@media screen and (min-width: 992px){.portfolios-skeleton__body[_ngcontent-%COMP%]{border-radius:30px}}.portfolios-skeleton__content[_ngcontent-%COMP%]{padding:24px}.portfolios-skeleton__grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.portfolios-skeleton__card[_ngcontent-%COMP%]{position:relative;border-radius:16px;overflow:hidden;padding:4px;background:var(--configBgColor)}.portfolios-skeleton__image[_ngcontent-%COMP%]{position:relative;width:100%;height:auto;border-radius:12px;aspect-ratio:2/1;overflow:hidden}.portfolios-skeleton__card-title[_ngcontent-%COMP%]{padding:16px;min-height:48px;display:flex;align-items:center}@media screen and (max-width: 992px){.portfolios-skeleton__content[_ngcontent-%COMP%]{padding:20px 12px}.portfolios-skeleton__grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:16px}.portfolios-skeleton__card-title[_ngcontent-%COMP%]{padding:12px 8px;min-height:38px}}@media screen and (max-width: 568px){.portfolios-skeleton__grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]}),a})();const d="icon-newpost-plus portfolio-type-list-add-btn mr-10",ut=function(a){return{type:"button",class:"btn btn-primary",label:a,emClass:d}};function Ct(a,m){if(1&a){const n=t.EpF();
1t.TgZ(0,"div",6)(1,"h4",7),t._uU(2),t.qZA(),t.TgZ(3,"app-button",8),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.navigateToAdd())}),t.qZA()()}if(2&a){const n=t.oxw();t.xp6(2),t.Oqu(n.CONSTS.PORTFOLIO_TYPES),t.xp6(1),t.Q6J("btnField",t.VKq(2,ut,n.CONSTS.ADD_PORTFOLIO))}}function ie(a,m){1&a&&t._UZ(0,"app-portfolios-skeleton")}function ne(a,m){if(1&a&&(t.TgZ(0,"div",22)(1,"span"),t._uU(2),t.qZA()()),2&a){const n=t.oxw(4);t.xp6(2),t.Oqu(n.CONSTS.DISABLED)}}function Wt(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",15),t.NdJ("click",function(){const o=t.CHM(n).$implicit,s=t.oxw(3);return t.KtG(s.navigateToBannerView(o))}),t.YNc(1,ne,3,1,"div",16),t.TgZ(2,"div",17),t._UZ(3,"img",18),t.TgZ(4,"div",19)(5,"span",20),t._uU(6),t.qZA()()(),t.TgZ(7,"div",21),t._uU(8),t.qZA()()}if(2&a){const n=m.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!1===n.enable),t.xp6(2),t.Q6J("src",n.thumbnail,t.LSH)("alt",n.title)("originalUrl",n.thumbnail)("format","webp"),t.xp6(3),t.Oqu(e.getPortfolioTypeLabel(n)),t.xp6(2),t.hij(" ",n.title," ")}}function Qt(a,m){if(1&a&&(t.TgZ(0,"div",13),t.YNc(1,Wt,9,7,"div",14),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.portfolioTypes)}}const Ft=function(a){return{type:"button",class:"btn btn-primary mt-3",label:a,emClass:d}};function Nt(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",23),t._UZ(1,"app-circle-background-icon",24),t.TgZ(2,"p"),t._uU(3),t.qZA(),t.TgZ(4,"app-button",8),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.navigateToAdd())}),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(3),t.Oqu(n.CONSTS.NO_PORTFOLIO_TYPES_MSG),t.xp6(1),t.Q6J("btnField",t.VKq(2,Ft,n.CONSTS.ADD_PORTFOLIO))}}function It(a,m){if(1&a&&(t.TgZ(0,"div",9)(1,"div",10),t.YNc(2,Qt,2,1,"div",11),t.YNc(3,Nt,5,4,"div",12),t.qZA()()),2&a){const n=t.oxw();t.xp6(2),t.Q6J("ngIf",null==n.portfolioTypes?null:n.portfolioTypes.length),t.xp6(1),t.Q6J("ngIf",!(null!=n.portfolioTypes&&n.portfolioTypes.length))}}let Rt=(()=>{const m=class{constructor(e,i,o){this.router=e,this.cs=i,this.apiCacheService=o,this.CONSTS=mt,this.PORTFOLIO_TYPE_CONSTS=O.W,this.portfolioTypes=[],this.isLoading=!1,this.destroy$=new X.x}ngOnInit(){this.loadPortfolioTypes()}loadPortfolioTypes(){this.isLoading=!0,this.apiCacheService.get(U.Y9.portfolio,vt.Y.ALWAYS_FRESH).pipe((0,J.R)(this.destroy$)).subscribe({next:i=>{if(this.isLoading=!1,i.status&&i.data){const o=Array.isArray(i.data)?i.data:[];this.portfolioTypes=o.map(s=>{const u=_=>{if(_){if("number"==typeof _)return new Date(_).toISOString();if("string"==typeof _)return _}};return{id:s.sk&&s.sk.split("#")[1]||s.sk||s.sk||"",title:s.portfolio_title||"",thumbnail:s.cover_image_url||"",portfolio_type:s.portfolio_type||"",description:s.portfolio_desc||"",enable:s.status===O.W.PORTFOLIO_STATUS.ACTIVE,created_at:u(s.created_at),updated_at:u(s.updated_at)}})}else this.portfolioTypes=[]},error:i=>{this.isLoading=!1,this.portfolioTypes=[],this.cs.showErrorMessage(i?.message||mt.FAILED_TO_LOAD_PORTFOLIOS)}})}navigateToAdd(){this.router.navigate(["/monetize/portfolio","add-edit-portfolio-type"])}navigateToEdit(e,i){i&&i.stopPropagation(),e?.id&&this.router.navigate(["/monetize/portfolio","add-edit-portfolio-type",e.id])}navigateToBannerView(e){e?.id&&this.router.navigate(["/monetize/portfolio","banner-view",e.id])}navigateToBack(){this.router.navigate(["/monetize/portfolio"])}getPortfolioTypeLabel(e){if(!e?.portfolio_type)return"";const i=e.portfolio_type;return O.W.PORTFOLIO_TYPE_OPTIONS.find(s=>s.value===i)?.label||""}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(V.F0),t.Y36($.v),t.Y36(vt.G))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-portfolio-type-list"]],decls:6,vars:3,consts:[[1,"inside-container","preference-container","portfolio-type-list-container"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"heading"],["class","d-flex align-items-center justify-content-between gap-3",4,"ngIf"],[4,"ngIf"],["class","walletform-content p-0",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between","gap-3"],[1,"m-0"],[3,"btnField","handleButtonClick"],[1,"walletform-content","p-0"],[1,"portfolio-type-list-content"],["class","portfolio-type-grid",4,"ngIf"],["class","not-found-pane card-not-found",4,"ngIf"],[1,"portfolio-type-grid"],["class","portfolio-type-card",3,"click",4,"ngFor","ngForOf"],[1,"portfolio-type-card",3,"click"],["class","card-disable-overlay",4,"ngIf"],[1,"card-image-container"],["appDisableRightClick","","appMobileOptimization","","loading","lazy","decoding","async",1,"img-fluid",3,"src","alt","originalUrl","format"],[1,"card-image-overlay"],[1,"portfolio-type-chip"],[1,"card-title"],[1,"card-disable-overlay"],[1,"n
1ot-found-pane","card-not-found"],["icomoonClassName","icon-liteportfolio"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,Ct,4,4,"div",3),t.qZA(),t.YNc(4,ie,1,0,"app-portfolios-skeleton",4),t.YNc(5,It,4,2,"div",5),t.qZA()()),2&i&&(t.xp6(3),t.Q6J("ngIf",o.cs.isBrowser&&!o.isLoading&&(null==o.portfolioTypes?null:o.portfolioTypes.length)),t.xp6(1),t.Q6J("ngIf",!o.cs.isBrowser||o.isLoading),t.xp6(1),t.Q6J("ngIf",o.cs.isBrowser&&!o.isLoading))},dependencies:[r.sg,r.O5,it.r,st.m,oe.z,ft.J,St],styles:[".portfolio-type-list-container[_ngcontent-%COMP%] .walletform-content[_ngcontent-%COMP%]{margin:0!important}.portfolio-type-list-container[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{margin-bottom:24px;color:var(--configBgTextColor)!important}.portfolio-type-list-container[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:24px;font-weight:700;line-height:24px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%]{padding:24px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%]{position:relative;border-radius:16px;overflow:hidden;padding:4px;background:var(--configBgColor)!important;cursor:pointer}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-disable-overlay[_ngcontent-%COMP%]{padding:6px 12px;border-radius:60px;background-color:#fe4040;position:absolute;top:12px;right:10px;display:flex;justify-content:center;align-items:center;height:27px;width:80px;z-index:2;color:var(--configButtonTextColor)!important}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%]{position:relative;width:100%;height:auto;border-radius:12px;aspect-ratio:2/1;overflow:hidden}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%]{position:absolute;top:8px;display:flex;align-items:center;justify-content:space-between;gap:8px;z-index:2;padding:0 5px;width:100%}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%] .portfolio-type-chip[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;padding:6px 12px;border-radius:20px;font-size:12px;font-weight:600;white-space:nowrap;box-shadow:0 2px 8px #0003}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%] .edit-icon-overlay[_ngcontent-%COMP%]{background:var(--configThemeColor)!important;display:flex;align-items:center;justify-content:center;border-radius:50%;width:30px;height:30px;cursor:pointer;transition:opacity .2s ease;box-shadow:0 2px 8px #0000004d}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%] .edit-icon-overlay[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--configButtonTextColor)!important;font-size:16px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%] .edit-icon-overlay[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{color:var(--configButtonTextColor)!important}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%] .edit-icon-overlay[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{padding:16px;font-size:16px;font-weight:700;font-style:bold;line-height:100%;text-align:left;color:var(--configBgTextColor)!important;word-break:break-word}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .not-found-pane[_ngcontent-%COMP%]{text-align:center;padding:60px 20px}@media screen and (max-width: 992px){.portfolio-type-list-container[_ngcontent-%COMP%]{margin-top:0}.portfolio-type-list-container[_ngcontent-%COMP%] .hdr[_ngcontent-%COMP%]{display:none}.portfolio-type-list-container[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:block;font-size:20px;text-align:end;margin-bottom:20px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%]{padding:20px 12px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:16px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%]{width:100%;height:auto;aspect-ratio:2/1}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%]{top:8px;gap:6px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%] .portfolio-type-chip[_ngcontent-%COMP%]{padding:4px 10px;font-size:11px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%] .edit-icon-overlay[_ngcontent-%COMP%]{opacity:1;width:30px;height:30px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%] .card-image-overlay[_ngcontent-%COMP%] .edit-icon-overlay[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:16px}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{padding:12px 8px;font-size:14px}}@media screen and (max-width: 568px){.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.portfolio-type-list-container[_ngcontent-%COMP%] .portfolio-type-list-content[_ngcontent-%COMP%] .portfolio-type-grid[_ngcontent-%COMP%] .portfolio-type-card[_ngcontent-%COMP%] .card-image-container[_ngcontent-%COMP%]{width:100%;height:auto;aspect-ratio:2/1}}[_nghost-%COMP%] app-loader{width:100%!important}[_nghost-%COMP%] app-loader .lds-spinner div:after{background:var(--configBgTextColor)!important}"]}),a})();var at=b(91205),c=b(37524),lt=b.n(c),W=b(84539),Bt=b(98329),gt=b(67030),Et=b(23090),l=b(59735),bt=b(36705),nt=b(96630),yt=b(87578),ct=b(96993),Q=b(26877),Mt=b(14121),Tt=b(28141),kt=b(3942),Yt=b(14625),Ht=b(82954),re=b(22348),wt=b(28262),At=b(49246);const ae=["dspIconModal"],le=["deleteTemplate"],ce=["enableToggle"];function de(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"em",25),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDeleteItem())}),t.qZA()}}function pe(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"em",26),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDeleteItem())}),t.qZA()}}function ue(a,m){if(1&a&&(t.TgZ(0,"div",27)(1,"div",28)(2,"div",29),t._UZ(3,"app-dynamic-form-builder",22),t.qZA(),t._UZ(4,"app-dynamic-form-builder",22),t.qZA()()),2&a){const n=t.oxw();
1t.xp6(3),t.Q6J("form",n.form)("fields",n.fields),t.xp6(1),t.Q6J("form",n.dspForm)("fields",n.dspFields)}}function ge(a,m){if(1&a&&t._UZ(0,"app-badge-groups-selection",30),2&a){const n=t.oxw();t.Q6J("parentForm",n.form)("arrayName","badge_groups")("selectedBadgeGroups",null==n.portfolioItemDetails?null:n.portfolioItemDetails.badge_groups)("hintMessage",n.PORTFOLIO_CONSTS.BADGE_GROUPS_HINT)("creatorId",null==n.userProfileData?null:n.userProfileData.gsi4pk)}}const me=function(a){return{type:"button",class:"btn btn-default w-100",label:a}},_e=function(a,m){return{type:"button",class:"btn btn-primary w-100",label:a,disabled:m}};function he(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",31)(1,"app-button",32),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.navigateToBack())}),t.qZA(),t.TgZ(2,"app-button",32),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleSubmit())}),t.qZA()()}if(2&a){const n=t.oxw();t.xp6(1),t.Q6J("btnField",t.VKq(2,me,n.PORTFOLIO_CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.WLB(4,_e,n.isEditMode?n.PORTFOLIO_CONSTS.UPDATE:n.PORTFOLIO_CONSTS.SAVE,(null==n.form?null:n.form.invalid)||(null==n.dspForm?null:n.dspForm.invalid)))}}const fe=function(){return{class:"custom-modal-lg"}};let Gt=(()=>{const m=class{constructor(e,i,o,s,p,u,_,h){this.router=e,this.route=i,this.formService=o,this.cs=s,this.apiCallService=p,this.uploadService=u,this.store=_,this.modalHandlerService=h,this.PORTFOLIO_CONSTS=at.fD,this.isEditMode=!1,this.form=null,this.fields=null,this.dspListing=[],this.destroy$=new X.x,this.dspButtonFields=[],this.dspFields=null,this.dspForm=null,this.dspModalFields=null,this.dspModalForm=null,this.portfolioItemDetails=null,this.commonEnum=ct.i4,this.enable=!0,this.isPostScheduled=!1,this.adminMarkedDisabled=!1,this.isPostDataFetched=!1,this.restrictedImages=[]}ngOnInit(){this.getPortfolioData()}toggleChanged(e){this.enable=e}setToggleChange(e){this.isPostDataFetched=!0,this.enableToggle&&(this.enableToggle.enable=e.enable),this.enable=e.enable,this.adminMarkedDisabled=e.adminMarkedDisabled||!1,this.isPostScheduled=e.isPostScheduled}getPortfolioData(){this.apiCallService.get(U.Y9.portfolio,!0).subscribe({next:i=>{i.status&&(i?.data?.length?(this.headerConfig=i?.data.filter(o=>"PORTFOLIO#HEADER"===o?.sk),this.headerConfig=this.headerConfig[0]):this.headerConfig=i?.data,this.portfolioShape=this.headerConfig.portfolio_shape,this.userProfile())},error:i=>{this.cs.showErrorMessage(i.message)}})}userProfile(){this.store.select(yt.SJ).pipe((0,J.R)(this.destroy$)).subscribe(e=>{this.userProfileData||(this.userProfileData=e,this.userProfileData?.gsi4pk&&this.initForm())})}initForm(){this.fields=lt()({sections:[{title:"",fields:[{type:W.sf.BANNER_IMAGE,name:"img",placeholder:"",class:"col-12",bannerOrientationPortrait:W.ox.PORTRAIT,bannerImageType:W.Oy.TYPE_2,cropperOptions:{cropperMinWidth:250,cropperMinHeight:450,cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:.5555555555555556,maintainAspectRatio:!0},validation:{required:{message:"Image is required"}}},{type:W.sf.TEXT,label:"Portfolio Item Title",name:"title",placeholder:"Type the Title of your Item",class:"col-12",validation:{required:{message:"Portfolio Item Title is required"},maxlength:{value:100,message:"Maximum 100 characters allowed"}}},{type:W.sf.TEXT_AREA,label:"Portfolio Item Description",name:"description",placeholder:"Type the Description of your Item",class:"col-12",validation:{required:{message:"Portfolio Item Description is required"}}},{type:W.sf.CUSTOM_MULTISELECT,label:"Digital Service Provider (DSP) Links",name:"dsp",class:"col-12 col-lg-12",callback:null,customMultiselectConfig:{defaultLabel:"Select DSPs",selectAllButtonLabel:"Select All",filterLabel:"Search",optionLabel:"name",optionIconLabel:"logo",customButtonLabel:"Add Custom DSP or Link",showHeader:!0}}]}]}),this.form=this.formService.toFormGroup(this.fields),this.dspModalFields=lt()({sections:[{title:"",fields:[{type:W.sf.PROFILE_IMAGE,label:"DSP Logo",placeholder:"",name:"logo",class:"col-12",validation:{required:{message:"Profile Image is required"}}},{type:W.sf.TEXT,label:"DSP Name",placeholder:"Enter DSP Name",name:"name",class:"col-12",validation:{required:{message:"DSP name is required"},maxlength:{value:25,message:"Maximum 25 characters allowed"}}}]}],buttons:[]}),this.dspModalForm=this.formService.toFormGroup(this.dspModalFields),this.bannerImageField=this.formService.getField(this.fields,0,"img");const e=this.portfolioShape===at.fD.SQUARE?at.fD.SQUARE_DIMENSION:at.fD.RECTANGLE_DIMENSION;this.bannerImageField.cropperOptions={cropperMinWidth:Number(e.WIDTH),cropperMinHeight:Number(e.HEIGHT),cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:Number(e.ASPECT_RATIO),maintainAspectRatio:!0},this.bannerImageField.bannerImageType2Title=this.portfolioShape===at.fD.SQUARE?"Add Square Image":"Add Tall Rectangle Image",this.cs.isBrowser&&setTimeout(()=>{document.documentElement.style.setProperty("--dynamic-width",`${e.WIDTH}px`),document.documentElement.style.setProperty("--dynamic-height",`${e.HEIGHT}px`),document.documentElement.style.setProperty("--description-height",`${e.DESCRIPTION_BOX_HEIGHT}px`)},0),this.titleField=this.formService.getField(this.fields,0,"title"),this.descriptionField=this.formService.getField(this.fields,0,"description"),this.multiselectField=this.formService.getField(this.fields,0,"dsp"),this.multiselectField.callback=this.customBtnClick.bind(this),this.getDSPListing(
1),this.subscribeMultiselectField()}getDSPListing(){this.apiCallService.get(U.Y9.dsp,!0).subscribe({next:i=>{i.status&&(this.dspListing=i.data?.Items,(0,Q.z7)(this.dspListing),this.multiselectField.options=[],this.dspListing.forEach(o=>{this.multiselectField.options.push({logo:o.logo,name:o.name,sk:o.sk,pk:o.pk})}),this.routeSk=this.route.snapshot.paramMap.get("id"),this.isEditMode=!!this.routeSk,this.routeSk&&this.userProfileData?.user_name&&this.getPortfolioItemById())},error:i=>{this.cs.showErrorMessage(i.message)}})}getPortfolioItemById(){const e=this.routeSk?this.routeSk.split("#")[1]:"",i=U.Y9.portfolioUser+"/"+this.cs.encodeToUTF(this.userProfileData?.gsi4pk)+"/"+e;this.apiCallService.get(i,!0).subscribe({next:o=>{if(o.status){this.form.patchValue(o.data);const s=[];this.portfolioItemDetails=o.data,this.enable=o.data?.enable,o.data.dsp.forEach(p=>{const u={logo:p.logo,name:p.name,sk:p.sk,pk:p.pk};s.push(u),-1===this.multiselectField.options.findIndex(h=>h.sk===p.sk)&&this.multiselectField.options.push(u)}),this.form.get(this.multiselectField.name).setValue(s)}},error:o=>{this.cs.showErrorMessage(o.message)}})}subscribeDspFormFields(){Object.keys(this.dspForm.controls).forEach(e=>{this.dspForm.get(e)?.valueChanges.subscribe(o=>{this.dspForm.value&&this.tempDspForm.patchValue(this.dspForm.value)})})}subscribeMultiselectField(){this.form.get(this.multiselectField.name).valueChanges?.pipe((0,J.R)(this.destroy$)).subscribe(e=>{const i=lt()(this.dspForm?.value||{});this.dspButtonFields=[],e.forEach(o=>{const p={type:W.sf.TEXT,label:"CTA Button Text",name:o.sk+"text",placeholder:"Enter CTA (Stream, Purchase, etc)",class:"col-12 col-lg-6",validation:{required:{message:"CTA Button Text is required"},maxlength:{value:13,message:"Maximum 13 characters allowed"}}};this.dspButtonFields.push({type:W.sf.TEXT,label:o.name+" URL",name:o.sk+"url",placeholder:"Paste "+o.name+" URL",class:"col-12 col-lg-6",textLogoUrl:o.logo,validation:{required:{message:o.name+" URL is required"},pattern:{value:Et.mL.WEBSITE_URL,message:o.name+" URL is invalid"}}}),this.dspButtonFields.push(p)}),this.dspButtonFields.length?(this.dspFields={sections:[{title:"",fields:this.dspButtonFields}]},this.dspForm=this.formService.toFormGroup(this.dspFields),this.dspForm.patchValue(i),this.tempDspForm=this.formService.toFormGroup(this.dspFields),this.routeSk&&this.portfolioItemDetails?.dsp?.forEach(o=>{this.dspForm.get(o.sk+"url").setValue(o.url),this.dspForm.get(o.sk+"text").setValue(o.text)}),this.subscribeDspFormFields()):(this.dspFields=null,this.dspForm=null)})}handleSubmit(){this.form.value.img instanceof File?this.uploadImageFileToS3Bucket():this.updatePortfolio()}uploadImageFileToS3Bucket(){if(!this.cs.isValidFile(this.form.value.img))return;const i=`${l.Mx.POST+Date.now()}_${this.form.value.img?.name.toLowerCase().replace(Et.mL.IMAGE_UPLOAD_TO_S3_NAME,"_").split(" ").join("_")}`;this.uploadService.uploadFileData(U.Y9.uploadFile,{file:this.form.value.img,fileName:i,folder:l.D4.createPostImageFolder},!0).pipe((0,J.R)(this.destroy$)).subscribe({next:s=>{if(s.progressStatus===l.Mx.RESTRICTED&&s.restrictedImage)return this.restrictedImages=[s.restrictedImage],void this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages);s.progressStatus===l.Mx.COMPLETED&&(this.form.get("img").setValue(s.data),this.updatePortfolio())},error:s=>{s?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(nt.Vm.SOMETHING_WENT_WRONG)}})}updatePortfolio(){let e={...this.form.value,enable:this.enable,badge_groups:(0,Q.IH)(this.form)};const i=this.dspForm?.value;if(i){const s=e.dsp?.map(p=>({sk:p.sk,pk:p.pk,url:i[p.sk+"url"],text:i[p.sk+"text"]}))||[];e={...e,dsp:s}}const o=this.routeSk?"put":"post";this.routeSk&&Object.assign(e,{sk:this.portfolioItemDetails.sk,pk:this.portfolioItemDetails.pk}),this.apiCallService[o](U.Y9.portfolio,e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:({status:s,message:p})=>{s&&(this.navigateToBack(),this.cs.showSuccessMessage(p))},error:({message:s})=>this.cs.showErrorMessage(s)})}onHandleDSPModalSubmit(){const e=this.dspModalForm.value.logo;if(!(e instanceof File))return void this.addUpdateDSPIcons();if(!this.cs.isValidFile(e))return;const o=`${l.Mx.POST+Date.now()}_${e.name.toLowerCase().replace(Et.mL.IMAGE_UPLOAD_TO_S3_NAME,"_").split(" ").join("_")}`;this.uploadService.uploadFileData(U.Y9.uploadFile,{file:e,fileName:o,folder:l.D4.createPostImageFolder},!0).pipe((0,J.R)(this.destroy$)).subscribe({next:p=>{if(p.progressStatus===l.Mx.RESTRICTED&&p.restrictedImage)return this.restrictedImages=[p.restrictedImage],void this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages);p.progressStatus===l.Mx.COMPLETED&&(this.dspModalForm.get("logo").setValue(p.data),this.addUpdateDSPIcons())},error:p=>{p?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(nt.Vm.SOMETHING_WENT_WRONG)}})}
1addUpdateDSPIcons(){this.dspModalForm.invalid?this.dspModalForm.markAllAsTouched():this.apiCallService.post(`${U.Y9.dsp}`,this.dspModalForm.value,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{if(o.status){this.cs.showSuccessMessage(o.message),this.dspIconModal.closeModal();const{logo:s,name:p,sk:u,pk:_}=o.data;this.multiselectField.options.push({logo:s,name:p,sk:u,pk:_});const h=this.form.get(this.multiselectField.name);h?.setValue([...h?.value||[],{logo:s,name:p,sk:u,pk:_}])}else this.cs.showErrorMessage(o.message)},error:o=>{this.cs.showErrorMessage(o.message)}})}navigateToBack(){this.router.navigate(["/monetize/portfolio"])}addNewIcon(){this.cs.$clearProfileImage.next(!0),this.dspModalForm.reset(),this.dspIconModal.openModal()}customBtnClick(e){"custom"===e?this.addNewIcon():this.subscribeMultiselectField()}deleteItem(){const e=U.Y9.portfolio+"/"+this.cs.encodeToUTF(this.routeSk);this.apiCallService.delete(e,!0).subscribe({next:i=>{i.status&&(this.cs.showSuccessMessage(i.message),this.navigateToBack())},error:i=>{this.cs.showErrorMessage(i.message)}})}onDeleteItem(){this.deleteTemplate.openModal()}onCancel(){this.deleteTemplate.closeModal()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(V.F0),t.Y36(V.gz),t.Y36(Bt.D),t.Y36($.v),t.Y36(gt.F),t.Y36(bt.C),t.Y36(kt.yh),t.Y36(Tt.Y))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-add-edit-portfolio"]],viewQuery:function(i,o){if(1&i&&(t.Gf(ae,5),t.Gf(le,5),t.Gf(ce,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.dspIconModal=s.first),t.iGM(s=t.CRH())&&(o.deleteTemplate=s.first),t.iGM(s=t.CRH())&&(o.enableToggle=s.first)}},decls:32,vars:28,consts:[[1,"inside-container","preference-container","add-new-portfolio"],[1,"inside-header"],[1,"close-btn",3,"click"],[1,"icon-arrow-back"],[1,"mobile-title"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"hdr"],[3,"click"],[1,"heading"],[1,"d-flex","align-items-center","justify-content-between","gap-4"],[1,"title-toggle-right"],[3,"isPostScheduled","adminMarkedDisabled","currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged"],["enableToggle",""],["class","icon-delete-filled",3,"click",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between","gap-3"],[1,"title-toggle-right","mobile-mode"],["class","icon-delete-filled mobile-mode",3,"click",4,"ngIf"],["class","walletform-content p-0",4,"ngIf"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId",4,"ngIf"],["class","buttons",4,"ngIf"],["dynamicClass","addd-dsp-modal",3,"confirmBtnLabel","cancelBtnLabel","closeModalOnSuccess","disableConfirmButton","headerLabel","modalOptions","confirmed"],["dspIconModal",""],[3,"form","fields"],[3,"dynamicClass","ConfirmationMessage","headerLabel","commonEnum","confirmDelete","cancelDelete"],["deleteTemplate",""],[1,"icon-delete-filled",3,"click"],[1,"icon-delete-filled","mobile-mode",3,"click"],[1,"walletform-content","p-0"],[1,"portfolio-form"],[1,"upper-form"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId"],[1,"buttons"],[3,"btnField","handleButtonClick"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"a",2),t.NdJ("click",function(){return o.navigateToBack()}),t._UZ(3,"em",3),t.qZA(),t._UZ(4,"app-user-image"),t.TgZ(5,"span",4),t._uU(6),t.qZA()(),t.TgZ(7,"div",5)(8,"div",6)(9,"a",7),t.NdJ("click",function(){return o.navigateToBack()}),t._UZ(10,"em",3),t.qZA(),t.TgZ(11,"div",8)(12,"h4"),t._uU(13),t.qZA(),t.TgZ(14,"div",9)(15,"div",10)(16,"app-toggle-enable",11,12),t.NdJ("toggleChanged",function(p){return o.toggleChanged(p)}),t.qZA()(),t.YNc(18,de,1,0,"em",13),t.qZA()()(),t.TgZ(19,"div",14)(20,"div",15)(21,"app-toggle-enable",11,12),t.NdJ("toggleChanged",function(p){return o.toggleChanged(p)}),t.qZA()(),t.YNc(23,pe,1,0,"em",16),t.qZA(),t.YNc(24,ue,5,4,"div",17),t.YNc(25,ge,1,5,"app-badge-groups-selection",18),t.YNc(26,he,3,7,"div",19),t.qZA()(),t.TgZ(27,"app-alert-modal",20,21),t.NdJ("confirmed",function(){return o.onHandleDSPModalSubmit()}),t._UZ(29,"app-dynamic-form-builder",22),t.qZA(),t.TgZ(30,"app-confirmation-modal",23,24),t.NdJ("confirmDelete",function(){return o.deleteItem()})("cancelDelete",function(){return o.onCancel()}),t.qZA()),2&i&&(t.xp6(6),t.hij(" ",o.isEditMode?o.PORTFOLIO_CONSTS.EDIT_PORTFOLIO_ITEM:o.PORTFOLIO_CONSTS.ADD_ITEM_TO_PORTFOLIO," "),t.xp6(7),t.hij(" ",o.isEditMode?o.PORTFOLIO_CONSTS.EDIT_PORTFOLIO_ITEM:o.PORTFOLIO_CONSTS.ADD_ITEM_TO_PORTFOLIO," "),t.xp6(3),t.Q6J("isPostScheduled",o.isPostScheduled)("adminMarkedDisabled",o.adminMarkedDisabled)("currentState",o.enable)("isWelcomeMessage",!0),t.xp6(2),t.Q6J("ngIf",o.isEditMode),t.xp6(3),t.Q6J("isPostScheduled",o.isPostScheduled)("adminMarkedDisabled",o.adminMarkedDisabled)("currentState",o.enable)("isWelcomeMessage",!0),t.xp6(2),t.Q6J("ngIf",o.isEditMode),t.xp6(1),t.Q6J("ngIf",null==o.dspListing?null:o.dspListing.length),t.xp6(1),t.Q6J("ngIf",(null==o.dspListing?null:o.dspListing.length)&&(null==o.userProfileData?null:o.userProfileData.gsi4pk)),t.xp6(1),t.Q6J("ngIf",null==o.dspListing?null:o.dspListing.length),t.xp6(1),t.Q6J("confirmBtnLabel",o.PORTFOLIO_CONSTS.ADD)("cancelBtnLabel",o.PORTFOLIO_CONSTS.CANCEL)("closeModalOnSuccess",!0)("disableConfirmButton",null==o.dspModalForm?null:o.dspModalForm.invali
1d)("headerLabel",o.PORTFOLIO_CONSTS.CREATE_CUSTOM_DSP)("modalOptions",t.DdM(27,fe)),t.xp6(2),t.Q6J("form",o.dspModalForm)("fields",o.dspModalFields),t.xp6(1),t.Q6J("dynamicClass","delete-modal add-edit-portfolio-delete-modal")("ConfirmationMessage",o.PORTFOLIO_CONSTS.DELETE_MSG)("headerLabel",o.PORTFOLIO_CONSTS.DELETE_ITEM)("commonEnum",o.commonEnum))},dependencies:[r.O5,Yt.U,it.r,Ht.F,re.l,wt.Y,At.K,Mt.w],styles:[".add-new-portfolio .mobile-mode{display:none} .add-new-portfolio .hdr{margin-top:35px;display:flex;margin-bottom:20px;gap:16px;align-items:flex-start} .add-new-portfolio .hdr .heading{display:flex;justify-content:space-between;align-items:center;width:100%} .add-new-portfolio .hdr .heading em{cursor:pointer;font-size:20px} .add-new-portfolio .hdr .heading h4{font-size:24px;font-weight:700;line-height:24px} .add-new-portfolio .hdr .icon-arrow-back{font-size:24px;font-weight:500;cursor:pointer} .add-new-portfolio .portfolio-form{padding:8px 30px 28px} .add-new-portfolio .portfolio-form app-dynamic-form-builder .fb-monetize-card{padding:0} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card{box-shadow:none!important} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row{display:grid;grid-template-columns:calc(var(--dynamic-width) + 24px) calc(100% - (var(--dynamic-width) + 24px));grid-auto-rows:auto} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12:nth-child(1){grid-row:1/span 2;grid-column:1} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12:nth-child(2){grid-row:1;grid-column:2} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12:nth-child(3){grid-row:2;grid-column:2} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12:nth-child(4){grid-column:span 2!important} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-textarea textarea{height:var(--description-height)} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload .form-group .uploadFileImageData{height:var(--dynamic-height);width:100%;margin:0} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload .form-group .uploadFileImageData img{object-fit:fill!important} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload .form-group .uploadFileImageData a{width:23px;height:23px;font-size:20px} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload .form-group .uploadContainer .banner-type2{height:var(--dynamic-height)!important} .add-new-portfolio .portfolio-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload app-image-cropper .responsive-width{width:400px!important} .add-new-portfolio .buttons{display:flex;align-items:center;gap:1rem;justify-content:flex-end;margin-top:1rem}@media screen and (max-width: 991px){ .add-new-portfolio{margin-top:64px} .add-new-portfolio .hdr{display:none} .add-new-portfolio .mobile-mode{display:block;font-size:20px;margin-bottom:20px;text-align:end} .add-new-portfolio .portfolio-form{padding:28px 30px} .add-new-portfolio .portfolio-form app-dynamic-form-builder app-banner-image-upload .form-group{width:var(--dynamic-width);margin:auto} .add-new-portfolio .portfolio-form app-dynamic-form-builder app-banner-image-upload .form-group .uploadFileImageData{height:var(--dynamic-height);width:var(--dynamic-width)} .add-new-portfolio .portfolio-form app-dynamic-form-builder app-textarea textarea{height:110px!important} .add-new-portfolio .buttons{padding-right:12px}}@media screen and (max-width: 767px){ .add-new-portfolio .portfolio-form{padding:8px 30px 28px} .add-new-portfolio .portfolio-form app-dynamic-form-builder .fb-monetize-card{padding:0} .add-new-portfolio .portfolio-form app-dynamic-form-builder .fb-monetize-card .row{grid-template-columns:100%} .add-new-portfolio .portfolio-form app-dynamic-form-builder .fb-monetize-card .row .col-12{grid-column:span 2!important;grid-row:auto!important}} .addd-dsp-modal .section-container{gap:20px} .addd-dsp-modal .approval-modal-body{font-size:16px;font-weight:400;line-height:23px;text-align:left;margin-bottom:28px} .addd-dsp-modal .approval-btn-container button{width:190px} .addd-dsp-modal .modal-body{padding:20px 20px 8px!important;text-align:left!important} .addd-dsp-modal .modal-body app-dynamic-form-builder app-profile-image-upload .preference-profile{margin:0!important} .addd-dsp-modal .fb-monetize-card{padding:0!important} .addd-dsp-modal .form-group{margin-top:0!important;margin-bottom:20px!important}"]}),a})();var Ot=b(32401);const Ce=["enableToggle"],Ut=function(a){return{type:"button",class:"btn btn-default w-100 default-btn",label:a}},be=function(a,m,n){return{type:"button",class:"btn btn-primary w-100",label:a,disabled:m,loading:n}};let zt=(()=>{const m=class{constructor(e,i,o,s,p,u,_){this.router=e,this.route=i,this.formService=o,this.cs=s,this.apiCallService=p,this.uploadService=u,this.modalHandlerService=_,this.PORTFOLIO_CONSTS=at.fD,this.PORTFOLIO_TYPE_CONSTS=O.W,this.isEditMode=!1,this.form=null,this.fields=null,this.destroy$=new X.x,this.commonEnum=ct.i4,this.portfolioTypeDetails=null,this.restrictedImages=[],this.enable=!0,this.isPostDataFetched=!1,this.isSaving=!1,this.toggleClicked=!1}
1ngOnInit(){const e=this.route.snapshot.paramMap.get("id");this.routeId=e||"",this.isEditMode=!!this.routeId,this.isEditMode||(this.enable=!1),this.initForm(),this.routeId&&this.getPortfolioTypeById()}initForm(){this.fields=lt()((0,O.f)(this.isEditMode)),this.form=this.formService.toFormGroup(this.fields)}toggleChanged(e){this.enable=e,this.toggleClicked=!0}setToggleChange(e){this.isPostDataFetched=!0,this.enableToggle&&(this.enableToggle.enable=e.enable),this.enable=e.enable}getPortfolioTypeById(){this.routeId&&this.apiCallService.get(`${U.Y9.portfolio}/${this.routeId}`,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:i=>{if(i.status&&this.form&&i.data){this.portfolioTypeDetails=i.data,this.enable=i.data.status?i.data.status===O.W.PORTFOLIO_STATUS.ACTIVE:!1!==i.data?.enable;const s={portfolio_type:(i.data.portfolio_type||i.data.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM,title:i.data.portfolio_title||i.data.title,description:i.data.portfolio_desc||i.data.description,thumbnail:i.data.cover_image_url||i.data.thumbnail};this.form.patchValue(s),this.isEditMode&&this.form.get("portfolio_type")&&this.form.get("portfolio_type").disable()}},error:i=>{i?.statusCode===l.Mx.FOUR_HUNDRED_FOUR||i?.status===l.Mx.FOUR_HUNDRED_FOUR?this.router.navigate([`/${Ot._1.NOT_FOUND}`]):this.cs.showErrorMessage(i.message||nt.Vm.SOMETHING_WENT_WRONG)}})}handleSubmit(){this.form&&!this.form.invalid?this.form.value.thumbnail instanceof File?this.uploadImageFileToS3Bucket():this.updatePortfolioType():this.form&&this.form.markAllAsTouched()}uploadImageFileToS3Bucket(){if(!this.cs.isValidFile(this.form.value.thumbnail))return;this.isSaving=!0;const i=`${l.Mx.POST+Date.now()}_${this.form.value.thumbnail?.name.toLowerCase().replace(Et.mL.IMAGE_UPLOAD_TO_S3_NAME,"_").split(" ").join("_")}`;this.uploadService.uploadFileData(U.Y9.uploadFile,{file:this.form.value.thumbnail,fileName:i,folder:l.D4.createPostImageFolder},!0).pipe((0,J.R)(this.destroy$)).subscribe({next:s=>{if(s.progressStatus===l.Mx.RESTRICTED&&s.restrictedImage)return this.restrictedImages=[s.restrictedImage],this.isSaving=!1,void this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages);s.progressStatus===l.Mx.COMPLETED&&(this.form.get("thumbnail").setValue(s.data),this.updatePortfolioType())},error:s=>{this.isSaving=!1,s?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(nt.Vm.SOMETHING_WENT_WRONG)}})}updatePortfolioType(){if(!this.form)return;this.isSaving=!0;const e=this.form.getRawValue(),i=this.routeId?"put":"post",o=!!this.routeId;let s={portfolio_type:e.portfolio_type||O.W.PORTFOLIO_TYPE.CUSTOM,portfolio_title:e.title||"",portfolio_desc:e.description||"",cover_image_url:e.thumbnail||""};if((o||this.toggleClicked)&&(s.status=this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE),o&&this.portfolioTypeDetails){const u=this.portfolioTypeDetails;if(u.pk&&u.sk)s.pk=u.pk,s.sk=u.sk;else{if(!u.id)return this.isSaving=!1,void this.router.navigate([`/${Ot._1.NOT_FOUND}`]);s.id=u.id}}this.apiCallService[i](U.Y9.portfolio,s,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:({status:u,message:_})=>{this.isSaving=!1,u&&(this.navigateToBack(),this.cs.showSuccessMessage(_||O.W.PORTFOLIO_SAVED_SUCCESS))},error:u=>{this.isSaving=!1,!this.isEditMode||u?.statusCode!==l.Mx.FOUR_HUNDRED_FOUR&&u?.status!==l.Mx.FOUR_HUNDRED_FOUR?this.cs.showErrorMessage(u?.message||nt.Vm.SOMETHING_WENT_WRONG):this.router.navigate([`/${Ot._1.NOT_FOUND}`])}})}navigateToBack(){this.router.navigate(this.routeId?["/monetize/portfolio","banner-view",this.portfolioTypeDetails?.sk?.split("#")?.at(1)]:["/monetize/portfolio"])}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(V.F0),t.Y36(V.gz),t.Y36(Bt.D),t.Y36($.v),t.Y36(gt.F),t.Y36(bt.C),t.Y36(Tt.Y))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-add-edit-portfolio-type"]],viewQuery:function(i,o){if(1&i&&t.Gf(Ce,5),2&i){let s;t.iGM(s=t.CRH())&&(o.enableToggle=s.first)}},decls:18,vars:13,consts:[[1,"inside-container","preference-container","add-new-portfolio-type"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"heading"],[1,"d-flex","align-items-center","gap-3"],[3,"click"],[1,"icon-arrow-back"],[1,"d-flex","align-items-center","gap-3","ms-auto"],[3,"currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged"],["enableToggle",""],[1,"walletform-content","p-0"],[1,"portfolio-type-form"],[1,"upper-form"],[3,"form","fields"],[1,"buttons"],[3,"btnField","handleButtonClick"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),t.NdJ("click",function(){return o.navigateToBack()}),t._UZ(5,"em",5),t.qZA(),t.TgZ(6,"h4"),t._uU(7),t.qZA()(),t.TgZ(8,"div",6)(9,"app-toggle-enable",7,8),t.NdJ("toggleChanged",function(p){return o.toggleChanged(p)}),t.qZA()()(),t.TgZ(11,"div",9)(12,"div",10)(13,"div",11),t._UZ(14,"app-dynamic-form-builder",12),t.qZA()()(),t.TgZ(15,"div",13)(16,"app-button",14),t.NdJ("handleButtonClick",function(){return o.navigateToBack()}),t.qZA(),t.TgZ(17,"app-button",14),t.NdJ("handleButtonClick",function(){return o.handleSubmit()}),t.qZA()()()()),2&i&&(t.xp6(7),t.hij(" ",o.isEditMode?o.PORTFOLIO_TYPE_CONSTS.EDIT_PORTFOLIO_TYPE:o.PORTFOLIO_TYPE_CONSTS.ADD_PORTFOLIO_TYPE," "),t.xp6(2),t.Q6J("currentState",o.enable)("isWelcomeMessage",!0),t.xp6(5),t.Q6J("form",o.form)("fields",o.fields),t.xp6(2),t.Q6J("btnField",t.VKq(7,Ut,o.PORTFOLIO_CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.kEZ(9,be,o.isEditMode?o.PORTFOLIO_CONSTS.UPDATE:o.PORTFOLIO_CONSTS.SAVE,(null==o.form?null:o.form.invali
1d)||o.isSaving,o.isSaving)))},dependencies:[Yt.U,it.r,Mt.w],styles:[".add-new-portfolio-type .walletform-content{margin:0!important} .add-new-portfolio-type .mobile-mode{display:none} .add-new-portfolio-type .heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;width:100%;margin-bottom:24px;color:var(--configBgTextColor)!important} .add-new-portfolio-type .heading em{cursor:pointer;font-size:20px} .add-new-portfolio-type .heading h4{font-size:24px;font-weight:700;line-height:24px;margin:0}@media screen and (max-width: 992px){ .add-new-portfolio-type .heading h4{font-size:16px}} .add-new-portfolio-type .heading .icon-arrow-back{font-size:24px;font-weight:500;cursor:pointer} .add-new-portfolio-type .heading .both-btn{height:auto!important;padding:8px 14px!important;line-height:normal!important} .add-new-portfolio-type .portfolio-type-form{padding:10px 30px} .add-new-portfolio-type .portfolio-type-form app-dynamic-form-builder .fb-monetize-card{padding:0} .add-new-portfolio-type .portfolio-type-form app-dynamic-form-builder .danger-alert-field .alert-dang{margin-top:0!important} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card{box-shadow:none!important;background:var(--configSecondaryBgColor)!important} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row{display:grid;grid-template-columns:calc(100% - 424px) 424px;grid-auto-rows:auto} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12:nth-child(1){grid-row:1/span 3;grid-column:2} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12:nth-child(2){grid-row:1;grid-column:1} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12:nth-child(3){grid-row:2;grid-column:1} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12:nth-child(4){grid-row:3;grid-column:1} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload .form-group .uploadFileImageData{height:200px;width:400px;margin:0} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload .form-group .uploadFileImageData img{object-fit:cover!important} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload .form-group .uploadFileImageData a{width:23px;height:23px;font-size:20px} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload .form-group .uploadContainer .banner-type2{height:200px;width:400px} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row app-banner-image-upload app-image-cropper .responsive-width{width:400px!important} .add-new-portfolio-type .buttons{display:flex;align-items:center;gap:1rem;justify-content:flex-end;margin-top:1rem}@media screen and (max-width: 992px){ .add-new-portfolio-type{margin-top:64px} .add-new-portfolio-type .hdr{display:none} .add-new-portfolio-type .mobile-mode{display:block;font-size:20px;margin-bottom:20px;text-align:end} .add-new-portfolio-type .portfolio-type-form{padding:30px} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card{padding:0} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row{grid-template-columns:100%} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder .fb-monetize-card .row .col-12{grid-column:span 2!important;grid-row:auto!important} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder app-banner-image-upload .form-group{width:100%;margin:auto} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder app-banner-image-upload .form-group .uploadFileImageData{height:auto!important;width:100%!important} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder app-banner-image-upload .form-group .uploadFileImageData img{width:100%;height:auto;object-fit:contain!important} .add-new-portfolio-type .portfolio-type-form .upper-form app-dynamic-form-builder app-banner-image-upload .form-group .uploadContainer .banner-type2{width:100%!important;height:auto!important} .add-new-portfolio-type .buttons{padding-right:12px}} .theme-whiteLabel .default-btn{color:var(--configBgTextColor)!important} .theme-whiteLabel .add-new-portfolio-type .ng-select-container input{color:var(--configBgTextColor)!important} .theme-whiteLabel .add-new-portfolio-type .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:var(--configBgTextColor)!important}"]}),a})();var Pe=b(76547),Dt=b(88128),Y=b(58217);const w={STEP_3_OF_3:Dt.Rh.STEP_3_OF_3,OPTIONAL_DIRECT_DISTRIBUTION:{[O.W.PORTFOLIO_TYPE.MUSIC]:"Direct Sales: Add Music Tracks",[O.W.PORTFOLIO_TYPE.PODCAST]:"Direct Sales: Add Podcast Episodes",[O.W.PORTFOLIO_TYPE.VIDEO]:"Direct Sales: Add Videos",[O.W.PORTFOLIO_TYPE.CUSTOM]:"Collection: Add Items"},DIRECT_SALES_INFO_MESSAGE:{[O.W.PORTFOLIO_TYPE.MUSIC]:"Direct Sales allows you to sell your albums and single song tracks directly to your fans. You can sell as individual purchase or include in one of your subscription plans.",[O.W.PORTFOLIO_TYPE.PODCAST]:"Direct Sales allows you to sell your podcast series and single episodes directly to your fans. You can sell as individual purchase or include in one of your subscription plans.",[O.W.PORTFOLIO_TYPE.VIDEO]:"Direct Sales allows you to sell your video series and single videos directly to your fans. You can sell as individual purchase or include in one of your subscription plans."},DISABLE:"DISABLE",ENABLE:"ENABLE",UPDATE_ITEM:"Update Item",ADD_ITEM:"Add Item",VIDEO_NAME:"Video Name",VIDEO_FILE:"Video File *",VIDEO_FILE_LABEL:"Video File",VIDEO_THUMBNAIL:"Video Thumbnail",VIDEO_COVER_IMAGE:"Optional Video Cover Image",SONG_NAME:"Song Name",SONG_FILE:"Song File *",SONG_COVER_IMAGE:"Optional Song Cover Image",PODCAST_EPISODE_NAME:"Podcast Episode Name",PODCAST_EPISODE_FILE:"Podcast Episode File *",PODCAST_FILE:"Podcast File *",PODCAST_EPISODE_COVER_IMAGE:"Optional Podcast Episode Cover Image",PRICING_OPTIONS:"Pricing Options",SUBSCRIPTION:"Subscription",INDIVIDUAL_PURCHASE:"Individual Purchase",LOCK_WITH_NFT:"Lock with NFT",SELECT_SUBSCRIPTION_OPTIONS:"Select Subscription Options",ALLOW_FREE_PREVIEW:"Allow Free Preview",ADD_NFT_CONTRACT_ADDRESS:"Add NFT Contract Address",PASTE_NFT_CONTRACT_ID:"Paste the NFT Contract ID here",ADD:"Add",UPLOAD_VIDEO:"Upload Video",UPLOAD_AUDIO:"Upload Audio",UPLOAD_IMAGE:"Upload Cover Image",VIDEO_FILE_TYPES:"Any MP4, MOV or MKV up to 5GB",AUDIO_FILE_TYPES:"Any MP3 or WAV or MPEG up to 5GB",IMAGE_FILE_TYPES:"Any JPG, JPEG, PNG, HEIC, HEIF, WEBP, AVIF or GIF",ENTER_NAME:"Enter Item Name",VIDEO_NAME_REQUIRED:"Video Name is required",SONG_NAME_REQUIRED:"Song Name is required",PODCAST_EPISODE_NAME_REQUIRED:"Podcast Episode Name is required",VIDEO_FILE_REQUIRED:"Video File is required",SONG_FILE_REQUIRED:"Song File is required",PODCAST_EPISODE_FILE_REQUIRED:"Podcast Episode File is required",PODCAST_FILE_REQUIRED:"Podcast File is required",VIDEO_THUMBNAIL_REQUIRED:"Video Thumbnail is required",VIDEO_COVER_IMAGE_REQUIRED:"Video Cover Image is required",SONG_COVER_IMAGE_REQUIRED:"Song Cover Image is required",PODCAST_EPISODE_COVER_IMAGE_REQUIRED:"Podcast Episode Cover Image is required",OPTIONAL_COVER_IMAGE_FOR_SONG:"If you don't upload cover images for each song, the album cover image will be used when playing the song.",OPTIONAL_COVER_IMAGE_FOR_PODCAST_EPISODE:"If you don't upload cover images for each podcast episode, the podcast series cover image will be used when playing the episode.",OPTIONAL_COVER_IMAGE_FOR_VIDEO:"The system will let you choose a Video Cover Image from the uploaded video.",PREVIEW:"Preview",EDIT:"Edit",DELET
1E:"Delete",ADD_SONG_TRACK:"ADD SONG TRACK",ADD_PODCAST_EPISODE_TRACK:"ADD PODCAST EPISODE",ADD_COLLECTION_ITEM:"ADD COLLECTION ITEM",ADD_VIDEO_TRACK:"ADD VIDEO",CANCEL:"Cancel",OPTIONAL_SALES_PARTNERS:"Optional: Sales Partners",SALES_PARTNERS:"Sales Partners",CREATE_CUSTOM_PARTNER_LINK:"Create Custom Partner Link",ADD_SONG:"Add Song",UPDATE_SONG:"Update Song",ADD_PODCAST_EPISODE:"Add Podcast Episode",UPDATE_PODCAST_EPISODE:"Update Podcast Episode",ADD_VIDEO:"Add Video",UPDATE_VIDEO:"Update Video",REMOVE_FILE:"Remove File",IMAGE_FILE_SIZE_MESSAGE:"Image file size should not exceed 5MB",SELECT_FILE:"SELECT FILE",SELECT_SUBSCRIPTION_OPTION_ERROR:"Please select at least one subscription option",ENTER_VALID_INDIVIDUAL_PRICE:"Enter valid individual price",REVENUE_SPLIT_EXCEEDS_100:"Total sum of revenue split cannot be more than 100%",FILL_ALL_REQUIRED_FIELDS:"Please fill all required fields",FORM_NOT_INITIALIZED:"Form is not initialized",FIX_PRICING_OPTIONS:"Please fix the pricing options",THUMBNAIL:"thumbnail",FAILED_TO_SAVE_CONTENT:"Failed to save content",PLAY:"Play",WATCH:"Watch",AUDIO_FILE_SIZE_MESSAGE:"Audio file size should not exceed 5GB",VIDEO_FILE_SIZE_MESSAGE:"Video file size should not exceed 5GB",LANDSCAPE_VIDEO_REQUIRED:"Only landscape (horizontal) videos can be uploaded. Please select a landscape video.",PODCAST_EPISODE_SAVED_SUCCESS:"Podcast episode saved successfully",SONG_SAVED_SUCCESS:"Song saved successfully",PODCAST_EPISODE_UPDATED_SUCCESS:"Podcast episode updated successfully",VIDEO_SAVED_SUCCESS:"Video saved successfully",VIDEO_UPDATED_SUCCESS:"Video updated successfully",ALLOW_DOWNLOAD_AFTER_PURCHASE_MUSIC:"Allow User to Download Music to their Local Device after Purchase",ALLOW_DOWNLOAD_AFTER_PURCHASE_PODCAST:"Allow User to Download Podcast Episode to their Local Device after Purchase",ALLOW_DOWNLOAD_AFTER_PURCHASE_VIDEO:"Allow User to Download Video to their Local Device after Purchase",ALLOW_DOWNLOAD_AFTER_PURCHASE_CUSTOM:"Allow User to Download Content to their Local Device after Purchase",ALLOW_DOWNLOAD_AFTER_PURCHASE_SONG:"Allow User to Download Song to their Local Device after Purchase",ALLOW_DOWNLOAD_AFTER_PURCHASE_EPISODE:"Allow User to Download Podcast to their Local Device after Purchase",ALLOW_DOWNLOAD_AFTER_PURCHASE_FILE:"Allow User to Download File to their Local Device after Purchase",REQUIRE_AUTHENTICATION_MUSIC:"Require Account Sign-In to Listen to This Music",REQUIRE_AUTHENTICATION_PODCAST:"Require Account Sign-In to Listen to This Podcast",REQUIRE_AUTHENTICATION_VIDEO:"Require Account Sign-In to Watch This Video",REQUIRE_AUTHENTICATION_INFO_MUSIC:"If you enable this option, users must be signed in to listen to this music.",REQUIRE_AUTHENTICATION_INFO_PODCAST:"If you enable this option, users must be signed in to listen to this podcast.",REQUIRE_AUTHENTICATION_INFO_VIDEO:"If you enable this option, users must be signed in to watch this video.",REQUIRE_AUTHENTICATION_INFO_CUSTOM:"If you enable this option, users must be signed in to access this content.",RELEASE_DATE:"Release Date",VIDEO_FILE_FIELD:"video_file",FREE_PREVIEW_DURATION_LABEL:{[O.W.PORTFOLIO_TYPE.MUSIC]:"Enable Free Preview Duration for this Song:",[O.W.PORTFOLIO_TYPE.PODCAST]:"Enable Free Preview Duration for this Episode:",[O.W.PORTFOLIO_TYPE.VIDEO]:"Enable Free Preview Duration for this Video:",[O.W.PORTFOLIO_TYPE.CUSTOM]:"Enable Free Preview Duration for this Item:"},RESTRICT_LABEL:{MUSIC:"Restrict Ability to Individually Purchase Music to:",PODCAST:"Restrict Ability to Individually Purchase Podcast Episode to:",VIDEO:"Restrict Ability to Individually Purchase Video to:",CUSTOM:"Restrict Ability to Individually Purchase Content to:"},RESTRICT_LABEL_INDIVIDUAL:{MUSIC:"Restrict Ability to Individually Purchase Song to:",PODCAST:"Restrict Ability to Individually Purchase Podcast to:",VIDEO:"Restrict Ability to Individually Purchase Video to:",CUSTOM:"Restrict Ability to Individually Purchase File to:"},RELEASING_ON:"Release Date (Optional):",YEAR_OPTION:"Year",DATE_OPTION:"Date",RELEASE_TYPE_YEAR:"year",RELEASE_TYPE_DATE:"date",FREE_PREVIEW_LOCK:{[O.W.PORTFOLIO_TYPE.MUSIC]:Y.iu,[O.W.PORTFOLIO_TYPE.PODCAST]:Y.nD,[O.W.PORTFOLIO_TYPE.VIDEO]:Y.nD,[O.W.PORTFOLIO_TYPE.CUSTOM]:Y.nD},MAKE_FREE_LABEL:{[O.W.PORTFOLIO_TYPE.MUSIC]:"Make this Song Free",[O.W.PORTFOLIO_TYPE.PODCAST]:"Make this Podcast Episode Free",[O.W.PORTFOLIO_TYPE.VIDEO]:"Make this Video Free",[O.W.PORTFOLIO_TYPE.CUSTOM]:"Make this Item Free"},MAKE_FREE_INFO_MESSAGE:{[O.W.PORTFOLIO_TYPE.MUSIC]:"If enabled, this song will be freely accessible to all users without any subscription or purchase required. This will override pricing settings of the full album for this specific song.",[O.W.PORTFOLIO_TYPE.PODCAST]:"If enabled, this episode will be freely accessible to all users without any subscription or purchase required. This will override pricing settings of the full podcast series for this specific episode.",[O.W.PORTFOLIO_TYPE.VIDEO]:"If enabled, this video will be freely accessible to all users without any subscription or purchase required. This will override pricing settings of the full video series for this specific video.",[O.W.PORTFOLIO_TYPE.CUSTOM]:"If enabled, this item will be freely accessible to all users without any subscription or purchase required. This will override pricing settings of the full collection for this specific item."}},Kt={width:l.Mx.FOUR_HUNDRED,height:l.Mx.FOUR_HUNDRED},Zt=(a,m=!1)=>{const n=a?.toLowerCase()||"",e=n===O.W.PORTFOLIO_TYPE.VIDEO.toLowerCase(),i=n===O.W.PORTFOLIO_TYPE.PODCAST.toLowerCase();return{nameLabel:e?w.VIDEO_NAME:i?w.PODCAST_EPISODE_NAME:w.SONG_NAME,nameField:e?"video_name":i?"podcast_episode_name":"song_name",nameRequired:e?w.VIDEO_NAME_REQUIRED:i?w.PODCAST_EPISODE_NAME_REQUIRED:w.SONG_NAME_REQUIRED,fileLabel:e?w.VIDEO_FILE:i?m?w.PODCAST_FILE:w.PODCAST_EPISODE_FILE:w.SONG_FILE,fileField:e?"video_file":i?"podcast_episode_file":"song_file",filePlaceholder:e?w.UPLOAD_VIDEO:w.UPLOAD_AUDIO,fileTypes:e?"video/mp4,video/quicktime":"audio/mpeg,audio/wav,audio/mp3",fileSizeLimit:e?524288e3:209715200,fileTypesLabel:e?w.VIDEO_FILE_TYPES:w.AUDIO_FILE_TYPES,fileRequired:e?w.VIDEO_FILE_REQUIRED:i?m?w.PODCAST_FILE_REQUIRED:w.PODCAST_EPISODE_FILE_REQUIRED:w.SONG_FILE_REQUIRED}},jt=a=>{const m=Zt(a);return{type:W.sf.TEXT,label:m.nameLabel,name:m.nameField,placeholder:w.ENTER_NAME,class:"col-12",autoComplete:"off",validation:{required:{message:m.nameRequired},maxlength:{value:70,message:"Maximum 70 characters allowed"}},maxlength:70}},R={[O.W.PORTFOLIO_TYPE.MUSIC]:w.ALLOW_DOWNLOAD_AFTER_PURCHASE_MUSIC,[O.W.PORTFOLIO_TYPE.PODCAST]:w.ALLOW_DOWNLOAD_AFTER_PURCHASE_PODCAST,[O.W.PORTFOLIO_TYPE.VIDEO]:w.ALLOW_DOWNLOAD_AFTER_PURCHASE_VIDEO,[O.W.PORTFOLIO_TYPE.CUSTOM]:w.ALLOW_DOWNLOAD_AFTER_PURCHASE_CUSTOM},Z={[O.W.PORTFOLIO_TYPE.MUSIC]:w.ALLOW_DOWNLOAD_AFTER_PURCHASE_SONG,[O.W.PORTFOLIO_TYPE.PODCAST]:w.ALLOW_DOWNLOAD_AFTER_PURCHASE_EPISODE,[O.W.PORTFOLIO_TYPE.VIDEO]:w.ALLOW_DOWNLOAD_AFTER_PURCHASE_VIDEO,[O.W.PORTFOLIO_TYPE.CUSTOM]:w.ALLOW_DOWNLOAD_AFTER_PURCHASE_FILE},g={[O.W.PORTFOLIO_TYPE.MUSIC]:w.REQUIRE_AUTHENTICATION_MUSIC,[O.W.PORTFOLIO_TYPE.PODCAST]:w.REQUIRE_AUTHENTICATION_PODCAST,[O.W.PORTFOLIO_TYPE.VIDEO]:w.REQUIRE_AUTHENTICATION_VIDEO,[O.W.PORTFOLIO_TYPE.CUSTOM]:w.REQUIRE_AUTHENTICATION_VIDEO},k={[O.W.PORTFOLIO_TYPE.MUSIC]:w.REQUIRE_AUTHENTICATION_INFO_MUSIC,[O.W.PORTFOLIO_TYPE.PODCAST]:w.REQUIRE_AUTHENTICATION_INFO_PODCAST,[O.W.PORTFOLIO_TYPE.VIDEO]:w.REQUIRE_AUTHENTICATION_INFO_VIDEO,[O.W.PORTFOLIO_TYPE.CUSTOM]:w.REQUIRE_AUTHENTICATION_INFO_CUSTOM},x=a=>{const m=a?.toUpperCase()||"";return{type:W.sf.CHECKBOX,label:"",name:"require_authentication",class:"col-12",infoIconMessageLbl:k[m]||w.REQUIRE_AUTHENTICATION_INFO_VIDEO,options:[{label:g[m]||w.REQUIRE_AUTHENTICATION_VIDEO,value:!0}],labelKey:"label",valueKey:"value"}},C={[O.W.PORTFOLIO_TYPE.MUSIC]:"Post Preview of Song on My Feed",[O.W.PORTFOLIO_TYPE.PODCAST]:"Post Preview of Podcast on My Feed",[O.W.PORTFOLIO_TYPE.VIDEO]:"Post Preview of Video on My Feed"},H={[O.W.PORTFOLIO_TYPE.MUSIC]:"Post Preview of Song on My Feed",[O.W.PORTFOLIO_TYPE.PODCAST]:"Post Preview of Podcast Episode on My Feed",[O.W.PORTFOLIO_TYPE.VIDEO]:"Post Preview of Video on My Feed"},P=(a,m=!1)=>{const n=a?.toUpperCase()||"";return{type:W.sf.CHECKBOX,label:"",name:"allow_download",class:"col-12",infoIconMessageLbl:"If you enable this option, your fans will be able to download a copy of this content onto their own personal local device, and there will not be any protections from sharing the content. For audio files, the quality of the download will be the same that you uploaded. For video files, the downloaded file will be 1080p resolution.",options:[{label:(m?Z:R)[n]||w.ALLOW_DOWNLOAD_AFTER_PURCHASE_MUSIC,value:!0}],labelKey:"label",valueKey:"value"}},S=(a,m=!1)=>{const n=a?.toUpperCase()||"";return{type:W.sf.CHECKBOX,label:"",name:"show_as_post",class:"col-12",infoIconMessageLbl:"If you enable this option, a Preview Post will be made in your feed for this item, so fans can see it and be directly taken into your portfolio when they click it.",options:[{label:(m?H:C)[n],value:!0}],labelKey:"label",valueKey:"value"}},T={type:W.sf.TEXT_AREA,label:"Podcast Episode Description (Optional)",name:"podcast_episode_description",placeholder:"Enter Description",class:"col-12",maxlength:500,validation:{maxlength:{value:500,message:"Maximum 500 characters allowed"}}},y={type:W.sf.TEXT_AREA,label:"Video Description (Optional)",name:"video_description",placeholder:"Enter Description",class:"col-12",maxlength:500,validation:{maxlength:{value:500,message:"Maximum 500 characters allowed"}}},ve=()=>(()=>{const m=[],n=(new Date).getFullYear()+3;for(let e=1850;e<=n;e++)m.push(e);return m})().map(a=>({label:a.toString(),value:a.toString()})),Re=a=>{const m=a?.toUpperCase()||"";return{type:W.sf.CHECKBOX,label:"",name:"is_free",class:"col-12",options:[{label:w.MAKE_FREE_LABEL[m]||w.MAKE_FREE_LABEL[O.W.PORTFOLIO_TYPE.CUSTOM],value:!0}],labelKey:"label",valueKey:"value",infoIconMessageLbl:w.MAKE_FREE_INFO_MESSAGE[m]||w.MAKE_FREE_INFO_MESSAGE[O.W.PORTFOLIO_TYPE.CUSTOM]}};var $t=b(88893),Xt=b(8267),we=b(42478),Ue=b(46017),Ze=b(15249),Ge=b(72632),Ve=b(75622),Be=b(46515),ze=b(8771),Ae=b(65525),De=b(97003);const Do=["coverImageInput"],Lo=["deleteAlbumModal"];function Fo(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-toggle-enable",37,38),t.NdJ("toggleChanged",function(i){t.CHM(n);const o=t.oxw(2);return t.KtG(o.toggleChanged.emit(i))}),t.qZA()}if(2&a){const n=t.oxw(2);t.Q6J("currentState",n.enable)("disableMessage",n.disableMessage)("enableMessage",n.enableMessage)("isWelcomeMessage",!0)}}function No(a,m){if(1&a&&(t.TgZ(0,"div",34)(1,"div",35)(2,"span"),t._uU(3),t.qZA()(),t.YNc(4,Fo,2,4,"app-toggle-enable",36),t.qZA()),2&a){const n=t.oxw();
1t.xp6(3),t.HOy(" ",n.CONSTS.STEP," ",n.currentStepNumber," ",n.CONSTS.OF," ",n.totalSteps,""),t.xp6(1),t.Q6J("ngIf",n.showToggle)}}function Ro(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-toggle-enable",39,38),t.NdJ("toggleChanged",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.toggleChanged.emit(i))}),t.qZA()}if(2&a){const n=t.oxw();t.Q6J("currentState",n.enable)("disableMessage",n.disableMessage)("enableMessage",n.enableMessage)("isWelcomeMessage",!0)}}function Uo(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"button",40),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDeleteAlbumClick())}),t._UZ(1,"em",41),t.qZA()}if(2&a){const n=t.oxw();t.ekj("ms-auto",!n.showToggle),t.Q6J("title",n.CONSTS.DELETE)}}function Zo(a,m){if(1&a&&(t.TgZ(0,"div",42),t._UZ(1,"app-textarea",13),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("field",n.descriptionField)("form",n.form)}}function Vo(a,m){if(1&a&&(t.TgZ(0,"div",43),t._UZ(1,"app-select",13),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("field",n.releaseYearField)("form",n.form)}}function Bo(a,m){if(1&a&&(t.TgZ(0,"div",43),t._UZ(1,"app-datepicker",13),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("field",n.releaseDateField)("form",n.form)}}function Yo(a,m){if(1&a&&t._UZ(0,"app-info-icon",44),2&a){const n=t.oxw();t.Q6J("message",n.PORTFOLIO_TYPE_CONSTS.VIDEO_COVER_IMAGE_INFO)("infoIconSize",18)}}const Ho=function(a){return{cropperMinWidth:800,cropperMinHeight:450,cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:a,maintainAspectRatio:!0}},Jo=function(a){return{cropperMinWidth:400,cropperMinHeight:400,cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:a,maintainAspectRatio:!0}},Wo=function(a){return{isMultiple:!1,cropperOptions:a}},Qo=function(a){return{type:"button",label:a,class:"btn btn-primary select-file-btn"}};function qo(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"label",45)(1,"input",46,47),t.NdJ("change",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.fileChangeEvent(i))})("mobileFileChange",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.fileChangeEvent(i,!0))}),t.qZA(),t.TgZ(3,"div",48),t._UZ(4,"em",12),t.TgZ(5,"div",49),t._uU(6),t.qZA(),t.TgZ(7,"div",50),t._uU(8),t.qZA(),t.TgZ(9,"app-button",51),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.MAs(2);return t.KtG(i.click())}),t.qZA()()()}if(2&a){const n=t.oxw();t.xp6(1),t.Q6J("accept",n.Application.IMAGE_ACCEPT_TYPES_INCLUDING_GIF)("disabled",n.showProgress||n.coverImageUploadInProgress)("fileConfig",t.VKq(11,Wo,n.useVideoCoverStyle?t.VKq(7,Ho,16/9):t.VKq(9,Jo,1))),t.xp6(3),t.Q6J("ngClass",n.useVideoCoverStyle?"icon-liteic-cover-thumbnail-light":"icon-litebanner-upload"),t.xp6(2),t.hij(" ",n.isIndividual?n.CONSTS.INDIVIDUAL_COVER_IMAGE_LABEL[n.portfolioType]:n.CONSTS.COVER_IMAGE_LABEL[n.portfolioType]," "),t.xp6(2),t.hij(" ",n.CONSTS.FILE_EXTENSION_INFO," "),t.xp6(1),t.Q6J("btnField",t.VKq(13,Qo,n.CONSTS.SELECT_FILE))}}function Go(a,m){if(1&a&&(t.TgZ(0,"div",56),t._UZ(1,"circle-progress",57),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("percent",n.coverImageUploadInProgress?n.coverImageUploadPercent:n.percent)("radius",23)("outerStrokeWidth",3)("innerStrokeWidth",3)("outerStrokeColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#09c6da")("innerStrokeColor","#47665f")("animation",!1)("animationDuration",300)("showSubtitle",!1)("backgroundPadding",0)("titleFontSize",10)("titleColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("unitsColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("space",-3)}}function zo(a,m){if(1&a&&t._UZ(0,"img",58),2&a){const n=t.oxw(2);let e,i;t.Q6J("originalUrl",n.imageFeedPreview||(null==(e=n.form.get("cover_image"))?null:e.value))("src",n.imageFeedPreview||(null==(i=n.form.get("cover_image"))?null:i.value),t.LSH)("format","webp")}}function Ko(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"a",59),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.removeVideoFeedImage())}),t._UZ(1,"em",60),t.qZA()}}const jo=function(a){return[a]};function $o(a,m){if(1&a&&(t.TgZ(0,"div",52),t.YNc(1,Go,2,14,"div",53),t.YNc(2,zo,1,3,"img",54),t.YNc(3,Ko,2,0,"a",55),t.qZA()),2&a){const n=t.oxw();let e;
1t.Q6J("ngClass",t.VKq(4,jo,n.actualFeedPreviewOrientation)),t.xp6(1),t.Q6J("ngIf",(n.showProgress||n.coverImageUploadInProgress)&&n.cs.isBrowser),t.xp6(1),t.Q6J("ngIf",(n.imageFeedPreview||(null==(e=n.form.get("cover_image"))?null:e.value))&&!n.coverImageUploadInProgress),t.xp6(1),t.Q6J("ngIf",!n.showProgress&&!n.coverImageUploadInProgress)}}function Xo(a,m){if(1&a&&(t.TgZ(0,"div",9)(1,"div",42)(2,"div",16)(3,"label",17),t._uU(4),t.qZA(),t.TgZ(5,"div",61),t._UZ(6,"app-checkbox",62)(7,"app-checkbox",62),t.qZA()()()()),2&a){const n=t.oxw();t.xp6(4),t.hij(" ",n.CONSTS.DISTRIBUTION_METHOD_LABEL[n.portfolioType]," "),t.xp6(2),t.Q6J("form",n.form)("field",n.distributeThroughDSPField),t.xp6(1),t.Q6J("form",n.form)("field",n.distributeThroughDirectSalesField)}}function ti(a,m){if(1&a&&t._UZ(0,"app-badge-groups-selection",63),2&a){const n=t.oxw();t.Q6J("parentForm",n.form)("arrayName","badge_groups")("selectedBadgeGroups",n.selectedBadgeGroups)("hintMessage",n.CONSTS.BADGE_GROUPS_HINT)}}function ei(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-image-cropper",64),t.NdJ("closeCrop",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.cancelCrop(i))})("cropImageUpload",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.imageFeedClicked(i))}),t.qZA()}if(2&a){const n=t.oxw();t.Q6J("imageChangeEvent",n.imageChangedEvent)("isOpen",n.isOpen)("cropperOptions",n.cropperOptions)("imageWidth",n.imageWidth)}}const oi=function(a){return{"video-portfolio-type":a}},ii=function(a){return{message:a}},ni=function(a){return{required:a}},si=function(a){return{validation:a}};let te=(()=>{const m=class{constructor(e,i,o,s,p,u){this.cs=e,this.uploadService=i,this.cdr=o,this.ngZone=s,this.modalHandlerService=p,this.apiCallService=u,this.isEditMode=!1,this.isIndividual=!1,this.showDescription=!0,this.currentStepNumber=l.Mx.ONE,this.totalSteps=l.Mx.THREE,this.coverImageUploadInProgress=!1,this.coverImageUploadPercent=l.Mx.ZERO,this.useVideoCoverStyle=!1,this.itemSk="",this.enable=!0,this.showToggle=!1,this.disableMessage="",this.enableMessage="",this.selectedBadgeGroups=[],this.itemDeleted=new t.vpe,this.toggleChanged=new t.vpe,this.CONSTS=Y.vI,this.Application=l.Mx,this.PORTFOLIO_TYPE_CONSTS=O.W,this.commonEnum=ct.i4,this.PORTFOLIO_CONSTS=W.fD,this.imageFeedPreview="",this.imageChangedEvent="",this.croppedImage="",this.isOpen=!1,this.imageWidth=l.Mx.ZERO,this.feedPreviewOrientation=W.ox.PORTRAIT,this.actualFeedPreviewOrientation=W.ox.PORTRAIT,this.showProgress=!1,this.percent=l.Mx.ZERO,this.restrictedImages=[],this.releaseType=null,this.yearOptions=[],this.destroy$=new X.x}ngOnInit(){this.yearOptions=(0,Y.S5)(),this.initFields(),this.restoreFormData(),this.initializeReleaseType()}initFields(){if(this.nameField=(0,Y.oJ)(this.portfolioType,this.isIndividual),this.descriptionField=(0,Y.d)(this.portfolioType,this.isIndividual),this.releaseDateField={type:W.sf.DATE_PICKER,label:"",name:"release_date",class:"col-12",placeholder:"Select Release Date"},this.releaseYearField=(0,Y.zQ)(this.yearOptions),this.releaseTypeYearField=(0,Y.CD)(),this.releaseTypeDateField=(0,Y.i7)(),this.distributeThroughDSPField=(0,Y.tg)(this.portfolioType),this.distributeThroughDirectSalesField=(0,Y.GF)(this.CONSTS.DIRECT_SALES_INFO_MESSAGE[this.portfolioType],this.portfolioType),this.form?.get("description")){const e=this.form.get("description");if(e){e.clearValidators();const i=this.descriptionField?.validation?.maxlength?.value;i&&e.setValidators([N.kI.maxLength(i)]),e.updateValueAndValidity()}}}restoreFormData(){const e=this.form?.get("cover_image")?.value;e&&"string"==typeof e&&(this.imageFeedPreview=e)}initializeReleaseType(){if(!this.form)return;const e=this.form.get("release_year")?.value,i=this.form.get("release_date")?.value;if(null!=e&&""!==e)this.releaseType=Y.vI.RELEASE_TYPE_YEAR,this.form.patchValue({release_type_year:[Y.vI.RELEASE_TYPE_YEAR],release_type_date:[]},{emitEvent:!1});else if(null!=i&&""!==i)if(i instanceof Date)this.releaseType=Y.vI.RELEASE_TYPE_DATE,this.form.patchValue({release_type_year:[],release_type_date:[Y.vI.RELEASE_TYPE_DATE]},{emitEvent:!1});else{const o=(0,Q.NH)(i);o.type===Y.vI.RELEASE_TYPE_YEAR?(this.releaseType=Y.vI.RELEASE_TYPE_YEAR,this.form.patchValue({release_type_year:[Y.vI.RELEASE_TYPE_YEAR],release_type_date:[]},{emitEvent:!1})):o.type===Y.vI.RELEASE_TYPE_DATE?(this.releaseType=Y.vI.RELEASE_TYPE_DATE,this.form.patchValue({release_type_year:[],release_type_date:[Y.vI.RELEASE_TYPE_DATE]},{emitEvent:!1})):(this.releaseType=null,this.form.patchValue({release_type_year:[],release_type_date:[]},{emitEvent:!1}))}else this.releaseType=null,this.form.patchValue({release_type_year:[],release_type_date:[]},{emitEvent:!1})}onReleaseTypeChange(e){if(this.form)if(this.releaseType===e)this.releaseType=null,this.form.patchValue({release_date:null,release_year:null,release_type_year:[],release_type_date:[]});else{this.releaseType=e;const i=(new Date).getFullYear().toString();this.form.patchValue(e===Y.vI.RELEASE_TYPE_YEAR?{release_date:null,release_year:i,release_type_year:[Y.vI.RELEASE_TYPE_YEAR],release_type_date:[]}:{release_year:null,release_date:new Date,release_type_year:[],release_type_date:[Y.vI.RELEASE_TYPE_DATE]})}}onReleaseTypeYearChange(){this.onReleaseTypeChange(Y.vI.RELEASE_TYPE_YEAR)}onReleaseTypeDateChange(){this.onReleaseTypeChange(Y.vI.RELEASE_TYPE_DATE)}get videoCropperOptions(){return{cropperMinWidth:Number(l.Mx.EIGHT_HUNDRED),cropperMinHeight:Number(l.Mx.FOUR_HUNDRED_FIFTY),cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:Number(l.Mx.SIXTEEN)/Number(l.Mx.NINE),maintainAspectRatio:!0}}get defaultCropperOptions(){return{cropperMinWidth:Number(l.Mx.FOUR_HUNDRED),cropperMinHeight:Number(l.Mx.FOUR_HUNDRED),cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:1,maintainAspectRatio:!0}}get customPortfolioCropperOptions(){return{cropperMinWidth:Number(l.Mx.TWO_HUNDRED),cropperMinHeight:Number(l.Mx.TWO_HUNDRED),cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:1,maintainAspectRatio:!1,recommendedText:at.fD.CUSTOM_PORTFOLIO_CROPPER_TEXT}}get cropperOptions(){return this.portfolioType===W.fD.TYPE.VIDEO?this.videoCropperOptions:this.portfolioType===W.fD.TYPE.CUSTOM&&this.isIndividual?this.customPortfolioCropperOptions:this.defaultCropperOptions}fileChangeEvent(e,i=!1){if(this.showProgress)return;if(i)return void this.imageFeedClicked(e?.[0],!0);const o=this.useVideoCoverStyle?{width:Number(l.Mx.EIGHT_HUNDRED),height:Number(l.Mx.FOUR_HUNDRED_FIFTY)}:{width:Number(l.Mx.FOUR_HUNDRED),height:Number(l.Mx.FOUR_HUNDRED)};this.cs.handleFileChangeEvent(e,{maxSize:W.eG,minWidth:Number(l.Mx.EIGHTY),minHeight:Number(l.Mx.EIGHTY),isValidFile:s=>Boolean(this.cs.isValidFile(s)),uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,maxSizeMessage:Y.vI.IMAGE_FILE_SIZE_LIMIT_MESSAGE,recommendedSize:o}).then(s=>{this.ngZone.run(()=>{this.cdr.detectChanges(),this.imageWidth=s.imageWidth,s.isGif?(this.imageChangedEvent=s.event,this.setBannerOrientation(s.imageWidth>s.imageHeight),this.imageFeedClicked(null,!1,!0)):(this.isOpen=!0,this.cs.setBodyClass(!1),this.imageChangedEvent=s.event,this.setBannerOrientation(s.imageWidth>s.imageHeight))})}).catch(s=>{this.cs.showErrorMessage(s.message)})}mobileFileChangeEvent(e){this.fileChangeEvent(e,!0)}setBannerOrientation(e){this.feedPreviewOrientation=e?W.ox.LANDSCAPE:W.ox.PORTRAIT}imageFeedClicked(e,i=!1,o=!1){this.isOpen=!1,this.cs.setBodyClass(!0),this.showProgress=!0,this.percent=l.Mx.ZERO,this.restrictedImages=[],this.cdr.detectChanges();const s=this.imageChangedEvent?.target?.files?.[l.Mx.ZERO],p=o||s&&s.type===l.Mx.IMAGE_GIF_TYPE;this.cs.handleImageFeedClicked({croppedImage:e||this.croppedImage,imageChangedEvent:this.imageChangedEvent,base64ToFile:$t.Ll,isValidFile:u=>Boolean(this.cs.isValidFile(u)),uploadService:this.uploadService,apiUrl:U.Y9.uploadFile,folder:l.D4.createPostImageFolder,fileType:s?.type,uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,isMobileApp:i,mobileFileData:e,isGif:p,onProgress:u=>{this.ngZone.run(()=>{this.percent=u,this.cdr.detectChanges()})}}).then(({preview:u,url:_})=>{this.ngZone.run(()=>{this.percent=l.Mx.ONE_HUNDRED,this.cdr.detectChanges(),setTimeout(()=>{this.showProgress=!1,this.percent=l.Mx.ZERO,this.actualFeedPreviewOrientation=this.feedPreviewOrientation,this.imageFeedPreview=u,this.form.patchValue({cover_image:_}),this.cdr.detectChanges()},l.Mx.THREE_HUNDRED)})}).catch(u=>{if(this.showProgress=!1,this.percent=l.Mx.ZERO,this.cdr.detectChanges(),u?.restricted&&u?.restrictedImage)return this.restrictedImages=[u.restrictedImage],this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages),void this.removeVideoFeedImage();u?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(u.message||nt.Vm.SOMETHING_WENT_WRONG),this.removeVideoFeedImage()})}removeVideoFeedImage(){this.form.get("cover_image")?.reset(),this.imageFeedPreview="",this.showProgress=!1,this.percent=l.Mx.ZERO}cancelCrop(){this.isOpen=!1,this.cs.setBodyClass(!0)}onDeleteAlbumClick(){this.deleteAlbumModal&&this.deleteAlbumModal.openModal()}deleteAlbum(){if(!this.itemSk)return;const e=`${U.Y9.portfolioContent}/${this.itemSk}?type=${this.portfolioType.toUpperCase()}`;this.apiCallService.delete(e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:i=>{i.status?(this.cs.showSuccessMessage(i.message),this.itemDeleted.emit()):this.cs.showErrorMessage(i.message)},error:i=>{this.cs.showErrorMessage(i.message)}})}onCancelDelete(){this.deleteAlbumModal&&this.deleteAlbumModal.closeModal()}get deleteAlbumMessage(){const e=this.form?.get("name")?.value||"";return this.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_MESSAGE[this.portfolioType].replace("{{title}}",e)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36($.v),t.Y36(bt.C),t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(Tt.Y),t.Y36(gt.F))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-step-1-basic-info"]],viewQuery:function(i,o){if(1&i&&(t.Gf(Do,5),t.Gf(Lo,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.coverImageInput=s.first),t.iGM(s=t.CRH())&&(o.deleteAlbumModal=s.first)}},inputs:{portfolioType:"portfolioType",form:"form",isEditMode:"isEditMode",isIndividual:"isIndividual",showDescription:"showDescription",currentStepNumber:"currentStepNumber",totalSteps:"totalSteps",coverImageUploadInProgress:"coverImageUploadInProgress",coverImageUploadPercent:"coverImageUploadPercent",useVideoCoverStyle:"useVideoCoverStyle",itemSk:"itemSk",enable:"enable",showToggle:"showToggle",disableMessage:"disableMessage",enableMessage:"enableMessage",selectedBadgeGroups:"selectedBadgeGroups"},outputs:{itemDeleted:"itemDeleted",toggleChanged:"toggleChanged"},decls:39,vars:38,consts:[[1,"step-1-basic-info-container"],["class","d-flex justify-content-between",4,"ngIf"],[1,"section-title"],[1,"mb-0"],[1,"toggle-delete-container"],["class","ms-auto",3,"currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged",4,"ngIf"],["type","button","class","btn btn-delete btn-delete-uppr",3,"ms-auto","title","click",4,"ngIf"],[1,"step-form-content"],[3,"formGroup"],[1,"row"],[1,"col-12","col-lg-8"],[1,"form-fields-left"],[3,"ngClass"],[3,"field","form"],["class","col-12",4,"ngIf"],[1,"col-12","release-date-section"],[1,"form-group"],[1,"parent-label","mb-0"],[1,"release-type-checkboxes","mb
1-3","d-flex","align-items-center","gap-5"],[3,"form","field","checkboxClicked"],["class","release-input-wrapper",4,"ngIf"],[1,"col-12","col-lg-4"],[1,"form-group","cover-image-wrapper",3,"ngClass"],[1,"parent-label"],[3,"message","infoIconSize",4,"ngIf"],[1,"uploadContainer"],["for","coverImageUpload","class","custom-label-upload",4,"ngIf"],["class","uploadFileImageData",3,"ngClass",4,"ngIf"],[3,"control","field"],["class","row",4,"ngIf"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage",4,"ngIf"],[3,"imageChangeEvent","isOpen","cropperOptions","imageWidth","closeCrop","cropImageUpload",4,"ngIf"],[3,"dynamicClass","ConfirmationMessage","headerLabel","commonEnum","confirmDelete","cancelDelete"],["deleteAlbumModal",""],[1,"d-flex","justify-content-between"],[1,"step-indicator"],[3,"currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged",4,"ngIf"],[3,"currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged"],["enableToggle",""],[1,"ms-auto",3,"currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged"],["type","button",1,"btn","btn-delete","btn-delete-uppr",3,"title","click"],[1,"icon-delete-filled"],[1,"col-12"],[1,"release-input-wrapper"],[3,"message","infoIconSize"],["for","coverImageUpload",1,"custom-label-upload"],["type","file","onclick","this.value = null","id","coverImageUpload","appMobileBridgeFileInput","",1,"upload","d-none",3,"accept","disabled","fileConfig","change","mobileFileChange"],["coverImageInput",""],[1,"banner-image-type-portfolio"],[1,"image-title"],[1,"image-msg"],[3,"btnField","handleButtonClick"],[1,"uploadFileImageData",3,"ngClass"],["class","show-progress-bar pointer-none",4,"ngIf"],["appDisableRightClick","","appMobileOptimization","","alt","Cover Image","loading","lazy","decoding","async",3,"originalUrl","src","format",4,"ngIf"],["class","close","style","z-index: 10",3,"click",4,"ngIf"],[1,"show-progress-bar","pointer-none"],[3,"percent","radius","outerStrokeWidth","innerStrokeWidth","outerStrokeColor","innerStrokeColor","animation","animationDuration","showSubtitle","backgroundPadding","titleFontSize","titleColor","unitsColor","space"],["appDisableRightClick","","appMobileOptimization","","alt","Cover Image","loading","lazy","decoding","async",3,"originalUrl","src","format"],[1,"close",2,"z-index","10",3,"click"],[1,"icon-liteicon-close"],[1,"distribution-checkboxes"],[3,"form","field"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage"],[3,"imageChangeEvent","isOpen","cropperOptions","imageWidth","closeCrop","cropImageUpload"]],template:function(i,o){if(1&i&&(t.TgZ(0,"div",0),t.YNc(1,No,5,5,"div",1),t.TgZ(2,"div",2)(3,"h3",3),t._uU(4),t.qZA(),t.TgZ(5,"div",4),t.YNc(6,Ro,2,4,"app-toggle-enable",5),t.YNc(7,Uo,2,3,"button",6),t.qZA()(),t.TgZ(8,"div",7)(9,"form",8)(10,"div",9)(11,"div",10)(12,"div",11)(13,"div",12),t._UZ(14,"app-input",13),t.qZA(),t.YNc(15,Zo,2,2,"div",14),t.TgZ(16,"div",15)(17,"div",16)(18,"label",17),t._uU(19),t.qZA(),t.TgZ(20,"div",18)(21,"app-checkbox",19),t.NdJ("checkboxClicked",function(){return o.onReleaseTypeYearChange()}),t.qZA(),t.TgZ(22,"app-checkbox",19),t.NdJ("checkboxClicked",function(){return o.onReleaseTypeDateChange()}),t.qZA()(),t.YNc(23,Vo,2,2,"div",20),t.YNc(24,Bo,2,2,"div",20),t.qZA()()()(),t.TgZ(25,"div",21)(26,"div",22)(27,"label",23),t._uU(28),t.YNc(29,Yo,1,2,"app-info-icon",24),t.qZA(),t.TgZ(30,"div",25),t.YNc(31,qo,10,15,"label",26),t.YNc(32,$o,4,6,"div",27),t.qZA(),t._UZ(33,"app-validation-errors",28),t.qZA()()(),t.YNc(34,Xo,8,5,"div",29),t.qZA(),t.YNc(35,ti,1,4,"app-badge-groups-selection",30),t.qZA(),t.YNc(36,ei,1,4,"app-image-cropper",31),t.TgZ(37,"app-confirmation-modal",32,33),t.NdJ("confirmDelete",function(){return o.deleteAlbum()})("cancelDelete",function(){return o.onCancelDelete()}),t.qZA()()),2&i){let s,p;t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(3),t.Oqu(o.isIndividual?o.CONSTS.INDIVIDUAL_SECTION_TITLE[o.portfolioType]:o.CONSTS.SECTION_TITLE[o.portfolioType]),t.xp6(2),t.Q6J("ngIf",o.showToggle&&o.isIndividual),t.xp6(1),t.Q6J("ngIf",o.isEditMode&&o.isIndividual),t.xp6(2),t.Q6J("formGroup",o.form),t.xp6(4),t.Q6J("ngClass",o.nameField.class),t.xp6(1),t.Q6J("field",o.nameField)("form",o.form),t.xp6(1),t.Q6J("ngIf",o.showDescription),t.xp6(4),t.hij(" ",o.CONSTS.RELEASING_ON," "),t.xp6(2),t.Q6J("form",o.form)("field",o.releaseTypeYearField),t.xp6(1),t.Q6J("form",o.form)("field",o.releaseTypeDateField),t.xp6(1),t.Q6J("ngIf",o.releaseType===o.CONSTS.RELEASE_TYPE_YEAR),t.xp6(1),t.Q6J("ngIf",o.releaseType===o.CONSTS.RELEASE_TYPE_DATE),t.xp6(2),t.Q6J("ngClass",t.VKq(30,oi,o.useVideoCoverStyle)),t.xp6(2),t.hij(" ",o.isIndividual?o.CONSTS.INDIVIDUAL_COVER_IMAGE_LABEL[o.portfolioType]:o.CONSTS.COVER_IMAGE_LABEL[o.portfolioType]," "),t.xp6(1),t.Q6J("ngIf",o.isIndividual&&o.portfolioType===o.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_TYPE.VIDEO),t.xp6(2),t.Q6J("ngIf",!(o.imageFeedPreview||null!=(s=o.form.get("cover_image"))&&s.value||o.showProgress||o.coverImageUploadInProgress)),t.xp6(1),t.Q6J("ngIf",o.showProgress||o.coverImageUploadInProgress||o.imageFeedPreview||(null==(p=o.form.get("cover_image"))?null:p.value)),t.xp6(1),t.Q6J("control",o.form.get("cover_image"))("field",t.VKq(36,si,t.VKq(34,ni,t.VKq(32,ii,o.CONSTS.INDIVIDUAL_COVER_IMAGE_REQUIRED_MESSAGE[o.portfolioType])))),t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(1),t.Q6J("ngIf",o.isOpen),t.xp6(1),t.Q6J("dynamicClass","delete-modal portfolio-banner-delete-modal")("ConfirmationMessage",o.deleteAlbumMessage)("headerLabel",o.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_TITLE[o.portfolioType])("commonEnum",o.commonEnum)}},dependencies:[r.mk,r.O5,N._Y,N.JL,N.sg,Xt.e,it.r,we.s,Ue.b,Ze.t,Ge.o,Ve.g,Be.e,ze.p,Ae.a,st.m,wt.Y,ft.J,At.K,De.nu,Mt.w],styles:[".step-1-basic-info-container[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px}.step-1-basic-info-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%]{display:inline-block;padding:6px 12px;border-radius:20px;border:1px solid var(--theme-interactive-link);margin-bottom:16px}.step-1-basic-info-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:12px;font-weight:600}.step-1-basic-info-container[_ngcontent-%COMP%] .extension[_ngcontent-%COMP%]{font-size:12px;color:var(--theme-interactive-link)}.step-1-basic-info-container[_ngcontent-%COMP%] .toggle-delete-container[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}.step-1-basic-info-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px}@media screen and (max-width: 992px){.step-1-basic-info-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{align-items:center}}.step-1-basic-info-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:24px;font-weight:700;margin:0;flex:1}@media screen and (max-width: 992px){.step-1-basic-info-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:20px}}.step-1-basic-info-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%]{height:36px;width:36px;padding:0 0 1px;border-radius:50%;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);color:var(--theme-interactive-link);align-items:center;justify-content:center;display:flex;border:none;cursor:pointer;flex-shrink:0}.step-1-basic-info-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:20px;color:var(--theme-interactive-link)}.step-1-basic-info-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--theme-interactive-link) 20%,transparent)}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .form-fields-left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;height:100%}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .form-fields-left[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-bottom:0}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .cover-image-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}@media screen and (min-width: 992px){.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .cover-image-wrapper[_ngcontent-%COMP%]{justify-content:flex-start;align-items:flex-start}}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .cover-image-wrapper.video-portfolio-type[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%]{aspect-ratio:16/9}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .cover-image-wrapper.video-portfolio-type[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .banner-image-type-portfolio[_ngcontent-%COMP%]{padding:15px!important}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .cover-image-wrapper.video-portfolio-type[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .banner-image-type-portfolio[_ngcontent-%COMP%] .icon-liteic-cover-thumbnail-light[_ngcontent-%COMP%]{position:relative;font-size:38px!important;right:unset!important;bottom:unset!important}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .cover-image-wrapper.video-portfolio-type[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .banner-image-type-portfolio[_ngcontent-%COMP%] .icon-liteic-cover-thumbnail-light[_ngcontent-%COMP%]:before{color:var(--theme-interactive-link)}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .distribution-checkboxes[_ngcontent-%COMP%] .app-checkbox-container .option-label{overflow:unset}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .distribution-checkboxes[_ngcontent-%COMP%] .app-checkbox-container .custom-checkbox{margin-bottom:5px!important;width:-moz-fit-content!important;width:fit-content!important;display:flex!important}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%]{width:100%}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%]{border:.1rem dashed var(--theme-interactive-link);width:100%;height:auto;aspect-ratio:1/1;border-radius:15px;color:var(--theme-interactive-link);display:flex;cursor:pointer;align-items:center;justify-content:center;flex-direction:column}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%] .plus-icon[_ngcontent-%COMP%]{font-size:24px;text-align:center;color:var(--theme-interactive-link);font-weight:300}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{text-align:center;color:var(--theme-interactive-link);font-size:12px;margin:4px 5px 0;font-weight:500;white-space:normal}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]{position:relative;width:100%;min-height:100px;height:auto;border-radius:15px;overflow:hidden;margin-right:0!important}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:has(.show-progress-bar){border:.1rem dashed var(--theme-interactive-link)}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .show-progress-bar[_ng
1content-%COMP%]{position:absolute;top:0%}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:inherit;object-fit:cover}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;line-height:1;text-decoration:none;background:var(--theme-interactive-link);color:var(--configButtonTextColor);z-index:10;padding:0 0 1px}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{position:relative;bottom:0;right:0;line-height:1;font-weight:800;font-size:10px}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] em[_ngcontent-%COMP%]:before{color:var(--configButtonTextColor)!important}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%] .option-label{white-space:normal!important;overflow:visible!important}@media screen and (max-width: 992px){.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%] .option-label{font-size:14px!important}}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .app-text-area{height:170px!important}@media screen and (max-width: 992px){.step-1-basic-info-container[_ngcontent-%COMP%]{padding:14px}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .form-fields-left[_ngcontent-%COMP%]{margin-bottom:24px}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .cover-image-wrapper[_ngcontent-%COMP%]{margin-top:0}}@media screen and (min-width: 992px){.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{align-items:flex-start}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .form-fields-left[_ngcontent-%COMP%]{padding-right:16px}.step-1-basic-info-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .cover-image-wrapper[_ngcontent-%COMP%]{padding-left:16px;align-items:flex-start}} .theme-whiteLabel .step-1-basic-info-container .toggle-enable-container .both-btn{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;cursor:pointer} .theme-whiteLabel .step-1-basic-info-container .toggle-enable-container .both-btn.active-enable{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-1-basic-info-container .step-indicator{border:1px solid var(--configThemeColor)!important} .theme-whiteLabel .step-1-basic-info-container .extension{color:var(--configThemeColor)!important} .theme-whiteLabel .step-1-basic-info-container .section-title .btn-delete-uppr{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-1-basic-info-container .section-title .btn-delete-uppr em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-1-basic-info-container .section-title .btn-delete-uppr:hover{background-color:color-mix(in srgb,var(--configThemeColor) 80%,transparent)!important} .theme-whiteLabel .step-1-basic-info-container .step-form-content .uploadContainer .icon-liteic-cover-thumbnail-light:before{color:var(--configThemeColor)!important} .theme-whiteLabel .step-1-basic-info-container .step-form-content .uploadContainer .custom-label-upload{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-1-basic-info-container .step-form-content .uploadContainer .custom-label-upload .label, .theme-whiteLabel .step-1-basic-info-container .step-form-content .uploadContainer .custom-label-upload .plus-icon{color:var(--configThemeColor)!important} .theme-whiteLabel .step-1-basic-info-container .step-form-content .uploadContainer .uploadFileImageData{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-1-basic-info-container .step-form-content .uploadContainer .uploadFileImageData .close{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important}[_nghost-%COMP%] app-badge-groups-selection .newpost-accordion accordion-group .panel, [_nghost-%COMP%] app-badge-groups-selection .newpost-accordion accordion-group .panel .panel-heading .accordion-toggle .accordion-header{background:var(--configBgColor)!important}[_nghost-%COMP%] app-badge-groups-selection .badge-groups-list .badge-label{background:var(--configBgColor)!important}"]}),a})();var Pt=b(44350);const Ke={STEP_2_OF_3:Dt.Rh.STEP_2_OF_3,DSP_MASTER_HEADING:{MUSIC:"Digital Service Provider (DSP) Links",VIDEO:"Digital Service Provider (DSP) Links",PODCAST:"Digital Service Provider (DSP) Links",CUSTOM:"Collection Sales Channels"},DSP_MULTISELECT_HEADING:{MUSIC:"Digital Service Provider (DSP) Links",VIDEO:"Digital Service Provider (DSP) Links",PODCAST:"Digital Service Provider (DSP) Links",CUSTOM:"Sales Partner Links"},OPTIONAL_DSP_LINKS:"Digital Service Provider (DSP) Links",SELECT_DSPS:"Select DSPs",CTA_BUTTON_TEXT:"CTA Button Text",CTA_BUTTON_TEXT_PLACEHOLDER:"Enter CTA (Stream, Purchase, etc)",LISTEN_NOW:"Listen Now",WATCH_NOW:"Watch Now",CUSTOM:"custom",DSP_LINKS_INFO_MESSAGE:"Add links to your music on platforms like Spotify, Apple Music, and other streaming services. Fans can discover and stream your music through these platforms."},Le={MUSIC:"Listen Now",VIDEO:"Watch Now",PODCAST:"Listen Now",CUSTOM:"Purchase"},io=(a=[],m)=>({sections:[{title:"",fields:[{type:W.sf.CUSTOM_MULTISELECT,label:Ke.DSP_MULTISELECT_HEADING[m],name:"dsp",class:"col-12 col-lg-12",options:a,callback:null,customMultiselectConfig:{defaultLabel:m===O.W.PORTFOLIO_TYPE.CUSTOM?"Select Partner Links":"Select DSPs",selectAllButtonLabel:"Select All",filterLabel:"Search",optionLabel:"name",optionIconLabel:"logo",customButtonLabel:m===O.W.PORTFOLIO_TYPE.CUSTOM?"Add Custom Partner Link":"Add Custom DSP or Link",showHeader:!0}}]}]}),no={ADD_INDIVIDUAL_ITEM:"Add Single Item",EDIT_INDIVIDUAL_ITEM:"Edit Single Item",DISABLE:"DISABLE",ENABLE:"ENABLE",CANCEL:"CANCEL",SAVE_ITEM:"SAVE ITEM",UPDATE_ITEM:"UPDATE ITEM",METHODS_OF_CONSUMPTION:"Optional: Distribution Methods",DSP_LINKS:"Digital Service Providers (DSPs)",CONTENT_SAVED_SUCCESS:"Content saved successfully",FAILED_TO_SAVE_CONTENT:"Failed to save content",FAILED_TO_LOAD_CONTENT:"Failed to load content",CONTENT_LOADED_SUCCESS:"Content loaded successfully",API_METHOD_POST:"post",API_METHOD_PUT:"put",PERMISSION_PENDING:"pending",OPTIONAL_SALES_CHANNELS:"Optional: Sales Channels",SALES_PARTNERS:"Sales Partners",SALES_PARTNER_LINK:"Sales Partner Link added successfully",BADGE_GROUPS_HINT:"If a Group(s) is selected in this list, only users belonging to that Group will see this item."};var ai=b(31130);const li=["dspIconModal"];function ci(a,m){if(1&a&&(t.TgZ(0,"div",7)(1,"span"),t._uU(2),t.qZA()()),2&a){const n=t.oxw();
1t.xp6(2),t.AsE("STEP ",n.currentStepNumber," OF ",n.totalSteps,"")}}function di(a,m){if(1&a&&(t.TgZ(0,"div",8)(1,"h3"),t._uU(2),t.qZA()()),2&a){const n=t.oxw();t.xp6(2),t.Oqu(n.CONSTS.DSP_MASTER_HEADING[n.portfolioType])}}const pi=function(a,m){return{"dsp-item-individual":a,"dsp-item-album":m}},ui=function(a,m){return{"dsp-fields-individual":a,"dsp-fields-album":m}};function gi(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",17),t.NdJ("cdkDragStarted",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.isDragging=!0)})("cdkDragEnded",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.isDragging=!1)}),t.TgZ(1,"div",18),t._UZ(2,"em",19),t.qZA(),t.TgZ(3,"div",20)(4,"div",21),t._UZ(5,"app-input",13),t.qZA(),t.TgZ(6,"div",21),t._UZ(7,"app-input",13),t.qZA()()()}if(2&a){const n=m.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.WLB(8,pi,e.isIndividual,!e.isIndividual)),t.xp6(3),t.Q6J("ngClass",t.WLB(11,ui,e.isIndividual,!e.isIndividual)),t.xp6(1),t.Q6J("ngClass",n.urlField.class),t.xp6(1),t.Q6J("field",n.urlField)("form",e.dspForm),t.xp6(1),t.Q6J("ngClass",n.ctaField.class),t.xp6(1),t.Q6J("field",n.ctaField)("form",e.dspForm)}}function mi(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",15),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const o=t.oxw(2);return t.KtG(o.drop(i))}),t.YNc(1,gi,8,14,"div",16),t.qZA()}if(2&a){const n=t.oxw(2);t.Q6J("cdkDropListData",n.dspItems),t.xp6(1),t.Q6J("ngForOf",n.dspItems)("ngForTrackBy",n.trackByDspItem)}}function _i(a,m){if(1&a&&(t.TgZ(0,"div",9)(1,"form",10)(2,"div",11)(3,"div",12),t._UZ(4,"app-custom-multiselect",13),t.qZA()()(),t.YNc(5,mi,2,3,"div",14),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("formGroup",n.form),t.xp6(3),t.Q6J("field",n.multiselectField)("form",n.form),t.xp6(1),t.Q6J("ngIf",n.dspForm&&n.dspItems&&n.dspItems.length>0)}}const hi=function(){return{class:"custom-modal-lg",backdrop:"static",keyboard:!1}};let Vt=(()=>{const m=class{constructor(e,i,o,s,p,u){this.formService=e,this.cs=i,this.apiCallService=o,this.uploadService=s,this.modalHandlerService=p,this.cdr=u,this.portfolioType="",this.isIndividual=!1,this.isDspChecked=!0,this.currentStepNumber=2,this.totalSteps=3,this.dspModalHeaderLabel=at.fD.CREATE_CUSTOM_DSP,this.CONSTS=Ke,this.PORTFOLIO_CONSTS=at.fD,this.dspListing=[],this.dspButtonFields=[],this.dspFields=null,this.dspForm=null,this.dspModalFields=null,this.dspModalForm=null,this.restrictedImages=[],this.isDspListingFetched=!1,this.isSubmittingDsp=!1,this.isDragging=!1,this.dspItems=[],this.remergeOptions$=new X.x,this.destroy$=new X.x,this.dspValueChangesSubscription=null}ngOnInit(){this.initDspFields(),this.remergeOptions$.pipe((0,J.R)(this.destroy$)).subscribe(()=>{this.isDspListingFetched&&this.remergeOptionsWithFormData()})}initDspFields(){this.dspModalFields=lt()((a=>({sections:[{title:"",fields:[{type:W.sf.PROFILE_IMAGE,label:a===O.W.PORTFOLIO_TYPE.CUSTOM?"Partner Logo":"DSP Logo",placeholder:"",name:"logo",class:"col-12",validation:{required:{message:"Profile Image is required"}}},{type:W.sf.TEXT,label:a===O.W.PORTFOLIO_TYPE.CUSTOM?"Partner Name":"DSP Name",placeholder:a===O.W.PORTFOLIO_TYPE.CUSTOM?"Enter Partner Name":"Enter DSP Name",name:"name",class:"col-12",autoComplete:"off",validation:{required:{message:a===O.W.PORTFOLIO_TYPE.CUSTOM?"Partner name is required":"DSP name is required"},maxlength:{value:25,message:"Maximum 25 characters allowed"}}}]}],buttons:[]}))(this.portfolioType)),this.dspModalForm=this.formService.toFormGroup(this.dspModalFields),this.getDSPListing()}getDSPListing(){const e=this.portfolioType||"";this.apiCallService.get(e?`${U.Y9.dsp}?type=${e}`:U.Y9.dsp,!0).subscribe({next:o=>{if(o.status){this.dspListing=o.data?.Items||[],(0,Q.z7)(this.dspListing),this.isDspListingFetched=!0;let s=this.dspListing.map(u=>({logo:u.logo,name:u.name,sk:u.sk,pk:u.pk}));s=this.mergeOptionsWithFormData(s);const p=lt()(io(s,this.portfolioType));this.multiselectField=this.formService.getField(p,0,"dsp"),this.multiselectField.callback=this.customBtnClick.bind(this),this.subscribeMultiselectField(),this.syncFormValueWithOptions()}},error:o=>{this.isDspListingFetched=!0;let s=[];if(s=this.mergeOptionsWithFormData(s),s.length>l.Mx.ZERO){const p=lt()(io(s,this.portfolioType));this.multiselectField=this.formService.getField(p,l.Mx.ZERO,"dsp"),this.multiselectField.callback=this.customBtnClick.bind(this)}this.subscribeMultiselectField(),this.cs.showErrorMessage(o.message)}})}mergeOptionsWithFormData(e){if(!this.form)return e;const i=this.form.get("dsp")?.value;if(!i||!Array.isArray(i)||i.length===l.Mx.ZERO)return e;const o=new Set(e.map(p=>
1p.sk).filter(Boolean)),s=i.filter(p=>!(!p.sk||!p.name||o.has(p.sk)));if(s.length>l.Mx.ZERO){const p=s.map(u=>({logo:u.logo||"",name:u.name||"",sk:u.sk||"",pk:u.pk||""}));e=[...e,...p]}return e}remergeOptionsWithFormData(){if(!this.multiselectField||!this.dspListing||!this.isDspListingFetched)return;let e=this.dspListing.map(i=>({logo:i.logo,name:i.name,sk:i.sk,pk:i.pk}));e=this.mergeOptionsWithFormData(e),this.multiselectField.options=e,this.syncFormValueWithOptions()}syncFormValueWithOptions(){if(!this.form||!this.multiselectField||!this.multiselectField.options)return;const e=this.form.get("dsp")?.value;if(!e||!Array.isArray(e)||e.length===l.Mx.ZERO)return;const i=new Map;e.forEach(s=>{s.sk&&i.set(s.sk,{url:s.url||"",button_label:s.button_label||""})});const o=[];if(e.forEach(s=>{if(!s.sk)return;const p=this.multiselectField.options.find(u=>u.sk&&s.sk&&u.sk===s.sk);if(p){const u=i.get(s.sk);p.url=u?.url||s.url||"",p.button_label=u?.button_label||s.button_label||"",o.push(p)}}),o.length>0){const s=this.form.get("dsp");s&&setTimeout(()=>{s.setValue(o,{emitEvent:!0})},l.Mx.ONE_HUNDRED)}}subscribeMultiselectField(){if(!this.form||!this.multiselectField)return;this.form.get("dsp")||this.form.addControl("dsp",new N.NI([]));const e=this.form.get(this.multiselectField.name);e&&(this.dspValueChangesSubscription&&this.dspValueChangesSubscription.unsubscribe(),this.dspValueChangesSubscription=e.valueChanges?.pipe((0,J.R)(this.destroy$)).subscribe(i=>{const o=lt()(this.dspForm?.value||{}),s=this.form.get("dsp")?.value||[],p=new Map;s.forEach(_=>{_.sk&&(_.url||_.button_label)&&p.set(_.sk,{url:_.url||"",button_label:_.button_label||""})});const u={...o};i&&i.length>l.Mx.ZERO&&i.forEach(_=>{const h=_.sk;if(h){const M=p.get(h);M&&(u[`${h}url`]=M.url,u[`${h}text`]=M.button_label)}}),this.dspButtonFields=[],this.dspItems=[],i?.forEach(_=>{const h={type:W.sf.TEXT,label:_.name+" URL",name:_.sk+"url",placeholder:"Paste "+_.name+" URL",class:"col-12 col-lg-6",textLogoUrl:_.logo,autoComplete:"off",validation:{required:{message:_.name+" URL is required"},pattern:{value:Et.mL.WEBSITE_URL,message:_.name+" URL is invalid"}}},M={type:W.sf.TEXT,label:"CTA Button Text",name:_.sk+"text",placeholder:"Enter CTA (Stream, Purchase, etc)",class:"col-12 col-lg-6",autoComplete:"off",defaultValue:Le[this.portfolioType],validation:{required:{message:"CTA Button Text is required"},maxlength:{value:13,message:"Maximum 13 characters allowed"}}};this.dspButtonFields.push(h),this.dspButtonFields.push(M),this.dspItems.push({dsp:_,urlField:h,ctaField:M})}),this.dspButtonFields.length?(this.dspFields={sections:[{title:"",fields:this.dspButtonFields}]},this.dspForm=this.formService.toFormGroup(this.dspFields),this.dspForm&&(this.dspForm.patchValue(u),i?.forEach(_=>{const h=this.dspForm?.get(_.sk+"text");h&&!h.value&&h.setValue(Le[this.portfolioType])})),this.tempDspForm=this.formService.toFormGroup(this.dspFields),this.subscribeDspFormFields()):(this.dspFields=null,this.dspForm=null,this.dspItems=[])}))}subscribeDspFormFields(){!this.dspForm||!this.tempDspForm||Object.keys(this.dspForm.controls).forEach(e=>{const i=this.dspForm.get(e);i&&i.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(o=>{this.dspForm&&this.tempDspForm&&this.dspForm.value&&this.tempDspForm.patchValue(this.dspForm.value)})})}customBtnClick(e){e===Ke.CUSTOM&&this.addNewIcon()}addNewIcon(){this.cs.$clearProfileImage.next(!0),this.dspModalForm&&this.dspModalForm.reset(),this.dspIconModal&&this.dspIconModal.openModal()}onHandleDSPModalSubmit(){if(!this.dspModalForm)return;const e=this.dspModalForm.value.logo;if(!(e instanceof File))return this.isSubmittingDsp=!0,void this.addUpdateDSPIcons();if(!this.cs.isValidFile(e))return;this.isSubmittingDsp=!0;const o=`${l.Mx.POST+Date.now()}_${e.name?.toLowerCase().replace(Et.mL.IMAGE_UPLOAD_TO_S3_NAME,"_").split(" ").join("_")}`;this.uploadService.uploadFileData(U.Y9.uploadFile,{file:e,fileName:o,folder:l.D4.createPostImageFolder},!0).pipe((0,J.R)(this.destroy$)).subscribe({next:p=>{if(p.progressStatus===l.Mx.RESTRICTED&&p.restrictedImage)return this.restrictedImages=[p.restrictedImage],this.isSubmittingDsp=!1,void this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages);p.progressStatus===l.Mx.COMPLETED&&(this.dspModalForm&&this.dspModalForm.get("logo")?.setValue(p.data),this.addUpdateDSPIcons())},error:p=>{this.isSubmittingDsp=!1,p?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(nt.Vm.SOMETHING_WENT_WRONG)}})}addUpdateDSPIcons(){if(!this.dspModalForm)return void(this.isSubmittingDsp=!1);
1if(this.dspModalForm.invalid)return this.dspModalForm.markAllAsTouched(),void(this.isSubmittingDsp=!1);const e=this.dspModalForm.value;this.apiCallService.post(`${U.Y9.dsp}`,{name:e.name||"",logo:e.logo||"",type:this.portfolioType},!0).pipe((0,J.R)(this.destroy$)).subscribe({next:p=>{if(this.isSubmittingDsp=!1,p.status){this.cs.showSuccessMessage(this.portfolioType===W.fD.TYPE.CUSTOM?no.SALES_PARTNER_LINK:p.message);const{logo:_,name:h,sk:M,pk:I}=p.data;this.dspListing.some(z=>z.sk===M)||this.dspListing.push({logo:_,name:h,sk:M,pk:I,url:"",button_label:Le[this.portfolioType]}),!this.multiselectField?.options?.some(z=>z.sk===M)&&this.multiselectField?.options&&(this.multiselectField.options=[...this.multiselectField.options,{logo:_,name:h,sk:M,pk:I,url:"",button_label:Le[this.portfolioType]}]);const q=this.form?.get(this.multiselectField?.name);if(q){const z=q.value||[];if(!z.some(tt=>tt.sk===M)){const tt=[...z,{logo:_,name:h,sk:M,pk:I,url:"",button_label:Le[this.portfolioType]}];q.setValue(tt,{emitEvent:!0})}}this.cdr.detectChanges(),this.dspIconModal&&this.dspIconModal.closeModal(),this.dspModalForm&&this.dspModalForm.reset()}else this.cs.showErrorMessage(p.message)},error:p=>{this.isSubmittingDsp=!1,this.cs.showErrorMessage(p.message)}})}drop(e){if(e.previousIndex===e.currentIndex)return;(0,Pt.bA)(this.dspItems,e.previousIndex,e.currentIndex);const i=this.form?.get("dsp");if(!i)return;const o=i.value||[],s=[];this.dspItems.forEach(p=>{const u=o.find(_=>_.sk===p.dsp.sk);if(u){if(this.dspForm){const _=this.dspForm?.get(p.urlField.name)?.value||"",h=this.dspForm?.get(p.ctaField.name)?.value||"";u.url=_,u.button_label=h}s.push(u)}else{const _={...p.dsp};this.dspForm&&(_.url=this.dspForm?.get(p.urlField.name)?.value||"",_.button_label=this.dspForm?.get(p.ctaField.name)?.value||""),s.push(_)}}),i.setValue(s,{emitEvent:!1}),this.dspButtonFields=[],this.dspItems.forEach(p=>{this.dspButtonFields.push(p.urlField),this.dspButtonFields.push(p.ctaField)}),this.cdr.detectChanges()}trackByDspItem(e,i){return i?.dsp?.sk||e}get isDspFormValid(){return 0===(this.form?.get("dsp")?.value||[]).length||(this.dspForm?.valid??!0)}ngOnDestroy(){this.dspValueChangesSubscription&&this.dspValueChangesSubscription.unsubscribe(),this.remergeOptions$.complete(),this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(Bt.D),t.Y36($.v),t.Y36(gt.F),t.Y36(bt.C),t.Y36(Tt.Y),t.Y36(t.sBO))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-step-2-dsp-links"]],viewQuery:function(i,o){if(1&i&&t.Gf(li,5),2&i){let s;t.iGM(s=t.CRH())&&(o.dspIconModal=s.first)}},inputs:{form:"form",portfolioType:"portfolioType",isIndividual:"isIndividual",isDspChecked:"isDspChecked",currentStepNumber:"currentStepNumber",totalSteps:"totalSteps",dspModalHeaderLabel:"dspModalHeaderLabel"},decls:7,vars:13,consts:[[1,"step-2-dsp-links-container"],["class","step-indicator",4,"ngIf"],["class","section-title",4,"ngIf"],["class","step-form-content",4,"ngIf"],["dynamicClass","add-update-dsp-modal",3,"confirmBtnLabel","cancelBtnLabel","closeModalOnSuccess","disableConfirmButton","confirmBtnLoading","headerLabel","modalOptions","confirmed"],["dspIconModal",""],[3,"form","fields"],[1,"step-indicator"],[1,"section-title"],[1,"step-form-content"],[3,"formGroup"],[1,"row"],[1,"col-12"],[3,"field","form"],["class","dsp-items-list-creator","cdkDropList","",3,"cdkDropListData","cdkDropListDropped",4,"ngIf"],["cdkDropList","",1,"dsp-items-list-creator",3,"cdkDropListData","cdkDropListDropped"],["class","dsp-item","cdkDrag","",3,"ngClass","cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"dsp-item",3,"ngClass","cdkDragStarted","cdkDragEnded"],["cdkDragHandle","",1,"drag-handle"],[1,"icon-drag"],[1,"dsp-fields","row",3,"ngClass"],[3,"ngClass"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0),t.YNc(1,ci,3,2,"div",1),t.YNc(2,di,3,1,"div",2),t.YNc(3,_i,6,4,"div",3),t.qZA(),t.TgZ(4,"app-alert-modal",4,5),t.NdJ("confirmed",function(){return o.onHandleDSPModalSubmit()}),t._UZ(6,"app-dynamic-form-builder",6),t.qZA()),2&i&&(t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(1),t.Q6J("ngIf",o.isDspListingFetched&&(!o.isIndividual||o.isDspChecked)),t.xp6(1),t.Q6J("confirmBtnLabel",o.PORTFOLIO_CONSTS.ADD)("cancelBtnLabel",o.PORTFOLIO_CONSTS.CANCEL)("closeModalOnSuccess",!1)("disableConfirmButton",(null==o.dspModalForm?null:o.dspModalForm.invali
1d)||o.isSubmittingDsp)("confirmBtnLoading",o.isSubmittingDsp)("headerLabel",o.dspModalHeaderLabel)("modalOptions",t.DdM(12,hi)),t.xp6(2),t.Q6J("form",o.dspModalForm)("fields",o.dspModalFields))},dependencies:[r.mk,r.sg,r.O5,N._Y,N.JL,N.sg,Yt.U,Ht.F,we.s,ai.e,Pt.Wj,Pt.Zt,Pt.Bh],styles:[".step-2-dsp-links-container[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px}@media screen and (max-width: 992px){.step-2-dsp-links-container[_ngcontent-%COMP%]{padding:10px}.step-2-dsp-links-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{margin-bottom:10px!important}.step-2-dsp-links-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:20px!important}}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%]{display:inline-block;padding:6px 12px;border-radius:20px;border:1px solid var(--theme-interactive-link);margin-bottom:16px}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.step-2-dsp-links-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{margin-bottom:24px}.step-2-dsp-links-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:24px;font-weight:700;margin:0}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{margin-bottom:24px}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .fb-monetize-card[_ngcontent-%COMP%]{padding:0;box-shadow:none!important;background:none!important}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-bottom:24px}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;color:var(--configPostTextColor);margin-bottom:8px}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:20px;height:20px;object-fit:contain}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;padding:12px 16px;background:var(--configSecondaryBgColor);border:1px solid rgba(255,255,255,.1);border-radius:8px;color:var(--configPostTextColor);font-size:14px;transition:border-color .3s ease}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--theme-interactive-link)}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:#ffffff80;opacity:.7}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px;margin:0}.step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .col-12[_ngcontent-%COMP%], .step-2-dsp-links-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] app-dynamic-form-builder[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .col-lg-6[_ngcontent-%COMP%]{padding:0}
1.dsp-items-list-creator[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:24px}.dsp-item[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:12px;padding:16px 0;border-radius:12px;transition:box-shadow .3s ease;will-change:transform}.dsp-item[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:grab;padding:8px;margin-bottom:8px}.dsp-item[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.dsp-item.dsp-item-album[_ngcontent-%COMP%] .icon-drag[_ngcontent-%COMP%]{background:transparent!important;font-size:14px}.dsp-item.dsp-item-album[_ngcontent-%COMP%] .icon-drag[_ngcontent-%COMP%]:before{color:var(--configPostTextColor)!important}.dsp-item.dsp-item-individual[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%] .icon-drag[_ngcontent-%COMP%]:before{color:var(--configBgTextColor)!important}.dsp-item[_ngcontent-%COMP%] .dsp-fields[_ngcontent-%COMP%]{width:100%}.dsp-item[_ngcontent-%COMP%] .dsp-fields.dsp-fields-album[_ngcontent-%COMP%] .form-group label{color:var(--configPostTextColor)!important}.dsp-item[_ngcontent-%COMP%] .dsp-fields.dsp-fields-album[_ngcontent-%COMP%] .form-group input{background:var(--configBgColor);color:var(--configBgTextColor)!important}.dsp-item[_ngcontent-%COMP%] .dsp-fields.dsp-fields-album[_ngcontent-%COMP%] .form-group input::placeholder{color:var(--configBgTextColor)!important}.dsp-item[_ngcontent-%COMP%] .dsp-fields.dsp-fields-individual[_ngcontent-%COMP%] .form-group label{color:var(--configBgTextColor)!important}.dsp-item[_ngcontent-%COMP%] .dsp-fields.dsp-fields-individual[_ngcontent-%COMP%] .form-group input{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.dsp-item[_ngcontent-%COMP%] .dsp-fields.dsp-fields-individual[_ngcontent-%COMP%] .form-group input::placeholder{color:var(--configPostTextColor)!important}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-preview[_ngcontent-%COMP%]{cursor:move}.cdk-drag[_ngcontent-%COMP%]{width:auto} .step-2-dsp-links-container .step-form-content .monetize-card{padding:0!important;background:var(--configSecondaryBgColor)!important;box-shadow:none} .step-2-dsp-links-container .step-form-content .custom-multiselect .p-multiselect{height:auto!important} .step-2-dsp-links-container .step-form-content .custom-multiselect .p-multiselect .p-multiselect-label{flex-wrap:wrap!important} .theme-whiteLabel .step-2-dsp-links-container .step-indicator{border:1px solid var(--configThemeColor)!important} .theme-whiteLabel .step-2-dsp-links-container .section-title h3{color:var(--configPostTextColor)!important} .add-update-dsp-modal .section-container{gap:20px} .add-update-dsp-modal .approval-modal-body{font-size:16px;font-weight:400;line-height:23px;text-align:left;margin-bottom:28px} .add-update-dsp-modal .approval-btn-container button{width:190px} .add-update-dsp-modal .modal-body{padding:20px 20px 8px!important;text-align:left!important} .add-update-dsp-modal .modal-body app-dynamic-form-builder .form-control{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important} .add-update-dsp-modal .modal-body app-dynamic-form-builder .form-control::placeholder{color:var(--configBgTextColor)!important} .add-update-dsp-modal .modal-body app-dynamic-form-builder app-profile-image-upload .preference-profile{margin:0!important} .add-update-dsp-modal .modal-body app-dynamic-form-builder .p-multiselect{height:auto!important} .add-update-dsp-modal .modal-body app-dynamic-form-builder .p-multiselect-label{flex-wrap:wrap!important} .add-update-dsp-modal .fb-monetize-card{padding:0!important} .add-update-dsp-modal .form-group{margin-top:0!important;margin-bottom:20px!important} .theme-whiteLabel .dsp-items-list-creator .icon-drag{background:transparent!important}"]}),a})();var xe=b(29031),Ye=b(56257),je=b(62305),ht=b(89763);const fi=["individualSongPostPrice"],Ci=function(){return[]};let so=(()=>{const m=class{constructor(e){this.cs=e,this.filledData=null,this.lockDataChange=new t.vpe,this.CONSTS=Y.vI,this.Ap
1plication=l.Mx,this.PORTFOLIO_TYPE_CONSTS=O.W,this.postPriceFilledData={showFreePreviewDropdown:!1,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]},this.postPriceFilledDataForSongs={showFreePreviewDropdown:!1,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]},this.destroy$=new X.x,this.subscriptionCheckInterval=null,this.individualSongSubscriptionCheckInterval=null,this.disabledSubscriptionPlanIds=[],this.masterLockingHint=Y.vI.MASTER_LOCKING_HINT,this.individualPurchaseLabel=Y.vI.INDIVIDUAL_PURCHASE_LABEL,this.albumIndividualLockingTitle=Y.vI.ALBUM_INDIVIDUAL_LOCKING_TITLE,this.albumIndividualLockingHint=Y.vI.ALBUM_INDIVIDUAL_LOCKING_HINT}ngOnInit(){this.initForm(),this.initFields(),this.loadFilledData(),this.setupValueChangeListeners(),this.setupPostPriceWatcher(),this.setupIndividualSongPostPriceWatcher()}setupPostPriceWatcher(){setTimeout(()=>{this.postPriceComponent?(this.postPriceComponent.postPriceForm&&this.postPriceComponent.postPriceForm.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(()=>{this.syncDisabledSubscriptionPlans(),this.emitLockDataChange()}),this.postPriceComponent.ppForm&&this.postPriceComponent.ppForm.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(()=>{this.emitLockDataChange()}),this.postPriceComponent.loyaltyPointsForm&&this.postPriceComponent.loyaltyPointsForm.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(()=>{this.emitLockDataChange()}),this.watchSubscriptionSelection(),this.syncDisabledSubscriptionPlans()):setTimeout(()=>this.setupPostPriceWatcher(),l.Mx.ONE_HUNDRED)},l.Mx.TWO_HUNDRED)}syncDisabledSubscriptionPlans(){if(this.postPriceComponent?.subPlanList){const e=this.postPriceComponent.subPlanList.filter(s=>s.isSelected).map(s=>s.sk),i=[],o=this.postPriceComponent.postPriceForm?.get("lock");o?.value?.lockValue?.subscription&&i.push(...o.value.lockValue.subscription.map(p=>"string"==typeof p?p:p.sk).filter(p=>p)),this.disabledSubscriptionPlanIds=[...new Set([...e,...i])],this.deselectDisabledPlans()}}deselectDisabledPlans(){this.individualSongPostPriceComponent?.subPlanList&&this.individualSongPostPriceComponent.subPlanList.forEach(e=>{this.disabledSubscriptionPlanIds.includes(e.sk)&&e.isSelected&&(e.isSelected=!1)})}watchSubscriptionSelection(){if(!this.postPriceComponent)return;this.subscriptionCheckInterval&&clearInterval(this.subscriptionCheckInterval);let e=[];this.subscriptionCheckInterval=setInterval(()=>{if(this.destroy$.closed)return void(this.subscriptionCheckInterval&&(clearInterval(this.subscriptionCheckInterval),this.subscriptionCheckInterval=null));if(!this.postPriceComponent?.subPlanList)return;const i=this.postPriceComponent.subPlanList.filter(u=>u.isSelected).map(u=>u.sk),o=[],s=this.postPriceComponent.postPriceForm?.get("lock");s?.value?.lockValue?.subscription&&o.push(...s.value.lockValue.subscription.map(_=>"string"==typeof _?_:_.sk).filter(_=>_));const p=[...new Set([...i,...o])].sort();JSON.stringify(p)!==JSON.stringify(e)&&(e=p,this.disabledSubscriptionPlanIds=[...p],this.deselectDisabledPlans(),this.emitLockDataChange())},l.Mx.TWO_HUNDRED)}setupIndividualSongPostPriceWatcher(){setTimeout(()=>{this.individualSongPostPriceComponent?(this.individualSongPostPriceComponent.postPriceForm&&this.individualSongPostPriceComponent.postPriceForm.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(()=>{this.emitLockDataChange()}),this.individualSongPostPriceComponent.ppForm&&this.individualSongPostPriceComponent.ppForm.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(()=>{this.emitLockDataChange()}),this.individualSongPostPriceComponent.loyaltyPointsForm&&this.individualSongPostPriceComponent.loyaltyPointsForm.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(()=>{this.emitLockDataChange()}),this.watchIndividualSongSubscriptionSelection(),this.deselectDisabledPlans()):setTimeout(()=>this.setupIndividualSongPostPriceWatcher(),l.Mx.ONE_HUNDRED)},l.Mx.TWO_HUNDRED)}watchIndividualSongSubscriptionSelection(){if(!this.individualSongPostPriceComponent)return;this.individualSongSubscriptionCheckInterval&&clearInterval(this.individualSongSubscriptionCheckInterval);let e=[];this.individualSongSubscriptionCheckInterval=setInterval(()=>{if(this.destroy$.closed)return void(this.individualSongSubscriptionCheckInterval&&(clearInterval(this.individualSongSubscriptionCheckInterval),this.individualSongSubscriptionCheckInterval=null));if(!this.individualSongPostPriceComponent?.subPlanList)return;this.deselectDisabledPlans();const i=this.individualSongPostPriceComponent.subPlanList.filter(o=>o.isSelected).map(o=>o.sk).sort();JSON.stringify(i)!==JSON.stringify(e)&&(e=i,this.emitLockDataChange())},l.Mx.TWO_HUNDRED)}initForm(){this.form&&(this.form.get("enable_free_preview_for_all_songs")||this.form.addControl("enable_free_preview_for_all_songs",new N.NI([])),this.form.get("free_preview_time")||this.form.addControl("free_preview_time",new
1N.NI(l.Mx.ZERO)),this.form.get("enable_individual_song_direct_sales")||this.form.addControl("enable_individual_song_direct_sales",new N.NI([])))}initFields(){const e=(this.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM,i=e in Y.vI.ENABLE_FREE_PREVIEW_LABEL?e:O.W.PORTFOLIO_TYPE.CUSTOM;this.enableFreePreviewField={type:W.sf.CHECKBOX,label:"",name:"enable_free_preview_for_all_songs",class:"col-12",options:[{label:Y.vI.ENABLE_FREE_PREVIEW_LABEL[i]||Y.vI.ENABLE_FREE_PREVIEW_LABEL[O.W.PORTFOLIO_TYPE.CUSTOM],value:!0}],labelKey:"label",valueKey:"value",infoIconMessageLbl:Y.vI.FREE_PREVIEW_DURATION_INFO_MESSAGE[i]||Y.vI.FREE_PREVIEW_DURATION_INFO_MESSAGE[O.W.PORTFOLIO_TYPE.CUSTOM]},this.enableIndividualSongSalesField={type:W.sf.CHECKBOX,label:"",name:"enable_individual_song_direct_sales",class:"col-12",options:[{label:Y.vI.ENABLE_INDIVIDUAL_SALES_LABEL[i]||Y.vI.ENABLE_INDIVIDUAL_SALES_LABEL[O.W.PORTFOLIO_TYPE.CUSTOM],value:!0}],labelKey:"label",valueKey:"value",infoIconMessageLbl:Y.vI.INDIVIDUAL_SALES_INFO_MESSAGE[i]||Y.vI.INDIVIDUAL_SALES_INFO_MESSAGE[O.W.PORTFOLIO_TYPE.CUSTOM]}}loadFilledData(){if(this.filledData){if(this.filledData.lockDetails&&(this.postPriceFilledData.lockDetails=this.filledData.lockDetails),void 0!==this.filledData.is_subscription&&(this.postPriceFilledData.is_subscription=this.filledData.is_subscription),void 0!==this.filledData.is_indivudiual_price&&(this.postPriceFilledData.is_indivudiual_price=this.filledData.is_indivudiual_price),void 0!==this.filledData.is_nft_added&&(this.postPriceFilledData.is_nft_added=this.filledData.is_nft_added),this.filledData?.international_prices?.length&&(this.postPriceFilledData.international_prices=this.filledData.international_prices),this.filledData.subscriptions){this.postPriceFilledData.subscriptions=this.filledData.subscriptions;const e=this.filledData.subscriptions.map(o=>o.sk).filter(o=>o),i=[];this.filledData.outer_subscription&&i.push(...this.filledData.outer_subscription.map(o=>"string"==typeof o?o:o.sk).filter(o=>o)),this.disabledSubscriptionPlanIds=[...new Set([...e,...i])]}if(this.filledData.indivisualPrice&&(this.postPriceFilledData.indivisualPrice=this.filledData.indivisualPrice),null!=this.filledData.loyalty_points&&this.filledData.loyalty_points>l.Mx.ZERO&&(this.postPriceFilledData.loyalty_points=this.filledData.loyalty_points),this.filledData.nftIDList&&(this.postPriceFilledData.nftIDList=this.filledData.nftIDList),void 0!==this.filledData.enable_free_preview_for_all_songs){const e=this.filledData.enable_free_preview_for_all_songs?[!0]:[];this.form?.get("enable_free_preview_for_all_songs")?.setValue(e)}if(void 0!==this.filledData.free_preview_time&&this.form?.get("free_preview_time")?.setValue(this.filledData.free_preview_time),void 0!==this.filledData.enable_individual_song_direct_sales){const e=this.filledData.enable_individual_song_direct_sales?[!0]:[];this.form?.get("enable_individual_song_direct_sales")?.setValue(e)}if(this.filledData.individualSongLockDetails&&(this.postPriceFilledDataForSongs.lockDetails=this.filledData.individualSongLockDetails),void 0!==this.filledData.individual_song_is_subscription&&(this.postPriceFilledDataForSongs.is_subscription=this.filledData.individual_song_is_subscription),void 0!==this.filledData.individual_song_is_indivudiual_price&&(this.postPriceFilledDataForSongs.is_indivudiual_price=this.filledData.individual_song_is_indivudiual_price),void 0!==this.filledData.individual_song_is_nft_added&&(this.postPriceFilledDataForSongs.is_nft_added=this.filledData.individual_song_is_nft_added),this.filledData?.international_prices?.length&&(this.postPriceFilledDataForSongs.international_prices=this.filledData.international_prices),this.filledData.individual_song_subscriptions){const e=this.filledData.individual_song_subscriptions.filter(i=>!this.disabledSubscriptionPlanIds.includes(i.sk));this.postPriceFilledDataForSongs.subscriptions=e}this.filledData.individual_song_indivisualPrice&&(this.postPriceFilledDataForSongs.indivisualPrice=this.filledData.individual_song_indivisualPrice),null!=this.filledData.individual_song_loyalty_points&&this.filledData.individual_song_loyalty_points>l.Mx.ZERO&&(this.postPriceFilledDataForSongs.loyalty_points=this.filledData.individual_song_loyalty_points),this.filledData.individual_song_nftIDList&&(this.postPriceFilledDataForSongs.nftIDList=this.filledData.individual_song_nftIDList)}}setupValueChangeListeners(){this.form&&(this.form.get("enable_free_preview_for_all_songs")?.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(e=>{(!e||e.length===l.Mx.ZERO)&&this.resetFreePreviewTime(),this.emitLockDataChange()}),this.form.get("free_preview_time")?.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(()=>{this.emitLockDataChange()}),this.form.get("enable_individual_song_direct_sales")?.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(e=>
1{(!e||e.length===l.Mx.ZERO)&&this.resetIndividualSongLocking(),this.emitLockDataChange()}))}resetFreePreviewTime(){this.form&&this.form.get("free_preview_time")?.setValue(l.Mx.ZERO,{emitEvent:!1})}resetIndividualSongLocking(){this.individualSongPostPriceComponent&&(this.individualSongPostPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.individualSongPostPriceComponent.addedNFTIds=[],this.individualSongPostPriceComponent.postPriceForm&&this.individualSongPostPriceComponent.postPriceForm.reset({free_preview:l.Mx.ZERO,preview_image:"",description:"",archive_post:"",is_comment_enable:"",accept_tip_on_livestream:"",hashTagList:[]}),this.individualSongPostPriceComponent.ppForm&&this.individualSongPostPriceComponent.ppForm.reset(),this.individualSongPostPriceComponent.loyaltyPointsForm&&this.individualSongPostPriceComponent.loyaltyPointsForm.reset(),this.individualSongPostPriceComponent.subPlanList&&this.individualSongPostPriceComponent.subPlanList.forEach(e=>{e.isSelected=!1})),this.postPriceFilledDataForSongs={showFreePreviewDropdown:!1,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]}}normalizeLoyaltyPointsFromPostPrice(e){const i=e?.loyaltyPointsForm?.get("loyalty_points")?.value,o=Number(i);return Number.isFinite(o)&&o>l.Mx.ZERO?o:null}getPostPriceData(){if(!this.postPriceComponent)return null;const e=this.postPriceComponent.postPriceObj,i=this.postPriceComponent.ppForm,o=this.postPriceComponent.postPriceForm,s=this.postPriceComponent.subPlanList||[],p=this.postPriceComponent.addedNFTIds||[];if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft))return null;const _={is_subscription:e.is_subscription||!1,is_indivudiual_price:e.is_ind_purchase||!1,is_nft_added:e.is_lock_with_nft||!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.postPriceComponent.currencyConversionData?.adjustedPrices||[]};if(e.is_ind_purchase&&i&&(_.indivisualPrice=i.controls.indPrice?.value||""),e.is_loyalty_points&&(_.loyalty_points=this.normalizeLoyaltyPointsFromPostPrice(this.postPriceComponent)),e.is_subscription&&s.length>l.Mx.ZERO&&s.forEach(h=>{h.isSelected&&_.subscriptions.push({sk:h.sk,pk:h.pk,title:h.name,duration:h.duration,amount:h.price,discount_offer:h.discount_offer})}),e.is_lock_with_nft&&(_.nftIDList=[...p]),o&&o.get("lock")?.value?.lockValue){const h=o.get("lock")?.value?.lockValue;_.outer_subscription=h?.subscription||[],_.outer_nft=h?.NFT||[]}return _}getIndividualSongPostPriceData(){if(!this.individualSongPostPriceComponent)return null;const e=this.individualSongPostPriceComponent.postPriceObj,i=this.individualSongPostPriceComponent.ppForm,o=this.individualSongPostPriceComponent.postPriceForm,s=this.individualSongPostPriceComponent.subPlanList||[],p=this.individualSongPostPriceComponent.addedNFTIds||[];if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft))return null;const u={is_subscription:e.is_subscription||!1,is_indivudiual_price:e.is_ind_purchase||!1,is_nft_added:e.is_lock_with_nft||!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:e?.international_prices};if(e.is_ind_purchase&&i&&(u.indivisualPrice=i.controls.indPrice?.value||""),e.is_loyalty_points&&(u.loyalty_points=this.normalizeLoyaltyPointsFromPostPrice(this.individualSongPostPriceComponent)),e.is_subscription&&s.length>l.Mx.ZERO&&s.forEach(_=>{_.isSelected&&u.subscriptions.push({sk:_.sk,pk:_.pk,title:_.name,duration:_.duration,amount:_.price,discount_offer:_.discount_offer})}),e.is_lock_with_nft&&(u.nftIDList=[...p]),o&&o.get("lock")?.value?.lockValue){const _=o.get("lock")?.value?.lockValue;u.outer_subscription=_?.subscription||[],u.outer_nft=_?.NFT||[]}return u}emitLockDataChange(){const e=this.getPostPriceData(),i=this.getIndividualSongPostPriceData(),o=this.form?.get("enable_free_preview_for_all_songs")?.value||[],s=this.form?.get("enable_individual_song_direct_sales")?.value||[],p={postPriceData:e,individualSongPostPriceData:i,enable_free_preview_for_all_songs:Array.isArray(o)&&o.length>l.Mx.ZERO,free_preview_time:this.form?.get("free_preview_time")?.value||l.Mx.ZERO,enable_individual_song_direct_sales:Array.isArray(s)&&s.length>l.Mx.ZERO,disabledSubscriptionPlanIds:this.disabledSubscriptionPlanIds};this.lockDataChange.emit(p)}
1reset(){this.resetAlbumLocking(),this.resetIndividualSongLocking(),this.resetFreePreviewTime(),this.form&&(this.form.get("enable_free_preview_for_all_songs")?.setValue([],{emitEvent:!1}),this.form.get("enable_individual_song_direct_sales")?.setValue([],{emitEvent:!1})),this.emitLockDataChange()}resetAlbumLocking(){this.postPriceComponent&&(this.postPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.postPriceComponent.addedNFTIds=[],this.postPriceComponent.postPriceForm&&this.postPriceComponent.postPriceForm.reset({free_preview:l.Mx.ZERO,preview_image:"",description:"",archive_post:"",is_comment_enable:"",accept_tip_on_livestream:"",hashTagList:[]}),this.postPriceComponent.ppForm&&this.postPriceComponent.ppForm.reset(),this.postPriceComponent.loyaltyPointsForm&&this.postPriceComponent.loyaltyPointsForm.reset(),this.postPriceComponent.subPlanList&&this.postPriceComponent.subPlanList.forEach(e=>{e.isSelected=!1})),this.disabledSubscriptionPlanIds=[],this.postPriceFilledData={showFreePreviewDropdown:!1,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]}}get freePreviewOptions(){return Y.vI.FREE_PREVIEW_LOCK[this.portfolioType]||Y.vI.FREE_PREVIEW_LOCK[O.W.PORTFOLIO_TYPE.CUSTOM]}get restrictLabel(){return(0,Ye.hT)(this.portfolioType,Y.vI.RESTRICT_LABEL)}get restrictLabelIndividual(){return(0,Ye.hT)(this.portfolioType,Y.vI.RESTRICT_LABEL_INDIVIDUAL)}validatePostPrice(e){if(!e)return{isValid:!0};const i=e.postPriceObj;if(!i)return{isValid:!0};const o=e.ppForm,s=e.postPriceForm,p=e.subPlanList||[],u=e.addedNFTIds||[];if(!(i.is_subscription||i.is_ind_purchase||i.is_loyalty_points||i.is_lock_with_nft))return{isValid:!0};if(i.is_loyalty_points){const _=e.loyaltyPointsForm,h=(0,ht.pL)(_?.get("loyalty_points")?.value);if(!_||_.invalid||null==h)return{isValid:!1,errorMessage:je.YJ.RANGE_HINT}}if(i.is_subscription&&p.length>l.Mx.ZERO&&!p.some(h=>h.isSelected))return{isValid:!1,errorMessage:w.SELECT_SUBSCRIPTION_OPTION_ERROR};if(i.is_ind_purchase){if(!o||!Number(o.controls.indPrice?.value))return{isValid:!1,errorMessage:w.ENTER_VALID_INDIVIDUAL_PRICE};if(o.controls.userList?.value?.length&&o.controls.userList.value.reduce((h,M)=>h+(Number(M.revenueSplit)||l.Mx.ZERO),l.Mx.ZERO)>l.Mx.ONE_HUNDRED)return{isValid:!1,errorMessage:w.REVENUE_SPLIT_EXCEEDS_100}}return i.is_lock_with_nft&&!u.length?{isValid:!1,errorMessage:W.ET.PLEASE_ADD_NFT_OPTION}:this.postPriceFilledData?.isActiveLiveStream&&s?.invalid?{isValid:!1,errorMessage:w.FILL_ALL_REQUIRED_FIELDS}:{isValid:!0}}validateAlbumPostPrice(){return this.validatePostPrice(this.postPriceComponent)}validateIndividualSongPostPrice(){const e=this.form?.get("enable_individual_song_direct_sales")?.value||[];if(!(Array.isArray(e)&&e.length>l.Mx.ZERO))return{isValid:!0};if(!this.individualSongPostPriceComponent)return{isValid:!1,errorMessage:w.FIX_PRICING_OPTIONS};const o=this.individualSongPostPriceComponent.postPriceObj;return o&&(o.is_subscription||o.is_ind_purchase||o.is_loyalty_points||o.is_lock_with_nft)?this.validatePostPrice(this.individualSongPostPriceComponent):{isValid:!1,errorMessage:w.FIX_PRICING_OPTIONS}}ngOnDestroy(){this.subscriptionCheckInterval&&(clearInterval(this.subscriptionCheckInterval),this.subscriptionCheckInterval=null),this.individualSongSubscriptionCheckInterval&&(clearInterval(this.individualSongSubscriptionCheckInterval),this.individualSongSubscriptionCheckInterval=null),this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36($.v))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-album-locking"]],viewQuery:function(i,o){if(1&i&&(t.Gf(xe.PostPriceComponent,5),t.Gf(fi,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.postPriceComponent=s.first),t.iGM(s=t.CRH())&&(o.individualSongPostPriceComponent=s.first)}},inputs:{form:"form",filledData:"filledData",portfolioType:"portfolioType"},outputs:{lockDataChange:"lockDataChange"},decls:3,vars:9,consts:[[1,"album-locking-container"],[1,"album-locking-section"],[3,"taggedUserList","filledData","isSelectorUsed","isDoubleLockingEnable","freePreviewOptionsProps","freePreviewLabel","restrictLabel","individualPurchaseLabel"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"app-post-price",2),t.qZA()()),2&i&&(t.xp6(2),t.Q6J("taggedUserList",t.DdM(8,Ci))("filledData",o.postPriceFilledData)("isSelectorUsed",!0)("isDoubleLockingEnable",!0)("freePreviewOptionsProps",null)("freePreviewLabel","")("restrictLabel",o.restrictLabel)("individualPurchaseLabel",o.individualPurchaseLabel[o.portfolioType]))},dependencies:[xe.PostPriceComponent],styles:[".album-locking-container[_ngcontent-%COMP%]{margin-top:24px;background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;padding:24px;border-radius:24px}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:25px;margin:32px 16px}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%]{padding:20px 8px}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%]{margin:10px 0 0;padding:20px 10px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .post-price-lock-container{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox{color:var(--configPostTextColor)}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign{color:var(--configPostTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group{background:var(--configBgColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a{color:var(--theme-interactive-link)}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em{color:var(--theme-interactive-link)}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a:hover{color:var(--theme-interactive-link)}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input{background:transparent;color:var(--configPostTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input::placeholder{color:var(--configPostTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li span{color:var(--configPostTextColor)}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li a{color:var(--theme-interactive-link)}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .post-price-lock-container{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox{color:var(--configBgTextColor)}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign{color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group{background:var(--configSecondaryBgColor)!important}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .form-control{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a{color:var(--theme-interactive-link)}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em{color:var(--theme-interactive-link)}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a:hover{color:var(--theme-interactive-link)}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input{background:transparent;color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input::placeholder{color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li span{color:var(--configBgTextColor)}.album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li a{color:var(--theme-interactive-link)}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] .album-locking-title[_ngcontent-%COMP%], .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] .album-locking-title[_ngcontent-%COMP%]{margin-bottom:32px!important;display:flex;align-items:baseline;gap:5px}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] .album-locking-title[_ngcontent-%COMP%] h4[_ng
1content-%COMP%], .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] .album-locking-title[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:20px;font-weight:700}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .custom-checkbox, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .custom-checkbox{z-index:1}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .cb-option-container, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .cb-option-container{gap:0px!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head{display:flex}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .icon-liteicon-black-tick:before, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .icon-liteicon-black-tick:before{font-size:14px!important}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head{display:block}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .icon-liteicon-black-tick:before, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .icon-liteicon-black-tick:before{font-size:10px!important;left:3px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox{font-weight:500;padding:3px 0 0 38px;margin:0 0 0 40px}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox:first-child, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox:first-child{margin:0}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox{display:block;margin:15px 0 0;padding:0 0 0 34px;font-size:14px;line-height:20px}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox .checkmark, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox .checkmark{margin-top:0!important}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content h5, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content h5{font-size:16px;margin:0 0 16px;font-weight:400}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content h5, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content h5{font-size:14px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label{border-radius:28px;border:solid 1px var(--theme-interactive-link);width:100%;padding:17px 20px 17px 30px;margin:0 0 6px}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label{padding:14px 20px;font-size:13px;margin:0 0 16px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark{right:20px;left:auto;top:14px}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark.icon-liteicon-black-tick:before, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark.icon-liteicon-black-tick:before{font-size:14px!important}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark{top:6px}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark.icon-liteicon-black-tick:before, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark.icon-liteicon-black-tick:before{font-size:12px!important;display:flex;justify-content:center;margin-top:3px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .walletform-title, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .walletform-title{border:none;padding-bottom:0!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign{position:absolute;
1left:24px;top:calc(50% - 7px)!important;z-index:1;font-weight:900;font-size:14px;line-height:100%}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign{left:20px;top:47px;font-size:12px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign~.form-control, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign~.form-control{padding-left:36px;line-height:18px}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign~.form-control, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign~.form-control{line-height:16px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group{position:relative;margin-bottom:20px!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .onboarding-validInfo, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .onboarding-validInfo{display:flex;justify-content:space-between;align-items:center}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .dropdown-toggle, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .dropdown-toggle{margin:-10px 30px 0 0}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .dropdown-menu p, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .dropdown-menu p{font-size:13px;overflow-wrap:anywhere;text-transform:none!important}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group{margin:20px 0 0!important}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .formgroup-users, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .formgroup-users{position:absolute;top:52px;right:20px;margin:0!important}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .formgroup-users, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .formgroup-users{top:46px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .form-control~label, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .form-control~label{margin:16px 0 0}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft{display:flex;justify-content:space-between;align-items:center}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a{font-size:14px;text-decoration:none;text-transform:uppercase;cursor:pointer;flex:none;position:absolute;right:20px}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a{right:10px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em{position:static}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em:before, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em:before{font-size:12px!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input{flex:1;border:0;font-size:14px;font-weight:900;padding-right:37px}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input::placeholder, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input::placeholder{opacity:.7}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content{padding:5px 20px 0}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul{list-style:none;margin:0;padding:0}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li{margin:15px 0 0;display:flex;justify-content:space-between;align-items:center}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li span, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li span{font-size:16px;opacity:.75;padding-right:15px;word-break:break-all}.album-locking-container[_ngcontent-%COMP%] .album-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li a, .album-locking-container[_ngcontent-%COMP%] .individual-song-locking-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li a{text-decoration:none;font-size:22px;flex:none;line-height:0;cursor:pointer}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%]{margin-top:24px}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-bottom:0;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:20px;padding:20px}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{padding:20px 10px}}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%]{background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:25px;margin:32px 16px}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{color:var(--configPostTextColor);font-weight:500;margin-bottom:8px}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%] .ng-select .ng-select-container{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;border-color:var(--configBorderColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%] .ng-select .ng-select-container .ng-value-container .ng-value{color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%] .ng-select .ng-select-container .ng-value-container .ng-value-label{color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%] .ng-select .ng-select-container .ng-placeholder{color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%] .ng-select .ng-select-container .ng-arrow:before{border-color:var(--configBgTextColor)!important}.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%] .ng-select .ng-dropdown-panel{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}@media (max-width: 992px){.album-locking-container[_ngcontent-%COMP%] .album-locking-options[_ngcontent-%COMP%] .free-preview-dropdown[_ngcontent-%COMP%]{margin:10px 0 0;padding:20px 10px}}.album-locking-container[_ngcontent-%COMP%] .form-group .option-label{white-space:normal!important}.album-locking-container[_ngcontent-%COMP%] .form-group>app-checkbox .checkbox-form-group{margin-top:0!important} .theme-whiteLabel .album-locking-container .postprice-checkbox label{border-color:var(--configThemeColor)!important}"]}),a})();function bi(a,m){if(1&a&&t._UZ(0,"app-info-icon",6),2&a){const n=t.oxw();t.Q6J("message",n.CONSTS.MASTER_LOCKING_HINT[n.portfolioType])("infoIconSize",18)}}let ro=(()=>{const m=class{constructor(){this.portfolioType="",this.currentStepNumber=l.Mx.TWO,this.totalSteps=l.Mx.THREE,this.albumLockingFilledData=null,this.lockDataChange=new t.vpe,this.CONSTS=Y.vI,this.Ap
1plication=l.Mx,this.PORTFOLIO_TYPE_CONSTS=O.W}ngOnInit(){}onAlbumLockDataChange(e){this.lockDataChange.emit(e)}get sectionTitle(){const e=(this.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM;return Y.vI.LOCKING_TITLE[e in Y.vI.LOCKING_TITLE?e:O.W.PORTFOLIO_TYPE.CUSTOM]||Y.vI.LOCKING_TITLE[O.W.PORTFOLIO_TYPE.CUSTOM]}};let a=m;return m.\u0275fac=function(i){return new(i||m)},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-step-album-locking"]],viewQuery:function(i,o){if(1&i&&t.Gf(so,5),2&i){let s;t.iGM(s=t.CRH())&&(o.albumLockingComponent=s.first)}},inputs:{form:"form",portfolioType:"portfolioType",currentStepNumber:"currentStepNumber",totalSteps:"totalSteps",albumLockingFilledData:"albumLockingFilledData"},outputs:{lockDataChange:"lockDataChange"},decls:10,vars:7,consts:[[1,"step-album-locking-container"],[1,"step-indicator"],[1,"section-title"],[3,"message","infoIconSize",4,"ngIf"],[1,"step-form-content"],[3,"form","filledData","portfolioType","lockDataChange"],[3,"message","infoIconSize"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._uU(3),t.qZA()(),t.TgZ(4,"div",2)(5,"h3"),t._uU(6),t.YNc(7,bi,1,2,"app-info-icon",3),t.qZA()(),t.TgZ(8,"div",4)(9,"app-album-locking",5),t.NdJ("lockDataChange",function(p){return o.onAlbumLockDataChange(p)}),t.qZA()()()),2&i&&(t.xp6(3),t.AsE("STEP ",o.currentStepNumber," OF ",o.totalSteps,""),t.xp6(3),t.hij(" ",o.sectionTitle," "),t.xp6(1),t.Q6J("ngIf",o.CONSTS.MASTER_LOCKING_HINT[o.portfolioType]),t.xp6(2),t.Q6J("form",o.form)("filledData",o.albumLockingFilledData)("portfolioType",o.portfolioType))},dependencies:[r.O5,Xt.e,so],styles:[".step-album-locking-container[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px}@media screen and (max-width: 992px){.step-album-locking-container[_ngcontent-%COMP%]{padding:10px}.step-album-locking-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:20px!important}}.step-album-locking-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%]{display:inline-block;padding:6px 12px;border-radius:20px;border:1px solid var(--theme-interactive-link);margin-bottom:16px}.step-album-locking-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.step-album-locking-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{margin-bottom:24px}.step-album-locking-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:24px;font-weight:700;margin:0}.step-album-locking-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%]{margin-top:24px} .theme-whiteLabel .step-album-locking-container .step-indicator{border:1px solid var(--configThemeColor)!important} .theme-whiteLabel .step-album-locking-container .section-title h3{color:var(--configPostTextColor)!important}"]}),a})();var ao=b(21860),ee=b(92110),lo=b(92340),$e=b(11031),Pi=b(82541),co=b(98508),ye=b(55847),Xe=b(75728),po=b(16570);const Oi=["loyaltyOnlyWarningModal"],vi=["deleteItemModal"];function Mi(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",13)(1,"app-toggle-enable",14,15),t.NdJ("toggleChanged",function(i){t.CHM(n);const o=t.oxw(2);return t.KtG(o.toggleChanged(i))}),t.qZA(),t.TgZ(3,"button",16),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.deleteOpenedSong())}),t._UZ(4,"em",17),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("currentState",n.enable)("disableMessage",n.CONSTS.DISABLE)("enableMessage",n.CONSTS.ENABLE)("isWelcomeMessage",!0),t.xp6(2),t.Q6J("title",n.CONSTS.DELETE)}}function Ti(a,m){if(1&a&&(t.TgZ(0,"div",10)(1,"div",11)(2,"span"),t._uU(3),t.qZA()(),t.YNc(4,Mi,5,5,"div",12),t.qZA()),2&a){const n=t.oxw();t.xp6(3),t.AsE("STEP ",n.currentStepNumber," OF ",n.totalSteps,""),t.xp6(1),t.Q6J("ngIf",n.showAddSongForm&&(!n.isIndividual||n.isDirectDistributionChecked)&&(null==n.editingSong?null:n.editingSong.sk))}}function xi(a,m){if(1&a&&(t.TgZ(0,"div",18)(1,"h3"),t._uU(2),t._UZ(3,"app-info-icon",19),t.qZA()()),2&a){const n=t.oxw();
1t.xp6(2),t.hij(" ",n.directDistributionTitle," "),t.xp6(1),t.Q6J("message",n.directSalesInfoMessage)("infoIconSize",18)}}function Si(a,m){if(1&a&&(t.TgZ(0,"div",25)(1,"div",26)(2,"div",27),t._UZ(3,"em",28),t.qZA()(),t.TgZ(4,"div",29),t._UZ(5,"div",30)(6,"div",31),t.qZA(),t.TgZ(7,"div",32),t._UZ(8,"div",33)(9,"div",34)(10,"div",35),t.qZA()()),2&a){const n=t.oxw(3);t.xp6(3),t.Q6J("ngClass",n.PORTFOLIO_TYPE_ICON_MAP[n.portfolioType])}}function Ii(a,m){if(1&a&&(t.TgZ(0,"div",23),t.YNc(1,Si,11,1,"div",24),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.SKELETON_ITEMS)}}function Ei(a,m){if(1&a&&(t.TgZ(0,"div",55),t._UZ(1,"img",56),t.qZA()),2&a){const n=t.oxw().$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("src",n.thumbnailPreview||n.thumbnail||e.albumCoverImage,t.LSH)("alt",n.song_name)("originalUrl",n.thumbnailPreview||n.thumbnail||e.albumCoverImage)("format","webp")}}function yi(a,m){if(1&a&&(t.TgZ(0,"div",27),t._UZ(1,"em",28),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.Q6J("ngClass",n.PORTFOLIO_TYPE_ICON_MAP[n.portfolioType])}}function ki(a,m){if(1&a&&(t.TgZ(0,"span",57),t._uU(1),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.hij(" ",n.PORTFOLIO_CONSTS_CONST.DISABLED_STATUS_MSG," ")}}function wi(a,m){if(1&a&&(t.TgZ(0,"span",58),t._uU(1),t.qZA()),2&a){const n=t.oxw().$implicit,e=t.oxw(3);t.xp6(1),t.Oqu(e.formatDuration(n.durationInSeconds))}}function Ai(a,m){1&a&&(t.TgZ(0,"span",58),t._uU(1," | "),t.qZA())}function Di(a,m){if(1&a&&(t.TgZ(0,"span",58)(1,"span",59),t._uU(2),t.qZA(),t._uU(3),t.ALo(4,"date"),t.qZA()),2&a){const n=m.ngIf,e=t.oxw(4);t.xp6(2),t.hij("",n.isReleaseYearType?e.MUSIC_PLAYER_CONST.RELEASED_YEAR:e.MUSIC_PLAYER_CONST.RELEASED,":"),t.xp6(1),t.hij(" ",n.isReleaseYearType?n.dateOfRelease:t.xi3(4,2,n.dateOfRelease,"MMM d, yyyy")," ")}}function Li(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",60)(1,"p",61),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,o=t.oxw(3);return t.KtG(o.toggleDescription(i))}),t.qZA()()}if(2&a){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("lines",2)("innerHTML",n.description,t.oJD)}}function Fi(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",38),t.NdJ("cdkDragStarted",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.isDragging=!0)})("cdkDragEnded",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.isDragging=!1)}),t.TgZ(1,"div",39)(2,"div",40),t._UZ(3,"em",41),t.qZA(),t.TgZ(4,"div",42)(5,"div",43),t.YNc(6,Ei,2,4,"div",44),t.YNc(7,yi,2,1,"div",45),t.YNc(8,ki,2,1,"span",46),t.qZA(),t.TgZ(9,"div",29)(10,"h5",47),t._uU(11),t.qZA(),t.TgZ(12,"div"),t.YNc(13,wi,2,1,"span",48),t.YNc(14,Ai,2,0,"span",48),t.YNc(15,Di,5,5,"span",48),t.qZA()(),t.YNc(16,Li,2,2,"div",49),t.TgZ(17,"div",32)(18,"button",50),t.NdJ("click",function(){const o=t.CHM(n).index,s=t.oxw(3);return t.KtG(s.previewSong(o))}),t._UZ(19,"em",51),t.TgZ(20,"span"),t._uU(21),t.qZA()(),t.TgZ(22,"button",52),t.NdJ("click",function(){const o=t.CHM(n).index,s=t.oxw(3);return t.KtG(s.editSong(o))}),t._UZ(23,"em",53),t.qZA(),t.TgZ(24,"button",54),t.NdJ("click",function(){const o=t.CHM(n).index,s=t.oxw(3);return t.KtG(s.removeSong(o))}),t._UZ(25,"em",17),t.qZA()()()()()}if(2&a){const n=m.$implicit,e=t.oxw(3);t.xp6(6),t.Q6J("ngIf",n.thumbnail||e.albumCoverImage),t.xp6(1),t.Q6J("ngIf",!n.thumbnail&&!e.albumCoverImage),t.xp6(1),t.Q6J("ngIf",n.status===e.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_STATUS.INACTIVE),t.xp6(3),t.Oqu(n.song_name),t.xp6(2),t.Q6J("ngIf",n.durationInSeconds),t.xp6(1),t.Q6J("ngIf",n.durationInSeconds&&e.getSongReleaseDisplay(n)),t.xp6(1),t.Q6J("ngIf",e.getSongReleaseDisplay(n)),t.xp6(1),t.Q6J("ngIf",e.isPodcastType()&&n.description),t.xp6(2),t.Q6J("title",e.CONSTS.PLAY),t.xp6(3),t.Oqu(e.CONSTS.PLAY),t.xp6(1),t.Q6J("title",e.CONSTS.EDIT),t.xp6(2),t.Q6J("title",e.CONSTS.DELETE)}}function Ni(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",36),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const o=t.oxw(2);return t.KtG(o.drop(i))}),t.YNc(1,Fi,26,12,"div",37),t.qZA()}if(2&a){const n=t.oxw(2);t.Q6J("cdkDropListDisabled",(null==n.addedSongs?null:n.addedSongs.length)===n.Application.ONE)("cdkDropListAutoScrollStep",n.AUTO_SCROLL_STEP)("cdkDropListData",n.addedSongs),t.xp6(1),t.Q6J("ngForOf",n.addedSongs)("ngForTrackBy",n.trackBySong)}}function Ri(a,m){if(1&a&&(t.TgZ(0,"div",20),t.YNc(1,Ii,2,1,"div",21),t.YNc(2,Ni,2,5,"div",22),t.qZA()),2&a){const n=t.oxw();
1t.xp6(1),t.Q6J("ngIf",!n.addedSongs||n.addedSongs.length===n.Application.ZERO),t.xp6(1),t.Q6J("ngIf",(null==n.addedSongs?null:n.addedSongs.length)>n.Application.ZERO)}}function Ui(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",62)(1,"button",63),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleAddSongForm())}),t.TgZ(2,"span",64),t._uU(3,"+"),t.qZA(),t.TgZ(4,"span"),t._uU(5),t.qZA()()()}if(2&a){const n=t.oxw();t.xp6(5),t.Oqu(n.isPodcastType()?n.CONSTS.ADD_PODCAST_EPISODE_TRACK:n.CONSTS.ADD_SONG_TRACK)}}function Zi(a,m){if(1&a&&(t.TgZ(0,"div",84),t._UZ(1,"app-input",85),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.nameField)("form",n.form)("disabled",n.isUploadingAudio)}}function Vi(a,m){if(1&a&&(t.TgZ(0,"div",86),t._UZ(1,"app-textarea",85),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.descriptionField)("form",n.form)("disabled",n.isUploadingAudio)}}function Bi(a,m){if(1&a&&(t.TgZ(0,"div",95),t._uU(1),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.hij(" ",n.CONSTS.AUDIO_FILE_TYPES," ")}}const Yi=function(a){return{messageType:a}},uo=function(a){return{type:"button",label:a,class:"btn btn-primary select-file-btn"}};function Hi(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"label",87)(1,"input",88,89),t.NdJ("change",function(i){t.CHM(n);const o=t.oxw(3);return t.KtG(o.uploadAudioFile(i))})("mobileFileChange",function(i){t.CHM(n);const o=t.oxw(3);return t.KtG(o.mobileAudioFileChangeEvent(i))}),t.qZA(),t.TgZ(3,"div",90),t._UZ(4,"em",91),t.TgZ(5,"div",92),t._uU(6),t.qZA(),t.YNc(7,Bi,2,1,"div",93),t.TgZ(8,"app-button",94),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.MAs(2);return t.KtG(i.click())}),t.qZA()()()}if(2&a){const n=t.oxw(3);t.Q6J("for",n.isPodcastType()?"podcastEpisodeFileUpload":"songFileUpload"),t.xp6(1),t.Q6J("id",n.isPodcastType()?"podcastEpisodeFileUpload":"songFileUpload")("accept",n.Application.AUDIO_ACCEPT_TYPES)("disabled",n.isUploadingAudio)("fileConfig",t.VKq(8,Yi,n.MOBILE_BRIDGE_EVENT_SEND.ALL_MEDIA_PICKER)),t.xp6(5),t.hij(" ",n.CONSTS.UPLOAD_AUDIO," "),t.xp6(1),t.Q6J("ngIf",!n.audioSelected),t.xp6(1),t.Q6J("btnField",t.VKq(10,uo,n.CONSTS.SELECT_FILE))}}function Ji(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",96)(1,"div",97)(2,"div",98),t._UZ(3,"em",28),t.qZA(),t.TgZ(4,"div",99)(5,"p",100),t._uU(6),t.qZA(),t.TgZ(7,"a",101),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.removeAudioFile())}),t._uU(8),t.qZA()()()()}if(2&a){const n=t.oxw(3);t.xp6(3),t.Q6J("ngClass",n.PORTFOLIO_TYPE_ICON_MAP[n.portfolioType]),t.xp6(3),t.Oqu(n.audioFileName),t.xp6(1),t.Udp("pointer-events",n.isUploadingAudio?"none":"auto"),t.ekj("disabled",n.isUploadingAudio),t.xp6(1),t.Oqu(n.CONSTS.REMOVE_FILE)}}function Wi(a,m){if(1&a&&(t.TgZ(0,"div",95),t._uU(1),t.qZA()),2&a){const n=t.oxw(5);t.xp6(1),t.hij(" ",n.thumbnailFieldConfig.fileTypes," ")}}const go=function(a,m,n){return{cropperMinWidth:a,cropperMinHeight:m,cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:n,maintainAspectRatio:!0}},Qi=function(a){return{isMultiple:!1,cropperOptions:a}};function qi(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"label",106)(1,"input",107,108),t.NdJ("change",function(i){t.CHM(n);const o=t.oxw(4);return t.KtG(o.fileChangeEvent(i,"thumbnail"))})("mobileFileChange",function(i){t.CHM(n);const o=t.oxw(4);return t.KtG(o.fileChangeEvent(i,"thumbnail"))}),t.qZA(),t.TgZ(3,"div",90),t._UZ(4,"em",91),t.TgZ(5,"div",92),t._uU(6),t.qZA(),t.YNc(7,Wi,2,1,"div",93),t.TgZ(8,"app-button",94),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.MAs(2);return t.KtG(i.click())}),t.qZA()()()}if(2&a){const n=t.oxw(4);let e;t.xp6(1),t.Q6J("accept",n.thumbnailFieldConfig.acceptTypes)("disabled",n.showProgress||n.isUploadingAudio)("fileConfig",t.VKq(10,Qi,t.kEZ(6,go,n.CROPPER_MIN_WIDTH,n.CROPPER_MIN_HEIGHT,n.ASPECT_RATIO_NUMERATOR/n.ASPECT_RATIO_DENOMINATOR))),t.xp6(5),t.hij(" ",n.thumbnailFieldConfig.uploadLabel," "),t.xp6(1),t.Q6J("ngIf",!(n.thumbnailPreview||null!=(e=n.form.get("thumbnail"))&&e.value)),t.xp6(1),t.Q6J("btnField",t.VKq(12,uo,n.CONSTS.SELECT_FILE))}}function Gi(a,m){if(1&a&&(t.TgZ(0,"div",113),t._UZ(1,"circle-progress",114),t.qZA()),2&a){const n=t.oxw(5);t.xp6(1),t.Q6J("percent",n.percent)("radius",n.CIRCLE_RADIUS)("outerStrokeWidth",n.STROKE_WIDTH)("innerStrokeWidth",n.STROKE_WIDTH)("outerStrokeColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#09c6da")("innerStrokeColor","#47665f")("animation",!1)("animationDuration",n.ANIMATION_DURATION)("showSubtitle",!1)("backgroundPadding",n.BACKGROUND_PADDING)("titleFontSize",n.TITLE_FONT_SIZE)("titleColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("unitsColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("space",n.SPACE)}}function zi(a,m){if(1&a&&t._UZ(0,"img",115),2&a){const n=t.oxw(5);let e,i;t.Q6J("originalUrl",n.thumbnailPreview||(null==(e=n.form.get("thumbnail"))?null:e.value))("src",n.thumbnailPreview||(null==(i=n.form.get("thumbnail"))?null:i.value),t.LSH)("format","webp")}}function Ki(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"a",116),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(5);
1return t.KtG(i.removeThumbnail())}),t._uU(1," \xd7 "),t.qZA()}if(2&a){const n=t.oxw(5);t.Udp("z-index",n.Z_INDEX)}}const ji=function(a){return[a]};function $i(a,m){if(1&a&&(t.TgZ(0,"div",109),t.YNc(1,Gi,2,14,"div",110),t.YNc(2,zi,1,3,"img",111),t.YNc(3,Ki,2,2,"a",112),t.qZA()),2&a){const n=t.oxw(4);let e;t.Q6J("ngClass",t.VKq(4,ji,n.actualFeedPreviewOrientation)),t.xp6(1),t.Q6J("ngIf",n.showProgress&&n.cs.isBrowser),t.xp6(1),t.Q6J("ngIf",(n.thumbnailPreview||(null==(e=n.form.get("thumbnail"))?null:e.value))&&!n.showProgress),t.xp6(1),t.Q6J("ngIf",!n.showProgress)}}const mo=function(a){return{message:a}},_o=function(a){return{required:a}},ho=function(a){return{validation:a}};function Xi(a,m){if(1&a&&(t.TgZ(0,"div",102)(1,"div",75)(2,"label",78),t._uU(3),t._UZ(4,"app-info-icon",103),t.qZA(),t.TgZ(5,"div",79),t.YNc(6,qi,9,14,"label",104),t.YNc(7,$i,4,6,"div",105),t.qZA(),t._UZ(8,"app-validation-errors",82),t.qZA()()),2&a){const n=t.oxw(3);let e,i,o;t.xp6(3),t.AsE(" ",n.thumbnailFieldConfig.fileLabel,"",null!=(e=n.form.get("thumbnail"))&&e.hasError("required")?"*":""," "),t.xp6(1),t.Q6J("message",n.isPodcastType()?n.CONSTS.OPTIONAL_COVER_IMAGE_FOR_PODCAST_EPISODE:n.CONSTS.OPTIONAL_COVER_IMAGE_FOR_SONG),t.xp6(2),t.Q6J("ngIf",!(n.thumbnailPreview||null!=(i=n.form.get("thumbnail"))&&i.value||n.showProgress)),t.xp6(1),t.Q6J("ngIf",n.showProgress||n.thumbnailPreview||(null==(o=n.form.get("thumbnail"))?null:o.value)),t.xp6(1),t.Q6J("control",n.form.get("thumbnail"))("field",t.VKq(11,ho,t.VKq(9,_o,t.VKq(7,mo,n.thumbnailFieldConfig.requiredMessage))))}}const tn=function(a,m){return{"col-lg-6 mb-4":a,"col-lg-8":m}};function en(a,m){if(1&a&&(t.TgZ(0,"div",73)(1,"div",74)(2,"div",75),t.YNc(3,Zi,2,3,"div",76),t.YNc(4,Vi,2,3,"div",77),t.TgZ(5,"label",78),t._uU(6),t.qZA(),t.TgZ(7,"div",79),t.YNc(8,Hi,9,12,"label",80),t.YNc(9,Ji,9,7,"div",81),t.qZA(),t._UZ(10,"app-validation-errors",82),t.qZA()(),t.YNc(11,Xi,9,13,"div",83),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(9,tn,n.isIndividual,!n.isIndividual)),t.xp6(2),t.Q6J("ngIf",!n.isIndividual),t.xp6(1),t.Q6J("ngIf",n.isPodcastType()&&!n.isIndividual&&n.descriptionField),t.xp6(2),t.hij(" ",(null==n.portfolioConfig?null:n.portfolioConfig.fileLabel)||(n.isPodcastType()?n.CONSTS.PODCAST_EPISODE_FILE:n.CONSTS.SONG_FILE)," "),t.xp6(2),t.Q6J("ngIf",!n.audioSelected),t.xp6(1),t.Q6J("ngIf",n.audioSelected),t.xp6(1),t.Q6J("control",n.form.get((null==n.portfolioConfig?null:n.portfolioConfig.fileField)||(n.isPodcastType()?"podcast_episode_file":"song_file")))("field",t.VKq(16,ho,t.VKq(14,_o,t.VKq(12,mo,(null==n.portfolioConfig?null:n.portfolioConfig.fileRequired)||(n.isPodcastType()?n.CONSTS.PODCAST_EPISODE_FILE_REQUIRED:n.CONSTS.SONG_FILE_REQUIRED))))),t.xp6(1),t.Q6J("ngIf",n.showThumbnail)}}function on(a,m){if(1&a&&(t.TgZ(0,"div",122),t._UZ(1,"app-select",123),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.releaseYearField)("form",n.form)}}function nn(a,m){if(1&a&&(t.TgZ(0,"div",122),t._UZ(1,"app-datepicker",123),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.releaseDateField)("form",n.form)}}function sn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",117)(1,"div",75)(2,"label",118),t._uU(3),t.qZA(),t.TgZ(4,"div",119)(5,"app-checkbox",120),t.NdJ("checkboxClicked",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.onSongReleaseTypeYearChange())}),t.qZA(),t.TgZ(6,"app-checkbox",120),t.NdJ("checkboxClicked",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.onSongReleaseTypeDateChange())}),t.qZA()(),t.YNc(7,on,2,2,"div",121),t.YNc(8,nn,2,2,"div",121),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(3),t.hij(" ",n.CONSTS.RELEASING_ON," "),t.xp6(2),t.Q6J("form",n.form)("field",n.songReleaseTypeYearField),t.xp6(1),t.Q6J("form",n.form)("field",n.songReleaseTypeDateField),t.xp6(1),t.Q6J("ngIf",n.songReleaseType===n.CONSTS.RELEASE_TYPE_YEAR),t.xp6(1),t.Q6J("ngIf",n.songReleaseType===n.CONSTS.RELEASE_TYPE_DATE)}}function rn(a,m){if(1&a&&(t.TgZ(0,"div",124),t._UZ(1,"app-checkbox",125),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("form",n.form)("field",n.isFreeField)}}const an=function(){return[]};function ln(a,m){if(1&a&&(t.TgZ(0,"div",126)(1,"div",127)(2,"h4"),t._uU(3),t.qZA(),t.TgZ(4,"app-info-icon",128),t.NdJ("click",function(e){return e.stopPropagation()}),t.qZA()(),t._UZ(5,"app-post-price",129),t.qZA()),2&a){const n=t.oxw(2);t.ekj("disabled-section",n.isUploadingAudio),t.xp6(3),t.hij(" ",n.INDIVIDUAL_PRICING_OPTION_TITLE[n.portfolioType]," "),t.xp6(1),t.Q6J("message",n.INDIVIDUAL_PRICING_OPTIONS_HINT[n.portfolioType]),t.xp6(1),t.Q6J("taggedUserList",t.DdM(13,an))("filledData",n.postPriceFilledData)("isSelectorUsed",!0)("isDoubleLockingEnable",!0)("freePreviewOptionsProps",n.freePreviewLock[n.portfolioType])("freePreviewLabel",n.freePreviewDurationLabel)("restrictLabel",n.restrictLabel)("disabledSubscriptionPlanIds",n.disabledSubscriptionPlanIds)("alwaysShowFreePreview",n.isAlbumLocked)}}function cn(a,m){if(1&a&&(t.TgZ(0,"div",130),t._UZ(1,"app-checkbox",125),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("form",n.form)("field",n.requireAuthenticationCheckboxField)}}function dn(a,m){if(1&a&&(t.TgZ(0,"div",130),t._UZ(1,"app-checkbox",125),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("form",n.form)("field",n.downloadCheckboxField)}}function pn(a,m){if(1&a&&(t.TgZ(0,"div",130),t._UZ(1,"app-checkbox",125),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("form",n.form)("field",n.postPreviewCheckboxField)}}const un=function(a){return{type:"button",class:"btn btn-default",label:a}},gn=function(a,m,n){return{type:"button",class:"btn btn-primary",label:a,disabled:m,loading:n}};function mn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",131)(1,"app-button",94),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.handleCancel())}),t.qZA(),t.TgZ(2,"app-button",94),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.handleAddSong())}),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("btnField",t.VKq(2,un,n.CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.kEZ(4,gn,n.editingSongIndex>=n.Application.ZERO?n.isPodcastType()?n.CONSTS.UPDATE_PODCAST_EPISODE:n.CONSTS.UPDATE_SONG:n.isPodcastType()?n.CONSTS.ADD_PODCAST_EPISODE:n.CONSTS.ADD_SONG,!n.isFormValid,n.isUploadingAudio)
1)}}const _n=function(a){return{uploading:a}};function hn(a,m){if(1&a&&(t.TgZ(0,"div",65)(1,"form",66),t.YNc(2,en,12,18,"div",67),t.YNc(3,sn,9,7,"div",68),t.YNc(4,rn,2,2,"div",69),t.YNc(5,ln,6,14,"div",70),t.YNc(6,cn,2,2,"div",71),t.YNc(7,dn,2,2,"div",71),t.YNc(8,pn,2,2,"div",71),t.qZA(),t.YNc(9,mn,3,8,"div",72),t.qZA()),2&a){const n=t.oxw();t.Q6J("ngClass",t.VKq(10,_n,n.isUploadingAudio)),t.xp6(1),t.Q6J("formGroup",n.form),t.xp6(1),t.Q6J("ngIf",n.nameField),t.xp6(1),t.Q6J("ngIf",!n.isIndividual),t.xp6(1),t.Q6J("ngIf",!n.isIndividual&&n.isAlbumLocked),t.xp6(1),t.Q6J("ngIf",!n.isFreeChecked),t.xp6(1),t.Q6J("ngIf",n.requireAuthenticationCheckboxField&&n.showRequireAuthenticationCheckbox),t.xp6(1),t.Q6J("ngIf",n.downloadCheckboxField),t.xp6(1),t.Q6J("ngIf",n.postPreviewCheckboxField&&(!n.isEditMode&&n.isIndividual||!n.isIndividual&&!(null!=n.editingSong&&n.editingSong.sk))),t.xp6(1),t.Q6J("ngIf",n.showAddSongForm&&!n.isIndividual)}}function fn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-image-cropper",132),t.NdJ("closeCrop",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.cancelCrop(i))})("cropImageUpload",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.imageFeedClicked(i))}),t.qZA()}if(2&a){const n=t.oxw();t.Q6J("imageChangeEvent",n.imageChangedEvent)("isOpen",n.isOpen)("cropperOptions",t.kEZ(4,go,n.CROPPER_MIN_WIDTH,n.CROPPER_MIN_HEIGHT,n.ASPECT_RATIO_NUMERATOR/n.ASPECT_RATIO_DENOMINATOR))("imageWidth",n.imageWidth)}}function Cn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-loyalty-only-warning-modal",133,134),t.NdJ("proceeded",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyProceed())})("canceled",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyWarningCanceled())}),t.qZA()}}const bn=function(a){return{"step-3-container-min-width":a}};let Se=(()=>{const m=class{constructor(e,i,o,s,p,u,_,h,M){this.cs=e,this.uploadService=i,this.cdr=o,this.ngZone=s,this.modalHandlerService=p,this.apiCallService=u,this.modalService=_,this.route=h,this.router=M,this.isEditMode=!1,this.isIndividual=!1,this.showThumbnail=!0,this.isDirectDistributionChecked=!0,this.albumSk="",this.portfolioType=O.W.PORTFOLIO_TYPE.MUSIC,this.currentStepNumber=3,this.totalSteps=3,this.isUploadingAudio=!1,this.itemLockThrough={},this.albumLockThrough={},this.albumFreePreviewTime=0,this.disabledSubscriptionPlanIds=[],this.CONSTS=w,this.Application=l.Mx,this.PORTFOLIO_TYPE_CONSTS=O.W,this.MUSIC_PLAYER_CONST=co.UU,this.PORTFOLIO_BANNER_VIEW_CONSTS=ee.oM,this.MOBILE_BRIDGE_EVENT_SEND=$e.iJ,this.INDIVIDUAL_PRICING_OPTION_TITLE=Y.vI.INDIVIDUAL_PRICING_OPTION_TITLE,this.INDIVIDUAL_PRICING_OPTIONS_HINT=Y.vI.INDIVIDUAL_PRICING_OPTIONS_HINT,this.PORTFOLIO_CONSTS=W.fD,this.commonEnum=ct.i4,this.PORTFOLIO_CONSTS_CONST=at.fD,this.PORTFOLIO_TYPE_ICON_MAP=ee.WT,this.pendingLoyaltyOnlySubmit=null,this.CROPPER_MIN_WIDTH=Number(l.Mx.FOUR_HUNDRED),this.CROPPER_MIN_HEIGHT=Number(l.Mx.FOUR_HUNDRED),this.ASPECT_RATIO_NUMERATOR=l.Mx.ONE,this.ASPECT_RATIO_DENOMINATOR=l.Mx.ONE,this.STROKE_WIDTH=l.Mx.THREE,this.ANIMATION_DURATION=Number(l.Mx.THREE_HUNDRED),this.BACKGROUND_PADDING=l.Mx.ZERO,this.TITLE_FONT_SIZE=Number(l.Mx.TEN),this.SPACE=l.Mx.MINUS_ONE*l.Mx.THREE,this.Z_INDEX=Number(l.Mx.TEN),this.SKELETON_ITEMS=[Number(l.Mx.ONE),Number(l.Mx.TWO),Number(l.Mx.THREE)],this.AUTO_SCROLL_STEP=Number(l.Mx.THIRTY_FIVE),this.CIRCLE_RADIUS=Number(l.Mx.TWENTY_THREE),this.audioSelected=!1,this.audioFileName="",this.audiosForUploading=[],this.thumbnailPreview="",this.imageChangedEvent="",this.croppedImage="",this.isOpen=!1,this.imageWidth=l.Mx.ZERO,this.feedPreviewOrientation=W.ox.PORTRAIT,this.actualFeedPreviewOrientation=W.ox.PORTRAIT,this.showProgress=!1,this.percent=l.Mx.ZERO,this.restrictedImages=[],this.songReleaseType=null,this.yearOptions=[],this.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,international_prices:[]},this.freePreviewLock=w.FREE_PREVIEW_LOCK,this.selectedItemDelete=null,this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.addedSongs=[],this.showAddSongForm=!1,this.editingSong=null,this.editingSongIndex=l.Mx.MINUS_ONE,this.isDragging=!1,this.timestamp=null,this.enable=!0,this.songEditFromQueryHandled=!1,this.songAddFromQueryHandled=!1,this.destroy$=new X.x,this.requireAuthVisibilitySubscribed=!1}ngOnInit(){this.showAddSongForm=!!this.isIndividual&&this.isDirectDistributionChecked,this.yearOptions=ve(),this.portfolioConfig=this.getPortfolioConfig(),this.initForm(),this.initFields(),this.restoreFormData(),this.initializeSongReleaseType(),this.songAddFromQueryHandled=!1,setTimeout(()=>{this.handleSongEditFromQuery()},l.Mx.TEN)}ngAfterViewChecked(){!this.requireAuthVisibilitySubscribed&&this.postPriceComponent&&(this.requireAuthVisibilitySubscribed=!0,this.setupRequireAuthVisibilitySubscription())}ngOnChanges(e){e.isDirectDistributionChecked&&this.isIndividual&&(this.showAddSongForm=this.isDirectDistributionChecked),e.form&&this.form&&(this.portfolioConfig=this.getPortfolioConfig(),this.initForm(),this.initFields(),this.cdr.detectChanges(),this.songEditFromQueryHandled=!1,setTimeout(()=>{this.handleSongEditFromQuery()},l.Mx.TEN))}initFields(){this.nameField=jt(this.portfolioType),this.isPodcastType()&&(this.descriptionField=T),this.requireAuthenticationCheckboxField=x(this.portfolioType),this.downloadCheckboxField=P(this.portfolioType,this.isIndividual),this.postPreviewCheckboxField=S(this.portfolioType,this.isIndividual),this.releaseDateField={type:W.sf.DATE_PICKER,label:"",name:"song_release_date",class:"col-12",placeholder:"Select Release Date"},this.releaseYearField=(a=>({type:W.sf.SELECT,label:"",name:"song_release_year",class:"col-12",placeholder:"Select Year",options:this.yearOptions,labelKey:"label",valueKey:"value"}))(),this.songReleaseTypeYearField={type:W.sf.CHECKBOX,label:"",name:"song_release_type_year",class:"col-auto",options:[{label:w.YEAR_OPTION,value:w.RELEASE_TYPE_YEAR}],labelKey:"label",valueKey:"value"},this.songReleaseTypeDateField={type:W.sf.CHECKBOX,label:"",name:"song_release_type_date",class:"col-auto",options:[{label:w.DATE_OPTION,value:w.RELEASE_TYPE_DATE}],labelKey:"label",valueKey:"value"},this.isFreeField=Re(this.portfolioType)}get albumCoverImage(){return this.form?.get("cover_image")?.value||""}initForm(){this.form||(this.form=new N.cw({}));const e=this.getPortfolioConfig();
1this.form.get(e.nameField)||this.form.addControl(e.nameField,new N.NI("")),this.form.get(e.fileField)||this.form.addControl(e.fileField,new N.NI("")),this.form.get("thumbnail")||this.form.addControl("thumbnail",new N.NI("")),this.isPodcastType()&&!this.isIndividual&&!this.form.get("podcast_episode_description")&&this.form.addControl("podcast_episode_description",new N.NI("")),this.form.get("require_authentication")||this.form.addControl("require_authentication",new N.NI([])),this.form.get("allow_download")||this.form.addControl("allow_download",new N.NI([])),this.form.get("show_as_post")||this.form.addControl("show_as_post",new N.NI([])),!this.isIndividual&&!this.form.get("song_release_date")&&this.form.addControl("song_release_date",new N.NI(null)),!this.isIndividual&&!this.form.get("song_release_year")&&this.form.addControl("song_release_year",new N.NI(null)),!this.isIndividual&&!this.form.get("song_release_type_year")&&this.form.addControl("song_release_type_year",new N.NI([])),!this.isIndividual&&!this.form.get("song_release_type_date")&&this.form.addControl("song_release_type_date",new N.NI([])),this.form.get("is_free")||this.form.addControl("is_free",new N.NI([]))}getPortfolioConfig(){return Zt(this.portfolioType?.toLowerCase()||"",this.isIndividual)}isPodcastType(){return(this.portfolioType||"").toLowerCase()===O.W.PORTFOLIO_TYPE.PODCAST.toLowerCase()}get restrictLabel(){return(0,Ye.hT)(this.portfolioType,this.isIndividual?w.RESTRICT_LABEL_INDIVIDUAL:w.RESTRICT_LABEL)}get directDistributionTitle(){const e=(this.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM;return w.OPTIONAL_DIRECT_DISTRIBUTION[e in w.OPTIONAL_DIRECT_DISTRIBUTION?e:O.W.PORTFOLIO_TYPE.CUSTOM]||w.OPTIONAL_DIRECT_DISTRIBUTION[O.W.PORTFOLIO_TYPE.CUSTOM]}get directSalesInfoMessage(){const e=(this.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM;return w.DIRECT_SALES_INFO_MESSAGE[e in w.DIRECT_SALES_INFO_MESSAGE?e:O.W.PORTFOLIO_TYPE.CUSTOM]||w.DIRECT_SALES_INFO_MESSAGE[O.W.PORTFOLIO_TYPE.CUSTOM]}get freePreviewDurationLabel(){const e=(this.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM;return w.FREE_PREVIEW_DURATION_LABEL[e in w.FREE_PREVIEW_DURATION_LABEL?e:O.W.PORTFOLIO_TYPE.CUSTOM]||w.FREE_PREVIEW_DURATION_LABEL[O.W.PORTFOLIO_TYPE.CUSTOM]}get isAlbumLocked(){return!this.isIndividual&&this.hasLockThroughContent(this.albumLockThrough||{})}get isFreeChecked(){const e=this.form?.get("is_free")?.value;return Array.isArray(e)&&e.includes(!0)}get showRequireAuthenticationCheckbox(){if(!this.isIndividual&&this.isAlbumLocked&&!this.isFreeChecked)return!1;const e=this.getPostPriceData(),i=this.buildLockThrough(e);return!this.hasLockThroughContent(i)}setupRequireAuthVisibilitySubscription(){const e=[],i=this.form?.get("is_free");i&&e.push(i.valueChanges),this.postPriceComponent?.postPriceForm&&e.push(this.postPriceComponent.postPriceForm.valueChanges),this.postPriceComponent?.ppForm&&e.push(this.postPriceComponent.ppForm.valueChanges),this.postPriceComponent?.nftForm&&e.push(this.postPriceComponent.nftForm.valueChanges),0!==e.length&&(0,ao.T)(...e).pipe((0,J.R)(this.destroy$)).subscribe(()=>{if(this.cdr.markForCheck(),!this.showRequireAuthenticationCheckbox){const o=this.form?.get("require_authentication");if(o){const s=o.value;Array.isArray(s)&&s.includes(!0)&&this.form?.patchValue({require_authentication:[]})}}})}get isStep3Valid(){return this.isIndividual?!this.isDirectDistributionChecked||!this.showAddSongForm&&this.isFormValid:!(!this.addedSongs||this.addedSongs.length===l.Mx.ZERO||this.showAddSongForm)}restoreFormData(){const e=this.form?.get(this.portfolioConfig?.fileField||"song_file")?.value;e&&"string"==typeof e&&(this.audioSelected=!0,this.audioPreview=e,this.audioFileName=O.W.AUDIO_FILE,this.timestamp=(0,Q.e4)(e));const i=this.form?.get("items")?.value;i&&Array.isArray(i)&&i.length>l.Mx.ZERO&&(this.addedSongs=i.map(_=>({..._,status:_.status||O.W.PORTFOLIO_STATUS.ACTIVE})));const o=this.form?.get("thumbnail")?.value;o&&"string"==typeof o&&(this.thumbnailPreview=o);const s=this.form?.get("allow_download")?.value;null==s&&this.form?.get("allow_download")?.setValue([]);const p=this.form?.get("show_as_post")?.value;null==p&&this.form?.get("show_as_post")?.setValue([]);const u=this.form?.get("require_authentication")?.value;null==u&&this.form?.get("require_authentication")?.setValue([])}
1initializeSongReleaseType(){if(!this.form||this.isIndividual)return;const e=this.form.get("song_release_year")?.value,i=this.form.get("song_release_date")?.value;null!=e&&""!==e?(this.songReleaseType=w.RELEASE_TYPE_YEAR,this.form.patchValue({song_release_type_year:[w.RELEASE_TYPE_YEAR],song_release_type_date:[]},{emitEvent:!1})):null!=i&&""!==i?(this.songReleaseType=w.RELEASE_TYPE_DATE,this.form.patchValue({song_release_type_year:[],song_release_type_date:[w.RELEASE_TYPE_DATE]},{emitEvent:!1})):(this.songReleaseType=null,this.form.patchValue({song_release_type_year:[],song_release_type_date:[]},{emitEvent:!1}))}onSongReleaseTypeChange(e){if(this.form&&!this.isIndividual)if(this.songReleaseType===e)this.songReleaseType=null,this.form.patchValue({song_release_date:null,song_release_year:null,song_release_type_year:[],song_release_type_date:[]});else{this.songReleaseType=e;const i=(new Date).getFullYear().toString();this.form.patchValue(e===w.RELEASE_TYPE_YEAR?{song_release_date:null,song_release_year:i,song_release_type_year:[w.RELEASE_TYPE_YEAR],song_release_type_date:[]}:{song_release_year:null,song_release_date:new Date,song_release_type_year:[],song_release_type_date:[w.RELEASE_TYPE_DATE]})}}onSongReleaseTypeYearChange(){this.onSongReleaseTypeChange(w.RELEASE_TYPE_YEAR)}onSongReleaseTypeDateChange(){this.onSongReleaseTypeChange(w.RELEASE_TYPE_DATE)}get thumbnailFieldConfig(){return this.isPodcastType()?{fileLabel:w.PODCAST_EPISODE_COVER_IMAGE,uploadLabel:w.UPLOAD_IMAGE,fileTypes:w.IMAGE_FILE_TYPES,acceptTypes:l.Mx.IMAGE_ACCEPT_TYPES_INCLUDING_GIF,requiredMessage:w.PODCAST_EPISODE_COVER_IMAGE_REQUIRED}:{fileLabel:w.SONG_COVER_IMAGE,uploadLabel:w.UPLOAD_IMAGE,fileTypes:w.IMAGE_FILE_TYPES,acceptTypes:l.Mx.IMAGE_ACCEPT_TYPES_INCLUDING_GIF,requiredMessage:w.SONG_COVER_IMAGE_REQUIRED}}fileChangeEvent(e,i){this.showProgress||!e?.target?.files?.[0]||i===w.THUMBNAIL&&this.handleImageUpload(e)}handleImageUpload(e){this.cs.handleFileChangeEvent(e,{maxSize:W.eG,minWidth:Number(l.Mx.EIGHTY),minHeight:Number(l.Mx.EIGHTY),isValidFile:i=>Boolean(this.cs.isValidFile(i)),uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,maxSizeMessage:w.IMAGE_FILE_SIZE_MESSAGE,recommendedSize:Kt}).then(i=>{this.ngZone.run(()=>{this.cdr.detectChanges(),this.imageWidth=i.imageWidth,i.isGif?(this.imageChangedEvent=i.event,this.setBannerOrientation(i.imageWidth>i.imageHeight),this.imageFeedClicked(null,!1,!0)):(this.isOpen=!0,this.cs.setBodyClass(!1),this.imageChangedEvent=i.event,this.setBannerOrientation(i.imageWidth>i.imageHeight))})}).catch(i=>{this.cs.showErrorMessage(i.message)})}imageFeedClicked(e,i=!1,o=!1){this.isOpen=!1,this.cs.setBodyClass(!0),this.showProgress=!0,this.percent=l.Mx.ZERO,this.restrictedImages=[],this.cdr.detectChanges();const s=this.imageChangedEvent?.target?.files?.[l.Mx.ZERO],p=o||s&&s.type===l.Mx.IMAGE_GIF_TYPE;this.cs.handleImageFeedClicked({croppedImage:e||this.croppedImage,imageChangedEvent:this.imageChangedEvent,base64ToFile:$t.Ll,isValidFile:u=>Boolean(this.cs.isValidFile(u)),uploadService:this.uploadService,apiUrl:U.Y9.uploadFile,folder:l.D4.createPostImageFolder,fileType:s?.type,uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,isMobileApp:i,mobileFileData:e,isGif:p,onProgress:u=>{this.ngZone.run(()=>{this.percent=u,this.cdr.detectChanges()})}}).then(({preview:u,url:_})=>{this.ngZone.run(()=>{this.percent=l.Mx.ONE_HUNDRED,this.cdr.detectChanges(),setTimeout(()=>{this.showProgress=!1,this.percent=l.Mx.ZERO,this.actualFeedPreviewOrientation=this.feedPreviewOrientation,this.thumbnailPreview=u,this.form.patchValue({thumbnail:_}),this.cdr.detectChanges()},l.Mx.THREE_HUNDRED)})}).catch(u=>{if(this.showProgress=!1,this.percent=l.Mx.ZERO,this.cdr.detectChanges(),u?.restricted&&u?.restrictedImage)return this.restrictedImages=[u.restrictedImage],this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages),void this.removeThumbnail();u?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(u.message||nt.Vm.SOMETHING_WENT_WRONG),this.removeThumbn
1ail()})}removeThumbnail(){this.form.get("thumbnail")?.reset(),this.thumbnailPreview="",this.showProgress=!1,this.percent=l.Mx.ZERO}setBannerOrientation(e){this.feedPreviewOrientation=e?W.ox.LANDSCAPE:W.ox.PORTRAIT}cancelCrop(){this.isOpen=!1,this.cs.setBodyClass(!0)}uploadAudioFile(e){const i=e?.target?.files?.[l.Mx.ZERO];if(i)if(this.cs.isValidAudioVideo(i,"audio"))if(i.size<=l.Mx.AUDIO_FILE_SIZE_LIMIT_5GB){this.audioSelected=!0;const o=e.target?.files?.[l.Mx.ZERO];if(!o)return;const s=new FileReader;s.onload=()=>{s.result&&(this.audioPreview=s.result)},s.readAsDataURL(o),this.audioFileName=o.name;const p=o.name?.split(".").pop()||"mp3",u=this.timestamp||Date.now(),_=`portfolio_${u}_${(0,Q.D1)()}_${(0,Q.D1)()}.${p}`;this.form.patchValue({[this.portfolioConfig?.fileField||"song_file"]:lo.N.s3Config.bucketUrl+l.D4.portfolioContentFolder+_});const h={file:o,fileName:_,folder:l.D4.portfolioContentFolder,metadata:{user_id:this.userProfile?.gsi4pk||"",content_type:O.W.PORTFOLIO_TYPE.MUSIC.toLowerCase(),media_id:u.toString(),free_preview_time:l.Mx.ZERO.toString(),preview_required:"false"}};this.audiosForUploading.push(h)}else this.removeAudioFile(),this.cs.showErrorMessage(w.AUDIO_FILE_SIZE_MESSAGE);else this.removeAudioFile(),this.cs.showErrorMessage(nt.Vm.INVALID_FILE_TYPE)}mobileAudioFileChangeEvent(e){if(e&&e.length>l.Mx.ZERO){const i=e[l.Mx.ZERO];i&&this.uploadAudioFile({target:{files:[i]}})}}removeAudioFile(){this.form.get(this.portfolioConfig?.fileField||"song_file")?.reset(),this.audiosForUploading=[],this.audioSelected=!1,this.audioPreview="",this.audioFileName=""}get isFormValid(){try{if(this.isIndividual&&!this.isDirectDistributionChecked)return!0;if(!this.form)return!1;if(!this.isIndividual){const o=this.form.get(this.portfolioConfig?.nameField||"song_name");if(!o?.value||!o.value.trim())return!1}return!!this.form.get(this.portfolioConfig?.fileField||"song_file")?.value&&this.validatePostPrice().isValid}catch(e){return console.error("Error in isFormValid:",e),!1}}handleCancel(){const e=null!==this.editingSong&&this.editingSongIndex>=l.Mx.ZERO;e&&(this.editingSong=null,this.editingSongIndex=l.Mx.MINUS_ONE),this.resetForm(!e),this.showAddSongForm=!1,this.cdr.detectChanges()}toggleAddSongForm(){this.showAddSongForm=!this.showAddSongForm,this.showAddSongForm?(this.editingSong=null,this.editingSongIndex=l.Mx.MINUS_ONE,this.resetForm()):(null!==this.editingSong&&this.editingSongIndex>=l.Mx.ZERO&&(this.editingSong=null,this.editingSongIndex=l.Mx.MINUS_ONE),this.resetForm())}hasLockThroughContent(e){return!(!e||"object"!=typeof e||!(e.individual?.individual_price&&""!==e.individual.individual_price.trim()||e.subscription&&Array.isArray(e.subscription)&&e.subscription.length>l.Mx.ZERO||e.nft&&Array.isArray(e.nft)&&e.nft.length>l.Mx.ZERO||e.individual?.outer_subscription&&e.individual.outer_subscription.length>l.Mx.ZERO||e.individual?.outer_nft&&e.individual.outer_nft.length>l.Mx.ZERO))}shouldShowLoyaltyOnlyWarningForItemLock(e){return!(!(0,ht.Ix)((0,ht.si)(e))||!this.isIndividual&&Array.isArray(this.disabledSubscriptionPlanIds)&&this.disabledSubscriptionPlanIds.length>l.Mx.ZERO)}resetForm(e=!0){const i=this.getPortfolioConfig();this.form.get(i.nameField)&&this.form.get(i.nameField)?.reset(),this.form.get(i.fileField)&&this.form.get(i.fileField)?.reset(),this.form.get("thumbnail")&&this.form.get("thumbnail")?.reset(),this.isPodcastType()&&!this.isIndividual&&this.form.get("podcast_episode_description")&&this.form.get("podcast_episode_description")?.reset(),this.form.get("require_authentication")&&this.form.get("require_authentication")?.setValue([]),this.form.get("allow_download")&&this.form.get("allow_download")?.setValue([]),this.form.get("show_as_post")&&this.form.get("show_as_post")?.setValue([]),this.form.get("is_free")&&this.form.get("is_free")?.setValue([]),!this.isIndividual&&this.form.get("song_release_date")&&e&&this.editingSongIndex<l.Mx.ZERO&&this.form.get("song_release_date")?.setValue(null),!this.isIndividual&&e&&(this.songReleaseType=null,this.form.get("song_release_year")&&this.form.get("song_release_year")?.setValue(null),this.form.get("song_release_type_year")&&this.form.get("song_release_type_year")?.setValue([]),this.form.get("song_release_type_date")&&this.form.get("song_release_type_date")?.setValue([])),this.audioSelected=!1,this.audioPreview="",this.audioFileName="",this.audiosForUploading=[],this.thumbnailPreview="",this.showProgress=!1,this.percent=l.Mx.ZERO,this.timestamp=null,this.editingSong=null,this.editingSongIndex=l.Mx.MINUS_ONE,this.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]},this.postPriceComponent&&(this.postPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.postPriceComponent.addedNFTIds=[],this.postPriceComponent.postPriceForm&&this.postPriceComponent.postPriceForm.reset({free_preview:l.Mx.ZERO,preview_image:"",description:"",archive_post:"",is_comment_enable:"",accept_tip_on_livestream:"",hashTagList:[]}),this.postPriceComponent.ppForm&&this.postPriceComponent.ppForm.reset(),this.postPriceComponent.loyaltyPointsForm&&this.postPriceComponent.loyaltyPointsForm.reset(),this.postPriceComponent.subPlanList&&this.postPriceComponent.subPlanList.forEach(o=>{o.isSelected=!1}))}validatePostPrice(){if(!this.postPriceComponent)return{isValid:!0};const e=this.postPriceComponent.postPriceObj;if(!e)return{isValid:!0};const i=this.postPriceComponent.ppForm,o=this.postPriceComponent.postPriceForm,s=this.postPriceComponent.addedNFTIds||[];if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft))return{isValid:!0};if(e.is_loyalty_points){const p=this.postPriceComponent.loyaltyPointsForm,u=(0,ht.pL)(p?.get("loyalty_points")?.value);if(!p||p.invalid||null==u)return{isValid:!1,errorMessage:je.YJ.RANGE_HINT}}if(e.is_ind_purchase){if(!i||!Number(i.controls.indPrice?.value))return{isValid:!1,errorMessage:w.ENTER_VALID_INDIVIDUAL_PRICE};if(i.controls.userList?.value?.length&&i.controls.userList.value.reduce((u,_)=>u+(Number(_.revenueSplit)||l.Mx.ZERO),l.Mx.ZERO)>l.Mx.ONE_HUNDRED)return{isValid:!1,errorMessage:w.REVENUE_SPLIT_EXCEEDS_100}}return e.is_lock_with_nft&&!s.length?{isValid:!1,errorMessage:W.ET.P
1LEASE_ADD_NFT_OPTION}:this.postPriceFilledData?.isActiveLiveStream&&o?.invalid?{isValid:!1,errorMessage:w.FILL_ALL_REQUIRED_FIELDS}:{isValid:!0}}handleAddSong(){if(this.isUploadingAudio)return;if(!this.form)return void this.cs.showErrorMessage(w.FORM_NOT_INITIALIZED);const e=this.form.get(this.portfolioConfig?.nameField||"song_name"),i=this.form.get(this.portfolioConfig?.fileField||"song_file");Object.keys(this.form.controls).forEach(_=>{const h=this.form.get(_);h&&h.markAsTouched()});const o=e?.value;if(!o||"string"==typeof o&&!o.trim()){const _=this.isPodcastType()?w.PODCAST_EPISODE_NAME_REQUIRED:w.SONG_NAME_REQUIRED;return void this.cs.showErrorMessage(_)}if(!i?.value){const _=this.isPodcastType()?w.PODCAST_EPISODE_FILE_REQUIRED:w.SONG_FILE_REQUIRED;return void this.cs.showErrorMessage(_)}const s=this.validatePostPrice();if(!s.isValid)return void this.cs.showErrorMessage(s.errorMessage||w.FIX_PRICING_OPTIONS);const p=this.getPostPriceData(),u=this.buildLockThrough(p);if(this.albumSk&&this.shouldShowLoyaltyOnlyWarningForItemLock(u))return this.pendingLoyaltyOnlySubmit=()=>this.uploadAudioFiles(!0),void this.loyaltyOnlyWarningModal?.openModal();this.uploadAudioFiles()}handleSaveIndividualSong(){this.handleAddSong()}uploadAudioFiles(e=!1){if(this.audiosForUploading.length===l.Mx.ZERO)return this.isUploadingAudio=!0,void this.addSongToArray(e);this.isUploadingAudio=!0,this.form&&Object.keys(this.form.controls).forEach(u=>{const _=this.form.get(u);_&&_.disable()}),this.postPriceComponent&&(this.postPriceComponent.postPriceForm&&Object.keys(this.postPriceComponent.postPriceForm.controls).forEach(u=>{const _=this.postPriceComponent.postPriceForm.get(u);_&&_.disable()}),this.postPriceComponent.ppForm&&Object.keys(this.postPriceComponent.ppForm.controls).forEach(u=>{const _=this.postPriceComponent.ppForm.get(u);_&&_.disable()}),this.postPriceComponent.nftForm&&Object.keys(this.postPriceComponent.nftForm.controls).forEach(u=>{const _=this.postPriceComponent.nftForm.get(u);_&&_.disable()})),this.cdr.detectChanges();const i=this.getPostPriceData(),o=i?.form?.free_preview?Number(i.form.free_preview):l.Mx.ZERO,s=o>l.Mx.ZERO,p=this.audiosForUploading.map(u=>(u.metadata&&(u.metadata.free_preview_time=o.toString(),u.metadata.preview_required=s.toString()),this.uploadService.uploadFile(u)));Promise.all(p).then(()=>{this.ngZone.run(()=>{this.form&&Object.keys(this.form.controls).forEach(u=>{const _=this.form.get(u);_&&_.enable()}),this.postPriceComponent&&(this.postPriceComponent.postPriceForm&&Object.keys(this.postPriceComponent.postPriceForm.controls).forEach(u=>{const _=this.postPriceComponent.postPriceForm.get(u);_&&_.enable()}),this.postPriceComponent.ppForm&&Object.keys(this.postPriceComponent.ppForm.controls).forEach(u=>{const _=this.postPriceComponent.ppForm.get(u);_&&_.enable()}),this.postPriceComponent.nftForm&&Object.keys(this.postPriceComponent.nftForm.controls).forEach(u=>{const _=this.postPriceComponent.nftForm.get(u);_&&_.enable()})),this.addSongToArray(e)})}).catch(u=>{this.ngZone.run(()=>{this.form&&Object.keys(this.form.controls).forEach(_=>{const h=this.form.get(_);h&&h.enable()}),this.postPriceComponent&&(this.postPriceComponent.postPriceForm&&Object.keys(this.postPriceComponent.postPriceForm.controls).forEach(_=>{const h=this.postPriceComponent.postPriceForm.get(_);h&&h.enable()}),this.postPriceComponent.ppForm&&Object.keys(this.postPriceComponent.ppForm.controls).forEach(_=>{const h=this.postPriceComponent.ppForm.get(_);h&&h.enable()}),this.postPriceComponent.nftForm&&Object.keys(this.postPriceComponent.nftForm.controls).forEach(_=>{const h=this.postPriceComponent.nftForm.get(_);h&&h.enable()})),this.cdr.detectChanges(),this.cs.showErrorMessage(u?.message||nt.Vm.SOMETHING_WENT_WRONG)})})}getPostPriceData(){if(!this.postPriceComponent)return null;const e=this.postPriceComponent.postPriceObj,i=this.postPriceComponent.ppForm,o=this.postPriceComponent.postPriceForm,s=this.postPriceComponent.subPlanList||[],p=this.postPriceComponent.addedNFTIds||[];if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft)&&(this.isIndividual||!this.isAlbumLocked))return null;const M={is_subscription:e.is_subscription||!1,is_indivudiual_price:e.is_ind_purchase||!1,is_nft_added:e.is_lock_with_nft||!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.postPriceComponent.currencyConversionData?.adjustedPrices||[]};if(e.is_ind_purchase&&i&&(M.indivisualPrice=i.controls.indPrice?.value||""),e.is_loyalty_points){const I=this.postPriceComponent.loyaltyPointsForm?.get("loyalty_points")?.value,A=Number(I);M.loyalty_points=Number.isFinite(A)&&A>0?A:null}if(e.is_subscription&&s.length>
1l.Mx.ZERO&&s.forEach(I=>{I.isSelected&&M.subscriptions.push({sk:I.sk,pk:I.pk,title:I.name,duration:I.duration,amount:I.price,discount_offer:I.discount_offer})}),e.is_lock_with_nft&&(M.nftIDList=[...p]),o){let I=[];try{I=this.postPriceComponent.getSelectedHashTag()}catch{I=[]}const A=o.value||{};if(null==A.free_preview){const E=o.get("free_preview");A.free_preview=null!=E?.value?E.value:l.Mx.ZERO}if(M.form=A,M.tags=I,this.postPriceComponent.isDoubleLockingEnable&&o.get("lock")?.value?.lockValue){const E=o.get("lock")?.value?.lockValue;M.outer_subscription=E?.subscription||[],M.outer_nft=E?.NFT||[]}}return M}createSongData(e){const i=this.editingSong?.id||Date.now(),o=this.editingSong?.durationInSeconds||l.Mx.ZERO;let s="";s=this.isIndividual?this.editingSong?.song_name||"":this.form.get(this.portfolioConfig?.nameField||"song_name")?.value||"";const p=this.form.get("allow_download")?.value||[],u=Array.isArray(p)&&p.length>l.Mx.ZERO&&p.includes(!0),_=this.form.get("show_as_post")?.value||[],h=Array.isArray(_)&&_.length>l.Mx.ZERO&&_.includes(!0),M=this.form.get("require_authentication")?.value||[],I=Array.isArray(M)&&M.length>l.Mx.ZERO&&M.includes(!0),A=this.form.get("is_free")?.value||[],E=Array.isArray(A)&&A.includes(!0);let q=null;if(!this.isIndividual)if(this.songReleaseType===w.RELEASE_TYPE_YEAR){const et=this.form.get("song_release_year")?.value;q=et?et.toString():null}else if(this.songReleaseType===w.RELEASE_TYPE_DATE){const et=this.form.get("song_release_date")?.value;q=(0,Q.YF)(et)}const z={id:i,song_name:s,song_file:this.form.get(this.portfolioConfig?.fileField||"song_file")?.value,thumbnail:this.form.get("thumbnail")?.value||"",audiosForUploading:[],postPriceData:e,audioFileName:this.audioFileName,thumbnailPreview:this.thumbnailPreview,durationInSeconds:o,sk:this.editingSong?.sk||"",pk:this.editingSong?.pk||"",require_authentication:I,allow_download:u,show_as_post:h,is_free:E,release_date:null!==q?q:void 0,created_at:this.editingSong?.created_at||void 0,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE};return this.isPodcastType()&&!this.isIndividual&&(z.description=this.form.get("podcast_episode_description")?.value||""),z}calculateAndSaveDuration(e,i,o,s=!1){const p=e.id,u=h=>{e.durationInSeconds=h;const M=this.addedSongs.findIndex(I=>I.id===p);M!==l.Mx.MINUS_ONE?(this.addedSongs[M].durationInSeconds=h,this.addedSongs[M].status=e.status||O.W.PORTFOLIO_STATUS.ACTIVE,this.cdr.detectChanges()):this.albumSk||(this.addedSongs.push({...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE}),this.syncSongsToForm(),this.cdr.detectChanges()),this.albumSk&&this.saveIndividualContentToAlbum(e,i,s)},_=new Audio;_.src=o,_.addEventListener("loadedmetadata",()=>{const h=Math.ceil(_.duration);u(h)}),_.addEventListener("error",()=>{if(this.audiosForUploading.length>l.Mx.ZERO&&this.audiosForUploading[l.Mx.ZERO].file){const h=URL.createObjectURL(this.audiosForUploading[l.Mx.ZERO].file),M=new Audio;M.src=h,M.addEventListener("loadedmetadata",()=>{const I=Math.ceil(M.duration);URL.revokeObjectURL(h),u(I)}),M.addEventListener("error",()=>{URL.revokeObjectURL(h),this.albumSk&&this.saveIndividualContentToAlbum(e,i,s)})}else this.albumSk&&this.saveIndividualContentToAlbum(e,i,s)})}handleNewSong(e,i,o=!1){const s=e.song_file;s&&this.albumSk&&this.calculateAndSaveDuration(e,i,s,o)}handleEditSong(e,i,o=!1){const s=e.song_file;if(!s||this.editingSong.durationInSeconds&&this.editingSong.durationInSeconds!==l.Mx.ZERO&&s===this.editingSong.song_file)if(this.albumSk)this.saveIndividualContentToAlbum(e,i,o);else{if(this.editingSongIndex>=l.Mx.ZERO&&this.editingSongIndex<this.addedSongs.length){const _={...this.addedSongs[this.editingSongIndex],...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedSongs[this.editingSongIndex]=_,this.syncSongsToForm(),this.cdr.detectChanges()}this.editingSong=null,this.editingSongIndex=l.Mx.MINUS_ONE}else this.calculateAndSaveDuration(e,i,s,o)}toggleChanged(e){this.enable=e}addSongToArray(e=!1){this.isIndividual&&(this.addedSongs=[]);const i=this.getPostPriceData(),o=this.createSongData(i);null!==this.editingSong&&this.editingSongIndex>=l.Mx.ZERO?this.handleEditSong(o,i,e):this.handleNewSong(o,i,e),this.audiosForUploading=[],this.cdr.detectChanges()}buildLockThrough(e){if(!e)return{individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};const i=e?.loyalty_points;return{individual:{outer_subscription:e.outer_subscription||[],outer_nft:e.outer_nft||[],individual_price:e.indivisualPrice||"",...i&&{loyalty_points:Number(i)}},subscription:e.subscriptions||[],nft:e.nftIDList||[]}}saveIndividualContentToAlbum(e,i,o=!1){if(this.albumSk&&e)if(e.sk&&e.pk)this.updateSong(e,i,o);
1else{const s=this.buildLockThrough(i),p=e.song_file||"",u=e.durationInSeconds||l.Mx.ZERO,_=this.timestamp||(0,Q.e4)(p)||Date.now(),h=i?.form?.free_preview?Number(i.form.free_preview):l.Mx.ZERO,M={type:this.portfolioType.toUpperCase(),album_sk:this.albumSk,title:e.song_name||"",file:p,cover_image_url:e.thumbnail||this.albumCoverImage||"",duration:u,lock_through:s,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,free_preview_time:h,media_id:_.toString(),require_authentication:void 0!==e.require_authentication&&e.require_authentication,allow_download:void 0===e.allow_download||e.allow_download,is_free:void 0!==e.is_free&&e.is_free,show_as_post:void 0===e.show_as_post||e.show_as_post,release_date:e.release_date||null,international_prices:i?.international_prices||[]};if(this.isPodcastType()&&!this.isIndividual&&void 0!==e.description&&(M.description=e.description||""),!o&&this.shouldShowLoyaltyOnlyWarningForItemLock(M.lock_through))return this.pendingLoyaltyOnlySubmit=()=>this.saveIndividualContentToAlbum(e,i,!0),void this.loyaltyOnlyWarningModal?.openModal();this.apiCallService.post(U.Y9.portfolioContentAlbum,M,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:I=>{if(I.status&&I.data){if(e.id){const E=this.addedSongs.findIndex(q=>q.id===e.id);if(E!==l.Mx.MINUS_ONE)this.addedSongs[E].sk=I.data.sk||"",this.addedSongs[E].pk=I.data.pk||"",this.addedSongs[E].status=e.status||I.data.status||O.W.PORTFOLIO_STATUS.ACTIVE,this.syncSongsToForm();else{const q={...e,sk:I.data.sk||"",pk:I.data.pk||"",status:e.status||I.data.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedSongs.push(q),this.syncSongsToForm()}}this.isIndividual||(this.resetForm(),this.isUploadingAudio=!1,this.showAddSongForm=!1);const A=this.isPodcastType()?I.message||this.CONSTS.PODCAST_EPISODE_SAVED_SUCCESS:I.message||this.CONSTS.SONG_SAVED_SUCCESS;this.cs.showSuccessMessage(A)}else this.isUploadingAudio=!1,this.cs.showErrorMessage(I.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:I=>{this.isUploadingAudio=!1,this.cs.showErrorMessage(I?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}}updateSong(e,i,o=!1){if(!e.sk||!e.pk)return;const s=this.buildLockThrough(i),p=e.song_file||"",u=e.durationInSeconds||l.Mx.ZERO,_=this.timestamp||(0,Q.e4)(p)||Date.now(),h=i?.form?.free_preview?Number(i.form.free_preview):l.Mx.ZERO,M={type:this.portfolioType.toUpperCase(),pk:e.pk,sk:e.sk,title:e.song_name||"",file:p,cover_image_url:e.thumbnail||this.albumCoverImage||"",duration:u,lock_through:s,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,free_preview_time:h,media_id:_.toString(),require_authentication:void 0!==e.require_authentication&&e.require_authentication,allow_download:void 0!==e.allow_download&&e.allow_download,show_as_post:void 0!==e.show_as_post&&e.show_as_post,is_free:void 0!==e.is_free&&e.is_free,release_date:e.release_date||null,international_prices:i?.international_prices||[]};if(this.isPodcastType()&&!this.isIndividual&&void 0!==e.description&&(M.description=e.description||""),!o&&this.shouldShowLoyaltyOnlyWarningForItemLock(M.lock_through))return this.pendingLoyaltyOnlySubmit=()=>this.updateSong(e,i,!0),void this.loyaltyOnlyWarningModal?.openModal();this.apiCallService.put(U.Y9.portfolioContent,M,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:I=>{if(I.status&&I.data){if(e.id&&this.addedSongs.length>l.Mx.ZERO){const E=this.addedSongs.findIndex(q=>q.id===e.id);E!==l.Mx.MINUS_ONE&&(this.addedSongs[E].sk=I.data.sk||e.sk,this.addedSongs[E].pk=I.data.pk||e.pk,this.addedSongs[E].status=e.status||I.data.status||O.W.PORTFOLIO_STATUS.ACTIVE,this.syncSongsToForm())}const A=this.isPodcastType()?I.message||this.CONSTS.PODCAST_EPISODE_UPDATED_SUCCESS:I.message||"Song updated successfully";this.cs.showSuccessMessage(A),this.isIndividual||(this.resetForm(),this.isUploadingAudio=!1,this.showAddSongForm=!1)}else if(I.status){const A=this.isPodcastType()?I.message||this.CONSTS.PODCAST_EPISODE_UPDATED_SUCCESS:I.message||"Song updated successfully";this.cs.showSuccessMessage(A),this.isIndividual||(this.resetForm(),this.isUploadingAudio=!1,this.showAddSongForm=!1);const E=this.addedSongs.findIndex(z=>z.sk===e.sk),q={...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedSongs.splice(E,l.Mx.ONE,q),this.syncSongsToForm()}else this.isUploadingAudio=!1,this.cs.showErrorMessage(I.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:I=>{this.isUploadingAudio=!1,this.cs.showErrorMessage(I?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}handleLoyaltyOnlyProceed(){const e=this.pendingLoyaltyOnlySubmit;this.pendingLoyaltyOnlySubmit=null,e?.()}handleLoyaltyOnlyWarningCanceled(){this.pendingLoyaltyOnlySubmit=null,this.isUploadingAudio=!1}removeSong(e){const i=this.addedSongs[e];this.selectedItemDeleteIndex=e,this.selectedItemDelete=i,this.deleteItemModal?.openModal()}
1deleteOpenedSong(){this.selectedItemDeleteIndex=this.editingSongIndex,this.selectedItemDelete=this.editingSong,this.deleteItemModal?.openModal()}deleteItem(){const e=this.selectedItemDeleteIndex;this.deleteSong(this.selectedItemDelete?.sk,e,this.editingSongIndex===e)}deleteSong(e,i,o=!1){if(e){const s=`${U.Y9.portfolioContent}/${encodeURIComponent(e)}?type=${this.portfolioType.toUpperCase()}`;this.apiCallService.delete(s,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:p=>{o&&this.handleCancel(),p.status?(this.addedSongs.splice(i,l.Mx.ONE),this.syncSongsToForm(),this.cdr.detectChanges(),this.cs.showSuccessMessage(p.message||nt.Vm.SOMETHING_WENT_WRONG)):this.cs.showErrorMessage(p.message||this.CONSTS.FAILED_TO_SAVE_CONTENT),this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.selectedItemDelete=null},error:p=>{this.cs.showErrorMessage(p?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}else o&&this.handleCancel(),this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.selectedItemDelete=null,this.addedSongs.splice(i,l.Mx.ONE),this.syncSongsToForm(),this.cdr.detectChanges()}get deleteAlbumMessage(){if(this.selectedItemDelete)return this.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_MESSAGE[this.portfolioType].replace("{{title}}",this.selectedItemDelete?.song_name||"")}onCancelDeleteItem(){this.deleteItemModal&&(this.deleteItemModal.closeModal(),this.selectedItemDelete=null)}drop(e){if((0,Pt.bA)(this.addedSongs,e.previousIndex,e.currentIndex),e.previousIndex!=e.currentIndex){this.addedSongs.forEach((o,s)=>{o.sequence_number=s+l.Mx.ONE});const i=this.addedSongs.filter(o=>o.pk&&o.sk).map(o=>({pk:o.pk,sk:o.sk,sequence_number:o.sequence_number||this.addedSongs.indexOf(o)+l.Mx.ONE}));i.length&&this.apiCallService.put(U.Y9.portfolioSequenceNumber,{data:i},!1).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{this.cs.showSuccessMessage(o.message)},error:o=>{this.cs.showErrorMessage(o.message)}})}}trackBySong(e,i){return i?.id||e}syncSongsToForm(){if(this.form&&this.form.get("items")){const e=this.addedSongs.map(i=>{const o={id:i.id,song_name:i.song_name,song_file:i.song_file,thumbnail:i.thumbnail,postPriceData:i.postPriceData,audioFileName:i.audioFileName,thumbnailPreview:i.thumbnailPreview,durationInSeconds:i.durationInSeconds,require_authentication:i.require_authentication,allow_download:i.allow_download,show_as_post:i.show_as_post,is_free:i.is_free,release_date:i.release_date,status:i.status||O.W.PORTFOLIO_STATUS.ACTIVE};return this.isPodcastType()&&!this.isIndividual&&void 0!==i.description&&(o.description=i.description||""),o});this.form.get("items")?.setValue(e,{emitEvent:!1})}}formatDuration(e){return e&&e!==l.Mx.ZERO?`${Math.floor(e/l.Mx.SIXTY)}:${Math.floor(e%l.Mx.SIXTY).toString().padStart(l.Mx.TWO,"0")}`:`${l.Mx.ZERO}:${String(l.Mx.ZERO).padStart(l.Mx.TWO,"0")}`}getSongReleaseDisplay(e){if(!e?.release_date)return null;const i=(0,Q.NH)(e.release_date);return i.type&&null!=i.value?{hasRelease:!0,isReleaseYearType:i.type===w.RELEASE_TYPE_YEAR,dateOfRelease:i.value}:null}editSong(e){const i=this.addedSongs[e],o=i.status||O.W.PORTFOLIO_STATUS.ACTIVE;this.enable=o===O.W.PORTFOLIO_STATUS.ACTIVE,this.editingSong={...i,status:o},this.editingSongIndex=e;const s=i.postPriceData;let p=null;(s?.outer_subscription?.length||s?.outer_nft?.length)&&(p={is_individual_price:!0,is_subscription:!(!s.outer_subscription||!s.outer_subscription.length),is_nft:!(!s.outer_nft||!s.outer_nft.length),subscription:s.outer_subscription||[],NFT:s.outer_nft||[]}),this.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:s?.is_subscription||!1,is_indivudiual_price:s?.is_indivudiual_price||!1,is_nft_added:s?.is_nft_added||!1,indivisualPrice:s?.indivisualPrice||"",loyalty_points:s?.loyalty_points??null,subscriptions:s?.subscriptions||[],nftIDList:s?.nftIDList||[],form:s?.form||null,lockDetails:p,collaborators:[],international_prices:s?.international_prices},this.showAddSongForm=!0;const u={[this.portfolioConfig?.fileField||"song_file"]:i.song_file,thumbnail:i.thumbnail};if(!this.isIndividual&&this.portfolioConfig?.nameField&&(u[this.portfolioConfig.nameField]=i.song_name),this.isPodcastType()&&!this.isIndividual&&void 0!==i.description&&(u.podcast_episode_description=i.description||""),u.allow_download=void 0!==i.allow_download&&i.allow_download?[!0]:[],u.is_free=void 0!==i.is_free&&i.is_free?[!0]:[],u.show_as_post=void 0!==i.show_as_post&&i.show_as_post?[!0]:[],u.require_authentication=void 0!==i.require_authentication&&i.require_authentication?[!0]:[],!this.isIndividual){const A=(0,Q.NH)(i.release_date);if(A.type===w.RELEASE_TYPE_YEAR)this.songReleaseType=w.RELEASE_TYPE_YEAR,u.song_release_year=null!==A.value?String(A.value):null,u.song_release_date=null,u.song_release_type_year=[w.RELEASE_TYPE_YEAR],u.song_release_type_date=[];else if(A.type===w.RELEASE_TYPE_DATE){this.songReleaseType=w.RELEASE_TYPE_DATE;const E=(0,Q.Gy)(A.value);u.song_release_date=E,u.song_release_year=null,u.song_release_type_year=[],u.song_release_type_date=[w.RELEASE_TYPE_DATE]}else this.songReleaseType=null,u.song_release_type_year=[],u.song_release_type_date=[]}this.form.patchValue(u),setTimeout(()=>{this.initializeSongReleaseType()},50),i.song_file&&(this.audioSelected=!0,this.audioPreview=i.song_file,this.audioFileName=i.audioFileName||O.W.AUDIO_FILE,this.timestamp=(0,Q.e4)(i.song_file)),i.thumbnail&&(this.thumbnailPreview=i.thumbnailPreview||i.thumbnail),this.ngZone.run(()=>{setTimeout(()=>{const A=null!=s?.loyalty_points&&s.loyalty_points>0,E=s&&(s.is_subscription||s.is_indivudiual_price||s.is_nft_added||A),q=null!=s?.form?.free_preview?s.form.free_preview:l.Mx.ZERO;if(this.postPriceComponent&&E){this.postPriceComponent.postPriceObj={is_subscription:s.is_subscription||!1,is_ind_purchase:s.is_indivudiual_price||!1,is_loyalty_points:A,is_lock_with_nft:s.is_nft_added||!1,selected_subscription:[],individual_price:s.indivisualPrice||"",revenue_split:"",international_prices:s?.international_prices};const z=setInterval(()=>{this.postPriceComponent?.subPlanList&&this.postPriceComponent?.subPlanList?.length>l.Mx.ZERO&&(clearInterval(z),s.subscriptions&&s.subscriptions.length>l.Mx.ZERO&&s.subscriptions.forEach(et=>{const tt=this.postPriceComponent.subPlanList.find(dt=>dt.sk===et.sk);tt&&(tt.isSelected=!0)}),this.cdr.detectChanges())},Number(l.Mx.FIFTY));setTimeout(()=>clearInterval(z),l.Mx.INTERVAL_THREE_THOUSAND),s.nftIDList&&s.nftIDList.length>l.Mx.ZERO&&(this.postPriceComponent.addedNFTIds=[...s.nftIDList]),s.form&&this.postPriceComponent.postPriceForm&&this.postPriceComponent.postPriceForm.patchValue(s.form),s.indivisualPrice&&this.postPriceComponent.ppForm&&this.postPriceComponent.ppForm.patchValue({indPrice:s.indivisualPrice}),A&&this.postPriceComponent.loyaltyPointsForm&&(this.postPriceComponent.loyaltyPointsForm.patchValue({loyalty_points:s.loyalty_points}),this.postPriceComponent.onLoyaltyPointsToggle()),this.cdr.detectChanges()}else this.postPriceComponent&&!E&&(this.postPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.postPriceComponent.addedNFTIds=[],this.postPriceComponent.postPriceForm&&this.postPriceComponent.postPriceForm.reset({free_preview:q,preview_image:"",description:"",archive_post:"",is_comment_enable:"",accept_tip_on_livestream:"",hashTagList:[]}),this.postPriceComponent.ppForm&&this.postPriceComponent.ppForm.reset(),this.postPriceComponent.loyaltyPointsForm&&this.postPriceComponent.loyaltyPointsForm.reset(),this.postPriceComponent.subPlanList&&this.postPriceComponent.subPlanList.forEach(z=>{z.isSelected=!1}),this.cdr.detectChanges())}
1,Number(l.Mx.TWO_HUNDRED))}),this.cdr.detectChanges()}toggleDescription(e){this.addedSongs[e]&&this.addedSongs[e].description&&(this.addedSongs[e]={...this.addedSongs[e],isMore:!this.addedSongs[e].isMore},this.cdr.detectChanges())}previewSong(e){this.openMusicModal(this.addedSongs[e])}openMusicModal(e){const i=this.albumCoverImage,o={audioUrl:e.song_file||"",file:e.song_file||"",previewImageUrl:e.thumbnailPreview||e.thumbnail||i||"",albumTitle:"",songTitle:e.song_name||"",dateOfRelease:e.release_date||null,isLocked:!1,showTime:!0,locked_through:this.buildLockThroughFromPostPriceData(e.postPriceData),pk:e.pk||"",sk:e.sk||""},s=this.addedSongs.filter(h=>h.song_file).map(h=>({audioUrl:h.song_file||"",file:h.song_file||"",previewImageUrl:h.thumbnailPreview||h.thumbnail||i||"",albumTitle:"",songTitle:h.song_name||"",dateOfRelease:h.release_date||null,isLocked:!1,showTime:!0,locked_through:this.buildLockThroughFromPostPriceData(h.postPriceData),pk:h.pk||"",sk:h.sk||""})),p=s.findIndex(h=>h.audioUrl===o.audioUrl&&h.songTitle===o.songTitle);this.modalService.show(Pi.K,{initialState:{musicList:s.length>l.Mx.ZERO?s:[o],currentIndex:p>=l.Mx.ZERO?p:l.Mx.ZERO,userProfile:this.userProfile,isMyProfile:!0,allowMinimizePlayer:!1},class:"modal-lg",backdrop:"static",keyboard:!1})}buildLockThroughFromPostPriceData(e){if(!e)return{individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};const i=e?.loyalty_points;return{individual:{outer_subscription:[],outer_nft:[],individual_price:e.indivisualPrice||"",...i&&{loyalty_points:Number(i)}},subscription:e.subscriptions||[],nft:e.nftIDList||[]}}handleSongEditFromQuery(){if(this.songEditFromQueryHandled||this.songAddFromQueryHandled)return;const e=this.route.snapshot.queryParamMap.get("videoSk"),i="true"===this.route.snapshot.queryParamMap.get("isAddItem");if(!e&&i)return this.songAddFromQueryHandled=!0,this.toggleAddSongForm(),void this.cleanQueryParameters();if(this.addedSongs&&this.addedSongs.length)try{const o=this.cs.decodeToUTF(e),s=this.addedSongs.findIndex(p=>p.sk===o);s>=l.Mx.ZERO?(this.songEditFromQueryHandled=!0,this.editSong(s),this.cleanQueryParameters()):this.songEditFromQueryHandled=!0}catch{this.songEditFromQueryHandled=!0,this.cleanQueryParameters()}else setTimeout(()=>{this.songEditFromQueryHandled||this.handleSongEditFromQuery()},l.Mx.TEN)}cleanQueryParameters(){const e={...this.route.snapshot.queryParams};e.step&&delete e.step,e.videoSk&&delete e.videoSk,this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36($.v),t.Y36(bt.C),t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(Tt.Y),t.Y36(gt.F),t.Y36(Xe.tT),t.Y36(V.gz),t.Y36(V.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-step-3-music"]],viewQuery:function(i,o){if(1&i&&(t.Gf(Oi,5),t.Gf(xe.PostPriceComponent,5),t.Gf(vi,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.loyaltyOnlyWarningModal=s.first),t.iGM(s=t.CRH())&&(o.postPriceComponent=s.first),t.iGM(s=t.CRH())&&(o.deleteItemModal=s.first)}},inputs:{form:"form",isEditMode:"isEditMode",isIndividual:"isIndividual",showThumbnail:"showThumbnail",isDirectDistributionChecked:"isDirectDistributionChecked",albumSk:"albumSk",userProfile:"userProfile",portfolioType:"portfolioType",currentStepNumber:"currentStepNumber",totalSteps:"totalSteps",isUploadingAudio:"isUploadingAudio",itemLockThrough:"itemLockThrough",albumLockThrough:"albumLockThrough",albumFreePreviewTime:"albumFreePreviewTime",disabledSubscriptionPlanIds:"disabledSubscriptionPlanIds"},features:[t.TTD],decls:10,vars:14,consts:[[1,"step-3-direct-distribution-container","step-3-music-container",3,"ngClass"],["class","step-indicator-container",4,"ngIf"],["class","section-title",4,"ngIf"],["class","added-songs-list mb-4",4,"ngIf"],["class","add-song-track-button mb-4",4,"ngIf"],["class","step-form-content",3,"ngClass",4,"ngIf"],[3,"imageChangeEvent","isOpen","cropperOptions","imageWidth","closeCrop","cropImageUpload",4,"ngIf"],[3,"dynamicClass","ConfirmationMessage","headerLabel","commonEnum","confirmDelete","cancelDelete"],["deleteItemModal",""],[3,"proceeded","canceled",4,"ngIf"],[1,"step-indicator-container"],[1,"step-indicator"],["class","toggle-delete-container",4,"ngIf"],[1,"toggle-delete-container"],[3,"currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged"],["enableToggle",""],["type","button",1,"btn","btn-delete","btn-delete-uppr",3,"title","click"],[1,"icon-delete-filled"],[1,"section-title"],[3,"message","infoIconSize"],[1,"added-songs-list","mb-4"],["class","songs-empty-placeholder",4,"ngIf"],["class","songs-list","cdkDropList","",3,"cdkDropListDisabled","cdkDropListAutoScrollStep","cdkDropListData","cdkDropListDropped",4,"ngIf"],[1,"songs-empty-placeholder"],["class","skeleton-song-item",4,"ngFor","ngForOf"],[1,"skeleton-song-item"],[1,"song-thumbnail-wrapper","skeleton-thumbnail"],[1,"song-audio-icon"],[3,"ngClass"],[1,"song-details"],[1,"skeleton-line","skeleton-title"],[1,"skeleton-line","skeleton-duration"],[1,"song-actions"],[1,"skeleton-button","skeleton-preview"],[1,"skeleton-button","skeleton-edit"],[1,"skeleton-button","skeleton-delete"],["cdkDropList","",1,"songs-list",3,"cdkDropListDisabled","cdkDropListAutoScrollStep","cdkDropListData","cdkDropListDropped"],["class","song-item","cdkDrag","",3,"cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"song-item",3,"cdkDragStarted","cdkDragEnded"],[1,"add-item-portfolio-list","d-flex","align-items-center","gap-3"],["cdkDragHandle","",1,"drag-handle"],[1,"icon-drag"],[1,"d-flex","justify-content-between","align-items-center","gap-3","flex-wrap","w-100"],[1,"song-thumbnail-wrapper"],["class","song-thumbnail",4,"ngIf"],["class","song-audio-icon",4,"ngIf"],["class","preview-processing",4,"ngIf"],[1,"song-name"],["class","song-duration",4,"ngIf"],["class","song-description w-100",4,"ngIf"],["type","button",1,"btn","btn-primary",3,"title","click"],[1,"icon-liteplay"],["type","button",1,"btn","btn-edit",3,"title","click"],[1,"icon-res-editfill"],["type","button",1,"btn","btn-delete",3,"title","click"],[1,"song-thumbnail"],["appDisableRightClick","","appMobileOptimization","","loading","lazy",3,"src","alt","originalUrl","format"],[1,"preview-processing"],[1,"song-duration"],[1,"d-none","d-lg-inline-block"],[1,"song-description","w-100"],["appReadMore","",1,"song-description-text",3,"lines","innerHTML","click"],[1,"add-song-track-button","mb-4"],["type","button",1,"btn","btn-add-song-track",3,"click"],[1,"plus-icon"],[1,"step-form-content",3,"ngClass"],[3,"formGroup"],["class","row",4,"ngIf"],["class","release-date-section mb-4",4,"ngIf"],["class","make-free-checkbox-section mb-4",4,"ngIf"],["class","pricing-options-section",3,"disabled-section",4,"ngIf"],["class","download-checkbox-section mt-4",4,"ngIf"],["class","step-3-action-buttons mt-4",4,"ngIf"],[1,"row"],[1,"col-12","add-song-track-section",3,"ngClass"],[1,"form-group"],["class","name-field mb-3",4,"ngIf"],["class","col-12 mb-4 description-field",4,"ngIf"],[1,"parent-label"],[1,"uploadContainer"],["class","custom-label-upload",3,"for",4,"ngIf"],["class","uploadFileImageData",4,"ngIf"],[3,"control","field"],["class","col-12 col-lg-4",4,"ngIf"],[1,"name-field","mb-3"],[3,"field","form","disabled"],[1,"col-12","mb-4","description-field"],[1,"custom-label-upload",3,"for"],["onclick","this.value = null","type","file","appMobileBridgeFileInput","",1,"upload","d-none",3,"id","accept","disabled","fileConfig","change","mobileFileChange"],["audioPicker",""],[1,"banner-image-type-portfolio"],[1,"icon-litebanner-upload"],[1,"image-title"],["class","image-msg",4,"ngIf"],[3,"btnField","handleButtonClick"],[1,"image-msg"],[1,"uploadFileImageData"],[1,"audio-preview-content"],[1,"audio-icon-wrapper"],[1,"audio-file-info"],[1,"audio-file-name"],[1,"remove-link",3,"click"],[1,"col-12","col-lg-4"],[3,"message"],["for","thumbnailUpload","class","custom-label-upload optional-song-image-section",4,"ngIf"],["class","uploadFileImageData optional-song-image-section",3,"ngClass",4,"ngIf"],["for","thumbnailUpload",1,"custom-label-upload","optional-song-image-section"],["type","file","onclick","this.value = null","id","thumbnailUpload","appMobileBridgeFileInput","",1,"upload","d-none",3,"accept","disabled","fileConfig","change","mobileFileChange"],["thumbnailInput",""],[1,"uploadFileImageData","optional-song-image-section",3,"ngClass"],["class","show-progress-bar-thumbnail pointer-none",4,"ngIf"],["appDisableRightClick","","appMobileOptimization","","alt","Thumbnail","loading","lazy","decoding","async",3,"originalUrl","src","format",4,"ngIf"],["class","close",3,"z-index","click",4,"ngIf"],[1,"show-progress-bar-thumbnail","pointer-none"],[3,"percent","radius","outerStrokeWidth","innerStrokeWidth","outerStrokeColor","innerStrokeColor","animation","animationDuration","showSubtitle","backgroundPadding","titleFontSize","titleColor","unitsColor","space"],["appDisableRightClick","","appMobileOptimization","","alt","Thumbnail","loading","lazy","decoding","async",3,"originalUrl","src","format"],[1,"close",3,"click"],[1,"release-date-section","mb-4"],[1,"parent-label","mb-0"],[1,"release-type-checkboxes","mb
1-3","d-flex","align-items-center","gap-5"],[3,"form","field","checkboxClicked"],["class","release-input-wrapper",4,"ngIf"],[1,"release-input-wrapper"],[3,"field","form"],[1,"make-free-checkbox-section","mb-4"],[3,"form","field"],[1,"pricing-options-section"],[1,"d-flex","align-items-center","pricing-info-messages"],[3,"message","click"],[3,"taggedUserList","filledData","isSelectorUsed","isDoubleLockingEnable","freePreviewOptionsProps","freePreviewLabel","restrictLabel","disabledSubscriptionPlanIds","alwaysShowFreePreview"],[1,"download-checkbox-section","mt-4"],[1,"step-3-action-buttons","mt-4"],[3,"imageChangeEvent","isOpen","cropperOptions","imageWidth","closeCrop","cropImageUpload"],[3,"proceeded","canceled"],["loyaltyOnlyWarningModal",""]],template:function(i,o){1&i&&(t.TgZ(0,"div",0),t.YNc(1,Ti,5,3,"div",1),t.YNc(2,xi,4,3,"div",2),t.YNc(3,Ri,3,2,"div",3),t.YNc(4,Ui,6,1,"div",4),t.YNc(5,hn,10,12,"div",5),t.YNc(6,fn,1,8,"app-image-cropper",6),t.qZA(),t.TgZ(7,"app-confirmation-modal",7,8),t.NdJ("confirmDelete",function(){return o.deleteItem()})("cancelDelete",function(){return o.onCancelDeleteItem()}),t.qZA(),t.YNc(9,Cn,2,0,"app-loyalty-only-warning-modal",9)),2&i&&(t.Q6J("ngClass",t.VKq(12,bn,!o.isIndividual)),t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(1),t.Q6J("ngIf",!o.showAddSongForm&&!o.isIndividual),t.xp6(1),t.Q6J("ngIf",!o.showAddSongForm&&!o.isIndividual),t.xp6(1),t.Q6J("ngIf",o.showAddSongForm&&(!o.isIndividual||o.isDirectDistributionChecked)),t.xp6(1),t.Q6J("ngIf",o.isOpen),t.xp6(1),t.Q6J("dynamicClass","delete-modal portfolio-banner-delete-modal")("ConfirmationMessage",o.deleteAlbumMessage)("headerLabel",o.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_TITLE[o.portfolioType])("commonEnum",o.commonEnum),t.xp6(2),t.Q6J("ngIf",o.cs.isBrowser))},dependencies:[r.mk,r.sg,r.O5,N._Y,N.JL,N.sg,Xt.e,it.r,we.s,Ue.b,Ze.t,Ge.o,Ve.g,Be.e,ze.p,po.h,Ae.a,st.m,wt.Y,ye.LoyaltyOnlyWarningModalComponent,ft.J,Pt.Wj,Pt.Zt,Pt.Bh,De.nu,Mt.w,xe.PostPriceComponent,r.uU],styles:[".step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .song-description-text[_ngcontent-%COMP%]{flex:1 1 calc(100% - 100px)}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .add-item-portfolio-list[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%]{padding:10px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:20px!important}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .preview-processing[_ngcontent-%COMP%]{font-size:12px;position:absolute;color:#fff!important;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6)!important}@media (max-width: 768px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .preview-processing[_ngcontent-%COMP%]{font-size:10px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-indicator-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-indicator-container[_ngcontent-%COMP%]{align-items:flex-start}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .toggle-delete-container[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;
1gap:16px;padding:10px;background:var(--configBgColor);border-radius:12px;animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%]{flex-shrink:0;width:64px;height:64px;border-radius:6px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);display:flex;align-items:center;justify-content:center}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-litemusic-node-2[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-liteMIc-Icon[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-liteportfolio-not-found[_ngcontent-%COMP%]{opacity:.5}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-details[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-details[_ngcontent-%COMP%] .skeleton-line[_ngcontent-%COMP%]{height:16px;border-radius:4px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-details[_ngcontent-%COMP%] .skeleton-line.skeleton-title[_ngcontent-%COMP%]{width:60%;height:18px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-details[_ngcontent-%COMP%] .skeleton-line.skeleton-duration[_ngcontent-%COMP%]{width:40%;height:14px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center;flex-shrink:0}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%] .skeleton-button[_ngcontent-%COMP%]{border-radius:30px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%] .skeleton-button.skeleton-preview[_ngcontent-%COMP%]{width:100px;height:40px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%] .skeleton-button.skeleton-edit[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%] .skeleton-button.skeleton-delete[_ng
1content-%COMP%]{width:40px;height:40px;border-radius:50%}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%]{flex-wrap:wrap}}@keyframes _ngcontent-%COMP%_skeleton-pulse{0%,to{opacity:1}50%{opacity:.6}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%]{display:inline-block;padding:6px 12px;border-radius:20px;border:1px solid var(--theme-interactive-link);margin-bottom:16px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:12px;font-weight:600}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .icon-litemusic-node-2[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .icon-liteMIc-Icon[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .icon-liteportfolio-not-found[_ngcontent-%COMP%]{position:relative!important;top:0;left:0;font-size:48px;color:var(--theme-interactive-link)}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:24px;font-weight:700;margin:0;display:flex;align-items:center}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important;padding:24px;border-radius:24px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-bottom:0}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .parent-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%]{position:relative;width:100%}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .optional-song-image-section[_ngcontent-%COMP%]{aspect-ratio:1/1}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%]{border:.1rem dashed var(--theme-interactive-link);border-radius:15px;color:var(--theme-interactive-link);display:flex;cursor:pointer;align-items:center;justify-content:center;flex-direction:column;padding:20px 15px;min-width:150px;width:100%;min-height:160px;transition:all .3s ease}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%] .plus-icon[_ngcontent-%COMP%]{font-size:24px;text-align:center;color:var(--theme-interactive-link);font-weight:300;margin-bottom:4px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{text-align:center;color:var(--theme-interactive-link);font-size:12px;margin:4px 5px 0;font-weight:500;white-space:normal}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]{position:relative;width:100%;border-radius:8px;overflow:hidden;min-height:150px;height:auto;margin-right:0!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:after{display:none}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData.portrait-banner[_ngcontent-%COMP%]{aspect-ratio:1/1}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:has(.show-progress-bar), .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:has(.show-progress-bar-thumbnail), .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:has(.audio-preview-content){border:.1rem dashed var(--theme-interactive-link);border-radius:15px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto;display:block}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;line-height:1;text-decoration:none;background:var(--theme-interactive-link);color:var(--configButtonTextColor);z-index:10}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .show-progress-bar[_ng
1content-%COMP%], .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .show-progress-bar-thumbnail[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:5}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:16px;width:100%;height:157px;padding:20px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%]{flex-shrink:0;width:80px;height:80px;display:flex;align-items:center;justify-content:center;border-radius:10px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%] app-post-audio-icon{width:80px;height:80px;display:block}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%] app-post-audio-icon svg, .step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%] app-post-audio-icon img{width:100%;height:100%}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-file-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;justify-content:center;gap:6px;min-width:0}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-file-info[_ngcontent-%COMP%] .audio-file-name[_ngcontent-%COMP%]{margin:0;font-size:14px;color:var(--configPostTextColor);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-file-info[_ngcontent-%COMP%] .remove-link[_ngcontent-%COMP%]{font-size:12px;color:var(--theme-interactive-link);cursor:pointer;text-decoration:none;transition:opacity .2s ease}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-file-info[_ngcontent-%COMP%] .remove-link[_ngcontent-%COMP%]:hover{opacity:.8;text-decoration:underline}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .extension[_ngcontent-%COMP%]{font-size:12px;color:var(--theme-interactive-link);margin-top:8px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .download-checkbox-section[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{overflow:unset!important;white-space:normal!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%]{width:65%}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%] .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%] .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%] .option-label{white-space:normal!important}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%]{width:100%}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .cb-option-container .option-label{white-space:normal!important;max-width:100%!important}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .cb-option-container .option-label{font-size:14px!important}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] h4[_ng
1content-%COMP%]{font-size:20px;font-weight:700;margin-bottom:32px!important;line-height:100%}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] .pricing-info-messages[_ngcontent-%COMP%] app-info-icon[_ngcontent-%COMP%]{margin-bottom:30px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .custom-checkbox{z-index:1}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .post-price-lock-container{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head{margin-bottom:30px;display:flex}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .icon-liteicon-black-tick:before{font-size:14px!important}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head{display:block;margin-bottom:20px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .icon-liteicon-black-tick:before{font-size:10px!important;left:3px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox{font-weight:500;padding:3px 0 0 38px;margin:0 0 0 40px;color:var(--configPostTextColor)}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox:first-child{margin:0}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox{display:block;margin:15px 0 0;padding:0 0 0 34px;font-size:14px;line-height:20px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content h5{font-size:16px;margin:0 0 16px;font-weight:400}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content h5{font-size:14px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label{border-radius:28px;border:solid 1px var(--theme-interactive-link);width:100%;padding:17px 20px 17px 30px;margin:0 0 6px}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label{padding:14px 20px;font-size:13px;margin:0 0 16px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark{right:20px;left:auto;top:14px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark.icon-liteicon-black-tick:before{font-size:14px!important}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark{top:6px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark.icon-liteicon-black-tick:before{font-size:12px!important;display:flex;justify-content:center;margin-top:3px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .walletform-title{border:none;padding-bottom:0!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group label{text-transform:capitalize!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign{color:var(--configPostTextColor)!important;position:absolute;
1left:24px;top:calc(50% - 7px)!important;z-index:1;font-weight:900;font-size:14px;line-height:100%}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign{left:20px;top:47px;font-size:12px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign~.form-control{padding-left:36px;line-height:18px}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign~.form-control{line-height:16px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group{position:relative;background:var(--configBgColor)!important;margin-bottom:20px!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .onboarding-validInfo{display:flex;justify-content:space-between;align-items:center}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .dropdown-toggle{margin:-10px 30px 0 0}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .dropdown-menu p{font-size:13px;overflow-wrap:anywhere;text-transform:none!important}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group{margin:20px 0 0}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .formgroup-users{position:absolute;top:52px;right:20px;margin:0!important}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .formgroup-users{top:46px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .form-control~label{margin:16px 0 0}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft{display:flex;justify-content:space-between;align-items:center}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a{font-size:14px;color:var(--theme-interactive-link);text-decoration:none;text-transform:uppercase;cursor:pointer;flex:none;position:absolute;right:20px}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a{right:10px}}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em{color:var(--theme-interactive-link);position:static}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em:before{font-size:12px!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a:hover{color:var(--theme-interactive-link)}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input{flex:1;background:transparent;border:0;font-size:14px;font-weight:900;padding-right:40px;color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input::placeholder{opacity:.7;color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content{padding:5px 20px 30px}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul{list-style:none;margin:0;padding:0}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li{margin:15px 0 0;display:flex;justify-content:space-between;align-items:center}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li span{font-size:16px;opacity:.75;color:var(--configPostTextColor);padding-right:15px;word-break:break-all}.step-3-direct-distribution-container.step-3-music-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li a{color:var(--theme-interactive-link);text-decoration:none;font-size:22px;flex:none;line-height:0;cursor:pointer}.step-3-music-container[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%]{height:36px;width:36px;padding:0 0 3px;border-radius:50%;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);color:var(--theme-interactive-link);align-items:center;justify-content:center;display:flex}.step-3-music-container[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:20px;color:var(--theme-interactive-link)} .theme-whiteLabel .step-3-music-container .toggle-enable-container .both-btn{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;cursor:pointer} .theme-whiteLabel .step-3-music-container .toggle-enable-container .both-btn.active-enable{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-music-container .btn-delete-uppr{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-music-container .btn-delete-uppr em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-music-container .icon-litemusic-node-2, .theme-whiteLabel .step-3-music-container .icon-liteMIc-Icon, .theme-whiteLabel .step-3-music-container .icon-liteportfolio-not-found{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .step-indicator{border:1px solid var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .extension{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .add-song-track-button .btn-add-song-track{border:2px solid var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .add-song-track-button .btn-add-song-track span{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .add-song-track-button .btn-add-song-track .plus-icon{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .add-song-track-button .btn-add-song-track:hover{background:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-music-container .step-form-content .onboarding-validInfo.block-hint .dropdown-menu p{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .uploadContainer .custom-label-upload{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .uploadContainer .custom-label-upload .label, .theme-whiteLabel .step-3-music-container .step-form-content .uploadContainer .custom-label-upload .plus-icon{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .uploadContainer .uploadFileImageData{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .uploadContainer .uploadFileImageData .close{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .uploadContainer .uploadFileImageData .audio-preview-content .audio-file-info .remove-link{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .pricing-options-section app-post-price .postprice-content .postprice-checkbox label{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .pricing-options-section app-post-price .individualprice-content .form-nft a{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .pricing-options-section app-post-price .individualprice-content .form-nft a em{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .pricing-options-section app-post-price .individualprice-content .form-nft a:hover{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .pricing-options-section app-post-price .individualprice-content .form-access-content ul li a{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .ng-select-container{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .ng-select-container .ng-value-container .ng-value{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .ng-select-container .ng-value-container .ng-value-label{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .ng-select-container .ng-placeholder{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .ng-select-container .ng-arrow:before{border-color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .ng-dropdown-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-music-container .step-form-content .ng-dropdown-panel .ng-dropdown-panel-items .ng-option-label{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-music-container .added-songs-list .songs-empty-placeholder .skeleton-song-item{background:var(--configBgColor)} .theme-whiteLabel .step-3-music-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-music-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail .song-audio-icon .icon-litemusic-node-2, .theme-whiteLabel .step-3-music-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail .song-audio-icon .icon-liteMIc-Icon, .theme-whiteLabel .step-3-music-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail .song-audio-icon .icon-liteportfolio-not-found{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-music-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .song-details .skeleton-line{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-music-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .song-actions .skeleton-button{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-music-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-music-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper .icon-litemusic-node-2, .theme-whiteLabel .step-3-music-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper .icon-liteMIc-Icon, .theme-whiteLabel .step-3-music-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper .icon-liteportfolio-not-found{color:var(--configThemeColor)!important} .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon{background-color:var(--configThemeColor)!important} .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-litemusic-node-2, .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-liteMIc-Icon, .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-liteportfolio-not-found{font-size:48px;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-primary em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-edit{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-edit em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-delete{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-delete em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-description .song-description-text .content-length-handle{color:var(--configThemeColor)!important} .theme-whiteLabel .song-item .drag-handle .icon-drag{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important} .theme-whiteLabel .song-item .drag-handle .icon-drag:before{color:var(--configBgTextColor)!important} .step-3-music-container .step-3-action-buttons{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:0}@media screen and (max-width: 992px){ .step-3-music-container .step-3-action-buttons{gap:12px;flex-direction:column} .step-3-music-container .step-3-action-buttons app-button{width:100%;display:flex;justify-content:center}} .step-3-music-container .added-songs-list{margin-bottom:24px} .step-3-music-container .added-songs-list .songs-list{display:flex;flex-direction:column;gap:16px} .step-3-music-container .added-songs-list .songs-list .song-item{will-change:transform;background:var(--configBgColor);border-radius:12px;padding:16px} .step-3-music-container .add-song-track-button{margin-bottom:24px} .step-3-music-container .add-song-track-button .btn-add-song-track{padding:8px 16px;background:var(--configSecondaryBgColor);border:2px solid var(--theme-interactive-link);border-radius:12px;font-size:16px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer;transition:all .3s ease}@media screen and (max-width: 992px){ .step-3-music-container .add-song-track
1-button .btn-add-song-track{width:100%;border-radius:28px}} .step-3-music-container .add-song-track-button .btn-add-song-track:hover{background:var(rgba(var(--theme-interactive-link-rgb), .1))} .step-3-music-container .add-song-track-button .btn-add-song-track .plus-icon{font-size:24px;font-weight:400;line-height:1;color:var(--theme-interactive-link)!important} .step-3-music-container .add-song-track-button .btn-add-song-track span{color:var(--theme-interactive-link)!important;font-weight:900;font-size:14px;letter-spacing:.4px;text-transform:uppercase} .step-3-music-container .cb-vertical-option-container{gap:0px!important} .step-3-music-container .app-checkbox-container{background:var(--configBgColor)!important}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-preview[_ngcontent-%COMP%]{cursor:move;box-sizing:border-box;background:var(--configBgColor);border-radius:12px;padding:16px;box-shadow:0 5px 15px #0003}.cdk-drag-preview[_ngcontent-%COMP%] .add-item-portfolio-list[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.cdk-drag-preview[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{flex-shrink:0;align-self:center}.cdk-drag[_ngcontent-%COMP%]{width:auto}.disabled-section[_ngcontent-%COMP%]{pointer-events:none;opacity:.6}.disabled-section[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] .custom-checkbox[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed;opacity:.6}@media screen and (max-width: 992px){ .step-3-music-container .step-form-content{padding:10px}} .step-3-music-container .step-form-content .name-field .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-music-container .step-form-content .name-field .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7} .step-3-music-container .step-form-content .description-field .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;height:170px} .step-3-music-container .step-form-content .description-field .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7} .step-3-music-container .step-form-content .ng-select-container{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-music-container .step-form-content .ng-select-container .ng-value-container .ng-value{color:var(--configPostTextColor)!important} .step-3-music-container .step-form-content .ng-select-container .ng-value-container .ng-value-label{color:var(--configPostTextColor)!important} .step-3-music-container .step-form-content .ng-select-container .ng-placeholder{color:var(--configPostTextColor)!important} .step-3-music-container .step-form-content .ng-select-container .ng-arrow:before{border-color:var(--configPostTextColor)!important} .step-3-music-container .step-form-content .ng-dropdown-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-music-container .step-form-content .ng-dropdown-panel .ng-dropdown-panel-items .ng-option-label{color:var(--configPostTextColor)!important} .step-3-music-container .step-form-content.uploading{pointer-events:none;opacity:.7} .step-3-music-container .step-form-content.uploading input, .step-3-music-container .step-form-content.uploading textarea, .step-3-music-container .step-form-content.uploading select, .step-3-music-container .step-form-content.uploading button, .step-3-music-container .step-form-content.uploading label{pointer-events:none;cursor:not-allowed} .step-3-music-container .step-form-content.uploading .pricing-options-section{pointer-events:none;opacity:.6}@media screen and (min-width: 993px){.step-3-container-min-width[_ngcontent-%COMP%]{min-width:765px}}"]}),a})();var Pn=b(87919),fo=b(14443),On=b(72856),Co=b(23854),vn=b(17427),Mn=b(33460),Tn=b(16);const xn=["loyaltyOnlyWarningModal"],Sn=["deleteItemModal"];function In(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",13)(1,"app-toggle-enable",14,15),t.NdJ("toggleChanged",function(i){t.CHM(n);const o=t.oxw(2);return t.KtG(o.toggleChanged(i))}),t.qZA(),t.TgZ(3,"button",16),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.deleteOpenedVideo())}),t._UZ(4,"em",17),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("currentState",n.enable)("disableMessage",n.CONSTS.DISABLE)("enableMessage",n.CONSTS.ENABLE)("isWelcomeMessage",!0),t.xp6(2),t.Q6J("title",n.CONSTS.DELETE)}}
1function En(a,m){if(1&a&&(t.TgZ(0,"div",10)(1,"div",11)(2,"span"),t._uU(3),t.qZA()(),t.YNc(4,In,5,5,"div",12),t.qZA()),2&a){const n=t.oxw();t.xp6(3),t.AsE("STEP ",n.currentStepNumber," OF ",n.totalSteps,""),t.xp6(1),t.Q6J("ngIf",n.showAddVideoForm&&(!n.isIndividual||n.isDirectDistributionChecked)&&(null==n.editingVideo?null:n.editingVideo.sk))}}function yn(a,m){if(1&a&&(t.TgZ(0,"div",18)(1,"h3"),t._uU(2),t._UZ(3,"app-info-icon",19),t.qZA()()),2&a){const n=t.oxw();t.xp6(2),t.hij(" ",n.directDistributionTitle," "),t.xp6(1),t.Q6J("message",n.directSalesInfoMessage)("infoIconSize",18)}}function kn(a,m){if(1&a&&(t.TgZ(0,"div",25)(1,"div",26)(2,"div",27),t._UZ(3,"em",28),t.qZA()(),t.TgZ(4,"div",29),t._UZ(5,"div",30)(6,"div",31),t.qZA(),t.TgZ(7,"div",32),t._UZ(8,"div",33)(9,"div",34)(10,"div",35),t.qZA()()),2&a){const n=t.oxw(3);t.xp6(3),t.Q6J("ngClass",n.PORTFOLIO_TYPE_ICON_MAP[n.portfolioType])}}function wn(a,m){if(1&a&&(t.TgZ(0,"div",23),t.YNc(1,kn,11,1,"div",24),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.SKELETON_ITEMS)}}const An=function(a){return{"portrait-image-preview":a}};function Dn(a,m){if(1&a&&(t.TgZ(0,"div",55),t._UZ(1,"img",56),t.qZA()),2&a){const n=t.oxw().$implicit,e=t.oxw(3);t.Q6J("ngClass",t.VKq(5,An,e.isVideoPortrait(n))),t.xp6(1),t.Q6J("src",n.thumbnailPreview||n.thumbnail||e.albumCoverImage,t.LSH)("alt",n.video_name)("originalUrl",n.thumbnailPreview||n.thumbnail||e.albumCoverImage)("format","webp")}}function Ln(a,m){if(1&a&&(t.TgZ(0,"div",27),t._UZ(1,"em",28),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.Q6J("ngClass",n.PORTFOLIO_TYPE_ICON_MAP[n.portfolioType])}}function Fn(a,m){if(1&a&&(t.TgZ(0,"span",57),t._uU(1),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.hij(" ",n.PORTFOLIO_CONSTS_CONST.DISABLED_STATUS_MSG," ")}}function Nn(a,m){if(1&a&&(t.TgZ(0,"span",58),t._uU(1),t.qZA()),2&a){const n=t.oxw().$implicit,e=t.oxw(3);t.xp6(1),t.hij(" ",e.formatDuration(n.durationInSeconds)," ")}}function Rn(a,m){1&a&&(t.TgZ(0,"span",58),t._uU(1," | "),t.qZA())}function Un(a,m){if(1&a&&(t.TgZ(0,"span",58)(1,"span",59),t._uU(2),t.qZA(),t._uU(3),t.ALo(4,"date"),t.qZA()),2&a){const n=m.ngIf,e=t.oxw(4);t.xp6(2),t.hij(" ",n.isReleaseYearType?e.MUSIC_PLAYER_CONST.RELEASED_YEAR:e.MUSIC_PLAYER_CONST.RELEASED,": "),t.xp6(1),t.hij(" ",n.isReleaseYearType?n.dateOfRelease:t.xi3(4,2,n.dateOfRelease,"MMM d, yyyy")," ")}}function Zn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",60)(1,"p",61),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,o=t.oxw(3);return t.KtG(o.toggleDescription(i))}),t.ALo(2,"bioFormat"),t.ALo(3,"contentLengthHandler"),t.qZA()()}if(2&a){const n=t.oxw().$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("innerHTML",t.lcZ(2,1,t.gM2(3,3,n,e.Application.ONE_HUNDRED_FIFTY,e.Application.THREE,e.Application.THIRTY)),t.oJD)}}function Vn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",38),t.NdJ("cdkDragStarted",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.isDragging=!0)})("cdkDragEnded",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.isDragging=!1)}),t.TgZ(1,"div",39)(2,"div",40),t._UZ(3,"em",41),t.qZA(),t.TgZ(4,"div",42)(5,"div",43),t.YNc(6,Dn,2,7,"div",44),t.YNc(7,Ln,2,1,"div",45),t.YNc(8,Fn,2,1,"span",46),t.qZA(),t.TgZ(9,"div",29)(10,"h5",47),t._uU(11),t.qZA(),t.TgZ(12,"div"),t.YNc(13,Nn,2,1,"span",48),t.YNc(14,Rn,2,0,"span",48),t.YNc(15,Un,5,5,"span",48),t.qZA()(),t.YNc(16,Zn,4,8,"div",49),t.TgZ(17,"div",32)(18,"button",50),t.NdJ("click",function(){const o=t.CHM(n).index,s=t.oxw(3);return t.KtG(s.previewVideo(o))}),t._UZ(19,"em",51),t.TgZ(20,"span"),t._uU(21),t.qZA()(),t.TgZ(22,"button",52),t.NdJ("click",function(){const o=t.CHM(n).index,s=t.oxw(3);return t.KtG(s.editVideo(o))}),t._UZ(23,"em",53),t.qZA(),t.TgZ(24,"button",54),t.NdJ("click",function(){const o=t.CHM(n).index,s=t.oxw(3);return t.KtG(s.removeVideo(o))}),t._UZ(25,"em",17),t.qZA()()()()()}if(2&a){const n=m.$implicit,e=t.oxw(3);t.xp6(6),t.Q6J("ngIf",n.thumbnail||e.albumCoverImage),t.xp6(1),t.Q6J("ngIf",!n.thumbnail&&!e.albumCoverImage),t.xp6(1),t.Q6J("ngIf",n.status===e.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_STATUS.INACTIVE),t.xp6(3),t.Oqu(n.video_name),t.xp6(2),t.Q6J("ngIf",n.durationInSeconds),t.xp6(1),t.Q6J("ngIf",n.durationInSeconds&&e.getVideoReleaseDisplay(n)),t.xp6(1),t.Q6J("ngIf",e.getVideoReleaseDisplay(n)),t.xp6(1),t.Q6J("ngIf",!e.isIndividual&&n.description),t.xp6(2),t.Q6J("title",e.CONSTS.WATCH),t.xp6(3),t.Oqu(e.CONSTS.WATCH),t.xp6(1),t.Q6J("title",e.CONSTS.EDIT),t.xp6(2),t.Q6J("title",e.CONSTS.DELETE)}}function Bn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",36),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const o=t.oxw(2);return t.KtG(o.drop(i))}),t.YNc(1,Vn,26,12,"div",37),t.qZA()}if(2&a){const n=t.oxw(2);t.Q6J("cdkDropListDisabled",(null==n.addedVideos?null:n.addedVideos.length)===n.Application.ONE)("cdkDropListAutoScrollStep",n.AUTO_SCROLL_STEP)("cdkDropListData",n.addedVideos),t.xp6(1),t.Q6J("ngForOf",n.addedVideos)("ngForTrackBy",n.trackByVideo)}}function Yn(a,m){if(1&a&&(t.TgZ(0,"div",20),t.YNc(1,wn,2,1,"div",21),t.YNc(2,Bn,2,5,"div",22),t.qZA()),2&a){const n=t.oxw();
1t.xp6(1),t.Q6J("ngIf",!n.addedVideos||n.addedVideos.length===n.Application.ZERO),t.xp6(1),t.Q6J("ngIf",(null==n.addedVideos?null:n.addedVideos.length)>n.Application.ZERO)}}function Hn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",62)(1,"button",63),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleAddVideoForm())}),t.TgZ(2,"span",64),t._uU(3,"+"),t.qZA(),t.TgZ(4,"span"),t._uU(5),t.qZA()()()}if(2&a){const n=t.oxw();t.xp6(5),t.Oqu(n.CONSTS.ADD_VIDEO_TRACK)}}function Jn(a,m){if(1&a&&(t.TgZ(0,"div",85),t._UZ(1,"app-input",86),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.nameField)("form",n.form)("disabled",n.isUploadingVideo)}}function Wn(a,m){if(1&a&&(t.TgZ(0,"div",87),t._UZ(1,"app-textarea",86),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.descriptionField)("form",n.form)("disabled",n.isUploadingVideo)}}function Qn(a,m){if(1&a&&(t.TgZ(0,"div",99),t._uU(1),t.qZA()),2&a){const n=t.oxw(5);t.xp6(1),t.hij(" ",n.thumbnailFieldConfig.fileTypes," ")}}const bo=function(a,m,n){return{cropperMinWidth:a,cropperMinHeight:m,cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:n,maintainAspectRatio:!0}},qn=function(a){return{isMultiple:!1,cropperOptions:a}},Po=function(a){return{type:"button",label:a,class:"btn btn-primary select-file-btn"}};function Gn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"label",91)(1,"input",92,93),t.NdJ("change",function(i){t.CHM(n);const o=t.oxw(4);return t.KtG(o.fileChangeEvent(i,"thumbnail"))})("mobileFileChange",function(i){t.CHM(n);const o=t.oxw(4);return t.KtG(o.fileChangeEvent(i,"thumbnail"))}),t.qZA(),t.TgZ(3,"div",94),t._UZ(4,"em",95),t.TgZ(5,"div",96),t._uU(6),t.qZA(),t.YNc(7,Qn,2,1,"div",97),t.TgZ(8,"app-button",98),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.MAs(2);return t.KtG(i.click())}),t.qZA()()()}if(2&a){const n=t.oxw(4);let e;t.xp6(1),t.Q6J("accept",n.thumbnailFieldConfig.acceptTypes)("disabled",n.imageShowProgress||n.isUploadingVideo)("fileConfig",t.VKq(10,qn,t.kEZ(6,bo,n.Application.FOUR_HUNDRED,n.Application.FOUR_HUNDRED,1))),t.xp6(5),t.hij(" ",n.thumbnailFieldConfig.uploadLabel," "),t.xp6(1),t.Q6J("ngIf",!(n.thumbnailPreview||null!=(e=n.form.get("thumbnail"))&&e.value)),t.xp6(1),t.Q6J("btnField",t.VKq(12,Po,n.CONSTS.SELECT_FILE))}}function zn(a,m){if(1&a&&(t.TgZ(0,"div",104),t._UZ(1,"circle-progress",105),t.qZA()),2&a){const n=t.oxw(5);t.xp6(1),t.Q6J("percent",n.imagePercent)("radius",n.CIRCLE_RADIUS)("outerStrokeWidth",n.STROKE_WIDTH)("innerStrokeWidth",n.STROKE_WIDTH)("outerStrokeColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#09c6da")("innerStrokeColor","#47665f")("animation",!1)("animationDuration",n.ANIMATION_DURATION)("showSubtitle",!1)("backgroundPadding",n.BACKGROUND_PADDING)("titleFontSize",n.TITLE_FONT_SIZE)("titleColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("unitsColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("space",n.SPACE)}}function Kn(a,m){if(1&a&&t._UZ(0,"img",106),2&a){const n=t.oxw(5);let e,i;t.Q6J("originalUrl",n.thumbnailPreview||(null==(e=n.form.get("thumbnail"))?null:e.value))("src",n.thumbnailPreview||(null==(i=n.form.get("thumbnail"))?null:i.value),t.LSH)("format","webp")}}function jn(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"a",107),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(5);return t.KtG(i.removeThumbnail())}),t._uU(1," \xd7 "),t.qZA()}if(2&a){const n=t.oxw(5);t.Udp("z-index",n.Z_INDEX)}}function $n(a,m){if(1&a&&(t.TgZ(0,"div",100),t.YNc(1,zn,2,14,"div",101),t.YNc(2,Kn,1,3,"img",102),t.YNc(3,jn,2,2,"a",103),t.qZA()),2&a){const n=t.oxw(4);let e;t.xp6(1),t.Q6J("ngIf",n.imageShowProgress&&n.cs.isBrowser),t.xp6(1),t.Q6J("ngIf",(n.thumbnailPreview||(null==(e=n.form.get("thumbnail"))?null:e.value))&&!n.imageShowProgress),t.xp6(1),t.Q6J("ngIf",!n.imageShowProgress)}}const Oo=function(a){return{message:a}},vo=function(a){return{required:a}},Mo=function(a){return{validation:a}};function Xn(a,m){if(1&a&&(t.TgZ(0,"div",75)(1,"label",80),t._uU(2),t._UZ(3,"app-info-icon",88),t.qZA(),t.TgZ(4,"div",81),t.YNc(5,Gn,9,14,"label",89),t.YNc(6,$n,4,3,"div",90),t.qZA(),t._UZ(7,"app-vali
1dation-errors",84),t.qZA()),2&a){const n=t.oxw(3);let e,i,o;t.xp6(2),t.AsE(" ",n.thumbnailFieldConfig.fileLabel,"",null!=(e=n.form.get("thumbnail"))&&e.hasError("required")?"*":""," "),t.xp6(1),t.Q6J("message",n.CONSTS.OPTIONAL_COVER_IMAGE_FOR_VIDEO),t.xp6(2),t.Q6J("ngIf",!(n.thumbnailPreview||null!=(i=n.form.get("thumbnail"))&&i.value||n.imageShowProgress)),t.xp6(1),t.Q6J("ngIf",n.imageShowProgress||n.thumbnailPreview||(null==(o=n.form.get("thumbnail"))?null:o.value)),t.xp6(1),t.Q6J("control",n.form.get("thumbnail"))("field",t.VKq(11,Mo,t.VKq(9,vo,t.VKq(7,Oo,n.thumbnailFieldConfig.requiredMessage))))}}function ts(a,m){if(1&a&&(t.TgZ(0,"div",99),t._uU(1),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.hij(" ",n.CONSTS.VIDEO_FILE_TYPES," ")}}const es=function(a){return{messageType:a}};function os(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"label",108)(1,"input",109,110),t.NdJ("change",function(i){t.CHM(n);const o=t.oxw(3);return t.KtG(o.uploadVideoFile(i))})("mobileFileChange",function(i){t.CHM(n);const o=t.oxw(3);return t.KtG(o.mobileVideoFileChangeEvent(i))}),t.qZA(),t.TgZ(3,"div",94),t._UZ(4,"em",111),t.TgZ(5,"div",96),t._uU(6),t.qZA(),t.YNc(7,ts,2,1,"div",97),t.TgZ(8,"app-button",98),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.MAs(2);return t.KtG(i.click())}),t.qZA()()()}if(2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("disabled",n.isUploadingVideo)("fileConfig",t.VKq(5,es,n.MOBILE_BRIDGE_EVENT_SEND.ALL_MEDIA_PICKER)),t.xp6(5),t.hij(" ",n.CONSTS.UPLOAD_VIDEO," "),t.xp6(1),t.Q6J("ngIf",!n.videoSelected),t.xp6(1),t.Q6J("btnField",t.VKq(7,Po,n.CONSTS.SELECT_FILE))}}function is(a,m){if(1&a&&(t.TgZ(0,"div",115),t._UZ(1,"circle-progress",105),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.Q6J("percent",n.videoPercent)("radius",n.CIRCLE_RADIUS)("outerStrokeWidth",n.STROKE_WIDTH)("innerStrokeWidth",n.STROKE_WIDTH)("outerStrokeColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#09c6da")("innerStrokeColor","#47665f")("animation",!1)("animationDuration",n.ANIMATION_DURATION)("showSubtitle",!1)("backgroundPadding",n.BACKGROUND_PADDING)("titleFontSize",n.TITLE_FONT_SIZE)("titleColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("unitsColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("space",n.SPACE)}}const ns=function(a){return{"portrait-video-preview":a}},ss=function(){return{autoPlay:!0,muted:!0}};function rs(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",116)(1,"div",117),t._UZ(2,"vjs-ivs-player",118),t.ALo(3,"videoOption"),t.qZA(),t.TgZ(4,"a",107),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.removeVideoFile())}),t._uU(5,"\xd7"),t.qZA()()}if(2&a){const n=t.oxw(4);t.Q6J("ngClass",t.VKq(5,ns,n.currentVideoMode===n.Application.PORTRAIT)),t.xp6(2),t.Q6J("options",t.xi3(3,2,n.videoUrl,t.DdM(7,ss)))}}function as(a,m){if(1&a&&(t.TgZ(0,"div",112),t.YNc(1,is,2,14,"div",113),t.YNc(2,rs,6,8,"div",114),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",n.videoShowProgress&&n.cs.isBrowser),t.xp6(1),t.Q6J("ngIf",!n.videoShowProgress&&n.videoUrl)}}const ls=function(a){return{"mb-4 order-first":a}};function cs(a,m){if(1&a&&(t.TgZ(0,"div",73)(1,"div",74)(2,"div",75),t.YNc(3,Jn,2,3,"div",76),t.YNc(4,Wn,2,3,"div",77),t.YNc(5,Xn,8,13,"div",78),t.qZA()(),t.TgZ(6,"div",79)(7,"label",80),t._uU(8),t.qZA(),t.TgZ(9,"div",81),t.YNc(10,os,9,9,"label",82),t.YNc(11,as,3,2,"div",83),t.qZA(),t._UZ(12,"app-validation-errors",84),t.qZA()()),2&a){const n=t.oxw(2);t.xp6(3),t.Q6J("ngIf",!n.isIndividual),t.xp6(1),t.Q6J("ngIf",!n.isIndividual&&n.descriptionField),t.xp6(1),t.Q6J("ngIf",n.showThumbnail),t.xp6(1),t.Q6J("ngClass",t.VKq(9,ls,n.isIndividual)),t.xp6(2),t.hij(" ",(null==n.portfolioConfig?null:n.portfolioConfig.fileLabel)||n.CONSTS.VIDEO_FILE," "),t.xp6(2),t.Q6J("ngIf",!n.videoSelected),t.xp6(1),t.Q6J("ngIf",n.videoSelected),t.xp6(1),t.Q6J("control",n.form.get((null==n.portfolioConfig?null:n.portfolioConfig.fileField)||"video_file"))("field",t.VKq(15,Mo,t.VKq(13,vo,t.VKq(11,Oo,(null==n.portfolioConfig?null:n.portfolioConfig.fileRequired)||n.CONSTS.VIDEO_FILE_REQUIRED))))}}function ds(a,m){if(1&a&&(t.TgZ(0,"div",124),t._UZ(1,"app-select",125),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.releaseYearField)("form",n.form)}}function ps(a,m){if(1&a&&(t.TgZ(0,"div",124),t._UZ(1,"app-datepicker",125),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.releaseDateField)("form",n.form)}}function us(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",119)(1,"div",75)(2,"label",120),t._uU(3),t.qZA(),t.TgZ(4,"div",121)(5,"app-checkbox",122),t.NdJ("checkboxClicked",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.onVideoReleaseTypeYearChange())}),t.qZA(),t.TgZ(6,"app-checkbox",122),t.NdJ("checkboxClicked",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.onVideoReleaseTypeDateChange())}),t.qZA()(),t.YNc(7,ds,2,2,"div",123),t.YNc(8,ps,2,2,"div",123),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(3),t.hij(" ",n.CONSTS.RELEASING_ON," "),t.xp6(2),t.Q6J("form",n.form)("field",n.videoReleaseTypeYearField),t.xp6(1),t.Q6J("form",n.form)("field",n.videoReleaseTypeDateField),t.xp6(1),t.Q6J("ngIf",n.videoReleaseType===n.CONSTS.RELEASE_TYPE_YEAR),t.xp6(1),t.Q6J("ngIf",n.videoReleaseType===n.CONSTS.RELEASE_TYPE_DATE)}}function gs(a,m){if(1&a&&(t.TgZ(0,"div",126),t._UZ(1,"app-checkbox",127),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("form",n.form)("field",n.isFreeField)}}const ms=function(){return[]};function _s(a,m){if(1&a&&(t.TgZ(0,"div",128)(1,"div",129)(2,"h4"),t._uU(3),t.qZA(),t.TgZ(4,"app-info-icon",130),t.NdJ("click",function(e){return e.stopPropagation()}),t.qZA()(),t._UZ(5,"app-post-price",131),t.qZA()),2&a){const n=t.oxw(2);t.ekj("disabled-section",n.isUploadingVideo),t.xp6(3),t.hij(" ",n.INDIVIDUAL_PRICING_OPTION_TITLE[n.portfolioType]," "),t.xp6(1),t.Q6J("message",n.INDIVIDUAL_PRICING_OPTIONS_HINT[n.portfolioType]),t.xp6(1),t.Q6J("taggedUserList",t.DdM(13,ms))("filledData",n.postPriceFilledData)("isSelectorUsed",!0)("isDoubleLockingEnable",!0)("freePreviewOptionsProps",n.freePreviewLock[n.portfolioType])("freePreviewLabel",n.freePreviewDurationLabel)("restrictLabel",n.restrictLabel)("disabledSubscriptionPlanIds",n.disabledSubscriptionPlanIds)("alwaysShowFreePreview",n.isAlbumLocked)}}function hs(a,m){if(1&a&&(t.TgZ(0,"div",132),t._UZ(1,"app-checkbox",127),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("form",n.form)("field",n.requireAuthenticationCheckboxField)}}function fs(a,m){if(1&a&&(t.TgZ(0,"div",132),t._UZ(1,"app-checkbox",127),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("form",n.form)("field",n.downloadCheckboxField)}}function Cs(a,m){if(1&a&&(t.TgZ(0,"div",132),t._UZ(1,"app-checkbox",127),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("form",n.form)("field",n.postPreviewCheckboxField)}}const bs=function(a){return{type:"button",class:"btn btn-default",label:a}},Ps=function(a,m,n){return{type:"button",class:"btn btn-primary",label:a,disabled:m,loading:n}};function Os(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",133)(1,"app-button",98),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.handleCancel())}),t.qZA(),t.TgZ(2,"app-button",98),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.handleAddVideo())}),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("btnField",t.VKq(2,bs,n.CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.kEZ(4,Ps,n.editingVideoIndex>=n.Application.ZERO?n.CONSTS.UPDATE_VIDEO:n.CONSTS.ADD_VIDEO,!n.isFormValid||n.isSavingVideo,n.isSavingVideo))}}const vs=function(a){return{uploading:a}};function Ms(a,m){if(1&a&&(t.TgZ(0,"div",65)(1,"form",66),t.YNc(2,cs,13,17,"div",67),t.YNc(3,us,9,7,"div",68),t.YNc(4,gs,2,2,"div",69),t.YNc(5,_s,6,14,"div",70),t.YNc(6,hs,2,2,"div",71),t.YNc(7,fs,2,2,"div",71),t.YNc(8,Cs,2,2,"div",71),t.qZA(),t.YNc(9,Os,3,8,"div",72),t.qZA()),2&a){const n=t.oxw();t.Q6J("ngClass",t.VKq(10,vs,n.isUploadingVideo)),t.xp6(1),t.Q6J("formGroup",n.form),t.xp6(1),t.Q6J("ngIf",n.nameField),t.xp6(1),t.Q6J("ngIf",!n.isIndividual),t.xp6(1),t.Q6J("ngIf",!n.isIndividual&&n.isAlbumLocked),t.xp6(1),t.Q6J("ngIf",!n.isFreeChecked),t.xp6(1),t.Q6J("ngIf",n.requireAuthenticationCheckboxField&&n.showRequireAuthenticationCheckbox),t.xp6(1),t.Q6J("ngIf",n.downloadCheckboxField),t.xp6(1),t.Q6J("ngIf",n.postPreviewCheckboxField&&(!n.isEditMode&&n.isIndividual||!n.isIndividual&&!(null!=n.editingVideo&&n.editingVideo.sk))),t.xp6(1),t.Q6J("ngIf",n.showAddVideoForm&&!n.isIndividual)}}function Ts(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-image-cropper",134),t.NdJ("closeCrop",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.cancelCrop(i))})("cropImageUpload",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.imageFeedClicked(i))}),t.qZA()}if(2&a){const n=t.oxw();t.Q6J("imageChangeEvent",n.imageChangedEvent)("isOpen",n.isOpen)("cropperOptions",t.kEZ(4,bo,n.CROPPER_MIN_WIDTH,n.CROPPER_MIN_HEIGHT,n.ASPECT_RATIO_NUMERATOR/n.ASPECT_RATIO_DENOMINATOR))("imageWidth",n.imageWidth)}}function xs(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-loyalty-only-warning-modal",135,136),t.NdJ("proceeded",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyProceed())})("canceled",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyWarningCanceled())}),t.qZA()}}const Ss=function(a){return{"step-3-container-min-width":a}};let Fe=(()=>{const m=class{constructor(e,i,o,s,p,u,_,h,M){this.cs=e,this.uploadService=i,this.cdr=o,this.ngZone=s,this.modalHandlerService=p,this.apiCallService=u,this.modalService=_,this.route=h,this.router=M,this.isEditMode=!1,this.isIndividual=!1,this.showThumbnail=!0,this.isDirectDistributionChecked=!0,this.albumSk="",this.portfolioType=O.W.PORTFOLIO_TYPE.VIDEO,this.currentStepNumber=3,this.totalSteps=3,this.isUploadingVideo=!1,this.itemLockThrough={},this.albumLockThrough={},this.albumFreePreviewTime=0,this.disabledSubscriptionPlanIds=[],this.CONSTS=w,this.Ap
1plication=l.Mx,this.PORTFOLIO_TYPE_CONSTS=O.W,this.PORTFOLIO_BANNER_VIEW_CONSTS=ee.oM,this.MOBILE_BRIDGE_EVENT_SEND=$e.iJ,this.MUSIC_PLAYER_CONST=co.UU,this.INDIVIDUAL_PRICING_OPTION_TITLE=Y.vI.INDIVIDUAL_PRICING_OPTION_TITLE,this.INDIVIDUAL_PRICING_OPTIONS_HINT=Y.vI.INDIVIDUAL_PRICING_OPTIONS_HINT,this.PORTFOLIO_CONSTS=W.fD,this.commonEnum=ct.i4,this.PORTFOLIO_TYPE_ICON_MAP=ee.WT,this.pendingLoyaltyOnlySubmit=null,this.SKELETON_ITEMS=[Number(l.Mx.ONE),Number(l.Mx.TWO),Number(l.Mx.THREE)],this.AUTO_SCROLL_STEP=Number(l.Mx.THIRTY_FIVE),this.CIRCLE_RADIUS=Number(l.Mx.TWENTY_THREE),this.STROKE_WIDTH=l.Mx.THREE,this.ANIMATION_DURATION=Number(l.Mx.THREE_HUNDRED),this.BACKGROUND_PADDING=l.Mx.ZERO,this.TITLE_FONT_SIZE=Number(l.Mx.TEN),this.SPACE=l.Mx.MINUS_ONE*l.Mx.THREE,this.Z_INDEX=Number(l.Mx.TEN),this.CROPPER_MIN_WIDTH=Number(l.Mx.EIGHT_HUNDRED),this.CROPPER_MIN_HEIGHT=Number(l.Mx.FOUR_HUNDRED_FIFTY),this.ASPECT_RATIO_NUMERATOR=Number(l.Mx.SIXTEEN),this.ASPECT_RATIO_DENOMINATOR=Number(l.Mx.NINE),this.PORTFOLIO_CONSTS_CONST=at.fD,this.currentVideoMode=null,this.videoSelected=!1,this.videoFileName="",this.videoUrl="",this.videosForUploading=[],this.thumbnailPreview="",this.imageChangedEvent="",this.croppedImage="",this.imagesForUploading=[],this.isOpen=!1,this.imageWidth=l.Mx.ZERO,this.imageHeight=l.Mx.ZERO,this.feedPreviewOrientation=W.ox.LANDSCAPE,this.actualFeedPreviewOrientation=W.ox.LANDSCAPE,this.videoShowProgress=!1,this.videoPercent=l.Mx.ZERO,this.imageShowProgress=!1,this.imagePercent=l.Mx.ZERO,this.restrictedImages=[],this.enable=!0,this.videoReleaseType=null,this.yearOptions=[],this.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,international_prices:[]},this.freePreviewLock=w.FREE_PREVIEW_LOCK,this.addedVideos=[],this.showAddVideoForm=!1,this.editingVideo=null,this.editingVideoIndex=l.Mx.MINUS_ONE,this.isDragging=!1,this.timestamp=null,this.isSavingVideo=!1,this.destroy$=new X.x,this.requireAuthVisibilitySubscribed=!1,this.selectedItemDelete=null,this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.itemAddFromQueryHandled=!1}ngOnInit(){this.showAddVideoForm=!!this.isIndividual&&this.isDirectDistributionChecked,this.yearOptions=ve(),this.portfolioConfig=this.getPortfolioConfig(),this.initForm(),this.initFields(),this.restoreFormData(),this.initializeVideoReleaseType(),this.itemAddFromQueryHandled=!1,setTimeout(()=>{this.handleVideoEditFromQuery()},l.Mx.ONE_HUNDRED)}ngAfterViewChecked(){!this.requireAuthVisibilitySubscribed&&this.postPriceComponent&&(this.requireAuthVisibilitySubscribed=!0,this.setupRequireAuthVisibilitySubscription())}ngOnChanges(e){e.isDirectDistributionChecked&&this.isIndividual&&(this.showAddVideoForm=this.isDirectDistributionChecked),e.form&&this.form&&(this.portfolioConfig=this.getPortfolioConfig(),this.initForm(),this.initFields(),this.cdr.detectChanges(),setTimeout(()=>{this.handleVideoEditFromQuery()},l.Mx.ONE_HUNDRED))}initFields(){this.nameField=jt(this.portfolioType),this.descriptionField=y,this.requireAuthenticationCheckboxField=x(this.portfolioType),this.downloadCheckboxField=P(this.portfolioType,this.isIndividual),this.postPreviewCheckboxField=S(this.portfolioType,this.isIndividual),this.releaseDateField={type:W.sf.DATE_PICKER,label:"",name:"video_release_date",class:"col-12",placeholder:"Select Release Date"},this.releaseYearField=(a=>({type:W.sf.SELECT,label:"",name:"video_release_year",class:"col-12",placeholder:"Select Year",options:this.yearOptions,labelKey:"label",valueKey:"value"}))(),this.videoReleaseTypeYearField={type:W.sf.CHECKBOX,label:"",name:"video_release_type_year",class:"col-auto",options:[{label:w.YEAR_OPTION,value:w.RELEASE_TYPE_YEAR}],labelKey:"label",valueKey:"value"},this.videoReleaseTypeDateField={type:W.sf.CHECKBOX,label:"",name:"video_release_type_date",class:"col-auto",options:[{label:w.DATE_OPTION,value:w.RELEASE_TYPE_DATE}],labelKey:"label",valueKey:"value"},this.isFreeField=Re(this.portfolioType)}get albumCoverImage(){return this.form?.get("cover_image")?.value||""}get showAddSongForm(){return this.showAddVideoForm}get isFreeChecked(){const e=this.form?.get("is_free")?.value;return Array.isArray(e)&&e.includes(!0)}get showRequireAuthenticationCheckbox(){if(!this.isIndividual&&this.isAlbumLocked&&!this.isFreeChecked)return!1;const e=this.getPostPriceData(),i=this.buildLockThrough(e);return!this.hasLockThroughContent(i)}setupRequireAuthVisibilitySubscription(){const e=[],i=this.form?.get("is_free");i&&e.push(i.valueChanges),this.postPriceComponent?.postPriceForm&&e.push(this.postPriceComponent.postPriceForm.valueChanges),this.postPriceComponent?.ppForm&&e.push(this.postPriceComponent.ppForm.valueChanges),this.postPriceComponent?.nftForm&&e.push(this.postPriceComponent.nftForm.valueChanges),0!==e.length&&(0,ao.T)(...e).pipe((0,J.R)(this.destroy$)).subscribe(()=>{if(this.cdr.markForCheck(),!this.showRequireAuthenticationCheckbox){const o=this.form?.get("require_authentication");if(o){const s=o.value;Array.isArray(s)&&s.includes(!0)&&this.form?.patchValue({require_authentication:[]})}}})}initForm(){this.form||(this.form=new N.cw({}));const e=this.getPortfolioConfig();
1this.form.get(e.nameField)||this.form.addControl(e.nameField,new N.NI("")),this.form.get(e.fileField)||this.form.addControl(e.fileField,new N.NI("")),this.form.get("thumbnail")||this.form.addControl("thumbnail",new N.NI("")),!this.isIndividual&&!this.form.get("video_description")&&this.form.addControl("video_description",new N.NI("")),this.form.get("require_authentication")||this.form.addControl("require_authentication",new N.NI([])),this.form.get("allow_download")||this.form.addControl("allow_download",new N.NI([])),this.form.get("show_as_post")||this.form.addControl("show_as_post",new N.NI([])),!this.isIndividual&&!this.form.get("video_release_date")&&this.form.addControl("video_release_date",new N.NI(null)),!this.isIndividual&&!this.form.get("video_release_year")&&this.form.addControl("video_release_year",new N.NI(null)),!this.isIndividual&&!this.form.get("video_release_type_year")&&this.form.addControl("video_release_type_year",new N.NI([])),!this.isIndividual&&!this.form.get("video_release_type_date")&&this.form.addControl("video_release_type_date",new N.NI([])),this.form.get("is_free")||this.form.addControl("is_free",new N.NI([]))}getPortfolioConfig(){return Zt(this.portfolioType?.toLowerCase()||"",this.isIndividual)}resolveVideoModeFromUrl(e){if(!e||"string"!=typeof e)return Promise.resolve(l.Mx.LANDSCAPE);const i=(0,Q.p4)(e,[l.Mx.PORTFOLIO.toLowerCase()]);return i?Promise.resolve(i):(0,Q.hE)(null,e).then(o=>o?.videoMode||l.Mx.LANDSCAPE).catch(()=>l.Mx.LANDSCAPE)}isVideoPortrait(e){const i=e?.video_file;return!(!i||"string"!=typeof i)&&(0,Q.p4)(i,[l.Mx.PORTFOLIO.toLowerCase()])===l.Mx.PORTRAIT}syncIndividualVideoToAddedVideosAndForm(e){const o=this.form.get(this.portfolioConfig?.fileField||w.VIDEO_FILE_FIELD)?.value||this.videoUrl;if(!this.isIndividual||!o)return;const s=this.addedVideos[l.Mx.ZERO],p={id:s?.id||Date.now(),video_name:s?.video_name||"",video_file:o,thumbnail:this.form.get("thumbnail")?.value??s?.thumbnail??"",postPriceData:s?.postPriceData??null,videoFileName:(this.videoFileName||s?.videoFileName)??"",thumbnailPreview:(this.thumbnailPreview||s?.thumbnailPreview)??"",durationInSeconds:e?.durationInSeconds??s?.durationInSeconds??l.Mx.ZERO,sk:s?.sk??"",pk:s?.pk??"",require_authentication:s?.require_authentication??!1,allow_download:s?.allow_download??!1,show_as_post:s?.show_as_post??!1,is_free:s?.is_free??!1,release_date:s?.release_date??void 0,status:s?.status??O.W.PORTFOLIO_STATUS.ACTIVE};this.addedVideos=[p],this.syncVideosToForm()}get restrictLabel(){return(0,Ye.hT)(this.portfolioType,this.isIndividual?w.RESTRICT_LABEL_INDIVIDUAL:w.RESTRICT_LABEL)}get directDistributionTitle(){const e=(this.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM;return w.OPTIONAL_DIRECT_DISTRIBUTION[e in w.OPTIONAL_DIRECT_DISTRIBUTION?e:O.W.PORTFOLIO_TYPE.CUSTOM]||w.OPTIONAL_DIRECT_DISTRIBUTION[O.W.PORTFOLIO_TYPE.CUSTOM]}get directSalesInfoMessage(){const e=(this.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM;return w.DIRECT_SALES_INFO_MESSAGE[e in w.DIRECT_SALES_INFO_MESSAGE?e:O.W.PORTFOLIO_TYPE.CUSTOM]||w.DIRECT_SALES_INFO_MESSAGE[O.W.PORTFOLIO_TYPE.CUSTOM]}get freePreviewDurationLabel(){const e=(this.portfolioType||"").toUpperCase()||O.W.PORTFOLIO_TYPE.CUSTOM;return w.FREE_PREVIEW_DURATION_LABEL[e in w.FREE_PREVIEW_DURATION_LABEL?e:O.W.PORTFOLIO_TYPE.CUSTOM]||w.FREE_PREVIEW_DURATION_LABEL[O.W.PORTFOLIO_TYPE.CUSTOM]}get isAlbumLocked(){return!this.isIndividual&&this.hasLockThroughContent(this.albumLockThrough||{})}get isStep3Valid(){return this.isIndividual?!this.isDirectDistributionChecked||!this.showAddVideoForm&&this.isFormValid:!(!this.addedVideos||this.addedVideos.length===l.Mx.ZERO||this.showAddVideoForm)}restoreFormData(){const e=this.form?.get(this.portfolioConfig?.fileField||"video_file")?.value;e&&"string"==typeof e&&(this.videoSelected=!0,this.videoPreview=e,this.videoUrl=e,this.videoFileName=O.W.VIDEO_FILE||"Video File",this.timestamp=(0,Q.e4)(e),this.resolveVideoModeFromUrl(e).then(_=>{this.currentVideoMode=_,this.cdr.detectChanges()}));const i=this.form?.get("items")?.value;i&&Array.isArray(i)&&i.length>l.Mx.ZERO&&(this.addedVideos=i.map(_=>({..._,status:_.status||O.W.PORTFOLIO_STATUS.ACTIVE})));const o=this.form?.get("thumbnail")?.value;o&&"string"==typeof o&&(this.thumbnailPreview=o);const s=this.form?.get("allow_download")?.value;null==s&&this.form?.get("allow_download")?.setValue([]);const p=this.form?.get("show_as_post")?.value;null==p&&this.form?.get("show_as_post")?.setValue([]);const u=this.form?.get("require_authentication")?.value;null==u&&this.form?.get("require_authentication")?.setValue([])}
1initializeVideoReleaseType(){if(!this.form||this.isIndividual)return;const e=this.form.get("video_release_year")?.value,i=this.form.get("video_release_date")?.value;null!=e&&""!==e?(this.videoReleaseType=w.RELEASE_TYPE_YEAR,this.form.patchValue({video_release_type_year:[w.RELEASE_TYPE_YEAR],video_release_type_date:[]},{emitEvent:!1})):null!=i&&""!==i?(this.videoReleaseType=w.RELEASE_TYPE_DATE,this.form.patchValue({video_release_type_year:[],video_release_type_date:[w.RELEASE_TYPE_DATE]},{emitEvent:!1})):(this.videoReleaseType=null,this.form.patchValue({video_release_type_year:[],video_release_type_date:[]},{emitEvent:!1}))}onVideoReleaseTypeChange(e){if(this.form&&!this.isIndividual)if(this.videoReleaseType===e)this.videoReleaseType=null,this.form.patchValue({video_release_date:null,video_release_year:null,video_release_type_year:[],video_release_type_date:[]});else{this.videoReleaseType=e;const i=(new Date).getFullYear();this.form.patchValue(e===w.RELEASE_TYPE_YEAR?{video_release_date:null,video_release_year:i.toString(),video_release_type_year:[w.RELEASE_TYPE_YEAR],video_release_type_date:[]}:{video_release_year:null,video_release_date:new Date,video_release_type_year:[],video_release_type_date:[w.RELEASE_TYPE_DATE]})}}onVideoReleaseTypeYearChange(){this.onVideoReleaseTypeChange(w.RELEASE_TYPE_YEAR)}onVideoReleaseTypeDateChange(){this.onVideoReleaseTypeChange(w.RELEASE_TYPE_DATE)}get thumbnailFieldConfig(){return{fileLabel:w.VIDEO_COVER_IMAGE,uploadLabel:w.UPLOAD_IMAGE,fileTypes:w.IMAGE_FILE_TYPES,acceptTypes:l.Mx.IMAGE_ACCEPT_TYPES_INCLUDING_GIF,requiredMessage:w.VIDEO_COVER_IMAGE_REQUIRED}}fileChangeEvent(e,i){this.imageShowProgress||!e?.target?.files?.[0]||i===w.THUMBNAIL&&this.handleImageUpload(e)}handleImageUpload(e){this.cs.handleFileChangeEvent(e,{maxSize:W.eG,minWidth:Number(l.Mx.EIGHTY),minHeight:Number(l.Mx.EIGHTY),isValidFile:i=>Boolean(this.cs.isValidFile(i)),uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,maxSizeMessage:w.IMAGE_FILE_SIZE_MESSAGE,recommendedSize:{width:l.Mx.EIGHT_HUNDRED,height:l.Mx.FOUR_HUNDRED_FIFTY}}).then(i=>{this.ngZone.run(()=>{this.cdr.detectChanges(),this.imageWidth=i.imageWidth,this.imageHeight=i.imageHeight,i.isGif?(this.imageChangedEvent=i.event,this.setBannerOrientation(i.imageWidth>i.imageHeight),this.imageFeedClicked(null,!1,!0)):(this.isOpen=!0,this.cs.setBodyClass(!1),this.imageChangedEvent=i.event,this.setBannerOrientation(i.imageWidth>i.imageHeight))})}).catch(i=>{this.cs.showErrorMessage(i.message)})}imageFeedClicked(e,i=!1,o=!1){this.isOpen=!1,this.cs.setBodyClass(!0),this.imageShowProgress=!0,this.imagePercent=l.Mx.ZERO,this.restrictedImages=[],this.cdr.detectChanges();const s=this.imageChangedEvent?.target?.files?.[l.Mx.ZERO],p=o||s&&s.type===l.Mx.IMAGE_GIF_TYPE;this.cs.handleImageFeedClicked({croppedImage:e||this.croppedImage,imageChangedEvent:this.imageChangedEvent,base64ToFile:$t.Ll,isValidFile:u=>Boolean(this.cs.isValidFile(u)),uploadService:this.uploadService,apiUrl:U.Y9.uploadFile,folder:l.D4.createPostImageFolder,fileType:s?.type,uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,isMobileApp:i,mobileFileData:e,isGif:p,onProgress:u=>{this.ngZone.run(()=>{this.imagePercent=u,this.cdr.detectChanges()})}}).then(({preview:u,url:_})=>{this.ngZone.run(()=>{this.imagePercent=l.Mx.ONE_HUNDRED,this.cdr.detectChanges(),setTimeout(()=>{this.imageShowProgress=!1,this.imagePercent=l.Mx.ZERO,this.thumbnailPreview=u,this.form.patchValue({thumbnail:_}),this.cdr.detectChanges()},l.Mx.THREE_HUNDRED)})}).catch(u=>{if(this.imageShowProgress=!1,this.imagePercent=l.Mx.ZERO,this.cdr.detectChanges(),u?.restricted&&u?.restrictedImage)return this.restrictedImages=[u.restrictedImage],this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages),void this.removeThumbnail();u?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(u.message||nt.Vm.SOMETHING_WENT_WRONG),this.removeThumbnail()})}removeThumbnail(){this.form.get("thumbnail")?.reset(),this.thumbnailPreview="",this.imageShowProgress=!1,this.imagePercent=l.Mx.ZERO}setBannerOrientation(e){this.feedPreviewOrientation=e?W.ox.LANDSCAPE:W.ox.PORTRAIT}cancelCrop(){this.isOpen=!1,this.cs.setBodyClass(!0)}uploadVideoFile(e){const i=e?.target?.files?.[l.Mx.ZERO];i&&(this.cs.isValidAudioVideo(i,"video")?i.size<=l.Mx.MOVIE_FILE_SIZE_LIMIT?(0,Q.hE)(i).then(o=>{this.currentVideoMode=o.videoMode||null,this.videoSelected=!0;const s=e.target?.files?.[l.Mx.ZERO];if(!s)return;this.videoPreview=URL.createObjectURL(s),this.videoFileName=s.name;const p=s.name?.split(".").pop()||"mp4",u=this.timestamp||Date.now(),_=`portfolio_${u}_${(0,Q.D1)()}_${o.videoMode}_${(0,Q.D1)()}.${p}
1`,h=lo.N.s3Config.bucketUrl+l.D4.portfolioContentFolder+_;this.form.patchValue({[this.portfolioConfig?.fileField||"video_file"]:h}),this.isIndividual&&(this.videoUrl=h,this.syncIndividualVideoToAddedVideosAndForm({durationInSeconds:o.duration?Math.ceil(o.duration):void 0}));const M=o.duration?Math.ceil(o.duration):l.Mx.ZERO,I={file:s,fileName:_,folder:l.D4.portfolioContentFolder,metadata:{user_id:this.userProfile?.gsi4pk||"",content_type:O.W.PORTFOLIO_TYPE.VIDEO.toLowerCase(),media_id:u.toString(),free_preview_time:l.Mx.ZERO.toString(),preview_required:"false",duration:M.toString()}};if(this.videosForUploading.push(I),this.isIndividual)if(this.form?.get("cover_image")?.value)this.uploadVideoToS3();else{const E=(0,fo.vw)(s);this.openVideoTrimModal(E,o.videoMode)}else if(this.form?.get("thumbnail")?.value||this.thumbnailPreview)this.uploadVideoToS3();else{const E=(0,fo.vw)(s);this.openVideoTrimModal(E,o.videoMode)}}).catch(()=>{this.removeVideoFile(),this.cs.showErrorMessage(nt.Vm.INVALID_FILE_TYPE)}):(this.removeVideoFile(),this.cs.showErrorMessage(w.VIDEO_FILE_SIZE_MESSAGE)):(this.removeVideoFile(),this.cs.showErrorMessage(nt.Vm.INVALID_FILE_TYPE)))}mobileVideoFileChangeEvent(e){if(e&&e.length>l.Mx.ZERO){const i=e[l.Mx.ZERO];i&&this.uploadVideoFile({target:{files:[i]}})}}removeVideoFile(){this.videoPreview&&"string"==typeof this.videoPreview&&this.videoPreview.startsWith("blob:")&&URL.revokeObjectURL(this.videoPreview),this.form.get(this.portfolioConfig?.fileField||"video_file")?.reset(),this.videosForUploading=[],this.videoSelected=!1,this.videoPreview="",this.videoFileName="",this.videoUrl="",this.timestamp=null,this.currentVideoMode=null,this.isIndividual&&this.form?.get("items")&&(this.addedVideos=[],this.form.get("items")?.setValue([],{emitEvent:!1}))}openVideoTrimModal(e,i){const o=Object.assign({isMyProfile:!1,otherUserEmail:this.userProfile?.email||"",gsi4pk:this.userProfile?.gsi4pk||"",username:this.userProfile?.user_name||"",firstName:this.userProfile?.first_name||"",lastName:this.userProfile?.last_name||"",pk:this.userProfile?.pk||"",sk:this.userProfile?.original_sk||this.userProfile?.sk||"",originalPk:this.userProfile?.gsi1pk||"",originalSk:this.userProfile?.sk||"",video:e,videoMode:i,isWatermark:!1});this.modalRef=this.modalService.show(Pn.M,{initialState:o,ignoreBackdropClick:!0,class:"video-trim-modal",keyboard:!1});const s=this.modalRef.content;s&&(s.confirmed.subscribe(p=>{this.cdr.detectChanges(),p&&p.src&&this.handleThumbnailFromTrimModal(p.src),this.uploadVideoToS3()}),s.cancelled.subscribe(()=>{this.removeVideoFile()}))}handleThumbnailFromTrimModal(e){if(e)try{const i=(0,$t.Ll)(e),o=`portfolio_thumbnail_${Date.now()}_${(0,Q.D1)()}.png`,s=new File([i],o,{type:"image/png"});if(!this.cs.isValidFile(s))return void this.cs.showErrorMessage(nt.Vm.INVALID_FILE_TYPE);this.imageChangedEvent={target:{files:[s]}},this.croppedImage=e,this.isIndividual?this.handleCoverImageFromTrimModal(e,s):this.imageFeedClicked(null,!1,!1)}catch{this.cs.showErrorMessage(nt.Vm.SOMETHING_WENT_WRONG)}}handleCoverImageFromTrimModal(e,i){this.imageShowProgress=!0,this.imagePercent=l.Mx.ZERO,this.restrictedImages=[],this.cdr.detectChanges(),this.cs.handleImageFeedClicked({croppedImage:e,imageChangedEvent:this.imageChangedEvent,base64ToFile:$t.Ll,isValidFile:o=>Boolean(this.cs.isValidFile(o)),uploadService:this.uploadService,apiUrl:U.Y9.uploadFile,folder:l.D4.createPostImageFolder,fileType:i?.type,uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,isMobileApp:!1,mobileFileData:null,isGif:!1,onProgress:o=>{this.ngZone.run(()=>{this.imagePercent=o,this.cdr.detectChanges()})}}).then(({url:o})=>{this.ngZone.run(()=>{this.imagePercent=l.Mx.ONE_HUNDRED,this.cdr.detectChanges(),setTimeout(()=>{this.imageShowProgress=!1,this.imagePercent=l.Mx.ZERO,this.form.patchValue({cover_image:o}),this.cdr.detectChanges()},l.Mx.THREE_HUNDRED)})}).catch(o=>{if(this.imageShowProgress=!1,this.imagePercent=l.Mx.ZERO,this.cdr.detectChanges(),o?.restricted&&o?.restrictedImage)return this.restrictedImages=[o.restrictedImage],void this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages);o?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(o.message||nt.Vm.SOMETHING_WENT_WRONG)})}uploadVideoToS3(){if(this.videosForUploading.length===l.Mx.ZERO)return;this.isUploadingVideo=!0,this.form&&Object.keys(this.form.controls).forEac
1h(p=>{const u=this.form.get(p);u&&u.disable()}),this.postPriceComponent&&(this.postPriceComponent.postPriceForm&&Object.keys(this.postPriceComponent.postPriceForm.controls).forEach(p=>{const u=this.postPriceComponent.postPriceForm.get(p);u&&u.disable()}),this.postPriceComponent.ppForm&&Object.keys(this.postPriceComponent.ppForm.controls).forEach(p=>{const u=this.postPriceComponent.ppForm.get(p);u&&u.disable()}),this.postPriceComponent.nftForm&&Object.keys(this.postPriceComponent.nftForm.controls).forEach(p=>{const u=this.postPriceComponent.nftForm.get(p);u&&u.disable()})),this.videoShowProgress=!0,this.videoPercent=l.Mx.ZERO,this.cdr.detectChanges();const e=this.getPostPriceData(),i=e?.form?.free_preview?Number(e.form.free_preview):l.Mx.ZERO,o=i>l.Mx.ZERO,s=this.videosForUploading.map(p=>(p.metadata&&(p.metadata.free_preview_time=i.toString(),p.metadata.preview_required=o.toString()),this.uploadService.uploadFiles(p,!0)));if(s.length>l.Mx.ZERO){const p=s[l.Mx.ZERO];p.on("httpUploadProgress",u=>{this.ngZone.run(()=>{this.videoPercent=Math.round(u.loaded/u.total*l.Mx.ONE_HUNDRED),this.cdr.detectChanges()})}),p.promise().then(()=>{this.ngZone.run(()=>{this.videoShowProgress=!1,this.videoPercent=l.Mx.ZERO,this.isUploadingVideo=!1,this.videoUrl=this.form.get(this.portfolioConfig?.fileField||"video_file")?.value||"",this.videosForUploading=[],this.syncIndividualVideoToAddedVideosAndForm(),this.form&&Object.keys(this.form.controls).forEach(u=>{const _=this.form.get(u);_&&_.enable()}),this.postPriceComponent&&(this.postPriceComponent.postPriceForm&&Object.keys(this.postPriceComponent.postPriceForm.controls).forEach(u=>{const _=this.postPriceComponent.postPriceForm.get(u);_&&_.enable()}),this.postPriceComponent.ppForm&&Object.keys(this.postPriceComponent.ppForm.controls).forEach(u=>{const _=this.postPriceComponent.ppForm.get(u);_&&_.enable()}),this.postPriceComponent.nftForm&&Object.keys(this.postPriceComponent.nftForm.controls).forEach(u=>{const _=this.postPriceComponent.nftForm.get(u);_&&_.enable()})),this.cdr.detectChanges()})}).catch(u=>{this.ngZone.run(()=>{this.videoShowProgress=!1,this.videoPercent=l.Mx.ZERO,this.isUploadingVideo=!1,this.form&&Object.keys(this.form.controls).forEach(_=>{const h=this.form.get(_);h&&h.enable()}),this.postPriceComponent&&(this.postPriceComponent.postPriceForm&&Object.keys(this.postPriceComponent.postPriceForm.controls).forEach(_=>{const h=this.postPriceComponent.postPriceForm.get(_);h&&h.enable()}),this.postPriceComponent.ppForm&&Object.keys(this.postPriceComponent.ppForm.controls).forEach(_=>{const h=this.postPriceComponent.ppForm.get(_);h&&h.enable()}),this.postPriceComponent.nftForm&&Object.keys(this.postPriceComponent.nftForm.controls).forEach(_=>{const h=this.postPriceComponent.nftForm.get(_);h&&h.enable()})),this.cs.showErrorMessage(u?.message||nt.Vm.SOMETHING_WENT_WRONG),this.removeVideoFile()})})}}get isFormValid(){try{if(this.isIndividual&&!this.isDirectDistributionChecked)return!0;if(!this.form)return!1;if(!this.isIndividual){const o=this.form.get(this.portfolioConfig?.nameField||"video_name");if(!o?.value||!o.value.trim())return!1}return!!this.form.get(this.portfolioConfig?.fileField||"video_file")?.value&&this.validatePostPrice().isValid}catch(e){return console.error("Error in isFormValid:",e),!1}}handleCancel(){const e=null!==this.editingVideo&&this.editingVideoIndex>=l.Mx.ZERO;e&&(this.editingVideo=null,this.editingVideoIndex=l.Mx.MINUS_ONE),this.resetForm(!e),this.showAddVideoForm=!1,this.cdr.detectChanges()}toggleAddVideoForm(){this.showAddVideoForm=!this.showAddVideoForm,this.showAddVideoForm?(this.editingVideo=null,this.editingVideoIndex=l.Mx.MINUS_ONE,this.resetForm()):(null!==this.editingVideo&&this.editingVideoIndex>=l.Mx.ZERO&&(this.editingVideo=null,this.editingVideoIndex=l.Mx.MINUS_ONE),this.resetForm())}hasLockThroughContent(e){return!(!e||"object"!=typeof e||!(e.individual?.individual_price&&""!==e.individual.individual_price.trim()||e.subscription&&Array.isArray(e.subscription)&&e.subscription.length>l.Mx.ZERO||e.nft&&Array.isArray(e.nft)&&e.nft.length>l.Mx.ZERO||e.individual?.outer_subscription&&e.individual.outer_subscription.length>l.Mx.ZERO||e.individual?.outer_nft&&e.individual.outer_nft.length>l.Mx.ZERO))}shouldShowLoyaltyOnlyWarningForItemLock(e){return!(!(0,ht.Ix)((0,ht.si)(e))||!this.isIndividual&&Array.isArray(this.disabledSubscriptionPlanIds)&&this.disabledSubscriptionPlanIds.length>l.Mx.ZERO)}resetForm(e=!0){const i=this.getPortfolioConfig();this.form.get(i.nameField)&&this.form.get(i.nameField)?.reset(),this.form.get(i.fileField)&&this.form.get(i.fileField)?.reset(),this.form.get("thumbnail")&&this.form.get("thumbnail")?.reset(),!this.isIndividual&&this.form.get("video_description")&&this.form.get("video_description")?.reset(),this.form.get("require_authentication")&&this.form.get("require_authentication")?.setValue([]),this.form.get("allow_download")&&this.form.get("allow_download")?.setValue([]),this.form.get("show_as_post")&&this.form.get("show_as_post")?.setValue([]),!this.isIndividual&&this.form.get("video_release_date")&&e&&this.editingVideoIndex<l.Mx.ZERO&&this.form.get("video_release_date")?.setValue(null),!this.isIndividual&&e&&(this.videoReleaseType=null,this.form.get("video_release_year")&&this.form.get("video_release_year")?.setValue(null),this.form.get("video_release_type_year")&&this.form.get("video_release_type_year")?.setValue([]),this.form.get("video_release_type_date")&&this.form.get("video_release_type_date")?.setValue([])),this.form.get("is_free")&&this.form.get("is_free")?.setValue([]),this.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]},this.videoSelected=!1,this.videoPreview&&"string"==typeof this.videoPreview&&this.videoPreview.startsWith("blob:")&&URL.revokeObjectURL(this.videoPreview),this.videoPreview="",this.videoFileName="",this.videosForUploading=[],this.thumbnailPreview="",this.videoShowProgress=!1,this.videoPercent=l.Mx.ZERO,this.imageShowProgress=!1,this.imagePercent=l.Mx.ZERO,this.isUploadingVideo=!1,this.isSavingVideo=!1,this.isOpen=!1,this.imageWidth=l.Mx.ZERO,this.imageHeight=l.Mx.ZERO,this.timestamp=null,this.currentVideoMode=null,this.editingVideo=null,this.editingVideoIndex=l.Mx.MINUS_ONE,this.postPriceComponent&&(this.postPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.postPriceComponent.addedNFTIds=[],this.postPriceComponent.postPriceForm&&this.postPriceComponent.postPriceForm.reset({free_preview:l.Mx.ZERO,preview_image:"",description:"",archive_post:"",is_comment_enable:"",accept_tip_on_livestream:"",hashTagList:[]}),this.postPriceComponent.ppForm&&this.postPriceComponent.ppForm.reset(),this.postPriceComponent.loyaltyPointsForm&&this.postPriceComponent.loyaltyPointsForm.reset(),this.postPriceComponent.subPlanList&&this.postPriceComponent.subPlanList.forEach(o=>{o.isSelected=!1}))}validatePostPrice(){if(!this.postPriceComponent)return{isValid:!0};const e=this.postPriceComponent.postPriceObj;if(!e)return{isValid:!0};const i=this.postPriceComponent.ppForm,o=this.postPriceComponent.postPriceForm,s=this.postPriceComponent.addedNFTIds||[];if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft))return{isValid:!0};if(e.is_loyalty_points){const p=this.postPriceComponent.loyaltyPointsForm,u=(0,ht.pL)(p?.get("loyalty_points")?.value);if(!p||p.invalid||null==u)return{isValid:!1,errorMessage:je.YJ.RANGE_HINT}}if(e.is_ind_purchase){if(!i||!Number(i.controls.indPrice?.value))return{isValid:!1,errorMessage:w.ENTER_VALID_INDIVIDUAL_PRICE};if(i.controls.userList?.value?.length&&i.controls.userList.value.reduce((u,_)=>u+(Number(_.revenueSplit)||l.Mx.ZERO),l.Mx.ZERO)>l.Mx.ONE_HUNDRED)return{isValid:!1,errorMessage:w.REVENUE_SPLIT_EXCEEDS_100}}return e.is_lock_with_nft&&!s.length?{isValid:!1,errorMessage:W.ET.P
1LEASE_ADD_NFT_OPTION}:this.postPriceFilledData?.isActiveLiveStream&&o?.invalid?{isValid:!1,errorMessage:w.FILL_ALL_REQUIRED_FIELDS}:{isValid:!0}}handleAddVideo(){if(this.isUploadingVideo||this.videoShowProgress||this.imageShowProgress)return;if(!this.form)return void this.cs.showErrorMessage(w.FORM_NOT_INITIALIZED);const e=this.form.get(this.portfolioConfig?.nameField||"video_name"),i=this.form.get(this.portfolioConfig?.fileField||"video_file");Object.keys(this.form.controls).forEach(p=>{const u=this.form.get(p);u&&u.markAsTouched()});const o=e?.value;if(!o||"string"==typeof o&&!o.trim())return void this.cs.showErrorMessage(w.VIDEO_NAME_REQUIRED);if(!i?.value)return void this.cs.showErrorMessage(w.VIDEO_FILE_REQUIRED);const s=this.validatePostPrice();s.isValid?this.addVideoToArray():this.cs.showErrorMessage(s.errorMessage||w.FIX_PRICING_OPTIONS)}handleSaveIndividualVideo(){this.handleAddVideo()}getPostPriceData(){if(!this.postPriceComponent)return null;const e=this.postPriceComponent.postPriceObj,i=this.postPriceComponent.ppForm,o=this.postPriceComponent.postPriceForm,s=this.postPriceComponent.subPlanList||[],p=this.postPriceComponent.addedNFTIds||[];if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft)&&(this.isIndividual||!this.isAlbumLocked))return null;const M={is_subscription:e.is_subscription||!1,is_indivudiual_price:e.is_ind_purchase||!1,is_nft_added:e.is_lock_with_nft||!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.postPriceComponent.currencyConversionData?.adjustedPrices||[]};if(e.is_ind_purchase&&i&&(M.indivisualPrice=i.controls.indPrice?.value||""),e.is_loyalty_points){const I=this.postPriceComponent.loyaltyPointsForm?.get("loyalty_points")?.value,A=Number(I);M.loyalty_points=Number.isFinite(A)&&A>0?A:null}if(e.is_subscription&&s.length>l.Mx.ZERO&&s.forEach(I=>{I.isSelected&&M.subscriptions.push({sk:I.sk,pk:I.pk,title:I.name,duration:I.duration,amount:I.price,discount_offer:I.discount_offer})}),e.is_lock_with_nft&&(M.nftIDList=[...p]),o){let I=[];try{I=this.postPriceComponent.getSelectedHashTag()}catch{I=[]}const A=o.value||{};if(null==A.free_preview){const E=o.get("free_preview");A.free_preview=null!=E?.value?E.value:l.Mx.ZERO}if(M.form=A,M.tags=I,this.postPriceComponent.isDoubleLockingEnable&&o.get("lock")?.value?.lockValue){const E=o.get("lock")?.value?.lockValue;M.outer_subscription=E?.subscription||[],M.outer_nft=E?.NFT||[]}}return M}createVideoData(e){const i=this.editingVideo?.id||Date.now(),o=this.editingVideo?.durationInSeconds||l.Mx.ZERO;let s="";s=this.isIndividual?this.editingVideo?.video_name||"":this.form.get(this.portfolioConfig?.nameField||"video_name")?.value||"";const p=this.form.get("allow_download")?.value||[],u=Array.isArray(p)&&p.length>l.Mx.ZERO&&p.includes(!0),_=this.form.get("show_as_post")?.value||[],h=Array.isArray(_)&&_.length>l.Mx.ZERO&&_.includes(!0),M=this.form.get("require_authentication")?.value||[],I=Array.isArray(M)&&M.length>l.Mx.ZERO&&M.includes(!0),A=this.form.get("is_free")?.value||[],E=Array.isArray(A)&&A.includes(!0);let q=null;if(!this.isIndividual)if(this.videoReleaseType===w.RELEASE_TYPE_YEAR){const et=this.form.get("video_release_year")?.value;q=et?et.toString():null}else if(this.videoReleaseType===w.RELEASE_TYPE_DATE){const et=this.form.get("video_release_date")?.value;q=(0,Q.YF)(et)}const z={id:i,video_name:s,video_file:this.form.get(this.portfolioConfig?.fileField||"video_file")?.value,thumbnail:this.form.get("thumbnail")?.value||"",videosForUploading:[],postPriceData:e,videoFileName:this.videoFileName,thumbnailPreview:this.thumbnailPreview,durationInSeconds:o,sk:this.editingVideo?.sk||"",pk:this.editingVideo?.pk||"",require_authentication:I,allow_download:u,show_as_post:h,is_free:E,release_date:null!==q?q:void 0,created_at:this.editingVideo?.created_at||void 0,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE};return this.isIndividual||(z.description=this.form.get("video_description")?.value||""),z}calculateAndSaveDuration(e,i,o){const s=e.id,p=_=>{e.durationInSeconds=_;const h=this.addedVideos.findIndex(M=>M.id===s);h!==l.Mx.MINUS_ONE?(this.addedVideos[h].durationInSeconds=_,this.addedVideos[h].status=e.status||O.W.PORTFOLIO_STATUS.ACTIVE,this.cdr.detectChanges()):this.albumSk||(this.addedVideos.push({...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE}),this.syncVideosToForm(),this.cdr.detectChanges()),this.albumSk&&this.saveIndividualContentToAlbum(e,i)},u=document.createElement("video");u.preload="metadata",u.src=o,u.addEventListener("loadedmetadata",()=>{const _=Math.ceil(u.duration);p(_)}),u.addEventListener("error",()=>{if(this.videosForUploading.length>l.Mx.ZERO&&this.videosForUploading[l.Mx.ZERO].file){const _=URL.createObjectURL(this.videosForUploading[l.Mx.ZERO].file),h=document.createElement("video");h.preload="metadata",h.src=_,h.addEventListener("loadedmetadata",()=>{const M=Math.ceil(h.duration);URL.revokeObjectURL(_),p(M)}),h.addEventListener("error",()=>{URL.revokeObjectURL(_),this.albumSk&&this.saveIndividualContentToAlbum(e,i)})}else this.albumSk&&this.saveIndividualContentToAlbum(e,i)})}handleNewVideo(e,i){const o=e.video_file;o&&this.albumSk&&this.calculateAndSaveDuration(e,i,o)}handleEditVideo(e,i){const o=e.video_file;if(!o||this.editingVideo.durationInSeconds&&this.editingVideo.durationInSeconds!==l.Mx.ZERO&&o===this.editingVideo.video_file)if(this.albumSk)this.saveIndividualContentToAlbum(e,i);else{if(this.editingVideoIndex>=l.Mx.ZERO&&this.editingVideoIndex<this.addedVideos.length){const u={...this.addedVideos[this.editingVideoIndex],...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedVideos[this.editingVideoIndex]=u,this.syncVideosToForm(),this.cdr.detectChanges()}this.editingVideo=null,this.editingVideoIndex=l.Mx.MINUS_ONE}else this.calculateAndSaveDuration(e,i,o)}addVideoToArray(){this.isIndividual&&(this.addedVideos=[]);const e=this.getPostPriceData(),i=this.createVideoData(e);null!==this.editingVideo&&this.editingVideoIndex>=l.Mx.ZERO?this.handleEditVideo(i,e):this.handleNewVideo(i,e),this.videosForUploading=[],this.cdr.detectChanges()}toggleChanged(e){this.enable=e}buildLockThrough(e){if(!e)return{individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};const i=e?.loyalty_points;return{individual:{outer_subscription:e.outer_subscription||[],outer_nft:e.outer_nft||[],individual_price:e.indivisualPrice||"",...i&&{loyalty_points:Number(i)}},subscription:e.subscriptions||[],nft:e.nftIDList||[]}}saveIndividualContentToAlbum(e,i,o=!1){if(this.albumSk&&e)if(e.sk&&e.pk)this.updateVideo(e,i);else{this.isSavingVideo=!0;const s=this.buildLockThrough(i),p=e.video_file||"",u=e.durationInSeconds||l.Mx.ZERO,_=this.timestamp||(0,Q.e4)(p)||Date.now(),h=i?.form?.free_preview?Number(i.form.free_preview):l.Mx.ZERO,M=(0,Q.p4)(p,[l.Mx.PORTFOLIO.toLowerCase()])===l.Mx.PORTRAIT,I={type:this.portfolioType.toUpperCase(),album_sk:this.albumSk,title:e.video_name||"",file:p,cover_image_url:e.thumbnail||this.albumCoverImage||"",duration:u,lock_through:s,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,free_preview_time:h,media_id:_.toString(),require_authentication:void 0!==e.require_authentication&&e.require_authentication,allow_download:void 0===e.allow_download||e.allow_download,show_as_post:void 0!==e.show_as_post&&e.show_as_post,is_free:void 0!==e.is_free&&e.is_free,release_date:e.release_date||null,international_prices:i?.international_prices||[]};if(M&&(I.is_portrait=!0),!this.isIndividual&&void 0!==e.description&&(I.description=e.description||""),!o&&this.shouldShowLoyaltyOnlyWarningForItemLock(I.lock_through))return this.pendingLoyaltyOnlySubmit=()=>this.saveIndividualContentToAlbum(e,i,!0),void this.loyaltyOnlyWarningModal?.openModal();this.apiCallService.post(U.Y9.portfolioContentAlbum,I,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:A=>{if(this.isSavingVideo=!1,A.status&&A.data){if(e.id){const E=this.addedVideos.findIndex(q=>q.id===e.id);if(E!==l.Mx.MINUS_ONE)this.addedVideos[E].sk=A.data.sk||"",this.addedVideos[E].pk=A.data.pk||"",this.addedVideos[E].status=e.status||A.data.status||O.W.PORTFOLIO_STATUS.ACTIVE,this.syncVideosToForm();else{const q={...e,sk:A.data.sk||"",pk:A.data.pk||"",status:e.status||A.data.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedVideos.push(q),this.syncVideosToForm()}}this.isIndividual||(this.resetForm(),this.isUploadingVideo=!1,this.showAddVideoForm=!1),this.cs.showSuccessMessage(A.message||this.CONSTS.VIDEO_SAVED_SUCCESS)}else this.isUploadingVideo=!1,this.cs.showErrorMessage(A.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:A=>{this.isSavingVideo=!1,this.isUploadingVideo=!1,this.cs.showErrorMessage(A?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}}updateVideo(e,i,o=!1){if(!e.sk||!e.pk)return;this.isSavingVideo=!0;const s=this.buildLockThrough(i),p=e.video_file||"",u=e.durationInSeconds||l.Mx.ZERO,_=this.timestamp||(0,Q.e4)(p)||Date.now(),h=i?.form?.free_preview?Number(i.form.free_preview):this.albumFreePreviewTime||l.Mx.ZERO,M=(0,Q.p4)(p,[l.Mx.PORTFOLIO.toLowerCase()])===l.Mx.PORTRAIT,I={type:this.portfolioType.toUpperCase(),pk:e.pk,sk:e.sk,title:e.video_name||"",file:p,cover_image_url:e.thumbnail||this.albumCoverImage||"",duration:u,lock_through:s,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,free_preview_time:h,media_id:_.toString(),require_authentication:void 0!==e.require_authentication&&e.require_authentication,allow_download:void 0!==e.allow_download&&e.allow_download,show_as_post:void 0!==e.show_as_post&&e.show_as_post,is_free:void 0!==e.is_free&&e.is_free,release_date:e.release_date||null,international_prices:i?.international_prices||[]};if(M&&(I.is_portrait=!0),!this.isIndividual&&void 0!==e.description&&(I.description=e.description||""),!o&&this.shouldShowLoyaltyOnlyWarningForItemLock(I.lock_through))return this.pendingLoyaltyOnlySubmit=()=>this.updateVideo(e,i,!0),void this.loyaltyOnlyWarningModal?.openModal();this.apiCallService.put(U.Y9.portfolioContent,I,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:A=>{if(this.isSavingVideo=!1,A.status&&A.data){const E=this.addedVideos.findIndex(z=>z.sk===e.sk),q={...e,status:e.status||A.data.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedVideos.splice(E,l.Mx.ONE,q),this.syncVideosToForm(),this.cs.showSuccessMessage(A.message||this.CONSTS.VIDEO_UPDATED_SUCCESS),this.isIndividual||(this.resetForm(),this.isUploadingVideo=!1,this.showAddVideoForm=!1)}else if(A.status){const E=this.addedVideos.findIndex(z=>z.sk===e.sk),q={...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedVideos.splice(E,l.Mx.ONE,q),this.syncVideosToForm(),this.cs.showSuccessMessage(A.message||this.CONSTS.VIDEO_UPDATED_SUCCESS),this.isIndividual||(this.resetForm(),this.isUploadingVideo=!1,this.showAddVideoForm=!1)}else this.isUploadingVideo=!1,this.cs.showErrorMessage(A.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:A=>{this.isSavingVideo=!1,this.isUploadingVideo=!1,this.cs.showErrorMessage(A?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}handleLoyaltyOnlyProceed(){const e=this.pendingLoyaltyOnlySubmit;this.pendingLoyaltyOnlySubmit=null,e?.()}handleLoyaltyOnlyWarningCanceled(){this.pendingLoyaltyOnlySubmit=null,this.isSavingVideo=!1,this.isUploadingVideo=!1}get deleteAlbumMessage(){if(this.selectedItemDelete)return this.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_MESSAGE[this.portfolioType].replace("{{title}}",this.selectedItemDelete?.video_name||"")}onCancelDeleteItem(){this.deleteItemModal&&(this.deleteItemModal.closeModal(),this.selectedItemDelete=null)}deleteOpenedVideo(){this.selectedItemDeleteIndex=this.editingVideoIndex,this.selectedItemDelete=this.editingVideo,this.deleteItemModal?.openModal()}removeVideo(e){const i=this.addedVideos[e];this.selectedItemDeleteIndex=e,this.selectedItemDelete=i,this.deleteItemModal?.openModal()}deleteItem(){const e=this.selectedItemDeleteIndex;this.deleteVideo(this.selectedItemDelete?.sk,e,this.editingVideoIndex===e)}deleteVideo(e,i,o=!1){if(e){const s=`${U.Y9.portfolioContent}/${encodeURIComponent(e)}?type=${this.portfolioType.toUpperCase()}`;this.apiCallService.delete(s,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:p=>{o&&this.handleCancel(),p.status?(this.addedVideos.splice(i,l.Mx.ONE),this.syncVideosToForm(),this.cdr.detectChanges(),this.cs.showSuccessMessage(p.message||nt.Vm.SOMETHING_WENT_WRONG)):this.cs.showErrorMessage(p.message||this.CONSTS.FAILED_TO_SAVE_CONTENT),this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.selectedItemDelete=null},error:p=>{this.cs.showErrorMessage(p?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}else o&&this.handleCancel(),this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.selectedItemDelete=null,this.addedVideos.splice(i,l.Mx.ONE),this.syncVideosToForm(),this.cdr.detectChanges()}drop(e){if((0,Pt.bA)(this.addedVideos,e.previousIndex,e.currentIndex),e.previousIndex!=e.currentIndex){this.addedVideos.forEach((o,s)=>{o.sequence_number=s+l.Mx.ONE});const i=this.addedVideos.filter(o=>o.pk&&o.sk).map(o=>({pk:o.pk,sk:o.sk,sequence_number:o.sequence_number||this.addedVideos.indexOf(o)+l.Mx.ONE}));i.length&&this.apiCallService.put(U.Y9.portfolioSequenceNumber,{data:i},!1).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{this.cs.showSuccessMessage(o.message)},error:o=>{this.cs.showErrorMessage(o.message)}})}}trackByVideo(e,i){return i?.id||e}syncVideosToForm(){if(this.form&&this.form.get("items")){const e=this.addedVideos.map(i=>{const o={id:i.id,video_name:i.video_name,video_file:i.video_file,thumbnail:i.thumbnail,postPriceData:i.postPriceData,videoFileName:i.videoFileName,thumbnailPreview:i.thumbnailPreview,durationInSeconds:i.durationInSeconds,require_authentication:i.require_authentication,allow_download:i.allow_download,show_as_post:i.show_as_post,is_free:i.is_free,release_date:i.release_date,status:i.status||O.W.PORTFOLIO_STATUS.ACTIVE};return!this.isIndividual&&void 0!==i.description&&(o.description=i.description||""),o});this.form.get("items")?.setValue(e,{emitEvent:!1})}}formatDuration(e){return e&&e!==l.Mx.ZERO?`${Math.floor(e/l.Mx.SIXTY)}:${Math.floor(e%l.Mx.SIXTY).toString().padStart(l.Mx.TWO,"0")}`:`${l.Mx.ZERO}:${String(l.Mx.ZERO).padStart(l.Mx.TWO,"0")}`}getVideoReleaseDisplay(e){if(!e?.release_date)return null;const i=(0,Q.NH)(e.release_date);return i.type&&null!=i.value?{hasRelease:!0,isReleaseYearType:i.type===w.RELEASE_TYPE_YEAR,dateOfRelease:i.value}:null}editVideo(e){const i=this.addedVideos[e],o=i.status||O.W.PORTFOLIO_STATUS.ACTIVE;this.enable=o===O.W.PORTFOLIO_STATUS.ACTIVE,this.editingVideo={...i,status:o},this.editingVideoIndex=e;const s=i.postPriceData;let p=null;(s?.outer_subscription?.length||s?.outer_nft?.length)&&(p={is_individual_price:!0,is_subscription:!(!s.outer_subscription||!s.outer_subscription.length),is_nft:!(!s.outer_nft||!s.outer_nft.length),subscription:s.outer_subscription||[],NFT:s.outer_nft||[]}),this.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:s?.is_subscription||!1,is_indivudiual_price:s?.is_indivudiual_price||!1,is_nft_added:s?.is_nft_added||!1,indivisualPrice:s?.indivisualPrice||"",loyalty_points:s?.loyalty_points??null,subscriptions:s?.subscriptions||[],nftIDList:s?.nftIDList||[],form:s?.form||null,lockDetail
1s:p,collaborators:[],international_prices:s?.international_prices||[]},this.showAddVideoForm=!0;const u={[this.portfolioConfig?.fileField||"video_file"]:i.video_file,thumbnail:i.thumbnail};if(!this.isIndividual&&this.portfolioConfig?.nameField&&(u[this.portfolioConfig.nameField]=i.video_name),!this.isIndividual&&void 0!==i.description&&(u.video_description=i.description||""),u.allow_download=void 0!==i.allow_download&&i.allow_download?[!0]:[],u.show_as_post=void 0!==i.show_as_post&&i.show_as_post?[!0]:[],u.require_authentication=void 0!==i.require_authentication&&i.require_authentication?[!0]:[],u.is_free=void 0!==i.is_free&&i.is_free?[!0]:[],!this.isIndividual){const A=(0,Q.NH)(i.release_date);if(A.type===w.RELEASE_TYPE_YEAR)this.videoReleaseType=w.RELEASE_TYPE_YEAR,u.video_release_year=null!=A.value?String(A.value):null,u.video_release_date=null,u.video_release_type_year=[w.RELEASE_TYPE_YEAR],u.video_release_type_date=[];else if(A.type===w.RELEASE_TYPE_DATE){this.videoReleaseType=w.RELEASE_TYPE_DATE;const E=(0,Q.Gy)(A.value);u.video_release_date=E,u.video_release_year=null,u.video_release_type_year=[],u.video_release_type_date=[w.RELEASE_TYPE_DATE]}else this.videoReleaseType=null,u.video_release_type_year=[],u.video_release_type_date=[]}this.form.patchValue(u),setTimeout(()=>{this.initializeVideoReleaseType()},50),i.video_file&&(this.videoSelected=!0,this.videoPreview=i.video_file,this.videoUrl=i.video_file,this.videoFileName=i.videoFileName||O.W.VIDEO_FILE||"Video File",this.timestamp=(0,Q.e4)(i.video_file),this.resolveVideoModeFromUrl(i.video_file).then(A=>{this.currentVideoMode=A,this.cdr.detectChanges()})),i.thumbnail&&(this.thumbnailPreview=i.thumbnailPreview||i.thumbnail),this.ngZone.run(()=>{setTimeout(()=>{const A=null!=s?.loyalty_points&&s.loyalty_points>0,E=s&&(s.is_subscription||s.is_indivudiual_price||s.is_nft_added||A),q=null!=s?.form?.free_preview?s.form.free_preview:l.Mx.ZERO;if(this.postPriceComponent&&E){this.postPriceComponent.postPriceObj={is_subscription:s.is_subscription||!1,is_ind_purchase:s.is_indivudiual_price||!1,is_loyalty_points:A,is_lock_with_nft:s.is_nft_added||!1,selected_subscription:[],individual_price:s.indivisualPrice||"",revenue_split:"",international_prices:s?.international_prices||[]};const z=setInterval(()=>{this.postPriceComponent?.subPlanList&&this.postPriceComponent?.subPlanList?.length>l.Mx.ZERO&&(clearInterval(z),s.subscriptions&&s.subscriptions.length>l.Mx.ZERO&&s.subscriptions.forEach(et=>{const tt=this.postPriceComponent.subPlanList.find(dt=>dt.sk===et.sk);tt&&(tt.isSelected=!0)}),this.cdr.detectChanges())},Number(l.Mx.FIFTY));setTimeout(()=>clearInterval(z),l.Mx.INTERVAL_THREE_THOUSAND),s.nftIDList&&s.nftIDList.length>l.Mx.ZERO&&(this.postPriceComponent.addedNFTIds=[...s.nftIDList]),s.form&&this.postPriceComponent.postPriceForm&&this.postPriceComponent.postPriceForm.patchValue(s.form),s.indivisualPrice&&this.postPriceComponent.ppForm&&this.postPriceComponent.ppForm.patchValue({indPrice:s.indivisualPrice}),A&&this.postPriceComponent.loyaltyPointsForm&&(this.postPriceComponent.loyaltyPointsForm.patchValue({loyalty_points:s.loyalty_points}),this.postPriceComponent.onLoyaltyPointsToggle()),this.cdr.detectChanges()}else this.postPriceComponent&&!E&&(this.postPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.postPriceComponent.addedNFTIds=[],this.postPriceComponent.postPriceForm&&this.postPriceComponent.postPriceForm.reset({free_preview:q,preview_image:"",description:"",archive_post:"",is_comment_enable:"",accept_tip_on_livestream:"",hashTagList:[]}),this.postPriceComponent.ppForm&&this.postPriceComponent.ppForm.reset(),this.postPriceComponent.loyaltyPointsForm&&this.postPriceComponent.loyaltyPointsForm.reset(),this.postPriceComponent.subPlanList&&this.postPriceComponent.subPlanList.forEach(z=>{z.isSelected=!1}),this.cdr.detectChanges())},Number(l.Mx.TWO_HUNDRED))}),this.cdr.detectChanges()}toggleDescription(e){this.addedVideos[e]&&this.addedVideos[e].description&&(this.addedVideos[e]={...this.addedVideos[e],isMore:!this.addedVideos[e].isMore},this.cdr.detectChanges())}previewVideo(e){this.openVideoModal(this.addedVideos[e])}getVideoItem(e){return{videoUrl:e.video_file||"",posterUrl:e.thumbnailPreview||e.thumbnail||this.albumCoverImage||"",videoTitle:e.video_name||"",dateOfRelease:e.release_date||null,duration:e.durationInSeconds||l.Mx.ZERO,showTime:!0,isLocked:!1,canPreview:!0,description:e.description||"",download_url:e.allow_download?e.video_file:void 0,isDownloadable:e.allow_download||!1,lock_through:this.buildLockThrough(e.postPriceData),pk:e.pk||"",sk:e.sk||"",status:e.status}}openVideoModal(e){const i=this.getVideoItem(e),o=this.addedVideos.filter(_=>_.video_file).map(_=>this.getVideoItem(_)),s=o.findIndex(_=>_.videoUrl===i.videoUrl&&_.videoTitle===i.videoTitle);this.modalService.show(On.Z,{initialState:{videoList:o.length>l.Mx.ZERO?o:[i],currentIndex:s>=l.Mx.ZERO?s:l.Mx.ZERO,portfolioType:this.portfolioType,isMyProfile:!0,isLocked:!1},class:"modal-lg",backdrop:"static",keyboard:!1})}handleVideoEditFromQuery(){if(!this.addedVideos||this.addedVideos.length===l.Mx.ZERO||this.itemAddFromQueryHandled)return;
1const e=this.route.snapshot.queryParamMap.get("videoSk"),i="true"===this.route.snapshot.queryParamMap.get("isAddItem");if(!e&&i)return this.itemAddFromQueryHandled=!0,this.toggleAddVideoForm(),void this.cleanQueryParameters();const o=this.cs.decodeToUTF(e),s=this.addedVideos.findIndex(p=>p.sk===o);s>=l.Mx.ZERO&&(this.editVideo(s),this.cleanQueryParameters())}cleanQueryParameters(){const e={...this.route.snapshot.queryParams};e.step&&delete e.step,e.videoSk&&delete e.videoSk,this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.uploadXHR&&(this.uploadXHR.abort(),this.uploadXHR=void 0),this.videoPreview&&"string"==typeof this.videoPreview&&this.videoPreview.startsWith("blob:")&&URL.revokeObjectURL(this.videoPreview)}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36($.v),t.Y36(bt.C),t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(Tt.Y),t.Y36(gt.F),t.Y36(Xe.tT),t.Y36(V.gz),t.Y36(V.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-step-3-video-series"]],viewQuery:function(i,o){if(1&i&&(t.Gf(xn,5),t.Gf(xe.PostPriceComponent,5),t.Gf(Sn,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.loyaltyOnlyWarningModal=s.first),t.iGM(s=t.CRH())&&(o.postPriceComponent=s.first),t.iGM(s=t.CRH())&&(o.deleteItemModal=s.first)}},inputs:{form:"form",isEditMode:"isEditMode",isIndividual:"isIndividual",showThumbnail:"showThumbnail",isDirectDistributionChecked:"isDirectDistributionChecked",albumSk:"albumSk",userProfile:"userProfile",portfolioType:"portfolioType",currentStepNumber:"currentStepNumber",totalSteps:"totalSteps",isUploadingVideo:"isUploadingVideo",itemLockThrough:"itemLockThrough",albumLockThrough:"albumLockThrough",albumFreePreviewTime:"albumFreePreviewTime",disabledSubscriptionPlanIds:"disabledSubscriptionPlanIds"},features:[t.TTD],decls:10,vars:14,consts:[[1,"step-3-direct-distribution-container","step-3-video-container",3,"ngClass"],["class","step-indicator-container",4,"ngIf"],["class","section-title",4,"ngIf"],["class","added-songs-list mb-4",4,"ngIf"],["class","add-song-track-button mb-4",4,"ngIf"],["class","step-form-content",3,"ngClass",4,"ngIf"],[3,"imageChangeEvent","isOpen","cropperOptions","imageWidth","closeCrop","cropImageUpload",4,"ngIf"],[3,"dynamicClass","ConfirmationMessage","headerLabel","commonEnum","confirmDelete","cancelDelete"],["deleteItemModal",""],[3,"proceeded","canceled",4,"ngIf"],[1,"step-indicator-container"],[1,"step-indicator"],["class","toggle-delete-container",4,"ngIf"],[1,"toggle-delete-container"],[3,"currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged"],["enableToggle",""],["type","button",1,"btn","btn-delete","btn-delete-uppr",3,"title","click"],[1,"icon-delete-filled"],[1,"section-title"],[3,"message","infoIconSize"],[1,"added-songs-list","mb-4"],["class","songs-empty-placeholder",4,"ngIf"],["class","songs-list","cdkDropList","",3,"cdkDropListDisabled","cdkDropListAutoScrollStep","cdkDropListData","cdkDropListDropped",4,"ngIf"],[1,"songs-empty-placeholder"],["class","skeleton-song-item",4,"ngFor","ngForOf"],[1,"skeleton-song-item"],[1,"song-thumbnail-wrapper","skeleton-thumbnail"],[1,"song-audio-icon"],[3,"ngClass"],[1,"song-details"],[1,"skeleton-line","skeleton-title"],[1,"skeleton-line","skeleton-duration"],[1,"song-actions"],[1,"skeleton-button","skeleton-preview"],[1,"skeleton-button","skeleton-edit"],[1,"skeleton-button","skeleton-delete"],["cdkDropList","",1,"songs-list",3,"cdkDropListDisabled","cdkDropListAutoScrollStep","cdkDropListData","cdkDropListDropped"],["class","song-item","cdkDrag","",3,"cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"song-item",3,"cdkDragStarted","cdkDragEnded"],[1,"d-flex","gap-3"],["cdkDragHandle","",1,"drag-handle"],[1,"icon-drag"],[1,"d-flex","justify-content-between","align-items-center","gap-3","flex-wrap","w-100"],[1,"song-thumbnail-wrapper","video-thumbnail"],["class","song-thumbnail",3,"ngClass",4,"ngIf"],["class","song-audio-icon",4,"ngIf"],["class","preview-processing",4,"ngIf"],[1,"song-name"],["class","song-duration",4,"ngIf"],["class","song-description w-100",4,"ngIf"],["type","button",1,"btn","btn-primary",3,"title","click"],[1,"icon-liteplay"],["type","button",1,"btn","btn-edit",3,"title","click"],[1,"icon-res-editfill"],["type","button",1,"btn","btn-delete",3,"title","click"],[1,"song-thumbnail",3,"ngClass"],["appDisableRightClick","","appMobileOptimization","","loading","lazy",3,"src","alt","originalUrl","format"],[1,"preview-processing"],[1,"song-duration"],[1,"d-none","d-lg-inline-block"],[1,"song-description","w-100"],[1,"song-description-text",3,"innerHTML","click"],[1,"add-song-track-button","mb-4"],["type","button",1,"btn","btn-add-song-track",3,"click"],[1,"plus-icon"],[1,"step-form-content",3,"ngClass"],[3,"formGroup"],["class","row",4,"ngIf"],["class","release-date-section mb-5",4,"ngIf"],["class","make-free-checkbox-section mb-4",4,"ngIf"],["class","pricing-options-section",3,"disabled-section",4,"ngIf"],["class","download-checkbox-section mt-4",4,"ngIf"],["class","step-3-action-buttons mt-4",4,"ngIf"],[1,"row"],[1,"col-12","add-song-track-section","col-lg-6"],[1,"form-group"],["class","name-field mb-3",4,"ngIf"],["class","col-12 mb-4 description-field",4,"ngIf"],["class","form-group",4,"ngIf"],[1,"col-12","col-lg-6",3,"ngClass"],[1,"parent-label"],[1,"uploadContainer"],["for","videoFileUpload","class","custom-label-upload",4,"ngIf"],["class","uploadFileImageData",4,"ngIf"],[3,"control","field"],[1,"name-field","mb-3"],[3,"field","form","disabled"],[1,"col-12","mb-4","description-field"],[3,"message"],["for","thumbnailUpload","class","custom-label-upload optional-song-image-section",4,"ngIf"],["class","uploadFileImageData optional-song-image-section",4,"ngIf"],["for","thumbnailUpload",1,"custom-label-upload","optional-song-image-section"],["type","file","onclick","this.value = null","id","thumbnailUpload","appMobileBridgeFileInput","",1,"upload","d-none",3,"accept","disabled","fileConfig","change","mobileFileChange"],["thumbnailInput",""],[1,"banner-image-type-portfolio"],[1,"icon-liteic-cover-thumbnail-light"],[1,"image-title"],["class","image-msg",4,"ngIf"],[3,"btnField","handleButtonClick"],[1,"image-msg"],[1,"uploadFileImageData","optional-song-image-section"],["class","show-progress-bar-thumbnail pointer-none",4,"ngIf"],["appDisableRightClick","","appMobileOptimization","","alt","Thumbnail","loading","lazy","decoding","async",3,"originalUrl","src","format",4,"ngIf"],["class","close",3,"z-index","click",4,"ngIf"],[1,"show-progress-bar-thumbnail","pointer-none"],[3,"percent","radius","outerStrokeWidth","innerStrokeWidth","outerStrokeColor","innerStrokeColor","animation","animationDuration","showSubtitle","backgroundPadding","titleFontSize","titleColor","unitsColor","space"],["appDisableRightClick","","appMobileOptimization","","alt","Thumbnail","loading","lazy","decoding","async",3,"originalUrl","src","format"],[1,"close",3,"click"],["for","videoFileUpload",1,"custom-label-upload"],["onclick","this.value = null","type","file","id","videoFileUpload","accept","video/mp4,video/quicktime,video/x-matroska,.mp4,.mov,.MOV,.mkv,.MKV","appMobileBridgeFileInput","",1,"upload","d-none",3,"disabled","fileConfig","change","mobileFileChange"],["videoPicker",""],[1,"icon-liteLive-stream"],[1,"uploadFileImageData"],["class","show-progress-bar",4,"ngIf"],["class","video-preview-wrapper",3,"ngClass",4,"ngIf"],[1,"show-progress-bar"],[1,"video-preview-wrapper",3,"ngClass"],[1,"video-player-wrapper"],[3,"options"],[1,"release-date-section","mb-5"],[1,"parent-label","mb-0"],[1,"release-type-checkboxes","mb
1-3","d-flex","align-items-center","gap-5"],[3,"form","field","checkboxClicked"],["class","release-input-wrapper",4,"ngIf"],[1,"release-input-wrapper"],[3,"field","form"],[1,"make-free-checkbox-section","mb-4"],[3,"form","field"],[1,"pricing-options-section"],[1,"d-flex","align-items-center","pricing-info-messages"],[3,"message","click"],[3,"taggedUserList","filledData","isSelectorUsed","isDoubleLockingEnable","freePreviewOptionsProps","freePreviewLabel","restrictLabel","disabledSubscriptionPlanIds","alwaysShowFreePreview"],[1,"download-checkbox-section","mt-4"],[1,"step-3-action-buttons","mt-4"],[3,"imageChangeEvent","isOpen","cropperOptions","imageWidth","closeCrop","cropImageUpload"],[3,"proceeded","canceled"],["loyaltyOnlyWarningModal",""]],template:function(i,o){1&i&&(t.TgZ(0,"div",0),t.YNc(1,En,5,3,"div",1),t.YNc(2,yn,4,3,"div",2),t.YNc(3,Yn,3,2,"div",3),t.YNc(4,Hn,6,1,"div",4),t.YNc(5,Ms,10,12,"div",5),t.YNc(6,Ts,1,8,"app-image-cropper",6),t.qZA(),t.TgZ(7,"app-confirmation-modal",7,8),t.NdJ("confirmDelete",function(){return o.deleteItem()})("cancelDelete",function(){return o.onCancelDeleteItem()}),t.qZA(),t.YNc(9,xs,2,0,"app-loyalty-only-warning-modal",9)),2&i&&(t.Q6J("ngClass",t.VKq(12,Ss,!o.isIndividual)),t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(1),t.Q6J("ngIf",!o.isIndividual),t.xp6(1),t.Q6J("ngIf",!o.showAddVideoForm&&!o.isIndividual),t.xp6(1),t.Q6J("ngIf",!o.showAddVideoForm&&!o.isIndividual),t.xp6(1),t.Q6J("ngIf",o.showAddVideoForm&&(!o.isIndividual||o.isDirectDistributionChecked)),t.xp6(1),t.Q6J("ngIf",o.isOpen),t.xp6(1),t.Q6J("dynamicClass","delete-modal portfolio-banner-delete-modal")("ConfirmationMessage",o.deleteAlbumMessage)("headerLabel",o.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_TITLE[o.portfolioType])("commonEnum",o.commonEnum),t.xp6(2),t.Q6J("ngIf",o.cs.isBrowser))},dependencies:[r.mk,r.sg,r.O5,N._Y,N.JL,N.sg,Xt.e,it.r,we.s,Ue.b,Ze.t,Ge.o,Ve.g,Be.e,ze.p,Ae.a,st.m,wt.Y,ye.LoyaltyOnlyWarningModalComponent,ft.J,Pt.Wj,Pt.Zt,Pt.Bh,De.nu,Co.q,Mt.w,xe.PostPriceComponent,r.uU,vn.dY,Mn.D,Tn.F],styles:[".step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%]{padding:10px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:20px!important}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .preview-processing[_ngcontent-%COMP%]{font-size:12px;position:absolute;color:#fff!important;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6)!important}@media (max-width: 768px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .preview-processing[_ngcontent-%COMP%]{font-size:10px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-indicator-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-indicator-container[_ngcontent-%COMP%]{align-items:flex-start}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .toggle-delete-container[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .song-description-text[_ngcontent-%COMP%]{flex:1 1 calc(100% - 100px)}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]{width:150px!important;height:100px!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:has(.portrait-image-preview){width:60px!important;height:auto!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;
1gap:16px;padding:10px;background:var(--configBgColor);border-radius:12px;animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%]{flex-shrink:0;width:64px;height:64px;border-radius:6px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);display:flex;align-items:center;justify-content:center}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-litemusic-node-2[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-liteMIc-Icon[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-litevideo-fill-camera[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-liteLive-stream[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .skeleton-thumbnail[_ngcontent-%COMP%] .song-audio-icon[_ngcontent-%COMP%] .icon-liteportfolio-not-found[_ngcontent-%COMP%]{opacity:.5}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-details[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-details[_ngcontent-%COMP%] .skeleton-line[_ngcontent-%COMP%]{height:16px;border-radius:4px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-details[_ngcontent-%COMP%] .skeleton-line.skeleton-title[_ngcontent-%COMP%]{width:60%;height:18px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-details[_ngcontent-%COMP%] .skeleton-line.skeleton-duration[_ngcontent-%COMP%]{width:40%;height:14px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center;flex-shrink:0}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%] .skeleton-button[_ngcontent-%COMP%]{border-radius:30px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%] .skeleton-button.skeleton-preview[_ngcontent-%COMP%]{width:100px;height:40px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%] .skeleton-button.skeleton-edit[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%] .song-actions[_ngcontent-%COMP%] .skeleton-button.skeleton-delete[_ng
1content-%COMP%]{width:40px;height:40px;border-radius:50%}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .songs-empty-placeholder[_ngcontent-%COMP%] .skeleton-song-item[_ngcontent-%COMP%]{flex-wrap:wrap}}@keyframes _ngcontent-%COMP%_skeleton-pulse{0%,to{opacity:1}50%{opacity:.6}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%]{display:inline-block;padding:6px 12px;border-radius:20px;border:1px solid var(--theme-interactive-link);margin-bottom:16px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:12px;font-weight:600}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .icon-litemusic-node-2[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .icon-liteMIc-Icon[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .icon-litevideo-fill-camera[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .icon-liteLive-stream[_ngcontent-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .icon-liteportfolio-not-found[_ngcontent-%COMP%]{position:relative!important;top:0;left:0;font-size:30px;color:var(--theme-interactive-link)}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--configPostTextColor)!important;font-size:24px;font-weight:700;margin:0;display:flex;align-items:center;gap:8px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important;padding:24px;border-radius:24px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-bottom:0}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .parent-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%]{position:relative;width:100%}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .icon-liteic-cover-thumbnail-light[_ngcontent-%COMP%]{position:relative;font-size:38px;right:unset!important;bottom:unset!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadContainer[_ngcontent-%COMP%] .icon-liteic-cover-thumbnail-light[_ngcontent-%COMP%]:before{color:var(--theme-interactive-link)}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%]{border:.1rem dashed var(--theme-interactive-link);border-radius:15px;color:var(--theme-interactive-link);display:flex;cursor:pointer;align-items:center;justify-content:center;flex-direction:column;padding:20px 15px;min-width:150px;width:100%;min-height:160px;transition:all .3s ease}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%] .plus-icon[_ngcontent-%COMP%]{font-size:24px;text-align:center;color:var(--theme-interactive-link);font-weight:300;margin-bottom:4px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .custom-label-upload[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{text-align:center;color:var(--theme-interactive-link);font-size:12px;margin:4px 5px 0;font-weight:500;white-space:normal}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]{position:relative;width:100%;border-radius:8px;overflow:hidden;min-height:150px;height:auto;margin-right:0!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:after{display:none}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:has(.show-progress-bar), .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:has(.show-progress-bar-thumbnail), .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%]:has(.audio-preview-content){border:.1rem dashed var(--theme-interactive-link);border-radius:15px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto;display:block}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;line-height:1;text-decoration:none;background:var(--theme-interactive-link);color:var(--configButtonTextColor);z-index:10;padding:0!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .close.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed;pointer-events:none}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .show-progress-bar[_ng
1content-%COMP%], .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .show-progress-bar-thumbnail[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:5}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .video-preview-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:16/9;border-radius:8px;overflow:hidden}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .video-preview-wrapper.portrait-video-preview[_ngcontent-%COMP%]{aspect-ratio:9/16}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .video-preview-wrapper[_ngcontent-%COMP%] .video-player-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .video-preview-wrapper[_ngcontent-%COMP%] .video-player-wrapper[_ngcontent-%COMP%] vjs-ivs-player{width:100%;height:100%}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .video-preview-wrapper[_ngcontent-%COMP%] .video-player-wrapper[_ngcontent-%COMP%] vjs-ivs-player .video-js.vjs-fluid{height:100%!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:16px;width:100%;height:150px;padding:20px;position:relative}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%]{flex-shrink:0;width:80px;height:80px;display:flex;align-items:center;justify-content:center;border-radius:10px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%] app-post-audio-icon{width:80px;height:80px;display:block}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%] app-post-audio-icon svg, .step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-icon-wrapper[_ngcontent-%COMP%] app-post-audio-icon img{width:100%;height:100%}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-file-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;justify-content:center;gap:6px;min-width:0}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-file-info[_ngcontent-%COMP%] .audio-file-name[_ng
1content-%COMP%]{margin:0;font-size:14px;color:var(--configPostTextColor);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-file-info[_ngcontent-%COMP%] .remove-link[_ngcontent-%COMP%]{font-size:12px;color:var(--theme-interactive-link);cursor:pointer;text-decoration:none;transition:opacity .2s ease}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .uploadFileImageData[_ngcontent-%COMP%] .audio-preview-content[_ngcontent-%COMP%] .audio-file-info[_ngcontent-%COMP%] .remove-link[_ngcontent-%COMP%]:hover{opacity:.8;text-decoration:underline}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .extension[_ngcontent-%COMP%]{font-size:12px;color:var(--theme-interactive-link);margin-top:8px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .download-checkbox-section[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{overflow:unset!important;white-space:normal!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%]{width:65%}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%] .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%] .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%] .option-label{white-space:normal!important}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .release-date-section[_ngcontent-%COMP%]{width:100%}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .cb-option-container .option-label{white-space:normal!important;max-width:100%!important}@media screen and (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .step-form-content[_ngcontent-%COMP%] .cb-option-container .option-label{font-size:14px!important}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:32px!important;line-height:100%}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] .pricing-info-messages[_ngcontent-%COMP%] app-info-icon[_ngcontent-%COMP%]{margin-bottom:30px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .custom-checkbox{z-index:1}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .post-price-lock-container{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head{margin-bottom:30px;display:flex}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .icon-liteicon-black-tick:before{font-size:14px!important}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head{display:block;margin-bottom:20px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .icon-liteicon-black-tick:before{font-size:10px!important;left:3px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox{font-weight:500;padding:3px 0 0 38px;margin:0 0 0 40px;color:var(--configPostTextColor)}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox:first-child{margin:0}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-head .custom-checkbox{display:block;margin:15px 0 0;padding:0 0 0 34px;font-size:14px;line-height:20px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content h5{font-size:16px;margin:0 0 16px;font-weight:400}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content h5{font-size:14px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label{border-radius:28px;border:solid 1px var(--theme-interactive-link);width:100%;padding:17px 20px 17px 30px;margin:0 0 6px}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label{padding:14px 20px;font-size:13px;margin:0 0 16px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark{right:20px;left:auto;top:14px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark.icon-liteicon-black-tick:before{font-size:14px!important}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark{top:6px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .postprice-content .postprice-checkbox label .checkmark.icon-liteicon-black-tick:before{font-size:12px!important;display:flex;justify-content:center;margin-top:3px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .walletform-title{border:none;padding-bottom:0!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group label{text-transform:capitalize!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign{color:var(--configPostTextColor)!important;position:absolute;
1left:24px;top:calc(50% - 7px)!important;z-index:1;font-weight:900;font-size:14px;line-height:100%}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign{left:20px;top:47px;font-size:12px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign~.form-control{padding-left:36px;line-height:18px}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .dollarSign~.form-control{line-height:16px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group{position:relative;background:var(--configBgColor)!important;margin-bottom:20px!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .onboarding-validInfo{display:flex;justify-content:space-between;align-items:center}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .dropdown-toggle{margin:-10px 30px 0 0}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .dropdown-menu p{font-size:13px;overflow-wrap:anywhere;text-transform:none!important}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group{margin:20px 0 0}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .formgroup-users{position:absolute;top:52px;right:20px;margin:0!important}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .formgroup-users{top:46px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-group .form-control~label{margin:16px 0 0}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft{display:flex;justify-content:space-between;align-items:center}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a{font-size:14px;color:var(--theme-interactive-link);text-decoration:none;text-transform:uppercase;cursor:pointer;flex:none;position:absolute;right:20px}@media (max-width: 992px){.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a{right:10px}}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em{color:var(--theme-interactive-link);position:static}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a em:before{font-size:12px!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft a:hover{color:var(--theme-interactive-link)}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input{flex:1;background:transparent;border:0;font-size:14px;font-weight:900;padding-right:40px;color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft input::placeholder{opacity:.7;color:var(--configPostTextColor)!important}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content{padding:5px 20px 30px}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul{list-style:none;margin:0;padding:0}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li{margin:15px 0 0;display:flex;justify-content:space-between;align-items:center}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li span{font-size:16px;opacity:.75;color:var(--configPostTextColor);padding-right:15px;word-break:break-all}.step-3-direct-distribution-container.step-3-video-container[_ngcontent-%COMP%] .pricing-options-section[_ngcontent-%COMP%] app-post-price .individualprice-content .form-nft~.form-access-content ul li a{color:var(--theme-interactive-link);text-decoration:none;font-size:22px;flex:none;line-height:0;cursor:pointer}.step-3-video-container[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%]{height:36px;width:36px;min-width:35px;padding:0 0 3px;border-radius:50%;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);color:var(--theme-interactive-link);align-items:center;justify-content:center;display:flex}.step-3-video-container[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:20px;color:var(--theme-interactive-link)} .theme-whiteLabel .step-3-video-container .toggle-enable-container .both-btn{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;cursor:pointer} .theme-whiteLabel .step-3-video-container .toggle-enable-container .both-btn.active-enable{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-video-container .btn-delete-uppr{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-video-container .btn-delete-uppr em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-video-container .icon-litemusic-node-2, .theme-whiteLabel .step-3-video-container .icon-liteMIc-Icon, .theme-whiteLabel .step-3-video-container .icon-litevideo-fill-camera, .theme-whiteLabel .step-3-video-container .icon-liteLive-stream, .theme-whiteLabel .step-3-video-container .icon-liteportfolio-not-found{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .step-indicator{border:1px solid var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .extension{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .add-song-track-button .btn-add-song-track{border:2px solid var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .add-song-track-button .btn-add-song-track span{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .add-song-track-button .btn-add-song-track .plus-icon{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .add-song-track-button .btn-add-song-track:hover{background:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-video-container .step-form-content .onboarding-validInfo.block-hint .dropdown-menu p{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .uploadContainer .icon-liteic-cover-thumbnail-light:before{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .uploadContainer .custom-label-upload{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .uploadContainer .custom-label-upload .label, .theme-whiteLabel .step-3-video-container .step-form-content .uploadContainer .custom-label-upload .plus-icon{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .uploadContainer .uploadFileImageData{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .uploadContainer .uploadFileImageData .close{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .uploadContainer .uploadFileImageData .audio-preview-content .audio-file-info .remove-link{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .pricing-options-section app-post-price .postprice-content .postprice-checkbox label{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .pricing-options-section app-post-price .individualprice-content .form-nft a{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .pricing-options-section app-post-price .individualprice-content .form-nft a em{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .pricing-options-section app-post-price .individualprice-content .form-nft a:hover{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .pricing-options-section app-post-price .individualprice-content .form-access-content ul li a{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .ng-select-container{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .ng-select-container .ng-value-container .ng-value{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .ng-select-container .ng-value-container .ng-value-label{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .ng-select-container .ng-placeholder{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .ng-select-container .ng-arrow:before{border-color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .ng-dropdown-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-video-container .step-form-content .ng-dropdown-panel .ng-dropdown-panel-items .ng-option-label{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item{background:var(--configBgColor)} .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail .song-audio-icon .icon-litemusic-node-2, .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail .song-audio-icon .icon-liteMIc-Icon, .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail .song-audio-icon .icon-litevideo-fill-camera, .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail .song-audio-icon .icon-liteLive-stream, .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .skeleton-thumbnail .song-audio-icon .icon-liteportfolio-not-found{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .song-details .skeleton-line{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-video-container .added-songs-list .songs-empty-placeholder .skeleton-song-item .song-actions .skeleton-button{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-video-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-video-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper .icon-litemusic-node-2, .theme-whiteLabel .step-3-video-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper .icon-liteMIc-Icon, .theme-whiteLabel .step-3-video-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper .icon-litevideo-fill-camera, .theme-whiteLabel .step-3-video-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper .icon-liteLive-stream, .theme-whiteLabel .step-3-video-container .step-form-content .uploadFileImageData .audio-preview-content .audio-icon-wrapper .icon-liteportfolio-not-found{color:var(--configThemeColor)!important} .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon{background-color:var(--configThemeColor)!important} .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-litemusic-node-2, .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-liteMIc-Icon, .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-litevideo-fill-camera, .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-liteLive-stream, .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-liteportfolio-not-found{font-size:48px;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-primary em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-edit{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-edit em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-delete{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-delete em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-description .song-description-text .content-length-handle{color:var(--configThemeColor)!important} .theme-whiteLabel .song-item .drag-handle .icon-drag{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important} .theme-whiteLabel .song-item .drag-handle .icon-drag:before{color:var(--configBgT
1extColor)!important} .step-3-video-container .step-3-action-buttons{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:0}@media screen and (max-width: 992px){ .step-3-video-container .step-3-action-buttons{gap:12px} .step-3-video-container .step-3-action-buttons app-button{width:100%;display:flex;justify-content:center}} .step-3-video-container .added-songs-list{margin-bottom:24px} .step-3-video-container .added-songs-list .songs-list{display:flex;flex-direction:column;gap:16px} .step-3-video-container .added-songs-list .songs-list .song-item{will-change:transform} .step-3-video-container .add-song-track-button{margin-bottom:24px} .step-3-video-container .add-song-track-button .btn-add-song-track{padding:8px 16px;background:var(--configSecondaryBgColor);border:2px solid var(--theme-interactive-link);border-radius:12px;font-size:16px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer;transition:all .3s ease}@media screen and (max-width: 992px){ .step-3-video-container .add-song-track-button .btn-add-song-track{width:100%;border-radius:28px}} .step-3-video-container .add-song-track-button .btn-add-song-track:hover{background:var(rgba(var(--theme-interactive-link-rgb), .1))} .step-3-video-container .add-song-track-button .btn-add-song-track .plus-icon{font-size:24px;font-weight:400;line-height:1;color:var(--theme-interactive-link)!important} .step-3-video-container .add-song-track-button .btn-add-song-track span{color:var(--theme-interactive-link)!important;font-weight:900;font-size:14px;letter-spacing:.4px;text-transform:uppercase} .step-3-video-container .cb-vertical-option-container{gap:0px!important} .step-3-video-container .app-checkbox-container{background:var(--configBgColor)!important}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-preview[_ngcontent-%COMP%]{cursor:move;box-shadow:0 5px 15px #0003}.cdk-drag[_ngcontent-%COMP%]{width:auto}.disabled-section[_ngcontent-%COMP%]{pointer-events:none;opacity:.6}.disabled-section[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] .custom-checkbox[_ngcontent-%COMP%], .disabled-section[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed;opacity:.6} .step-3-video-container .step-form-content .name-field .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-video-container .step-form-content .name-field .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7} .step-3-video-container .step-form-content .description-field .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;height:170px} .step-3-video-container .step-form-content .description-field .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7} .step-3-video-container .step-form-content .ng-select-container{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-video-container .step-form-content .ng-select-container .ng-value-container .ng-value{color:var(--configPostTextColor)!important} .step-3-video-container .step-form-content .ng-select-container .ng-value-container .ng-value-label{color:var(--configPostTextColor)!important} .step-3-video-container .step-form-content .ng-select-container .ng-placeholder{color:var(--configPostTextColor)!important} .step-3-video-container .step-form-content .ng-select-container .ng-arrow:before{border-color:var(--configPostTextColor)!important} .step-3-video-container .step-form-content .ng-dropdown-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-video-container .step-form-content .ng-dropdown-panel .ng-dropdown-panel-items .ng-option-label{color:var(--configPostTextColor)!important} .step-3-video-container .step-form-content.uploading{pointer-events:none;opacity:.7} .step-3-video-container .step-form-content.uploading input, .step-3-video-container .step-form-content.uploading textarea, .step-3-video-container .step-form-content.uploading select, .step-3-video-container .step-form-content.uploading button, .step-3-video-container .step-form-content.uploading label{pointer-events:none;cursor:not-allowed} .step-3-video-container .step-form-content.uploading .pricing-options-section{pointer-events:none;opacity:.6}@media screen and (min-width: 993px){.step-3-container-min-width[_ngcontent-%COMP%]{min-width:765px}}"]}),a})();const Is=["deleteItemModal"];function Es(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",13)(1,"app-toggle-enable",14,15),t.NdJ("toggleChanged",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.toggleChanged(i))}),t.qZA(),t.TgZ(3,"button",16),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deleteOpenedItem())}),t._UZ(4,"em",17),t.qZA()()}if(2&a){const n=t.oxw();
1t.xp6(1),t.Q6J("currentState",n.enable)("disableMessage",n.CONSTS.DISABLE)("enableMessage",n.CONSTS.ENABLE)("isWelcomeMessage",!0),t.xp6(2),t.Q6J("title",n.CONSTS.DELETE)}}function ys(a,m){if(1&a&&(t.TgZ(0,"div",23)(1,"div",24)(2,"div",25),t._UZ(3,"em",26),t.qZA()(),t.TgZ(4,"div",27),t._UZ(5,"div",28)(6,"div",29),t.qZA(),t.TgZ(7,"div",30),t._UZ(8,"div",31)(9,"div",32)(10,"div",33),t.qZA()()),2&a){const n=t.oxw(3);t.xp6(3),t.Q6J("ngClass",n.PORTFOLIO_TYPE_ICON_MAP[n.portfolioType])}}function ks(a,m){if(1&a&&(t.TgZ(0,"div",21),t.YNc(1,ys,11,1,"div",22),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.SKELETON_ITEMS)}}function ws(a,m){if(1&a&&(t.TgZ(0,"div",52),t._UZ(1,"img",53),t.qZA()),2&a){const n=t.oxw().$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("src",n.thumbnailPreview||n.thumbnail||e.albumCoverImage,t.LSH)("alt",n.item_name)("originalUrl",n.thumbnailPreview||n.thumbnail||e.albumCoverImage)("format","webp")}}function As(a,m){if(1&a&&(t.TgZ(0,"div",54),t._UZ(1,"em",26),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.Q6J("ngClass",n.PORTFOLIO_TYPE_ICON_MAP[n.portfolioType])}}function Ds(a,m){if(1&a&&(t.TgZ(0,"span",55),t._uU(1),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.hij(" ",n.PORTFOLIO_CONSTS_CONST.DISABLED_STATUS_MSG," ")}}function Ls(a,m){if(1&a&&(t.TgZ(0,"div",56),t._UZ(1,"p",57),t.qZA()),2&a){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("lines",2)("innerHTML",n.description,t.oJD)}}function Fs(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",36),t.NdJ("cdkDragStarted",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.isDragging=!0)})("cdkDragEnded",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.isDragging=!1)}),t.TgZ(1,"div",37)(2,"div",38),t._UZ(3,"em",39),t.qZA(),t.TgZ(4,"div",40)(5,"div",41),t.YNc(6,ws,2,4,"div",42),t.YNc(7,As,2,1,"div",43),t.YNc(8,Ds,2,1,"span",44),t.qZA(),t.TgZ(9,"div",45)(10,"h5",46),t._uU(11),t.qZA()(),t.YNc(12,Ls,2,2,"div",47),t.TgZ(13,"div",48)(14,"button",49),t.NdJ("click",function(){const o=t.CHM(n).index,s=t.oxw(3);return t.KtG(s.editItem(o))}),t._UZ(15,"em",50),t.qZA(),t.TgZ(16,"button",51),t.NdJ("click",function(){const o=t.CHM(n).index,s=t.oxw(3);return t.KtG(s.removeItem(o))}),t._UZ(17,"em",17),t.qZA()()()()()}if(2&a){const n=m.$implicit,e=t.oxw(3);t.xp6(6),t.Q6J("ngIf",n.thumbnail||e.albumCoverImage),t.xp6(1),t.Q6J("ngIf",!n.thumbnail&&!e.albumCoverImage),t.xp6(1),t.Q6J("ngIf",n.status===e.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_STATUS.INACTIVE),t.xp6(3),t.Oqu(n.item_name),t.xp6(1),t.Q6J("ngIf",n.description),t.xp6(2),t.Q6J("title",e.CONSTS.EDIT),t.xp6(2),t.Q6J("title",e.CONSTS.DELETE)}}function Ns(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",34),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const o=t.oxw(2);return t.KtG(o.drop(i))}),t.YNc(1,Fs,18,7,"div",35),t.qZA()}if(2&a){const n=t.oxw(2);t.Q6J("cdkDropListDisabled",(null==n.addedItems?null:n.addedItems.length)===n.Application.ONE)("cdkDropListAutoScrollStep",n.AUTO_SCROLL_STEP)("cdkDropListData",n.addedItems),t.xp6(1),t.Q6J("ngForOf",n.addedItems)("ngForTrackBy",n.trackByItem)}}function Rs(a,m){if(1&a&&(t.TgZ(0,"div",18),t.YNc(1,ks,2,1,"div",19),t.YNc(2,Ns,2,5,"div",20),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",!(null!=n.addedItems&&n.addedItems.length)),t.xp6(1),t.Q6J("ngIf",(null==n.addedItems?null:n.addedItems.length)>n.Application.ZERO)}}function Us(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",58)(1,"button",59),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleAddItemForm())}),t.TgZ(2,"span",60),t._uU(3,"+"),t.qZA(),t.TgZ(4,"span"),t._uU(5),t.qZA()()()}if(2&a){const n=t.oxw();t.xp6(5),t.Oqu(n.CONSTS.ADD_COLLECTION_ITEM)}}function Zs(a,m){if(1&a&&(t.TgZ(0,"div",72),t._UZ(1,"app-textarea",68),t.qZA()),2&a){const n=t.oxw(3);t.xp6(1),t.Q6J("field",n.descriptionField)("form",n.form)("disabled",n.isUploadingFile)}}function Vs(a,m){if(1&a&&(t.TgZ(0,"div",87),t._uU(1),t.qZA()),2&a){const n=t.oxw(5);t.xp6(1),t.hij(" ",n.thumbnailFieldConfig.fileTypes," ")}}const Bs=function(a,m,n){return{cropperMinWidth:a,cropperMinHeight:m,cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:n,maintainAspectRatio:!0}},Ys=function(a){return{isMultiple:!1,cropperOptions:a}},Hs=function(a){return{type:"button",label:a,class:"btn btn-primary select-file-btn"}};function Js(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"label",79)(1,"input",80,81),t.NdJ("change",function(i){t.CHM(n);const o=t.oxw(4);return t.KtG(o.fileChangeEvent(i,"thumbnail"))})("mobileFileChange",function(i){t.CHM(n);const o=t.oxw(4);return t.KtG(o.fileChangeEvent(i,"thumbnail"))}),t.qZA(),t.TgZ(3,"div",82),t._UZ(4,"em",83),t.TgZ(5,"div",84),t._uU(6),t.qZA(),t.YNc(7,Vs,2,1,"div",85),t.TgZ(8,"app-button",86),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.MAs(2);return t.KtG(i.click())}),t.qZA()()()}if(2&a){const n=t.oxw(4);let e;t.xp6(1),t.Q6J("accept",n.thumbnailFieldConfig.acceptTypes)("disabled",n.showProgress||n.isUploadingFile)("fileConfig",t.VKq(10,Ys,t.kEZ(6,Bs,n.CROPPER_MIN_WIDTH,n.CROPPER_MIN_HEIGHT,n.ASPECT_RATIO_NUMERATOR/n.ASPECT_RATIO_DENOMINATOR))),t.xp6(5),t.hij(" ",n.thumbnailFieldConfig.uploadLabel," "),t.xp6(1),t.Q6J("ngIf",!(n.thumbnailPreview||null!=(e=n.form.get("thumbnail"))&&e.value)),t.xp6(1),t.Q6J("btnField",t.VKq(12,Hs,n.CONSTS.SELECT_FILE))}}function Ws(a,m){if(1&a&&(t.TgZ(0,"div",92),t._UZ(1,"circle-progress",93),t.qZA()),2&a){const n=t.oxw(5);t.xp6(1),t.Q6J("percent",n.percent)("radius",n.CIRCLE_RADIUS)("outerStrokeWidth",n.STROKE_WIDTH)("innerStrokeWidth",n.STROKE_WIDTH)("outerStrokeColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#09c6da")("innerStrokeColor","#47665f")("animation",!1)("animationDuration",n.ANIMATION_DURATION)("showSubtitle",!1)("backgroundPadding",n.BACKGROUND_PADDING)("titleFontSize",n.TITLE_FONT_SIZE)("titleColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("unitsColor",n.cs.isWhiteLabelWeb?null==n.cs.whiteLabelData||null==n.cs.whiteLabelData.data||null==n.cs.whiteLabelData.data.whiteLabel?null:n.cs.whiteLabelData.data.whiteLabel.theme_color:"#ffffff")("space",n.SPACE)}}function Qs(a,m){if(1&a&&t._UZ(0,"img",94),2&a){const n=t.oxw(5);let e,i;t.Q6J("originalUrl",n.thumbnailPreview||(null==(e=n.form.get("thumbnail"))?null:e.value))("src",n.thumbnailPreview||(null==(i=n.form.get("thumbnail"))?null:i.value),t.LSH)("format","webp")}}function qs(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"a",95),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(5);
1return t.KtG(i.removeThumbnail())}),t._uU(1," \xd7 "),t.qZA()}if(2&a){const n=t.oxw(5);t.Udp("z-index",n.Z_INDEX)}}const Gs=function(a){return[a]};function zs(a,m){if(1&a&&(t.TgZ(0,"div",88),t.YNc(1,Ws,2,14,"div",89),t.YNc(2,Qs,1,3,"img",90),t.YNc(3,qs,2,2,"a",91),t.qZA()),2&a){const n=t.oxw(4);let e;t.Q6J("ngClass",t.VKq(4,Gs,n.actualFeedPreviewOrientation)),t.xp6(1),t.Q6J("ngIf",n.showProgress&&n.cs.isBrowser),t.xp6(1),t.Q6J("ngIf",(n.thumbnailPreview||(null==(e=n.form.get("thumbnail"))?null:e.value))&&!n.showProgress),t.xp6(1),t.Q6J("ngIf",!n.showProgress)}}const Ks=function(a){return{message:a}},js=function(a){return{required:a}},$s=function(a){return{validation:a}};function Xs(a,m){if(1&a&&(t.TgZ(0,"div",73)(1,"div",66)(2,"label",74),t._uU(3),t.qZA(),t.TgZ(4,"div",75),t.YNc(5,Js,9,14,"label",76),t.YNc(6,zs,4,6,"div",77),t.qZA(),t._UZ(7,"app-validation-errors",78),t.qZA()()),2&a){const n=t.oxw(3);let e,i,o;t.xp6(3),t.AsE(" ",n.thumbnailFieldConfig.fileLabel,"",null!=(e=n.form.get("thumbnail"))&&e.hasError("required")?"*":""," "),t.xp6(2),t.Q6J("ngIf",!(n.thumbnailPreview||null!=(i=n.form.get("thumbnail"))&&i.value||n.showProgress)),t.xp6(1),t.Q6J("ngIf",n.showProgress||n.thumbnailPreview||(null==(o=n.form.get("thumbnail"))?null:o.value)),t.xp6(1),t.Q6J("control",n.form.get("thumbnail"))("field",t.VKq(10,$s,t.VKq(8,js,t.VKq(6,Ks,n.thumbnailFieldConfig.requiredMessage))))}}function tr(a,m){if(1&a&&(t.TgZ(0,"div",98),t._UZ(1,"app-step-2-dsp-links",99),t.qZA()),2&a){const n=t.oxw(4);t.xp6(1),t.Q6J("form",n.form)("portfolioType",n.portfolioType)("isIndividual",!0)("dspModalHeaderLabel",n.CONSTS.CREATE_CUSTOM_PARTNER_LINK)}}function er(a,m){if(1&a&&(t.TgZ(0,"div",96)(1,"div",4)(2,"h3"),t._uU(3),t.qZA()(),t.YNc(4,tr,2,4,"div",97),t.qZA()),2&a){const n=t.oxw(3);t.xp6(3),t.Oqu(n.CONSTS.OPTIONAL_SALES_PARTNERS),t.xp6(1),t.Q6J("ngIf",n.form)}}const or=function(){return[]};function ir(a,m){if(1&a&&(t.TgZ(0,"div")(1,"div",64)(2,"div",65)(3,"div",66)(4,"div",67),t._UZ(5,"app-input",68),t.qZA(),t.YNc(6,Zs,2,3,"div",69),t.qZA()(),t.YNc(7,Xs,8,12,"div",70),t.qZA(),t.YNc(8,er,5,2,"div",71),t.qZA()),2&a){const n=t.oxw(2);let e;t.xp6(5),t.Q6J("field",n.nameField)("form",n.form)("disabled",n.isUploadingFile),t.xp6(1),t.Q6J("ngIf",n.descriptionField),t.xp6(1),t.Q6J("ngIf",n.showThumbnail),t.xp6(1),t.Q6J("ngIf",((null==n.form||null==(e=n.form.get("distributeThroughDSP"))?null:e.value)||t.DdM(6,or)).length>0)}}const nr=function(a){return{uploading:a}};function sr(a,m){if(1&a&&(t.TgZ(0,"div",61)(1,"form",62),t.YNc(2,ir,9,7,"div",63),t.qZA()()),2&a){const n=t.oxw();t.Q6J("ngClass",t.VKq(3,nr,n.isUploadingFile)),t.xp6(1),t.Q6J("formGroup",n.form),t.xp6(1),t.Q6J("ngIf",n.nameField)}}const rr=function(a){return{type:"button",class:"btn btn-default",label:a}},ar=function(a,m,n){return{type:"button",class:"btn btn-primary",label:a,disabled:m,loading:n}};function lr(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",100)(1,"app-button",86),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleCancel())}),t.qZA(),t.TgZ(2,"app-button",86),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleAddItem())}),t.qZA()()}if(2&a){const n=t.oxw();t.xp6(1),t.Q6J("btnField",t.VKq(2,rr,n.CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.kEZ(4,ar,n.editingItemIndex>=n.Application.ZERO?n.CONSTS.UPDATE_ITEM:n.CONSTS.ADD_ITEM,!n.isFormValid,n.isUploadingFile))}}const cr=function(a,m,n,e){return{cropperMinWidth:a,cropperMinHeight:m,cropperStaticWidth:null,cropperStaticHeight:null,aspectRatio:n,maintainAspectRatio:!1,recommendedText:e}};function dr(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-image-cropper",101),t.NdJ("closeCrop",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.cancelCrop(i))})("cropImageUpload",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.imageFeedClicked(i))}),t.qZA()}if(2&a){const n=t.oxw();t.Q6J("imageChangeEvent",n.imageChangedEvent)("isOpen",n.isOpen)("cropperOptions",t.l5B(4,cr,n.CROPPER_MIN_WIDTH,n.CROPPER_MIN_HEIGHT,n.ASPECT_RATIO_NUMERATOR/n.ASPECT_RATIO_DENOMINATOR,n.PORTFOLIO_CONSTS_CONST.CUSTOM_PORTFOLIO_CROPPER_TEXT))("imageWidth",n.imageWidth)}}const pr=function(){return{"step-3-container-min-width":!0}};let to=(()=>{const m=class{constructor(e,i,o,s,p,u,_,h){this.cs=e,this.uploadService=i,this.cdr=o,this.ngZone=s,this.modalHandlerService=p,this.apiCallService=u,this.route=_,this.router=h,this.isEditMode=!1,this.showThumbnail=!0,this.isDirectDistributionChecked=!0,this.albumSk="",this.portfolioType=O.W.PORTFOLIO_TYPE.CUSTOM,this.currentStepNumber=3,this.totalSteps=3,this.isUploadingFile=!1,this.disabledSubscriptionPlanIds=[],this.CONSTS=w,this.Ap
1plication=l.Mx,this.PORTFOLIO_TYPE_CONSTS=O.W,this.PORTFOLIO_BANNER_VIEW_CONSTS=ee.oM,this.MOBILE_BRIDGE_EVENT_SEND=$e.iJ,this.PORTFOLIO_CONSTS=W.fD,this.commonEnum=ct.i4,this.PORTFOLIO_CONSTS_CONST=at.fD,this.PORTFOLIO_TYPE_ICON_MAP=ee.WT,this.CROPPER_MIN_WIDTH=Number(l.Mx.TWO_HUNDRED),this.CROPPER_MIN_HEIGHT=Number(l.Mx.TWO_HUNDRED),this.ASPECT_RATIO_NUMERATOR=l.Mx.ONE,this.ASPECT_RATIO_DENOMINATOR=l.Mx.ONE,this.STROKE_WIDTH=l.Mx.THREE,this.ANIMATION_DURATION=Number(l.Mx.THREE_HUNDRED),this.BACKGROUND_PADDING=l.Mx.ZERO,this.TITLE_FONT_SIZE=Number(l.Mx.TEN),this.SPACE=l.Mx.MINUS_ONE*l.Mx.THREE,this.Z_INDEX=Number(l.Mx.TEN),this.SKELETON_ITEMS=[Number(l.Mx.ONE),Number(l.Mx.TWO),Number(l.Mx.THREE)],this.AUTO_SCROLL_STEP=Number(l.Mx.THIRTY_FIVE),this.CIRCLE_RADIUS=Number(l.Mx.TWENTY_THREE),this.thumbnailPreview="",this.imageChangedEvent="",this.croppedImage="",this.isOpen=!1,this.imageWidth=l.Mx.ZERO,this.feedPreviewOrientation=W.ox.PORTRAIT,this.actualFeedPreviewOrientation=W.ox.PORTRAIT,this.showProgress=!1,this.percent=l.Mx.ZERO,this.restrictedImages=[],this.albumDspBackup=[],this.didBackupAlbumDsp=!1,this.selectedItemDelete=null,this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.addedItems=[],this.showAddItemForm=!1,this.editingItem=null,this.editingItemIndex=l.Mx.MINUS_ONE,this.isDragging=!1,this.timestamp=null,this.enable=!0,this.itemEditFromQueryHandled=!1,this.itemAddFromQueryHandled=!1,this.destroy$=new X.x}ngOnInit(){this.showAddItemForm=!1,this.initForm(),this.initFields(),this.restoreFormData(),this.itemAddFromQueryHandled=!1,setTimeout(()=>{this.handleItemEditFromQuery()},l.Mx.TEN)}ngOnChanges(e){e.form&&this.form&&(this.initForm(),this.initFields(),this.cdr.detectChanges(),this.itemEditFromQueryHandled=!1,setTimeout(()=>{this.handleItemEditFromQuery()},l.Mx.TEN))}initFields(){this.nameField={type:W.sf.TEXT,label:"Item Name",name:"item_name",placeholder:w.ENTER_NAME,class:"col-12",autoComplete:"off",validation:{required:{message:"Item Name is required"},maxlength:{value:70,message:"Maximum 70 characters allowed"}},maxlength:70},this.descriptionField={type:W.sf.TEXT_AREA,label:"Item Description (Optional)",name:"custom_description",placeholder:"Enter Description",class:"col-12",maxlength:500,validation:{maxlength:{value:500,message:"Maximum 500 characters allowed"}}}}get albumCoverImage(){return this.form?.get("cover_image")?.value||""}initForm(){this.form||(this.form=new N.cw({})),this.form.get("item_name")||this.form.addControl("item_name",new N.NI("")),this.form.get("thumbnail")||this.form.addControl("thumbnail",new N.NI("")),this.form.get("custom_description")||this.form.addControl("custom_description",new N.NI("")),this.form.get("dsp")||this.form.addControl("dsp",new N.NI([]))}get directDistributionTitle(){return w.OPTIONAL_DIRECT_DISTRIBUTION[O.W.PORTFOLIO_TYPE.CUSTOM]}get directSalesInfoMessage(){return w.DIRECT_SALES_INFO_MESSAGE[O.W.PORTFOLIO_TYPE.CUSTOM]}get isStep3Valid(){return!(!this.addedItems||this.addedItems.length===l.Mx.ZERO||this.showAddItemForm)}restoreFormData(){const e=this.form?.get("items")?.value;e&&Array.isArray(e)&&e.length>l.Mx.ZERO&&(this.addedItems=e.map(o=>({...o,status:o.status||O.W.PORTFOLIO_STATUS.ACTIVE})));const i=this.form?.get("thumbnail")?.value;i&&"string"==typeof i&&(this.thumbnailPreview=i)}get thumbnailFieldConfig(){return{fileLabel:"Item Cover Image",uploadLabel:w.UPLOAD_IMAGE,fileTypes:w.IMAGE_FILE_TYPES,acceptTypes:l.Mx.IMAGE_ACCEPT_TYPES_INCLUDING_GIF,requiredMessage:"Item Cover Image is required"}}fileChangeEvent(e,i){this.showProgress||!e?.target?.files?.[0]||i===w.THUMBNAIL&&this.handleImageUpload(e)}handleImageUpload(e){this.cs.handleFileChangeEvent(e,{maxSize:W.eG,minWidth:Number(l.Mx.EIGHTY),minHeight:Number(l.Mx.EIGHTY),isValidFile:i=>Boolean(this.cs.isValidFile(i)),uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,maxSizeMessage:w.IMAGE_FILE_SIZE_MESSAGE,recommendedSize:Kt}).then(i=>{this.ngZone.run(()=>{this.cdr.detectChanges(),this.imageWidth=i.imageWidth,i.isGif?(this.imageChangedEvent=i.event,this.setBannerOrientation(i.imageWidth>i.imageHeight),this.imageFeedClicked(null,!1,!0)):(this.isOpen=!0,this.cs.setBodyClass(!1),this.imageChangedEvent=i.event,this.setBannerOrientation(i.imageWidth>i.imageHeight))})}).catch(i=>{this.cs.showErrorMessage(i.message)})}imageFeedClicked(e,i=!1,o=!1){this.isOpen=!1,this.cs.setBodyClass(!0),this.showProgress=!0,this.percent=l.Mx.ZERO,this.restrictedImages=[],this.cdr.detectChanges();const s=this.imageChangedEvent?.target?.files?.[l.Mx.ZERO],p=o||s&&s.type===l.Mx.IMAGE_GIF_TYPE;this.cs.handleImageFeedClicked({croppedImage:e||this.croppedImage,imageChangedEvent:this.imageChangedEvent,base64ToFile:$t.Ll,isValidFile:u=>Boolean(this.cs.isValidFile(u)),uploadService:this.uploadService,apiUrl:U.Y9.uploadFile,folder:l.D4.createPostImageFolder,fileType:s?.type,uploadImageCompress:this.uploadService.uploadImageCompress.bind(this.uploadService),cdr:this.cdr,isMobileApp:i,mobileFileData:e,isGif:p,onProgress:u=>{this.ngZone.run(()=>{this.percent=u,this.cdr.detectChanges()})}}).then(({preview:u,url:_})=>{this.ngZone.run(()=>{this.percent=l.Mx.ONE_HUNDRED,this.cdr.detectChanges(),setTimeout(()=>{this.showProgress=!1,this.percent=l.Mx.ZERO,this.actualFeedPreviewOrientation=this.feedPreviewOrientation,this.thumbnailPreview=u,this.form.patchValue({thumbnail:_}),this.cdr.detectChanges()},l.Mx.THREE_HUNDRED)})}).catch(u=>{if(this.showProgress=!1,this.percent=l.Mx.ZERO,this.cdr.detectChanges(),u?.restricted&&u?.restrictedImage)return this.restrictedImages=[u.restrictedImage],this.modalHandlerService.showRestrictedContentCarouselModal(this.restrictedImages),void this.removeThumbn
1ail();u?.statusCode!==ct.SM.RESTRICTED_CONTENT&&this.cs.showErrorMessage(u.message||nt.Vm.SOMETHING_WENT_WRONG),this.removeThumbnail()})}removeThumbnail(){this.form.get("thumbnail")?.reset(),this.thumbnailPreview="",this.showProgress=!1,this.percent=l.Mx.ZERO}setBannerOrientation(e){this.feedPreviewOrientation=e?W.ox.LANDSCAPE:W.ox.PORTRAIT}cancelCrop(){this.isOpen=!1,this.cs.setBodyClass(!0)}get isFormValid(){try{if(!this.form)return!1;const e=this.form.get("item_name");return!(!e?.value||!e.value.trim())}catch(e){return console.error("Error in isFormValid:",e),!1}}handleCancel(){null!==this.editingItem&&this.editingItemIndex>=l.Mx.ZERO&&(this.editingItem=null,this.editingItemIndex=l.Mx.MINUS_ONE),this.restoreAlbumDsp(),this.resetForm(),this.showAddItemForm=!1,this.cdr.detectChanges()}toggleAddItemForm(){this.showAddItemForm=!this.showAddItemForm,this.showAddItemForm?(this.editingItem=null,this.editingItemIndex=l.Mx.MINUS_ONE,this.resetForm(),this.backupAndSetItemDsp(this.form?.get("dsp")?.value||[])):(null!==this.editingItem&&this.editingItemIndex>=l.Mx.ZERO&&(this.editingItem=null,this.editingItemIndex=l.Mx.MINUS_ONE),this.restoreAlbumDsp(),this.resetForm())}resetForm(){this.form.get("item_name")&&this.form.get("item_name")?.reset(),this.form.get("thumbnail")&&this.form.get("thumbnail")?.reset(),this.form.get("custom_description")&&this.form.get("custom_description")?.reset(),this.thumbnailPreview="",this.showProgress=!1,this.percent=l.Mx.ZERO,this.timestamp=null,this.editingItem=null,this.editingItemIndex=l.Mx.MINUS_ONE}backupAndSetItemDsp(e){if(!this.form?.get("dsp"))return;const i=this.form.get("dsp")?.value;this.albumDspBackup=Array.isArray(i)?lt()(i):[],this.didBackupAlbumDsp=!0,this.form.get("dsp")?.setValue(Array.isArray(e)?lt()(e):[],{emitEvent:!0})}restoreAlbumDsp(){!this.didBackupAlbumDsp||!this.form?.get("dsp")||(this.form.get("dsp")?.setValue(lt()(this.albumDspBackup),{emitEvent:!0}),this.albumDspBackup=[],this.didBackupAlbumDsp=!1)}handleAddItem(){if(this.isUploadingFile)return;if(!this.form)return void this.cs.showErrorMessage(w.FORM_NOT_INITIALIZED);const e=this.form.get("item_name");Object.keys(this.form.controls).forEach(o=>{const s=this.form.get(o);s&&s.markAsTouched()});const i=e?.value;i&&("string"!=typeof i||i.trim())?(this.isUploadingFile=!0,this.addItemToArray()):this.cs.showErrorMessage("Item Name is required")}createItemData(){const o={id:this.editingItem?.id||Date.now(),item_name:this.form.get("item_name")?.value||"",thumbnail:this.form.get("thumbnail")?.value||"",thumbnailPreview:this.thumbnailPreview,sk:this.editingItem?.sk||"",pk:this.editingItem?.pk||"",created_at:this.editingItem?.created_at||void 0,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE};this.form.get("custom_description")?.value&&(o.description=this.form.get("custom_description")?.value||"");const s=this.form.get("dsp")?.value;return s&&Array.isArray(s)&&s.length>l.Mx.ZERO&&(o.dsp=lt()(s)),o}addItemToArray(){const e=this.createItemData();null!==this.editingItem&&this.editingItemIndex>=l.Mx.ZERO?this.handleEditItem(e):this.handleNewItem(e),this.cdr.detectChanges()}handleNewItem(e){this.albumSk?this.saveIndividualContentToAlbum(e):(this.addedItems.push({...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE}),this.syncItemsToForm(),this.restoreAlbumDsp(),this.resetForm(),this.isUploadingFile=!1,this.showAddItemForm=!1)}handleEditItem(e){if(this.albumSk)this.updateItem(e);else{if(this.editingItemIndex>=l.Mx.ZERO&&this.editingItemIndex<this.addedItems.length){const i={...this.addedItems[this.editingItemIndex],...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedItems[this.editingItemIndex]=i,this.syncItemsToForm(),this.restoreAlbumDsp(),this.cdr.detectChanges()}this.editingItem=null,this.editingItemIndex=l.Mx.MINUS_ONE}}saveIndividualContentToAlbum(e){if(this.albumSk&&e)if(e.sk&&e.pk)this.updateItem(e);else{const i={type:this.portfolioType.toUpperCase(),album_sk:this.albumSk,title:e.item_name||"",cover_image_url:e.thumbnail||this.albumCoverImage||"",status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,allow_download:!1};e.dsp&&Array.isArray(e.dsp)&&e.dsp.length&&(i.dsp=this.buildDspArray(e.dsp,this.step2DspLinksComponent?.dspForm?.value||{})),void 0!==e.description&&(i.description=e.description||""),this.apiCallService.post(U.Y9.portfolioContentAlbum,i,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{if(o.status&&o.data){if(e.id){const s=this.addedItems.findIndex(p=>p.id===e.id);if(s!==l.Mx.MINUS_ONE)this.addedItems[s].sk=o.data.sk||"",this.addedItems[s].pk=o.data.pk||"",this.addedItems[s].status=e.status||o.data.status||O.W.PORTFOLIO_STATUS.ACTIVE,this.syncItemsToForm();else{const p={...e,sk:o.data.sk||"",pk:o.data.pk||"",status:e.status||o.data.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedItems.push(p),this.syncItemsToForm()}}this.restoreAlbumDsp(),this.resetForm(),this.isUploadingFile=!1,this.showAddItemForm=!1,this.cs.showSuccessMessage(o.message||"Item saved successfully")}else this.isUploadingFile=!1,this.cs.showErrorMessage(o.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:o=>{this.isUploadingFile=!1,this.cs.showErrorMessage(o?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}}buildDspArray(e,i){return e?.length?e.map(o=>{const s=o.sk||"";return{pk:o.pk||"",sk:s,url:i[`${s}url`]||"",button_label:i[`${s}text`]||"",logo:o.logo||"",name:o.name||""}}):[]}updateItem(e){if(!e.sk||!e.pk)return;const i={type:this.portfolioType.toUpperCase(),pk:e.pk,sk:e.sk,title:e.item_name||"",cover_image_url:e.thumbnail||this.albumCoverImage||"",status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,allow_download:void 0!==e.allow_download&&e.allow_download};void 0!==e.description&&(i.description=e.description||""),e.dsp&&Array.isArray(e.dsp)&&(i.dsp=this.buildDspArray(e.dsp,this.step2DspLinksComponent?.dspForm?.value||{})),this.apiCallService.put(U.Y9.portfolioContent,i,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{if(o.status&&o.data){if(e.id&&this.addedItems.length>l.Mx.ZERO){const s=this.addedItems.findIndex(p=>p.id===e.id);s!==l.Mx.MINUS_ONE&&(this.addedItems[s].sk=o.data.sk||e.sk,this.addedItems[s].pk=o.data.pk||e.pk,this.addedItems[s].status=e.status||o.data.status||O.W.PORTFOLIO_STATUS.ACTIVE,this.syncItemsToForm())}this.cs.showSuccessMessage(o.message||"Item updated successfully"),this.restoreAlbumDsp(),this.resetForm(),this.isUploadingFile=!1,this.showAddItemForm=!1}else if(o.status){this.cs.showSuccessMessage(o.message),this.restoreAlbumDsp(),this.resetForm(),this.isUploadingFile=!1,this.showAddItemForm=!1;const s=this.addedItems.findIndex(u=>u.sk===e.sk),p={...e,status:e.status||O.W.PORTFOLIO_STATUS.ACTIVE};this.addedItems.splice(s,l.Mx.ONE,p),this.syncItemsToForm()}else this.isUploadingFile=!1,this.cs.showErrorMessage(o.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:o=>{this.isUploadingFile=!1,this.cs.showErrorMessage(o?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}removeItem(e){const i=this.addedItems[e];this.selectedItemDeleteIndex=e,this.selectedItemDelete=i,this.deleteItemModal?.openModal()}deleteOpenedItem(){this.selectedItemDeleteIndex=this.editingItemIndex,this.selectedItemDelete=this.editingItem,this.deleteItemModal?.openModal()}deleteItem(){const e=this.selectedItemDeleteIndex;this.deleteCustomItem(this.selectedItemDelete?.sk,e,this.editingItemIndex===e)}deleteCustomItem(e,i,o=!1){if(e){const s=`${U.Y9.portfolioContent}/${encodeURIComponent(e)}?type=${this.portfolioType.toUpperCase()}`;this.apiCallService.delete(s,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:p=>{o&&this.handleCancel(),p.status?(this.addedItems.splice(i,l.Mx.ONE),this.syncItemsToForm(),this.cdr.detectChanges(),this.cs.showSuccessMessage(p.message||nt.Vm.SOMETHING_WENT_WRONG)):this.cs.showErrorMessage(p.message||this.CONSTS.FAILED_TO_SAVE_CONTENT),this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.selectedItemDelete=null},error:p=>{this.cs.showErrorMessage(p?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}else o&&this.handleCancel(),this.selectedItemDeleteIndex=l.Mx.MINUS_ONE,this.selectedItemDelete=null,this.addedItems.splice(i,l.Mx.ONE),this.syncItemsToForm(),this.cdr.detectChanges()}get deleteAlbumMessage(){return this.selectedItemDelete?this.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_MESSAGE[this.portfolioType].replace("{{title}}",this.selectedItemDelete?.item_name||""):""}onCancelDeleteItem(){this.deleteItemModal&&(this.deleteItemModal.closeModal(),this.selectedItemDelete=null)}drop(e){if((0,Pt.bA)(this.addedItems,e.previousIndex,e.currentIndex),e.previousIndex!=e.currentIndex){this.addedItems.forEac
1h((o,s)=>{o.sequence_number=s+l.Mx.ONE});const i=this.addedItems.filter(o=>o.pk&&o.sk).map(o=>({pk:o.pk,sk:o.sk,sequence_number:o.sequence_number||this.addedItems.indexOf(o)+l.Mx.ONE}));i.length&&this.apiCallService.put(U.Y9.portfolioSequenceNumber,{data:i},!1).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{this.cs.showSuccessMessage(o.message)},error:o=>{this.cs.showErrorMessage(o.message)}})}}trackByItem(e,i){return i?.id||e}syncItemsToForm(){if(this.form&&this.form.get("items")){const e=this.addedItems.map(i=>{const o={id:i.id,item_name:i.item_name,thumbnail:i.thumbnail,thumbnailPreview:i.thumbnailPreview,status:i.status||O.W.PORTFOLIO_STATUS.ACTIVE};return void 0!==i.description&&(o.description=i.description||""),i.dsp&&Array.isArray(i.dsp)&&(o.dsp=i.dsp),o});this.form.get("items")?.setValue(e,{emitEvent:!1})}}editItem(e){const i=this.addedItems[e],o=i.status||O.W.PORTFOLIO_STATUS.ACTIVE;this.enable=o===O.W.PORTFOLIO_STATUS.ACTIVE,this.editingItem={...i,status:o},this.editingItemIndex=e,this.showAddItemForm=!0;const s={thumbnail:i.thumbnail};s.item_name=i.item_name,void 0!==i.description&&(s.custom_description=i.description||""),this.form.patchValue(s),this.backupAndSetItemDsp(i.dsp||[]),i.thumbnail&&(this.thumbnailPreview=i.thumbnailPreview||i.thumbnail),setTimeout(()=>{this.step2DspLinksComponent?.remergeOptions$.next()},l.Mx.ONE_HUNDRED),this.cdr.detectChanges()}toggleChanged(e){this.enable=e}handleItemEditFromQuery(){if(this.itemEditFromQueryHandled||this.itemAddFromQueryHandled)return;const e=this.route.snapshot.queryParamMap.get("videoSk"),i="true"===this.route.snapshot.queryParamMap.get("isAddItem");if(!e&&i)return this.toggleAddItemForm(),this.itemAddFromQueryHandled=!0,void this.cleanQueryParameters();if(this.addedItems&&this.addedItems.length)try{const o=this.cs.decodeToUTF(e),s=this.addedItems.findIndex(p=>p.sk===o);s>=l.Mx.ZERO?(this.itemEditFromQueryHandled=!0,this.editItem(s),this.cleanQueryParameters()):this.itemEditFromQueryHandled=!0}catch{this.itemEditFromQueryHandled=!0,this.cleanQueryParameters()}else setTimeout(()=>{this.itemEditFromQueryHandled||this.handleItemEditFromQuery()},l.Mx.TEN)}cleanQueryParameters(){const e={...this.route.snapshot.queryParams};e.step&&delete e.step,e.videoSk&&delete e.videoSk,this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})}ngOnDestroy(){this.restoreAlbumDsp(),this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36($.v),t.Y36(bt.C),t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(Tt.Y),t.Y36(gt.F),t.Y36(V.gz),t.Y36(V.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-step-3-custom"]],viewQuery:function(i,o){if(1&i&&(t.Gf(Vt,5),t.Gf(Is,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.step2DspLinksComponent=s.first),t.iGM(s=t.CRH())&&(o.deleteItemModal=s.first)}},inputs:{form:"form",isEditMode:"isEditMode",showThumbnail:"showThumbnail",isDirectDistributionChecked:"isDirectDistributionChecked",albumSk:"albumSk",userProfile:"userProfile",portfolioType:"portfolioType",currentStepNumber:"currentStepNumber",totalSteps:"totalSteps",isUploadingFile:"isUploadingFile",disabledSubscriptionPlanIds:"disabledSubscriptionPlanIds"},features:[t.TTD],decls:17,vars:17,consts:[[1,"step-3-direct-distribution-container","step-3-custom-container",3,"ngClass"],[1,"step-indicator-container"],[1,"step-indicator"],["class","toggle-delete-container",4,"ngIf"],[1,"section-title"],[3,"message","infoIconSize"],["class","added-items-list mb-4",4,"ngIf"],["class","add-item-button mb-4",4,"ngIf"],["class","step-form-content",3,"ngClass",4,"ngIf"],["class","step-3-action-buttons mt-4",4,"ngIf"],[3,"imageChangeEvent","isOpen","cropperOptions","imageWidth","closeCrop","cropImageUpload",4,"ngIf"],[3,"dynamicClass","ConfirmationMessage","headerLabel","commonEnum","confirmDelete","cancelDelete"],["deleteItemModal",""],[1,"toggle-delete-container"],[3,"currentState","disableMessage","enableMessage","isWelcomeMessage","toggleChanged"],["enableToggle",""],["type","button",1,"btn","btn-delete","btn-delete-uppr",3,"title","click"],[1,"icon-delete-filled"],[1,"added-items-list","mb-4"],["class","items-empty-placeholder songs-empty-placeholder",4,"ngIf"],["class","songs-list items-list","cdkDropList","",3,"cdkDropListDisabled","cdkDropListAutoScrollStep","cdkDropListData","cdkDropListDropped",4,"ngIf"],[1,"items-empty-placeholder","songs-empty-placeholder"],["class","skeleton-item skeleton-song-item",4,"ngFor","ngForOf"],[1,"skeleton-item","skeleton-song-item"],[1,"song-thumbnail-wrapper","skeleton-thumbnail"],[1,"song-audio-icon"],[3,"ngClass"],[1,"song-details"],[1,"skeleton-line","skeleton-title"],[1,"skeleton-line","skeleton-duration"],[1,"song-actions"],[1,"skeleton-button","skeleton-preview"],[1,"skeleton-button","skeleton-edit"],[1,"skeleton-button","skeleton-delete"],["cdkDropList","",1,"songs-list","items-list",3,"cdkDropListDisabled","cdkDropListAutoScrollStep","cdkDropListData","cdkDropListDropped"],["class","song-item","cdkDrag","",3,"cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"song-item",3,"cdkDragStarted","cdkDragEnded"],[1,"d-flex","gap-3"],["cdkDragHandle","",1,"drag-handle"],[1,"icon-drag"],[1,"d-flex","justify-content-between","align-items-center","gap-3","flex-wrap","w-100"],[1,"song-thumbnail-wrapper"],["class","song-thumbnail",4,"ngIf"],["class","song-audio-icon item-icon",4,"ngIf"],["class","preview-processing",4,"ngIf"],[1,"song-details","item-details"],[1,"song-name","item-name"],["class","song-description item-description w-100",4,"ngIf"],[1,"song-actions","item-actions"],["type","button",1,"btn","btn-edit",3,"title","click"],[1,"icon-res-editfill"],["type","button",1,"btn","btn-delete",3,"title","click"],[1,"song-thumbnail"],["appDisableRightClick","","appMobileOptimization","","loading","lazy",3,"src","alt","originalUrl","format"],[1,"song-audio-icon","item-icon"],[1,"preview-processing"],[1,"song-description","item-description","w-100"],["appReadMore","",1,"item-description-text",3,"lines","innerHTML"],[1,"add-item-button","mb-4"],["type","button",1,"btn","btn-add-item",3,"click"],[1,"plus-icon"],[1,"step-form-content",3,"ngClass"],[3,"formGroup"],[4,"ngIf"],[1,"row","first-row-custom-input"],[1,"col-12","add-item-section","col-lg-8"],[1,"form-group"],[1,"name-field","mb-3"],[3,"field","form","disabled"],["class","col-12 mb-4 description-field",4,"ngIf"],["class","col-12 col-lg-4",4,"ngIf"],["class","methods-of-consumption-section mt-4",4,"ngIf"],[1,"col-12","mb-4","description-field"],[1,"col-12","col-lg-4"],[1,"parent-label"],[1,"uploadContainer"],["for","thumbnailUpload","class","custom-label-upload optional-item-image-section",4,"ngIf"],["class","uploadFileImageData optional-item-image-section",3,"ngClass",4,"ngIf"],[3,"control","field"],["for","thumbnailUpload",1,"custom-label-upload","optional-item-image-section"],["type","file","onclick","this.value = null","id","thumbnailUpload","appMobileBridgeFileInput","",1,"upload","d-none",3,"accept","disabled","fileConfig","change","mobileFileChange"],["thumbnailInput",""],[1,"banner-image-type-portfolio"],[1,"icon-litebanner-upload"],[1,"image-title"],["class","image-msg",4,"ngIf"],[3,"btnField","handleButtonClick"],[1,"image-msg"],[1,"uploadFileImageData","optional-item-image-section",3,"ngClass"],["class","show-progress-bar-thumbnail pointer-none",4,"ngIf"],["appDisableRightClick","","appMobileOptimization","","alt","Thumbnail","loading","lazy","decoding","async",3,"originalUrl","src","format",4,"ngIf"],["class","close",3,"z-index","click",4,"ngIf"],[1,"show-progress-bar-thumbnail","pointer-none"],[3,"percent","radius","outerStrokeWidth","innerStrokeWidth","outerStrokeColor","innerStrokeColor","animation","animationDuration","showSubtitle","backgroundPadding","titleFontSize","titleColor","unitsColor","space"],["appDisableRightClick","","appMobileOptimization","","alt","Thumbnail","loading","lazy","decoding","async",3,"originalUrl","src","format"],[1,"close",3,"click"],[1,"methods-of-consumption-section","mt-4"],["class","methods-of-consumption-item",4,"ngIf"],[1,"methods-of-consumption-item"],[3,"form","portfolioType","isIndividual","dspModalHeaderLabel"],[1,"step-3-action-buttons","mt-4"],[3,"imageChangeEvent","isOpen","cropperOptions","imageWidth","closeCrop","cropImageUpload"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),t._uU(4),t.qZA()(),t.YNc(5,Es,5,5,"div",3),t.qZA(),t.TgZ(6,"div",4)(7,"h3"),t._uU(8),t._UZ(9,"app-info-icon",5),t.qZA()(),t.YNc(10,Rs,3,2,"div",6),t.YNc(11,Us,6,1,"div",7),t.YNc(12,sr,3,5,"div",8),t.YNc(13,lr,3,8,"div",9),t.YNc(14,dr,1,9,"app-image-cropper",10),t.qZA(),t.TgZ(15,"app-confirmation-modal",11,12),t.NdJ("confirmDelete",function(){return o.deleteItem()})("cancelDelete",function(){return o.onCancelDeleteItem()}),t.qZA()),2&i&&(t.Q6J("ngClass",t.DdM(16,pr)),t.xp6(4),t.AsE("STEP ",o.currentStepNumber," OF ",o.totalSteps,""),t.xp6(1),t.Q6J("ngIf",o.showAddItemForm&&(null==o.editingItem?null:o.editingItem.sk)),t.xp6(3),t.hij(" ",o.directDistributionTitle," "),t.xp6(1),t.Q6J("message",o.directSalesInfoMessage)("infoIconSize",18),t.xp6(1),t.Q6J("ngIf",!o.showAddItemForm),t.xp6(1),t.Q6J("ngIf",!o.showAddItemForm),t.xp6(1),t.Q6J("ngIf",o.showAddItemForm),t.xp6(1),t.Q6J("ngIf",o.showAddItemForm),t.xp6(1),t.Q6J("ngIf",o.isOpen),t.xp6(1),t.Q6J("dynamicClass","delete-modal portfolio-banner-delete-modal")("ConfirmationMessage",o.deleteAlbumMessage)("headerLabel",o.PORTFOLIO_CONSTS.DELETE_CHILD_DATA_TITLE[o.portfolioType])("commonEnum",o.commonEnum))},dependencies:[r.mk,r.sg,r.O5,N._Y,N.JL,N.sg,Xt.e,it.r,we.s,Ze.t,Ve.g,Be.e,po.h,Ae.a,st.m,wt.Y,ft.J,Pt.Wj,Pt.Zt,Pt.Bh,De.nu,Mt.w,Vt],styles:[".step-3-direct-distribution-container.step-3-custom-container{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px}@media screen and (max-width: 992px){ .step-3-direct-distribution-container.step-3-custom-container{padding:10px} .step-3-direct-distribution-container.step-3-custom-container .section-title h3{font-size:20px!important}} .step-3-direct-distribution-container.step-3-custom-container .step-2-dsp-links-container{padding:0 24px;background:transparent} .step-3-direct-distribution-container.step-3-custom-container .first-row-custom-input{background:var(--configBgColor);padding:24px;border-radius:24px;margin:0}@media screen and (max-width: 992px){ .step-3-direct-distribution-container.step-3-custom-container .first-row-custom-input{padding:10px!important}} .step-3-direct-distribution-container.step-3-custom-container .preview-processing{font-size:12px;position:absolute;color:#fff!important;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6)!important}@media (max-width: 768px){ .step-3-direct-distribution-container.step-3-custom-container .preview-processing{font-size:10px}} .step-3-direct-distribution-container.step-3-custom-container .step-indicator-container{display:flex;align-items:center;justify-content:space-between}@media screen and (max-width: 992px){ .step-3-direct-distribution-container.step-3-custom-container .step-indicator-container{align-items:flex-start}} .step-3-direct-distribution-container.step-3-custom-container .toggle-delete-container{display:flex;gap:10px;align-items:center} .step-3-direct-distribution-container.step-3-custom-container .item-thumbnail-wrapper{flex-shrink:0;width:64px;
1height:64px;border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;position:relative} .step-3-direct-distribution-container.step-3-custom-container .item-details{flex:1;min-width:0} .step-3-direct-distribution-container.step-3-custom-container .item-actions{display:flex;gap:12px;align-items:center;flex-shrink:0} .step-3-direct-distribution-container.step-3-custom-container .item-actions .btn{display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;transition:all .3s ease} .step-3-direct-distribution-container.step-3-custom-container .item-actions .btn-edit{font-size:14px;font-weight:500;min-width:auto!important;width:32px;height:32px;padding:0;border-radius:50%;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);color:var(--theme-interactive-link)!important} .step-3-direct-distribution-container.step-3-custom-container .item-actions .btn-edit em{font-size:16px;color:var(--theme-interactive-link)!important} .step-3-direct-distribution-container.step-3-custom-container .item-actions .btn-delete{height:32px;width:32px;padding:0;border-radius:50%;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);color:var(--theme-interactive-link)!important} .step-3-direct-distribution-container.step-3-custom-container .item-description-text{font-weight:400;font-size:14px;line-height:160%;letter-spacing:0px;color:var(--configBgTextColor)!important;opacity:.8;margin-bottom:0!important} .step-3-direct-distribution-container.step-3-custom-container .drag-handle{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:grab;padding:8px;color:var(--configBgTextColor)!important} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder{display:flex;flex-direction:column;gap:16px} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item{display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:10px;background:var(--configBgColor);border-radius:12px;animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .skeleton-thumbnail{flex-shrink:0;width:64px;height:64px;border-radius:6px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);display:flex;align-items:center;justify-content:center} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .skeleton-thumbnail .song-audio-icon{width:100%;height:100%;display:flex;align-items:center;justify-content:center} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .skeleton-thumbnail .song-audio-icon .icon-litesuitcase, .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .skeleton-thumbnail .song-audio-icon .icon-liteportfolio-not-found{opacity:.5} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-details{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-details .skeleton-line{height:16px;border-radius:4px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-details .skeleton-line.skeleton-title{width:60%;height:18px} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-details .skeleton-line.skeleton-duration{width:40%;height:14px} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-actions{display:flex;gap:12px;align-items:center;flex-shrink:0} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-actions .skeleton-button{border-radius:30px;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);animation:_ngcontent-%COMP%_skeleton-pulse 1.5s ease-in-out infinite} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-actions .skeleton-button.skeleton-preview{width:100px;height:40px} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-actions .skeleton-button.skeleton-edit{width:40px;height:40px;border-radius:50%} .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item .song-actions .skeleton-button.skeleton-delete{width:40px;height:40px;border-radius:50%}@media screen and (max-width: 992px){ .step-3-direct-distribution-container.step-3-custom-container .items-empty-placeholder .skeleton-item{flex-wrap:wrap}}@keyframes _ngcontent-%COMP%_skeleton-pulse{0%,to{opacity:1}50%{opacity:.6}} .step-3-direct-distribution-container.step-3-custom-container .step-indicator{display:inline-block;padding:6px 12px;border-radius:20px;border:1px solid var(--theme-interactive-link);margin-bottom:16px} .step-3-direct-distribution-container.step-3-custom-container .step-indicator span{color:var(--configPostTextColor)!important;font-size:12px;font-weight:600} .step-3-direct-distribution-container.step-3-custom-container .icon-litemusic-node-2, .step-3-direct-distribution-container.step-3-custom-container .icon-litesuitcase, .step-3-direct-distribution-container.step-3-custom-container .icon-liteportfolio-not-found{position:relative!important;top:0;left:0;font-size:48px;color:var(--theme-interactive-link)} .step-3-direct-distribution-container.step-3-custom-container .section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px} .step-3-direct-distribution-container.step-3-custom-container .section-title h3{color:var(--configPostTextColor)!important;font-size:24px;font-weight:700;margin:0;display:flex;align-items:center} .step-3-direct-distribution-container.step-3-custom-container .methods-of-consumption-section{dis
1play:flex;flex-direction:column;background:var(--configBgColor);padding:24px;border-radius:24px}@media screen and (max-width: 992px){ .step-3-direct-distribution-container.step-3-custom-container .methods-of-consumption-section{padding:10px!important}} .step-3-direct-distribution-container.step-3-custom-container .methods-of-consumption-section .methods-of-consumption-item{background:var(--configBgColor);color:var(--configBgTextColor)!important;border-radius:16px} .step-3-direct-distribution-container.step-3-custom-container .methods-of-consumption-section .step-2-container{background:var(--configBgColor);border-radius:16px} .step-3-direct-distribution-container.step-3-custom-container .step-form-content{color:var(--configBgTextColor)!important} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .form-group{margin-bottom:0} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .parent-label{display:flex;align-items:center;gap:8px;margin-bottom:16px} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .uploadContainer{position:relative;width:100%} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .optional-item-image-section{aspect-ratio:1/1} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .custom-label-upload{border:.1rem dashed var(--theme-interactive-link);border-radius:15px;color:var(--theme-interactive-link);display:flex;cursor:pointer;align-items:center;justify-content:center;flex-direction:column;padding:20px 15px;min-width:150px;width:100%;min-height:160px;transition:all .3s ease} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .custom-label-upload .plus-icon{font-size:24px;text-align:center;color:var(--theme-interactive-link);font-weight:300;margin-bottom:4px} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .custom-label-upload .label{text-align:center;color:var(--theme-interactive-link);font-size:12px;margin:4px 5px 0;font-weight:500;white-space:normal} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .uploadFileImageData{position:relative;width:100%;border-radius:8px;overflow:hidden;min-height:150px;height:auto;margin-right:0!important} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .uploadFileImageData:after{display:none} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .uploadFileImageData.portrait-banner{aspect-ratio:1/1} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .uploadFileImageData:has(.show-progress-bar-thumbnail){border:.1rem dashed var(--theme-interactive-link);border-radius:15px} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .uploadFileImageData img{width:100%;height:auto;display:block} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .uploadFileImageData .close{position:absolute;top:4px;right:4px;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;line-height:1;text-decoration:none;background:var(--theme-interactive-link);color:var(--configButtonTextColor);z-index:10} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .uploadFileImageData .show-progress-bar-thumbnail{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:5} .step-3-direct-distribution-container.step-3-custom-container .step-form-content .cb-option-container .option-label{white-space:normal!important;max-width:100%!important;font-size:14px!important}.step-3-custom-container[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%]{height:36px;width:36px;padding:0 0 3px;border-radius:50%;background-color:color-mix(in srgb,var(--theme-interactive-link) 10%,transparent);color:var(--theme-interactive-link);align-items:center;justify-content:center;display:flex}.step-3-custom-container[_ngcontent-%COMP%] .btn-delete-uppr[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:20px;color:var(--theme-interactive-link)} .theme-whiteLabel .step-3-custom-container .toggle-enable-container .both-btn{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;cursor:pointer} .theme-whiteLabel .step-3-custom-container .toggle-enable-container .both-btn.active-enable{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-custom-container .btn-delete-uppr{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-custom-container .btn-delete-uppr em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section h3{color:var(--configBgTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect label{color:var(--configBgTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;height:auto!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label{flex-wrap:wrap;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label .p-multiselect-token{border-color:var(--configPostTextColor)!important;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger .p-multiselect-trigger-icon{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header{background:var(--configSecondaryBgColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container{background:var(--configBgColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container .custom-search-input{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container{c
1olor:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container label{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper{background:var(--configSecondaryBgColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item{color:var(--configPostTextColor)!important;background:var(--configSecondaryBgColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls .icon-label{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn, .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .btn{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;border-color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .methods-of-consumption-section .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn{height:auto!important} .theme-whiteLabel .step-3-custom-container .icon-litesuitcase, .theme-whiteLabel .step-3-custom-container .icon-liteportfolio-not-found{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .step-indicator{border:1px solid var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .add-item-button .btn-add-item{border:2px solid var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .add-item-button .btn-add-item span{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .add-item-button .btn-add-item .plus-icon{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .add-item-button .btn-add-item:hover{background:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .onboarding-validInfo.block-hint .dropdown-menu p{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .uploadContainer .custom-label-upload{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .uploadContainer .custom-label-upload .label, .theme-whiteLabel .step-3-custom-container .step-form-content .uploadContainer .custom-label-upload .plus-icon{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .uploadContainer .uploadFileImageData{border-color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .uploadContainer .uploadFileImageData .close{background:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .ng-select-container{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .ng-select-container .ng-value-container .ng-value{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .ng-select-container .ng-value-container .ng-value-label{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .ng-select-container .ng-placeholder{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .ng-select-container .ng-arrow:before{border-color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .ng-dropdown-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .step-form-content .ng-dropdown-panel .ng-dropdown-panel-items .ng-option-label{color:var(--configPostTextColor)!important} .theme-whiteLabel .step-3-custom-container .added-items-list .items-empty-placeholder .skeleton-item{background:var(--configBgColor)} .theme-whiteLabel .step-3-custom-container .added-items-list .items-empty-placeholder .skeleton-item .skeleton-thumbnail{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-custom-container .added-items-list .items-empty-placeholder .skeleton-item .skeleton-thumbnail .item-icon .icon-liteportfolio-not-found{color:var(--configThemeColor)!important} .theme-whiteLabel .step-3-custom-container .added-items-list .items-empty-placeholder .skeleton-item .item-details .skeleton-line{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .step-3-custom-container .added-items-list .items-empty-placeholder .skeleton-item .item-actions .skeleton-button{background-color:color-mix(in srgb,var(--configThemeColor) 10%,transparent)!important} .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon{background-color:var(--configThemeColor)!important} .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-litemusic-node-2, .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-liteMIc-Icon, .theme-whiteLabel .song-item .song-thumbnail-wrapper .song-audio-icon .icon-liteportfolio-not-found{font-size:48px;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-primary em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-edit{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-edit em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-delete{background-color:var(--configThemeColor)!important;color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-actions .btn.btn-delete em{color:var(--configButtonTextColor)!important} .theme-whiteLabel .song-item .song-description .song-description-text .content-length-handle{color:var(--configThemeColor)!important} .theme-whiteLabel .song-item .drag-handle .icon-drag{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important} .theme-whiteLabel .song-item .drag-handle .icon-drag:before{color:var(--configBgTextColor)!important} .step-3-custom-container .step-3-action-buttons{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:0}@media screen and (max-width: 992px){ .step-3-custom-container .step-3-action-buttons{gap:12px;flex-direction:column} .step-3-custom-container .step-3-action-buttons app-button{width:100%;display:flex;justify-content:center}} .step-3-custom-container .added-items-list{margin-bottom:24px} .step-3-custom-container .added-items-list .items-list{display:flex;flex-direction:column;gap:16px} .step-3-custom-container .added-items-list .items-list .item{display:flex;gap:16px;padding:10px;flex-direction:column;background:var(--configBgColor);color:var(--configBgTextColor)!important;border-radius:12px} .step-3-custom-container .add-item-button{margin-bottom:24px} .step-3-custom-container .add-item-button .btn-add-item{padding:8px 16px;background:var(--configSecondaryBgColor);border:2px solid var(--theme-interactive-link);border-radius:12px;font-size:16px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer;transition:all .3s ease}@media screen and (max-width: 992px){ .step-3-custom-container .add-item-button .btn-add-item{width:100%;border-radius:28px}} .step-3-custom-container .add-item-button .btn-add-item:hover{background:var(rgba(var(--theme-interactive-link-rgb), .1))} .step-3-custom-container .add-item-button .btn-add-item .plus-icon{font-size:24px;font-weight:400;line-height:1;color:var(--theme-interactive-link)!important} .step-3-custom-container .add-item-button .btn-add-item span{color:var(--theme-interactive-link)!important;font-weight:900;font-size:14px;letter-spacing:.4px;text-transform:uppercase}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}
1.cdk-drag-preview[_ngcontent-%COMP%]{cursor:move;box-shadow:0 5px 15px #0003}.cdk-drag[_ngcontent-%COMP%]{width:auto} .step-3-custom-container .step-form-content .name-field .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content .name-field .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7} .step-3-custom-container .step-form-content .description-field .form-control{height:170px;background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content .description-field .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7} .step-3-custom-container .step-form-content .ng-select-container{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content .ng-select-container .ng-value-container .ng-value{color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content .ng-select-container .ng-value-container .ng-value-label{color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content .ng-select-container .ng-placeholder{color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content .ng-select-container .ng-arrow:before{border-color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content .ng-dropdown-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content .ng-dropdown-panel .ng-dropdown-panel-items .ng-option-label{color:var(--configPostTextColor)!important} .step-3-custom-container .step-form-content.uploading{pointer-events:none;opacity:.7} .step-3-custom-container .step-form-content.uploading input, .step-3-custom-container .step-form-content.uploading textarea, .step-3-custom-container .step-form-content.uploading select, .step-3-custom-container .step-form-content.uploading button, .step-3-custom-container .step-form-content.uploading label{pointer-events:none;cursor:not-allowed}@media screen and (min-width: 993px){.step-3-container-min-width[_ngcontent-%COMP%]{min-width:765px}}"]}),a})();const ur=["enableToggle"],gr=["loyaltyOnlyWarningModal"];function mr(a,m){if(1&a&&t._UZ(0,"app-step-2-dsp-links",17),2&a){const n=t.oxw();t.ekj("step-hidden",n.currentStep!==n.STEP_2),t.Q6J("form",n.form)("portfolioType",n.portfolioType)("currentStepNumber",n.getStepNumber(n.STEP_2))("totalSteps",n.getTotalSteps())("dspModalHeaderLabel",n.isCustomType()&&n.STEP_3_DIRECT_DISTRIBUTION_CONSTS.CREATE_CUSTOM_PARTNER_LINK)}}function _r(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-step-album-locking",18),t.NdJ("lockDataChange",function(i){t.CHM(n);const o=t.oxw();return t.KtG(o.onAlbumLockDataChange(i))}),t.qZA()}if(2&a){const n=t.oxw();t.ekj("step-hidden",n.currentStep!==n.STEP_ALBUM_LOCKING),t.Q6J("form",n.form)("portfolioType",n.portfolioType)("currentStepNumber",n.getStepNumber(n.STEP_ALBUM_LOCKING))("totalSteps",n.getTotalSteps())("albumLockingFilledData",n.albumLockingFilledData)}}function hr(a,m){if(1&a&&t._UZ(0,"app-step-3-music",19),2&a){const n=t.oxw();let e;t.ekj("step-hidden",n.currentStep!==n.STEP_3),t.Q6J("form",n.form)("isEditMode",n.isEditMode)("albumSk",n.albumSk)("userProfile",n.currentUserProfile)("portfolioType",n.portfolioType)("currentStepNumber",n.getStepNumber(n.STEP_3))("totalSteps",n.getTotalSteps())("albumLockThrough",null==n.form||null==(e=n.form.get("album_lock_through"))?null:e.value)("disabledSubscriptionPlanIds",n.disabledSubscriptionPlanIds)}}function fr(a,m){if(1&a&&t._UZ(0,"app-step-3-video-series",20),2&a){const n=t.oxw();let e,i,o;t.ekj("step-hidden",n.currentStep!==n.STEP_3),t.Q6J("form",n.form)("isEditMode",n.isEditMode)("albumSk",n.albumSk)("userProfile",n.currentUserProfile)("portfolioType",n.portfolioType)("currentStepNumber",n.getStepNumber(n.STEP_3))("totalSteps",n.getTotalSteps())("itemLockThrough",null==n.form||null==(e=n.form.get("item_lock_through"))?null:e.value)("albumLockThrough",null==n.form||null==(i=n.form.get("album_lock_through"))?null:i.value)("albumFreePreviewTime",null==n.form||null==(o=n.form.get("free_preview_time"))?null:o.value)("disabledSubscriptionPlanIds",n.disabledSubscriptionPlanIds)}}function Cr(a,m){if(1&a&&t._UZ(0,"app-step-3-custom",21),2&a){const n=t.oxw();t.ekj("step-hidden",n.currentStep!==n.STEP_3),t.Q6J("form",n.form)("isEditMode",n.isEditMode)("albumSk",n.albumSk)("userProfile",n.currentUserProfile)("portfolioType",n.portfolioType)("currentStepNumber",n.getStepNumber(n.STEP_3))("totalSteps",n.getTotalSteps())("disabledSubscriptionPlanIds",n.disabledSubscriptionPlanIds)}}const eo=function(a){return{type:"button",class:"btn btn-default",label:a}},To=function(a,m,n){return{type:"button",class:"btn btn-primary",label:a,disabled:m,loading:n}};function br(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",22)(1,"app-button",23),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleBack())}),t.qZA(),t.TgZ(2,"app-button",23),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleSaveAndContinue())}),t.qZA()()}if(2&a){const n=t.oxw();
1t.xp6(1),t.Q6J("btnField",t.VKq(2,eo,n.CONSTS.BACK)),t.xp6(1),t.Q6J("btnField",t.kEZ(4,To,n.CONSTS.SAVE_AND_CONTINUE,n.isUpdateBtnDisable,n.isSavingAndContinuing))}}function Pr(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-button",23),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.handleSaveAsDraft())}),t.qZA()}if(2&a){const n=t.oxw(2);t.Q6J("btnField",t.VKq(1,eo,n.CONSTS.SAVE_AS_DRAFT))}}const Or=function(a){return{"justify-content-between":a}};function vr(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"div",24)(1,"app-button",23),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleBack())}),t.qZA(),t.TgZ(2,"div",25),t.YNc(3,Pr,1,3,"app-button",26),t.TgZ(4,"app-button",23),t.NdJ("handleButtonClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handlePublishAlbum())}),t.qZA()()()}if(2&a){const n=t.oxw();t.Q6J("ngClass",t.VKq(4,Or,!n.isEditMode)),t.xp6(1),t.Q6J("btnField",t.VKq(6,eo,n.CONSTS.BACK)),t.xp6(2),t.Q6J("ngIf",!n.isEditMode),t.xp6(1),t.Q6J("btnField",t.kEZ(8,To,n.isEditMode?n.CONSTS.UPDATE_ALBUM[n.portfolioType]:n.CONSTS.PUBLISH_ALBUM[n.portfolioType],n.isPublishBtnDisable,n.isPublishing))}}function Mr(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-loyalty-only-warning-modal",27,28),t.NdJ("proceeded",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyProceed())})("canceled",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyWarningCanceled())}),t.qZA()}}const Ne=function(){return[]};let Me=(()=>{const m=class{isMusicType(){return(this.portfolioType||"").toLowerCase()===O.W.PORTFOLIO_TYPE.MUSIC.toLowerCase()}isPodcastType(){return(this.portfolioType||"").toLowerCase()===O.W.PORTFOLIO_TYPE.PODCAST.toLowerCase()}getStep3Component(){return this.isMusicType()||this.isPodcastType()?this.step3MusicComponent:this.isVideoType()?this.step3VideoSeriesComponent:this.isCustomType()?this.step3CustomComponent:null}get isPublishBtnDisable(){return!this.isFormValid||this.isPublishing||!(!this.isCustomType()||this.currentStep!==this.STEP_3)&&!this.step3CustomComponent?.addedItems?.length}get isUpdateBtnDisable(){return!this.isFormValid||this.isSavingAndContinuing||!(!this.isCustomType()||this.currentStep!==this.STEP_3)&&!this.step3CustomComponent?.addedItems?.length}isVideoType(){return(this.portfolioType||"").toLowerCase()===O.W.PORTFOLIO_TYPE.VIDEO.toLowerCase()}isCustomType(){return(this.portfolioType||"").toLowerCase()===O.W.PORTFOLIO_TYPE.CUSTOM.toLowerCase()}constructor(e,i,o,s,p,u){this.route=e,this.router=i,this.apiCallService=o,this.cs=s,this._location=p,this.store=u,this.CONSTS=Dt.Rh,this.PORTFOLIO_TYPE_CONSTS=O.W,this.Application=l.Mx,this.STEP_1=l.Mx.ONE,this.STEP_2=l.Mx.TWO,this.STEP_3=l.Mx.THREE,this.STEP_ALBUM_LOCKING=l.Mx.FOUR,this.currentStep=l.Mx.ONE,this.totalSteps=l.Mx.THREE,this.pendingAlbumPayload=null,this.isIndividual=!1,this.isEditMode=!1,this.portfolioType="",this.portfolioTypeId="",this.form=null,this.requestedStepFromQuery=null,this.enable=!0,this.albumStatus=O.W.PORTFOLIO_STATUS.DRAFT,this.albumSk="",this.albumPk="",this.albumBadgeGroups=[],this.currentUserProfile=null,this.isPublishing=!1,this.isSavingAndContinuing=!1,this.albumLockingFilledData=null,this.disabledSubscriptionPlanIds=[],this.destroy$=new X.x,this.STEP_3_DIRECT_DISTRIBUTION_CONSTS=w}ngOnInit(){this.routeId=this.route.snapshot.paramMap.get("id")||"",this.portfolioType=this.route.snapshot.data.portfolioType||"",this.portfolioTypeId=this.route.snapshot.queryParamMap.get("portfolioTypeId")||"",this.isEditMode=!!this.routeId;const e=this.route.snapshot.queryParamMap.get("step");if(e){const i=parseInt(e,l.Mx.TEN);isNaN(i)||(this.requestedStepFromQuery=i,this.isEditMode&&(this.currentStep=i))}this.initForm(),this.setupDirectSalesListener(),this.getCurrentUserProfile(),this.handleStepNavigationFromQuery()}setupDirectSalesListener(){this.form&&this.form.get("distributeThroughDirectSales")?.valueChanges.pipe((0,J.R)(this.destroy$)).subscribe(e=>{(!e||e.length===l.Mx.ZERO)&&this.resetAlbumLockingData()})}getCurrentUserProfile(){this.store.select(yt.SJ).pipe((0,J.R)(this.destroy$)).subscribe(e=>{e?.user_name&&e?.user_name!==this.currentUserProfile?.user_name&&(this.currentUserProfile=e,this.userId=e.user_name,this.isEditMode&&this.routeId&&this.checkUserOwnershipAndLoadData())})}checkUserOwnershipAndLoadData(){this.isEditMode&&this.routeId&&this.currentUserProfile?.user_name&&(this.userId===this.currentUserProfile.user_name?this.loadAlbumData():setTimeout(()=>{this.router.navigate([`/${Ot._1.NOT_FOUND}`])}
1,l.Mx.ONE_HUNDRED))}initForm(){this.form=new N.cw({name:new N.NI("",[N.kI.required,N.kI.maxLength(100)]),cover_image:new N.NI("",[N.kI.required]),description:new N.NI("",[N.kI.required,N.kI.maxLength(500)]),release_date:new N.NI(null),release_year:new N.NI(null),release_type_year:new N.NI([]),release_type_date:new N.NI([]),distributeThroughDSP:new N.NI([]),distributeThroughDirectSales:new N.NI([]),dsp:new N.NI([]),items:new N.NI([]),album_lock_through:new N.NI({})})}get pageTitle(){return(0,Dt.mu)(this.portfolioType,this.isEditMode)}get stepIndicator(){return`STEP ${this.currentStep} OF ${this.totalSteps}`}get reviewTitle(){return`Review ${this.pageTitle}`}getAvailableSteps(){const e=[l.Mx.ONE],i=this.form?.get("distributeThroughDSP")?.value||[],o=this.form?.get("distributeThroughDirectSales")?.value||[];return i.length&&e.push(l.Mx.TWO),o.length&&(this.PORTFOLIO_TYPE_CONSTS.PORTFOLIO_TYPE.CUSTOM!=this.portfolioType&&e.push(l.Mx.FOUR),e.push(l.Mx.THREE)),e}getStepNumber(e){const o=this.getAvailableSteps().indexOf(e);return o>=l.Mx.ZERO?o+l.Mx.ONE:e}getTotalSteps(){return this.getAvailableSteps().length}hasNoDistributionSelected(){if(!this.form)return!1;const e=this.form.get("distributeThroughDSP")?.value||[],i=this.form.get("distributeThroughDirectSales")?.value||[];return!e.length&&!i.length}isLastStep(){if(this.currentStep===l.Mx.ONE&&this.hasNoDistributionSelected())return!0;const e=this.getAvailableSteps();return e.length&&this.currentStep===e[e.length-l.Mx.ONE]}getNextStep(){const e=this.getAvailableSteps(),i=e.indexOf(this.currentStep);return i>=0&&i<e.length-1?e[i+1]:null}getPreviousStep(){const e=this.getAvailableSteps(),i=e.indexOf(this.currentStep);return i>0?e[i-1]:null}navigateToBack(){if(this.isEditMode&&this.albumSk){const e=(this.portfolioType||"").toUpperCase(),i=this.cs.encodeToUTF(this.albumSk),s=(0,Q.dt)(Dt.ZQ[e]??e);s?this.router.navigate(["/monetize/portfolio",s,i]):this._location.back()}else!this.isEditMode&&this.portfolioTypeId?this.router.navigate(["/monetize/portfolio","banner-view",this.portfolioTypeId]):this._location.back()}toggleChanged(e){this.enable=e}handleBack(){if(this.currentStep===this.STEP_3){const i=this.getStep3Component();(this.isVideoType()&&i?.showAddVideoForm||(this.isMusicType()||this.isPodcastType())&&i?.showAddSongForm||this.isCustomType()&&i?.showAddItemForm)&&i.handleCancel()}const e=this.getPreviousStep();null!==e?this.currentStep=e:this.navigateToBack()}get isFormValid(){if(!this.form)return!1;if(this.currentStep===l.Mx.ONE){const e=this.form.get("name")?.valid??!1,i=this.form.get("cover_image")?.valid??!1,o=this.form.get("description")?.valid??!1;return e&&i&&o}if(this.currentStep===l.Mx.TWO)return(this.form.get("distributeThroughDSP")?.value||[]).length===l.Mx.ZERO||(this.form.get("dsp")?.value||[]).length===l.Mx.ZERO||(this.step2Component?.isDspFormValid??!1);if(this.currentStep===l.Mx.FOUR)return this.isAlbumLockThroughValid();if(this.currentStep===l.Mx.THREE){if((this.form.get("distributeThroughDirectSales")?.value||[]).length===l.Mx.ZERO)return!0;const i=this.getStep3Component(),o=i?.isStep3Valid??!1;if(this.isVideoType()){if((i?.addedVideos||[]).length===l.Mx.ZERO)return!0}else if(this.isCustomType()){if((i?.addedItems||[]).length===l.Mx.ZERO)return!0}else if((i?.addedSongs||[]).length===l.Mx.ZERO)return!0;return o}return this.form.valid}isAlbumLockThroughValid(){const e=this.stepAlbumLockingComponent?.albumLockingComponent;return!(!e||!e.validateAlbumPostPrice().isValid)}handleSaveAndContinue(){if(this.form&&this.form.markAllAsTouched(),this.isFormValid&&!this.isSavingAndContinuing){const e=this.getNextStep();null!==e&&(this.currentStep===l.Mx.ONE&&!this.isEditMode||this.currentStep===l.Mx.TWO||this.currentStep===l.Mx.FOUR?(this.isSavingAndContinuing=!0,this.albumStatus=this.albumStatus||O.W.PORTFOLIO_STATUS.DRAFT,this.saveAlbumAsDraft(()=>{this.isSavingAndContinuing=!1,this.currentStep=e})):this.currentStep=e)}}submitAlbumPayload(e,i){if(this.albumPk&&this.albumSk)return e.pk=this.albumPk,e.sk=this.albumSk,void this.apiCallService.put(U.Y9.portfolioAlbumContent,e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{o.status&&o.data?(this.albumSk=o.data.sk||"",this.albumPk=o.data.pk||"",this.albumStatus=o.data.status||O.W.PORTFOLIO_STATUS.DRAFT,i&&i(o.message)):o.status?i&&i(o.message):(this.isPublishing=!1,this.isSavingAndContinuing=!1,this.cs.showErrorMessage(o.message||this.CONSTS.FAILED_TO_SAVE_ALBUM))},error:o=>{this.isPublishing=!1,this.isSavingAndContinuing=!1,this.cs.showErrorMessage(o?.message||this.CONSTS.FAILED_TO_SAVE_ALBUM)}});e.portfolio_sk=this.cs.encodeToUTF(this.portfolioTypeId),this.apiCallService.post(U.Y9.portfolioAlbumContent,e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{o.status&&o.data?(this.albumSk=o.data.sk||"",this.albumPk=o.data.pk||"",this.albumStatus=o.data.status||O.W.PORTFOLIO_STATUS.DRAFT,i&&i(o.message)):(this.isPublishing=!1,this.isSavingAndContinuing=!1,this.cs.showErrorMessage(o.message||this.CONSTS.FAILED_TO_SAVE_ALBUM))},error:o=>{this.isPublishing=!1,this.isSavingAndContinuing=!1,this.cs.showErrorMessage(o?.message||this.CONSTS.FAILED_TO_SAVE_ALBUM)}})}handleLoyaltyOnlyProceed(){const e=this.pendingAlbumPayload,i=this.pendingAlbumCallback;this.pendingAlbumPayload=null,this.pendingAlbumCallback=void 0,e&&this.submitAlbumPayload(e,i)}handleLoyaltyOnlyWarningCanceled(){this.pendingAlbumPayload=null,this.pendingAlbumCallback=void 0,this.isPublishing=!1,this.isSavingAndContinuing=!1}saveAlbumAsDraft(e){if(!this.form||!this.portfolioTypeId&&!this.isEditMode)return;const i=this.form.value,s=(i.distributeThroughDSP||[]).length>l.Mx.ZERO?this.buildDspArray(i.dsp||[],this.step2Component?.dspForm?.value||{}):[];this.loadDspData({dsp:s});const p=(i.release_type_year||[]).includes(Y.vI.RELEASE_TYPE_YEAR),u=(i.release_type_date||[]).includes(Y.vI.RELEASE_TYPE_DATE);let _=null;p&&null!=i.release_year&&""!==i.release_year?_=i.release_year.toString():u&&null!=i.release_date&&(_=(0,Q.YF)(i.release_date));const h=i.distributeThroughDirectSales||[];let M=null;h.length>l.Mx.ZERO&&this.stepAlbumLockingComponent?.albumLockingComponent&&(M=this.stepAlbumLockingComponent.albumLockingComponent.getPostPriceData());const I=h.length>l.Mx.ZERO?this.cleanLockThroughData(M):{},A={type:this.portfolioType.toUpperCase(),title:i.name||"",description:i.description||"",cover_image_url:i.cover_image||"",dsp:s,status:this.albumStatus||O.W.PORTFOLIO_STATUS.DRAFT,release_date:_,lock_through:I,international_prices:M?.international_prices||[],badge_groups:(0,Q.IH)(this.form)};if((0,ht.Ix)((0,ht.si)(A.lock_through)))return this.pendingAlbumPayload=A,this.pendingAlbumCallback=e,void this.loyaltyOnlyWarningModal?.openModal();this.submitAlbumPayload(A,e)}buildDspArray(e,i){return e&&0!==e.length?e.map(o=>{const s=o.sk||"";return{pk:o.pk||"",sk:s,url:i[`${s}url`]||"",button_label:i[`${s}text`]||"",name:o.name,logo:o.logo}}):[]}handleSaveAsDraft(){this.form&&(this.albumStatus=O.W.PORTFOLIO_STATUS.DRAFT,this.saveAlbumAsDraft(()=>{this.navigateToBack(),this.cs.showSuccessMessage(this.CONSTS.ALBUM_SAVED_SUCCESS)}))}handlePublishAlbum(){this.form?.valid&&!this.isPublishing&&(this.isPublishing=!0,this.albumStatus=this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,this.saveAlbumAsDraft(e=>{this.isPublishing=!1,this.navigateToBack(),e&&this.cs.showSuccessMessage(e)}))}loadAlbumData(){if(!this.routeId||!this.portfolioType)return;const e=this.portfolioType.toUpperCase();if(O.W.PORTFOLIO_TYPE_ARRAY.includes(e)){const i=this.cs.decodeToUTF(this.routeId),o=`${U.Y9.portfolioAlbumContent}/${encodeURIComponent(i)}?type=${e}`;this.apiCallService.get(o,!1).pipe((0,J.R)(this.destroy$)).subscribe({next:s=>{if(s.status&&s.data){const p=s.data;this.albumSk=p.sk||"",this.albumPk=p.pk||"",this.albumBadgeGroups=p.badge_groups||[],this.albumStatus=p.status||O.W.PORTFOLIO_STATUS.DRAFT,this.enable=p.status===O.W.PORTFOLIO_STATUS.ACTIVE;const u=p?.dsp?.filter(_=>_.logo);if(this.form){const _=u.length>l.Mx.ZERO,h=p.items&&Array.isArray(p.items)&&p.items.length>l.Mx.ZERO,M=p.lock_through&&Object.keys(p.lock_through).length>
1l.Mx.ZERO,I=this.route.snapshot.queryParamMap.get("isAddItem")===Dt.Rh.TRUE,A=h||M||I&&!h;let E=[],q=[],z=null,et=null;const tt=(0,Q.NH)(p.release_date);tt.type===Y.vI.RELEASE_TYPE_YEAR?(E=[Y.vI.RELEASE_TYPE_YEAR],q=[],et=tt.value):tt.type===Y.vI.RELEASE_TYPE_DATE&&(E=[],q=[Y.vI.RELEASE_TYPE_DATE],z=(0,Q.Gy)(p.release_date)),this.form.patchValue({name:p.album_title||p.title||"",cover_image:p.cover_image_url||"",description:p.album_desc||p.description||"",release_date:z,release_year:et,release_type_year:E,release_type_date:q,distributeThroughDSP:_?[!0]:[],distributeThroughDirectSales:A?[!0]:[],album_lock_through:p.lock_through||{}}),M&&this.loadAlbumLockingData(p),setTimeout(()=>{this.step1Component&&this.step1Component.initializeReleaseType()},l.Mx.ONE_HUNDRED)}setTimeout(()=>{this.loadDspData(p),(e?.toUpperCase()===O.W.PORTFOLIO_TYPE.MUSIC||e?.toUpperCase()===O.W.PORTFOLIO_TYPE.PODCAST||e?.toUpperCase()===O.W.PORTFOLIO_TYPE.VIDEO||e?.toUpperCase()===O.W.PORTFOLIO_TYPE.CUSTOM)&&this.loadSongsData(p.items||[]),this.handleStepNavigationFromQuery()},l.Mx.TEN)}},error:s=>{this.cs.showErrorMessage(this.CONSTS.FAILED_TO_LOAD_ALBUM)}})}}handleStepNavigationFromQuery(){this.form&&null!==this.requestedStepFromQuery&&(this.getAvailableSteps().includes(this.requestedStepFromQuery)?(this.currentStep=this.requestedStepFromQuery,this.route.snapshot.queryParamMap.get("videoSk")||this.cleanStepQueryParameter()):this.isEditMode&&(this.currentStep=this.requestedStepFromQuery))}cleanStepQueryParameter(){const e={...this.route.snapshot.queryParams};e.step&&(delete e.step,this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0}))}loadDspData(e){if(e.dsp&&Array.isArray(e.dsp)&&e.dsp.length!==l.Mx.ZERO&&this.step2Component&&this.form){const i=e.dsp.map(o=>({pk:o.pk||"",sk:o.sk||"",name:o.name||"",logo:o.logo||"",url:o.url||"",button_label:o.button_label||""}));this.form.patchValue({dsp:i}),this.step2Component?.remergeOptions$&&this.step2Component.remergeOptions$.next(),this.step2Component.isDspListingFetched&&this.step2Component.syncFormValueWithOptions()}}loadSongsData(e=[]){const i=this.getStep3Component();if(e&&Array.isArray(e)&&e.length!==l.Mx.ZERO&&i)if(this.isVideoType()&&i instanceof Fe){const o=e.map((s,p)=>({id:Date.now()+p,video_name:s.title||"",video_file:s.file||"",thumbnail:s.cover_image_url||"",thumbnailPreview:s.cover_image_url||"",durationInSeconds:s.duration||l.Mx.ZERO,postPriceData:this.buildPostPriceDataFromLockThrough(s.lock_through,s.free_preview_time,s.international_prices),videoFileName:"",sk:s.sk||"",pk:s.pk||"",created_at:s.created_at||"",description:s.description||"",allow_download:s.allow_download||!1,show_as_post:s.show_as_post||!1,is_free:void 0!==s.is_free&&s.is_free,release_date:s.release_date||null,status:s.status}));i.addedVideos=o,i.syncVideosToForm()}else if(i instanceof to){const o=e.map((s,p)=>({id:Date.now()+p,item_name:s.title||"",custom_file:s.file||"",thumbnail:s.cover_image_url||"",thumbnailPreview:s.cover_image_url||"",fileName:"",sk:s.sk||"",pk:s.pk||"",created_at:s.created_at||"",description:s.description||"",allow_download:s.allow_download||!1,show_as_post:s.show_as_post||!1,status:s.status,dsp:s.dsp||[]}));i.addedItems=o,i.syncItemsToForm()}else if(i instanceof Se){const o=e.map((s,p)=>({id:Date.now()+p,song_name:s.title||"",song_file:s.file||"",thumbnail:s.cover_image_url||"",thumbnailPreview:s.cover_image_url||"",durationInSeconds:s.duration||l.Mx.ZERO,postPriceData:this.buildPostPriceDataFromLockThrough(s.lock_through,s.free_preview_time,s.international_prices),audioFileName:"",sk:s.sk||"",pk:s.pk||"",created_at:s.created_at||"",description:s.description||"",allow_download:s.allow_download||!1,show_as_post:s.show_as_post||!1,is_free:s.is_free||!1,release_date:s.release_date||null,status:s.status}));i.addedSongs=o,i.syncSongsToForm()}}buildAlbumLockThrough(e){if(!e)return{individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};const i={individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};e.is_indivudiual_price&&e.indivisualPrice&&(i.individual.individual_price=e.indivisualPrice),e.is_indivudiual_price&&(i.individual.outer_subscription=e.outer_subscription||[],i.individual.outer_nft=e.outer_nft||[]),e.is_subscription&&e.subscriptions&&e.subscriptions.length>l.Mx.ZERO&&(i.subscription=e.subscriptions),e.is_nft_added&&e.nftIDList&&e.nftIDList.length>l.Mx.ZERO&&(i.nft=e.nftIDList);const o=e?.loyalty_points;return o&&Number(o)>0&&(i.individual={...i.individual,loyalty_points:Number(o)}),i}cleanLockThroughData(e){const i=e?.loyalty_points,o=Number(i),s=null!=i&&""!==i&&Number.isFinite(o)&&o>0;if(!e||!e.is_subscription&&!e.is_indivudiual_price&&!e.is_nft_added&&!s)return{individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};const p={individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};return e.is_indivudiual_price&&(p.individual.individual_price=e.indivisualPrice||"",p.individual.outer_subscription=e.outer_subscription||[],p.individual.outer_nft=e.outer_nft||[]),s&&(p.individual={...p.individual,loyalty_points:o}),e.is_subscription&&e.subscriptions&&e.subscriptions.length>l.Mx.ZERO&&(p.subscription=e.subscriptions),e.is_nft_added&&e.nftIDList&&e.nftIDList.length>l.Mx.ZERO&&(p.nft=e.nftIDList),p}onAlbumLockDataChange(e){if(!this.form)return;const i=this.cleanLockThroughData(e.postPriceData);this.disabledSubscriptionPlanIds=e.disabledSubscriptionPlanIds||[],this.form.patchValue({album_lock_through:i},{emitEvent:!1})}resetAlbumLockingData(){this.form&&(this.form.patchValue({album_lock_through:{}},{emitEvent:!1}),this.albumLockingFilledData=null)}hasLockThroughContent(e){if(!e||"object"!=typeof e)return!1;if(e.individual?.individual_price&&""!==e.individual.individual_price.trim()||e.subscription&&Array.isArray(e.subscription)&&e.subscription.length>l.Mx.ZERO||e.nft&&Array.isArray(e.nft)&&e.nft.length>l.Mx.ZERO||e.individual?.outer_subscription&&e.individual.outer_subscription.length>l.Mx.ZERO||e.individual?.outer_nft&&e.individual.outer_nft.length>l.Mx.ZERO)return!0;const i=e.individual?.loyalty_points,o=Number(i);return!!(null!=i&&""!==i&&Number.isFinite(o)&&o>0)}loadAlbumLockingData(e){if(!e)return;const i=e.lock_through||{},o=this.buildPostPriceDataFromLockThrough(i,l.Mx.ZERO,e.international_prices);let s=null;i.individual&&(i.individual.outer_subscription?.length||i.individual.outer_nft?.length)&&(s={is_individual_price:!(!i.individual.individual_price||""===i.individual.individual_price.trim()),is_subscription:!!(i.individual.outer_subscription&&i.individual.outer_subscription.length>0),is_nft:!!(i.individual.outer_nft&&i.individual.outer_nft.length>0),subscription:i.individual.outer_subscription||[],NFT:i.individual.outer_nft||[]}),this.albumLockingFilledData={showFreePreviewDropdown:!1,isActiveLiveStream:!1,is_subscription:o.is_subscription||!1,is_indivudiual_price:o.is_indivudiual_price||!1,is_nft_added:o.is_nft_added||!1,indivisualPrice:o.indivisualPrice||"",loyalty_points:o.loyalty_points??null,subscriptions:o.subscriptions||[],nftIDList:o.nftIDList||[],lockDetail
1s:s,international_prices:o.international_prices||[]}}buildPostPriceDataFromLockThrough(e,i=l.Mx.ZERO,o=[]){if(!e)return{is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,subscriptions:[],indivisualPrice:"",collaborators:[],nftIDList:[],loyalty_points:null,international_prices:[],form:{free_preview:i||l.Mx.ZERO}};const s={is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,subscriptions:[],indivisualPrice:"",collaborators:[],nftIDList:[],loyalty_points:null,international_prices:[],form:{free_preview:i||l.Mx.ZERO}};if(e.individual){e.individual.individual_price&&""!==e.individual.individual_price.trim()&&(s.is_indivudiual_price=!0,s.indivisualPrice=e.individual.individual_price);const p=(0,ht.pL)(e.individual.loyalty_points);p&&(s.loyalty_points=p),s.outer_subscription=e.individual.outer_subscription||[],s.outer_nft=e.individual.outer_nft||[]}return e.subscription&&Array.isArray(e.subscription)&&e.subscription.length>l.Mx.ZERO&&(s.is_subscription=!0,s.subscriptions=e.subscription),e.nft&&Array.isArray(e.nft)&&e.nft.length>l.Mx.ZERO&&(s.is_nft_added=!0,s.nftIDList=e.nft),o?.length&&(s.international_prices=o),s}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(V.gz),t.Y36(V.F0),t.Y36(gt.F),t.Y36($.v),t.Y36(r.Ye),t.Y36(kt.yh))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-add-edit-album-portfolio"]],viewQuery:function(i,o){if(1&i&&(t.Gf(ur,5),t.Gf(te,5),t.Gf(Vt,5),t.Gf(ro,5),t.Gf(Se,5),t.Gf(Fe,5),t.Gf(to,5),t.Gf(gr,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.enableToggle=s.first),t.iGM(s=t.CRH())&&(o.step1Component=s.first),t.iGM(s=t.CRH())&&(o.step2Component=s.first),t.iGM(s=t.CRH())&&(o.stepAlbumLockingComponent=s.first),t.iGM(s=t.CRH())&&(o.step3MusicComponent=s.first),t.iGM(s=t.CRH())&&(o.step3VideoSeriesComponent=s.first),t.iGM(s=t.CRH())&&(o.step3CustomComponent=s.first),t.iGM(s=t.CRH())&&(o.loyaltyOnlyWarningModal=s.first)}},decls:19,vars:27,consts:[[1,"inside-container","preference-container","add-edit-album-portfolio"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"heading"],[1,"d-flex","align-items-center","gap-3"],[3,"click"],[1,"icon-arrow-back"],[1,"walletform-content","p-0"],[1,"album-portfolio-form"],[3,"form","portfolioType","isEditMode","currentStepNumber","totalSteps","useVideoCoverStyle","enable","showToggle","disableMessage","enableMessage","selectedBadgeGroups","toggleChanged"],[3,"form","portfolioType","currentStepNumber","totalSteps","step-hidden","dspModalHeaderLabel",4,"ngIf"],[3,"form","portfolioType","currentStepNumber","totalSteps","albumLockingFilledData","step-hidden","lockDataChange",4,"ngIf"],[3,"form","isEditMode","albumSk","userProfile","portfolioType","currentStepNumber","totalSteps","albumLockThrough","disabledSubscriptionPlanIds","step-hidden",4,"ngIf"],[3,"form","isEditMode","albumSk","userProfile","portfolioType","currentStepNumber","totalSteps","itemLockThrough","albumLockThrough","albumFreePreviewTime","disabledSubscriptionPlanIds","step-hidden",4,"ngIf"],[3,"form","isEditMode","albumSk","userProfile","portfolioType","currentStepNumber","totalSteps","disabledSubscriptionPlanIds","step-hidden",4,"ngIf"],["class","buttons",4,"ngIf"],["class","buttons",3,"ngClass",4,"ngIf"],[3,"proceeded","canceled",4,"ngIf"],[3,"form","portfolioType","currentStepNumber","totalSteps","dspModalHeaderLabel"],[3,"form","portfolioType","currentStepNumber","totalSteps","albumLockingFilledData","lockDataChange"],[3,"form","isEditMode","albumSk","userProfile","portfolioType","currentStepNumber","totalSteps","albumLockThrough","disabledSubscriptionPlanIds"],[3,"form","isEditMode","albumSk","userProfile","portfolioType","currentStepNumber","totalSteps","itemLockThrough","albumLockThrough","albumFreePreviewTime","disabledSubscriptionPlanIds"],[3,"form","isEditMode","albumSk","userProfile","portfolioType","currentStepNumber","totalSteps","disabledSubscriptionPlanIds"],[1,"buttons"],[3,"btnField","handleButtonClick"],[1,"buttons",3,"ngClass"],[1,"d-flex","align-items-center","gap-4"],[3,"btnField","handleButtonClick",4,"ngIf"],[3,"proceeded","canceled"],["loyaltyOnlyWarningModal",""]],template:function(i,o){if(1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),t.NdJ("click",function(){return o.navigateToBack()}),t._UZ(5,"em",5),t.qZA(),t.TgZ(6,"h4"),t._uU(7),t.qZA()()(),t.TgZ(8,"div",6)(9,"div",7)(10,"app-step-1-basic-info",8),t.NdJ("toggleChanged",function(p){return o.toggleChanged(p)}),t.qZA(),t.YNc(11,mr,1,7,"app-step-2-dsp-links",9),t.YNc(12,_r,1,7,"app-step-album-locking",10),t.YNc(13,hr,1,11,"app-step-3-music",11),t.YNc(14,fr,1,13,"app-step-3-video-series",12),t.YNc(15,Cr,1,10,"app-step-3-custom",13),t.qZA()(),t.YNc(16,br,3,8,"div",14),t.YNc(17,vr,5,12,"div",15),t.qZA()(),t.YNc(18,Mr,2,0,"app-loyalty-only-warning-modal",16)),2&i){let s,p,u,_,h,M,I;t.xp6(7),t.Oqu(o.pageTitle),t.xp6(3),t.ekj("step-hidden",o.currentStep!==o.STEP_1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isEditMode",o.isEditMode)("currentStepNumber",o.getStepNumber(o.STEP_1))("totalSteps",o.getTotalSteps())("useVideoCoverStyle",o.isVideoType())("enable",o.enable)("showToggle",o.currentStep===o.STEP_1)("disableMessage",o.CONSTS.DISABLE)("enableMessage",o.CONSTS.ENABLE)("selectedBadgeGroups",o.albumBadgeGroups),t.xp6(1),t.Q6J("ngIf",((null==o.form||null==(s=o.form.get("distributeThroughDSP"))?null:s.value)||t.DdM(22,Ne)).length>0),t.xp6(1),t.Q6J("ngIf",((null==o.form||null==(p=o.form.get("distributeThroughDirectSales"))?null:p.value)||t.DdM(23,Ne)).length),t.xp6(1),t.Q6J("ngIf",(o.isMusicType()||o.isPodcastType())&&((null==o.form||null==(u=o.form.get("distributeThroughDirectSales"))?null:u.value)||t.DdM(24,Ne)).length>0),t.xp6(1),t.Q6J("ngIf",o.isVideoType()&&((null==o.form||null==(_=o.form.get("distributeThroughDirectSales"))?null:_.value)||t.DdM(25,Ne)).length>0),t.xp6(1),t.Q6J("ngIf",o.isCustomType()&&((null==o.form||null==(h=o.form.get("distributeThroughDirectSales"))?null:h.value)||t.DdM(26,Ne)).length>0),t.xp6(1),t.Q6J("ngIf",!(o.isLastStep()||null!=(M=o.getStep3Component())&&M.showAddSongForm||null!=(M=o.getStep3Component())&&M.showAddItemForm)),t.xp6(1),t.Q6J("ngIf",o.isLastStep()&&!(null!=(I=o.getStep3Component())&&I.showAddSongForm)&&!(null!=(I=o.getStep3Component())&&I.showAddItemForm)),t.xp6(1),t.Q6J("ngIf",o.cs.isBrowser)}},dependencies:[r.mk,r.O5,it.r,ye.LoyaltyOnlyWarningModalComponent,te,Vt,ro,Se,Fe,to],styles:[".add-edit-album-portfolio[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important}.add-edit-album-portfolio[_ngcontent-%COMP%] .walletform-content[_ngcontent-%COMP%]{margin:0!important;background:transparent!important;box-shadow:none!important}.add-edit-album-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:none}.add-edit-album-portfolio[_ngcontent-%COMP%] .icon-liteicon-black-tick[_ngcontent-%COMP%]{font-size:14px}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px;display:flex;flex-direction:column;gap:20px;margin-bottom:20px}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .methods-of-consumption-item[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important;border-radius:16px}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .preview-as-post-interests-section[_ngcontent-%COMP%]{padding-left:20px;padding-right:50px}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:var(--configBgColor);color:var(--configBgTextColor);border-radius:12px;transition:all .3s ease}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:20px;cursor:pointer;margin:0;flex:1;position:relative}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;left:0;top:0}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;height:25px;width:25px;border-radius:100%;background:transparent}@media screen and (max-width: 992px){.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:20px!important;height:20px!important}}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkbox-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--configBgTextColor);margin-left:0}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%]{transition:transform .3s ease}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon.exp
1anded[_ngcontent-%COMP%]{transform:rotate(180deg)}.add-edit-album-portfolio[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:10px;color:var(--configBgTextColor)}.add-edit-album-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;width:100%;color:var(--configBgTextColor)!important;margin-bottom:24px}.add-edit-album-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{cursor:pointer;font-size:20px}.add-edit-album-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:24px;font-weight:700;line-height:24px;margin:0}@media screen and (max-width: 992px){.add-edit-album-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:16px}}.add-edit-album-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]{font-size:24px;font-weight:500;cursor:pointer}.add-edit-album-portfolio[_ngcontent-%COMP%] .album-portfolio-form[_ngcontent-%COMP%]{margin-bottom:24px;position:relative}.add-edit-album-portfolio[_ngcontent-%COMP%] .album-portfolio-form[_ngcontent-%COMP%] >.step-hidden{opacity:0;pointer-events:none;visibility:hidden;position:absolute;top:0;left:0;width:100%;height:0;overflow:hidden}.add-edit-album-portfolio[_ngcontent-%COMP%] .album-portfolio-form.review-mode-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}.add-edit-album-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:10px}@media screen and (max-width: 992px){.add-edit-album-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{padding:0 12px 24px;flex-direction:column;align-items:stretch;text-align:center;gap:16px}.add-edit-album-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:100%}.add-edit-album-portfolio[_ngcontent-%COMP%] .buttons.justify-content-between[_ngcontent-%COMP%]{flex-direction:column;gap:16px}.add-edit-album-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%]{flex-direction:column;gap:16px!important;width:100%}}@media screen and (max-width: 992px){.add-edit-album-portfolio[_ngcontent-%COMP%]{margin-top:45px;margin-left:-15px;margin-right:-15px}.add-edit-album-portfolio[_ngcontent-%COMP%] .hdr[_ngcontent-%COMP%]{display:none}.add-edit-album-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:block;font-size:20px;margin-bottom:20px;text-align:end}}@media screen and (max-width: 992px){ .add-edit-album-portfolio .both-btn{height:auto!important;padding:8px 14px!important;line-height:normal!important;font-size:12px!important}}"]}),a})();var ke=b(8239);const Tr={ADD_SINGLE_SONG:"Add Single Song",EDIT_SINGLE_SONG:"Edit Single Song",DISABLE:"DISABLE",ENABLE:"ENABLE",CANCEL:"CANCEL",SAVE_SONG:"SAVE SONG",UPDATE_SONG:"UPDATE SONG",METHODS_OF_CONSUMPTION:"Distribution Methods",DSP_LINKS:"Digital Service Providers (DSPs)",DIRECT_DISTRIBUTION:"Direct Sales",DIRECT_SALES_INFO_MESSAGE:"Direct Sales allows you to sell your albums and single song tracks directly to your fans. You can sell as individual purchase or include in one of your subscription plans.",CONTENT_SAVED_SUCCESS:"Content saved successfully",FAILED_TO_SAVE_CONTENT:"Failed to save content",FAILED_TO_LOAD_CONTENT:"Failed to load content",CONTENT_LOADED_SUCCESS:"Content loaded successfully",API_METHOD_POST:"post",API_METHOD_PUT:"put",PERMISSION_PENDING:"pending",UNABLE_TO_DETERMINE_DURATION:"Unable to determine audio duration. Please ensure the audio file is valid and try again.",PLEASE_UPLOAD_AUDIO_FILE:"Please upload an audio file",SELECT_INTERESTS:"Select Interests",SELECT_INTERESTS_HINT:"Including interest tags related to your post from the list below or your own custom #tags will help you find new fans who share similar interests.",POST_AS_PREVIEW:"Post Preview of Song on My Feed",BADGE_GROUPS_HINT:"If a Group(s) is selected in this list, only users belonging to that Group will see this item."},xr=["enableToggle"],Sr=["loyaltyOnlyWarningModal"];function Ir(a,m){if(1&a&&t._UZ(0,"app-badge-groups-selection",30),2&a){const n=t.oxw();t.Q6J("parentForm",n.form)("arrayName","badge_groups")("selectedBadgeGroups",n.contentBadgeGroups)("hintMessage",n.CONSTS.BADGE_GROUPS_HINT)("creatorId",null==n.currentUserProfile?null:n.currentUserProfile.gsi4pk)}}function Er(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-loyalty-only-warning-modal",31,32),t.NdJ("proceeded",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyProceed())})("canceled",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyWarningCanceled())}),t.qZA()}}const yr=function(a){return{saving:a}},xo=function(a){return{"icon-liteicon-black-tick":a}},kr=function(a){return{type:"button",class:"btn btn-default",label:a}},wr=function(a,m,n){return{type:"button",class:"btn btn-primary",label:a,disabled:m,loading:n}};let So=(()=>{const m=class{constructor(e,i,o,s,p,u){this.router=e,this.route=i,this.apiCallService=o,this.cs=s,this.uploadService=p,this.store=u,this.CONSTS=Tr,this.PORTFOLIO_TYPE_CONSTS=O.W,this.Application=l.Mx,this.isEditMode=!1,this.portfolioType="",this.portfolioTypeId="",this.form=null,this.enable=!0,this.showDescription=!1,this.isIndividual=!0,this.showThumbnail=!1,this.isDspChecked=!1,this.isDirectDistributionChecked=!1,this.contentPk="",this.contentSk="",this.contentBadgeGroups=[],this.contentCreatedAt=null,this.isSaving=!1,this.pendingPortfolioPayload=null,this.currentUserProfile=null,this.timestamp=null,this.destroy$=new X.x}
1ngOnInit(){this.routeId=this.route.snapshot.paramMap.get("id")||"",this.portfolioType=O.W.PORTFOLIO_TYPE.MUSIC,this.portfolioTypeId=this.route.snapshot.queryParamMap.get("portfolioTypeId")||"",this.isEditMode=!!this.routeId,this.isDspChecked=!1,this.isDirectDistributionChecked=!1,this.initForm(),this.getCurrentUserProfile()}getCurrentUserProfile(){this.store.select(yt.SJ).pipe((0,J.R)(this.destroy$)).subscribe(e=>{e?.user_name&&e?.user_name!==this.currentUserProfile?.user_name&&(this.currentUserProfile=e,this.userId=e.user_name,this.isEditMode&&this.routeId&&this.checkUserOwnershipAndLoadData())})}checkUserOwnershipAndLoadData(){this.isEditMode&&this.routeId&&this.currentUserProfile?.user_name&&(this.userId===this.currentUserProfile.user_name?this.loadContentData():setTimeout(()=>{this.router.navigate([`/${Ot._1.NOT_FOUND}`])},l.Mx.ONE_HUNDRED))}initForm(){this.form=new N.cw({name:new N.NI("",[N.kI.required,N.kI.maxLength(l.Mx.ONE_HUNDRED)]),cover_image:new N.NI("",[N.kI.required]),description:new N.NI("",[N.kI.maxLength(l.Mx.FIVE_HUNDRED)]),release_date:new N.NI(null),release_year:new N.NI(null),release_type_year:new N.NI([]),release_type_date:new N.NI([]),dsp:new N.NI([]),items:new N.NI([])})}get pageTitle(){return this.isEditMode?this.CONSTS.EDIT_SINGLE_SONG:this.CONSTS.ADD_SINGLE_SONG}navigateToBack(){this.router.navigate(["/monetize/portfolio","banner-view",this.portfolioTypeId],{queryParams:{tab:ee.oM.TAB_INDIVIDUAL}})}toggleChanged(e){this.enable=e}get isFormValid(){if(!this.form)return!1;const e=this.form.get("name")?.valid??!1,i=this.form.get("cover_image")?.valid??!1,o=!this.showDescription||(this.form.get("description")?.valid??!1),s=e&&i&&o,p=this.form.get("dsp")?.value||[],_=!this.isDspChecked||p.length>l.Mx.ZERO&&(this.step2Component?.isDspFormValid??!0);let h=!0;if(this.isDirectDistributionChecked){const I=this.step3Component?.form?.get("song_file")?.value;let A=!0;if(!this.isIndividual){const E=this.step3Component?.form?.get("song_name");A=!(!E?.value||!E.value.trim())}if(A&&I){const E=this.step3Component?.validatePostPrice();E&&!E.isValid&&(h=!1)}else h=!1}else h=!0;return s&&_&&h}onDspCheckboxChange(e){e.stopPropagation(),this.isDspChecked=e.target.checked,this.isDspChecked||this.resetDspStepData()}onDirectDistributionCheckboxChange(e){e.stopPropagation(),this.isDirectDistributionChecked=e.target.checked,this.isDirectDistributionChecked?this.step3Component&&(this.step3Component.showAddSongForm=!0):this.resetDirectDistributionStepData()}resetDspStepData(){this.form?.get("dsp")&&this.form.get("dsp")?.setValue([]),this.step2Component?.dspForm&&this.step2Component.dspForm.reset(),this.step2Component?.multiselectField?.options&&this.step2Component.multiselectField.options.forEach(e=>{void 0!==e.isSelected&&(e.isSelected=!1)})}resetDirectDistributionStepData(){this.step3Component&&(this.step3Component.resetForm(),this.step3Component.showAddSongForm=!1,this.step3Component.addedSongs=[],this.step3Component.audiosForUploading=[],this.step3Component.audioSelected=!1,this.step3Component.audioPreview="",this.step3Component.audioFileName="",this.step3Component.thumbnailPreview="",this.step3Component.postPriceComponent&&(this.step3Component.postPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.step3Component.postPriceComponent.addedNFTIds=[],this.step3Component.postPriceComponent.postPriceForm&&this.step3Component.postPriceComponent.postPriceForm.reset(),this.step3Component.postPriceComponent.ppForm&&this.step3Component.postPriceComponent.ppForm.reset(),this.step3Component.postPriceComponent.loyaltyPointsForm&&this.step3Component.postPriceComponent.loyaltyPointsForm.reset(),this.step3Component.postPriceComponent?.currencyConversionData&&(this.step3Component.postPriceComponent.currencyConversionData={adjustedPrices:[]}),this.step3Component.postPriceComponent.subPlanList&&this.step3Component.postPriceComponent.subPlanList.forEach(e=>{e.isSelected=!1})),this.step3Component.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]},this.form?.get("items")&&this.form.get("items")?.setValue([]))}submitPortfolioPayload(e){this.apiCallService[this.isEditMode&&this.contentPk&&this.contentSk?this.CONSTS.API_METHOD_PUT:this.CONSTS.API_METHOD_POST](U.Y9.portfolioContent,e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{this.isSaving=!1,o.status?(this.cs.showSuccessMessage(o.message||this.CONSTS.CONTENT_SAVED_SUCCESS),this.navigateToBack()):this.cs.showErrorMessage(o.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:o=>{this.isSaving=!1,this.cs.showErrorMessage(o?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}handleLoyaltyOnlyProceed(){const e=this.pendingPortfolioPayload;this.pendingPortfolioPayload=null,e&&this.submitPortfolioPayload(e)}handleLoyaltyOnlyWarningCanceled(){this.pendingPortfolioPayload=null,this.isSaving=!1}handleSave(){this.form&&this.isFormValid&&!this.isSaving&&(this.isSaving=!0,(this.isDirectDistributionChecked&&this.step3Component?.addedSongs.length===l.Mx.ZERO?this.saveIndividualSongData():Promise.resolve()).then(()=>{this.uploadAudioFilesIfNeeded().then(()=>{this.buildPayloadWithDuration().then(i=>i?this.isDirectDistributionChecked&&0===i.duration?(this.isSaving=!1,void this.cs.showErrorMessage(this.CONSTS.UNABLE_TO_DETERMINE_DURATION)):(0,ht.Ix)((0,ht.si)(i.lock_through))?(this.pendingPortfolioPayload=i,void this.loyaltyOnlyWarningModal?.openModal()):void this.submitPortfolioPayload(i):(this.isSaving=!1,void this.cs.showErrorMessage(this.CONSTS.UNABLE_TO_DETERMINE_DURATION))).catch(()=>{this.isSaving=!1,this.cs.showErrorMessage(this.CONSTS.FAILED_TO_SAVE_CONTENT)})}).catch(i=>{this.isSaving=!1,this.cs.showErrorMessage(i?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)})}).catch(()=>{this.isSaving=!1,this.cs.showErrorMessage(this.CONSTS.FAILED_TO_SAVE_CONTENT)}))}uploadAudioFilesIfNeeded(){var e=this;return new Promise((i,o)=>
1{if(!this.isDirectDistributionChecked||!this.step3Component)return void i();const s=this.step3Component.audiosForUploading||[];if(s.length===l.Mx.ZERO)return void i();let p=l.Mx.ZERO;if(this.step3Component.postPriceComponent?.postPriceForm){const h=this.step3Component.postPriceComponent.postPriceForm.get("free_preview")?.value;p=h?Number(h):l.Mx.ZERO}const u=p>l.Mx.ZERO;s.forEach(h=>{h.metadata&&(h.metadata.free_preview_time=p.toString(),h.metadata.preview_required=u.toString())});const _=s.map(h=>this.uploadService.uploadFile(h));Promise.all(_).then(function(){var h=(0,ke.Z)(function*(M){if(M&&M.length>l.Mx.ZERO&&e.step3Component){const I=M[l.Mx.ZERO]?.data?.Location?e.uploadService.convertS3LocationToCDNUrl(M[l.Mx.ZERO].data.Location):null;if(I){e.step3Component.form.patchValue({[e.step3Component.portfolioConfig?.fileField||"song_file"]:I});const E=e.form?.get("items")?.value||[];E.length>l.Mx.ZERO&&(E[l.Mx.ZERO].song_file=I,e.form?.patchValue({items:E})),e.step3Component.addedSongs.length>l.Mx.ZERO&&(e.step3Component.addedSongs[l.Mx.ZERO].song_file=I),yield e.calculateAudioDuration(I,!0)}}e.step3Component.audiosForUploading=[],i()});return function(M){return h.apply(this,arguments)}}()).catch(h=>{o(h)})})}calculateAudioDuration(e,i=!0,o=l.Mx.ZERO){return new Promise(s=>{let p="",u=!1;if(e instanceof File)p=URL.createObjectURL(e),u=!0;else{if("string"!=typeof e||!e)return void s(Number(l.Mx.ZERO));p=e}const _=new Audio;let h=null,M=!1;const I=()=>{u&&p&&URL.revokeObjectURL(p),h&&clearTimeout(h)},A=E=>{M||(M=!0,I(),i&&this.updateDurationInFormAndSongs(E),s(E))};h=setTimeout(()=>{M||(o<l.Mx.ONE?(I(),this.calculateAudioDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO)))},l.Mx.TEN_THOUSAND),_.addEventListener("loadedmetadata",()=>{if(M)return;const E=_.duration;E&&isFinite(E)&&E>l.Mx.ZERO?A(Math.ceil(E)):o<l.Mx.ONE?(I(),this.calculateAudioDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO))},{once:!0}),_.addEventListener("error",()=>{M||(o<l.Mx.ONE?(I(),this.calculateAudioDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO)))},{once:!0}),_.preload=l.Mx.METADATA,_.src=p,_.load()})}updateDurationInFormAndSongs(e){const i=this.form?.get("items")?.value||[];i.length>l.Mx.ZERO&&(i[l.Mx.ZERO].durationInSeconds=e,this.form?.patchValue({items:i})),this.step3Component?.addedSongs.length>l.Mx.ZERO&&(this.step3Component.addedSongs[l.Mx.ZERO].durationInSeconds=e)}saveIndividualSongData(){return new Promise(e=>{if(!this.step3Component||!this.form)return void e();let i=null;if(this.step3Component.postPriceComponent){const E=this.step3Component.postPriceComponent.postPriceObj,z=this.step3Component.postPriceComponent.postPriceForm,et=this.step3Component.postPriceComponent.subPlanList,tt=this.step3Component.postPriceComponent.addedNFTIds;if(E.is_subscription||E.is_ind_purchase||E.is_loyalty_points||E.is_lock_with_nft){if(i={is_subscription:E.is_subscription,is_indivudiual_price:E.is_ind_purchase,is_nft_added:E.is_lock_with_nft,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.step3Component.postPriceComponent.currencyConversionData?.adjustedPrices||[]},E.is_ind_purchase&&(i.indivisualPrice=this.step3Component.postPriceComponent.ppForm?.controls.indPrice?.value||""),E.is_loyalty_points){const K=this.step3Component.postPriceComponent.loyaltyPointsForm?.get("loyalty_points")?.value,pt=Number(K);i.loyalty_points=Number.isFinite(pt)&&pt>0?pt:null}if(E.is_subscription&&et&&et.forEach(K=>{K.isSelected&&i.subscriptions.push({sk:K.sk,pk:K.pk,title:K.name,duration:K.duration,amount:K.price,discount_offer:K.discount_offer})}),E.is_lock_with_nft&&(i.nftIDList=[...tt]),z?.value){let K=[];try{K=this.step3Component.postPriceComponent.getSelectedHashTag()}catch{K=[]}i={...i,form:z.value,tags:K}}}}const o=this.step3Component.form.get("allow_download")?.value||[],s=Array.isArray(o)&&o.length>l.Mx.ZERO&&o.includes(!0),p=this.step3Component.form.get("show_as_post")?.value||[],u=Array.isArray(p)&&p.length>l.Mx.ZERO&&p.includes(!0),_=this.step3Component.form.get("require_authentication")?.value||[],h=Array.isArray(_)&&_.length>l.Mx.ZERO&&_.includes(!0),M={id:Date.now(),song_name:this.form?.get("name")?.value||"",song_file:this.step3Component.form.get("song_file")?.value,thumbnail:this.step3Component.form.get("thumbnail")?.value||"",postPriceData:i,audioFileName:this.step3Component.audioFileName,thumbnailPreview:this.step3Component.thumbnailPreview,durationInSeconds:l.Mx.ZERO,require_authentication:h,allow_download:s,show_as_post:u};this.form.patchValue({items:[M]}),this.step3Component.addedSongs=[M],this.step3Component.syncSongsToForm();const A=(this.step3Component.audiosForUploading?.length>l.Mx.ZERO?this.step3Component.audiosForUploading[l.Mx.ZERO]?.file:null)||M.song_file;A?this.calculateAudioDuration(A,!0).then(E=>{M.durationInSeconds=E,this.updateDurationInFormAndSongs(E),e()}):e()})}handleCancel(){this.navigateToBack()}buildPayloadWithDuration(){var e=this;return new Promise(function(){var i=(0,ke.Z)(function*(o){if(!e.form||!e.portfolioTypeId)return void o(null);const s=e.form.value,p=e.isDspChecked?e.buildDspArray(s.dsp||[],e.step2Component?.dspForm?.value||{}):[];let u=null,_=null,h=Number(l.Mx.ZERO),M="",I=Number(l.Mx.ZERO);if(e.isDirectDistributionChecked&&e.step3Component){const E=s.items||[],q=e.step3Component.addedSongs||[];if(u=E.length>l.Mx.ZERO?E[l.Mx.ZERO]:null,q.length>l.Mx.ZERO&&q[l.Mx.ZERO]){const z=q[l.Mx.ZERO];z.durationInSeconds&&z.durationInSeconds>l.Mx.ZERO&&(h=Number(z.durationInSeconds))}u&&(_=e.getPostPriceDataFromComponent(),M=u.song_file||"",h===Number(l.Mx.ZERO)&&(h=Number(u.durationInSeconds)||Number(l.Mx.ZERO)),_?.form?.free_preview&&(I=Number(_.form.free_preview)||Number(l.Mx.ZERO)))}e.isDirectDistributionChecked&&M&&h===Number(l.Mx.ZERO)&&(h=yield e.calculateAudioDuration(M,!1),h>l.Mx.ZERO&&e.updateDurationInFormAndSongs(h)),e.isDirectDistributionChecked&&M&&h===Number(l.Mx.ZERO)?o(null):o(e.createPayload(s,p,_,h,M,I))});return function(o){return i.apply(this,arguments)}}())}createPayload(e,i,o,s,p,u){const _=this.isDirectDistributionChecked?this.buildLockThrough(o):{},h=this.timestamp||(0,Q.e4)(p)||Date.now();let M=!0,I=!1,A=!1;if(this.isDirectDistributionChecked&&this.step3Component?.form){const tt=this.step3Component.form.get("allow_download")?.value||[];M=Array.isArray(tt)&&tt.length>l.Mx.ZERO&&tt.includes(!0);const dt=this.step3Component.form.get("show_as_post")?.value||[];I=Array.isArray(dt)&&dt.length>l.Mx.ZERO&&dt.includes(!0);const K=this.step3Component.form.get("require_authentication")?.value||[];A=Array.isArray(K)&&K.length>l.Mx.ZERO&&K.includes(!0)}const E=(e.release_type_year||[]).includes(Y.vI.RELEASE_TYPE_YEAR),q=(e.release_type_date||[]).includes(Y.vI.RELEASE_TYPE_DATE);let z=null;E&&null!=e.release_year&&""!==e.release_year?z=e.release_year.toString():q&&null!=e.release_date&&(z=(0,Q.YF)(e.release_date));const et={type:this.portfolioType.toUpperCase(),title:e.name||"",cover_image_url:e.cover_image||"",duration:s,lock_through:_,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,free_preview_time:u,dsp:i,require_authentication:A,allow_download:M,release_date:z,show_as_post:I,international_prices:o?.international_prices,badge_groups:(0,Q.IH)(this.form)};return this.isDirectDistributionChecked&&p?(et.file=p,et.media_id=h):et.file="",this.isEditMode&&this.contentPk&&this.contentSk?(et.pk=this.contentPk,et.sk=this.contentSk):et.portfolio_sk=this.cs.encodeToUTF(this.portfolioTypeId),et}getPostPriceDataFromComponent(){if(!this.step3Component||!this.step3Component.postPriceComponent)return null;const e=this.step3Component.postPriceComponent.postPriceObj,o=this.step3Component.postPriceComponent.postPriceForm,s=this.step3Component.postPriceComponent.subPlanList,p=this.step3Component.postPriceComponent.addedNFTIds;if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft))return null;const _=this.step3Component.postPriceComponent.loyaltyPointsForm;let h={is_subscription:e.is_subscription,is_indivudiual_price:e.is_ind_purchase,is_nft_added:e.is_lock_with_nft,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.step3Component.postPriceComponent.currencyConversionData?.adjustedPrices||[]};if(e.is_ind_purchase&&(h.indivisualPrice=this.step3Component.postPriceComponent.ppForm?.controls.indPrice?.value||""),e.is_loyalty_points){const M=_?.get("loyalty_points")?.value,I=Number(M);h.loyalty_points=Number.isFinite(I)&&I>0?I:null}
1if(e.is_subscription&&s&&s.forEach(M=>{M.isSelected&&h.subscriptions.push({sk:M.sk,pk:M.pk,title:M.name,duration:M.duration,amount:M.price,discount_offer:M.discount_offer})}),e.is_lock_with_nft&&(h.nftIDList=[...p]),o?.value){let M=[];try{M=this.step3Component.postPriceComponent.getSelectedHashTag()}catch{M=[]}if(h={...h,form:o.value,tags:M},this.step3Component.postPriceComponent.isDoubleLockingEnable&&o.get("lock")?.value?.lockValue){const I=o.get("lock")?.value?.lockValue;h.outer_subscription=I?.subscription||[],h.outer_nft=I?.NFT||[]}}return h}buildDspArray(e,i){return e&&e.length!==l.Mx.ZERO?e.map(o=>{const s=o.sk||"";return{pk:o.pk||"",sk:s,url:i[`${s}url`]||"",button_label:i[`${s}text`]||""}}):[]}buildLockThrough(e){if(!e)return{individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};const i=e?.loyalty_points;return{individual:{outer_subscription:e.outer_subscription||[],outer_nft:e.outer_nft||[],individual_price:e.indivisualPrice||"",...i&&{loyalty_points:Number(i)}},subscription:e.subscriptions||[],nft:e.nftIDList||[]}}loadContentData(){if(!this.routeId||!this.portfolioType)return;const e=U.$_.getPortfolioContentDetail(this.routeId,this.portfolioType.toUpperCase());this.apiCallService.get(e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:i=>{if(i.status&&i.statusCode===l.Mx.TWO_HUNDRED&&i.data){const o=i.data;this.contentPk=o.pk||"",this.contentSk=o.sk||"",this.contentBadgeGroups=o.badge_groups||[];const s={pk:o.pk||"",sk:o.sk||"",content_title:o.title||o.content_title||"",title:o.title||o.content_title||"",cover_image_url:o.cover_image_url||o.thumbnail||"",thumbnail:o.cover_image_url||o.thumbnail||"",content_desc:o.description||o.content_desc||"",description:o.description||o.content_desc||"",status:o.status||O.W.PORTFOLIO_STATUS.ACTIVE,dsp:o.dsp||[],file:o.file||o.media_url||"",media_url:o.file||o.media_url||"",duration:o.duration||l.Mx.ZERO,lock_through:o.lock_through||null,free_preview_time:o.free_preview_time||l.Mx.ZERO,require_authentication:o.require_authentication||!1,allow_download:o.allow_download||!1,release_date:o.release_date||null,show_as_post:o.show_as_post||!1,international_prices:o?.international_prices||[]};if(this.form){const p=(0,Q.NH)(s.release_date);let u=null,_=null,h=[],M=[];if(p.type===Y.vI.RELEASE_TYPE_YEAR?(_=p.value,h=[Y.vI.RELEASE_TYPE_YEAR],M=[]):p.type===Y.vI.RELEASE_TYPE_DATE&&(u=(0,Q.Gy)(p.value),h=[],M=[Y.vI.RELEASE_TYPE_DATE]),this.form.patchValue({name:s.content_title||s.title||"",cover_image:s.cover_image_url||s.thumbnail||"",description:s.content_desc||s.description||"",release_date:u||null,release_year:_||null,release_type_year:h,release_type_date:M}),setTimeout(()=>{this.step1Component&&this.step1Component.initializeReleaseType()},100),this.enable=s.status===O.W.PORTFOLIO_STATUS.ACTIVE,s.dsp&&Array.isArray(s.dsp)&&s.dsp.length>l.Mx.ZERO){this.isDspChecked=!0;const I=s.dsp.map(A=>({pk:A.pk||"",sk:A.sk||"",name:A.name||"",logo:A.logo||"",url:A.url||"",button_label:A.button_label||""}));this.form.patchValue({dsp:I}),this.step2Component?.remergeOptions$&&this.step2Component.remergeOptions$.next()}(s.file||s.media_url)&&(this.isDirectDistributionChecked=!0,this.timestamp=(0,Q.e4)(s.file||s.media_url),this.loadDirectDistributionData(s))}}else this.cs.showErrorMessage(i.message||this.CONSTS.FAILED_TO_LOAD_CONTENT),this.navigateToBack()},error:i=>{this.cs.showErrorMessage(i?.message||this.CONSTS.FAILED_TO_LOAD_CONTENT),this.navigateToBack()}})}loadDirectDistributionData(e){setTimeout(()=>{if(this.step3Component){this.step3Component.showAddSongForm=!0;const i=this.buildPostPriceDataFromLockThrough(e.lock_through,e.free_preview_time||l.Mx.ZERO,e?.international_prices),o=void 0!==e.allow_download&&e.allow_download,s=void 0!==e.show_as_post&&e.show_as_post,p=void 0!==e.require_authentication&&e.require_authentication,u={id:Date.now(),song_name:e.content_title||e.title||"",song_file:e.file||e.media_url||"",thumbnail:e.cover_image_url||"",thumbnailPreview:e.cover_image_url||"",durationInSeconds:e.duration||l.Mx.ZERO,sk:e.sk||"",pk:e.pk||"",postPriceData:i,audioFileName:"",require_authentication:p,allow_download:o,release_date:e.release_date||null,show_as_post:s};this.step3Component.form&&this.step3Component.form.patchValue({song_file:u.song_file,thumbnail:u.thumbnail,require_authentication:p?[!0]:[],allow_download:o?[!0]:[],show_as_post:s?[!0]:[]}),u.song_file&&(this.step3Component.audioSelected=!0,this.step3Component.audioPreview=u.song_file,this.step3Component.audioFileName=O.W.AUDIO_FILE,this.timestamp=(0,Q.e4)(u.song_file),this.step3Component&&(this.step3Component.timestamp=this.timestamp)),u.thumbnail&&(this.step3Component.thumbnailPreview=u.thumbnailPreview||u.thumbnail),this.step3Component.addedSongs=[u],this.step3Component.syncSongsToForm(),this.form&&this.form.patchValue({items:[u]}),i&&this.step3Component.postPriceComponent&&setTimeout(()=>{this.loadPostPriceDataIntoComponent(i)},300),setTimeout(()=>{this.step1Component&&this.step1Component.initializeReleaseType()},150)}},100)}
1buildPostPriceDataFromLockThrough(e,i=l.Mx.ZERO,o=[]){if(!e)return{is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:[],form:{free_preview:i||l.Mx.ZERO}};const s={is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:[],form:{free_preview:i||l.Mx.ZERO}};if(e.individual){e.individual.individual_price&&""!==e.individual.individual_price.trim()&&(s.is_indivudiual_price=!0,s.indivisualPrice=e.individual.individual_price);const p=(0,ht.pL)(e.individual.loyalty_points);p&&(s.loyalty_points=p),s.outer_subscription=e.individual.outer_subscription||[],s.outer_nft=e.individual.outer_nft||[]}return e.subscription&&Array.isArray(e.subscription)&&e.subscription.length>l.Mx.ZERO&&(s.is_subscription=!0,s.subscriptions=e.subscription),e.nft&&Array.isArray(e.nft)&&e.nft.length>l.Mx.ZERO&&(s.is_nft_added=!0,s.nftIDList=e.nft),o?.length&&(s.international_prices=o),s}loadPostPriceDataIntoComponent(e){if(!this.step3Component||!this.step3Component.postPriceComponent||!e)return;const i=null!=e.loyalty_points&&e.loyalty_points>0;if(!(e.is_subscription||e.is_indivudiual_price||e.is_nft_added||i))return;if(this.step3Component.postPriceComponent.postPriceObj={is_subscription:e.is_subscription||!1,is_ind_purchase:e.is_indivudiual_price||!1,is_loyalty_points:i,is_lock_with_nft:e.is_nft_added||!1,selected_subscription:[],individual_price:e.indivisualPrice||"",revenue_split:"",international_prices:e?.international_prices||[]},e.is_subscription&&e.subscriptions){const p=setInterval(()=>{this.step3Component?.postPriceComponent?.subPlanList&&this.step3Component.postPriceComponent.subPlanList.length>l.Mx.ZERO&&(clearInterval(p),e.subscriptions.forEach(u=>{const _=this.step3Component.postPriceComponent.subPlanList.find(h=>h.sk===u.sk);_&&(_.isSelected=!0)}))},50);setTimeout(()=>clearInterval(p),3e3)}e.is_indivudiual_price&&e.indivisualPrice&&this.step3Component.postPriceComponent.ppForm&&this.step3Component.postPriceComponent.ppForm.patchValue({indPrice:e.indivisualPrice}),i&&this.step3Component.postPriceComponent.loyaltyPointsForm&&(this.step3Component.postPriceComponent.loyaltyPointsForm.patchValue({loyalty_points:e.loyalty_points}),this.step3Component.postPriceComponent.onLoyaltyPointsToggle()),e.is_nft_added&&e.nftIDList&&(this.step3Component.postPriceComponent.addedNFTIds=[...e.nftIDList]),e.form&&this.step3Component.postPriceComponent.postPriceForm&&this.step3Component.postPriceComponent.postPriceForm.patchValue(e.form);let s=null;(e?.outer_subscription?.length||e?.outer_nft?.length)&&(s={is_individual_price:!0,is_subscription:!!(e.outer_subscription&&e.outer_subscription.length>0),is_nft:!!(e.outer_nft&&e.outer_nft.length>0),subscription:e.outer_subscription||[],NFT:e.outer_nft||[]}),this.step3Component&&(this.step3Component.postPriceFilledData={...this.step3Component.postPriceFilledData,showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:e.is_subscription||!1,is_indivudiual_price:e.is_indivudiual_price||!1,is_nft_added:e.is_nft_added||!1,indivisualPrice:e.indivisualPrice||"",loyalty_points:e.loyalty_points??null,subscriptions:e.subscriptions||[],nftIDList:e.nftIDList||[],form:e.form||null,lockDetails:s,collaborators:[],international_prices:e?.international_prices},this.step3Component.postPriceComponent.currencyConversionData={adjustedPrices:e?.international_prices})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(V.F0),t.Y36(V.gz),t.Y36(gt.F),t.Y36($.v),t.Y36(bt.C),t.Y36(kt.yh))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-add-edit-single-song-portfolio"]],viewQuery:function(i,o){if(1&i&&(t.Gf(xr,5),t.Gf(Sr,5),t.Gf(te,5),t.Gf(Vt,5),t.Gf(Se,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.enableToggle=s.first),t.iGM(s=t.CRH())&&(o.loyaltyOnlyWarningModal=s.first),t.iGM(s=t.CRH())&&(o.step1Component=s.first),t.iGM(s=t.CRH())&&(o.step2Component=s.first),t.iGM(s=t.CRH())&&(o.step3Component=s.first)}},decls:46,vars:63,consts:[[1,"inside-container","preference-container","add-edit-single-song-portfolio"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"heading"],[1,"d-flex","align-items-center","gap-3"],[3,"click"],[1,"icon-arrow-back"],[1,"walletform-content","p-0"],[1,"single-song-portfolio-form",3,"ngClass"],[3,"form","portfolioType","isEditMode","isIndividual","showDescription","itemSk","enable","showToggle","disableMessage","enableMessage","itemDeleted","toggleChanged"],[1,"methods-of-consumption-section","mt-4"],[1,"section-title"],[1,"methods-of-consumption-item"],[1,"toggle-checkbox-section"],[1,"toggle-header"],[1,"custom-checkbox","checkbox-label"],["type","checkbox",3,"checked","disabled","change"],[1,"checkmark","checkmark-md","rounded",3,"ngClass"],[1,"checkbox-text"],[1,"chevron-icon","ms-auto",3,"click"],[1,"icon-litechevron_down"],[1,"step-2-container"],[3,"form","portfolioType","isIndividual","isDspChecked"],[1,"d-flex","align-items-center","gap-2"],[3,"message","infoIconSize"],[1,"step-3-container"],[3,"form","isEditMode","isIndividual","showThumbnail","isDirectDistributionChecked","userProfile","portfolioType","isUploadingAudio"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId",4,"ngIf"],[1,"buttons","mt-4"],[3,"btnField","handleButtonClick"],[3,"proceeded","canceled",4,"ngIf"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId"],[3,"proceeded","canceled"],["loyaltyOnlyWarningModal",""]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),t.NdJ("click",function(){return o.navigateToBack()}),t._UZ(5,"em",5),t.qZA(),t.TgZ(6,"h4"),t._uU(7),t.qZA()()(),t.TgZ(8,"div",6)(9,"div",7)(10,"app-step-1-basic-info",8),t.NdJ("itemDeleted",function(){return o.navigateToBack()})("toggleChanged",function(p){return o.toggleChanged(p)}),t.qZA(),t.TgZ(11,"div",9)(12,"div",10)(13,"h3"),t._uU(14),t.qZA()(),t.TgZ(15,"div",11)(16,"div",12)(17,"div",13)(18,"label",14)(19,"input",15),t.NdJ("change",function(p){return o.onDspCheckboxChange(p)}),t.qZA(),t._UZ(20,"span",16),t.TgZ(21,"span",17),t._uU(22),t.qZA(),t.TgZ(23,"span",18),t.NdJ("click",function(p){return p.stopPropagation()}),t._UZ(24,"em",19),t.qZA()()()(),t.TgZ(25,"div",20),t._UZ(26,"app-step-2-dsp-links",21),t.qZA()(),t.TgZ(27,"div",11)(28,"div",12)(29,"div",13)(30,"label",14)(31,"input",15),t.NdJ("change",function(p){return o.onDirectDistributionCheckboxChange(p)}),t.qZA(),t._UZ(32,"span",16),t.TgZ(33,"div",22)(34,"span",17),t._uU(35),t.qZA(),t._UZ(36,"app-info-icon",23),t.qZA(),t.TgZ(37,"span",18),t.NdJ("click",function(p){return p.stopPropagation()}),t._UZ(38,"em",19),t.qZA()()()(),t.TgZ(39,"div",24),t._UZ(40,"app-step-3-music",25),t.qZA()()()()(),t.YNc(41,Ir,1,5,"app-badge-groups-selection",26),t.TgZ(42,"div",27)(43,"app-button",28),t.NdJ("handleButtonClick",function(){return o.handleCancel()}),t.qZA(),t.TgZ(44,"app-button",28),t.NdJ("handleButtonClick",function(){return o.handleSave()}),t.qZA()()()(),t.YNc(45,Er,2,0,"app-loyalty-only-warning-modal",29)),2&i&&(t.xp6(7),t.Oqu(o.pageTitle),t.xp6(2),t.Q6J("ngClass",t.VKq(51,yr,o.isSaving)),t.xp6(1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isEditMode",o.isEditMode)("isIndividual",o.isIndividual)("showDescription",o.showDescription)("itemSk",o.routeId)("enable",o.enable)("showToggle",!0)("disableMessage",o.CONSTS.DISABLE)("enableMessage",o.CONSTS.ENABLE),t.xp6(4),t.Oqu(o.CONSTS.METHODS_OF_CONSUMPTION),t.xp6(5),t.Q6J("checked",o.isDspChecked)("disabled",o.isSaving),t.xp6(1),t.Q6J("ngClass",t.VKq(53,xo,o.isDspChecked)),t.xp6(2),t.Oqu(o.CONSTS.DSP_LINKS),t.xp6(1),t.ekj("expanded",o.isDspChecked),t.xp6(2),t.Udp("opacity",o.isDspChecked?"1":"0"),t.ekj("hidden",!o.isDspChecked),t.xp6(1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isIndividual",o.isIndividual)("isDspChecked",o.isDspChecked),t.xp6(5),t.Q6J("checked",o.isDirectDistributionChecked)("disabled",o.isSaving),t.xp6(1),t.Q6J("ngClass",t.VKq(55,xo,o.isDirectDistributionChecked)),t.xp6(3),t.Oqu(o.CONSTS.DIRECT_DISTRIBUTION),t.xp6(1),t.Q6J("message",o.CONSTS.DIRECT_SALES_INFO_MESSAGE)("infoIconSize",18),t.xp6(1),t.ekj("expanded",o.isDirectDistributionChecked),t.xp6(2),t.Udp("opacity",o.isDirectDistributionChecked?"1":"0"),t.ekj("hidden",!o.isDirectDistributionChecked),t.xp6(1),t.Q6J("form",o.form)("isEditMode",o.isEditMode)("isIndividual",o.isIndividual)("showThumbnail",o.showThumbnail)("isDirectDistributionChecked",o.isDirectDistributionChecked)("userProfile",o.currentUserProfile)("portfolioType",o.portfolioType)("isUploadingAudio",o.isSaving),t.xp6(1),t.Q6J("ngIf",null==o.currentUserProfile?null:o.currentUserProfile.gsi4pk),t.xp6(2),t.Q6J("btnField",t.VKq(57,
1kr,o.CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.kEZ(59,wr,o.isEditMode?o.CONSTS.UPDATE_SONG:o.CONSTS.SAVE_SONG,!o.isFormValid||o.isSaving,o.isSaving)),t.xp6(1),t.Q6J("ngIf",o.cs.isBrowser))},dependencies:[r.mk,r.O5,Xt.e,it.r,ye.LoyaltyOnlyWarningModalComponent,At.K,te,Vt,Se],styles:[".add-edit-single-song-portfolio[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .walletform-content[_ngcontent-%COMP%]{margin:0!important;background:transparent!important;box-shadow:none!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .icon-liteicon-black-tick[_ngcontent-%COMP%]{font-size:14px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:none}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .preview-as-post-interests-section[_ngcontent-%COMP%]{padding-left:20px;padding-right:50px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;width:100%;margin-bottom:24px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{cursor:pointer;font-size:20px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:24px;font-weight:700;line-height:24px;margin:0}@media screen and (max-width: 992px){.add-edit-single-song-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:16px}}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]{font-size:24px;font-weight:500;cursor:pointer}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%]{margin-bottom:24px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.7}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] .custom-checkbox[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{pointer-events:none!important;cursor:not-allowed;opacity:.6}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.6}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%] .pricing-options-section, .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%] .pricing-options-section, .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%] .pricing-options-section{pointer-events:none!important;opacity:.6}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%] .pricing-options-section .modal-content, .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%] .pricing-options-section .modal-content, .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%] .pricing-options-section .modal-content{pointer-events:none!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px;display:flex;flex-direction:column;gap:20px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .methods-of-consumption-item[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important;border-radius:16px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{margin-bottom:20px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;margin-bottom:.5rem}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{font-size:.875rem;color:#ffffffb3;margin-bottom:0}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:var(--configBgColor);color:var(--configBgTextColor);border-radius:12px;transition:all .3s ease}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:20px;cursor:pointer;margin:0;flex:1;position:relative}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;left:0;top:0}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .checkmark[_ngcontent-%COMP%]{background:var(--theme-interactive-link);border-color:var(--theme-interactive-link)}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;height:25px;width:25px;border-radius:100%;border:1px solid var(--theme-interactive-link);background:transparent}@media screen and (max-width: 992px){.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:20px!important;height:20px!important}}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkbox-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--configBgTextColor);margin-left:0}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%]{transition:transform .3s ease}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon.exp
1anded[_ngcontent-%COMP%]{transform:rotate(180deg)}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:10px;color:var(--configBgTextColor)}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#ffffffb3;margin:8px 0 16px;padding-left:16px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .info-icon-toggle{margin-left:0!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%]{pointer-events:auto}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container.hidden[_ngcontent-%COMP%], .add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-3-container.hidden[_ngcontent-%COMP%]{pointer-events:none;max-height:0;margin:0;padding:0}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%]{background:var(--configBgColor);border-radius:38px;margin:0 24px}@media (max-width: 992px){.add-edit-single-song-portfolio[_ngcontent-%COMP%] .single-song-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:20px}}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container{padding:0 24px 24px!important;background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content .monetize-card{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect label{color:var(--configBgTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;height:auto!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label{flex-wrap:wrap;color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label .p-multiselect-token{border-color:var(--configPostTextColor)!important;color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger{color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger .p-multiselect-trigger-icon{color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header{background:var(--configSecondaryBgColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container{background:var(--configBgColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container .custom-search-input{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container{c
1olor:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container label{color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper{background:var(--configSecondaryBgColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item{color:var(--configPostTextColor)!important;background:var(--configSecondaryBgColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls{color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls .icon-label{color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn, .add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .btn{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;border-color:var(--configPostTextColor)!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn{height:auto!important}@media screen and (max-width: 992px){.add-edit-single-song-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container{padding:0 0 24px!important}}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;padding:0 24px 24px!important}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container .step-form-content{padding:0 24px 24px!important}@media screen and (max-width: 992px){.add-edit-single-song-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container .step-form-content{padding:0 0 24px!important}}@media (max-width: 992px){.add-edit-single-song-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container{padding:20px!important}}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:10px}@media screen and (max-width: 992px){.add-edit-single-song-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{padding:0 12px 24px;flex-direction:column;align-items:stretch;text-align:center;gap:16px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:100%}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .buttons.justify-content-between[_ngcontent-%COMP%]{flex-direction:column;gap:16px}}@media screen and (max-width: 992px){.add-edit-single-song-portfolio[_ngcontent-%COMP%]{margin-top:45px;margin-left:-15px;margin-right:-15px}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .hdr[_ngcontent-%COMP%]{display:none}.add-edit-single-song-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:block;font-size:20px;margin-bottom:20px;text-align:end}} .theme-whiteLabel .single-song-portfolio-form .methods-of-consumption-section .toggle-checkbox-section .toggle-header .checkbox-label .checkmark{border-color:var(--configThemeColor)!important} .theme-whiteLabel .single-song-portfolio-form .methods-of-consumption-section .toggle-checkbox-section .toggle-header .checkbox-label input[type=checkbox]:checked~.checkmark{background:var(--configThemeColor)!important}@media screen and (max-width: 992px){ .add-edit-single-song-portfolio .both-btn{height:auto!important;padding:8px 14px!important;line-height:normal!important;font-size:12px!important}}"]}),a})();const Ar=["enableToggle"];function Dr(a,m){if(1&a&&t._UZ(0,"app-badge-groups-selection",25),2&a){const n=t.oxw();t.Q6J("parentForm",n.form)("arrayName","badge_groups")("selectedBadgeGroups",n.contentBadgeGroups)("hintMessage",n.CONSTS.BADGE_GROUPS_HINT)("creatorId",null==n.currentUserProfile?null:n.currentUserProfile.gsi4pk)}}const Lr=function(a){return{saving:a}},Fr=function(a){return{"icon-liteicon-black-tick":a}},Nr=function(a){return{type:"button",class:"btn btn-default",label:a}},Rr=function(a,m,n){return{type:"button",class:"btn btn-primary",label:a,disabled:m,loading:n}};let Io=(()=>{const m=class{constructor(e,i,o,s,p){this.router=e,this.route=i,this.apiCallService=o,this.cs=s,this.store=p,this.CONSTS=no,this.PORTFOLIO_TYPE_CONSTS=O.W,this.Application=l.Mx,this.isEditMode=!1,this.portfolioType="",this.portfolioTypeId="",this.form=null,this.enable=!0,this.isPostScheduled=!1,this.adminMarkedDisabled=!1,this.showDescription=!0,this.isIndividual=!0,this.isDspChecked=!1,this.contentPk="",this.contentSk="",this.contentBadgeGroups=[],this.contentCreatedAt=null,this.isSaving=!1,this.currentUserProfile=null,this.STEP_3_DIRECT_DISTRIBUTION_CONSTS=w,this.destroy$=new X.x}
1ngOnInit(){this.routeId=this.route.snapshot.paramMap.get("id")||"",this.portfolioType=O.W.PORTFOLIO_TYPE.CUSTOM,this.portfolioTypeId=this.route.snapshot.queryParamMap.get("portfolioTypeId")||"",this.isEditMode=!!this.routeId,this.isDspChecked=!1,this.initForm(),this.getCurrentUserProfile()}getCurrentUserProfile(){this.store.select(yt.SJ).pipe((0,J.R)(this.destroy$)).subscribe(e=>{e?.user_name&&e?.user_name!==this.currentUserProfile?.user_name&&(this.currentUserProfile=e,this.userId=e.user_name,this.isEditMode&&this.routeId&&this.checkUserOwnershipAndLoadData())})}checkUserOwnershipAndLoadData(){this.isEditMode&&this.routeId&&this.currentUserProfile?.user_name&&(this.userId===this.currentUserProfile.user_name?this.loadContentData():setTimeout(()=>{this.router.navigate([`/${Ot._1.NOT_FOUND}`])},l.Mx.ONE_HUNDRED))}initForm(){this.form=new N.cw({name:new N.NI("",[N.kI.required,N.kI.maxLength(l.Mx.ONE_HUNDRED)]),cover_image:new N.NI("",[N.kI.required]),description:new N.NI("",[N.kI.maxLength(l.Mx.FIVE_HUNDRED)]),release_date:new N.NI(null),release_year:new N.NI(null),release_type_year:new N.NI([]),release_type_date:new N.NI([]),dsp:new N.NI([])})}get pageTitle(){return this.isEditMode?this.CONSTS.EDIT_INDIVIDUAL_ITEM:this.CONSTS.ADD_INDIVIDUAL_ITEM}navigateToBack(){this.router.navigate(["/monetize/portfolio","banner-view",this.portfolioTypeId],{queryParams:{tab:ee.oM.TAB_INDIVIDUAL}})}toggleChanged(e){this.enable=e}get isFormValid(){if(!this.form)return!1;const e=this.form.get("name")?.valid??!1,i=this.form.get("cover_image")?.valid??!1,o=!this.showDescription||(this.form.get("description")?.valid??!1),s=e&&i&&o,p=this.form.get("dsp")?.value||[];return s&&(!this.isDspChecked||p.length>l.Mx.ZERO&&(this.step2Component?.isDspFormValid??!0))}onDspCheckboxChange(e){e.stopPropagation(),this.isDspChecked=e.target.checked,this.isDspChecked||this.resetDspStepData()}resetDspStepData(){this.form?.get("dsp")&&this.form.get("dsp")?.setValue([]),this.step2Component?.dspForm&&this.step2Component.dspForm.reset(),this.step2Component?.multiselectField?.options&&this.step2Component.multiselectField.options.forEach(e=>{void 0!==e.isSelected&&(e.isSelected=!1)})}handleSave(){!this.form||!this.isFormValid||this.isSaving||(this.isSaving=!0,this.buildPayload().then(e=>{if(!e)return this.isSaving=!1,void this.cs.showErrorMessage(this.CONSTS.FAILED_TO_SAVE_CONTENT);this.apiCallService[this.isEditMode&&this.contentPk&&this.contentSk?this.CONSTS.API_METHOD_PUT:this.CONSTS.API_METHOD_POST](U.Y9.portfolioContent,e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{this.isSaving=!1,o.status?(this.cs.showSuccessMessage(o.message||this.CONSTS.CONTENT_SAVED_SUCCESS),this.navigateToBack()):this.cs.showErrorMessage(o.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:o=>{this.isSaving=!1,this.cs.showErrorMessage(o?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}).catch(()=>{this.isSaving=!1,this.cs.showErrorMessage(this.CONSTS.FAILED_TO_SAVE_CONTENT)}))}buildPayload(){return new Promise(e=>{if(!this.form||!this.portfolioTypeId)return void e(null);const i=this.form.value,o=this.isDspChecked?this.buildDspArray(i.dsp||[],this.step2Component?.dspForm?.value||{}):[];e(this.createPayload(i,o))})}createPayload(e,i){const o=(e.release_type_year||[]).includes(Y.vI.RELEASE_TYPE_YEAR),s=(e.release_type_date||[]).includes(Y.vI.RELEASE_TYPE_DATE);let p=null;o&&null!=e.release_year&&""!==e.release_year?p=e.release_year.toString():s&&null!=e.release_date&&(p=(0,Q.YF)(e.release_date));const u={type:this.portfolioType.toUpperCase(),title:e.name||"",cover_image_url:e.cover_image||"",status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,dsp:i,release_date:p,file:"",duration:l.Mx.ZERO,description:e.description||"",badge_groups:(0,Q.IH)(this.form)};return this.isEditMode&&this.contentPk&&this.contentSk?(u.pk=this.contentPk,u.sk=this.contentSk):u.portfolio_sk=this.cs.encodeToUTF(this.portfolioTypeId),u}buildDspArray(e,i){return e&&e.length!==l.Mx.ZERO?e.map(o=>{const s=o.sk||"";return{pk:o.pk||"",sk:s,url:i[`${s}url`]||"",button_label:i[`${s}text`]||""}}):[]}loadContentData(){if(!this.routeId||!this.portfolioType)return;const e=U.$_.getPortfolioContentDetail(this.routeId,this.portfolioType.toUpperCase());this.apiCallService.get(e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:i=>{if(i.status&&i.statusCode===l.Mx.TWO_HUNDRED&&i.data){const o=i.data;this.contentPk=o.pk||"",this.contentSk=o.sk||"",this.contentBadgeGroups=o.badge_groups||[];const s={pk:o.pk||"",sk:o.sk||"",content_title:o.title||o.content_title||"",title:o.title||o.content_title||"",cover_image_url:o.cover_image_url||o.thumbnail||"",thumbnail:o.cover_image_url||o.thumbnail||"",content_desc:o.description||o.content_desc||"",description:o.description||o.content_desc||"",status:o.status||O.W.PORTFOLIO_STATUS.ACTIVE,dsp:o.dsp||[],release_date:o.release_date||null};if(this.form){const p=(0,Q.NH)(s.release_date);let u=null,_=null,h=[],M=[];if(p.type===Y.vI.RELEASE_TYPE_YEAR?(_=p.value,h=[Y.vI.RELEASE_TYPE_YEAR],M=[]):p.type===Y.vI.RELEASE_TYPE_DATE&&(u=(0,Q.Gy)(p.value),h=[],M=[Y.vI.RELEASE_TYPE_DATE]),this.form.patchValue({name:s.content_title||s.title||"",cover_image:s.cover_image_url||s.thumbnail||"",description:s.content_desc||s.description||"",release_date:u||null,release_year:_||null,release_type_year:h,release_type_date:M}),setTimeout(()=>{this.step1Component&&this.step1Component.initializeReleaseType()},100),this.enable=s.status===O.W.PORTFOLIO_STATUS.ACTIVE,s.dsp&&Array.isArray(s.dsp)&&s.dsp.length>l.Mx.ZERO){this.isDspChecked=!0;const I=s.dsp.map(A=>({pk:A.pk||"",sk:A.sk||"",name:A.name||"",logo:A.logo||"",url:A.url||"",button_label:A.button_label||""}));this.form.patchValue({dsp:I}),this.step2Component?.remergeOptions$&&this.step2Component.remergeOptions$.next()}}}else this.cs.showErrorMessage(i.message||this.CONSTS.FAILED_TO_LOAD_CONTENT),this.navigateToBack()},error:i=>{this.cs.showErrorMessage(i?.message||this.CONSTS.FAILED_TO_LOAD_CONTENT),this.navigateToBack()}})}handleCancel(){this.navigateToBack()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(V.F0),t.Y36(V.gz),t.Y36(gt.F),t.Y36($.v),t.Y36(kt.yh))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-add-edit-single-item-portfolio"]],viewQuery:function(i,o){if(1&i&&(t.Gf(Ar,5),t.Gf(te,5),t.Gf(Vt,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.enableToggle=s.first),t.iGM(s=t.CRH())&&(o.step1Component=s.first),t.iGM(s=t.CRH())&&(o.step2Component=s.first)}},decls:31,vars:41,consts:[[1,"inside-container","preference-container","add-edit-single-item-portfolio"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"heading"],[1,"d-flex","align-items-center","gap-3"],[3,"click"],[1,"icon-arrow-back"],[1,"walletform-content","p-0"],[1,"single-item-portfolio-form",3,"ngClass"],[3,"form","portfolioType","isEditMode","isIndividual","showDescription","itemSk","enable","showToggle","disableMessage","enableMessage","itemDeleted","toggleChanged"],[1,"methods-of-consumption-section","mt-4"],[1,"section-title"],[1,"methods-of-consumption-item"],[1,"toggle-checkbox-section"],[1,"toggle-header"],[1,"custom-checkbox","checkbox-label"],["type","checkbox",3,"checked","disabled","change"],[1,"checkmark","checkmark-md","rounded",3,"ngClass"],[1,"checkbox-text"],[1,"chevron-icon","ms-auto",3,"click"],[1,"icon-litechevron_down"],[1,"step-2-container"],[3,"form","portfolioType","isIndividual","isDspChecked","dspModalHeaderLabel"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId",4,"ngIf"],[1,"buttons","mt-4"],[3,"btnField","handleButtonClick"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),t.NdJ("click",function(){return o.navigateToBack()}),t._UZ(5,"em",5),t.qZA(),t.TgZ(6,"h4"),t._uU(7),t.qZA()()(),t.TgZ(8,"div",6)(9,"div",7)(10,"app-step-1-basic-info",8),t.NdJ("itemDeleted",function(){return o.navigateToBack()})("toggleChanged",function(p){return o.toggleChanged(p)})("itemDeleted",function(){return o.navigateToBack()}),t.qZA(),t.TgZ(11,"div",9)(12,"div",10)(13,"h3"),t._uU(14),t.qZA()(),t.TgZ(15,"div",11)(16,"div",12)(17,"div",13)(18,"label",14)(19,"input",15),t.NdJ("change",function(p){return o.onDspCheckboxChange(p)}),t.qZA(),t._UZ(20,"span",16),t.TgZ(21,"span",17),t._uU(22),t.qZA(),t.TgZ(23,"span",18),t.NdJ("click",function(p){return p.stopPropagation()}),t._UZ(24,"em",19),t.qZA()()()(),t.TgZ(25,"div",20),t._UZ(26,"app-step-2-dsp-links",21),t.qZA()()()()(),t.YNc(27,Dr,1,5,"app-badge-groups-selection",22),t.TgZ(28,"div",23)(29,"app-button",24),t.NdJ("handleButtonClick",function(){return o.handleCancel()}),t.qZA(),t.TgZ(30,"app-button",24),t.NdJ("handleButtonClick",function(){return o.handleSave()}),t.qZA()()()()),2&i&&(t.xp6(7),t.Oqu(o.pageTitle),t.xp6(2),t.Q6J("ngClass",t.VKq(31,Lr,o.isSaving)),t.xp6(1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isEditMode",o.isEditMode)("isIndividual",o.isIndividual)("showDescription",o.showDescription)("itemSk",o.routeId)("enable",o.enable)("showToggle",!0)("disableMessage",o.CONSTS.DISABLE)("enableMessage",o.CONSTS.ENABLE),t.xp6(4),t.Oqu(o.CONSTS.OPTIONAL_SALES_CHANNELS),t.xp6(5),t.Q6J("checked",o.isDspChecked)("disabled",o.isSaving),t.xp6(1),t.Q6J("ngClass",t.VKq(33,Fr,o.isDspChecked)),t.xp6(2),t.Oqu(o.CONSTS.SALES_PARTNERS),t.xp6(1),t.ekj("expanded",o.isDspChecked),t.xp6(2),t.Udp("opacity",o.isDspChecked?"1":"0"),t.ekj("hidden",!o.isDspChecked),t.xp6(1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isIndividual",o.isIndividual)("isDspChecked",o.isDspChecked)("dspModalHeaderLabel",o.STEP_3_DIRECT_DISTRIBUTION_CONSTS.CREATE_CUSTOM_PARTNER_LINK),t.xp6(1),t.Q6J("ngIf",null==o.currentUserProfile?null:o.currentUserProfile.gsi4pk),t.xp6(2),t.Q6J("btnField",t.VKq(35,Nr,o.CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.kEZ(37,Rr,o.isEditMode?o.CONSTS.UPDATE_ITEM:o.CONSTS.SAVE_ITEM,!o.isFormValid||o.isSaving,o.isSaving)))},dependencies:[r.mk,r.O5,it.r,At.K,te,Vt],styles:[".add-edit-single-item-portfolio[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .walletform-content[_ngcontent-%COMP%]{margin:0!important;background:transparent!important;box-shadow:none!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:none}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;width:100%;margin-bottom:24px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{cursor:pointer;font-size:20px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ng
1content-%COMP%]{font-size:24px;font-weight:700;line-height:24px;margin:0}@media screen and (max-width: 992px){.add-edit-single-item-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:16px}}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]{font-size:24px;font-weight:500;cursor:pointer}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%]{margin-bottom:24px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.7}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] .custom-checkbox[_ngcontent-%COMP%], .add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{pointer-events:none!important;cursor:not-allowed;opacity:.6}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%], .add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.6}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px;display:flex;flex-direction:column;gap:20px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .methods-of-consumption-item[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important;border-radius:16px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{margin-bottom:20px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;margin-bottom:.5rem}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{font-size:.875rem;color:#ffffffb3;margin-bottom:0}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:var(--configBgColor);color:var(--configBgTextColor);border-radius:12px;transition:all .3s ease}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:20px;cursor:pointer;margin:0;flex:1;position:relative}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;left:0;top:0}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .checkmark[_ngcontent-%COMP%]{background:var(--theme-interactive-link);border-color:var(--theme-interactive-link)}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;height:25px;width:25px;border-radius:100%;border:1px solid var(--theme-interactive-link);background:transparent}@media screen and (max-width: 992px){.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:20px!important;height:20px!important}}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkbox-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--configBgTextColor);margin-left:0}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%]{transition:transform .3s ease}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon.exp
1anded[_ngcontent-%COMP%]{transform:rotate(180deg)}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:10px;color:var(--configBgTextColor)}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#ffffffb3;margin:8px 0 16px;padding-left:16px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .info-icon-toggle{margin-left:0!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%]{pointer-events:auto}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container.hidden[_ngcontent-%COMP%]{pointer-events:none;max-height:0;margin:0;padding:0}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%]{background:var(--configBgColor);border-radius:38px;margin:0 24px}@media (max-width: 992px){.add-edit-single-item-portfolio[_ngcontent-%COMP%] .single-item-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:20px}}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container{padding:0 24px 24px!important;background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content .monetize-card{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect label{color:var(--configBgTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;height:auto!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label{flex-wrap:wrap;color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label .p-multiselect-token{border-color:var(--configPostTextColor)!important;color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger{color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger .p-multiselect-trigger-icon{color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header{background:var(--configSecondaryBgColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container{background:var(--configBgColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container .custom-search-input{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container{c
1olor:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container label{color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper{background:var(--configSecondaryBgColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item{color:var(--configPostTextColor)!important;background:var(--configSecondaryBgColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls{color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls .icon-label{color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn, .add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .btn{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;border-color:var(--configPostTextColor)!important}.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn{height:auto!important}@media screen and (max-width: 992px){.add-edit-single-item-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container{padding:0 0 24px!important}}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:10px}@media screen and (max-width: 992px){.add-edit-single-item-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{padding:0 12px 24px;flex-direction:column;align-items:stretch;text-align:center;gap:16px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:100%}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .buttons.justify-content-between[_ngcontent-%COMP%]{flex-direction:column;gap:16px}}@media screen and (max-width: 992px){.add-edit-single-item-portfolio[_ngcontent-%COMP%]{margin-top:45px;margin-left:-15px;margin-right:-15px}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .hdr[_ngcontent-%COMP%]{display:none}.add-edit-single-item-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:block;font-size:20px;margin-bottom:20px;text-align:end}} .theme-whiteLabel .single-item-portfolio-form .methods-of-consumption-section .toggle-checkbox-section .toggle-header .checkbox-label .checkmark{border-color:var(--configThemeColor)!important} .theme-whiteLabel .single-item-portfolio-form .methods-of-consumption-section .toggle-checkbox-section .toggle-header .checkbox-label input[type=checkbox]:checked~.checkmark{background:var(--configThemeColor)!important}@media screen and (max-width: 992px){ .add-edit-single-item-portfolio .both-btn{height:auto!important;padding:8px 14px!important;line-height:normal!important;font-size:12px!important}}"]}),a})();const Ur={ADD_SINGLE_PODCAST:"Add Single Podcast",EDIT_SINGLE_PODCAST:"Edit Single Podcast",DISABLE:"DISABLE",ENABLE:"ENABLE",CANCEL:"CANCEL",SAVE_PODCAST:"SAVE PODCAST",UPDATE_PODCAST:"UPDATE PODCAST",METHODS_OF_CONSUMPTION:"Distribution Methods",DSP_LINKS:"Digital Service Providers (DSPs)",DIRECT_DISTRIBUTION:"Direct Sales",DIRECT_SALES_INFO_MESSAGE:"Direct Sales allows you to sell your podcast series and single episodes directly to your fans. You can sell as individual purchase or include in one of your subscription plans.",CONTENT_SAVED_SUCCESS:"Podcast saved successfully",FAILED_TO_SAVE_CONTENT:"Failed to save podcast",FAILED_TO_LOAD_CONTENT:"Failed to load podcast",CONTENT_LOADED_SUCCESS:"Podcast loaded successfully",API_METHOD_POST:"post",API_METHOD_PUT:"put",PERMISSION_PENDING:"pending",UNABLE_TO_DETERMINE_DURATION:"Unable to determine audio duration. Please ensure the audio file is valid and try again.",PLEASE_UPLOAD_AUDIO_FILE:"Please upload an audio file",SELECT_INTERESTS:"Select Interests",SELECT_INTERESTS_HINT:"Including interest tags related to your post from the list below or your own custom #tags will help you find new fans who share similar interests.",POST_AS_PREVIEW:"Post Preview of Podcast on My Feed",BADGE_GROUPS_HINT:"If a Group(s) is selected in this list, only users belonging to that Group will see this item."},Zr=["enableToggle"],Vr=["loyaltyOnlyWarningModal"];function Br(a,m){if(1&a&&t._UZ(0,"app-badge-groups-selection",30),2&a){const n=t.oxw();t.Q6J("parentForm",n.form)("arrayName","badge_groups")("selectedBadgeGroups",n.contentBadgeGroups)("hintMessage",n.CONSTS.BADGE_GROUPS_HINT)("creatorId",null==n.currentUserProfile?null:n.currentUserProfile.gsi4pk)}}function Yr(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-loyalty-only-warning-modal",31,32),t.NdJ("proceeded",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyProceed())})("canceled",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyWarningCanceled())}),t.qZA()}}const Hr=function(a){return{saving:a}},Eo=function(a){return{"icon-liteicon-black-tick":a}},Jr=function(a){return{type:"button",class:"btn btn-default",label:a}},Wr=function(a,m,n){return{type:"button",class:"btn btn-primary",label:a,disabled:m,loading:n}};let yo=(()=>{const m=class{constructor(e,i,o,s,p,u){this.router=e,this.route=i,this.apiCallService=o,this.cs=s,this.uploadService=p,this.store=u,this.CONSTS=Ur,this.PORTFOLIO_TYPE_CONSTS=O.W,this.Application=l.Mx,this.isEditMode=!1,this.portfolioType="",this.portfolioTypeId="",this.form=null,this.enable=!0,this.showDescription=!0,this.isIndividual=!0,this.showThumbnail=!1,this.isDspChecked=!1,this.isDirectDistributionChecked=!1,this.contentPk="",this.contentSk="",this.contentBadgeGroups=[],this.isSaving=!1,this.pendingPortfolioPayload=null,this.currentUserProfile=null,this.timestamp=null,this.destroy$=new X.x}
1ngOnInit(){this.routeId=this.route.snapshot.paramMap.get("id")||"",this.portfolioType=O.W.PORTFOLIO_TYPE.PODCAST,this.portfolioTypeId=this.route.snapshot.queryParamMap.get("portfolioTypeId")||"",this.isEditMode=!!this.routeId,this.isDspChecked=!1,this.isDirectDistributionChecked=!1,this.initForm(),this.getCurrentUserProfile()}getCurrentUserProfile(){this.store.select(yt.SJ).pipe((0,J.R)(this.destroy$)).subscribe(e=>{e?.user_name&&e?.user_name!==this.currentUserProfile?.user_name&&(this.currentUserProfile=e,this.userId=e.user_name,this.isEditMode&&this.routeId&&this.checkUserOwnershipAndLoadData())})}checkUserOwnershipAndLoadData(){this.isEditMode&&this.routeId&&this.currentUserProfile?.user_name&&(this.userId===this.currentUserProfile.user_name?this.loadContentData():setTimeout(()=>{this.router.navigate([`/${Ot._1.NOT_FOUND}`])},l.Mx.ONE_HUNDRED))}initForm(){this.form=new N.cw({name:new N.NI("",[N.kI.required,N.kI.maxLength(l.Mx.ONE_HUNDRED)]),cover_image:new N.NI("",[N.kI.required]),description:new N.NI("",[N.kI.maxLength(l.Mx.FIVE_HUNDRED)]),release_date:new N.NI(null),release_year:new N.NI(null),release_type_year:new N.NI([]),release_type_date:new N.NI([]),dsp:new N.NI([]),items:new N.NI([])})}get pageTitle(){return this.isEditMode?this.CONSTS.EDIT_SINGLE_PODCAST:this.CONSTS.ADD_SINGLE_PODCAST}navigateToBack(){this.router.navigate(["/monetize/portfolio","banner-view",this.portfolioTypeId],{queryParams:{tab:ee.oM.TAB_INDIVIDUAL}})}toggleChanged(e){this.enable=e}get isFormValid(){if(!this.form)return!1;const e=this.form.get("name")?.valid??!1,i=this.form.get("cover_image")?.valid??!1,o=!this.showDescription||(this.form.get("description")?.valid??!1),s=e&&i&&o,p=this.form.get("dsp")?.value||[],_=!this.isDspChecked||p.length>l.Mx.ZERO&&(this.step2Component?.isDspFormValid??!0);let h=!0;if(this.isDirectDistributionChecked){const I=this.step3Component?.form?.get(this.step3Component.portfolioConfig?.fileField||"podcast_episode_file")?.value;let A=!0;if(!this.isIndividual){const E=this.step3Component?.form?.get(this.step3Component.portfolioConfig?.nameField||"podcast_episode_name");A=!(!E?.value||!E.value.trim())}if(A&&I){const E=this.step3Component?.validatePostPrice();E&&!E.isValid&&(h=!1)}else h=!1}else h=!0;return s&&_&&h}onDspCheckboxChange(e){e.stopPropagation(),this.isDspChecked=e.target.checked,this.isDspChecked||this.resetDspStepData()}onDirectDistributionCheckboxChange(e){e.stopPropagation(),this.isDirectDistributionChecked=e.target.checked,this.isDirectDistributionChecked?this.step3Component&&(this.step3Component.showAddSongForm=!0):this.resetDirectDistributionStepData()}resetDspStepData(){this.form?.get("dsp")&&this.form.get("dsp")?.setValue([]),this.step2Component?.dspForm&&this.step2Component.dspForm.reset(),this.step2Component?.multiselectField?.options&&this.step2Component.multiselectField.options.forEach(e=>{void 0!==e.isSelected&&(e.isSelected=!1)})}resetDirectDistributionStepData(){this.step3Component&&(this.step3Component.resetForm(),this.step3Component.showAddSongForm=!1,this.step3Component.addedSongs=[],this.step3Component.audiosForUploading=[],this.step3Component.audioSelected=!1,this.step3Component.audioPreview="",this.step3Component.audioFileName="",this.step3Component.thumbnailPreview="",this.step3Component.postPriceComponent&&(this.step3Component.postPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.step3Component.postPriceComponent.addedNFTIds=[],this.step3Component.postPriceComponent.postPriceForm&&this.step3Component.postPriceComponent.postPriceForm.reset(),this.step3Component.postPriceComponent.ppForm&&this.step3Component.postPriceComponent.ppForm.reset(),this.step3Component.postPriceComponent.loyaltyPointsForm&&this.step3Component.postPriceComponent.loyaltyPointsForm.reset(),this.step3Component.postPriceComponent?.currencyConversionData&&(this.step3Component.postPriceComponent.currencyConversionData={adjustedPrices:[]}),this.step3Component.postPriceComponent.subPlanList&&this.step3Component.postPriceComponent.subPlanList.forEach(e
1=>{e.isSelected=!1})),this.step3Component.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]},this.form?.get("items")&&this.form.get("items")?.setValue([]))}submitPortfolioPayload(e){this.apiCallService[this.isEditMode&&this.contentPk&&this.contentSk?this.CONSTS.API_METHOD_PUT:this.CONSTS.API_METHOD_POST](U.Y9.portfolioContent,e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{this.isSaving=!1,o.status?(this.cs.showSuccessMessage(o.message||this.CONSTS.CONTENT_SAVED_SUCCESS),this.navigateToBack()):this.cs.showErrorMessage(o.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:o=>{this.isSaving=!1,this.cs.showErrorMessage(o?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}handleLoyaltyOnlyProceed(){const e=this.pendingPortfolioPayload;this.pendingPortfolioPayload=null,e&&this.submitPortfolioPayload(e)}handleLoyaltyOnlyWarningCanceled(){this.pendingPortfolioPayload=null,this.isSaving=!1}handleSave(){this.form&&this.isFormValid&&!this.isSaving&&(this.isSaving=!0,(this.isDirectDistributionChecked&&this.step3Component?.addedSongs.length===l.Mx.ZERO?this.saveIndividualEpisodeData():Promise.resolve()).then(()=>{this.uploadAudioFilesIfNeeded().then(()=>{this.buildPayloadWithDuration().then(i=>i?this.isDirectDistributionChecked&&0===i.duration?(this.isSaving=!1,void this.cs.showErrorMessage(this.CONSTS.UNABLE_TO_DETERMINE_DURATION)):(0,ht.Ix)((0,ht.si)(i.lock_through))?(this.pendingPortfolioPayload=i,void this.loyaltyOnlyWarningModal?.openModal()):void this.submitPortfolioPayload(i):(this.isSaving=!1,void this.cs.showErrorMessage(this.CONSTS.UNABLE_TO_DETERMINE_DURATION))).catch(()=>{this.isSaving=!1,this.cs.showErrorMessage(this.CONSTS.FAILED_TO_SAVE_CONTENT)})}).catch(i=>{this.isSaving=!1,this.cs.showErrorMessage(i?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)})}).catch(()=>{this.isSaving=!1,this.cs.showErrorMessage(this.CONSTS.FAILED_TO_SAVE_CONTENT)}))}uploadAudioFilesIfNeeded(){var e=this;return new Promise((i,o)=>
1{if(!this.isDirectDistributionChecked||!this.step3Component)return void i();const s=this.step3Component.audiosForUploading||[];if(s.length===l.Mx.ZERO)return void i();let p=l.Mx.ZERO;if(this.step3Component.postPriceComponent?.postPriceForm){const h=this.step3Component.postPriceComponent.postPriceForm.get("free_preview")?.value;p=h?Number(h):l.Mx.ZERO}const u=p>l.Mx.ZERO;s.forEach(h=>{h.metadata&&(h.metadata.free_preview_time=p.toString(),h.metadata.preview_required=u.toString())});const _=s.map(h=>this.uploadService.uploadFile(h));Promise.all(_).then(function(){var h=(0,ke.Z)(function*(M){if(M&&M.length>l.Mx.ZERO&&e.step3Component){const I=M[l.Mx.ZERO]?.data?.Location?e.uploadService.convertS3LocationToCDNUrl(M[l.Mx.ZERO].data.Location):null;if(I){e.step3Component.form.patchValue({[e.step3Component.portfolioConfig?.fileField||"podcast_episode_file"]:I});const E=e.form?.get("items")?.value||[];E.length>l.Mx.ZERO&&(E[l.Mx.ZERO].song_file=I,e.form?.patchValue({items:E})),e.step3Component.addedSongs.length>l.Mx.ZERO&&(e.step3Component.addedSongs[l.Mx.ZERO].song_file=I),yield e.calculateAudioDuration(I,!0)}}e.step3Component.audiosForUploading=[],i()});return function(M){return h.apply(this,arguments)}}()).catch(h=>{o(h)})})}calculateAudioDuration(e,i=!0,o=l.Mx.ZERO){return new Promise(s=>{let p="",u=!1;if(e instanceof File)p=URL.createObjectURL(e),u=!0;else{if("string"!=typeof e||!e)return void s(Number(l.Mx.ZERO));p=e}const _=new Audio;let h=null,M=!1;const I=()=>{u&&p&&URL.revokeObjectURL(p),h&&clearTimeout(h)},A=E=>{M||(M=!0,I(),i&&this.updateDurationInFormAndSongs(E),s(E))};h=setTimeout(()=>{M||(o<l.Mx.ONE?(I(),this.calculateAudioDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO)))},l.Mx.TEN_THOUSAND),_.addEventListener("loadedmetadata",()=>{if(M)return;const E=_.duration;E&&isFinite(E)&&E>l.Mx.ZERO?A(Math.ceil(E)):o<l.Mx.ONE?(I(),this.calculateAudioDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO))},{once:!0}),_.addEventListener("error",()=>{M||(o<l.Mx.ONE?(I(),this.calculateAudioDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO)))},{once:!0}),_.preload=l.Mx.METADATA,_.src=p,_.load()})}updateDurationInFormAndSongs(e){const i=this.form?.get("items")?.value||[];i.length>l.Mx.ZERO&&(i[l.Mx.ZERO].durationInSeconds=e,this.form?.patchValue({items:i})),this.step3Component?.addedSongs.length>l.Mx.ZERO&&(this.step3Component.addedSongs[l.Mx.ZERO].durationInSeconds=e)}saveIndividualEpisodeData(){return new Promise(e=>{if(!this.step3Component||!this.form)return void e();let i=null;if(this.step3Component.postPriceComponent){const E=this.step3Component.postPriceComponent.postPriceObj,z=this.step3Component.postPriceComponent.postPriceForm,et=this.step3Component.postPriceComponent.subPlanList,tt=this.step3Component.postPriceComponent.addedNFTIds;if(E.is_subscription||E.is_ind_purchase||E.is_loyalty_points||E.is_lock_with_nft){if(i={is_subscription:E.is_subscription,is_indivudiual_price:E.is_ind_purchase,is_nft_added:E.is_lock_with_nft,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.step3Component.postPriceComponent.currencyConversionData?.adjustedPrices||[]},E.is_ind_purchase&&(i.indivisualPrice=this.step3Component.postPriceComponent.ppForm?.controls.indPrice?.value||""),E.is_loyalty_points){const K=this.step3Component.postPriceComponent.loyaltyPointsForm?.get("loyalty_points")?.value,pt=Number(K);i.loyalty_points=Number.isFinite(pt)&&pt>0?pt:null}if(E.is_subscription&&et&&et.forEach(K=>{K.isSelected&&i.subscriptions.push({sk:K.sk,pk:K.pk,title:K.name,duration:K.duration,amount:K.price,discount_offer:K.discount_offer})}),E.is_lock_with_nft&&(i.nftIDList=[...tt]),z?.value){let K=[];try{K=this.step3Component.postPriceComponent.getSelectedHashTag()}catch{K=[]}i={...i,form:z.value,tags:K}}}}const o=this.step3Component.form.get("allow_download")?.value||[],s=Array.isArray(o)&&o.length>l.Mx.ZERO&&o.includes(!0),p=this.step3Component.form.get("show_as_post")?.value||[],u=Array.isArray(p)&&p.length>l.Mx.ZERO&&p.includes(!0),_=this.step3Component.form.get("require_authentication")?.value||[],h=Array.isArray(_)&&_.length>l.Mx.ZERO&&_.includes(!0),M={id:Date.now(),song_name:this.form?.get("name")?.value||"",song_file:this.step3Component.form.get(this.step3Component.portfolioConfig?.fileField||"podcast_episode_file")?.value,thumbnail:this.step3Component.form.get("thumbnail")?.value||"",postPriceData:i,audioFileName:this.step3Component.audioFileName,thumbnailPreview:this.step3Component.thumbnailPreview,durationInSeconds:l.Mx.ZERO,require_authentication:h,allow_download:s,show_as_post:u};this.form.patchValue({items:[M]}),this.step3Component.addedSongs=[M],this.step3Component.syncSongsToForm();const A=(this.step3Component.audiosForUploading?.length>l.Mx.ZERO?this.step3Component.audiosForUploading[l.Mx.ZERO]?.file:null)||M.song_file;A?this.calculateAudioDuration(A,!0).then(E=>{M.durationInSeconds=E,this.updateDurationInFormAndSongs(E),e()}):e()})}handleCancel(){this.navigateToBack()}buildPayloadWithDuration(){var e=this;return new Promise(function(){var i=(0,ke.Z)(function*(o){if(!e.form||!e.portfolioTypeId)return void o(null);const s=e.form.value,p=e.isDspChecked?e.buildDspArray(s.dsp||[],e.step2Component?.dspForm?.value||{}):[];let u=null,_=null,h=Number(l.Mx.ZERO),M="",I=Number(l.Mx.ZERO);if(e.isDirectDistributionChecked&&e.step3Component){const E=s.items||[],q=e.step3Component.addedSongs||[];if(u=E.length>l.Mx.ZERO?E[l.Mx.ZERO]:null,q.length>l.Mx.ZERO&&q[l.Mx.ZERO]){const z=q[l.Mx.ZERO];z.durationInSeconds&&z.durationInSeconds>l.Mx.ZERO&&(h=Number(z.durationInSeconds))}u&&(_=e.getPostPriceDataFromComponent(),M=u.song_file||"",h===Number(l.Mx.ZERO)&&(h=Number(u.durationInSeconds)||Number(l.Mx.ZERO)),_?.form?.free_preview&&(I=Number(_.form.free_preview)||Number(l.Mx.ZERO)))}e.isDirectDistributionChecked&&M&&h===Number(l.Mx.ZERO)&&(h=yield e.calculateAudioDuration(M,!1),h>l.Mx.ZERO&&e.updateDurationInFormAndSongs(h)),e.isDirectDistributionChecked&&M&&h===Number(l.Mx.ZERO)?o(null):o(e.createPayload(s,p,_,h,M,I))});return function(o){return i.apply(this,arguments)}}())}createPayload(e,i,o,s,p,u){const _=this.isDirectDistributionChecked?this.buildLockThrough(o):{},h=this.timestamp||(0,Q.e4)(p)||Date.now(),M=e.description||"",I=(e.release_type_year||[]).includes(Y.vI.RELEASE_TYPE_YEAR),A=(e.release_type_date||[]).includes(Y.vI.RELEASE_TYPE_DATE);let E=null;I&&null!=e.release_year&&""!==e.release_year?E=e.release_year.toString():A&&null!=e.release_date&&(E=(0,Q.YF)(e.release_date));let q=!0,z=!1,et=!1;if(this.isDirectDistributionChecked&&this.step3Component?.form){const dt=this.step3Component.form.get("allow_download")?.value||[];q=Array.isArray(dt)&&dt.length>l.Mx.ZERO&&dt.includes(!0);const K=this.step3Component.form.get("show_as_post")?.value||[];z=Array.isArray(K)&&K.length>l.Mx.ZERO&&K.includes(!0);const pt=this.step3Component.form.get("require_authentication")?.value||[];et=Array.isArray(pt)&&pt.length>l.Mx.ZERO&&pt.includes(!0)}const tt={type:this.portfolioType.toUpperCase(),title:e.name||"",cover_image_url:e.cover_image||"",duration:s,lock_through:_,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,free_preview_time:u,dsp:i,require_authentication:et,allow_download:q,release_date:E,show_as_post:z,international_prices:o?.international_prices,badge_groups:(0,Q.IH)(this.form)};return M&&(tt.description=M),this.isDirectDistributionChecked&&p?(tt.file=p,tt.media_id=h):tt.file="",this.isEditMode&&this.contentPk&&this.contentSk?(tt.pk=this.contentPk,tt.sk=this.contentSk):tt.portfolio_sk=this.cs.encodeToUTF(this.portfolioTypeId),tt}getPostPriceDataFromComponent(){if(!this.step3Component||!this.step3Component.postPriceComponent)return null;const e=this.step3Component.postPriceComponent.postPriceObj,o=this.step3Component.postPriceComponent.postPriceForm,s=this.step3Component.postPriceComponent.subPlanList,p=this.step3Component.postPriceComponent.addedNFTIds;if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft))return null;const _=this.step3Component.postPriceComponent.loyaltyPointsForm;let h={is_subscription:e.is_subscription,is_indivudiual_price:e.is_ind_purchase,is_nft_added:e.is_lock_with_nft,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.step3Component.postPriceComponent.currencyConversionData?.adjustedPrices||[]};if(e.is_ind_purchase&&(h.indivisualPrice=this.step3Component.postPriceComponent.ppForm?.controls.indPrice?.value||""),e.is_loyalty_points){const M=_?.get("loyalty_points")?.value,I=Number(M);h.loyalty_points=Number.isFinite(I)&&I>0?I:null}
1if(e.is_subscription&&s&&s.forEach(M=>{M.isSelected&&h.subscriptions.push({sk:M.sk,pk:M.pk,title:M.name,duration:M.duration,amount:M.price,discount_offer:M.discount_offer})}),e.is_lock_with_nft&&(h.nftIDList=[...p]),o?.value){let M=[];try{M=this.step3Component.postPriceComponent.getSelectedHashTag()}catch{M=[]}if(h={...h,form:o.value,tags:M},this.step3Component.postPriceComponent.isDoubleLockingEnable&&o.get("lock")?.value?.lockValue){const I=o.get("lock")?.value?.lockValue;h.outer_subscription=I?.subscription||[],h.outer_nft=I?.NFT||[]}}return h}buildDspArray(e,i){return e&&e.length!==l.Mx.ZERO?e.map(o=>{const s=o.sk||"";return{pk:o.pk||"",sk:s,url:i[`${s}url`]||"",button_label:i[`${s}text`]||""}}):[]}buildLockThrough(e){if(!e)return{individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};const i=e?.loyalty_points;return{individual:{outer_subscription:e.outer_subscription||[],outer_nft:e.outer_nft||[],individual_price:e.indivisualPrice||"",...i&&{loyalty_points:Number(i)}},subscription:e.subscriptions||[],nft:e.nftIDList||[]}}loadContentData(){if(!this.routeId||!this.portfolioType)return;const e=U.$_.getPortfolioContentDetail(this.routeId,this.portfolioType.toUpperCase());this.apiCallService.get(e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:i=>{if(i.status&&i.statusCode===l.Mx.TWO_HUNDRED&&i.data){const o=i.data;this.contentPk=o.pk||"",this.contentSk=o.sk||"",this.contentBadgeGroups=o.badge_groups||[];const s={pk:o.pk||"",sk:o.sk||"",content_title:o.title||o.content_title||"",title:o.title||o.content_title||"",cover_image_url:o.cover_image_url||o.thumbnail||"",thumbnail:o.cover_image_url||o.thumbnail||"",content_desc:o.description||o.content_desc||"",description:o.description||o.content_desc||"",status:o.status||O.W.PORTFOLIO_STATUS.ACTIVE,dsp:o.dsp||[],file:o.file||o.media_url||"",media_url:o.file||o.media_url||"",duration:o.duration||l.Mx.ZERO,lock_through:o.lock_through||null,free_preview_time:o.free_preview_time||l.Mx.ZERO,require_authentication:o.require_authentication||!1,allow_download:o.allow_download||!1,release_date:o.release_date||null,show_as_post:o.show_as_post||!1,international_prices:o?.international_prices||[]};if(this.form){const p=(0,Q.NH)(s.release_date);let u=null,_=null,h=[],M=[];if(p.type===Y.vI.RELEASE_TYPE_YEAR?(_=p.value,h=[Y.vI.RELEASE_TYPE_YEAR],M=[]):p.type===Y.vI.RELEASE_TYPE_DATE&&(u=(0,Q.Gy)(p.value),h=[],M=[Y.vI.RELEASE_TYPE_DATE]),this.form.patchValue({name:s.content_title||s.title||"",cover_image:s.cover_image_url||s.thumbnail||"",description:s.content_desc||s.description||"",release_date:u||null,release_year:_||null,release_type_year:h,release_type_date:M}),setTimeout(()=>{this.step1Component&&this.step1Component.initializeReleaseType()},100),this.enable=s.status===O.W.PORTFOLIO_STATUS.ACTIVE,s.dsp&&Array.isArray(s.dsp)&&s.dsp.length>l.Mx.ZERO){this.isDspChecked=!0;const I=s.dsp.map(A=>({pk:A.pk||"",sk:A.sk||"",name:A.name||"",logo:A.logo||"",url:A.url||"",button_label:A.button_label||""}));this.form.patchValue({dsp:I}),this.step2Component?.remergeOptions$&&this.step2Component.remergeOptions$.next()}(s.file||s.media_url)&&(this.isDirectDistributionChecked=!0,this.timestamp=(0,Q.e4)(s.file||s.media_url),this.loadDirectDistributionData(s))}}else this.cs.showErrorMessage(i.message||this.CONSTS.FAILED_TO_LOAD_CONTENT),this.navigateToBack()},error:i=>{this.cs.showErrorMessage(i?.message||this.CONSTS.FAILED_TO_LOAD_CONTENT),this.navigateToBack()}})}loadDirectDistributionData(e){setTimeout(()=>{if(this.step3Component){this.step3Component.showAddSongForm=!0;const i=this.buildPostPriceDataFromLockThrough(e.lock_through,e.free_preview_time||l.Mx.ZERO,e?.international_prices),o=void 0!==e.allow_download&&e.allow_download,s=void 0!==e.show_as_post&&e.show_as_post,p=void 0!==e.require_authentication&&e.require_authentication,u={id:Date.now(),song_name:e.content_title||e.title||"",song_file:e.file||e.media_url||"",thumbnail:e.cover_image_url||"",thumbnailPreview:e.cover_image_url||"",durationInSeconds:e.duration||l.Mx.ZERO,sk:e.sk||"",pk:e.pk||"",postPriceData:i,audioFileName:"",require_authentication:p,allow_download:o,show_as_post:s};this.step3Component.form&&this.step3Component.form.patchValue({[this.step3Component.portfolioConfig?.fileField||"podcast_episode_file"]:u.song_file,thumbnail:u.thumbnail,require_authentication:p?[!0]:[],allow_download:o?[!0]:[],show_as_post:s?[!0]:[]}),u.song_file&&(this.step3Component.audioSelected=!0,this.step3Component.audioPreview=u.song_file,this.step3Component.audioFileName=O.W.AUDIO_FILE,this.timestamp=(0,Q.e4)(u.song_file),this.step3Component&&(this.step3Component.timestamp=this.timestamp)),u.thumbnail&&(this.step3Component.thumbnailPreview=u.thumbnailPreview||u.thumbnail),this.step3Component.addedSongs=[u],this.step3Component.syncSongsToForm(),this.form.patchValue({items:[u]}),i&&this.step3Component.postPriceComponent&&setTimeout(()=>{this.loadPostPriceDataIntoComponent(i)},300),setTimeout(()=>{this.step1Component&&this.step1Component.initializeReleaseType()},150)}},100)}
1buildPostPriceDataFromLockThrough(e,i=l.Mx.ZERO,o=[]){if(!e)return{is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:[],form:{free_preview:i||l.Mx.ZERO}};const s={is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:[],form:{free_preview:i||l.Mx.ZERO}};if(e.individual){e.individual.individual_price&&""!==e.individual.individual_price.trim()&&(s.is_indivudiual_price=!0,s.indivisualPrice=e.individual.individual_price);const p=(0,ht.pL)(e.individual.loyalty_points);p&&(s.loyalty_points=p),s.outer_subscription=e.individual.outer_subscription||[],s.outer_nft=e.individual.outer_nft||[]}return e.subscription&&Array.isArray(e.subscription)&&e.subscription.length>l.Mx.ZERO&&(s.is_subscription=!0,s.subscriptions=e.subscription),e.nft&&Array.isArray(e.nft)&&e.nft.length>l.Mx.ZERO&&(s.is_nft_added=!0,s.nftIDList=e.nft),o?.length&&(s.international_prices=o),s}loadPostPriceDataIntoComponent(e){if(!this.step3Component||!this.step3Component.postPriceComponent||!e)return;const i=null!=e.loyalty_points&&e.loyalty_points>0;if(!(e.is_subscription||e.is_indivudiual_price||e.is_nft_added||i))return;if(this.step3Component.postPriceComponent.postPriceObj={is_subscription:e.is_subscription||!1,is_ind_purchase:e.is_indivudiual_price||!1,is_loyalty_points:i,is_lock_with_nft:e.is_nft_added||!1,selected_subscription:[],individual_price:e.indivisualPrice||"",revenue_split:"",international_prices:e?.international_prices||[]},e.is_subscription&&e.subscriptions){const p=setInterval(()=>{this.step3Component?.postPriceComponent?.subPlanList&&this.step3Component.postPriceComponent.subPlanList.length>l.Mx.ZERO&&(clearInterval(p),e.subscriptions.forEach(u=>{const _=this.step3Component.postPriceComponent.subPlanList.find(h=>h.sk===u.sk);_&&(_.isSelected=!0)}))},50);setTimeout(()=>clearInterval(p),3e3)}e.is_indivudiual_price&&e.indivisualPrice&&this.step3Component.postPriceComponent.ppForm&&this.step3Component.postPriceComponent.ppForm.patchValue({indPrice:e.indivisualPrice}),i&&this.step3Component.postPriceComponent.loyaltyPointsForm&&(this.step3Component.postPriceComponent.loyaltyPointsForm.patchValue({loyalty_points:e.loyalty_points}),this.step3Component.postPriceComponent.onLoyaltyPointsToggle()),e.is_nft_added&&e.nftIDList&&(this.step3Component.postPriceComponent.addedNFTIds=[...e.nftIDList]),e.form&&this.step3Component.postPriceComponent.postPriceForm&&this.step3Component.postPriceComponent.postPriceForm.patchValue(e.form);let s=null;(e?.outer_subscription?.length||e?.outer_nft?.length)&&(s={is_individual_price:!0,is_subscription:!!(e.outer_subscription&&e.outer_subscription.length>0),is_nft:!!(e.outer_nft&&e.outer_nft.length>0),subscription:e.outer_subscription||[],NFT:e.outer_nft||[]}),this.step3Component&&(this.step3Component.postPriceFilledData={...this.step3Component.postPriceFilledData,showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:e.is_subscription||!1,is_indivudiual_price:e.is_indivudiual_price||!1,is_nft_added:e.is_nft_added||!1,indivisualPrice:e.indivisualPrice||"",loyalty_points:e.loyalty_points??null,subscriptions:e.subscriptions||[],nftIDList:e.nftIDList||[],form:e.form||null,lockDetails:s,collaborators:[],international_prices:e?.international_prices},this.step3Component.postPriceComponent.currencyConversionData={adjustedPrices:e?.international_prices})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(V.F0),t.Y36(V.gz),t.Y36(gt.F),t.Y36($.v),t.Y36(bt.C),t.Y36(kt.yh))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-add-edit-individual-podcast"]],viewQuery:function(i,o){if(1&i&&(t.Gf(Zr,5),t.Gf(Vr,5),t.Gf(te,5),t.Gf(Vt,5),t.Gf(Se,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.enableToggle=s.first),t.iGM(s=t.CRH())&&(o.loyaltyOnlyWarningModal=s.first),t.iGM(s=t.CRH())&&(o.step1Component=s.first),t.iGM(s=t.CRH())&&(o.step2Component=s.first),t.iGM(s=t.CRH())&&(o.step3Component=s.first)}},decls:46,vars:63,consts:[[1,"inside-container","preference-container","add-edit-single-podcast-portfolio"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"heading"],[1,"d-flex","align-items-center","gap-3"],[3,"click"],[1,"icon-arrow-back"],[1,"walletform-content","p-0"],[1,"single-podcast-portfolio-form",3,"ngClass"],[3,"form","portfolioType","isEditMode","isIndividual","showDescription","itemSk","enable","showToggle","disableMessage","enableMessage","itemDeleted","toggleChanged"],[1,"methods-of-consumption-section","mt-4"],[1,"section-title"],[1,"methods-of-consumption-item"],[1,"toggle-checkbox-section"],[1,"toggle-header"],[1,"custom-checkbox","checkbox-label"],["type","checkbox",3,"checked","disabled","change"],[1,"checkmark","checkmark-md","rounded",3,"ngClass"],[1,"checkbox-text"],[1,"chevron-icon","ms-auto",3,"click"],[1,"icon-litechevron_down"],[1,"step-2-container"],[3,"form","portfolioType","isIndividual","isDspChecked"],[1,"d-flex","align-items-center","gap-2"],[3,"message","infoIconSize"],[1,"step-3-container"],[3,"form","isEditMode","isIndividual","showThumbnail","isDirectDistributionChecked","userProfile","portfolioType","isUploadingAudio"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId",4,"ngIf"],[1,"buttons","mt-4"],[3,"btnField","handleButtonClick"],[3,"proceeded","canceled",4,"ngIf"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId"],[3,"proceeded","canceled"],["loyaltyOnlyWarningModal",""]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),t.NdJ("click",function(){return o.navigateToBack()}),t._UZ(5,"em",5),t.qZA(),t.TgZ(6,"h4"),t._uU(7),t.qZA()()(),t.TgZ(8,"div",6)(9,"div",7)(10,"app-step-1-basic-info",8),t.NdJ("itemDeleted",function(){return o.navigateToBack()})("toggleChanged",function(p){return o.toggleChanged(p)}),t.qZA(),t.TgZ(11,"div",9)(12,"div",10)(13,"h3"),t._uU(14),t.qZA()(),t.TgZ(15,"div",11)(16,"div",12)(17,"div",13)(18,"label",14)(19,"input",15),t.NdJ("change",function(p){return o.onDspCheckboxChange(p)}),t.qZA(),t._UZ(20,"span",16),t.TgZ(21,"span",17),t._uU(22),t.qZA(),t.TgZ(23,"span",18),t.NdJ("click",function(p){return p.stopPropagation()}),t._UZ(24,"em",19),t.qZA()()()(),t.TgZ(25,"div",20),t._UZ(26,"app-step-2-dsp-links",21),t.qZA()(),t.TgZ(27,"div",11)(28,"div",12)(29,"div",13)(30,"label",14)(31,"input",15),t.NdJ("change",function(p){return o.onDirectDistributionCheckboxChange(p)}),t.qZA(),t._UZ(32,"span",16),t.TgZ(33,"div",22)(34,"span",17),t._uU(35),t.qZA(),t._UZ(36,"app-info-icon",23),t.qZA(),t.TgZ(37,"span",18),t.NdJ("click",function(p){return p.stopPropagation()}),t._UZ(38,"em",19),t.qZA()()()(),t.TgZ(39,"div",24),t._UZ(40,"app-step-3-music",25),t.qZA()()()()(),t.YNc(41,Br,1,5,"app-badge-groups-selection",26),t.TgZ(42,"div",27)(43,"app-button",28),t.NdJ("handleButtonClick",function(){return o.handleCancel()}),t.qZA(),t.TgZ(44,"app-button",28),t.NdJ("handleButtonClick",function(){return o.handleSave()}),t.qZA()()()(),t.YNc(45,Yr,2,0,"app-loyalty-only-warning-modal",29)),2&i&&(t.xp6(7),t.Oqu(o.pageTitle),t.xp6(2),t.Q6J("ngClass",t.VKq(51,Hr,o.isSaving)),t.xp6(1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isEditMode",o.isEditMode)("isIndividual",o.isIndividual)("showDescription",o.showDescription)("itemSk",o.routeId)("enable",o.enable)("showToggle",!0)("disableMessage",o.CONSTS.DISABLE)("enableMessage",o.CONSTS.ENABLE),t.xp6(4),t.Oqu(o.CONSTS.METHODS_OF_CONSUMPTION),t.xp6(5),t.Q6J("checked",o.isDspChecked)("disabled",o.isSaving),t.xp6(1),t.Q6J("ngClass",t.VKq(53,Eo,o.isDspChecked)),t.xp6(2),t.Oqu(o.CONSTS.DSP_LINKS),t.xp6(1),t.ekj("expanded",o.isDspChecked),t.xp6(2),t.Udp("opacity",o.isDspChecked?"1":"0"),t.ekj("hidden",!o.isDspChecked),t.xp6(1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isIndividual",o.isIndividual)("isDspChecked",o.isDspChecked),t.xp6(5),t.Q6J("checked",o.isDirectDistributionChecked)("disabled",o.isSaving),t.xp6(1),t.Q6J("ngClass",t.VKq(55,Eo,o.isDirectDistributionChecked)),t.xp6(3),t.Oqu(o.CONSTS.DIRECT_DISTRIBUTION),t.xp6(1),t.Q6J("message",o.CONSTS.DIRECT_SALES_INFO_MESSAGE)("infoIconSize",18),t.xp6(1),t.ekj("expanded",o.isDirectDistributionChecked),t.xp6(2),t.Udp("opacity",o.isDirectDistributionChecked?"1":"0"),t.ekj("hidden",!o.isDirectDistributionChecked),t.xp6(1),t.Q6J("form",o.form)("isEditMode",o.isEditMode)("isIndividual",o.isIndividual)("showThumbnail",o.showThumbnail)("isDirectDistributionChecked",o.isDirectDistributionChecked)("userProfile",o.currentUserProfile)("portfolioType",o.portfolioType)("isUploadingAudio",o.isSaving),t.xp6(1),t.Q6J("ngIf",null==o.currentUserProfile?null:o.currentUserProfile.gsi4pk),t.xp6(2),t.Q6J("btnField",t.VKq(57,Jr,o.CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.kEZ(59,Wr,o.isEditMode?o.CONSTS.UPDATE_PODCAST:o.CONSTS.SAVE_PODCAST,!o.isFormValid||o.isSaving,o.isSaving)),t.xp6(1),t.Q6J("ngIf",o.cs.isBrowser))},dependencies:[r.mk,r.O5,Xt.e,it.r,ye.LoyaltyOnlyWarningModalComponent,At.K,te,Vt,Se],styles:[".add-edit-single-podcast-portfolio[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .walletform-content[_ngcontent-%COMP%]{margin:0!important;background:transparent!important;box-shadow:none!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .icon-liteicon-black-tick[_ngcontent-%COMP%]{font-size:14px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:none}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .preview-as-post-interests-section[_ngcontent-%COMP%]{padding-left:20px;padding-right:50px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;width:100%;margin-bottom:24px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{cursor:pointer;font-size:20px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ng
1content-%COMP%]{font-size:24px;font-weight:700;line-height:24px;margin:0}@media screen and (max-width: 992px){.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:16px}}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]{font-size:24px;font-weight:500;cursor:pointer}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%]{margin-bottom:24px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.7}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] .custom-checkbox[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{pointer-events:none!important;cursor:not-allowed;opacity:.6}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.6}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%] .pricing-options-section, .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%] .pricing-options-section, .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%] .pricing-options-section{pointer-events:none!important;opacity:.6}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%] .pricing-options-section .modal-content, .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%] .pricing-options-section .modal-content, .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%] .pricing-options-section .modal-content{pointer-events:none!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px;display:flex;flex-direction:column;gap:20px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .methods-of-consumption-item[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important;border-radius:16px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{margin-bottom:20px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;margin-bottom:.5rem}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{font-size:.875rem;color:#ffffffb3;margin-bottom:0}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:var(--configBgColor);color:var(--configBgTextColor);border-radius:12px;transition:all .3s ease}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:20px;cursor:pointer;margin:0;flex:1;position:relative}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;left:0;top:0}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .checkmark[_ngcontent-%COMP%]{background:var(--theme-interactive-link);border-color:var(--theme-interactive-link)}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;height:25px;width:25px;border-radius:100%;border:1px solid var(--theme-interactive-link);background:transparent}@media screen and (max-width: 992px){.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:20px!important;height:20px!important}}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkbox-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--configBgTextColor);margin-left:0}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%]{transition:transform .3s ease}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon.exp
1anded[_ngcontent-%COMP%]{transform:rotate(180deg)}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:10px;color:var(--configBgTextColor)}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#ffffffb3;margin:8px 0 16px;padding-left:16px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .info-icon-toggle{margin-left:0!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%]{pointer-events:auto}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container.hidden[_ngcontent-%COMP%], .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-3-container.hidden[_ngcontent-%COMP%]{pointer-events:none;max-height:0;margin:0;padding:0}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%]{background:var(--configBgColor);border-radius:38px;margin:0 24px}@media screen and (max-width: 992px){.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .single-podcast-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:24px 12px 12px}}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container{padding:0 24px 24px!important;background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content .monetize-card{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content app-dynamic-form-builder .form-group .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content app-dynamic-form-builder .form-group .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content app-dynamic-form-builder .form-group label{color:var(--configBgTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect label{color:var(--configBgTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;height:auto!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label{flex-wrap:wrap;color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label .p-multiselect-token{border-color:var(--configPostTextColor)!important;color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger{color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger .p-multiselect-trigger-icon{color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header{background:var(--configSecondaryBgColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container{background:var(--configBgColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container .custom-search-input{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container{c
1olor:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container label{color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper{background:var(--configSecondaryBgColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item{color:var(--configPostTextColor)!important;background:var(--configSecondaryBgColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls{color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls .icon-label{color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn, .add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .btn{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;border-color:var(--configPostTextColor)!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn{height:auto!important}@media screen and (max-width: 992px){.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container{padding:0 0 24px!important}}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;padding:0 24px 24px!important}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container .step-form-content{padding:0 24px 24px!important}@media screen and (max-width: 992px){.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container .step-form-content{padding:0 0 24px!important}}@media screen and (max-width: 992px){.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container{padding:20px!important}}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:10px}@media screen and (max-width: 992px){.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{padding:0 12px 24px;flex-direction:column;align-items:stretch;text-align:center;gap:16px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:100%}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .buttons.justify-content-between[_ngcontent-%COMP%]{flex-direction:column;gap:16px}}@media screen and (max-width: 992px){.add-edit-single-podcast-portfolio[_ngcontent-%COMP%]{margin-top:45px;margin-left:-15px;margin-right:-15px}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .hdr[_ngcontent-%COMP%]{display:none}.add-edit-single-podcast-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:block;font-size:20px;margin-bottom:20px;text-align:end}} .theme-whiteLabel .single-podcast-portfolio-form .methods-of-consumption-section .onboarding-validInfo.block-hint .dropdown-menu p{color:var(--configPostTextColor)!important} .theme-whiteLabel .single-podcast-portfolio-form .methods-of-consumption-section .toggle-checkbox-section .toggle-header .checkbox-label .checkmark{border-color:var(--configThemeColor)!important} .theme-whiteLabel .single-podcast-portfolio-form .methods-of-consumption-section .toggle-checkbox-section .toggle-header .checkbox-label input[type=checkbox]:checked~.checkmark{background:var(--configThemeColor)!important}@media screen and (max-width: 992px){ .add-edit-single-podcast-portfolio .both-btn{height:auto!important;padding:8px 14px!important;line-height:normal!important;font-size:12px!important}}"]}),a})();const Qr={ADD_SINGLE_VIDEO:"Add Single Video",EDIT_SINGLE_VIDEO:"Edit Single Video",DISABLE:"DISABLE",ENABLE:"ENABLE",CANCEL:"CANCEL",SAVE_VIDEO:"SAVE VIDEO",UPDATE_VIDEO:"UPDATE VIDEO",METHODS_OF_CONSUMPTION:"Distribution Methods",DSP_LINKS:"Digital Service Providers (DSPs)",DIRECT_DISTRIBUTION:"Direct Sales",DIRECT_SALES_INFO_MESSAGE:"Direct Sales allows you to sell your videos directly to your fans. You can sell as individual purchase or include in one of your subscription plans.",CONTENT_SAVED_SUCCESS:"Video saved successfully",FAILED_TO_SAVE_CONTENT:"Failed to save video",FAILED_TO_LOAD_CONTENT:"Failed to load video",CONTENT_LOADED_SUCCESS:"Video loaded successfully",API_METHOD_POST:"post",API_METHOD_PUT:"put",PERMISSION_PENDING:"pending",UNABLE_TO_DETERMINE_DURATION:"Unable to determine video duration. Please ensure the video file is valid and try again.",PLEASE_UPLOAD_VIDEO_FILE:"Please upload a video file",SELECT_INTERESTS:"Select Interests",SELECT_INTERESTS_HINT:"Including interest tags related to your post from the list below or your own custom #tags will help you find new fans who share similar interests.",POST_AS_PREVIEW:"Post Preview of Video on My Feed",BADGE_GROUPS_HINT:"If a Group(s) is selected in this list, only users belonging to that Group will see this item."},qr=["enableToggle"],Gr=["loyaltyOnlyWarningModal"];function zr(a,m){if(1&a&&t._UZ(0,"app-badge-groups-selection",30),2&a){const n=t.oxw();t.Q6J("parentForm",n.form)("arrayName","badge_groups")("selectedBadgeGroups",n.contentBadgeGroups)("hintMessage",n.CONSTS.BADGE_GROUPS_HINT)("creatorId",null==n.currentUserProfile?null:n.currentUserProfile.gsi4pk)}}function Kr(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"app-loyalty-only-warning-modal",31,32),t.NdJ("proceeded",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyProceed())})("canceled",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.handleLoyaltyOnlyWarningCanceled())}),t.qZA()}}const jr=function(a){return{saving:a}},ko=function(a){return{"icon-liteicon-black-tick":a}},$r=function(a){return{type:"button",class:"btn btn-default",label:a}},Xr=function(a,m,n){return{type:"button",class:"btn btn-primary",label:a,disabled:m,loading:n}};let wo=(()=>{const m=class{constructor(e,i,o,s,p,u){this.router=e,this.route=i,this.apiCallService=o,this.cs=s,this.uploadService=p,this.store=u,this.CONSTS=Qr,this.PORTFOLIO_TYPE_CONSTS=O.W,this.Application=l.Mx,this.isEditMode=!1,this.portfolioType="",this.portfolioTypeId="",this.form=null,this.enable=!0,this.showDescription=!0,this.isIndividual=!0,this.showThumbnail=!1,this.isDspChecked=!1,this.isDirectDistributionChecked=!1,this.contentPk="",this.contentSk="",this.contentBadgeGroups=[],this.isSaving=!1,this.pendingPortfolioPayload=null,this.currentUserProfile=null,this.timestamp=null,this.destroy$=new X.x}
1ngOnInit(){this.routeId=this.route.snapshot.paramMap.get("id")||"",this.portfolioType=O.W.PORTFOLIO_TYPE.VIDEO,this.portfolioTypeId=this.route.snapshot.queryParamMap.get("portfolioTypeId")||"",this.isEditMode=!!this.routeId,this.isDspChecked=!1,this.isDirectDistributionChecked=!1,this.initForm(),this.getCurrentUserProfile()}getCurrentUserProfile(){this.store.select(yt.SJ).pipe((0,J.R)(this.destroy$)).subscribe(e=>{e?.user_name&&e?.user_name!==this.currentUserProfile?.user_name&&(this.currentUserProfile=e,this.userId=e.user_name,this.isEditMode&&this.routeId&&this.checkUserOwnershipAndLoadData())})}checkUserOwnershipAndLoadData(){this.isEditMode&&this.routeId&&this.currentUserProfile?.user_name&&(this.userId===this.currentUserProfile.user_name?this.loadContentData():setTimeout(()=>{this.router.navigate([`/${Ot._1.NOT_FOUND}`])},l.Mx.ONE_HUNDRED))}initForm(){this.form=new N.cw({name:new N.NI("",[N.kI.required,N.kI.maxLength(l.Mx.ONE_HUNDRED)]),cover_image:new N.NI("",[N.kI.required]),description:new N.NI("",[N.kI.maxLength(l.Mx.FIVE_HUNDRED)]),release_date:new N.NI(null),release_year:new N.NI(null),release_type_year:new N.NI([]),release_type_date:new N.NI([]),dsp:new N.NI([]),items:new N.NI([])})}get pageTitle(){return this.isEditMode?this.CONSTS.EDIT_SINGLE_VIDEO:this.CONSTS.ADD_SINGLE_VIDEO}navigateToBack(){this.router.navigate(["/monetize/portfolio","banner-view",this.portfolioTypeId],{queryParams:{tab:ee.oM.TAB_INDIVIDUAL}})}toggleChanged(e){this.enable=e}get isFormValid(){if(!this.form)return!1;const e=this.form.get("name")?.valid??!1,i=this.form.get("cover_image")?.valid??!1,o=!this.showDescription||(this.form.get("description")?.valid??!1),s=e&&i&&o,p=this.form.get("dsp")?.value||[],_=!this.isDspChecked||p.length>l.Mx.ZERO&&(this.step2Component?.isDspFormValid??!0);let h=!0;if(this.isDirectDistributionChecked){const I=this.step3Component?.form?.get(this.step3Component.portfolioConfig?.fileField||"video_file")?.value;let A=!0;if(!this.isIndividual){const E=this.step3Component?.form?.get(this.step3Component.portfolioConfig?.nameField||"video_name");A=!(!E?.value||!E.value.trim())}if(A&&I){const E=this.step3Component?.validatePostPrice();E&&!E.isValid&&(h=!1)}else h=!1}else h=!0;return s&&_&&h}onDspCheckboxChange(e){e.stopPropagation(),this.isDspChecked=e.target.checked,this.isDspChecked||this.resetDspStepData()}onDirectDistributionCheckboxChange(e){e.stopPropagation(),this.isDirectDistributionChecked=e.target.checked,this.isDirectDistributionChecked?this.step3Component&&(this.step3Component.showAddVideoForm=!0):this.resetDirectDistributionStepData()}resetDspStepData(){this.form?.get("dsp")&&this.form.get("dsp")?.setValue([]),this.step2Component?.dspForm&&this.step2Component.dspForm.reset(),this.step2Component?.multiselectField?.options&&this.step2Component.multiselectField.options.forEach(e=>{void 0!==e.isSelected&&(e.isSelected=!1)})}resetDirectDistributionStepData(){this.step3Component&&(this.isSaving=!1,this.step3Component.resetForm(),this.step3Component.showAddVideoForm=!1,this.step3Component.addedVideos=[],this.step3Component.videosForUploading=[],this.step3Component.videoSelected=!1,this.step3Component.videoPreview="",this.step3Component.videoFileName="",this.step3Component.thumbnailPreview="",this.step3Component.postPriceComponent&&(this.step3Component.postPriceComponent.postPriceObj={is_subscription:!1,is_ind_purchase:!1,is_loyalty_points:!1,is_lock_with_nft:!1,selected_subscription:[],individual_price:"",revenue_split:"",international_prices:[]},this.step3Component.postPriceComponent.addedNFTIds=[],this.step3Component.postPriceComponent.postPriceForm&&this.step3Component.postPriceComponent.postPriceForm.reset(),this.step3Component.postPriceComponent.ppForm&&this.step3Component.postPriceComponent.ppForm.reset(),this.step3Component.postPriceComponent.loyaltyPointsForm&&this.step3Component.postPriceComponent.loyaltyPointsForm.reset(),this.step3Component.postPriceComponent?.currencyConversionData&&(this.step3Component.postPriceComponent.currencyConversionData={adjustedPrices:[]}),this.step3Component.postPriceComponent.subPlanList&&this.step3Component.postPriceComponent.subPlanList.forEach(e
1=>{e.isSelected=!1})),this.step3Component.postPriceFilledData={showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,loyalty_points:null,international_prices:[]},this.form?.get("items")&&this.form.get("items")?.setValue([]))}submitPortfolioPayload(e){this.apiCallService[this.isEditMode&&this.contentPk&&this.contentSk?this.CONSTS.API_METHOD_PUT:this.CONSTS.API_METHOD_POST](U.Y9.portfolioContent,e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:o=>{this.isSaving=!1,o.status?(this.cs.showSuccessMessage(o.message||this.CONSTS.CONTENT_SAVED_SUCCESS),this.navigateToBack()):this.cs.showErrorMessage(o.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)},error:o=>{this.isSaving=!1,this.cs.showErrorMessage(o?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)}})}handleLoyaltyOnlyProceed(){const e=this.pendingPortfolioPayload;this.pendingPortfolioPayload=null,e&&this.submitPortfolioPayload(e)}handleLoyaltyOnlyWarningCanceled(){this.pendingPortfolioPayload=null,this.isSaving=!1}handleSave(){this.form&&this.isFormValid&&!this.isSaving&&(this.isSaving=!0,(this.isDirectDistributionChecked&&this.step3Component?.addedVideos.length===l.Mx.ZERO?this.saveIndividualVideoData():Promise.resolve()).then(()=>{this.uploadVideoFilesIfNeeded().then(()=>{this.buildPayloadWithDuration().then(i=>i?this.isDirectDistributionChecked&&0===i.duration?(this.isSaving=!1,void this.cs.showErrorMessage(this.CONSTS.UNABLE_TO_DETERMINE_DURATION)):(0,ht.Ix)((0,ht.si)(i.lock_through))?(this.pendingPortfolioPayload=i,void this.loyaltyOnlyWarningModal?.openModal()):void this.submitPortfolioPayload(i):(this.isSaving=!1,void this.cs.showErrorMessage(this.CONSTS.UNABLE_TO_DETERMINE_DURATION))).catch(()=>{this.isSaving=!1,this.cs.showErrorMessage(this.CONSTS.FAILED_TO_SAVE_CONTENT)})}).catch(i=>{this.isSaving=!1,this.cs.showErrorMessage(i?.message||this.CONSTS.FAILED_TO_SAVE_CONTENT)})}).catch(()=>{this.isSaving=!1,this.cs.showErrorMessage(this.CONSTS.FAILED_TO_SAVE_CONTENT)}))}uploadVideoFilesIfNeeded(){var e=this;return new Promise((i,o)=>
1{if(!this.isDirectDistributionChecked||!this.step3Component)return void i();const s=this.step3Component.videosForUploading||[];if(s.length===l.Mx.ZERO)return void i();let p=l.Mx.ZERO;if(this.step3Component.postPriceComponent?.postPriceForm){const h=this.step3Component.postPriceComponent.postPriceForm.get("free_preview")?.value;p=h?Number(h):l.Mx.ZERO}const u=p>l.Mx.ZERO;s.forEach(h=>{h.metadata&&(h.metadata.free_preview_time=p.toString(),h.metadata.preview_required=u.toString())});const _=s.map(h=>this.uploadService.uploadFiles(h,!0));_.length>l.Mx.ZERO?_[l.Mx.ZERO].promise().then(function(){var M=(0,ke.Z)(function*(I){if(I&&I.data&&e.step3Component){const A=I.data.Location?e.uploadService.convertS3LocationToCDNUrl(I.data.Location):null;if(A){e.step3Component.form.patchValue({[e.step3Component.portfolioConfig?.fileField||"video_file"]:A});const q=e.form?.get("items")?.value||[];q.length>l.Mx.ZERO&&(q[l.Mx.ZERO].video_file=A,e.form?.patchValue({items:q})),e.step3Component.addedVideos.length>l.Mx.ZERO&&(e.step3Component.addedVideos[l.Mx.ZERO].video_file=A),yield e.calculateVideoDuration(A,!0)}}e.step3Component.videosForUploading=[],i()});return function(I){return M.apply(this,arguments)}}()).catch(M=>{o(M)}):i()})}calculateVideoDuration(e,i=!0,o=l.Mx.ZERO){return new Promise(s=>{let p="",u=!1;if(e instanceof File)p=URL.createObjectURL(e),u=!0;else{if("string"!=typeof e||!e)return void s(Number(l.Mx.ZERO));p=e}const _=document.createElement("video");let h=null,M=!1;const I=()=>{u&&p&&URL.revokeObjectURL(p),h&&clearTimeout(h)},A=E=>{M||(M=!0,I(),i&&this.updateDurationInFormAndVideos(E),s(E))};h=setTimeout(()=>{M||(o<l.Mx.ONE?(I(),this.calculateVideoDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO)))},l.Mx.TEN_THOUSAND),_.addEventListener("loadedmetadata",()=>{if(M)return;const E=_.duration;E&&isFinite(E)&&E>l.Mx.ZERO?A(Math.ceil(E)):o<l.Mx.ONE?(I(),this.calculateVideoDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO))},{once:!0}),_.addEventListener("error",()=>{M||(o<l.Mx.ONE?(I(),this.calculateVideoDuration(e,i,o+l.Mx.ONE).then(A)):A(Number(l.Mx.ZERO)))},{once:!0}),_.preload=l.Mx.METADATA,_.src=p,_.load()})}updateDurationInFormAndVideos(e){const i=this.form?.get("items")?.value||[];i.length>l.Mx.ZERO&&(i[l.Mx.ZERO].durationInSeconds=e,this.form?.patchValue({items:i})),this.step3Component?.addedVideos.length>l.Mx.ZERO&&(this.step3Component.addedVideos[l.Mx.ZERO].durationInSeconds=e)}saveIndividualVideoData(){return new Promise(e=>{if(!this.step3Component||!this.form)return void e();let i=null;if(this.step3Component.postPriceComponent){const E=this.step3Component.postPriceComponent.postPriceObj,z=this.step3Component.postPriceComponent.postPriceForm,et=this.step3Component.postPriceComponent.subPlanList,tt=this.step3Component.postPriceComponent.addedNFTIds;if(E.is_subscription||E.is_ind_purchase||E.is_loyalty_points||E.is_lock_with_nft){if(i={is_subscription:E.is_subscription,is_indivudiual_price:E.is_ind_purchase,is_nft_added:E.is_lock_with_nft,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.step3Component.postPriceComponent.currencyConversionData?.adjustedPrices||[]},E.is_ind_purchase&&(i.indivisualPrice=this.step3Component.postPriceComponent.ppForm?.controls.indPrice?.value||""),E.is_loyalty_points){const K=this.step3Component.postPriceComponent.loyaltyPointsForm?.get("loyalty_points")?.value,pt=Number(K);i.loyalty_points=Number.isFinite(pt)&&pt>0?pt:null}if(E.is_subscription&&et&&et.forEach(K=>{K.isSelected&&i.subscriptions.push({sk:K.sk,pk:K.pk,title:K.name,duration:K.duration,amount:K.price,discount_offer:K.discount_offer})}),E.is_lock_with_nft&&(i.nftIDList=[...tt]),z?.value){let K=[];try{K=this.step3Component.postPriceComponent.getSelectedHashTag()}catch{K=[]}i={...i,form:z.value,tags:K}}}}const o=this.step3Component.form.get("allow_download")?.value||[],s=Array.isArray(o)&&o.length>0&&o.includes(!0),p=this.step3Component.form.get("show_as_post")?.value||[],u=Array.isArray(p)&&p.length&&p.includes(!0),_=this.step3Component.form.get("require_authentication")?.value||[],h=Array.isArray(_)&&_.length>l.Mx.ZERO&&_.includes(!0),M={id:Date.now(),video_name:this.form?.get("name")?.value||"",video_file:this.step3Component.form.get(this.step3Component.portfolioConfig?.fileField||"video_file")?.value,thumbnail:this.step3Component.form.get("thumbnail")?.value||"",postPriceData:i,videoFileName:this.step3Component.videoFileName,thumbnailPreview:this.step3Component.thumbnailPreview,durationInSeconds:l.Mx.ZERO,require_authentication:h,allow_download:s,show_as_post:u};this.form.patchValue({items:[M]}),this.step3Component.addedVideos=[M],this.step3Component.syncVideosToForm();const A=(this.step3Component.videosForUploading?.length>l.Mx.ZERO?this.step3Component.videosForUploading[l.Mx.ZERO]?.file:null)||M.video_file;A?this.calculateVideoDuration(A,!0).then(E=>{M.durationInSeconds=E,this.updateDurationInFormAndVideos(E),e()}):e()})}handleCancel(){this.navigateToBack()}buildPayloadWithDuration(){var e=this;return new Promise(function(){var i=(0,ke.Z)(function*(o){if(!e.form||!e.portfolioTypeId)return void o(null);const s=e.form.value,p=e.isDspChecked?e.buildDspArray(s.dsp||[],e.step2Component?.dspForm?.value||{}):[];let u=null,_=null,h=Number(l.Mx.ZERO),M="",I=Number(l.Mx.ZERO);if(e.isDirectDistributionChecked&&e.step3Component){const E=s.items||[],q=e.step3Component.addedVideos||[];if(u=E.length>l.Mx.ZERO?E[l.Mx.ZERO]:null,q.length>l.Mx.ZERO&&q[l.Mx.ZERO]){const z=q[l.Mx.ZERO];z.durationInSeconds&&z.durationInSeconds>l.Mx.ZERO&&(h=Number(z.durationInSeconds))}u&&(_=e.getPostPriceDataFromComponent(),M=u.video_file||"",h===Number(l.Mx.ZERO)&&(h=Number(u.durationInSeconds)||Number(l.Mx.ZERO)),_?.form?.free_preview&&(I=Number(_.form.free_preview)||Number(l.Mx.ZERO)))}e.isDirectDistributionChecked&&M&&h===Number(l.Mx.ZERO)&&(h=yield e.calculateVideoDuration(M,!1),h>l.Mx.ZERO&&e.updateDurationInFormAndVideos(h)),e.isDirectDistributionChecked&&M&&h===Number(l.Mx.ZERO)?o(null):o(e.createPayload(s,p,_,h,M,I))});return function(o){return i.apply(this,arguments)}}())}createPayload(e,i,o,s,p,u){const _=this.isDirectDistributionChecked?this.buildLockThrough(o):{},h=this.timestamp||(0,Q.e4)(p)||Date.now(),M=e.description||"",I=(e.release_type_year||[]).includes(Y.vI.RELEASE_TYPE_YEAR),A=(e.release_type_date||[]).includes(Y.vI.RELEASE_TYPE_DATE);let E=null;I&&null!=e.release_year&&""!==e.release_year?E=e.release_year.toString():A&&null!=e.release_date&&(E=(0,Q.YF)(e.release_date));let q=!0,z=!1,et=!1;if(this.isDirectDistributionChecked&&this.step3Component?.form){const dt=this.step3Component.form.get("allow_download")?.value||[];q=Array.isArray(dt)&&dt.length>l.Mx.ZERO&&dt.includes(!0);const K=this.step3Component.form.get("show_as_post")?.value||[];z=Array.isArray(K)&&K.length>l.Mx.ZERO&&K.includes(!0);const pt=this.step3Component.form.get("require_authentication")?.value||[];et=Array.isArray(pt)&&pt.length>l.Mx.ZERO&&pt.includes(!0)}const tt={type:this.portfolioType.toUpperCase(),title:e.name||"",cover_image_url:e.cover_image||"",duration:s,lock_through:_,status:this.enable?O.W.PORTFOLIO_STATUS.ACTIVE:O.W.PORTFOLIO_STATUS.INACTIVE,free_preview_time:u,dsp:i,require_authentication:et,allow_download:q,release_date:E,show_as_post:z,international_prices:o?.international_prices,badge_groups:(0,Q.IH)(this.form)};return M&&(tt.description=M),this.isDirectDistributionChecked&&p?(tt.file=p,tt.media_id=h,(0,Q.p4)(p,[l.Mx.PORTFOLIO.toLowerCase()])===l.Mx.PORTRAIT&&(tt.is_portrait=!0)):tt.file="",this.isEditMode&&this.contentPk&&this.contentSk?(tt.pk=this.contentPk,tt.sk=this.contentSk):tt.portfolio_sk=this.cs.encodeToUTF(this.portfolioTypeId),tt}getPostPriceDataFromComponent(){if(!this.step3Component||!this.step3Component.postPriceComponent)return null;const e=this.step3Component.postPriceComponent.postPriceObj,o=this.step3Component.postPriceComponent.postPriceForm,s=this.step3Component.postPriceComponent.subPlanList,p=this.step3Component.postPriceComponent.addedNFTIds;if(!(e.is_subscription||e.is_ind_purchase||e.is_loyalty_points||e.is_lock_with_nft))return null;const _=this.step3Component.postPriceComponent.loyaltyPointsForm;let h={is_subscription:e.is_subscription,is_indivudiual_price:e.is_ind_purchase,is_nft_added:e.is_lock_with_nft,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:this.step3Component.postPriceComponent.currencyConversionData?.adjustedPrices||[]};if(e.is_ind_purchase&&(h.indivisualPrice=this.step3Component.postPriceComponent.ppForm?.controls.indPrice?.value||""),e.is_loyalty_points){const M=_?.get("loyalty_points")?.value,I=Number(M);h.loyalty_points=Number.isFinite(I)&&I>0?I:null}
1if(e.is_subscription&&s&&s.forEach(M=>{M.isSelected&&h.subscriptions.push({sk:M.sk,pk:M.pk,title:M.name,duration:M.duration,amount:M.price,discount_offer:M.discount_offer})}),e.is_lock_with_nft&&(h.nftIDList=[...p]),o?.value){let M=[];try{M=this.step3Component.postPriceComponent.getSelectedHashTag()}catch{M=[]}if(h={...h,form:o.value,tags:M},this.step3Component.postPriceComponent.isDoubleLockingEnable&&o.get("lock")?.value?.lockValue){const I=o.get("lock")?.value?.lockValue;h.outer_subscription=I?.subscription||[],h.outer_nft=I?.NFT||[]}}return h}buildDspArray(e,i){return e&&e.length!==l.Mx.ZERO?e.map(o=>{const s=o.sk||"";return{pk:o.pk||"",sk:s,url:i[`${s}url`]||"",button_label:i[`${s}text`]||""}}):[]}buildLockThrough(e){if(!e)return{individual:{outer_subscription:[],outer_nft:[],individual_price:""},subscription:[],nft:[]};const i=e?.loyalty_points;return{individual:{outer_subscription:e.outer_subscription||[],outer_nft:e.outer_nft||[],individual_price:e.indivisualPrice||"",...i&&{loyalty_points:Number(i)}},subscription:e.subscriptions||[],nft:e.nftIDList||[]}}loadContentData(){if(!this.routeId||!this.portfolioType)return;const e=U.$_.getPortfolioContentDetail(this.routeId,this.portfolioType.toUpperCase());this.apiCallService.get(e,!0).pipe((0,J.R)(this.destroy$)).subscribe({next:i=>{if(i.status&&i.statusCode===l.Mx.TWO_HUNDRED&&i.data){const o=i.data;this.contentPk=o.pk||"",this.contentSk=o.sk||"",this.contentBadgeGroups=o.badge_groups||[];const s=o?.dsp?.filter(u=>u.logo),p={pk:o.pk||"",sk:o.sk||"",content_title:o.title||o.content_title||"",title:o.title||o.content_title||"",cover_image_url:o.cover_image_url||o.thumbnail||"",thumbnail:o.cover_image_url||o.thumbnail||"",content_desc:o.description||o.content_desc||"",description:o.description||o.content_desc||"",status:o.status||O.W.PORTFOLIO_STATUS.ACTIVE,dsp:s||[],file:o.file||o.media_url||"",media_url:o.file||o.media_url||"",duration:o.duration||l.Mx.ZERO,lock_through:o.lock_through||null,free_preview_time:o.free_preview_time||l.Mx.ZERO,require_authentication:o.require_authentication||!1,allow_download:o.allow_download||!1,release_date:o.release_date||null,show_as_post:o.show_as_post||!1,international_prices:o?.international_prices||[]};if(this.form){const u=(0,Q.NH)(p.release_date);let _=null,h=null,M=[],I=[];if(u.type===Y.vI.RELEASE_TYPE_YEAR?(h=u.value,M=[Y.vI.RELEASE_TYPE_YEAR],I=[]):u.type===Y.vI.RELEASE_TYPE_DATE&&(_=(0,Q.Gy)(u.value),M=[],I=[Y.vI.RELEASE_TYPE_DATE]),this.form.patchValue({name:p.content_title||p.title||"",cover_image:p.cover_image_url||p.thumbnail||"",description:p.content_desc||p.description||"",release_date:_||null,release_year:h||null,release_type_year:M,release_type_date:I}),setTimeout(()=>{this.step1Component&&this.step1Component.initializeReleaseType()},100),this.enable=p.status===O.W.PORTFOLIO_STATUS.ACTIVE,p.dsp&&Array.isArray(p.dsp)&&p.dsp.length>l.Mx.ZERO){this.isDspChecked=!0;const A=p.dsp.map(E=>({pk:E.pk||"",sk:E.sk||"",name:E.name||"",logo:E.logo||"",url:E.url||"",button_label:E.button_label||""}));this.form.patchValue({dsp:A}),this.step2Component?.remergeOptions$&&this.step2Component.remergeOptions$.next()}(p.file||p.media_url)&&(this.isDirectDistributionChecked=!0,this.timestamp=(0,Q.e4)(p.file||p.media_url),this.loadDirectDistributionData(p))}}else this.cs.showErrorMessage(i.message||this.CONSTS.FAILED_TO_LOAD_CONTENT),this.navigateToBack()},error:i=>{this.cs.showErrorMessage(i?.message||this.CONSTS.FAILED_TO_LOAD_CONTENT),this.navigateToBack()}})}loadDirectDistributionData(e){setTimeout(()=>{if(this.step3Component){this.step3Component.showAddVideoForm=!0;const i=this.buildPostPriceDataFromLockThrough(e.lock_through,e.free_preview_time||l.Mx.ZERO,e?.international_prices),o=void 0!==e.allow_download&&e.allow_download,s=void 0!==e.show_as_post&&e.show_as_post,p=void 0!==e.require_authentication&&e.require_authentication,u={id:Date.now(),video_name:e.content_title||e.title||"",video_file:e.file||e.media_url||"",thumbnail:e.cover_image_url||"",thumbnailPreview:e.cover_image_url||"",durationInSeconds:e.duration||l.Mx.ZERO,sk:e.sk||"",pk:e.pk||"",postPriceData:i,videoFileName:"",require_authentication:p,allow_download:o,show_as_post:s};this.step3Component.form&&this.step3Component.form.patchValue({[this.step3Component.portfolioConfig?.fileField||"video_file"]:u.video_file,thumbnail:u.thumbnail,require_authentication:p?[!0]:[],allow_download:o?[!0]:[],show_as_post:s?[!0]:[]}),u.video_file&&(this.step3Component.videoSelected=!0,this.step3Component.videoPreview=u.video_file,this.step3Component.videoUrl=u.video_file,this.step3Component.videoFileName=O.W.VIDEO_FILE,this.timestamp=(0,Q.e4)(u.video_file),this.step3Component&&(this.step3Component.timestamp=this.timestamp,this.step3Component.resolveVideoModeFromUrl(u.video_file).then(_=>{this.step3Component.currentVideoMode=_}))),u.thumbnail&&(this.step3Component.thumbnailPreview=u.thumbnailPreview||u.thumbnail),this.step3Component.addedVideos=[u],this.step3Component.syncVideosToForm(),this.form.patchValue({items:[u]}),i&&this.step3Component.postPriceComponent&&setTimeout(()=>{this.loadPostPriceDataIntoComponent(i)},300),setTimeout(()=>{this.step1Component&&this.step1Component.initializeReleaseType()},150)}},100)}
1buildPostPriceDataFromLockThrough(e,i=l.Mx.ZERO,o=[]){if(!e)return{is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:[],form:{free_preview:i||l.Mx.ZERO}};const s={is_subscription:!1,is_indivudiual_price:!1,is_nft_added:!1,subscriptions:[],indivisualPrice:"",nftIDList:[],loyalty_points:null,international_prices:[],form:{free_preview:i||l.Mx.ZERO}};if(e.individual){e.individual.individual_price&&""!==e.individual.individual_price.trim()&&(s.is_indivudiual_price=!0,s.indivisualPrice=e.individual.individual_price);const p=(0,ht.pL)(e.individual.loyalty_points);p&&(s.loyalty_points=p),s.outer_subscription=e.individual.outer_subscription||[],s.outer_nft=e.individual.outer_nft||[]}return e.subscription&&Array.isArray(e.subscription)&&e.subscription.length>l.Mx.ZERO&&(s.is_subscription=!0,s.subscriptions=e.subscription),e.nft&&Array.isArray(e.nft)&&e.nft.length>l.Mx.ZERO&&(s.is_nft_added=!0,s.nftIDList=e.nft),o?.length&&(s.international_prices=o),s}loadPostPriceDataIntoComponent(e){if(!this.step3Component||!this.step3Component.postPriceComponent||!e)return;const i=null!=e.loyalty_points&&e.loyalty_points>0;if(!(e.is_subscription||e.is_indivudiual_price||e.is_nft_added||i))return;if(this.step3Component.postPriceComponent.postPriceObj={is_subscription:e.is_subscription||!1,is_ind_purchase:e.is_indivudiual_price||!1,is_loyalty_points:i,is_lock_with_nft:e.is_nft_added||!1,selected_subscription:[],individual_price:e.indivisualPrice||"",revenue_split:"",international_prices:e.international_prices},e.is_subscription&&e.subscriptions){const p=setInterval(()=>{this.step3Component?.postPriceComponent?.subPlanList&&this.step3Component.postPriceComponent.subPlanList.length>l.Mx.ZERO&&(clearInterval(p),e.subscriptions.forEach(u=>{const _=this.step3Component.postPriceComponent.subPlanList.find(h=>h.sk===u.sk);_&&(_.isSelected=!0)}))},50);setTimeout(()=>clearInterval(p),3e3)}e.is_indivudiual_price&&e.indivisualPrice&&this.step3Component.postPriceComponent.ppForm&&this.step3Component.postPriceComponent.ppForm.patchValue({indPrice:e.indivisualPrice}),i&&this.step3Component.postPriceComponent.loyaltyPointsForm&&(this.step3Component.postPriceComponent.loyaltyPointsForm.patchValue({loyalty_points:e.loyalty_points}),this.step3Component.postPriceComponent.onLoyaltyPointsToggle()),e.is_nft_added&&e.nftIDList&&(this.step3Component.postPriceComponent.addedNFTIds=[...e.nftIDList]),e.form&&this.step3Component.postPriceComponent.postPriceForm&&this.step3Component.postPriceComponent.postPriceForm.patchValue(e.form);let s=null;(e?.outer_subscription?.length||e?.outer_nft?.length)&&(s={is_individual_price:!0,is_subscription:!!(e.outer_subscription&&e.outer_subscription.length>0),is_nft:!!(e.outer_nft&&e.outer_nft.length>0),subscription:e.outer_subscription||[],NFT:e.outer_nft||[]}),this.step3Component&&(this.step3Component.postPriceFilledData={...this.step3Component.postPriceFilledData,showFreePreviewDropdown:!0,isActiveLiveStream:!1,is_subscription:e.is_subscription||!1,is_indivudiual_price:e.is_indivudiual_price||!1,is_nft_added:e.is_nft_added||!1,indivisualPrice:e.indivisualPrice||"",loyalty_points:e.loyalty_points??null,subscriptions:e.subscriptions||[],nftIDList:e.nftIDList||[],form:e.form||null,lockDetails:s,collaborators:[],international_prices:e?.international_prices},this.step3Component.postPriceComponent.currencyConversionData={adjustedPrices:e?.international_prices})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(V.F0),t.Y36(V.gz),t.Y36(gt.F),t.Y36($.v),t.Y36(bt.C),t.Y36(kt.yh))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-add-edit-individual-video"]],viewQuery:function(i,o){if(1&i&&(t.Gf(qr,5),t.Gf(Gr,5),t.Gf(te,5),t.Gf(Vt,5),t.Gf(Fe,5)),2&i){let s;t.iGM(s=t.CRH())&&(o.enableToggle=s.first),t.iGM(s=t.CRH())&&(o.loyaltyOnlyWarningModal=s.first),t.iGM(s=t.CRH())&&(o.step1Component=s.first),t.iGM(s=t.CRH())&&(o.step2Component=s.first),t.iGM(s=t.CRH())&&(o.step3Component=s.first)}},decls:46,vars:66,consts:[[1,"inside-container","preference-container","add-edit-individual-video-portfolio"],[1,"walletform-container","preference-privacy-container","pb-4"],[1,"heading"],[1,"d-flex","align-items-center","gap-3"],[3,"click"],[1,"icon-arrow-back"],[1,"walletform-content","p-0"],[1,"single-video-portfolio-form",3,"ngClass"],[3,"form","portfolioType","isEditMode","isIndividual","showDescription","useVideoCoverStyle","coverImageUploadInProgress","coverImageUploadPercent","itemSk","enable","showToggle","disableMessage","enableMessage","itemDeleted","toggleChanged"],[1,"methods-of-consumption-section","mt-4"],[1,"section-title"],[1,"methods-of-consumption-item"],[1,"toggle-checkbox-section"],[1,"toggle-header"],[1,"custom-checkbox","checkbox-label"],["type","checkbox",3,"checked","disabled","change"],[1,"checkmark","checkmark-md","rounded",3,"ngClass"],[1,"checkbox-text"],[1,"chevron-icon","ms-auto",3,"click"],[1,"icon-litechevron_down"],[1,"step-2-container"],[3,"form","portfolioType","isIndividual","isDspChecked"],[1,"d-flex","align-items-center","gap-2"],[3,"message","infoIconSize"],[1,"step-3-container"],[3,"form","isEditMode","isIndividual","showThumbnail","isDirectDistributionChecked","userProfile","portfolioType","isUploadingVideo"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId",4,"ngIf"],[1,"buttons","mt-4"],[3,"btnField","handleButtonClick"],[3,"proceeded","canceled",4,"ngIf"],[3,"parentForm","arrayName","selectedBadgeGroups","hintMessage","creatorId"],[3,"proceeded","canceled"],["loyaltyOnlyWarningModal",""]],template:function(i,o){if(1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),t.NdJ("click",function(){return o.navigateToBack()}),t._UZ(5,"em",5),t.qZA(),t.TgZ(6,"h4"),t._uU(7),t.qZA()()(),t.TgZ(8,"div",6)(9,"div",7)(10,"app-step-1-basic-info",8),t.NdJ("itemDeleted",function(){return o.navigateToBack()})("toggleChanged",function(p){return o.toggleChanged(p)}),t.qZA(),t.TgZ(11,"div",9)(12,"div",10)(13,"h3"),t._uU(14),t.qZA()(),t.TgZ(15,"div",11)(16,"div",12)(17,"div",13)(18,"label",14)(19,"input",15),t.NdJ("change",function(p){return o.onDspCheckboxChange(p)}),t.qZA(),t._UZ(20,"span",16),t.TgZ(21,"span",17),t._uU(22),t.qZA(),t.TgZ(23,"span",18),t.NdJ("click",function(p){return p.stopPropagation()}),t._UZ(24,"em",19),t.qZA()()()(),t.TgZ(25,"div",20),t._UZ(26,"app-step-2-dsp-links",21),t.qZA()(),t.TgZ(27,"div",11)(28,"div",12)(29,"div",13)(30,"label",14)(31,"input",15),t.NdJ("change",function(p){return o.onDirectDistributionCheckboxChange(p)}),t.qZA(),t._UZ(32,"span",16),t.TgZ(33,"div",22)(34,"span",17),t._uU(35),t.qZA(),t._UZ(36,"app-info-icon",23),t.qZA(),t.TgZ(37,"span",18),t.NdJ("click",function(p){return p.stopPropagation()}),t._UZ(38,"em",19),t.qZA()()()(),t.TgZ(39,"div",24),t._UZ(40,"app-step-3-video-series",25),t.qZA()()()()(),t.YNc(41,zr,1,5,"app-badge-groups-selection",26),t.TgZ(42,"div",27)(43,"app-button",28),t.NdJ("handleButtonClick",function(){return o.handleCancel()}),t.qZA(),t.TgZ(44,"app-button",28),t.NdJ("handleButtonClick",function(){return o.handleSave()}),t.qZA()()()(),t.YNc(45,Kr,2,0,"app-loyalty-only-warning-modal",29)),2&i){let s,p;t.xp6(7),t.Oqu(o.pageTitle),t.xp6(2),t.Q6J("ngClass",t.VKq(54,jr,o.isSaving)),t.xp6(1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isEditMode",o.isEditMode)("isIndividual",o.isIndividual)("showDescription",o.showDescription)("useVideoCoverStyle",!0)("coverImageUploadInProgress",null!==(s=null==o.step3Component?null:o.step3Component.imageShowProgress)&&void 0!==s&&s)("coverImageUploadPercent",null!==(p=null==o.step3Component?null:o.step3Component.imagePercent)&&void 0!==p?p:0)("itemSk",o.routeId)("enable",o.enable)("showToggle",!0)("disableMessage",o.CONSTS.DISABLE)("enableMessage",o.CONSTS.ENABLE),t.xp6(4),t.Oqu(o.CONSTS.METHODS_OF_CONSUMPTION),t.xp6(5),t.Q6J("checked",o.isDspChecked)("disabled",o.isSaving),t.xp6(1),t.Q6J("ngClass",t.VKq(56,ko,o.isDspChecked)),t.xp6(2),t.Oqu(o.CONSTS.DSP_LINKS),t.xp6(1),t.ekj("expanded",o.isDspChecked),t.xp6(2),t.Udp("opacity",o.isDspChecked?"1":"0"),t.ekj("hidden",!o.isDspChecked),t.xp6(1),t.Q6J("form",o.form)("portfolioType",o.portfolioType)("isIndividual",o.isIndividual)("isDspChecked",o.isDspChecked),t.xp6(5),t.Q6J("checked",o.isDirectDistributionChecked)("disabled",o.isSaving),t.xp6(1),t.Q6J("ngClass",t.VKq(58,ko,o.isDirectDistributionChecked)),t.xp6(3),t.Oqu(o.CONSTS.DIRECT_DISTRIBUTION),t.xp6(1),t.Q6J("message",o.CONSTS.DIRECT_SALES_INFO_MESSAGE)("infoIconSize",18),t.xp6(1),t.ekj("expanded",o.isDirectDistributionChecked),t.xp6(2),t.Udp("opacity",o.isDirectDistributionChecked?"1":"0"),t.ekj("hidden",!o.isDirectDistributionChecked),t.xp6(1),t.Q6J("form",o.form)("isEditMode",o.isEditMode)("isIndividual",o.isIndividual)("showThumbnail",o.showThumbnail)("isDirectDistributionChecked",o.isDirectDistributionChecked)("userProfile",o.currentUserProfile)("portfolioType",o.portfolioType)("isUploadingVideo",o.isSaving),t.xp6(1),t.Q6J("ngIf",null==o.currentUserProfile?null:o.currentUserProfile.gsi4pk),t.xp6(2),t.Q6J("btnField",t.VKq(60,$r,o.CONSTS.CANCEL)),t.xp6(1),t.Q6J("btnField",t.kEZ(62,Xr,o.isEditMode?o.CONSTS.UPDATE_VIDEO:o.CONSTS.SAVE_VIDEO,!o.isFormValid||o.isSaving,o.isSaving)),t.xp6(1),t.Q6J("ngIf",o.cs.isBrowser)}},dependencies:[r.mk,r.O5,Xt.e,it.r,ye.LoyaltyOnlyWarningModalComponent,At.K,te,Vt,Fe],styles:[".add-edit-individual-video-portfolio[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .walletform-content[_ngcontent-%COMP%]{margin:0!important;background:transparent!important;box-shadow:none!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .icon-liteicon-black-tick[_ngcontent-%COMP%]{font-size:14px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:none}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .preview-as-post-interests-section[_ngcontent-%COMP%]{padding-left:20px;padding-right:50px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;width:100%;margin-bottom:24px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{cursor:pointer;font-size:20px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ng
1content-%COMP%]{font-size:24px;font-weight:700;line-height:24px;margin:0}@media screen and (max-width: 992px){.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:16px}}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .icon-arrow-back[_ngcontent-%COMP%]{font-size:24px;font-weight:500;cursor:pointer}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .both-btn{height:auto!important;padding:8px 14px!important;line-height:normal!important;font-size:12px!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%]{margin-bottom:24px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.7}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] .custom-checkbox[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{pointer-events:none!important;cursor:not-allowed;opacity:.6}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.6}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%] .pricing-options-section, .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%] .pricing-options-section, .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%] .pricing-options-section{pointer-events:none!important;opacity:.6}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] app-step-1-basic-info[_ngcontent-%COMP%] .pricing-options-section .modal-content, .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%] .pricing-options-section .modal-content, .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form.saving[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%] .pricing-options-section .modal-content{pointer-events:none!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:24px;background:var(--configSecondaryBgColor);color:var(--configPostTextColor)!important;border-radius:28px;display:flex;flex-direction:column;gap:20px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .methods-of-consumption-item[_ngcontent-%COMP%]{background:var(--configBgColor);color:var(--configBgTextColor)!important;border-radius:16px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{margin-bottom:20px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;margin-bottom:.5rem}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{font-size:.875rem;color:#ffffffb3;margin-bottom:0}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:var(--configBgColor);color:var(--configBgTextColor);border-radius:12px;transition:all .3s ease}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:20px;cursor:pointer;margin:0;flex:1;position:relative}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;left:0;top:0}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .checkmark[_ngcontent-%COMP%]{background:var(--theme-interactive-link);border-color:var(--theme-interactive-link)}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;height:25px;width:25px;border-radius:100%;border:1px solid var(--theme-interactive-link);background:transparent}@media screen and (max-width: 992px){.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:20px!important;height:20px!important}}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] .checkbox-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--configBgTextColor);margin-left:0}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%]{transition:transform .3s ease}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon.exp
1anded[_ngcontent-%COMP%]{transform:rotate(180deg)}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .toggle-header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-size:10px;color:var(--configBgTextColor)}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#ffffffb3;margin:8px 0 16px;padding-left:16px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .toggle-checkbox-section[_ngcontent-%COMP%] .info-icon-toggle{margin-left:0!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-3-container[_ngcontent-%COMP%]{pointer-events:auto}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container.hidden[_ngcontent-%COMP%], .add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-3-container.hidden[_ngcontent-%COMP%]{pointer-events:none;max-height:0;margin:0;padding:0}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%] .step-2-container[_ngcontent-%COMP%]{background:var(--configBgColor);border-radius:38px;margin:0 24px}@media screen and (max-width: 992px){.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .single-video-portfolio-form[_ngcontent-%COMP%] .methods-of-consumption-section[_ngcontent-%COMP%]{padding:24px 12px 12px}}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container{padding:0 24px 24px!important;background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content .monetize-card{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content app-dynamic-form-builder .form-group .form-control{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content app-dynamic-form-builder .form-group .form-control::placeholder{color:var(--configPostTextColor)!important;opacity:.7}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .step-form-content app-dynamic-form-builder .form-group label{color:var(--configBgTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect label{color:var(--configBgTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;height:auto!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label{flex-wrap:wrap;color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-label .p-multiselect-token{border-color:var(--configPostTextColor)!important;color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger{color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect .p-multiselect-trigger .p-multiselect-trigger-icon{color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header{background:var(--configSecondaryBgColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container{background:var(--configBgColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .custom-search-container .custom-search-input{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container{c
1olor:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-header .select-all-container label{color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper{background:var(--configSecondaryBgColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item{color:var(--configPostTextColor)!important;background:var(--configSecondaryBgColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls{color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-items-wrapper .p-multiselect-items .p-multiselect-item .item-label-cls .icon-label{color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn, .add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .btn{background:var(--configSecondaryBgColor)!important;color:var(--configPostTextColor)!important;border-color:var(--configPostTextColor)!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container .custom-multiselect p-multiSelect .p-multiselect-panel .p-multiselect-footer .buttons .custom-btn{height:auto!important}@media screen and (max-width: 992px){.add-edit-individual-video-portfolio[_ngcontent-%COMP%] app-step-2-dsp-links .step-2-dsp-links-container{padding:0 0 24px!important}}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container{background:var(--configBgColor)!important;color:var(--configBgTextColor)!important;padding:0 24px 24px!important}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container .step-form-content{padding:0 24px 24px!important}@media screen and (max-width: 992px){.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container .step-form-content{padding:0 0 24px!important}}@media screen and (max-width: 992px){.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .step-3-direct-distribution-container{padding:20px!important}}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:10px}@media screen and (max-width: 992px){.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{padding:0 12px 24px;flex-direction:column;align-items:stretch;text-align:center;gap:16px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:100%}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .buttons.justify-content-between[_ngcontent-%COMP%]{flex-direction:column;gap:16px}}@media screen and (max-width: 992px){.add-edit-individual-video-portfolio[_ngcontent-%COMP%]{margin-top:64px}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .hdr[_ngcontent-%COMP%]{display:none}.add-edit-individual-video-portfolio[_ngcontent-%COMP%] .mobile-mode[_ngcontent-%COMP%]{display:block;font-size:20px;margin-bottom:20px;text-align:end}} .theme-whiteLabel .single-video-portfolio-form .methods-of-consumption-section .onboarding-validInfo.block-hint .dropdown-menu p{color:var(--configPostTextColor)!important} .theme-whiteLabel .single-video-portfolio-form .methods-of-consumption-section .toggle-checkbox-section .toggle-header .checkbox-label .checkmark{border-color:var(--configThemeColor)!important} .theme-whiteLabel .single-video-portfolio-form .methods-of-consumption-section .toggle-checkbox-section .toggle-header .checkbox-label input[type=checkbox]:checked~.checkmark{background:var(--configThemeColor)!important}"]}),a})();var He=b(45049);const ta=[{path:"",component:Rt,data:{fromMonetize:!0}},{path:"add-edit-portfolio",component:Gt,canActivate:[G.n]},{path:"add-edit-portfolio/:id",component:Gt,canActivate:[G.n]},{path:"add-edit-portfolio-type",component:zt,canActivate:[G.n]},{path:"add-edit-portfolio-type/:id",component:zt,canActivate:[G.n]},{path:"banner-view/:id",component:Pe.a,canActivate:[G.n]},{path:"add-edit-album-portfolio",component:Me,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.MUSIC}},{path:"add-edit-album-portfolio/:id",component:Me,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.MUSIC}},{path:"add-edit-podcast-portfolio",component:Me,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.PODCAST}},{path:"add-edit-podcast-portfolio/:id",component:Me,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.PODCAST}},{path:"add-edit-single-song-portfolio",component:So,canActivate:[G.n]},{path:"add-edit-single-song-portfolio/:id",component:So,canActivate:[G.n]},{path:"add-edit-single-item-portfolio",component:Io,canActivate:[G.n]},{path:"add-edit-single-item-portfolio/:id",component:Io,canActivate:[G.n]}
1,{path:"add-edit-collection-portfolio",component:Me,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.CUSTOM}},{path:"add-edit-collection-portfolio/:id",component:Me,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.CUSTOM}},{path:"add-edit-individual-podcast",component:yo,canActivate:[G.n]},{path:"add-edit-individual-podcast/:id",component:yo,canActivate:[G.n]},{path:"add-edit-individual-video",component:wo,canActivate:[G.n]},{path:"add-edit-individual-video/:id",component:wo,canActivate:[G.n]},{path:"music-album/:sk",component:He.F,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.MUSIC}},{path:"podcast-series/:sk",component:He.F,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.PODCAST}},{path:"video-series/:sk",component:He.F,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.VIDEO}},{path:"collection-detail/:sk",component:He.F,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.CUSTOM}},{path:"add-edit-video-portfolio",component:Me,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.VIDEO}},{path:"add-edit-video-portfolio/:id",component:Me,canActivate:[G.n],data:{portfolioType:O.W.PORTFOLIO_TYPE.VIDEO}}];let ea=(()=>{const m=class{};let a=m;return m.\u0275fac=function(i){return new(i||m)},m.\u0275mod=t.oAB({type:m}),m.\u0275inj=t.cJS({imports:[V.Bz.forChild(ta),V.Bz]}),a})();var Ao=b(30404),oa=b(80164),ia=b(11208),na=b(15140),sa=b(3706),ra=b(24580),aa=b(58746),la=b(21637),ca=b(49767),da=b(18731),pa=b(82082),ua=b(57144),ga=b(94077),oo=b(1061),ma=b(76492),_a=b(76553);function ha(a,m){if(1&a&&(t.TgZ(0,"app-info-icon",8),t.NdJ("click",function(e){return e.stopPropagation()}),t.qZA()),2&a){const n=t.oxw(2);t.Q6J("message",n.hintMessage)}}function fa(a,m){if(1&a){const n=t.EpF();t.TgZ(0,"label")(1,"input",12),t.NdJ("change",function(i){const s=t.CHM(n).$implicit;return t.oxw(3).onHashTagChange(i),t.KtG(s.control.setValue(i.target.checked))}),t.qZA(),t.TgZ(2,"span",13),t._uU(3),t.qZA()()}if(2&a){const n=m.$implicit;t.xp6(1),t.Q6J("value",n.name)("checked",n.control.value),t.xp6(2),t.Oqu(n.name)}}function Ca(a,m){1&a&&t._UZ(0,"app-loader")}function ba(a,m){if(1&a&&(t.TgZ(0,"div",9),t.YNc(1,fa,4,3,"label",10),t.YNc(2,Ca,1,0,"app-loader",11),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.cachedFormArrayControls)("ngForTrackBy",n.trackByIndex),t.xp6(1),t.Q6J("ngIf",n.isLoader)}}function Pa(a,m){if(1&a&&(t.TgZ(0,"accordion",1)(1,"accordion-group",2)(2,"button",3)(3,"span",4),t._uU(4),t.YNc(5,ha,1,1,"app-info-icon",5),t.qZA(),t._UZ(6,"em",6),t.qZA(),t.YNc(7,ba,3,3,"div",7),t.qZA()()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("isOpen",!1),t.xp6(3),t.hij(" ",n.title," "),t.xp6(1),t.Q6J("ngIf",n.hintMessage),t.xp6(2),t.Q6J("ngIf",n.parentForm)}}let Oa=(()=>{const m=class{constructor(e,i,o){this.fb=e,this.dashboardService=i,this.cs=o,this.parentForm=null,this.arrayName="hashTagList",this.title="Select Interests",this.hintMessage="",this.fetchFromApi=!1,this.hashTagList=[],this.selectedTags=[],this.hashTagChange=new t.vpe,this.hashTagListChange=new t.vpe,this.isLoader=!1,this.cachedFormArrayControls=[],this.lastEvaluatedKeyHashTags={pk:"",sk:"",gsi1pk:"",gsi1sk:""}}ngOnInit(){this.cs.isBrowser&&this.fetchFromApi&&this.parentForm&&this.loadHashTags(),this.hashTagList?.length&&this.parentForm&&(this.fetchHashTagList(),this.setHashTagAndUpdate(this.selectedTags),this.hashTagListChange.emit(this.hashTagList))}ngOnChanges(e){e.hashTagList?.currentValue?.length&&this.parentForm&&(this.hashTagList=e.hashTagList.currentValue,this.fetchHashTagList(),this.setHashTagAndUpdate(this.selectedTags),this.hashTagListChange.emit(this.hashTagList)),e.selectedTags?.currentValue&&this.hashTagList?.length&&this.setHashTagAndUpdate(this.selectedTags)}get hasItems(){return Array.isArray(this.hashTagList)&&this.hashTagList.length>0}buildFormArrayControls(){if(!this.parentForm)return[];const e=this.parentForm.get(this.arrayName);return(e&&"controls"in e?e.controls:[]).map(o=>({name:o?.get?.("name")?.value??"",control:o?.get?.("isSelected")})).filter(o=>null!=o.control)}loadHashTags(){this.isLoader=!0,this.dashboardService.fetchHashTagList(
1).subscribe({next:e=>{(0,Q.z7)(e.data),this.hashTagList=e.data||[],this.lastEvaluatedKeyHashTags=e.LastEvaluatedKey||this.lastEvaluatedKeyHashTags,this.isLoader=!1,this.fetchHashTagList(),this.setHashTagAndUpdate(this.selectedTags),this.hashTagListChange.emit(this.hashTagList)},error:()=>{this.isLoader=!1}})}loadMoreHashTags(){!this.lastEvaluatedKeyHashTags?.pk||!this.lastEvaluatedKeyHashTags?.sk||(this.isLoader=!0,this.dashboardService.getHashTagPagination(this.lastEvaluatedKeyHashTags).subscribe({next:e=>{this.hashTagList=[...this.hashTagList||[],...e.data||[]],this.hashTagList=[...new Map(this.hashTagList.map(i=>[i.gsi1sk,i])).values()],this.lastEvaluatedKeyHashTags=e.LastEvaluatedKey||this.lastEvaluatedKeyHashTags,this.isLoader=!1,this.fetchHashTagList(),this.setHashTagAndUpdate(this.selectedTags)},error:()=>{this.isLoader=!1}}))}fetchHashTagList(){const e=this.getFormArray();e&&(e.clear(),(this.hashTagList||[]).forEach(i=>{e.push(this.createHashtagObj(i))}),this.cachedFormArrayControls=this.buildFormArrayControls())}setHashTagAndUpdate(e=[]){const i=e||this.selectedTags||[],o=[],s=u=>(u||"").replace(/\s/g,"").toLowerCase();(this.hashTagList||[]).forEach(u=>{const _=i.find(h=>s(h)===s(u?.name));o.push({...u,isSelected:Boolean(_)})});const p=this.getFormArray();p&&(o.length?p.patchValue(o):p.clear(),this.cachedFormArrayControls=this.buildFormArrayControls())}getFormArray(){if(!this.parentForm)return null;const e=this.parentForm.get(this.arrayName);return e&&"controls"in e?e:null}createHashtagObj(e){return this.fb.group({...e,isSelected:!1})}onHashTagChange(e){this.hashTagChange.emit(e)}trackByIndex(e,i){return i.name}};let a=m;return m.\u0275fac=function(i){return new(i||m)(t.Y36(N.QS),t.Y36(ma.w),t.Y36($.v))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-select-interests-accordion"]],inputs:{parentForm:"parentForm",arrayName:"arrayName",title:"title",hintMessage:"hintMessage",fetchFromApi:"fetchFromApi",hashTagList:"hashTagList",selectedTags:"selectedTags"},outputs:{hashTagChange:"hashTagChange",hashTagListChange:"hashTagListChange"},standalone:!0,features:[t.TTD,t.jDz],decls:1,vars:1,consts:[["class","newpost-accordion",4,"ngIf"],[1,"newpost-accordion"],[3,"isOpen"],["accordion-heading","","type","button",1,"btn","btn-link","accordion-header"],[1,"accordion-title"],[3,"message","click",4,"ngIf"],[1,"accordion-arrow","icon-litedrop_down_icon"],["class","form-categories",4,"ngIf"],[3,"message","click"],[1,"form-categories"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],["type","checkbox",3,"value","checked","change"],[1,"active"]],template:function(i,o){1&i&&t.YNc(0,Pa,8,4,"accordion",0),2&i&&t.Q6J("ngIf",o.hasItems&&!o.isLoader&&o.parentForm)},dependencies:[r.ez,r.sg,r.O5,N.UX,oo.fx,oo.Zf,oo.U_,Xt.e,Ao.m,_a.R],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .newpost-accordion{margin-top:16px}[_nghost-%COMP%] .newpost-accordion accordion-group{margin-bottom:16px;overflow:visible}[_nghost-%COMP%] .newpost-accordion accordion-group .panel{border-radius:16px;background:var(--configSecondaryBgColor)!important;border:none;margin-bottom:0;overflow:visible}[_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-heading{border:none;padding:0;background-color:unset!important}[_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-heading .accordion-toggle .accordion-header{width:100%;display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border:none;color:var(--configPostTextColor)!important;background:var(--configSecondaryBgColor)!important;text-decoration:none;font-weight:600;font-size:14px;letter-spacing:.5px;cursor:pointer}[_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-heading .accordion-toggle .accordion-header:hover, [_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-heading .accordion-toggle .accordion-header:focus{text-decoration:none;color:var(--configPostTextColor)!important}[_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-heading .accordion-toggle .accordion-header .accordion-title{display:flex;align-items:center;gap:8px}[_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-heading .accordion-toggle .accordion-header .accordion-arrow{position:absolute;right:10px;font-size:24px;line-height:0;transition:transform .2s ease}[_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-heading .accordion-toggle .accordion-header .accordion-arrow:before{color:var(--configPostTextColor)!important}[_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-collapse{overflow:visible}[_nghost-%COMP%] .newpost-accordion accordion-group .panel .panel-collapse .panel-body{overflow:visible;padding:8px 16px 16px}[_nghost-%COMP%] .newpost-accordion accordion-group .panel.panel-open .panel-heading .accordion-header .accordion-arrow{transform:rotate(90deg)}[_nghost-%COMP%] .newpost-accordion accordion-group.panel-open .panel .panel-heading .accordion-header .accordion-arrow{transform:rotate(90deg)}.form-categories[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;
1cursor:pointer;margin-bottom:8px;color:var(--configPostTextColor, inherit)!important}.form-categories[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{margin:0}.form-categories[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}"]}),a})();var va=b(45178),Ma=b(24519),Ta=b(95868);let xa=(()=>{const m=class{};let a=m;return m.\u0275fac=function(i){return new(i||m)},m.\u0275mod=t.oAB({type:m}),m.\u0275inj=t.cJS({imports:[r.ez,N.u5,N.UX,V.Bz,ea,Ao.m,oa.d,ia.A0,Xe.zk,na.kn.forRoot(),sa.mr.forRoot(),Pt._t,ra.Iq,$t.QG,aa.t,De.hy.forRoot({}),Co.i,la.PostDetailModule,Ht.F,Xt.e,ca.a,it.r,Mt.w,da.d,Ue.b,Ae.a,xe.PostPriceComponent,pa.F,ua.V,ga.p,wt.Y,Oa,va.V,Ma.V,St,Lt._,Ta.r]}),a})()}}]);
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.