import{a as be}from"./chunk-VUICK6GK.js";import{A as Qe,B as Ze,c as Te,d as Le,e as we,g as Ie,h as xe,i as f,k as Ve,l as ke,m as Fe,n as Ne,o as Ue,p as De,q as We,r as He,v as Be,x as Xe,y as je,z as ze}from"./chunk-XADS2X5S.js";import{a as Re,g as Ge,h as $e,i as Ye}from"./chunk-MACWAFSE.js";import"./chunk-L5BK6YHD.js";import{P as ve,da as ye,h as Ee,ha as G,ia as H,ka as Pe,ma as Ae,ra as $,w as Me,y as Oe,z as Se}from"./chunk-STRTA5LW.js";import{$a as se,Ab as A,Bb as T,Bc as L,Ca as p,Db as y,Dc as I,Eb as pe,Ha as O,Jb as ue,Lb as W,Mb as N,N as te,Na as F,Oa as le,Q as ie,Qa as ae,R as oe,S as ne,Sa as P,Ub as de,Wb as x,X as re,Xb as he,Za as M,_a as u,ba as a,ca as s,cb as ce,ea as _e,hb as _,i as ee,ib as r,jb as S,ka as k,lc as Ce,nb as v,nc as U,oc as ge,qc as me,rb as m,sc as fe,ub as d,vb as l,yc as D,zb as b,zc as w}from"./chunk-7WVCR2FM.js";var et=["container"],tt=["input"],it=["colorSelector"],ot=["colorHandle"],nt=["hue"],rt=["hueHandle"],_t=(o,E)=>({"p-colorpicker p-component":!0,"p-colorpicker-overlay":o,"p-colorpicker-dragging":E}),lt=o=>({"p-disabled":o}),at=(o,E)=>({"p-colorpicker-panel":!0,"p-colorpicker-panel-inline":o,"p-disabled":E}),st=(o,E)=>({showTransitionParams:o,hideTransitionParams:E}),ct=o=>({value:"visible",params:o});function pt(o,E){if(o&1){let e=v();_(0,"input",9,1),d("click",function(){a(e);let i=l();return s(i.onInputClick());})("keydown",function(i){a(e);let n=l();return s(n.onInputKeydown(i));})("focus",function(){a(e);let i=l();return s(i.onInputFocus());}),r();}if(o&2){let e=l();se("background-color",e.inputBgColor),u("ngClass",W(9,lt,e.disabled))("disabled",e.disabled)("pAutoFocus",e.autofocus),M("tabindex",e.tabindex)("id",e.inputId)("data-pc-section","input")("aria-label",e.ariaLabel);}}function ut(o,E){if(o&1){let e=v();_(0,"div",10),d("click",function(i){a(e);let n=l();return s(n.onOverlayClick(i));})("@overlayAnimation.start",function(i){a(e);let n=l();return s(n.onOverlayAnimationStart(i));})("@overlayAnimation.done",function(i){a(e);let n=l();return s(n.onOverlayAnimationEnd(i));}),_(1,"div",11)(2,"div",12,2),d("touchstart",function(i){a(e);let n=l();return s(n.onColorDragStart(i));})("touchmove",function(i){a(e);let n=l();return s(n.onDrag(i));})("touchend",function(){a(e);let i=l();return s(i.onDragEnd());})("mousedown",function(i){a(e);let n=l();return s(n.onColorMousedown(i));}),_(4,"div",13),S(5,"div",14,3),r()(),_(7,"div",15,4),d("mousedown",function(i){a(e);let n=l();return s(n.onHueMousedown(i));})("touchstart",function(i){a(e);let n=l();return s(n.onHueDragStart(i));})("touchmove",function(i){a(e);let n=l();return s(n.onDrag(i));})("touchend",function(){a(e);let i=l();return s(i.onDragEnd());}),S(9,"div",16,5),r()()();}if(o&2){let e=l();u("ngClass",N(10,at,e.inline,e.disabled))("@overlayAnimation",W(16,ct,N(13,st,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.inline===!0),M("data-pc-section","panel"),p(),M("data-pc-section","content"),p(),M("data-pc-section","selector"),p(2),M("data-pc-section","color"),p(),M("data-pc-section","colorHandle"),p(2),M("data-pc-section","hue"),p(2),M("data-pc-section","hueHandle");}}var dt=({dt:o})=>`
.p-colorpicker {
    display: inline-block;
    position: relative;
}

.p-colorpicker-dragging {
    cursor: pointer;
}

.p-colorpicker-preview {
    width: ${o("colorpicker.preview.width")};
    height: ${o("colorpicker.preview.height")};
    padding: 0;
    border: 0 none;
    border-radius: ${o("colorpicker.preview.border.radius")};
    transition: background ${o("colorpicker.transition.duration")}, color ${o("colorpicker.transition.duration")}, border-color ${o("colorpicker.transition.duration")}, outline-color ${o("colorpicker.transition.duration")}, box-shadow ${o("colorpicker.transition.duration")};
    outline-color: transparent;
    cursor: pointer;
}

.p-colorpicker-preview:enabled:focus-visible {
    border-color: ${o("colorpicker.preview.focus.border.color")};
    box-shadow: ${o("colorpicker.preview.focus.ring.shadow")};
    outline: ${o("colorpicker.preview.focus.ring.width")} ${o("colorpicker.preview.focus.ring.style")} ${o("colorpicker.preview.focus.ring.color")};
    outline-offset: ${o("colorpicker.preview.focus.ring.offset")};
}

.p-colorpicker-panel {
    background: ${o("colorpicker.panel.background")};
    border: 1px solid ${o("colorpicker.panel.border.color")};
    border-radius: ${o("colorpicker.panel.border.radius")};
    box-shadow: ${o("colorpicker.panel.shadow")};
    width: 193px;
    height: 166px;
    position: absolute;
    top: 0;
    left: 0;
}

.p-colorpicker-panel:dir(rtl) {
    left: auto;
    right: 0;
}

.p-colorpicker-panel-inline {
    box-shadow: none;
    position: static;
}

.p-colorpicker-content {
    position: relative;
}

.p-colorpicker-color-selector {
    width: 150px;
    height: 150px;
    top: 8px;
    left: 8px;
    position: absolute;
}

.p-colorpicker-color-selector:dir(rtl) {
    left: auto;
    right: 8px;
}

.p-colorpicker-color-background {
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0) 100%), linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.p-colorpicker-color-handle {
    position: absolute;
    top: 0px;
    left: 150px;
    border-radius: 100%;
    width: 10px;
    height: 10px;
    border-width: 1px;
    border-style: solid;
    margin: -5px 0 0 -5px;
    cursor: pointer;
    opacity: 0.85;
    border-color: ${o("colorpicker.handle.color")};
}

.p-colorpicker-color-handle:dir(rtl) {
    left: auto;
    right: 150px;
    margin: -5px -5px 0 0;
}

.p-colorpicker-hue {
    width: 17px;
    height: 150px;
    top: 8px;
    left: 167px;
    position: absolute;
    opacity: 0.85;
    background: linear-gradient(0deg,
        red 0,
        #ff0 17%,
        #0f0 33%,
        #0ff 50%,
        #00f 67%,
        #f0f 83%,
        red);
}

.p-colorpicker-hue:dir(rtl) {
    left: auto;
    right: 167px;
}

.p-colorpicker-hue-handle {
    position: absolute;
    top: 150px;
    left: 0px;
    width: 21px;
    margin-left: -2px;
    margin-top: -5px;
    height: 10px;
    border-width: 2px;
    border-style: solid;
    opacity: 0.85;
    cursor: pointer;
    border-color: ${o("colorpicker.handle.color")};
}

.p-colorpicker-hue-handle:dir(rtl) {
    left: auto;
    right: 0px;
    margin-left: 0;
    margin-right: -2px;
}
`,ht={root:"p-colorpicker p-component",preview:({props:o})=>["p-colorpicker-preview",{"p-disabled":o.disabled}],panel:({props:o})=>["p-colorpicker-panel",{"p-colorpicker-panel-inline":o.inline,"p-disabled":o.disabled}],content:"p-colorpicker-content",colorSelector:"p-colorpicker-color-selector",colorBackground:"p-colorpicker-color-background",colorHandle:"p-colorpicker-color-handle",hue:"p-colorpicker-hue",hueHandle:"p-colorpicker-hue-handle"},qe=(()=>{class o extends Pe{name="colorpicker";theme=dt;classes=ht;static ɵfac=(()=>{let e;return function(i){return(e||(e=_e(o)))(i||o);};})();static ɵprov=oe({token:o,factory:o.ɵfac});}return o;})();var Ct={provide:Le,useExisting:ie(()=>Y),multi:!0},Y=(()=>{class o extends Ae{overlayService;style;styleClass;inline;format="hex";appendTo;disabled;tabindex;inputId;autoZIndex=!0;baseZIndex=0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";autofocus;onChange=new k();onShow=new k();onHide=new k();containerViewChild;inputViewChild;value={h:0,s:100,b:100};inputBgColor;shown;overlayVisible;defaultColor="ff0000";onModelChange=()=>{};onModelTouched=()=>{};documentClickListener;documentResizeListener;documentMousemoveListener;documentMouseupListener;documentHueMoveListener;scrollHandler;selfClick;colorDragging;hueDragging;overlay;colorSelectorViewChild;colorHandleViewChild;hueViewChild;hueHandleViewChild;_componentStyle=re(qe);constructor(e){super(),this.overlayService=e;}set colorSelector(e){this.colorSelectorViewChild=e;}set colorHandle(e){this.colorHandleViewChild=e;}set hue(e){this.hueViewChild=e;}set hueHandle(e){this.hueHandleViewChild=e;}get ariaLabel(){return this.config?.getTranslation(H.ARIA)[H.SELECT_COLOR];}onHueMousedown(e){this.disabled||(this.bindDocumentMousemoveListener(),this.bindDocumentMouseupListener(),this.hueDragging=!0,this.pickHue(e));}onHueDragStart(e){this.disabled||(this.hueDragging=!0,this.pickHue(e,e.changedTouches[0]));}onColorDragStart(e){this.disabled||(this.colorDragging=!0,this.pickColor(e,e.changedTouches[0]));}pickHue(e,t){let i=t?t.pageY:e.pageY,n=this.hueViewChild?.nativeElement.getBoundingClientRect().top+(this.document.defaultView.pageYOffset||this.document.documentElement.scrollTop||this.document.body.scrollTop||0);this.value=this.validateHSB({h:Math.floor(360*(150-Math.max(0,Math.min(150,i-n)))/150),s:this.value.s,b:this.value.b}),this.updateColorSelector(),this.updateUI(),this.updateModel(),this.onChange.emit({originalEvent:e,value:this.getValueToUpdate()});}onColorMousedown(e){this.disabled||(this.bindDocumentMousemoveListener(),this.bindDocumentMouseupListener(),this.colorDragging=!0,this.pickColor(e));}onDrag(e){this.colorDragging&&(this.pickColor(e,e.changedTouches[0]),e.preventDefault()),this.hueDragging&&(this.pickHue(e,e.changedTouches[0]),e.preventDefault());}onDragEnd(){this.colorDragging=!1,this.hueDragging=!1,this.unbindDocumentMousemoveListener(),this.unbindDocumentMouseupListener();}pickColor(e,t){let i=t?t.pageX:e.pageX,n=t?t.pageY:e.pageY,c=this.colorSelectorViewChild?.nativeElement.getBoundingClientRect(),C=c.top+(this.document.defaultView.pageYOffset||this.document.documentElement.scrollTop||this.document.body.scrollTop||0),g=c.left+this.document.body.scrollLeft,R=Math.floor(100*Math.max(0,Math.min(150,i-g))/150),V=Math.floor(100*(150-Math.max(0,Math.min(150,n-C)))/150);this.value=this.validateHSB({h:this.value.h,s:R,b:V}),this.updateUI(),this.updateModel(),this.onChange.emit({originalEvent:e,value:this.getValueToUpdate()});}getValueToUpdate(){let e;switch(this.format){case"hex":e="#"+this.HSBtoHEX(this.value);break;case"rgb":e=this.HSBtoRGB(this.value);break;case"hsb":e=this.value;break;}return e;}updateModel(){this.onModelChange(this.getValueToUpdate()),this.cd.markForCheck();}writeValue(e){if(e)switch(this.format){case"hex":this.value=this.HEXtoHSB(e);break;case"rgb":this.value=this.RGBtoHSB(e);break;case"hsb":this.value=e;break;}else this.value=this.HEXtoHSB(this.defaultColor);this.updateColorSelector(),this.updateUI(),this.cd.markForCheck();}updateColorSelector(){if(this.colorSelectorViewChild){let e={};e.s=100,e.b=100,e.h=this.value.h,this.colorSelectorViewChild.nativeElement.style.backgroundColor="#"+this.HSBtoHEX(e);}}updateUI(){this.colorHandleViewChild&&this.hueHandleViewChild?.nativeElement&&(this.colorHandleViewChild.nativeElement.style.left=Math.floor(150*this.value.s/100)+"px",this.colorHandleViewChild.nativeElement.style.top=Math.floor(150*(100-this.value.b)/100)+"px",this.hueHandleViewChild.nativeElement.style.top=Math.floor(150-150*this.value.h/360)+"px"),this.inputBgColor="#"+this.HSBtoHEX(this.value);}onInputFocus(){this.onModelTouched();}show(){this.overlayVisible=!0,this.cd.markForCheck();}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.inline||(this.overlay=e.element,this.appendOverlay(),this.autoZIndex&&$.set("overlay",this.overlay,this.config.zIndex.overlay),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.updateColorSelector(),this.updateUI());break;case"void":this.onOverlayHide();break;}}onOverlayAnimationEnd(e){switch(e.toState){case"visible":this.inline||this.onShow.emit({});break;case"void":this.autoZIndex&&$.clear(e.element),this.onHide.emit({});break;}}appendOverlay(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.overlay):Se(this.appendTo,this.overlay));}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.renderer.appendChild(this.el.nativeElement,this.overlay);}alignOverlay(){this.appendTo?Me(this.overlay,this.inputViewChild?.nativeElement):Oe(this.overlay,this.inputViewChild?.nativeElement);}hide(){this.overlayVisible=!1,this.cd.markForCheck();}onInputClick(){this.selfClick=!0,this.togglePanel();}togglePanel(){this.overlayVisible?this.hide():this.show();}onInputKeydown(e){switch(e.code){case"Space":this.togglePanel(),e.preventDefault();break;case"Escape":case"Tab":this.hide();break;default:break;}}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0;}registerOnChange(e){this.onModelChange=e;}registerOnTouched(e){this.onModelTouched=e;}setDisabledState(e){this.disabled=e,this.cd.markForCheck();}bindDocumentClickListener(){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",()=>{this.selfClick||(this.overlayVisible=!1,this.unbindDocumentClickListener()),this.selfClick=!1,this.cd.markForCheck();});}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null);}bindDocumentMousemoveListener(){if(!this.documentMousemoveListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentMousemoveListener=this.renderer.listen(e,"mousemove",t=>{this.colorDragging&&this.pickColor(t),this.hueDragging&&this.pickHue(t);});}}unbindDocumentMousemoveListener(){this.documentMousemoveListener&&(this.documentMousemoveListener(),this.documentMousemoveListener=null);}bindDocumentMouseupListener(){if(!this.documentMouseupListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentMouseupListener=this.renderer.listen(e,"mouseup",()=>{this.colorDragging=!1,this.hueDragging=!1,this.unbindDocumentMousemoveListener(),this.unbindDocumentMouseupListener();});}}unbindDocumentMouseupListener(){this.documentMouseupListener&&(this.documentMouseupListener(),this.documentMouseupListener=null);}bindDocumentResizeListener(){fe(this.platformId)&&(this.documentResizeListener=this.renderer.listen(this.document.defaultView,"resize",this.onWindowResize.bind(this)));}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null);}onWindowResize(){this.overlayVisible&&!ve()&&this.hide();}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Ge(this.containerViewChild?.nativeElement,()=>{this.overlayVisible&&this.hide();})),this.scrollHandler.bindScrollListener();}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener();}validateHSB(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))};}validateRGB(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))};}validateHEX(e){var t=6-e.length;if(t>0){for(var i=[],n=0;n<t;n++)i.push("0");i.push(e),e=i.join("");}return e;}HEXtoRGB(e){let t=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:t>>16,g:(t&65280)>>8,b:t&255};}HEXtoHSB(e){return this.RGBtoHSB(this.HEXtoRGB(e));}RGBtoHSB(e){var t={h:0,s:0,b:0},i=Math.min(e.r,e.g,e.b),n=Math.max(e.r,e.g,e.b),c=n-i;return t.b=n,t.s=n!=0?255*c/n:0,t.s!=0?e.r==n?t.h=(e.g-e.b)/c:e.g==n?t.h=2+(e.b-e.r)/c:t.h=4+(e.r-e.g)/c:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t;}HSBtoRGB(e){var t={r:0,g:0,b:0};let i=e.h,n=e.s*255/100,c=e.b*255/100;if(n==0)t={r:c,g:c,b:c};else{let C=c,g=(255-n)*c/255,R=(C-g)*(i%60)/60;i==360&&(i=0),i<60?(t.r=C,t.b=g,t.g=g+R):i<120?(t.g=C,t.b=g,t.r=C-R):i<180?(t.g=C,t.r=g,t.b=g+R):i<240?(t.b=C,t.r=g,t.g=C-R):i<300?(t.b=C,t.g=g,t.r=g+R):i<360?(t.r=C,t.g=g,t.b=C-R):(t.r=0,t.g=0,t.b=0);}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)};}RGBtoHEX(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var i in t)t[i].length==1&&(t[i]="0"+t[i]);return t.join("");}HSBtoHEX(e){return this.RGBtoHEX(this.HSBtoRGB(e));}onOverlayHide(){this.unbindScrollListener(),this.unbindDocumentResizeListener(),this.unbindDocumentClickListener(),this.overlay=null;}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&this.autoZIndex&&$.clear(this.overlay),this.restoreOverlayAppend(),this.onOverlayHide();}static ɵfac=function(t){return new(t||o)(O(ye));};static ɵcmp=F({type:o,selectors:[["p-colorPicker"],["p-colorpicker"],["p-color-picker"]],viewQuery:function(t,i){if(t&1&&(b(et,5),b(tt,5),b(it,5),b(ot,5),b(nt,5),b(rt,5)),t&2){let n;A(n=T())&&(i.containerViewChild=n.first),A(n=T())&&(i.inputViewChild=n.first),A(n=T())&&(i.colorSelector=n.first),A(n=T())&&(i.colorHandle=n.first),A(n=T())&&(i.hue=n.first),A(n=T())&&(i.hueHandle=n.first);}},inputs:{style:"style",styleClass:"styleClass",inline:[2,"inline","inline",x],format:"format",appendTo:"appendTo",disabled:[2,"disabled","disabled",x],tabindex:"tabindex",inputId:"inputId",autoZIndex:[2,"autoZIndex","autoZIndex",x],baseZIndex:[2,"baseZIndex","baseZIndex",he],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autofocus:[2,"autofocus","autofocus",x]},outputs:{onChange:"onChange",onShow:"onShow",onHide:"onHide"},features:[ue([Ct,qe]),ae],decls:4,vars:11,consts:[["container",""],["input",""],["colorSelector",""],["colorHandle",""],["hue",""],["hueHandle",""],[3,"ngStyle","ngClass"],["type","text","class","p-colorpicker-preview","readonly","readonly",3,"ngClass","disabled","backgroundColor","pAutoFocus","click","keydown","focus",4,"ngIf"],[3,"ngClass","click",4,"ngIf"],["type","text","readonly","readonly",1,"p-colorpicker-preview",3,"click","keydown","focus","ngClass","disabled","pAutoFocus"],[3,"click","ngClass"],[1,"p-colorpicker-content"],[1,"p-colorpicker-color-selector",3,"touchstart","touchmove","touchend","mousedown"],[1,"p-colorpicker-color-background"],[1,"p-colorpicker-color-handle"],[1,"p-colorpicker-hue",3,"mousedown","touchstart","touchmove","touchend"],[1,"p-colorpicker-hue-handle"]],template:function(t,i){t&1&&(_(0,"div",6,0),P(2,pt,2,11,"input",7)(3,ut,11,18,"div",8),r()),t&2&&(ce(i.styleClass),u("ngStyle",i.style)("ngClass",N(8,_t,!i.inline,i.colorDragging||i.hueDragging)),M("data-pc-name","colorpicker")("data-pc-section","root"),p(2),u("ngIf",!i.inline),p(),u("ngIf",i.inline||i.overlayVisible));},dependencies:[me,Ce,U,ge,Ye,$e,G],encapsulation:2,data:{animation:[D("overlayAnimation",[I(":enter",[L({opacity:0,transform:"scaleY(0.8)"}),w("{{showTransitionParams}}")]),I(":leave",[w("{{hideTransitionParams}}",L({opacity:0}))])])]},changeDetection:0});}return o;})(),Ke=(()=>{class o{static ɵfac=function(t){return new(t||o)();};static ɵmod=le({type:o});static ɵinj=ne({imports:[Y,G,G]});}return o;})();function mt(o,E){if(o&1){let e=v();_(0,"div",20)(1,"div",44)(2,"div",45)(3,"p-slider",46),d("onSlideEnd",function(){a(e);let i=l(2);return s(i.changeOption());}),r()()(),_(4,"div",27)(5,"label",47)(6,"span"),m(7,11),r(),_(8,"span"),y(9," - "),r(),_(10,"strong"),y(11),r()()()();}if(o&2){let e,t=l(2);u("@fadeInOut",void 0),p(3),u("min",0)("max",100),p(8),pe((e=t.playerConfigsForm.get("defaultVolume"))==null?null:e.value);}}function ft(o,E){if(o&1){let e=v();_(0,"div",20)(1,"div",25)(2,"p-inputgroup")(3,"p-inputnumber",48),d("onBlur",function(){a(e);let i=l(2);return s(i.changeOption());}),r(),_(4,"p-inputgroup-addon"),y(5,":"),r(),_(6,"p-inputnumber",49),d("onBlur",function(){a(e);let i=l(2);return s(i.changeOption());}),r()()(),_(7,"div",27)(8,"label",50),m(9,12),r(),y(10,"\xA0 "),S(11,"i",51),r()();}o&2&&(u("@fadeInOut",void 0),p(3),u("min",1)("max",21),p(3),u("min",1)("max",21));}function Et(o,E){if(o&1){let e=v();_(0,"div",20)(1,"div",25)(2,"p-inputgroup")(3,"p-inputgroup-addon",52)(4,"p-colorpicker",53),d("onHide",function(){a(e);let i=l(2);return s(i.changeOption());}),r()(),_(5,"input",54),d("blur",function(){a(e);let i=l(2);return s(i.changeOption());}),r()()(),_(6,"div",27)(7,"label",50),m(8,13),r()()();}o&2&&u("@fadeInOut",void 0);}function Rt(o,E){if(o&1){let e=v();_(0,"form",19)(1,"div",20)(2,"div",21)(3,"p-select",22),d("onChange",function(){a(e);let i=l();return s(i.changeOption());}),r()(),_(4,"div")(5,"label",23),m(6,2),r(),_(7,"div")(8,"a",24)(9,"small"),m(10,3),r()()()()(),_(11,"div",20)(12,"div",25)(13,"p-toggleswitch",26),d("onChange",function(){a(e);let i=l();return s(i.changeOption());}),r()(),_(14,"div",27)(15,"label",28),m(16,4),r()()(),_(17,"div",20)(18,"div",25)(19,"p-toggleswitch",29),d("onChange",function(){a(e);let i=l();return s(i.changeOption());}),r()(),_(20,"div",27)(21,"label",30),m(22,5),r()()(),P(23,mt,12,4,"div",31),_(24,"div",20)(25,"div",25)(26,"p-toggleswitch",32),d("onChange",function(){a(e);let i=l();return s(i.changeOption());}),r()(),_(27,"div",27)(28,"label",33),m(29,6),r(),y(30,"\xA0 "),S(31,"i",34),r()(),_(32,"div",20)(33,"div",25)(34,"p-toggleswitch",35),d("onChange",function(){a(e);let i=l();return s(i.changeOption());}),r()(),_(35,"div",27)(36,"label",36),m(37,7),r(),y(38,"\xA0 "),S(39,"i",37),r()(),_(40,"div",20)(41,"div",25)(42,"p-toggleswitch",38),d("onChange",function(){a(e);let i=l();return s(i.changeOption());}),r()(),_(43,"div",27)(44,"label",39),m(45,8),r(),y(46,"\xA0 "),S(47,"i",40),r()(),P(48,ft,12,5,"div",31),_(49,"div",20)(50,"div",25)(51,"p-toggleswitch",41),d("onChange",function(){a(e);let i=l();return s(i.changeOption());}),r()(),_(52,"div",27)(53,"label",39),m(54,9),r()()(),P(55,Et,9,1,"div",31),_(56,"div",20)(57,"div",21)(58,"p-select",42),d("onChange",function(){a(e);let i=l();return s(i.changeOption());}),r()(),_(59,"div",27)(60,"label",43),m(61,10),r()()()();}if(o&2){let e,t,i,n=l();u("formGroup",n.playerConfigsForm),p(3),u("options",n.autoplayOptions)("fluid",!0),p(20),u("ngIf",!((e=n.playerConfigsForm.get("muted"))!=null&&e.value)),p(25),u("ngIf",(t=n.playerConfigsForm.get("fluid"))==null?null:t.value),p(7),u("ngIf",!((i=n.playerConfigsForm.get("bgTransparent"))!=null&&i.value)),p(3),u("options",n.objectFitOptions)("fluid",!0);}}var li=(()=>{class o{constructor(e,t,i,n,c){this.fb=e,this.route=t,this.playerConfigsService=i,this.toastService=n,this.cd=c,this.autoplayOptions=[{name:"muted",value:"muted"},{name:"true",value:!0},{name:"false",value:!1},{name:"play",value:"play"},{name:"any",value:"any"}],this.objectFitOptions=[{name:"contain",value:"contain"},{name:"cover",value:"cover"},{name:"fill",value:"fill"},{name:"none",value:"none"},{name:"scale-down",value:"scale-down"}],this.isDestroyed$=new ee(),this.playerConfigsForm=this.fb.group({autoplay:new f(this.autoplayOptions[0]),controls:new f(!1),muted:new f(!0),defaultVolume:new f(75),playsinline:new f(!0),loop:new f(!0),fluid:new f(!1),aspectRatioH:new f(16),aspectRatioV:new f(9),fullscreen:new f(!1),bgTransparent:new f(!0),hexBackground:new f("#000000"),background:new f("#000000"),objectFit:new f(this.objectFitOptions[0])});}ngOnInit(){this.route.data.pipe(te(this.isDestroyed$)).subscribe(e=>{e.playerConfigs&&this.setValueForm(e.playerConfigs);}),this.playerConfigsForm?.get("hexBackground")?.valueChanges.subscribe(e=>{this.playerConfigsForm?.get("background")?.setValue(e,{emitEvent:!1});}),this.playerConfigsForm?.get("background")?.valueChanges.subscribe(e=>{this.playerConfigsForm?.get("hexBackground")?.setValue(e,{emitEvent:!1});});}ngOnDestroy(){this.isDestroyed$.next(),this.isDestroyed$.complete();}setValueForm(e){Object.keys(e).forEach(t=>{if(t==="autoplay"){let n=this.autoplayOptions.find(c=>c.value===e.autoplay);n&&this.playerConfigsForm?.get("autoplay")?.setValue(n);return;}if(t==="objectFit"){let n=this.objectFitOptions.find(c=>c.value===e.objectFit);n&&this.playerConfigsForm?.get("objectFit")?.setValue(n);return;}if(t==="aspectRatio"){let n=e[t]?e[t]?.split(":").map(c=>parseInt(c)):[16,9];this.playerConfigsForm?.get("aspectRatioH")?.setValue(n[0]),this.playerConfigsForm?.get("aspectRatioV")?.setValue(n[1]);return;}if(t==="background"){this.playerConfigsForm?.get(t)?.setValue(e[t]),this.playerConfigsForm?.get("hexBackground")?.setValue(e[t]);return;}let i=e[t];([!0,!1].includes(i)||typeof i=="number")&&this.playerConfigsForm?.get(t)?.setValue(i);});}changeOption(){let e={autoplay:this.playerConfigsForm?.get("autoplay")?.value.value,controls:this.playerConfigsForm?.get("controls")?.value,muted:this.playerConfigsForm?.get("muted")?.value,defaultVolume:this.playerConfigsForm?.get("defaultVolume")?.value,playsinline:this.playerConfigsForm?.get("playsinline")?.value,loop:this.playerConfigsForm?.get("loop")?.value,fluid:this.playerConfigsForm?.get("fluid")?.value,fullscreen:this.playerConfigsForm?.get("fullscreen")?.value,bgTransparent:this.playerConfigsForm?.get("bgTransparent")?.value,background:this.playerConfigsForm?.get("background")?.value,objectFit:this.playerConfigsForm?.get("objectFit")?.value.value};e.fluid&&(e.aspectRatio=this.playerConfigsForm?.get("aspectRatioH")?.value+":"+this.playerConfigsForm?.get("aspectRatioV")?.value),this.playerConfigsService.saveConfigs(e).subscribe(t=>{t?this.toastService.success("Saved successfully","MPVW save Player configs"):this.toastService.warning("Unable to save data. The submitted data might be empty or may not differ from the current data.","MPVW save Player configs");});}static{this.ɵfac=function(t){return new(t||o)(O(Ne),O(Ee),O(be),O(Re),O(de));};}static{this.ɵcmp=F({type:o,selectors:[["app-player"]],decls:8,vars:1,consts:()=>{let e;e="Player settings for video.js";let t;t="More about videojs.com";let i;i="Indicates to the browser that non-fullscreen playback is preferred when fullscreen playback is the native default, such as in iOS Safari.";let n;n="Causes the video to start over as soon as it ends.";let c;c="When true, the Video.js player will have a fluid size. In other words, it will scale to fit its container at the video's intrinsic aspect ratio, or at a specified aspectRatio.";let C;C="Autoplay when video loaded";let g;g="(More info on autoplay support and changes)";let R;R="Show control panel";let V;V="Muted audio";let B;B="Plays inline";let X;X="Loop video";let j;j="Fluid - size by aspects ratio";let z;z="Transparent background";let Q;Q="How to make a video fill the viewport";let Z;Z="Default volume";let q;q="Puts the player in fluid mode and the value is used when calculating the dynamic size of the player. The value should represent a ratio - two numbers separated by a colon (e.g. \"16:9\" or \"4:3\").";let K;K="Aspect Ratio";let J;return J="Background color",[e,t,C,g,R,V,B,X,j,z,Q,Z,K,J,[1,"flex","justify-between","items-center","flex-col","md:flex-row","gap-4"],[1,"text-center"],[1,"text-sm","font-normal","text-center"],["href","https://videojs.com/","target","_blank"],["class","flex flex-col gap-6",3,"formGroup",4,"ngIf"],[1,"flex","flex-col","gap-6",3,"formGroup"],[1,"grid","grid-cols-[auto_1fr]","gap-6"],[1,"w-[150px]"],["inputId","autoplay","formControlName","autoplay","scrollHeight","300px","optionLabel","name",3,"onChange","options","fluid"],["for","autoplay"],["href","https://videojs.com/blog/autoplay-best-practices-with-video-js/","target","_blank"],[1,"w-[150px]","text-right"],["inputId","controls","formControlName","controls",3,"onChange"],[1,"flex","items-center"],["for","controls"],["inputId","muted","formControlName","muted",3,"onChange"],["for","muted"],["class","grid grid-cols-[auto_1fr] gap-6",4,"ngIf"],["inputId","playsinline","formControlName","playsinline",3,"onChange"],["for","playsinline"],["pTooltip",i,1,"pi","pi-info-circle"],["inputId","loop","formControlName","loop",3,"onChange"],["for","loop"],["pTooltip",n,1,"pi","pi-info-circle"],["inputId","fluid","formControlName","fluid",3,"onChange"],["for","fluid"],["pTooltip",c,1,"pi","pi-info-circle"],["inputId","bgTransparent","formControlName","bgTransparent",3,"onChange"],["inputId","objectFit","formControlName","objectFit","scrollHeight","300px","optionLabel","name",3,"onChange","options","fluid"],["for","objectFit"],[1,"w-[150px]","flex","items-center"],[1,"w-full"],["formControlName","defaultVolume","styleClass","w-full",3,"onSlideEnd","min","max"],["for","defaultVolume"],["inputId","aspectRatioH","formControlName","aspectRatioH","inputStyleClass","text-center",3,"onBlur","min","max"],["inputId","aspectRatioV","formControlName","aspectRatioV","inputStyleClass","text-center",3,"onBlur","min","max"],["for","aspectRatio"],["pTooltip",q,1,"pi","pi-info-circle"],["styleClass","colorpicker"],["inputId","backgroundColorpicker","formControlName","background",3,"onHide"],["pInputText","","id","backgroundHex","formControlName","hexBackground",1,"text-center",3,"blur"]];},template:function(t,i){t&1&&(_(0,"app-page-header")(1,"div",14)(2,"div",15),m(3,0),r(),_(4,"div",16)(5,"a",17),m(6,1),r()()()(),P(7,Rt,62,8,"form",18)),t&2&&(p(7),u("ngIf",i.playerConfigsForm));},dependencies:[Te,U,De,Ve,we,Ie,xe,ke,Fe,We,He,Xe,je,ze,Ze,Qe,Ke,Y,Ue,Be],styles:["[_nghost-%COMP%]{width:100%}.colorpicker[_ngcontent-%COMP%]{padding:0 .15rem;min-width:0}"],data:{animation:[D("fadeInOut",[I(":enter",[L({opacity:0}),w("300ms ease-in",L({opacity:1}))]),I(":leave",[w("300ms ease-out",L({opacity:0}))])])]}});}}return o;})();export{li as PlayerComponent};/**i18n:a5ea5908a976e3a32fb15cfaca88ebd3db9d27e834fb75cf57f29ba2368e24cd*/