1import{a as et,b as tt}from"./chunk-VDSHQJ2X.js";import{a as it,b as ot}from"./chunk-MDRRODOI.js";import{a as nt,c as lt,m as st}from"./chunk-JEQCOGCD.js";import"./chunk-JDQTM4TK.js";import"./chunk-KJ4QD3SP.js";import{a as Fe,b as Pe}from"./chunk-ZRDGGLZM.js";import"./chunk-76DJPXSG.js";import{c as Q}from"./chunk-ZUTNCURO.js";import{a as Ze,d as Ne,e as Ye,g as Ke,h as We,i as qe}from"./chunk-DZ2HACRA.js";import{f as Je,g as Qe,h as Xe}from"./chunk-GQIMCUCB.js";import{a as ee}from"./chunk-REZ46NCA.js";import{a as $e}from"./chunk-VLFD26LN.js";import"./chunk-5M4XIZMD.js";import{a as He,b as Ge,c as Ue}from"./chunk-2BFVK5HI.js";import"./chunk-3LVDM64V.js";import"./chunk-6HN5HIFJ.js";import"./chunk-VTF4T7ID.js";import{B as Ae,E as Re,l as Ee,o as Ie,q as H}from"./chunk-TUKI65JW.js";import{i as ze}from"./chunk-E7TZAWVT.js";import{a as W,b as ke,c as q,d as Me}from"./chunk-EKVTZPVT.js";import"./chunk-LW5LPVES.js";import"./chunk-ZYWYILRC.js";import"./chunk-S54BMOKL.js";import"./chunk-3ZR4SHJC.js";import{a as C,b as M,d as A,e as T,f as z,g as Se,j as Le,k as V,l as we}from"./chunk-K75VSEIY.js";import"./chunk-7FRBKRRG.js";import"./chunk-WPWHXKEF.js";import"./chunk-ZWC24XOW.js";import{H as ye,_a as Ve,kb as X,lb as Be}from"./chunk-2U5T7ZRU.js";import"./chunk-HFHRXST3.js";import{D as Te,L as Oe,Q as J,R as je,y as $,z as De}from"./chunk-EHK3LLER.js";import"./chunk-UZFNZKCX.js";import{D as be,u as K}from"./chunk-YDFILND7.js";import{Ac as I,D as re,Da as g,Ea as x,Fa as N,Hb as Z,Hc as D,K as U,Kc as d,Ob as E,Pb as de,Rb as pe,Ub as me,Uc as he,Wc as Ce,Zc as u,_c as Y,ia as y,ic as ue,jc as v,la as O,lc as b,md as ge,na as le,oc as fe,od as xe,pc as _e,qc as j,r as P,ra as B,rb as ce,rc as n,sa as ae,sc as s,tc as m,td as ve,wa as p,wd as w,xb as f,xd as k}from"./chunk-TROGQXTX.js";import{a as S,b as L,i as a}from"./chunk-S6MAVN2Q.js";a();a();a();var Tt=C("[Collection Detail Store State] Initial"),St=C("[Collection Detail Store State] Change Is Loading Module",M()),Lt=C("[Collection Detail Store State] Change Is Organizing",M()),wt=C("[Collection Detail Store State] Change User",M()),kt=C("[Collection Detail Store State] Change Subscription",M()),Mt=C("[Collection Detail Store State] Change Collection",M()),yt=C("[Collection Detail Store State] Change Lessons",M()),Vt=C("[Collection Detail Store State] Remove One Lesson",M()),zt=C("[Collection Detail Store State] Change Authors",M()),Et=C("[Collection Detail Store State] Load Module",M()),It=C("[Collection Detail Store State] Load Authors By Ids",M()),At=C("[Collection Detail Store State] Update Lesson Position"),r={initial:Tt,changeIsLoadingModule:St,changeIsOrganizing:Lt,changeUser:wt,changeSubscription:kt,changeCollection:Mt,changeLessons:yt,removeOneLesson:Vt,changeAuthors:zt,loadModule:Et,loadAuthorsByIds:It,updateLessonPosition:At};var rt={isLoadingModule:!1,isOrganizing:!1,user:null,subscription:null,collection:null,lessons:[],authors:[]},Rt=we(rt,V(r.initial,e=>rt),V(r.changeIsLoadingModule,(e,{isLoadingModule:l})=>L(S({},e),{isLoadingModule:l})),V(r.changeIsOrganizing,(e,{isOrganizing:l})=>L(S({},e),{isOrganizing:l})),V(r.changeUser,(e,{user:l})=>L(S({},e),{user:l})),V(r.changeSubscription,(e,{subscription:l})=>L(S({},e),{subscription:l})),V(r.changeCollection,(e,{collection:l})=>L(S({},e),{collection:l})),V(r.changeLessons,(e,{lessons:l})=>L(S({},e),{lessons:l})),V(r.removeOneLesson,(e,{id:l})=>L(S({},e),{lessons:e.lessons.filter(t=>t.id!==l)})),V(r.changeAuthors,(e,{authors:l})=>L(S({},e),{authors:l})));function at(e,l){return Rt(e,l)}a();var te="collection-details";a();a();var F=Se(te),ct=z(F,e=>e.isLoadingModule),dt=z(F,e=>e.isOrganizing),pt=z(F,e=>e.user),mt=z(F,e=>e.subscription),ie=z(F,e=>e.collection),oe=z(F,e=>e.lessons),Ot=z(F,e=>e.authors),ut=z(Ot,(e,l)=>e.find(t=>t.id===l.id));var ft=(()=>{class e{constructor(){this._subscriptionService=p(Ae),this._userAuthService=p(Re),this._authService=p(Ee),this._authorService=p(Ie),this._collectionService=p(H),this._actions=p(ke),this._router=p($),this._store=p(A),this.loadModule$=W(()=>this._actions.pipe(q(r.loadModule),O(()=>this._store.dispatch(r.changeIsLoadingModule({isLoadingModule:!0}))),y(t=>re([this._authService.profile(),this._subscriptionService.getSubscription().pipe(U(i=>P(null))),this._collectionService.lessons(t.collection.id)]).pipe(y(([i,o,c])=>[r.changeUser({user:i}),r.changeSubscription({subscription:o}),r.changeCollection({collection:t.collection}),r.changeLessons({lessons:c}),r.loadAuthorsByIds({ids:c.map(_=>_.user_id)}),r.changeIsLoadingModule({isLoadingModule:!1})]),U(i=>(this._router.navigate(["/error/404"],{skipLocationChange:!0}),[])))))),this.loadAuthorsByIds$=W(()=>this._actions.pipe(q(r.loadAuthorsByIds),y(t=>
1t.ids.length===0?[]:this._authorService.search({id:t.ids.join(",")}).pipe(y(i=>[r.changeAuthors({authors:i})]))))),this.updateLessonPosition$=W(()=>this._actions.pipe(q(r.updateLessonPosition),le(this._store.pipe(T(ie))),le(this._store.pipe(T(oe)),([t,i],o)=>({action:t,collection:i,lessons:o})),y(({action:t,collection:i,lessons:o})=>this._collectionService.updateLessons(i.id,o.map((c,_)=>({lesson_id:c.id,position:_}))))),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac})}}return e})();a();var _t=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=E({type:e,selectors:[["td-collection-details-lessons-svg"]],standalone:!1,decls:17,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","width","150","height","120"],["id","dashboard-lessons"],["d","M0 0h150v120H0z"],["clip-path","url(#dashboard-lessons)"],["fill","rgba(255,255,255,0)","d","M0 0h150v120H0z"],["fill","#fff","stroke","#e1e4f0","stroke-linecap","round","stroke-linejoin","round","stroke-width","3","d","M6.7 63.4a4.6 4.6 0 014.6-4.5h128.3a4.6 4.6 0 014.5 4.5v40.8a4.6 4.6 0 01-4.5 4.6H11.3a4.6 4.6 0 01-4.6-4.6z"],["fill","#67efef","d","M11.8 69a4.6 4.6 0 014.6-4.7h29.8a4.6 4.6 0 014.7 4.6v29.8a4.6 4.6 0 01-4.7 4.7H16.4a4.6 4.6 0 01-4.7-4.7z"],["fill","#e1e4f0","d","M64.7 102.3a4 4 0 114-4.1 4 4 0 01-4 4zM77.2 102.3a4 4 0 114-4.1 4 4 0 01-4 4zM89.7 102.3a4 4 0 114-4.1 4 4 0 01-4 4zM60.8 76.2a3 3 0 01-1.8-1.1 3 3 0 01-.6-2 3 3 0 013-2.8h71.3a3 3 0 013 3 3 3 0 01-3 3H61.2a.6.6 0 01-.1 0h-.2zM104.5 94a8.3 8.3 0 018.2-8.3h14.9a8.3 8.3 0 018.2 8.3 8.3 8.3 0 01-8.3 8.2h-14.8a8.3 8.3 0 01-8.2-8.2z"],["fill","#fff","d","M123.8 92.8a1.2 1.2 0 01.5.5 1.3 1.3 0 01.2.7 1.3 1.3 0 01-.2.6 1.4 1.4 0 01-.5.5l-2.3 1.3-2.3 1.4a1.3 1.3 0 01-.6.1 1.3 1.3 0 01-.7-.1 1.3 1.3 0 01-.5-.5 1.2 1.2 0 01-.1-.7v-5.3a1.2 1.2 0 01.1-.7 1.3 1.3 0 01.5-.4 1.3 1.3 0 01.7-.2 1.3 1.3 0 01.6.2l2.3 1.3z"],["fill","#fff","stroke","#e1e4f0","stroke-linecap","round","stroke-linejoin","round","stroke-width","3","d","M6.7 7.6A4.6 4.6 0 0111.3 3h128.3a4.6 4.6 0 014.5 4.6v40.8a4.6 4.6 0 01-4.5 4.5H11.3a4.6 4.6 0 01-4.6-4.5z"],["fill","#67efef","d","M11.8 13a4.6 4.6 0 014.6-4.6h29.8a4.6 4.6 0 014.7 4.7v29.8a4.6 4.6 0 01-4.7 4.6H16.4a4.6 4.6 0 01-4.7-4.6z"],["fill","#e1e4f0","d","M64.7 46.4a4 4 0 114-4 4 4 0 01-4 4zM77.2 46.4a4 4 0 114-4 4 4 0 01-4 4zM89.7 46.4a4 4 0 114-4 4 4 0 01-4 4zM60.8 20.4a3 3 0 01-2.4-3.2 3 3 0 013-2.8h71.3a3 3 0 013 3 3 3 0 01-3 3H61.2a.6.6 0 01-.1 0h-.2zM104.5 38.1a8.3 8.3 0 018.2-8.3h14.9a8.3 8.3 0 018.2 8.3 8.3 8.3 0 01-8.3 8.3h-14.8a8.3 8.3 0 01-8.2-8.3z"],["fill","#fff","d","M123.8 37a1.3 1.3 0 01.7 1.1 1.3 1.3 0 01-.2.6 1.4 1.4 0 01-.5.5l-2.3 1.4-2.3 1.3a1.3 1.3 0 01-.6.2 1.3 1.3 0 01-.7-.2 1.3 1.3 0 01-.5-.5 1.2 1.2 0 01-.1-.6v-5.4a1.2 1.2 0 01.1-.6 1.2 1.2 0 01.5-.5 1.2 1.2 0 01.7-.2 1.2 1.2 0 01.6.2l2.3 1.4z"],["fill","#9af5f4","d","M31.3 33.6a5.6 5.6 0 115.6-5.6 5.6 5.6 0 01-5.6 5.6zM24.1 89.5a5.6 5.6 0 115.6-5.7 5.6 5.6 0 01-5.6 5.7zM38.5 89.5a5.6 5.6 0 115.6-5.7 5.6 5.6 0 01-5.6 5.7z"],["fill","#fff","stroke","#e1e4f0","stroke-linecap","round","stroke-linejoin","round","stroke-width","3","d","M4 116.3h130M138.7 116.3h8.1"]],template:function(i,o){i&1&&(N(),n(0,"svg",0),m(1,"defs"),n(2,"defs")(3,"clipPath",1),m(4,"path",2),s()(),n(5,"g",3),m(6,"path",4)(7,"path",5)(8,"path",6)(9,"path",7)(10,"path",8)(11,"path",9)(12,"path",10)(13,"path",11)(14,"path",12)(15,"path",13)(16,"path",14),s()())},encapsulation:2,changeDetection:0})}}return e})();a();var ht=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=E({type:e,selectors:[["td-collection-details-lesson-svg"]],standalone:!1,decls:13,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","width","165","height","105"],["id","dashboard-lesson"],["d","M0 0h165v105H0z"],["clip-path","url(#dashboard-lesson)"],["fill","rgba(255,255,255,0)","d","M0 0h165v105H0z"],["fill","#fff","stroke","#4e4f61","stroke-linecap","round","stroke-linejoin","round","stroke-width","3","d","M4.5 32.5a4.7 4.7 0 0 1 4.8-4.7h133.3a4.8 4.8 0 0 1 4.7 4.7V75a4.8 4.8 0 0 1-4.7 4.8H9.3A4.7 4.7 0 0 1 4.5 75Z"],["fill","#e1e4f0","d","M9.8 38.2a4.8 4.8 0 0 1 4.8-4.8h31a4.8 4.8 0 0 1 4.8 4.8v31a4.8 4.8 0 0 1-4.8 4.8h-31a4.8 4.8 0 0 1-4.8-4.8Zm55 34.7a4.2 4.2 0 1 1 4.2-4.2 4.2 4.2 0 0 1-4.2 4.2Zm13 0a4.2 4.2 0 1 1 4.2-4.2 4.2 4.2 0 0 1-4.2 4.2Zm13 0a4.2 4.2 0 1 1 4.2-4.2 4.2 4.2 0 0 1-4.3 4.2ZM60.7 45.8a3 3 0 0 1-1-.3 3 3 0 0 1-.8-.7 3.1 3.1 0 0 1-.5-1 3 3 0 0 1-.2-1 3 3 0 0 1 .2-1.2 3 3 0 0 1 .7-1 3.3 3.3 0 0 1 1-.7 3.1 3.1 0 0 1 1.2-.2h74.2a3 3 0 0 1 1.2.2 3 3 0 0 1 1 .7 3.2 3.2 0 0 1 .6 1 3 3 0 0 1 .3 1.2 3 3 0 0 1-.2 1.1 3 3 0 0 1-.7 1 3.3 3.3 0 0 1-1 .7 3.1 3.1 0 0 1-1.2.3H61.3a.6.6 0 0 1-.1 0h-.4ZM106 64.3a8.6 8.6 0 0 1 8.7-8.6h15.4a8.6 8.6 0 0 1 8.6 8.6 8.6 8.6 0 0 1-8.6 8.6h-15.4a8.6 8.6 0 0 1-8.6-8.6Z"],["fill","#fff","d","M126.2 63a1.4 1.4 0 0 1 .5.6 1.4 1.4 0 0 1 0 1.3 1.4 1.4 0 0 1-.5.5l-2.4 1.4-2.4 1.4a1.4 1.4 0 0 1-.7.2 1.5 1.5 0 0 1-.6-.2 1.4 1.4 0 0 1-.5-.5 1.3 1.3 0 0 1-.2-.7v-5.5a1.3 1.3 0 0 1 .2-.7 1.4 1.4 0 0 1 .5-.5 1.4 1.4 0 0 1 1.3 0l2.4 1.4Z"],["fill","#33c3ff","stroke","#4e4f61","stroke-linecap","round","stroke-linejoin","round","stroke-width","3.4","d","M2 102.7h127.4m7.3 0h13.1"],["fill","#ffce0a","d","M141.8 44a20.5 20.5 0 1 1 20.4-20.6A20.4 20.4 0 0 1 141.8 44Z"],["fill","#fff","fill-rule","evenodd","d","M141.8 11.8a11.7 11.7 0 1 1-4.5.8 11.7 11.7 0 0 1 4.5-.8Zm0 21.5a9.6 9.6 0 0 0 3.7-.8 9.8 9.8 0 0 0 0-18.1 9.8 9.8 0 0 0-7.5 0 9.6 9.6 0 0 0-3.2 2.1 9.7 9.7 0 0 0-2 3.2 9.8 9.8 0 0 0 0 7.5 9.7 9.7 0 0 0 5.2 5.3 9.9 9.9 0 0 0 3.8.8Z"],["fill","#fff","d","M140.8 16.6h2
1V26h-2Zm1 11.4a1.1 1.1 0 0 0-.4 0 .9.9 0 0 0-.3.2 1 1 0 0 0-.2.3 1 1 0 0 0 0 .4 1.2 1.2 0 0 0 0 .3 1 1 0 0 0 .2.3 1 1 0 0 0 .3.2 1 1 0 0 0 .4.1 1 1 0 0 0 .3 0 1 1 0 0 0 .4-.2.8.8 0 0 0 .2-.4.7.7 0 0 0 0-.3.9.9 0 0 0 0-.4 1 1 0 0 0-.3-.3 1 1 0 0 0-.3-.2 1.2 1.2 0 0 0-.3 0Z"]],template:function(i,o){i&1&&(N(),n(0,"svg",0)(1,"defs")(2,"clipPath",1),m(3,"path",2),s()(),n(4,"g",3),m(5,"path",4)(6,"path",5)(7,"path",6)(8,"path",7)(9,"path",8)(10,"path",9)(11,"path",10)(12,"path",11),s()())},encapsulation:2,changeDetection:0})}}return e})();a();var Ct=(()=>{class e{constructor(){this._store=p(A)}transform(t){return this._store.pipe(T(ut,{id:t}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=pe({name:"author",type:e,pure:!0,standalone:!1})}}return e})();a();a();a();var Gt=e=>({isRemovingLesson:e});function Ut(e,l){if(e&1){let t=I();n(0,"div",4)(1,"button",6),D("click",function(){g(t);let o=d(2);return x(o.close())}),u(2,"m-collection-details.10"),s(),n(3,"button",7),D("click",function(){g(t);let o=d(2);return x(o.removeLesson())}),u(4,"m-collection-details.8"),s()()}}function Zt(e,l){e&1&&(n(0,"div",5),m(1,"td-loader",8),s())}function Nt(e,l){e&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),m(3,"td-collection-details-lesson-svg"),s(),n(4,"h1",3),u(5,"m-collection-details.9"),s(),v(6,Ut,5,0,"div",4)(7,Zt,2,0,"div",5),s()()),e&2&&(f(6),b(l.isRemovingLesson?7:6))}var gt=(()=>{class e{get collection(){return this._data.collection}get lesson(){return this._data.lesson}constructor(t,i,o,c){this._data=t,this._componentStore=i,this._dialogRef=o,this._collectionService=c,this.isRemovingLesson$=this._componentStore.select(_=>_.isRemovingLesson),this.changeIsRemovingLesson=this._componentStore.updater((_,G)=>L(S({},_),{isRemovingLesson:G})),this.removeLesson=this._componentStore.effect(_=>_.pipe(O(G=>this.changeIsRemovingLesson(!0)),y(G=>this._collectionService.removeLesson(this.collection.id,this.lesson.id).pipe($e(Dt=>this._dialogRef.close({id:this.lesson.id}),Dt=>this.changeIsRemovingLesson(!1)))))),this._componentStore.setState({isRemovingLesson:!1})}close(){this._dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(Z(Ge),Z(ee),Z(He),Z(H))}}static{this.\u0275cmp=E({type:e,selectors:[["ng-component"]],standalone:!1,features:[ge([ee])],decls:2,vars:5,consts:[[1,"bg-white","rounded-lg","mx-2","py-2","relative","overflow-hidden","md:mx-0"],[1,"flex","flex-col","max-w-sm","mx-auto","px-2","text-center"],[1,"mb-4","mt-6","flex","justify-center"],["l10nTranslate","",1,"text-blue-black","font-black","text-center","text-xl","mb-8"],[1,"flex","justify-center","items-center","pb-6"],[1,"py-8"],["type","button","l10nTranslate","",1,"btn","btn-outlined-deep-purple","btn-md","mr-2","md:btn-120",3,"click"],["l10nTranslate","",1,"btn","btn-contained-deep-purple","btn-md","ml-2","md:btn-120",3,"click"],["color","#5800FF","size","40","strokeWidth","6"]],template:function(i,o){if(i&1&&(v(0,Nt,8,1,"div",0),w(1,"async")),i&2){let c;b((c=xe(3,Gt,k(1,1,o.isRemovingLesson$)))?0:-1,c)}},dependencies:[X,J,ht,K],encapsulation:2,changeDetection:0})}}return e})();var ne=(()=>{class e{constructor(){this._dialog=p(Ue)}openRemoveLesson(t){return this._dialog.open(gt,{maxWidth:"400px",width:"100%",maxHeight:"95vh",disableClose:!0,autoFocus:!1,data:t})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Yt=(e,l,t,i,o,c)=>({isLoadingModule:e,isOrganizing:l,user:t,subscription:i,collection:o,lessons:c});function Kt(e,l){if(e&1&&m(0,"td-apps-menu",27)(1,"td-avatar",28),e&2){let t=d(2);j("user",t.user)("subscription",t.subscription),f(),j("user",t.user)("subscription",t.subscription)}}function Wt(e,l){if(e&1&&(n(0,"p",24),u(1),s()),e&2){let t=d(2);f(),Y(t.collection.description)}}function qt(e,l){if(e&1){let t=I();n(0,"div",29)(1,"button",31),D("click",function(){g(t);let o=d(4);return x(o.organize())}),m(2,"em",32),n(3,"span",33),u(4,"m-collection-details.5"),s()(),n(5,"button",34),D("click",function(){g(t);let o=d(4);return x(o.organize())}),m(6,"em",35),s()()}}function Jt(e,l){if(e&1){let t=I();
1n(0,"div",30)(1,"div",36)(2,"span",37),u(3,"m-collection-details.6"),s()(),n(4,"button",38),D("click",function(){g(t);let o=d(3),c=d();return x(c.undoOrganize(o.lessons))}),u(5,"m-collection-details.7"),s(),n(6,"button",39),D("click",function(){g(t);let o=d(4);return x(o.updateLessonPositions())}),u(7,"m-collection-details.8"),s()()}}function Qt(e,l){if(e&1&&v(0,qt,7,0,"div",29)(1,Jt,8,0,"div",30),e&2){let t=d(2);b(t.isOrganizing?1:0)}}function Xt(e,l){e&1&&m(0,"div",45)}function ei(e,l){if(e&1){let t=I();n(0,"td-lesson-card",43),w(1,"author"),w(2,"async"),n(3,"div",46)(4,"button",47),D("click",function(o){g(t);let c=d().$implicit,_=d(3),G=d();return o.stopPropagation(),o.preventDefault(),x(G.openRemoveLessonDialog(_.collection,c))}),m(5,"em",48),s()()()}if(e&2){let t=d().$implicit;j("lesson",t)("author",k(2,4,k(1,2,t.user_id)))}}function ti(e,l){if(e&1&&(n(0,"div",44)(1,"div",49)(2,"div",50),m(3,"img",51),s(),n(4,"div",52)(5,"div",53)(6,"div",54)(7,"div",55)(8,"div",56)(9,"span"),u(10),s()()()()()(),n(11,"div",57),m(12,"em",58),s()()()),e&2){let t=d().$implicit;f(3),j("alt",t.title)("src",t.image_url,ce),f(7),Y(t.title)}}function ii(e,l){if(e&1&&(n(0,"div",41),me(1,Xt,1,0,"div",42),v(2,ei,6,6,"td-lesson-card",43)(3,ti,13,3,"div",44),s()),e&2){let t=d(3);f(2),b(t.isOrganizing?3:2)}}function oi(e,l){if(e&1){let t=I();n(0,"div",40),D("cdkDropListDropped",function(o){g(t);let c=d(2),_=d();return x(_.drop(c.lessons,o))}),fe(1,ii,4,1,"div",41,ue().trackByLessonId,!0),s()}if(e&2){let t=d(2);j("cdkDropListDisabled",!t.isOrganizing),f(),_e(t.lessons)}}function ni(e,l){e&1&&(n(0,"div",26)(1,"div",59),m(2,"td-collection-details-lessons-svg"),s(),n(3,"p",60),u(4,"m-collection-details.4"),s()())}function li(e,l){if(e&1){let t=I();n(0,"div",2)(1,"td-toolbar",3)(2,"div",4)(3,"a",5),m(4,"em",6),s(),n(5,"div",7),u(6,"m-collection-details.0 "),s()(),n(7,"div",8),m(8,"em",9),n(9,"span",10),u(10,"TOMi"),s()(),n(11,"div",11),v(12,Kt,2,4),s()()(),n(13,"div",12)(14,"div",13)(15,"div",14)(16,"div",15)(17,"span",16),u(18,"m-collection-details.1"),s(),n(19,"div",17)(20,"button",18),m(21,"em",19),s(),n(22,"td-menu",20,0)(24,"div",21)(25,"button",22),D("click",function(){g(t);let o=d(),c=d();return x(c.openCollectionEditDialog(o.collection))}),u(26," m-collection-details.2 "),s(),n(27,"button",22),D("click",function(){g(t);let o=d(),c=d();return x(c.openCollectionDeleteDialog(o.collection))}),u(28," m-collection-details.3 "),s()()()()(),n(29,"h1",23),u(30),s(),v(31,Wt,2,1,"p",24),s(),v(32,Qt,2,1),v(33,oi,3,1,"div",25)(34,ni,5,0,"div",26),s()()}if(e&2){let t=he(23),i=d();f(12),b(i.user?12:-1),f(8),j("tdMenuTriggerFor",t),f(9),Ce("mb-4",i.collection.description),f(),Y(i.collection.title),f(),b(i.collection.description?31:-1),f(),b(i.lessons.length>0?32:-1),f(),b(i.lessons.length>0?33:34)}}function si(e,l){e&1&&(n(0,"div",1),m(1,"td-loader"),s())}function ri(e,l){e&1&&v(0,li,35,8)(1,si,2,0,"div",1),e&2&&b(l.isLoadingModule?1:0)}var xt=(()=>{class e{constructor(){this._collectionDialogs=p(et),this._collectionDetailsDialogs=p(ne),this._router=p($),this._store=p(A),this.isLoadingModule$=this._store.pipe(T(ct)),this.isOrganizing$=this._store.pipe(T(dt)),this.user$=this._store.pipe(T(pt)),this.subscription$=this._store.pipe(T(mt)),this.collections$=this._store.pipe(T(ie)),this.lessons$=this._store.pipe(T(oe))}get planTypes(){return Ve}openCollectionEditDialog(t){this._collectionDialogs.openEdit({collection:t}).afterClosed().subscribe(i=>{Q(i)&&this._store.dispatch(r.changeCollection({collection:i.collection}))})}openCollectionDeleteDialog(t){this._collectionDialogs.openDelete({collection:t}).afterClosed().subscribe(i=>{Q(i)&&this._router.navigate(["/teacher/collections"],{skipLocationChange:!0})})}openRemoveLessonDialog(t,i){this._collectionDetailsDialogs.openRemoveLesson({collection:t,lesson:i}).afterClosed().subscribe(o=>{Q(o)&&this._store.dispatch(r.removeOneLesson({id:o.id}))})}organize(){this._store.dispatch(r.changeIsOrganizing({isOrganizing:!0}))}undoOrganize(t){let i=[...t];i.sort((o,c)=>o.joint.position-c.joint.position),this._store.dispatch(r.changeLessons({lessons:i})),this._store.dispatch(r.changeIsOrganizing({isOrganizing:!1}))}drop(t,i){let o=[...t];Ze(o,i.previousIndex,i.currentIndex),this._store.dispatch(r.changeLessons({lessons:o}))}updateLessonPositions(){this._store.dispatch(r.updateLessonPosition()),this._store.dispatch(r.changeIsOrganizing({isOrganizing:!1}))}trackByLessonId(t,i){return i.id}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=E({type:e,selectors:[["ng-component"]],standalone:!1,decls:7,vars:20,consts:[["CollectionOptionMenu","tdMenu"],[1,"h-screen","w-full","flex","justify-center","items-center"],[1,"fixed","z-50","w-full"],["height","55","minHeight","55",1,"bg-white","shadow"],[1,"flex-1","flex","items-center"],["routerLink","/teacher/collections",1,"btn-icon","btn-md","btn-flat-blue-black","mr-4","md:mr-0"],[1,"ai","ai-arrow-left","text-lg"],["l10nTranslate","",1,"hidden","text-xl","text-blue-black","font-black","ml-4","mr-4","md:inline-block"],[1,"flex-1","flex","justify-center","items-center","text-blue-black-light-2"],[1,"ai","ai-tomi","text-xl","mr-1.5"],[1,"font-bold","tracking-widest"],[1,"flex-1","flex","items-center","justify-end"],[1,"mx-2"],[1,"max-w-5xl","w-full","mx-auto","pt-20"],[1,"pb-6","pt-4","shadow","rounded-lg","px-5","mb-4"],[1,"flex","justify-between","items-center"],["l10nTranslate","",1,"text-blue-black-light-8"],[1,"flex","justify-end"],[1,"btn-icon","btn-md","btn-flat-blue-black","ml-2",3,"tdMenuTriggerFor"],[1,"ai","ai-options","text-xl"],["xPosition","center"],[1,"flex","flex-col","items-start","w-40","px-2","py-2"],["l10nTranslate","",1,"menu-item",3,"click"],[1,"text-3xl","text-blue-black","font-black"],[1,"mb-2"],["cdkDropList","",1,"pb-4",3,"cdkDropListDisabled"],[1,"flex","flex-col","items-center","max-w-md","mx-auto","mt-32"],[1,"mr-3",3,"user","subscription"],[3,"user","subscription"],[1,"flex","mb-4","rounded-lg","justify-end","items-center","px-4","lg:px-0"],[1,"flex","mb-4","items-center"],[1,"btn","btn-flat-blue-black","btn-md","hidden","md:inline-block",3,"click"],[1,"ai","ai-arrange","mr-1"],["l10nTranslate",""],[1,"btn-icon","btn-md","btn-flat-blue-black","md:hidden",3,"click"],[1,"ai","ai-arrange"],[1,"flex-1"],["l10nTranslate","",1,"text-blue-black"],["l10nTranslate","",1,"btn","btn-outlined-deep-purple","btn-md","btn-120","mr-2",3,"click"],["l10nTranslate","",1,"btn","btn-contained-deep-purple","btn-md","btn-100",3,"click"],["cdkDropList","",1,"pb-4",3,"cdkDropListDropped","cdkDropListDisabled"],["cdkDragBoundary",".cdk-drop-list","cdkDragLockAxis","y","cdkDrag",""],["class","h-36 bg-white mb-4",4,"cdkDragPlaceholder"],[1,"w-full","mb-4","block",3,"lesson","author"],[1,"border","border-transparent"],[1,"h-36","bg-white","mb-4"],["top-left","",1,"flex","items-center","z-10","ml-2"],[1,"btn-icon","btn-md","btn-flat-blue-black",3,"click"],[1,"ai","ai-tras
1h","text-lg"],[1,"flex","shadow","bg-white","rounded-lg","overflow-hidden","h-36","relative","mb-4","select-none"],[1,"h-full","w-16","md:w-44","border-r","border-blue-black-light-1","shrink-0"],[1,"h-full","object-cover",3,"alt","src"],[1,"flex-1","overflow-hidden"],[1,"flex","flex-col","h-full","py-3","md:py-4"],[1,"flex-1","pl-3","md:pl-4","pr-1","md:pr-4"],[1,"flex","justify-between","items-start"],[1,"text-base","text-blue-black","font-black","md:text-xl"],["cdkDragHandle","",1,"flex","items-center","m-4","px-2","rounded","cursor-move","text-blue-black-light-8","bg-blue-black-light-0.5"],[1,"ai","ai-drag","text-3xl"],[1,"mb-8"],["l10nTranslate","",1,"text-center","mb-6","text-blue-black"]],template:function(i,o){if(i&1&&(v(0,ri,2,1),w(1,"async"),w(2,"async"),w(3,"async"),w(4,"async"),w(5,"async"),w(6,"async")),i&2){let c;b((c=ve(13,Yt,k(1,1,o.isLoadingModule$),k(2,3,o.isOrganizing$),k(3,5,o.user$),k(4,7,o.subscription$),k(5,9,o.collections$),k(6,11,o.lessons$)))?0:-1,c)}},dependencies:[De,Ke,Ye,Ne,We,Fe,X,Je,Qe,J,nt,lt,it,_t,K,Ct],encapsulation:2,changeDetection:0})}}return e})();a();a();a();var ai={"m-collection-details":{0:"Collections",1:"Collection",2:"Edit",3:"Delete",4:"Group your lessons by subjects or topics, you can create them or if you like any of them organize them by collections.",5:"Organize lessons",6:"Drag to organize the lessons",7:"Undo",8:"Accept",9:"Remove of the collection",10:"Cancel",11:"You do not have active subscription. Create, add and sort your lessons in collections.",12:"Go PRO"}},ci={"m-collection-details":{0:"Colecciones",1:"Colecci\xF3n",2:"Editar",3:"Eliminar",4:"Agrupa tus clases por \xE1reas o temas, puedes crearlas o si te gusta alguna organizarlas por colecciones.",5:"Ordenar clases",6:"Arrastra para ordenar las clases",7:"Deshacer",8:"Aceptar",9:"Quitar de la colecci\xF3n",10:"Cancelar",11:"No tienes suscripci\xF3n activa. Crea, a\xF1ade y ordena tus clases en colecciones.",12:"P\xE1sate a PRO"}},di={"m-collection-details":{0:"Collections",1:"Collection",2:"Modifier",3:"Supprimer",4:"Regroupez vos le\xE7ons par mati\xE8res ou th\xE8mes, vous pouvez les cr\xE9er ou si vous le souhaitez les organiser par collections.",5:"Organiser les cours",6:"Faites glisser pour organiser les le\xE7ons",7:"D\xE9faire",8:"Accepter",9:"Suppression de la collection",10:"Annuler",11:"Vous n'avez pas d'abonnement actif. Cr\xE9ez, ajoutez et triez vos le\xE7ons dans des collections.",12:"Devenir PRO"}},pi={"m-collection-details":{0:"Cole\xE7\xF5es",1:"Cole\xE7\xE3o",2:"Editar",3:"Excluir",4:"Agrupe suas aulas por assuntos ou t\xF3picos, voc\xEA pode cri\xE1-los ou, se preferir, organiz\xE1-los por cole\xE7\xF5es.",5:"Organizar aulas",6:"Arraste para organizar as aulas",7:"Desfazer",8:"Aceitar",9:"Retirada da cole\xE7\xE3o",10:"Cancelar",11:"Voc\xEA n\xE3o tem assinatura ativa. Crie, adicione e classifique suas aulas em cole\xE7\xF5es.",12:"V\xE1 PRO"}},se={en:ai,es:ci,fr:di,pt:pi};var vt=(()=>{class e{constructor(){this._translateService=p(Oe),this._collectionService=p(H),this._router=p($),this._store=p(A)}canActivate(t,i){let o=ye(t.params.id);return o===0?(this._router.navigate(["/error/404"],{skipLocationChange:!0}),P(!1)):(this._translateService.addProviders([{name:"m-collection-details",asset:se}]),this._translateService.loadTranslations([{name:"m-collection-details",asset:se}]),this._collectionService.findById(o).pipe(y(c=>P(!0).pipe(O(_=>this._store.dispatch(r.initial())),O(_=>this._store.dispatch(r.loadModule({collection:c}))))),U(()=>(this._router.navigate(["/error/404"],{skipLocationChange:!0}),P(!1)))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var bt=[{path:"",canActivate:[vt],component:xt}];var Sn=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=de({type:e})}static{this.\u0275inj=ae({providers:[ne],imports:[be,Te.forChild(bt),qe,ze,Pe,Be,Xe,je,Le.forFeature(te,at),Me.forFeature([ft]),tt,st,ot]})}}return e})();export{Sn as TdCollectionDetailsModule};
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.