2 lines
31 KiB
JavaScript
2 lines
31 KiB
JavaScript
import"./chunk-MS4AQ6UA.js";import{a as St,b as wt}from"./chunk-GIRDLTGV.js";import{c as vt}from"./chunk-P3ICZX4Q.js";import{a as Bt}from"./chunk-L5RFXRXA.js";import"./chunk-66PBOFKL.js";import"./chunk-NYYADJNO.js";import{b as gt,c as kt}from"./chunk-R3PUHZUP.js";import"./chunk-3RK6DDJD.js";import{a as lt}from"./chunk-7XDVX5KB.js";import{a as yt}from"./chunk-B4CGVF35.js";import{b as xt}from"./chunk-NIBVQDYD.js";import"./chunk-LLJSP5R2.js";import"./chunk-HMKN2VB2.js";import"./chunk-M5XZ5N2D.js";import{b as Pt,g as Ot}from"./chunk-TAS7XC6E.js";import{a as bt}from"./chunk-3GOV5KJM.js";import{a as I}from"./chunk-TPLZKWZ7.js";import{b as ct,e as st,f as mt,i as dt}from"./chunk-EGL4ZKWQ.js";import"./chunk-GPI43RSU.js";import{a as nt,c as ot,e as it,f as at,i as rt}from"./chunk-6NRCTHHS.js";import"./chunk-RC3JXGN6.js";import{a as Mt,b as ht}from"./chunk-N6VRXIQE.js";import{b as X,f as Z,k as tt,y as et}from"./chunk-GWD5A44H.js";import{a as D}from"./chunk-52JZ5I3Y.js";import{Aa as ft,c as H,g as Y,j as G,n as J,ua as _t,w as T,wa as pt,x as K,ya as Ct,za as ut}from"./chunk-COFYR5MX.js";import{D as y,Db as k,Eb as _,Ec as P,Gb as W,Hb as S,Ib as w,Jb as f,Kb as a,Lb as i,Mb as z,Tb as h,U as F,W as v,Xb as p,Za as m,Zb as d,_ as U,da as C,f as A,i as $,ia as l,ja as g,lc as r,mc as b,nc as M,o as x,ob as j,qc as B,r as L,rc as E,sc as q,ta as u,vc as N,wc as R,xc as Q}from"./chunk-2MUIW2M6.js";var V=class c{http=C(J);router=C(T);toastService=C(D);authService=C(I);API_URL=`${bt.apiUrl}/users`;CACHE_TTL=300*1e3;bookmarksState=u([]);isLoading=u(!1);error=u(null);bookmarksCache=new Map;totalBookmarks=P(()=>this.bookmarksState().length);hasBookmarks=P(()=>this.bookmarksState().length>0);bookmarksByCategory=P(()=>{let e=this.bookmarksState(),t=new Map;return e.forEach(o=>{let n=o.question.categoryName;t.has(n)||t.set(n,[]),t.get(n).push(o)}),t});getBookmarks(e,t=!1){if(!t){let o=this.bookmarksCache.get(e);if(o&&Date.now()-o.timestamp<this.CACHE_TTL)return this.bookmarksState.set(o.data),new A(n=>{n.next(o.data),n.complete()})}return this.isLoading.set(!0),this.error.set(null),this.http.get(`${this.API_URL}/${e}/bookmarks`).pipe(v(o=>{let n=o.data.bookmarks;this.bookmarksState.set(n),this.bookmarksCache.set(e,{data:n,timestamp:Date.now()}),this.isLoading.set(!1)}),y(o=>(console.error("Error fetching bookmarks:",o),this.error.set(o.error?.message||"Failed to load bookmarks"),this.isLoading.set(!1),o.status===401?(this.toastService.error("Please log in to view your bookmarks"),this.router.navigate(["/login"])):this.toastService.error("Failed to load bookmarks"),x(()=>o))),L(o=>o.data.bookmarks))}addBookmark(e,t){let o={questionId:t};return this.http.post(`${this.API_URL}/${e}/bookmarks`,o).pipe(v(n=>{let s=this.bookmarksState();this.bookmarksState.set([...s,n.data.bookmark]),this.bookmarksCache.delete(e),this.toastService.success("Question bookmarked successfully")}),y(n=>(console.error("Error adding bookmark:",n),n.status===401?(this.toastService.error("Please log in to bookmark questions"),this.router.navigate(["/login"])):n.status===409?this.toastService.info("Question is already bookmarked"):this.toastService.error("Failed to bookmark question"),x(()=>n))),L(n=>n.data.bookmark))}removeBookmark(e,t){return this.http.delete(`${this.API_URL}/${e}/bookmarks/${t}`).pipe(v(()=>{let n=this.bookmarksState().filter(s=>s.questionId!==t);this.bookmarksState.set(n),this.bookmarksCache.delete(e),this.toastService.success("Bookmark removed")}),y(o=>{if(console.error("Error removing bookmark:",o),o.status===401)this.toastService.error("Please log in to manage bookmarks"),this.router.navigate(["/login"]);else if(o.status===404){this.toastService.warning("Bookmark not found");let s=this.bookmarksState().filter(O=>O.questionId!==t);this.bookmarksState.set(s)}else this.toastService.error("Failed to remove bookmark");return x(()=>o)}))}isBookmarked(e){return this.bookmarksState().some(t=>t.questionId===e)}getBookmarkByQuestionId(e){return this.bookmarksState().find(t=>t.questionId===e)}clearCache(){this.bookmarksCache.clear(),this.bookmarksState.set([]),this.error.set(null)}searchBookmarks(e){if(!e.trim())return this.bookmarksState();let t=e.toLowerCase();return this.bookmarksState().filter(o=>o.question.questionText.toLowerCase().includes(t)||o.question.categoryName.toLowerCase().includes(t)||o.question.tags?.some(n=>n.toLowerCase().includes(t)))}filterByCategory(e){return e?this.bookmarksState().filter(t=>t.question.categoryId===e):this.bookmarksState()}filterByDifficulty(e){return e?this.bookmarksState().filter(t=>t.question.difficulty===e):this.bookmarksState()}getCategories(){let e=new Map;return this.bookmarksState().forEach(t=>{e.set(t.question.categoryId,t.question.categoryName)}),Array.from(e.entries()).map(([t,o])=>({id:t,name:o}))}static \u0275fac=function(t){return new(t||c)};static \u0275prov=U({token:c,factory:c.\u0275fac,providedIn:"root"})};var Dt=()=>["/dashboard"],It=()=>["/categories"],qt=(c,e)=>e.id;function Vt(c,e){if(c&1){let t=h();a(0,"button",9),p("click",function(){l(t);let n=d();return g(n.practiceBookmarkedQuestions())}),a(1,"mat-icon"),r(2,"play_arrow"),i(),r(3," Practice All "),i()}}function Lt(c,e){c&1&&(a(0,"div",7),z(1,"mat-spinner",10),a(2,"p"),r(3,"Loading your bookmarks..."),i()())}function Ft(c,e){if(c&1){let t=h();a(0,"div",8)(1,"mat-icon",11),r(2,"error_outline"),i(),a(3,"h2"),r(4,"Failed to Load Bookmarks"),i(),a(5,"p"),r(6),i(),a(7,"button",12),p("click",function(){l(t);let n=d();return g(n.loadBookmarks(!0))}),a(8,"mat-icon"),r(9,"refresh"),i(),r(10," Try Again "),i()()}if(c&2){let t=d();m(6),b(t.error())}}function zt(c,e){if(c&1){let t=h();a(0,"button",33),p("click",function(){l(t);let n=d(2);return g(n.searchQuery.set(""))}),a(1,"mat-icon"),r(2,"close"),i()()}}function Nt(c,e){if(c&1&&(a(0,"mat-option",29),r(1),i()),c&2){let t=e.$implicit;f("value",t.id),m(),b(t.name)}}function Rt(c,e){if(c&1&&(a(0,"mat-option",29),r(1),R(2,"titlecase"),i()),c&2){let t=e.$implicit;f("value",t),m(),M(" ",Q(2,2,t)," ")}}function Qt(c,e){if(c&1){let t=h();a(0,"button",34),p("click",function(){l(t);let n=d(2);return g(n.resetFilters())}),a(1,"mat-icon"),r(2,"clear_all"),i(),r(3," Reset "),i()}}function At(c,e){c&1&&(a(0,"div",31)(1,"mat-icon",35),r(2,"bookmark_border"),i(),a(3,"h2"),r(4,"No Bookmarks Yet"),i(),a(5,"p"),r(6,"Start bookmarking questions while taking quizzes to build your study collection."),i(),a(7,"button",36)(8,"mat-icon"),r(9,"explore"),i(),r(10," Browse Categories "),i()()),c&2&&(m(7),f("routerLink",N(1,It)))}function $t(c,e){if(c&1){let t=h();a(0,"div",31)(1,"mat-icon",35),r(2,"search_off"),i(),a(3,"h2"),r(4,"No Matching Bookmarks"),i(),a(5,"p"),r(6,"Try adjusting your filters or search query."),i(),a(7,"button",37),p("click",function(){l(t);let n=d(2);return g(n.resetFilters())}),a(8,"mat-icon"),r(9,"clear_all"),i(),r(10," Clear Filters "),i()()}}function Ut(c,e){c&1&&z(0,"mat-spinner",43)}function jt(c,e){c&1&&(a(0,"mat-icon"),r(1,"bookmark"),i())}function Wt(c,e){if(c&1&&(a(0,"span"),r(1),i()),c&2){let t=d(2).$implicit;m(),M("+",t.question.tags.length-2)}}function Ht(c,e){if(c&1&&(a(0,"mat-chip",47)(1,"mat-icon"),r(2,"label"),i(),r(3),k(4,Wt,2,1,"span"),i()),c&2){let t=d().$implicit;m(3),M(" ",t.question.tags.slice(0,2).join(", ")," "),m(),_(t.question.tags.length>2?4:-1)}}function Yt(c,e){if(c&1){let t=h();a(0,"mat-card",39),p("click",function(){let n=l(t).$implicit,s=d(3);return g(s.viewQuestion(n))}),a(1,"mat-card-header")(2,"div",40)(3,"div",41)(4,"mat-icon"),r(5),i(),a(6,"span"),r(7),R(8,"titlecase"),i()(),a(9,"button",42),p("click",function(n){let s=l(t).$implicit,O=d(3);return g(O.removeBookmark(s.questionId,n))}),k(10,Ut,1,0,"mat-spinner",43)(11,jt,2,0,"mat-icon"),i()()(),a(12,"mat-card-content")(13,"p",44),r(14),i(),a(15,"div",45)(16,"mat-chip",46)(17,"mat-icon"),r(18,"category"),i(),r(19),i(),k(20,Ht,5,2,"mat-chip",47),a(21,"mat-chip",48)(22,"mat-icon"),r(23,"stars"),i(),r(24),i()(),a(25,"div",49)(26,"mat-icon"),r(27,"schedule"),i(),a(28,"span"),r(29),i()()(),a(30,"mat-card-actions")(31,"button",50),p("click",function(n){let s=l(t).$implicit;return d(3).viewQuestion(s),g(n.stopPropagation())}),a(32,"mat-icon"),r(33,"visibility"),i(),r(34," View Details "),i()()()}if(c&2){let t=e.$implicit,o=d(3);m(3),f("ngClass",o.getDifficultyClass(t.question.difficulty)),m(2),b(o.getDifficultyIcon(t.question.difficulty)),m(2),b(Q(8,11,t.question.difficulty)),m(2),f("disabled",o.isRemovingBookmark(t.questionId))("matTooltip","Remove bookmark"),m(),_(o.isRemovingBookmark(t.questionId)?10:11),m(4),M(" ",o.truncateText(t.question.questionText,200)," "),m(5),M(" ",t.question.categoryName," "),m(),_(t.question.tags&&t.question.tags.length>0?20:-1),m(4),M(" ",t.question.points," pts "),m(5),M("Bookmarked ",o.formatDate(t.createdAt))}}function Gt(c,e){if(c&1&&(a(0,"div",32),S(1,Yt,35,13,"mat-card",38,qt),i()),c&2){let t=d(2);m(),w(t.filteredBookmarks())}}function Jt(c,e){if(c&1){let t=h();a(0,"div",13)(1,"mat-card",14)(2,"mat-card-content")(3,"div",15)(4,"mat-icon"),r(5,"sentiment_satisfied"),i()(),a(6,"div",16)(7,"span",17),r(8),i(),a(9,"span",18),r(10,"Easy"),i()()()(),a(11,"mat-card",14)(12,"mat-card-content")(13,"div",19)(14,"mat-icon"),r(15,"sentiment_neutral"),i()(),a(16,"div",16)(17,"span",17),r(18),i(),a(19,"span",18),r(20,"Medium"),i()()()(),a(21,"mat-card",14)(22,"mat-card-content")(23,"div",20)(24,"mat-icon"),r(25,"sentiment_dissatisfied"),i()(),a(26,"div",16)(27,"span",17),r(28),i(),a(29,"span",18),r(30,"Hard"),i()()()()(),a(31,"mat-card",21)(32,"mat-card-content")(33,"div",22)(34,"mat-form-field",23)(35,"mat-label"),r(36,"Search bookmarks"),i(),a(37,"input",24),q("ngModelChange",function(n){l(t);let s=d();return E(s.searchQuery,n)||(s.searchQuery=n),g(n)}),p("ngModelChange",function(n){l(t);let s=d();return g(s.searchQuery.set(n))}),i(),a(38,"mat-icon",25),r(39,"search"),i(),k(40,zt,3,0,"button",26),i(),a(41,"mat-form-field",27)(42,"mat-label"),r(43,"Category"),i(),a(44,"mat-select",28),q("ngModelChange",function(n){l(t);let s=d();return E(s.selectedCategory,n)||(s.selectedCategory=n),g(n)}),p("ngModelChange",function(n){l(t);let s=d();return g(s.selectedCategory.set(n))}),a(45,"mat-option",29),r(46,"All Categories"),i(),S(47,Nt,2,2,"mat-option",29,qt),i(),a(49,"mat-icon",25),r(50,"category"),i()(),a(51,"mat-form-field",27)(52,"mat-label"),r(53,"Difficulty"),i(),a(54,"mat-select",28),q("ngModelChange",function(n){l(t);let s=d();return E(s.selectedDifficulty,n)||(s.selectedDifficulty=n),g(n)}),p("ngModelChange",function(n){l(t);let s=d();return g(s.selectedDifficulty.set(n))}),a(55,"mat-option",29),r(56,"All Difficulties"),i(),S(57,Rt,3,4,"mat-option",29,W),i(),a(59,"mat-icon",25),r(60,"filter_list"),i()(),k(61,Qt,4,0,"button",30),i()()(),k(62,At,11,2,"div",31),k(63,$t,11,0,"div",31),k(64,Gt,3,0,"div",32)}if(c&2){let t=d();m(8),b(t.stats().byDifficulty.easy),m(10),b(t.stats().byDifficulty.medium),m(10),b(t.stats().byDifficulty.hard),m(9),B("ngModel",t.searchQuery),m(3),_(t.searchQuery()?40:-1),m(4),B("ngModel",t.selectedCategory),m(),f("value",null),m(2),w(t.categories()),m(7),B("ngModel",t.selectedDifficulty),m(),f("value",null),m(2),w(t.difficulties),m(4),_(t.searchQuery()||t.selectedCategory()||t.selectedDifficulty()?61:-1),m(),_(t.allBookmarks().length===0?62:-1),m(),_(t.allBookmarks().length>0&&t.filteredBookmarks().length===0?63:-1),m(),_(t.filteredBookmarks().length>0?64:-1)}}var Et=class c{bookmarkService=C(V);authService=C(I);quizService=C(Bt);toastService=C(D);router=C(T);destroy$=new $;searchQuery=u("");selectedCategory=u(null);selectedDifficulty=u(null);isRemoving=u(new Set);isLoading=this.bookmarkService.isLoading;error=this.bookmarkService.error;allBookmarks=this.bookmarkService.bookmarksState;currentUser=this.authService.getCurrentUser();filteredBookmarks=P(()=>{let e=this.allBookmarks(),t=this.searchQuery();t.trim()&&(e=this.bookmarkService.searchBookmarks(t));let o=this.selectedCategory();o&&(e=e.filter(s=>s.question.categoryId===o));let n=this.selectedDifficulty();return n&&(e=e.filter(s=>s.question.difficulty===n)),e});categories=P(()=>this.bookmarkService.getCategories());difficulties=["easy","medium","hard"];stats=P(()=>{let e=this.allBookmarks();return{total:e.length,byDifficulty:{easy:e.filter(t=>t.question.difficulty==="easy").length,medium:e.filter(t=>t.question.difficulty==="medium").length,hard:e.filter(t=>t.question.difficulty==="hard").length}}});ngOnInit(){if(!this.currentUser){this.toastService.error("Please log in to view bookmarks"),this.router.navigate(["/login"]);return}this.loadBookmarks()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}loadBookmarks(e=!1){this.currentUser&&this.bookmarkService.getBookmarks(this.currentUser.id,e).pipe(F(this.destroy$)).subscribe({error:t=>{console.error("Error loading bookmarks:",t)}})}removeBookmark(e,t){t.stopPropagation(),this.currentUser&&(this.isRemoving.update(o=>{let n=new Set(o);return n.add(e),n}),this.bookmarkService.removeBookmark(this.currentUser.id,e).pipe(F(this.destroy$)).subscribe({next:()=>{this.isRemoving.update(o=>{let n=new Set(o);return n.delete(e),n})},error:o=>{console.error("Error removing bookmark:",o),this.isRemoving.update(n=>{let s=new Set(n);return s.delete(e),s})}}))}isRemovingBookmark(e){return this.isRemoving().has(e)}practiceBookmarkedQuestions(){let e=this.filteredBookmarks();if(e.length===0){this.toastService.warning("No bookmarks to practice");return}this.toastService.info(`Starting quiz with ${e.length} bookmarked questions`)}viewQuestion(e){this.toastService.info("Question detail view coming soon")}resetFilters(){this.searchQuery.set(""),this.selectedCategory.set(null),this.selectedDifficulty.set(null)}getDifficultyClass(e){switch(e){case"easy":return"difficulty-easy";case"medium":return"difficulty-medium";case"hard":return"difficulty-hard";default:return""}}getDifficultyIcon(e){switch(e){case"easy":return"sentiment_satisfied";case"medium":return"sentiment_neutral";case"hard":return"sentiment_dissatisfied";default:return"help_outline"}}truncateText(e,t){return e.length<=t?e:e.substring(0,t)+"..."}formatDate(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),s=Math.floor(n/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s<7?`${s} days ago`:s<30?`${Math.floor(s/7)} weeks ago`:s<365?`${Math.floor(s/30)} months ago`:`${Math.floor(s/365)} years ago`}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=j({type:c,selectors:[["app-bookmarks"]],decls:15,vars:7,consts:[[1,"bookmarks-container"],[1,"bookmarks-header"],[1,"header-content"],["mat-icon-button","",1,"back-button",3,"routerLink"],[1,"header-text"],[1,"subtitle"],["mat-raised-button","","color","primary",1,"practice-button"],[1,"loading-container"],[1,"error-container"],["mat-raised-button","","color","primary",1,"practice-button",3,"click"],["diameter","50"],[1,"error-icon"],["mat-raised-button","","color","primary",3,"click"],[1,"stats-section"],[1,"stat-card"],[1,"stat-icon","easy"],[1,"stat-info"],[1,"stat-value"],[1,"stat-label"],[1,"stat-icon","medium"],[1,"stat-icon","hard"],[1,"filters-card"],[1,"filters-row"],["appearance","outline",1,"search-field"],["matInput","","placeholder","Search by question or category",3,"ngModelChange","ngModel"],["matPrefix",""],["mat-icon-button","","matSuffix","","aria-label","Clear search"],["appearance","outline",1,"filter-field"],[3,"ngModelChange","ngModel"],[3,"value"],["mat-stroked-button","",1,"reset-button"],[1,"empty-state"],[1,"bookmarks-grid"],["mat-icon-button","","matSuffix","","aria-label","Clear search",3,"click"],["mat-stroked-button","",1,"reset-button",3,"click"],[1,"empty-icon"],["mat-raised-button","","color","primary",3,"routerLink"],["mat-stroked-button","",3,"click"],[1,"bookmark-card"],[1,"bookmark-card",3,"click"],[1,"card-header-content"],[1,"difficulty-badge",3,"ngClass"],["mat-icon-button","",1,"remove-button",3,"click","disabled","matTooltip"],["diameter","20"],[1,"question-text"],[1,"question-meta"],[1,"category-chip"],[1,"tags-chip"],[1,"points-chip"],[1,"bookmark-date"],["mat-button","","color","primary",3,"click"]],template:function(t,o){t&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3)(4,"mat-icon"),r(5,"arrow_back"),i()(),a(6,"div",4)(7,"h1"),r(8,"My Bookmarks"),i(),a(9,"p",5),r(10),i()()(),k(11,Vt,4,0,"button",6),i(),k(12,Lt,4,0,"div",7),k(13,Ft,11,1,"div",8),k(14,Jt,65,13),i()),t&2&&(m(3),f("routerLink",N(6,Dt)),m(7),M("",o.stats().total," saved questions"),m(),_(o.filteredBookmarks().length>0?11:-1),m(),_(o.isLoading()?12:-1),m(),_(o.error()&&!o.isLoading()?13:-1),m(),_(!o.isLoading()&&!o.error()?14:-1))},dependencies:[G,H,et,X,Z,tt,K,rt,nt,it,ot,at,Ct,pt,_t,ft,ut,Ot,Pt,ht,Mt,lt,dt,ct,st,mt,kt,gt,wt,St,vt,yt,xt,Y],styles:[".bookmarks-container[_ngcontent-%COMP%]{max-width:1400px;margin:0 auto;padding:24px;min-height:calc(100vh - 64px)}@media (max-width: 768px){.bookmarks-container[_ngcontent-%COMP%]{padding:16px}}.bookmarks-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;gap:16px}.bookmarks-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;flex:1}.bookmarks-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{color:#666;transition:color .3s}.bookmarks-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]:hover{color:#1a237e}.bookmarks-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .header-text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font-size:2rem;font-weight:600;color:#1a237e}@media (max-width: 768px){.bookmarks-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .header-text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.5rem}}.bookmarks-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .header-text[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{margin:4px 0 0;font-size:.875rem;color:#666}.bookmarks-header[_ngcontent-%COMP%] .practice-button[_ngcontent-%COMP%]{height:48px;padding:0 24px;font-weight:600;box-shadow:0 2px 8px #667eea4d;transition:all .3s}.bookmarks-header[_ngcontent-%COMP%] .practice-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:8px}.bookmarks-header[_ngcontent-%COMP%] .practice-button[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #667eea66;transform:translateY(-2px)}@media (max-width: 768px){.bookmarks-header[_ngcontent-%COMP%] .practice-button[_ngcontent-%COMP%]{padding:0 16px;font-size:.875rem}}@media (max-width: 768px){.bookmarks-header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.bookmarks-header[_ngcontent-%COMP%] .practice-button[_ngcontent-%COMP%]{width:100%}}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:400px;gap:1.5rem}.loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#666;font-size:1rem}.error-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:400px;gap:1rem;text-align:center;padding:2rem}.error-container[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{font-size:4rem;width:4rem;height:4rem;color:#f44336}.error-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:#333}.error-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#666;margin:.5rem 0 1.5rem}.stats-section[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:24px}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%]{box-shadow:0 2px 8px #0000001a;border-radius:12px;transition:all .3s}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #00000026;transform:translateY(-2px)}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:20px}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%]{width:56px;height:56px;border-radius:12px;display:flex;align-items:center;justify-content:center}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:32px;width:32px;height:32px;color:#fff}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .stat-icon.easy[_ngcontent-%COMP%]{background:linear-gradient(135deg,#4caf50,#8bc34a)}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .stat-icon.medium[_ngcontent-%COMP%]{background:linear-gradient(135deg,#ff9800,#ffc107)}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .stat-icon.hard[_ngcontent-%COMP%]{background:linear-gradient(135deg,#f44336,#ff5722)}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .stat-info[_ngcontent-%COMP%]{display:flex;flex-direction:column}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .stat-info[_ngcontent-%COMP%] .stat-value[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;color:#333;line-height:1}.stats-section[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .stat-info[_ngcontent-%COMP%] .stat-label[_ngcontent-%COMP%]{font-size:.875rem;color:#666;margin-top:4px}.filters-card[_ngcontent-%COMP%]{margin-bottom:24px;box-shadow:0 2px 8px #0000001a;border-radius:12px}.filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:20px}.filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .filters-row[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .filters-row[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{flex:2;min-width:250px}.filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .filters-row[_ngcontent-%COMP%] .filter-field[_ngcontent-%COMP%]{flex:1;min-width:150px}.filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .filters-row[_ngcontent-%COMP%] .reset-button[_ngcontent-%COMP%]{height:56px;min-width:100px}.filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .filters-row[_ngcontent-%COMP%] .reset-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:4px}@media (max-width: 768px){.filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .filters-row[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%], .filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .filters-row[_ngcontent-%COMP%] .filter-field[_ngcontent-%COMP%]{flex:1 1 100%;width:100%}.filters-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .filters-row[_ngcontent-%COMP%] .reset-button[_ngcontent-%COMP%]{flex:1 1 100%;width:100%}}.empty-state[_ngcontent-%COMP%]{text-align:center;padding:4rem 2rem;animation:_ngcontent-%COMP%_fadeIn .5s ease-in}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:5rem;width:5rem;height:5rem;color:#667eea;opacity:.5;margin-bottom:1rem}.empty-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 1rem;color:#333;font-size:1.75rem}.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#666;margin-bottom:2rem;font-size:1rem}.empty-state[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:8px}.bookmarks-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px;animation:_ngcontent-%COMP%_fadeIn .5s ease-in}@media (max-width: 768px){.bookmarks-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:16px}}.bookmark-card[_ngcontent-%COMP%]{box-shadow:0 2px 8px #0000001a;border-radius:12px;transition:all .3s;cursor:pointer;display:flex;flex-direction:column;height:100%}.bookmark-card[_ngcontent-%COMP%]:hover{box-shadow:0 8px 16px #00000026;transform:translateY(-4px)}.bookmark-card[_ngcontent-%COMP%]:hover .remove-button[_ngcontent-%COMP%]{opacity:1}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{padding:16px 16px 0}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .difficulty-badge[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;padding:6px 12px;border-radius:20px;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .difficulty-badge[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .difficulty-badge.difficulty-easy[_ngcontent-%COMP%]{background:#e8f5e9;color:#2e7d32}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .difficulty-badge.difficulty-medium[_ngcontent-%COMP%]{background:#fff3e0;color:#e65100}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .difficulty-badge.difficulty-hard[_ngcontent-%COMP%]{background:#ffebee;color:#c62828}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .remove-button[_ngcontent-%COMP%]{opacity:.6;transition:all .3s;color:#f44336}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .remove-button[_ngcontent-%COMP%]:hover{opacity:1;background:#ffebee}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .remove-button[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.4}.bookmark-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .remove-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:16px;flex:1;display:flex;flex-direction:column;gap:16px}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .question-text[_ngcontent-%COMP%]{color:#333;font-size:.938rem;line-height:1.6;margin:0;flex:1}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{height:28px;font-size:.75rem;border-radius:14px;background:#f5f5f5;color:#666}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;margin-right:4px}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip.category-chip[_ngcontent-%COMP%]{background:#e3f2fd;color:#1976d2}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip.tags-chip[_ngcontent-%COMP%]{background:#f3e5f5;color:#7b1fa2}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip.points-chip[_ngcontent-%COMP%]{background:#fff3e0;color:#e65100}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .bookmark-date[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:.75rem;color:#999;margin-top:auto}.bookmark-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .bookmark-date[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px}.bookmark-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%]{padding:12px 16px 16px;margin:0;border-top:1px solid #f0f0f0}.bookmark-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:4px;font-size:18px;width:18px;height:18px}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.bookmarks-container[_ngcontent-%COMP%] .bookmarks-header[_ngcontent-%COMP%] .header-text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:#90caf9}.bookmarks-container[_ngcontent-%COMP%] .bookmarks-header[_ngcontent-%COMP%] .header-text[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{color:#bbb}.bookmarks-container[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#e0e0e0}.bookmarks-container[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#bbb}.bookmarks-container[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .filters-card[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%]{background:#1e1e1e;color:#e0e0e0}.bookmarks-container[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] .question-text[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .filters-card[_ngcontent-%COMP%] .question-text[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .question-text[_ngcontent-%COMP%]{color:#e0e0e0}.bookmarks-container[_ngcontent-%COMP%] .stat-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .filters-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%], .bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%]{border-top-color:#333}.bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .difficulty-badge.difficulty-easy[_ngcontent-%COMP%]{background:#1b5e20;color:#a5d6a7}.bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .difficulty-badge.difficulty-medium[_ngcontent-%COMP%]{background:#e65100;color:#ffcc80}.bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .difficulty-badge.difficulty-hard[_ngcontent-%COMP%]{background:#b71c1c;color:#ef9a9a}.bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{background:#2a2a2a;color:#bbb}.bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip.category-chip[_ngcontent-%COMP%]{background:#0d47a1;color:#90caf9}.bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip.tags-chip[_ngcontent-%COMP%]{background:#4a148c;color:#ce93d8}.bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .question-meta[_ngcontent-%COMP%] mat-chip.points-chip[_ngcontent-%COMP%]{background:#e65100;color:#ffcc80}.bookmarks-container[_ngcontent-%COMP%] .bookmark-card[_ngcontent-%COMP%] .bookmark-date[_ngcontent-%COMP%]{color:#777}}"]})};export{Et as BookmarksComponent};
|