import{a as st,b as he,e as D}from"./chunk-LY3TUW2B.js";import"./chunk-YSB3EXGJ.js";import{a as Oe,b as dt,r as L,s as ct,t as ut,v as Re,w as ye,x as ve}from"./chunk-JZVU37ZI.js";import{c as mt}from"./chunk-VFETGQS2.js";import{a as pt}from"./chunk-QHJJLV3U.js";import"./chunk-5NX4V4UA.js";import"./chunk-D6SYNZK4.js";import"./chunk-SXNK4P2R.js";import"./chunk-5H6PQV5Y.js";import"./chunk-HOBBIUEH.js";import"./chunk-SW7IGQ6L.js";import{A as re}from"./chunk-VMPGITBT.js";import"./chunk-S5OPFI5G.js";import"./chunk-6ZSPPAUO.js";import{b as G}from"./chunk-X7R57V6U.js";import{c as $}from"./chunk-KP34JQHZ.js";import"./chunk-CHJSFALA.js";import{u as rt}from"./chunk-K6U64Q72.js";import{a as Ae}from"./chunk-KZ26MFAT.js";import{C as y,D as v,c as Me,g as b,h as U,n as tt,o as Y,q as nt,r as B,u as j}from"./chunk-Y4WF5HJS.js";import{$a as z,Aa as s,Bb as N,C as ze,D as Ze,Dc as te,E as xe,Fc as ue,Gc as x,He as it,Jb as De,Ka as f,Kb as Ke,Lb as Z,Me as h,Oa as Ye,Oc as ge,Q as se,Qa as Be,Qb as q,Rb as Ee,Sc as et,Sh as ie,Wb as me,Xb as de,Yb as ce,Zc as ne,_a as W,aa as M,bb as je,cb as qe,cc as pe,db as Qe,eb as d,ec as le,ee as ot,fa as S,fb as r,ga as T,gb as o,gi as at,hb as c,i as We,li as lt,mi as Ie,nf as Pe,oa as ke,pa as Xe,pe as oe,pf as Ce,qc as Je,qh as Ne,ra as Ve,rb as Q,rh as _t,tb as H,ub as K,vb as a,wa as Ue,wb as J,xb as ee,xc as I,yb as He,yc as P,yf as fe,zb as C,zc as Fe}from"./chunk-R4Z6ZI3L.js";import{a as ae,b as Te,e as we,i as u}from"./chunk-P6NJDXIL.js";var Tt=we((io,vt)=>{vt.exports=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round-icon lucide-key-round">
  <path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" />
  <circle cx="16.5" cy="7.5" r=".5" fill="currentColor" />
</svg>
`;});var Dt=we((ro,bt)=>{bt.exports=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-briefcase-business-icon lucide-briefcase-business">
  <path d="M12 12h.01" />
  <path d="M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2" />
  <path d="M22 13a18.15 18.15 0 0 1-20 0" />
  <rect width="20" height="14" x="2" y="6" rx="2" />
</svg>
`;});var Mt=(()=>{let i=class i extends he{};u(i,"\u0275fac",(()=>{let n;return function(e){return(n||(n=Xe(i)))(e||i);};})()),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-stepper"]],features:[pe([{provide:he,useExisting:i}]),Ye],decls:2,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(t,e){t&1&&(r(0,"div"),c(1,"div",0),o()),t&2&&(s(),d("ngTemplateOutlet",e.selected?e.selected.content:null));},dependencies:[ne,et],encapsulation:2}));let _=i;return _;})();function be(){return"no_welcome_modal";}var Ct=(()=>{let i=class i{hide=I();};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-documentation"]],outputs:{hide:"hide"},decls:55,vars:0,consts:()=>{let n;n="Ch\xFAc m\u1EEBng";let t;t="M\xE1y ch\u1EE7 c\u1EE7a b\u1EA1n \u0111\xE3 \u0111\u01B0\u1EE3c c\u1EA5u h\xECnh xong!";let e;e="B\xE2y gi\u1EDD h\xE3y th\xEAm th\xF4ng tin v\u1EC1 m\xE1y ch\u1EE7 c\u1EE7a b\u1EA1n! "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"C\xE0i \u0111\u1EB7t m\xF4 t\u1EA3"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+", n\xEAu r\xF5 "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"b\u1EA1n l\xE0 ai"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+", v\xEC sao "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"b\u1EA1n t\u1EA1o ra m\xE1y ch\u1EE7 n\xE0y"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" v\xE0 "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"bao l\xE2u"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" b\u1EA1n d\u1EF1 \u0111\u1ECBnh "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"v\u1EADn h\xE0nh n\xF3"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" r\u1EA5t quan tr\u1ECDng \u0111\u1EC3 ng\u01B0\u1EDDi truy c\u1EADp hi\u1EC3u lo\u1EA1i website h\u1ECD \u0111ang xem. ",e=He(e);let l;l="M\u1EB9o kh\xE1c";let p;p="Trang web PeerTube ch\xEDnh th\u1EE9c:";let g;g="B\xE0i blog, tr\u1EE3 gi\xFAp ho\u1EB7c kh\xE1m ph\xE1 PeerTube";let A;A="Ch\u1EC9 m\u1EE5c PeerTube c\xF4ng khai:";let E;E="\u0110\u01B0a m\xE1y ch\u1EE7 c\u1EE7a b\u1EA1n l\xEAn ch\u1EC9 m\u1EE5c c\xF4ng khai ch\xEDnh th\u1EE9c c\u1EE7a PeerTube";let k;k="T\xE0i li\u1EC7u";let X;X="Qu\u1EA3n tr\u1ECB vi\xEAn:";let V;V="Qu\u1EA3n l\xFD ng\u01B0\u1EDDi d\xF9ng, theo d\xF5i c\xE1c m\xE1y ch\u1EE7 kh\xE1c, x\u1EED l\xFD spam, c\u1EA5u h\xECnh dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF ho\u1EB7c chuy\u1EC3n m\xE3 t\u1EEB xa...";let O;O="Thi\u1EBFt l\u1EADp t\xE0i kho\u1EA3n, qu\u1EA3n l\xFD danh s\xE1ch ph\xE1t, kh\xE1m ph\xE1 \u1EE9ng d\u1EE5ng b\xEAn th\u1EE9 ba...";let R;R="CLI:";let Ge;Ge="T\u1EA3i l\xEAn ho\u1EB7c nh\u1EADp video t\u1EEB ngu\u1ED3n kh\xE1c, parse logs, prune storage directories, \u0111\u1EB7t l\u1EA1i m\u1EADt kh\u1EA9u ng\u01B0\u1EDDi d\xF9ng...";let $e;$e="\u0110\xF3ng";let Le;return Le="\u0110i\u1EC1n th\xF4ng tin m\xE1y ch\u1EE7",[n,t,e,l,p,g,A,E,k,X,V,O,R,Ge,$e,Le,[1,"root"],[1,"one-column"],[1,"mascot-container"],["src","/client/assets/images/mascot/happy.svg","alt","mascot",1,"mascot"],[1,"title"],[1,"sub-title"],[1,"mt-4"],[1,"text-content"],["href","https://joinpeertube.org","target","_blank",1,"link-primary","me-1"],["href","https://instances.joinpeertube.org/instances","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/admin/following-instances","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/use/setup-account","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/maintain/tools","target","_blank",1,"link-primary","me-1"],[1,"buttons"],["theme","secondary",3,"click"],["theme","primary","ptRouterLink","/admin/settings/config",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",16)(1,"div",17)(2,"div",18),c(3,"img",19),o(),r(4,"h4")(5,"div",20),a(6,0),o(),r(7,"div",21),a(8,1),o()()(),r(9,"div",22)(10,"span",23),H(11,2),c(12,"strong")(13,"strong")(14,"strong")(15,"strong")(16,"strong"),K(),o()(),r(17,"div",22)(18,"h5"),a(19,3),o(),r(20,"ul",23)(21,"li")(22,"a",24),a(23,4),o(),r(24,"span"),a(25,5),o()(),r(26,"li")(27,"a",25),a(28,6),o(),r(29,"span"),a(30,7),o()()()(),r(31,"div",22)(32,"h5"),a(33,8),o(),r(34,"ul",23)(35,"li")(36,"a",26),a(37,9),o(),r(38,"span"),a(39,10),o()(),r(40,"li")(41,"a",27),q(42,"User:"),o(),r(43,"span"),a(44,11),o()(),r(45,"li")(46,"a",28),a(47,12),o(),r(48,"span"),a(49,13),o()()()(),r(50,"div",29)(51,"my-button",30),C("click",function(){return e.hide.emit();}),a(52,14),o(),r(53,"my-button",31),C("click",function(){return e.hide.emit();}),a(54,15),o()()());},dependencies:[$],styles:[`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-TG2MVLVA.css.map */`]}));let _=i;return _;})();var ft=_=>({"input-error":_});function ht(_,i){if(_&1&&(r(0,"div",22),q(1),o()),_&2){let m=N();s(),Ee(m.formErrors.platformName);}}function Rt(_,i){if(_&1&&(r(0,"div",22),q(1),o()),_&2){let m=N();s(),Ee(m.formErrors.shortDescription);}}function yt(_,i){if(_&1){let m=Q();r(0,"my-button",34),C("click",function(){S(m);let t=N();return T(t.back.emit());}),a(1,10),o();}}var Nt=(()=>{let i=class i{server=M(ie);formReactiveService=M(G);themeService=M(Ie);currentStep=P.required({transform:x});totalSteps=P.required({transform:x});showBack=P.required({transform:ue});back=I();next=I();hide=I();form;formErrors={};validationMessages={};ngOnInit(){this.buildForm();let n=it(this.server.getHTMLConfig().instance.avatars,128);n&&fetch(n.fileUrl).then(t=>t.blob()).then(t=>this.form.patchValue({avatar:t})).catch(()=>{Ce.error("Could not fetch instance avatar");});}buildForm(){let n={platformName:Oe,shortDescription:dt,avatar:null,primaryColor:mt},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.getDefaultValues());this.form=t,this.formErrors=e,this.validationMessages=l;}getDefaultValues(){let n=this.server.getHTMLConfig(),t=n.theme.customization.primaryColor,e=t?this.themeService.formatColorForForm(t):this.themeService.formatColorForForm(this.themeService.getCSSConfigValue("primaryColor"));return{platformName:n.instance.name,shortDescription:n.instance.shortDescription,avatar:void 0,primaryColor:e};}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-edit-info"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"],showBack:[1,"showBack"]},outputs:{back:"back",next:"next",hide:"hide"},decls:39,vars:14,consts:()=>{let n;n="B\u01AF\u1EDAC "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="Th\xF4ng tin chung";let e;e="B\u1EA1n c\xF3 th\u1EC3 ch\u1EC9nh s\u1EEDa th\xF4ng tin n\xE0y sau";let l;l="T\xEAn m\xE1y ch\u1EE7";let p;p="M\xF4 t\u1EA3 ng\u1EAFn";let g;g="Bi\u1EC3u t\u01B0\u1EE3ng m\xE1y ch\u1EE7";let A;A="\u0110\u01B0\u1EE3c s\u1EED d\u1EE5ng \u1EDF nhi\u1EC1u n\u01A1i nh\u01B0 tr\xEAn trang web, \u1EE9ng d\u1EE5ng di \u0111\u1ED9ng v\xE0 m\u1EA1ng x\xE3 h\u1ED9i";let E;E="M\xE0u ch\xEDnh";let k;k="B\u01B0\u1EDBc k\u1EBF ti\u1EBFp";let X;X="B\u1ECF qua b\xE2y gi\u1EDD";let V;return V="Quay l\u1EA1i",[n,t,e,l,p,g,A,E,k,X,V,[1,"root"],[1,"two-columns"],["src","/client/assets/images/mascot/pointing.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content"],[3,"formGroup"],[1,"form-group"],["for","platformName"],["type","text","id","platformName","formControlName","platformName",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","shortDescription"],["id","shortDescription","formControlName","shortDescription",1,"form-control","small",3,"ngClass"],["for","avatarfile"],[1,"form-group-description"],["formControlName","avatar","inputName","avatar","displayDelete","true",1,"avatar-preview"],["for","primaryColor"],["inputId","primaryColor","formControlName","primaryColor",3,"formError"],[1,"buttons"],["icon","arrow-left","theme","secondary"],["theme","primary",3,"click","disabled"],[1,"button-as-link",3,"click"],["icon","arrow-left","theme","secondary",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",11)(1,"div",12)(2,"div"),c(3,"img",13),o(),r(4,"div")(5,"div",14)(6,"div",15),a(7,0),o()(),r(8,"h4",16),a(9,1),o(),r(10,"div",17),a(11,2),o(),r(12,"form",18)(13,"div",19)(14,"label",20),a(15,3),o(),c(16,"input",21),W(17,ht,2,1,"div",22),o(),r(18,"div",19)(19,"label",23),a(20,4),o(),c(21,"textarea",24),W(22,Rt,2,1,"div",22),o(),r(23,"div",19)(24,"label",25),a(25,5),o(),r(26,"div",26),a(27,6),o(),c(28,"my-preview-upload",27),o(),r(29,"div",19)(30,"label",28),a(31,7),o(),c(32,"my-peertube-color-picker",29),o(),r(33,"div",30),W(34,yt,2,0,"my-button",31),r(35,"my-button",32),C("click",function(){return e.next.emit(e.form.value);}),a(36,8),o(),r(37,"button",33),C("click",function(){return e.hide.emit();}),a(38,9),o()()()()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(5),d("formGroup",e.form),s(4),d("ngClass",le(10,ft,e.formErrors.platformName)),s(),z(e.formErrors.platformName?17:-1),s(4),d("ngClass",le(12,ft,e.formErrors.shortDescription)),s(),z(e.formErrors.shortDescription?22:-1),s(10),d("formError",e.formErrors.primaryColor),s(2),z(e.showBack()?34:-1),s(),d("disabled",!e.form.valid));},dependencies:[ne,ge,y,Y,Me,b,U,v,B,j,ct,D,$,pt],styles:[`form[_ngcontent-%COMP%]{margin-top:calc(1.325rem + .9vw)}@media (min-width: 1200px){form[_ngcontent-%COMP%]{margin-top:2rem}}.mascot[_ngcontent-%COMP%]{margin-top:-90px;width:170px;height:190px}.avatar-preview[_ngcontent-%COMP%]{width:128px;height:128px}@media screen and (max-width: 800px){.mascot[_ngcontent-%COMP%]{display:none}.two-columns[_ngcontent-%COMP%]{justify-content:center}}textarea[_ngcontent-%COMP%]{min-height:150px}
/*# sourceMappingURL=admin-config-wizard-edit-info.component-4TU26BTH.css.map */`,`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-TG2MVLVA.css.map */`]}));let _=i;return _;})();var It=(()=>{let i=class i{formReactiveService=M(G);usageType=te.required();form;formErrors={};validationMessages={};registrationOptions=[{id:"open",label:"M\u1EDF",description:"B\u1EA5t k\u1EF3 ai c\u0169ng c\xF3 th\u1EC3 \u0111\u0103ng k\xFD v\xE0 s\u1EED d\u1EE5ng m\xE1y ch\u1EE7"},{id:"approval",label:"Duy\u1EC7t th\u1EE7 c\xF4ng",description:"B\u1EA5t k\u1EF3 ai c\u0169ng c\xF3 th\u1EC3 \u0111\u0103ng k\xFD, nh\u01B0ng ng\u01B0\u1EDDi ki\u1EC3m duy\u1EC7t ph\u1EA3i ph\xEA duy\u1EC7t t\xE0i kho\u1EA3n c\u1EE7a h\u1ECD tr\u01B0\u1EDBc khi h\u1ECD c\xF3 th\u1EC3 s\u1EED d\u1EE5ng"},{id:"closed",label:"\u0110\xE3 \u0111\xF3ng",description:"Ch\u1EC9 c\xF3 qu\u1EA3n tr\u1ECB vi\xEAn m\u1EDBi c\xF3 th\u1EC3 t\u1EA1o ng\u01B0\u1EDDi d\xF9ng tr\xEAn m\xE1y ch\u1EE7"}];importOptions=[{id:"enabled",label:"\u0110\xE3 b\u1EADt",description:"Your community can import videos from remote platforms (YouTube, Vimeo...) and automatically synchronize remote channels"},{id:"disabled",label:"\u0110\xE3 t\u1EAFt",description:"C\u1ED9ng \u0111\u1ED3ng c\u1EE7a b\u1EA1n kh\xF4ng th\u1EC3 nh\u1EADp ho\u1EB7c \u0111\u1ED3ng b\u1ED9 h\xF3a n\u1ED9i dung t\u1EEB c\xE1c n\u1EC1n t\u1EA3ng kh\xE1c"}];liveOptions=[{id:"enabled",label:"C\xF3",description:"C\u1ED9ng \u0111\u1ED3ng c\u1EE7a b\u1EA1n c\xF3 th\u1EC3 ph\xE1t tr\u1EF1c ti\u1EBFp tr\xEAn n\u1EC1n t\u1EA3ng (\u0111i\u1EC1u n\xE0y \u0111\xF2i h\u1ECFi c\xF4ng vi\u1EC7c ki\u1EC3m duy\u1EC7t b\u1ED5 sung)"},{id:"disabled",label:"Kh\xF4ng",description:"C\u1ED9ng \u0111\u1ED3ng c\u1EE7a b\u1EA1n kh\xF4ng \u0111\u01B0\u1EE3c ph\xE9p ph\xE1t tr\u1EF1c ti\u1EBFp tr\xEAn n\u1EC1n t\u1EA3ng"}];globalSearchOptions=[{id:"enabled",label:"B\u1EADt t\xECm ki\u1EBFm to\xE0n c\u1EA7u",description:"S\u1EED d\u1EE5ng https://sepiasearch.org l\xE0m c\xF4ng c\u1EE5 t\xECm ki\u1EBFm m\u1EB7c \u0111\u1ECBnh \u0111\u1EC3 t\xECm ki\u1EBFm n\u1ED9i dung tr\xEAn t\u1EA5t c\u1EA3 m\xE1y ch\u1EE7 PeerTube \u0111\xE3 bi\u1EBFt"},{id:"disabled",label:"T\u1EAFt t\xECm ki\u1EBFm to\xE0n c\u1EA7u",description:"S\u1EED d\u1EE5ng c\xF4ng c\u1EE5 t\xECm ki\u1EBFm n\u1EC1n t\u1EA3ng c\u1EE7a b\u1EA1n ch\u1EC9 hi\u1EC3n th\u1ECB n\u1ED9i dung m\xE1y ch\u1EE7"}];videoQuotaOptions=ut();ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={registration:null,remoteImport:null,videoQuota:null,live:null,globalSearch:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-community-based-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:21,vars:6,consts:()=>{let n;n="Ch\xEDnh s\xE1ch \u0111\u0103ng k\xFD";let t;t="H\u1EA1n m\u1EE9c video cho ng\u01B0\u1EDDi d\xF9ng m\u1EDBi";let e;e="Nh\u1EADp video v\xE0 \u0111\u1ED3ng b\u1ED9 h\xF3a";let l;l="C\u1ED9ng \u0111\u1ED3ng c\u1EE7a t\xF4i c\xF3 th\u1EC3 ph\xE1t tr\u1EF1c ti\u1EBFp";let p;return p="T\xECm ki\u1EBFm",[n,t,e,l,p,[3,"formGroup"],[1,"form-group"],["for",""],["inputId","registration","formControlName","registration",3,"items"],["inputId","videoQuota","formControlName","videoQuota",3,"items"],["for","remoteImport"],["inputId","remoteImport","formControlName","remoteImport",3,"items"],["inputId","live","formControlName","live",3,"items"],["inputId","globalSearch","formControlName","globalSearch",3,"items"]];},template:function(t,e){t&1&&(r(0,"form",5)(1,"div",6)(2,"label",7),a(3,0),o(),c(4,"my-select-options",8),o(),r(5,"div",6)(6,"label",7),a(7,1),o(),c(8,"my-select-options",9),o(),r(9,"div",6)(10,"label",10),a(11,2),o(),c(12,"my-select-options",11),o(),r(13,"div",6)(14,"label",7),a(15,3),o(),c(16,"my-select-options",12),o(),r(17,"div",6)(18,"label",7),a(19,4),o(),c(20,"my-select-options",13),o()()),t&2&&(d("formGroup",e.form),s(4),d("items",e.registrationOptions),s(4),d("items",e.videoQuotaOptions),s(4),d("items",e.importOptions),s(4),d("items",e.liveOptions),s(4),d("items",e.globalSearchOptions));},dependencies:[y,Y,b,U,v,B,j,L,D,re],encapsulation:2}));let _=i;return _;})();var At=(()=>{let i=class i{formReactiveService=M(G);usageType=te.required();form;formErrors={};validationMessages={};p2pOptions=[{id:"enabled",label:"\u0110\xE3 b\u1EADt",description:"B\u1EADt ph\xE1t tr\u1EF1c tuy\u1EBFn P2P theo m\u1EB7c \u0111\u1ECBnh cho ng\u01B0\u1EDDi d\xF9ng \u1EA9n danh v\xE0 ng\u01B0\u1EDDi d\xF9ng m\u1EDBi"},{id:"disabled",label:"\u0110\xE3 t\u1EAFt",description:"T\u1EAFt ph\xE1t tr\u1EF1c tuy\u1EBFn P2P"}];transcriptionOptions=[{id:"enabled",label:"\u0110\xE3 b\u1EADt",description:"Cho ph\xE9p t\u1EF1 \u0111\u1ED9ng phi\xEAn \xE2m video \u0111\u1EC3 t\u1EF1 \u0111\u1ED9ng t\u1EA1o ph\u1EE5 \u0111\u1EC1"},{id:"disabled",label:"\u0110\xE3 t\u1EAFt",description:"T\u1EAFt t\xEDnh n\u0103ng t\u1EF1 \u0111\u1ED9ng phi\xEAn \xE2m video"}];keepOriginalVideoOptions=[{id:"enabled",label:"C\xF3",description:"Gi\u1EEF l\u1EA1i t\u1EC7p video g\u1ED1c tr\xEAn m\xE1y ch\u1EE7"},{id:"disabled",label:"Kh\xF4ng",description:"X\xF3a t\u1EC7p video g\u1ED1c sau khi x\u1EED l\xFD"}];authenticationOptions=[{id:"local",label:"\u0110\xE3 t\u1EAFt",description:"M\xE1y ch\u1EE7 c\u1EE7a b\u1EA1n s\u1EBD qu\u1EA3n l\xFD vi\u1EC7c \u0111\u0103ng k\xFD v\xE0 \u0111\u0103ng nh\u1EADp c\u1EE7a ng\u01B0\u1EDDi d\xF9ng n\u1ED9i b\u1ED9"},{id:"ldap",label:"LDAP",description:"S\u1EED d\u1EE5ng LDAP \u0111\u1EC3 x\xE1c th\u1EF1c ng\u01B0\u1EDDi d\xF9ng"},{id:"oidc",label:"OIDC",description:"S\u1EED d\u1EE5ng OpenID Connect \u0111\u1EC3 x\xE1c th\u1EF1c ng\u01B0\u1EDDi d\xF9ng"},{id:"saml",label:"SAML",description:"S\u1EED d\u1EE5ng SAML 2.0 \u0111\u1EC3 x\xE1c th\u1EF1c ng\u01B0\u1EDDi d\xF9ng"}];ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={keepOriginalVideo:null,p2p:null,transcription:null,authType:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-institutional-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:21,vars:5,consts:()=>{let n;n="L\u01B0u m\u1ED9t b\u1EA3n sao c\u1EE7a video t\u1EA3i l\xEAn";let t;t="P2P";let e;e="Gi\xFAp n\u1EC1n t\u1EA3ng c\u1EE7a b\u1EA1n ph\xE2n ph\u1ED1i n\u1ED9i dung video, nh\u01B0ng "+"\uFFFD#10\uFFFD"+"gi\u1EA3m s\u1EF1 ri\xEAng t\u01B0 "+"\uFFFD#11\uFFFD"+""+"\uFFFD/#11\uFFFD"+""+"\uFFFD/#10\uFFFD"+" c\u1EE7a ng\u01B0\u1EDDi d\xF9ng ";let l;l="B\u1EA3n ghi video";let p;return p="X\xE1c th\u1EF1c t\u1EEB xa",[n,t,e,l,p,[3,"formGroup"],[1,"form-group"],["for","keepOriginalVideo"],["inputId","keepOriginalVideo","formControlName","keepOriginalVideo",3,"items"],["for","p2p"],[1,"form-group-description"],["href","https://docs.joinpeertube.org/admin/privacy-guide#player-p2p","target","_blank"],["iconName","external-link"],["inputId","p2p","formControlName","p2p",3,"items"],["for","transcription"],["inputId","transcription","formControlName","transcription",3,"items"],["for","authType"],["inputId","authType","formControlName","authType",3,"items"]];},template:function(t,e){t&1&&(r(0,"form",5)(1,"div",6)(2,"label",7),a(3,0),o(),c(4,"my-select-options",8),o(),r(5,"div",6)(6,"label",9),a(7,1),o(),r(8,"div",10),H(9,2),r(10,"a",11),c(11,"my-global-icon",12),o(),K(),o(),c(12,"my-select-options",13),o(),r(13,"div",6)(14,"label",14),a(15,3),o(),c(16,"my-select-options",15),o(),r(17,"div",6)(18,"label",16),a(19,4),o(),c(20,"my-select-options",17),o()()),t&2&&(d("formGroup",e.form),s(4),d("items",e.keepOriginalVideoOptions),s(8),d("items",e.p2pOptions),s(4),d("items",e.transcriptionOptions),s(4),d("items",e.authenticationOptions));},dependencies:[y,Y,b,U,v,B,j,L,D,re,Ae],encapsulation:2}));let _=i;return _;})();var Ot=(()=>{let i=class i{formReactiveService=M(G);usageType=te.required();form;formErrors={};validationMessages={};importOptions=[{id:"enabled",label:"\u0110\xE3 b\u1EADt",description:"Ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 nh\u1EADp video t\u1EEB c\xE1c n\u1EC1n t\u1EA3ng kh\xE1c (YouTube, Vimeo...) v\xE0 t\u1EF1 \u0111\u1ED9ng \u0111\u1ED3ng b\u1ED9 h\xF3a c\xE1c k\xEAnh t\u1EEB xa"},{id:"disabled",label:"\u0110\xE3 t\u1EAFt",description:"V\xF4 hi\u1EC7u h\xF3a nh\u1EADp video v\xE0 \u0111\u1ED3ng b\u1ED9 h\xF3a k\xEAnh"}];liveOptions=[{id:"enabled",label:"C\xF3"},{id:"disabled",label:"Kh\xF4ng"}];keepOriginalVideoOptions=[{id:"enabled",label:"C\xF3",description:"Gi\u1EEF l\u1EA1i t\u1EC7p video g\u1ED1c tr\xEAn m\xE1y ch\u1EE7"},{id:"disabled",label:"Kh\xF4ng",description:"X\xF3a t\u1EC7p video g\u1ED1c sau khi x\u1EED l\xFD"}];ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={remoteImport:null,live:null,keepOriginalVideo:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-private-instance-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:13,vars:4,consts:()=>{let n;n="Nh\u1EADp video v\xE0 \u0111\u1ED3ng b\u1ED9 h\xF3a";let t;t="Ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 ph\xE1t tr\u1EF1c ti\u1EBFp";let e;return e="L\u01B0u m\u1ED9t b\u1EA3n sao c\u1EE7a video t\u1EA3i l\xEAn",[n,t,e,[3,"formGroup"],[1,"form-group"],["for","remoteImport"],["inputId","remoteImport","formControlName","remoteImport",3,"items"],["for","live"],["inputId","live","formControlName","live",3,"items"],["for","keepOriginalVideo"],["inputId","keepOriginalVideo","formControlName","keepOriginalVideo",3,"items"]];},template:function(t,e){t&1&&(r(0,"form",3)(1,"div",4)(2,"label",5),a(3,0),o(),c(4,"my-select-options",6),o(),r(5,"div",4)(6,"label",7),a(7,1),o(),c(8,"my-select-options",8),o(),r(9,"div",4)(10,"label",9),a(11,2),o(),c(12,"my-select-options",10),o()()),t&2&&(d("formGroup",e.form),s(4),d("items",e.importOptions),s(4),d("items",e.liveOptions),s(4),d("items",e.keepOriginalVideoOptions));},dependencies:[y,Y,b,U,v,B,j,L,D,re],encapsulation:2}));let _=i;return _;})();var _e=class _{registration;videoQuota;remoteImport;live;globalSearch;defaultPrivacy;defaultCommentPolicy;p2p;federation;keepOriginalVideo;allowReplaceFile;preferDisplayName;transcription;authType;unsafeExplanations=[];config={};plugins=[];constructor(i){for(let[m,n]of Object.entries(i))this[m]=n;}static initForCommunity(){let i=new _({registration:"approval",remoteImport:"disabled",live:"enabled",videoQuota:5368709120,globalSearch:"enabled",defaultPrivacy:oe.PUBLIC,p2p:"enabled",federation:"enabled",keepOriginalVideo:"disabled",allowReplaceFile:"disabled",defaultCommentPolicy:void 0,authType:void 0,preferDisplayName:void 0,transcription:void 0});return i.compute(),i;}static initForPrivateInstance(){let i=new _({registration:"closed",remoteImport:"enabled",live:"enabled",videoQuota:-1,globalSearch:"disabled",defaultPrivacy:oe.INTERNAL,p2p:"disabled",federation:"disabled",keepOriginalVideo:"enabled",allowReplaceFile:"enabled",preferDisplayName:"enabled",defaultCommentPolicy:void 0,authType:void 0,transcription:void 0});return i.compute(),i;}static initForInstitution(){let i=new _({registration:"closed",remoteImport:"enabled",live:"enabled",videoQuota:-1,globalSearch:"disabled",defaultPrivacy:oe.PUBLIC,p2p:"disabled",keepOriginalVideo:"enabled",allowReplaceFile:"enabled",preferDisplayName:"enabled",authType:"local",transcription:"enabled",defaultCommentPolicy:ot.REQUIRES_APPROVAL,federation:void 0});return i.compute(),i;}compute(){this.unsafeExplanations=[],this.plugins=[],this.config={},this.computeRegistration(),this.computeDefaultVideoPrivacy(),this.computeVideoQuota(),this.computeKeepOriginalVideo(),this.computeReplaceVideoFile(),this.computeVideoImport(),this.computeStreamLives(),this.computeP2P(),this.computeGlobalSearch(),this.computeDefaultVideoCommentPolicy(),this.computeFederation(),this.computeMiniatureSettings(),this.computeTranscription(),this.computeAuth();}getUnsafeExplanations(){return[...this.unsafeExplanations];}getConfig(){return ae({},this.config);}getPlugins(){return[...this.plugins];}patch(i){for(let[m,n]of Object.entries(i))this[m]=n;this.compute();}computeRegistration(){h(this.registration)&&(this.registration==="open"?(this.addExplanation("<strong>Cho ph\xE9p</strong> m\u1ECDi ng\u01B0\u1EDDi d\xF9ng <strong>\u0111\u01B0\u1EE3c \u0111\u0103ng k\xFD</strong>"),this.addConfig({signup:{enabled:!0,requiresApproval:!1}})):this.registration==="approval"?(this.addExplanation("Cho ph\xE9p ng\u01B0\u1EDDi d\xF9ng <strong>\u0111\u0103ng k\xFD</strong> m\xE1y ch\u1EE7 c\u1EE7a b\u1EA1n"),this.addConfig({signup:{enabled:!0,requiresApproval:!0}})):this.registration==="closed"&&(this.addExplanation("<strong>Kh\xF4ng cho ph\xE9p</strong> ng\u01B0\u1EDDi d\xF9ng <strong>\u0111\u0103ng k\xFD</strong>"),this.addConfig({signup:{enabled:!1}})),(this.registration==="approval"||this.registration==="open")&&(this.addExplanation("B\u1EAFt bu\u1ED9c <strong>ki\u1EC3m duy\u1EC7t th\u1EE7 c\xF4ng</strong> \u0111\u1ED1i v\u1EDBi video \u0111\u0103ng t\u1EEB c\u1ED9ng \u0111\u1ED3ng c\u1EE7a b\u1EA1n"),this.addConfig({autoBlacklist:{videos:{ofUsers:{enabled:!0}}}})));}computeVideoQuota(){h(this.videoQuota)&&(this.addConfig({user:{videoQuota:this.videoQuota}}),this.videoQuota===0?this.addExplanation("<strong>Ng\u0103n ch\u1EB7n</strong> nh\u1EEFng ng\u01B0\u1EDDi d\xF9ng m\u1EDBi <strong>\u0111\u0103ng video</strong> (ki\u1EC3m duy\u1EC7t vi\xEAn c\xF3 th\u1EC3 thay \u0111\u1ED5i)"):this.videoQuota===-1?this.addExplanation("<strong>kh\xF4ng gi\u1EDBi h\u1EA1n s\u1ED1 l\u01B0\u1EE3ng video</strong> m\xE0 ng\u01B0\u1EDDi d\xF9ng m\u1EDBi c\xF3 th\u1EC3 t\u1EA3i l\xEAn"):this.addExplanation("\u0110\u1EB7t <strong>h\u1EA1n m\u1EE9c video th\xE0nh "+_t(this.videoQuota,0)+"</strong> cho nh\u1EEFng ng\u01B0\u1EDDi d\xF9ng m\u1EDBi (ki\u1EC3m duy\u1EC7t vi\xEAn c\xF3 th\u1EC3 thay \u0111\u1ED5i)"));}computeVideoImport(){h(this.remoteImport)&&(this.addConfig({import:{videos:{http:{enabled:this.remoteImport==="enabled"}},videoChannelSynchronization:{enabled:this.remoteImport==="enabled"}}}),this.remoteImport==="enabled"?this.addExplanation("<strong>Cho ph\xE9p</strong> ng\u01B0\u1EDDi d\xF9ng <strong>nh\u1EADp v\xE0 \u0111\u1ED3ng b\u1ED9 h\xF3a</strong> video t\u1EEB n\u1EC1n t\u1EA3ng kh\xE1c (YouTube, Vimeo...)"):this.addExplanation("<strong>Ng\u0103n ch\u1EB7n</strong> ng\u01B0\u1EDDi d\xF9ng <strong>nh\u1EADp video</strong> t\u1EEB n\u1EC1n t\u1EA3ng kh\xE1c"));}computeStreamLives(){h(this.live)&&(this.addConfig({live:{enabled:this.live==="enabled"}}),this.live==="enabled"?(this.plugins.push("peertube-plugin-livechat"),this.addExplanation("<strong>Cho ph\xE9p</strong> ng\u01B0\u1EDDi d\xF9ng <strong>ph\xE1t tr\u1EF1c ti\u1EBFp</strong> v\xE0 chat v\u1EDBi ng\u01B0\u1EDDi xem b\u1EB1ng <strong>Livechat</strong> ti\u1EC7n \xEDch")):this.addExplanation("<strong>Ng\u0103n ch\u1EB7n</strong> ng\u01B0\u1EDDi d\xF9ng <strong>ph\xE1t tr\u1EF1c ti\u1EBFp</strong>"));}computeDefaultVideoPrivacy(){h(this.defaultPrivacy)&&(this.addConfig({defaults:{publish:{privacy:this.defaultPrivacy}}}),this.defaultPrivacy===oe.INTERNAL?this.addExplanation("\u0110\u1EB7t <strong>ch\xEDnh s\xE1ch m\u1EB7c \u0111\u1ECBnh video</strong> th\xE0nh <strong>N\u1ED9i b\u1ED9</strong>"):this.defaultPrivacy===oe.PUBLIC&&this.addExplanation("\u0110\u1EB7t <strong>ch\xEDnh s\xE1ch m\u1EB7c \u0111\u1ECBnh video</strong> th\xE0nh <strong>C\xF4ng khai</strong>"));}computeDefaultVideoCommentPolicy(){h(this.defaultCommentPolicy)&&(this.addConfig({defaults:{publish:{commentsPolicy:this.defaultCommentPolicy}}}),this.addExplanation("<strong>B\u1EAFt bu\u1ED9c duy\u1EC7t</strong> b\xECnh lu\u1EADn video m\u1EDBi theo m\u1EB7c \u0111\u1ECBnh"));}computeP2P(){h(this.p2p)&&(this.addConfig({defaults:{p2p:{embed:{enabled:this.p2p==="enabled"},webapp:{enabled:this.p2p==="enabled"}}}}),this.p2p==="enabled"?this.addExplanation("<strong>B\u1EADt ph\xE1t P2P</strong> cho ng\u01B0\u1EDDi d\xF9ng m\u1EDBi v\xE0 \u1EA9n danh theo m\u1EB7c \u0111\u1ECBnh"):this.addExplanation("<strong>T\u1EAFt ph\xE1t P2P</strong> cho ng\u01B0\u1EDDi d\xF9ng m\u1EDBi v\xE0 \u1EA9n danh theo m\u1EB7c \u0111\u1ECBnh"));}computeFederation(){h(this.federation)&&(this.addConfig({followers:{instance:{enabled:this.federation==="enabled"},channels:{enabled:this.federation==="enabled"}}}),this.federation==="enabled"?this.addExplanation("<strong>Cho ph\xE9p</strong> m\xE1y ch\u1EE7/ng\u01B0\u1EDDi d\xF9ng kh\xE1c <strong>\u0111\u0103ng k\xFD</strong> n\u1ED9i dung c\u1EE7a b\u1EA1n"):this.addExplanation("<strong>Ng\u0103n ch\u1EB7n</strong> m\xE1y ch\u1EE7/ng\u01B0\u1EDDi d\xF9ng kh\xE1c <strong>\u0111\u0103ng k\xFD n\u1ED9i dung c\u1EE7a b\u1EA1n</strong>"));}computeKeepOriginalVideo(){h(this.keepOriginalVideo)&&(this.addConfig({transcoding:{originalFile:{keep:this.keepOriginalVideo==="enabled"}}}),this.keepOriginalVideo==="enabled"&&this.addExplanation("<strong>L\u01B0u m\u1ED9t b\u1EA3n sao</strong> c\u1EE7a t\u1EC7p video \u0111\xE3 t\u1EA3i l\xEAn"));}computeReplaceVideoFile(){h(this.allowReplaceFile)&&(this.addConfig({videoFile:{update:{enabled:this.allowReplaceFile==="enabled"}}}),this.allowReplaceFile==="enabled"&&this.addExplanation("<strong>Cho ph\xE9p</strong> ng\u01B0\u1EDDi d\xF9ng <strong>thay th\u1EBF video</strong> \u0111\xE3 \u0111\u01B0\u1EE3c \u0111\u0103ng t\u1EEB tr\u01B0\u1EDBc"));}computeMiniatureSettings(){h(this.preferDisplayName)&&this.addConfig({client:{videos:{miniature:{preferAuthorDisplayName:this.preferDisplayName==="enabled"}}}});}computeGlobalSearch(){h(this.globalSearch)&&(this.addConfig({search:{searchIndex:{enabled:this.globalSearch==="enabled",isDefaultSearch:this.globalSearch==="enabled",url:"https://sepiasearch.org"}}}),this.globalSearch==="enabled"&&this.addExplanation("\u0110\u1EB7t <a href=\"https://sepiasearch.org\" target=\"_blank\">SepiaSearch</a> th\xE0nh <strong>c\xF4ng c\u1EE5 t\xECm ki\u1EBFm m\u1EB7c \u0111\u1ECBnh</strong>"));}computeTranscription(){h(this.transcription)&&(this.addConfig({videoTranscription:{enabled:this.transcription==="enabled"}}),this.transcription==="enabled"&&this.addExplanation("<strong>B\u1EADt phi\xEAn \xE2m t\u1EF1 \u0111\u1ED9ng</strong> c\u1EE7a video \u0111\u1EC3 t\u1EA1o ph\u1EE5 \u0111\u1EC1 v\xE0 c\u1EA3i thi\u1EC7n kh\u1EA3 n\u0103ng hi\u1EC3n th\u1ECB"));}computeAuth(){if(!h(this.authType))return;let i="Ti\u1EC7n \xEDch <strong>ph\u1EA3i \u0111\u01B0\u1EE3c c\u1EA5u h\xECnh</strong> sau khi x\xE1c nh\u1EADn b\u1EB1ng tr\xECnh h\u01B0\u1EDBng d\u1EABn ti\u1EC1n c\u1EA5u h\xECnh.";this.authType==="ldap"?(this.addExplanation("C\xE0i \u0111\u1EB7t <strong>LDAP</strong> ti\u1EC7n \xEDch x\xE1c th\u1EF1c."+i),this.plugins.push("peertube-plugin-auth-ldap")):this.authType==="saml"?(this.addExplanation("C\xE0i \u0111\u1EB7t <strong>SAML 2.0</strong> ti\u1EC7n \xEDch x\xE1c th\u1EF1c."+i),this.plugins.push("peertube-plugin-auth-saml2")):this.authType==="oidc"&&(this.addExplanation("C\xE0i \u0111\u1EB7t <strong>OpenID Connect</strong> ti\u1EC7n \xEDch x\xE1c th\u1EF1c."+i),this.plugins.push("peertube-plugin-auth-openid-connect"));}addConfig(i){return this.config=fe(this.config,i);}addExplanation(i){this.unsafeExplanations.push(i);}};var St=(()=>{let i=class i{el=M(Ve);html=P.required();ngOnInit(){let n=this.el.nativeElement;n.innerHTML=this.html(),n.ariaHidden="true";}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-custom-icon"]],inputs:{html:[1,"html"]},decls:0,vars:0,template:function(t,e){},styles:[`[_nghost-%COMP%]{display:inline-block;height:24px;width:24px}[_nghost-%COMP%]     svg{vertical-align:bottom;width:inherit;height:inherit}[_nghost-%COMP%]     .feather-flag{margin-left:-1px}
/*# sourceMappingURL=common-icon.component-XANAO2SC.css.map */`],changeDetection:0}));let _=i;return _;})();var Gt=_=>({"platform-type-selected":_});function $t(_,i){if(_&1&&c(0,"my-community-based-config",35),_&2){let m=N();d("usageType",m.usageType[m.platformType]);}}function Lt(_,i){if(_&1&&c(0,"my-institutional-config",35),_&2){let m=N();d("usageType",m.usageType[m.platformType]);}}function wt(_,i){if(_&1&&c(0,"my-private-instance-config",35),_&2){let m=N();d("usageType",m.usageType[m.platformType]);}}var Et=(()=>{let i=class i{server=M(ie);formReactiveService=M(G);themeService=M(Ie);currentStep=P.required({transform:x});totalSteps=P.required({transform:x});back=I();next=I();hide=I();iconKey=Tt();iconInstitution=Dt();form;formErrors={};validationMessages={};platformType;usageType={community:_e.initForCommunity(),institution:_e.initForInstitution(),private:_e.initForPrivateInstance()};ngOnInit(){this.buildForm(),this.subscribeToColorChanges();}subscribeToColorChanges(){let n;this.form.get("primaryColor").valueChanges.pipe(xe(250)).subscribe(t=>{n&&(cancelAnimationFrame(n),n=null),n=requestAnimationFrame(()=>{let e=this.server.getHTMLConfig();this.themeService.updateColorPalette(Te(ae({},e.theme),{customization:Te(ae({},e.theme.customization),{primaryColor:this.themeService.formatColorForForm(t)})}));});});}buildForm(){let n={platformName:Oe,primaryColor:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.getDefaultValues());this.form=t,this.formErrors=e,this.validationMessages=l;}getDefaultValues(){let n=this.server.getHTMLConfig(),t=n.theme.customization.primaryColor,e=t?this.themeService.formatColorForForm(t):this.themeService.formatColorForForm(this.themeService.getCSSConfigValue("primaryColor"));return{platformName:n.instance.name,primaryColor:e};}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-form"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"]},outputs:{back:"back",next:"next",hide:"hide"},decls:58,vars:12,consts:()=>{let n;n="B\u01AF\u1EDAC "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="Lo\u1EA1i s\u1EED d\u1EE5ng";let e;e="M\xE1y ch\u1EE7 c\u1EE7a t\xF4i gi\u1ED1ng nh\u01B0...";let l;l="D\u1EF1a tr\xEAn c\u1ED9ng \u0111\u1ED3ng";let p;p="M\u1ED9t c\u1ED9ng \u0111\u1ED3ng \u0111\u0103ng t\u1EA3i n\u1ED9i dung v\xE0 t\u01B0\u01A1ng t\xE1c v\u1EDBi nhau.";let g;g="Th\u1EC3 ch\u1EBF";let A;A="\u0110\u1EC3 ph\xE1t s\xF3ng video c\u1EE7a b\u1EA1n. \u0110\u1EC1 xu\u1EA5t cho c\xE1c t\u1ED5 ch\u1EE9c c\xF4ng c\u1ED9ng, hi\u1EC7p h\u1ED9i v\xE0 c\xF4ng ty.";let E;E="Ri\xEAng t\u01B0";let k;k="Ch\u1EC9 m\u1ED9t s\u1ED1 ng\u01B0\u1EDDi nh\u1EA5t \u0111\u1ECBnh m\u1EDBi c\xF3 th\u1EC3 truy c\u1EADp n\u1ED9i dung. \u0110\u1EC1 xu\u1EA5t cho gia \u0111\xECnh v\xE0 c\u1ED9ng \u0111\u1ED3ng kh\xE9p k\xEDn.";let X;X="Quay l\u1EA1i";let V;V="Xem tr\u01B0\u1EDBc c\u1EA5u h\xECnh";let O;return O="B\u1ECF qua b\xE2y gi\u1EDD",[n,t,e,l,p,g,A,E,k,X,V,O,[1,"root"],[1,"two-columns","mb-4"],["src","/client/assets/images/mascot/default.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content"],[1,"label"],[1,"two-columns","width-50"],[1,"platform-types",3,"ngClass"],[1,"ul-unstyle"],[1,"platform-type"],["type","radio","name","platformType","id","platformTypeCommunity","value","community",3,"ngModelChange","ngModel"],["for","platformTypeCommunity"],["iconName","users"],[1,"type-label"],[1,"type-description"],["type","radio","name","platformType","id","platformTypeInstitution","value","institution",3,"ngModelChange","ngModel"],["for","platformTypeInstitution"],[3,"html"],["type","radio","name","platformType","id","platformTypePrivate","value","private",3,"ngModelChange","ngModel"],["for","platformTypePrivate"],[1,"platform-config"],[3,"usageType"],[1,"buttons"],["icon","arrow-left","theme","secondary",3,"click"],["theme","primary",3,"click","disabled"],[1,"button-as-link",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",12)(1,"div",13)(2,"div"),c(3,"img",14),o(),r(4,"div")(5,"div",15)(6,"div",16),a(7,0),o()(),r(8,"h4",17),a(9,1),o(),r(10,"div",18),q(11,"You can also edit your platform configuration at a later time"),o()()(),r(12,"div",19),a(13,2),o(),r(14,"div",20)(15,"div",21)(16,"ul",22)(17,"li",23)(18,"input",24),ce("ngModelChange",function(p){return de(e.platformType,p)||(e.platformType=p),p;}),o(),r(19,"label",25)(20,"div"),c(21,"my-global-icon",26),o(),r(22,"div")(23,"div",27),a(24,3),o(),r(25,"div",28),a(26,4),o()()()(),r(27,"li",23)(28,"input",29),ce("ngModelChange",function(p){return de(e.platformType,p)||(e.platformType=p),p;}),o(),r(29,"label",30)(30,"div"),c(31,"my-custom-icon",31),o(),r(32,"div")(33,"div",27),a(34,5),o(),r(35,"div",28),a(36,6),o()()()(),r(37,"li",23)(38,"input",32),ce("ngModelChange",function(p){return de(e.platformType,p)||(e.platformType=p),p;}),o(),r(39,"label",33)(40,"div"),c(41,"my-custom-icon",31),o(),r(42,"div")(43,"div",27),a(44,7),o(),r(45,"div",28),a(46,8),o()()()()()(),r(47,"div",34),W(48,$t,1,1,"my-community-based-config",35)(49,Lt,1,1,"my-institutional-config",35)(50,wt,1,1,"my-private-instance-config",35),o()(),r(51,"div",36)(52,"my-button",37),C("click",function(){return e.back.emit();}),a(53,9),o(),r(54,"my-button",38),C("click",function(){return e.next.emit(e.usageType[e.platformType]);}),a(55,10),o(),r(56,"button",39),C("click",function(){return e.hide.emit();}),a(57,11),o()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(8),d("ngClass",le(10,Gt,e.platformType)),s(3),me("ngModel",e.platformType),s(10),me("ngModel",e.platformType),s(3),d("html",e.iconInstitution),s(7),me("ngModel",e.platformType),s(3),d("html",e.iconKey),s(7),z(e.platformType==="community"?48:e.platformType==="institution"?49:e.platformType==="private"?50:-1),s(6),d("disabled",!e.platformType));},dependencies:[ne,ge,y,Me,nt,b,tt,v,L,D,$,Ae,It,Ot,At,St],styles:[`.mascot[_ngcontent-%COMP%]{margin-top:-90px;width:170px;height:190px}.two-columns.width-50[_ngcontent-%COMP%]{gap:0}.platform-types[_ngcontent-%COMP%]{display:flex}@media screen and (min-width: 800px){.platform-types[_ngcontent-%COMP%]{margin-inline-end:calc(1.325rem + .9vw)}.platform-types.platform-type-selected[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{border-inline-start:1px solid var(--bg-secondary-450)}.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-inline-start:calc(1.325rem + .9vw)}}@media screen and (min-width: 800px) and (min-width: 1200px){.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-inline-start:2rem}}@media screen and (min-width: 800px) and (min-width: 1200px){.platform-types[_ngcontent-%COMP%]{margin-inline-end:2rem}}@media screen and (max-width: 800px){.platform-types[_ngcontent-%COMP%]{margin-bottom:calc(1.325rem + .9vw)}.platform-types.platform-type-selected[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{border-block-start:1px solid var(--bg-secondary-450)}.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-top:calc(1.325rem + .9vw)}}@media screen and (max-width: 800px) and (min-width: 1200px){.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-top:2rem}}@media screen and (max-width: 800px) and (min-width: 1200px){.platform-types[_ngcontent-%COMP%]{margin-bottom:2rem}}.platform-types[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;padding:1rem 1.5rem;gap:1rem;color:var(--fg-300);border-radius:8px;border:1px solid var(--bg-secondary-450);margin:0}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], .platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   my-custom-icon[_ngcontent-%COMP%]{color:var(--secondary-icon-color);display:inline-block;width:34px;height:34px;line-height:34px}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]:hover{background-color:var(--bg-secondary-300)}.platform-type[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]{display:none}.type-label[_ngcontent-%COMP%]{color:var(--fg-400);font-weight:700;font-size:1rem}.type-description[_ngcontent-%COMP%]{font-size:14px;font-weight:400}input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border:2px solid var(--border-primary);margin:-1px;background-color:var(--bg)}input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   my-custom-icon[_ngcontent-%COMP%]{color:var(--border-primary)}@media screen and (max-width: 800px){.mascot[_ngcontent-%COMP%]{display:none}.two-columns[_ngcontent-%COMP%]{justify-content:center}.two-columns.width-50[_ngcontent-%COMP%]{flex-direction:column;align-items:center}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%!important}}
/*# sourceMappingURL=admin-config-wizard-form.component-MZEYA3PY.css.map */`,`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-TG2MVLVA.css.map */`]}));let _=i;return _;})();function Wt(_,i){if(_&1&&c(0,"li",14),_&2){let m=i.$implicit;d("innerHTML",m,Ue);}}var Ft=(()=>{let i=class i{adminConfig=M(Re);pluginAPI=M(ye);notifier=M(Ne);html=M(at);server=M(ie);instanceLogo=M(ve);currentStep=P.required({transform:x});totalSteps=P.required({transform:x});usageType=P.required();instanceInfo=P.required();dryRun=P.required({transform:ue});back=I();next=I();hide=I();safeExplanations=[];plugins=[];config={};updating=!1;ngOnChanges(){this.usageType()&&(this.safeExplanations=this.usageType().getUnsafeExplanations().map(n=>this.html.toSimpleSafeHtml(n)),this.config=fe({instance:{name:this.instanceInfo().platformName,shortDescription:this.instanceInfo().shortDescription},theme:{customization:{primaryColor:this.instanceInfo().primaryColor}}},this.usageType().getConfig()),this.plugins=this.usageType().getPlugins());}confirm(){if(this.dryRun())return this.next.emit();this.updating=!0,this.adminConfig.updateCustomConfig(this.config).pipe(se(()=>{let n=this.instanceInfo().avatar;return n?this.instanceLogo.updateAvatar(n):this.instanceLogo.deleteAvatar();}),se(()=>this.server.resetConfig()),se(()=>We(this.plugins).pipe(Ze(n=>this.pluginAPI.install(n)),ze()))).subscribe({next:()=>{this.updating=!1,this.next.emit();},error:n=>{this.notifier.handleError(n),this.updating=!1;}});}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-preview"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"],usageType:[1,"usageType"],instanceInfo:[1,"instanceInfo"],dryRun:[1,"dryRun"]},outputs:{back:"back",next:"next",hide:"hide"},features:[pe([Re,ye,ve]),ke],decls:25,vars:4,consts:()=>{let n;n="B\u01AF\u1EDAC "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="Xem tr\u01B0\u1EDBc c\u1EA5u h\xECnh";let e;e="N\u1EBFu b\u1EA1n x\xE1c nh\u1EADn, PeerTube s\u1EBD:";let l;l="N\u1EBFu b\u1EA1n mu\u1ED1n ki\u1EC3m so\xE1t c\xE0i \u0111\u1EB7t s\xE2u h\u01A1n, c\u1EE7a b\u1EA1n c\xF3 th\u1EC3 d\u1EC5 d\xE0ng thay \u0111\u1ED5i c\u1EA5u h\xECnh n\u1EC1n t\u1EA3ng sau tr\xECnh h\u01B0\u1EDBng d\u1EABn c\u1EA5u h\xECnh tr\u01B0\u1EDBc!";let p;p="Quay l\u1EA1i";let g;g="X\xE1c nh\u1EADn c\u1EA5u h\xECnh n\xE0y";let A;return A="B\u1ECF qua b\xE2y gi\u1EDD",[n,t,e,l,p,g,A,[1,"root"],[1,"two-columns"],["src","/client/assets/images/mascot/default.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content","mt-3"],[3,"innerHTML"],[1,"buttons"],["icon","arrow-left","theme","secondary",3,"click"],["theme","primary",3,"click","disabled","loading"],[1,"button-as-link",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",7)(1,"div",8)(2,"div"),c(3,"img",9),o(),r(4,"div")(5,"div",10)(6,"div",11),a(7,0),o()(),r(8,"h4",12),a(9,1),o(),r(10,"div",13)(11,"p"),a(12,2),o(),r(13,"ul"),qe(14,Wt,1,1,"li",14,je),o(),r(16,"p"),a(17,3),o()()()(),r(18,"div",15)(19,"my-button",16),C("click",function(){return e.back.emit();}),a(20,4),o(),r(21,"my-button",17),C("click",function(){return e.confirm();}),a(22,5),o(),r(23,"button",18),C("click",function(){return e.hide.emit();}),a(24,6),o()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(7),Qe(e.safeExplanations),s(7),d("disabled",e.updating)("loading",e.updating));},dependencies:[y,v,L,D,$],styles:[`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-TG2MVLVA.css.map */`]}));let _=i;return _;})();var Pt=(()=>{let i=class i{back=I();next=I();hide=I();};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-welcome"]],outputs:{back:"back",next:"next",hide:"hide"},decls:18,vars:0,consts:()=>{let n;n="Ch\xE0o m\u1EEBng \u0111\u1EBFn PeerTube";let t;t="h\u1EE1i qu\u1EA3n tr\u1ECB vi\xEAn!";let e;e="M\u1EF1c nang Sepia c\xF3 v\xE0i c\xE2u h\u1ECFi \u0111\u1EC3 gi\xFAp b\u1EA1n "+"\uFFFD#10\uFFFD"+"c\u1EA5u h\xECnh m\xE1y ch\u1EE7 nhanh ch\xF3ng"+"\uFFFD/#10\uFFFD"+".";let l;l="B\u1EAFt \u0111\u1EA7u n\xE0o!";let p;p="Nh\u1EAFc t\xF4i sau";let g;return g="Kh\xF4ng hi\u1EC7n l\u1EA1i",[n,t,e,l,p,g,[1,"root","one-column"],[1,"mascot-container"],["src","/client/assets/images/mascot/happy.svg","alt","mascot",1,"mascot"],[1,"title"],[1,"sub-title"],[1,"text-content","mt-3"],[1,"buttons"],["theme","primary",3,"click"],["theme","secondary",3,"click"],[1,"button-as-link",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",6)(1,"div",7),c(2,"img",8),o(),r(3,"h4")(4,"div",9),a(5,0),o(),r(6,"div",10),a(7,1),o()(),r(8,"div",11),H(9,2),c(10,"strong"),K(),o(),r(11,"div",12)(12,"my-button",13),C("click",function(){return e.next.emit();}),a(13,3),o(),r(14,"my-button",14),C("click",function(){return e.hide.emit({doNotOpenAgain:!1});}),a(15,4),o(),r(16,"button",15),C("click",function(){return e.hide.emit({doNotOpenAgain:!0});}),a(17,5),o()()());},dependencies:[y,v,D,$],styles:[`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-TG2MVLVA.css.map */`]}));let _=i;return _;})();var zt=["modal"],Zt=["stepper"];function xt(_,i){if(_&1){let m=Q();r(0,"cdk-step",3)(1,"my-admin-config-wizard-welcome",11),C("back",function(){S(m),N();let t=Z(2);return T(t.previous());})("next",function(){S(m),N();let t=Z(2);return T(t.next());})("hide",function(t){S(m);let e=N(2);return T(e.hide(t));}),o()();}}function kt(_,i){if(_&1){let m=Q();r(0,"cdk-step",10)(1,"my-admin-config-wizard-documentation",12),C("hide",function(){S(m);let t=N(2);return T(t.hide({doNotOpenAgain:!0}));}),o()();}}function Xt(_,i){if(_&1){let m=Q();r(0,"div",2)(1,"my-admin-config-wizard-stepper",null,1),W(3,xt,2,0,"cdk-step",3),r(4,"cdk-step",4)(5,"my-admin-config-wizard-edit-info",5),C("back",function(){S(m);let t=Z(2);return T(t.previous());})("next",function(t){S(m);let e=Z(2),l=N();return l.instanceInfo=t,T(e.next());})("hide",function(){S(m);let t=N();return T(t.hide());}),o()(),r(6,"cdk-step",6)(7,"my-admin-config-wizard-form",7),C("back",function(){S(m);let t=Z(2);return T(t.previous());})("next",function(t){S(m);let e=Z(2),l=N();return l.usageType=t,T(e.next());})("hide",function(){S(m);let t=N();return T(t.hide());}),o()(),r(8,"cdk-step",8)(9,"my-admin-config-wizard-preview",9),C("back",function(){S(m);let t=Z(2);return T(t.previous());})("next",function(){S(m);let t=Z(2),e=N();return T(e.showWelcome?t.next():e.hide());})("hide",function(){S(m);let t=N();return T(t.hide());}),o()(),W(10,kt,2,0,"cdk-step",10),o()();}if(_&2){let m=N();s(3),z(m.showWelcome?3:-1),s(2),d("currentStep",m.currentStep())("showBack",m.showWelcome),s(2),d("currentStep",m.currentStep()),s(2),d("usageType",m.usageType)("instanceInfo",m.instanceInfo)("dryRun",m.dryRun)("currentStep",m.currentStep()),s(),z(m.showWelcome?10:-1);}}var li=(()=>{let i=class i{modalService=M(rt);userService=M(lt);notifier=M(Ne);modal=Fe("modal");stepper=Fe("stepper");created=I();usageType;instanceInfo;showWelcome;dryRun;modalRef;ngOnInit(){this.created.emit();}shouldAutoOpen(n){return this.modalService.hasOpenModals()?!1:this.getFragment()==="#admin-welcome-wizard"||this.getFragment()==="#admin-welcome-wizard-test"?!0:!(n.noWelcomeModal===!0||Pe.getItem(be())==="true");}show({showWelcome:n}){this.showWelcome=n,this.dryRun=this.getFragment()==="#admin-welcome-wizard-test",this.modalRef=this.modalService.open(this.modal(),{centered:!0,backdrop:"static",keyboard:!1,size:"lg"});}currentStep(){if(!this.stepper())return 0;let n=this.stepper().selectedIndex;return this.showWelcome?n:n+1;}totalSteps(){if(!this.stepper())return 0;let n=this.stepper().steps.length;return this.showWelcome?n-1:n;}hide(n={}){let{doNotOpenAgain:t=!1}=n;t&&this.doNotOpenAgain(),this.modalRef.close();}doNotOpenAgain(){Pe.setItem(be(),"true"),this.userService.updateMyProfile({noWelcomeModal:!0}).subscribe({next:()=>Ce.info("We will not open the welcome modal again."),error:n=>this.notifier.handleError(n)});}getFragment(){return window.location.hash;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-modal"]],viewQuery:function(t,e){t&1&&(De(e.modal,zt,5),De(e.stepper,Zt,5)),t&2&&Ke(2);},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let n;n="Gi\u1EDBi thi\u1EC7u ch\xE0o m\u1EEBng";let t;t="S\u1EEDa th\xF4ng tin chung";let e;e="Lo\u1EA1i s\u1EED d\u1EE5ng";let l;l="Xem tr\u01B0\u1EDBc c\u1EA5u h\xECnh";let p;return p="T\xE0i li\u1EC7u c\u1EA5u h\xECnh \u0111\u0103ng",[["modal",""],["stepper",""],[1,"modal-body"],["label",n],["label",t],["totalSteps","3",3,"back","next","hide","currentStep","showBack"],["label",e],["totalSteps","3",3,"back","next","hide","currentStep"],["label",l],["totalSteps","3",3,"back","next","hide","usageType","instanceInfo","dryRun","currentStep"],["label",p],[3,"back","next","hide"],[3,"hide"]];},template:function(t,e){t&1&&Be(0,Xt,11,9,"ng-template",null,0,Je);},dependencies:[D,st,Mt,Pt,Nt,Et,Ft,Ct],styles:[`.modal-body[_ngcontent-%COMP%]{padding:2rem 3rem}
/*# sourceMappingURL=admin-config-wizard-modal.component-7M3OGGTO.css.map */`]}));let _=i;return _;})();export{li as AdminConfigWizardModalComponent};/**i18n:138e9aba5923606215625ab5641fbdc103d8a34cfe13ae910386f40f27aea675*///# sourceMappingURL=chunk-4PIL3W7T.js.map