diff --git a/dist/css/131.27329b36.css b/dist/css/131.27329b36.css
new file mode 100644
index 0000000..2b2dae2
--- /dev/null
+++ b/dist/css/131.27329b36.css
@@ -0,0 +1 @@
+.about-container[data-v-3d22bf72]{max-width:96%;margin:0 auto;padding:20px}.intro-section[data-v-3d22bf72]{margin-bottom:40px;padding:20px;background-color:#f5f5f5;border-radius:8px}.intro-section h1[data-v-3d22bf72]{color:#333;margin-bottom:20px}.intro-section p[data-v-3d22bf72]{color:#666;line-height:1.6}.timeline-section h2[data-v-3d22bf72]{margin-bottom:30px;color:#333}.timeline[data-v-3d22bf72]{position:relative;padding:20px 0}.timeline[data-v-3d22bf72]:before{content:"";position:absolute;left:120px;top:0;bottom:0;width:2px;background:#e0e0e0}.timeline-item[data-v-3d22bf72]{position:relative;margin-bottom:30px;padding-left:160px}.timeline-date[data-v-3d22bf72]{position:absolute;left:0;width:100px;text-align:right;color:#666;font-weight:500}.timeline-content[data-v-3d22bf72]{position:relative;padding:20px;background:#fff;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.1);margin-bottom:20px}.timeline-content[data-v-3d22bf72]:before{content:"";position:absolute;left:-40px;top:24px;width:16px;height:16px;border-radius:50%;background:#2196f3;border:3px solid #fff;box-shadow:0 0 0 3px #e3f2fd}.timeline-content h3[data-v-3d22bf72]{margin:0 0 10px;color:#2196f3}.timeline-content ul[data-v-3d22bf72]{margin:0;padding-left:20px;color:#666}.timeline-content li[data-v-3d22bf72]{margin:5px 0}
\ No newline at end of file
diff --git a/dist/css/878.45ce97f4.css b/dist/css/878.45ce97f4.css
deleted file mode 100644
index 4cd94f3..0000000
--- a/dist/css/878.45ce97f4.css
+++ /dev/null
@@ -1 +0,0 @@
-.about-container[data-v-55d9a34a]{max-width:96%;margin:0 auto;padding:20px}.intro-section[data-v-55d9a34a]{margin-bottom:40px;padding:20px;background-color:#f5f5f5;border-radius:8px}.intro-section h1[data-v-55d9a34a]{color:#333;margin-bottom:20px}.intro-section p[data-v-55d9a34a]{color:#666;line-height:1.6}.timeline-section h2[data-v-55d9a34a]{margin-bottom:30px;color:#333}.timeline[data-v-55d9a34a]{position:relative;padding:20px 0}.timeline[data-v-55d9a34a]:before{content:"";position:absolute;left:120px;top:0;bottom:0;width:2px;background:#e0e0e0}.timeline-item[data-v-55d9a34a]{position:relative;margin-bottom:30px;padding-left:160px}.timeline-date[data-v-55d9a34a]{position:absolute;left:0;width:100px;text-align:right;color:#666;font-weight:500}.timeline-content[data-v-55d9a34a]{position:relative;padding:20px;background:#fff;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.1);margin-bottom:20px}.timeline-content[data-v-55d9a34a]:before{content:"";position:absolute;left:-40px;top:24px;width:16px;height:16px;border-radius:50%;background:#2196f3;border:3px solid #fff;box-shadow:0 0 0 3px #e3f2fd}.timeline-content h3[data-v-55d9a34a]{margin:0 0 10px;color:#2196f3}.timeline-content ul[data-v-55d9a34a]{margin:0;padding-left:20px;color:#666}.timeline-content li[data-v-55d9a34a]{margin:5px 0}
\ No newline at end of file
diff --git a/dist/index.html b/dist/index.html
index f7bfc8c..7756ad2 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -1 +1 @@
-
NEU小站OJ题库 我们很抱歉,OJ题库在 JavaScript 未启用时无法正常工作。请启用它以继续。
\ No newline at end of file
+NEU小站OJ题库 我们很抱歉,OJ题库在 JavaScript 未启用时无法正常工作。请启用它以继续。
\ No newline at end of file
diff --git a/dist/js/131.779032f2.js b/dist/js/131.779032f2.js
new file mode 100644
index 0000000..0938290
--- /dev/null
+++ b/dist/js/131.779032f2.js
@@ -0,0 +1,2 @@
+"use strict";(self["webpackChunkfront"]=self["webpackChunkfront"]||[]).push([[131],{1131:function(d,a,t){t.r(a),t.d(a,{default:function(){return b}});var i=t(6768);const v={class:"about-container"};function l(d,a){return(0,i.uX)(),(0,i.CE)("div",v,a[0]||(a[0]=[(0,i.Fv)('关于本系统 NEU小站OJ题库的所有题目均来自东北大学OJ系统,与官方题库保持一致,主要解决官方OJ搜索功能鸡肋,无法根据知识点、难度等全方位筛选题目的问题。本系统面向所有NEU小站用户免费开放,无需进行校园网验证。
本题库仅做题目收集与展示,不提供OJ在线评测。
更新日志 2025年2月
v1.0.2 新增题目反馈功能 新增快速跳转到指定页码 优化页面导航体验 ',2)]))}var f=t(1241);const e={},n=(0,f.A)(e,[["render",l],["__scopeId","data-v-3d22bf72"]]);var b=n}}]);
+//# sourceMappingURL=131.779032f2.js.map
\ No newline at end of file
diff --git a/dist/js/878.871004f9.js b/dist/js/878.871004f9.js
deleted file mode 100644
index 3bdcb47..0000000
--- a/dist/js/878.871004f9.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self["webpackChunkfront"]=self["webpackChunkfront"]||[]).push([[878],{4878:function(a,d,t){t.r(d),t.d(d,{default:function(){return c}});var i=t(6768);const v={class:"about-container"};function l(a,d){return(0,i.uX)(),(0,i.CE)("div",v,d[0]||(d[0]=[(0,i.Fv)('关于本系统 NEU小站OJ题库的所有题目均来自东北大学OJ系统,与官方题库保持一致,主要解决官方OJ搜索功能鸡肋,无法根据知识点、难度等全方位筛选题目的问题。本系统面向所有NEU小站用户免费开放,无需进行校园网验证。
本题库仅做题目收集与展示,不提供OJ在线评测。
更新日志 2025年2月
v1.0.2 新增题目反馈功能 新增快速跳转到指定页码 优化页面导航体验 ',2)]))}var e=t(1241);const n={},s=(0,e.A)(n,[["render",l],["__scopeId","data-v-55d9a34a"]]);var c=s}}]);
-//# sourceMappingURL=878.871004f9.js.map
\ No newline at end of file
diff --git a/dist/js/app.7c9fb705.js b/dist/js/app.5e4168af.js
similarity index 98%
rename from dist/js/app.7c9fb705.js
rename to dist/js/app.5e4168af.js
index b4daa16..989bd78 100644
--- a/dist/js/app.7c9fb705.js
+++ b/dist/js/app.5e4168af.js
@@ -1,2 +1,2 @@
-(function(){"use strict";var e={932:function(e,t,o){var n=o(5130),a=o(6768);const l={class:"app"},i={key:0,class:"loading"},s={key:1,class:"login-prompt"},r={class:"sidebar"},c={class:"nav-links"},d={class:"main-content"};function u(e,t,o,n,u,h){const k=(0,a.g2)("router-link"),p=(0,a.g2)("router-view");return(0,a.uX)(),(0,a.CE)("div",l,[u.isLoading?((0,a.uX)(),(0,a.CE)("div",i," 加载中... ")):u.isLoggedIn?((0,a.uX)(),(0,a.CE)(a.FK,{key:2},[(0,a.Lk)("div",r,[(0,a.Lk)("div",c,[(0,a.bF)(k,{to:"/problems",class:"nav-item"},{default:(0,a.k6)((()=>t[4]||(t[4]=[(0,a.eW)("题目列表")]))),_:1}),(0,a.bF)(k,{to:"/my",class:"nav-item"},{default:(0,a.k6)((()=>t[5]||(t[5]=[(0,a.eW)("我标记的题目")]))),_:1}),(0,a.bF)(k,{to:"/bookmarks",class:"nav-item"},{default:(0,a.k6)((()=>t[6]||(t[6]=[(0,a.eW)("我的书签")]))),_:1}),(0,a.bF)(k,{to:"/about",class:"nav-item"},{default:(0,a.k6)((()=>t[7]||(t[7]=[(0,a.eW)("关于")]))),_:1})]),t[8]||(t[8]=(0,a.Lk)("div",{class:"footer-info"},[(0,a.Lk)("div",{class:"version-info"},"NEU小站OJ题库 - v1.0"),(0,a.Lk)("div",{class:"source-info"},[(0,a.eW)("© 2025 "),(0,a.Lk)("a",{href:"https://www.东北大学.com",target:"_blank"},"NEU小站")])],-1))]),(0,a.Lk)("div",d,[(0,a.bF)(p)])],64)):((0,a.uX)(),(0,a.CE)("div",s,[t[1]||(t[1]=(0,a.Lk)("div",{class:"login-message"},"请登录后进入NEU小站OJ题库!",-1)),(0,a.Lk)("button",{class:"login-button",onClick:t[0]||(t[0]=(...e)=>h.goToLogin&&h.goToLogin(...e))},"前往登录"),t[2]||(t[2]=(0,a.Lk)("div",{class:"login-note"},"本系统所有题目来自东北大学OJ系统,本站仅归纳展示题目,不提供在线评测环境。",-1)),t[3]||(t[3]=(0,a.Lk)("div",{class:"login-note"},"本系统向所有用户公开,仅需注册账号即可使用,无需经过校内验证。",-1))]))])}var h=o(8704),k={data(){return{isLoggedIn:!1,isLoading:!0,token:h.A.get("token")||""}},watch:{isLoggedIn:{handler(e){document.title=e?"NEU小站OJ题库 - 题目列表":"NEU小站OJ题库"},immediate:!0}},methods:{async checkLoginStatus(){try{const e=await fetch("https://api.oj.东北大学.com/check_login",{headers:{Authorization:this.token}}),t=await e.json();this.isLoggedIn=t.isLoggedIn}catch(e){console.error("Error:",e),this.isLoggedIn=!1}finally{this.isLoading=!1}},goToLogin(){window.location.href="https://www.东北大学.com/submission"}},mounted(){this.checkLoginStatus()}},p=o(1241);const m=(0,p.A)(k,[["render",u]]);var g=m,b=o(1387),f=o(4232);const v={class:"problem-list"},y={class:"filters"},L={class:"knowledge-search",ref:"knowledgeSearch"},w={key:0,class:"knowledge-list"},C=["onClick"],P={class:"problems-table"},E=["onClick"],T={key:1,class:"no-knowledge"},_={class:"pagination"},S=["disabled"],$=["disabled"],j={class:"quick-jump"},K=["max"];function F(e,t,o,l,i,s){return(0,a.uX)(),(0,a.CE)("div",v,[(0,a.Lk)("div",y,[(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>i.title=e),placeholder:"搜索题目标题"},null,512),[[n.Jo,i.title]]),(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=e=>i.content=e),placeholder:"搜索题目内容"},null,512),[[n.Jo,i.content]]),(0,a.bo)((0,a.Lk)("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>i.difficulty=e)},t[12]||(t[12]=[(0,a.Fv)('全部难度 1 2 3 4 5 6 7 8 9 10 ',11)]),512),[[n.u1,i.difficulty]]),(0,a.bo)((0,a.Lk)("select",{"onUpdate:modelValue":t[3]||(t[3]=e=>i.statusFilter=e)},t[13]||(t[13]=[(0,a.Lk)("option",{value:""},"全部状态",-1),(0,a.Lk)("option",{value:"0"},"不显示已会的题",-1),(0,a.Lk)("option",{value:"1"},"不显示已会和不会的题",-1)]),512),[[n.u1,i.statusFilter]]),(0,a.Lk)("div",L,[(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=e=>i.knowledgeSearch=e),onFocus:t[5]||(t[5]=e=>s.fetchKnowledgePoints()),onInput:t[6]||(t[6]=e=>s.fetchKnowledgePoints()),placeholder:"搜索知识点"},null,544),[[n.Jo,i.knowledgeSearch]]),i.showKnowledgeList?((0,a.uX)(),(0,a.CE)("div",w,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.knowledgePoints,(e=>((0,a.uX)(),(0,a.CE)("div",{key:e.id,onClick:t=>s.selectKnowledge(e),class:"knowledge-item"},(0,f.v_)(e.title),9,C)))),128))])):(0,a.Q3)("",!0)],512)]),(0,a.Lk)("table",P,[t[14]||(t[14]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"编号"),(0,a.Lk)("th",null,"标题"),(0,a.Lk)("th",null,"难度"),(0,a.Lk)("th",null,"知识点"),(0,a.Lk)("th",null,"状态")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.problems,(e=>((0,a.uX)(),(0,a.CE)("tr",{key:e.id,onClick:t=>s.goToProblem(e.id)},[(0,a.Lk)("td",null,(0,f.v_)(e.id),1),(0,a.Lk)("td",null,(0,f.v_)(e.title),1),(0,a.Lk)("td",null,(0,f.v_)(s.getDifficultyText(e.difficulty)),1),(0,a.Lk)("td",null,[e.knowledge&&e.knowledge.length>0?((0,a.uX)(!0),(0,a.CE)(a.FK,{key:0},(0,a.pI)(e.knowledge,(e=>((0,a.uX)(),(0,a.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,a.uX)(),(0,a.CE)("span",T,"无"))]),(0,a.Lk)("td",null,[(0,a.Lk)("span",{class:(0,f.C4)(["status-tag",{unmarked:null===e.status,solved:1===e.status,unsolved:0===e.status}])},(0,f.v_)(s.getStatusText(e.status)),3)])],8,E)))),128))])]),(0,a.Lk)("div",_,[(0,a.Lk)("button",{disabled:1===i.page,onClick:t[7]||(t[7]=e=>s.changePage(i.page-1))},"上一页",8,S),(0,a.Lk)("span",null,"第 "+(0,f.v_)(i.page)+" 页 / 共 "+(0,f.v_)(i.totalPages)+" 页",1),(0,a.Lk)("button",{disabled:i.page===i.totalPages,onClick:t[8]||(t[8]=e=>s.changePage(i.page+1))},"下一页",8,$),(0,a.Lk)("div",j,[t[15]||(t[15]=(0,a.eW)(" 快速跳转至 ")),(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[9]||(t[9]=e=>i.jumpPage=e),type:"number",min:"1",max:i.totalPages,onKeyup:t[10]||(t[10]=(0,n.jR)(((...e)=>s.handleJump&&s.handleJump(...e)),["enter"]))},null,40,K),[[n.Jo,i.jumpPage]]),t[16]||(t[16]=(0,a.eW)(" 页 ")),(0,a.Lk)("button",{onClick:t[11]||(t[11]=(...e)=>s.handleJump&&s.handleJump(...e))},"跳转")])])])}o(4114);var X={data(){return{problems:[],page:1,totalPages:1,title:"",content:"",difficulty:"",statusFilter:"",knowledgeSearch:"",knowledgePoints:[],showKnowledgeList:!1,selectedKnowledge:null,token:h.A.get("token")||"",jumpPage:""}},methods:{async fetchProblems(){try{const e=await fetch("https://api.oj.东北大学.com/problem_list",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({page:this.page,title:this.title||void 0,content:this.content||void 0,difficulty:this.difficulty?Number(this.difficulty):void 0,status_filter:this.statusFilter?Number(this.statusFilter):void 0,knowledge_id:this.selectedKnowledge?.id})}),t=await e.json();this.problems=t.problems,this.totalPages=t.pages;const o={...this.$route.query,page:this.page};this.$router.replace({query:o},{keepActiveRoute:!0})}catch(e){console.error("Error:",e)}},goToProblem(e){this.$router.push(`/problem/${e}`)},changePage(e){e<1||e>this.totalPages||(this.page=e,this.fetchProblems())},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},getStatusText(e){const t={0:"不会",1:"已会",null:"未标记"};return t[e]||"未标记"},async fetchKnowledgePoints(){try{const e=await fetch("https://api.oj.东北大学.com/knowledge",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({search:this.knowledgeSearch})}),t=await e.json();this.knowledgePoints=t,this.showKnowledgeList=!0}catch(e){console.error("Error:",e)}},selectKnowledge(e){this.selectedKnowledge=e,this.knowledgeSearch=e.title,this.showKnowledgeList=!1,this.page=1,this.fetchProblems()},goToKnowledge(e){this.$router.push({path:"/problems",query:{knowledge_id:e.id}})},handleClickOutside(e){const t=this.$refs.knowledgeSearch;t&&!t.contains(e.target)&&(this.showKnowledgeList=!1,this.selectedKnowledge||(this.knowledgeSearch=""))},handleJump(){const e=parseInt(this.jumpPage);e&&e>=1&&e<=this.totalPages?this.changePage(e):alert("请输入有效的页码!"),this.jumpPage=""}},watch:{title(){this.page=1,this.fetchProblems()},difficulty(){this.page=1,this.fetchProblems()},statusFilter(){this.page=1,this.fetchProblems()},content(){this.page=1,this.fetchProblems()},knowledgeSearch(e){e||(this.selectedKnowledge=null,this.page=1,this.fetchProblems())},"$route.query.page":{immediate:!0,handler(e){const t=parseInt(e);t&&t>=1&&(this.page=t,this.fetchProblems())}}},mounted(){const e=parseInt(this.$route.query.page);e&&e>=1&&(this.page=e),document.title="题目列表 - OJ题库 - NEU小站",this.fetchProblems(),document.addEventListener("click",this.handleClickOutside)},unmounted(){document.removeEventListener("click",this.handleClickOutside)}};const O=(0,p.A)(X,[["render",F],["__scopeId","data-v-4fb05069"]]);var A=O;const x={key:0,class:"problem-detail"},M={class:"problem-header"},J={class:"problem-meta"},N={class:"difficulty"},I={class:"knowledge-points",style:{"margin-top":"10px"}},U={key:1,class:"no-knowledge"},B={class:"feedback-section",style:{"margin-top":"10px"}},V={class:"problem-content"},q={class:"content-section"},D=["innerHTML"],W={class:"content-section"},z={class:"limits-container"},H={class:"limit-item"},Q={class:"limit-value"},R={class:"limit-item"},Y={class:"limit-value"},G={class:"content-section"},Z={class:"example"},ee={key:0,class:"content-section"},te=["innerHTML"],oe={class:"problem-status"},ne=["disabled"],ae=["disabled"],le={key:1,class:"modal"},ie={class:"modal-content"},se={class:"form-group"},re=["value"],ce={class:"form-group"},de={class:"modal-actions"},ue={key:2,class:"modal"},he={class:"modal-content"},ke={class:"form-group"},pe=["value"],me={class:"form-group"},ge={class:"quick-tags"},be=["onClick"],fe={class:"modal-actions"};function ve(e,t,o,l,i,s){return(0,a.uX)(),(0,a.CE)(a.FK,null,[i.problem?((0,a.uX)(),(0,a.CE)("div",x,[(0,a.Lk)("div",M,[(0,a.Lk)("h1",null,(0,f.v_)(i.problem.title),1),(0,a.Lk)("div",J,[(0,a.Lk)("span",N,"难度:"+(0,f.v_)(s.getDifficultyText(i.problem.difficulty)),1),(0,a.Lk)("div",I,[t[12]||(t[12]=(0,a.eW)(" 知识点: ")),i.problem.knowledge&&i.problem.knowledge.length>0?((0,a.uX)(!0),(0,a.CE)(a.FK,{key:0},(0,a.pI)(i.problem.knowledge,(e=>((0,a.uX)(),(0,a.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,a.uX)(),(0,a.CE)("span",U,"无"))]),(0,a.Lk)("div",B,[t[13]||(t[13]=(0,a.eW)(" 题目有问题?")),(0,a.Lk)("button",{class:"feedback-btn",onClick:t[0]||(t[0]=e=>i.showFeedbackModal=!0)},"反馈")])])]),(0,a.Lk)("div",V,[(0,a.Lk)("div",q,[t[14]||(t[14]=(0,a.Lk)("h2",null,"题目描述",-1)),(0,a.Lk)("div",{innerHTML:s.renderedContent},null,8,D)]),(0,a.Lk)("div",W,[t[17]||(t[17]=(0,a.Lk)("h2",null,"题目限制",-1)),(0,a.Lk)("div",z,[(0,a.Lk)("div",H,[t[15]||(t[15]=(0,a.Lk)("span",{class:"limit-label"},"内存限制:",-1)),(0,a.Lk)("span",Q,(0,f.v_)((i.problem.memory_limit/1024).toFixed(1))+" MB",1)]),(0,a.Lk)("div",R,[t[16]||(t[16]=(0,a.Lk)("span",{class:"limit-label"},"时间限制:",-1)),(0,a.Lk)("span",Y,(0,f.v_)(i.problem.time_limit)+" s",1)])])]),(0,a.Lk)("div",G,[t[20]||(t[20]=(0,a.Lk)("h2",null,"示例",-1)),(0,a.Lk)("div",Z,[t[18]||(t[18]=(0,a.Lk)("h3",null,"输入",-1)),(0,a.Lk)("pre",null,(0,f.v_)(i.problem.example_input),1),t[19]||(t[19]=(0,a.Lk)("h3",null,"输出",-1)),(0,a.Lk)("pre",null,(0,f.v_)(i.problem.example_output),1)])]),i.problem.hint?((0,a.uX)(),(0,a.CE)("div",ee,[t[21]||(t[21]=(0,a.Lk)("h2",null,"提示",-1)),(0,a.Lk)("div",{innerHTML:s.renderedHint},null,8,te)])):(0,a.Q3)("",!0)]),(0,a.Lk)("div",oe,[(0,a.Lk)("button",{onClick:t[1]||(t[1]=e=>s.markProblem(0)),class:(0,f.C4)({active:0===i.problem.status})}," 不会 ",2),(0,a.Lk)("button",{onClick:t[2]||(t[2]=e=>s.markProblem(1)),class:(0,f.C4)({active:1===i.problem.status})}," 已会 ",2),(0,a.Lk)("button",{onClick:t[3]||(t[3]=e=>i.showBookmarkModal=!0),class:"bookmark-btn"}," 添加书签 "),(0,a.Lk)("button",{onClick:t[4]||(t[4]=(...e)=>s.goToPreviousProblem&&s.goToPreviousProblem(...e)),class:"previous-problem",disabled:!i.problem.last}," 上一题 ",8,ne),(0,a.Lk)("button",{onClick:t[5]||(t[5]=(...e)=>s.goToNextProblem&&s.goToNextProblem(...e)),class:"next-problem",disabled:!i.problem.next}," 下一题 ",8,ae)])])):(0,a.Q3)("",!0),i.showBookmarkModal?((0,a.uX)(),(0,a.CE)("div",le,[(0,a.Lk)("div",ie,[t[24]||(t[24]=(0,a.Lk)("h3",null,"添加书签",-1)),(0,a.Lk)("div",se,[t[22]||(t[22]=(0,a.Lk)("label",null,"题目:",-1)),(0,a.Lk)("input",{type:"text",value:i.problem.title,disabled:""},null,8,re)]),(0,a.Lk)("div",ce,[t[23]||(t[23]=(0,a.Lk)("label",null,"书签内容(可选):",-1)),(0,a.bo)((0,a.Lk)("input",{type:"text","onUpdate:modelValue":t[6]||(t[6]=e=>i.bookmarkTitle=e),placeholder:"为这个书签添加描述..."},null,512),[[n.Jo,i.bookmarkTitle]])]),(0,a.Lk)("div",de,[(0,a.Lk)("button",{onClick:t[7]||(t[7]=(...e)=>s.addBookmark&&s.addBookmark(...e)),class:"submit-btn"},"确定"),(0,a.Lk)("button",{onClick:t[8]||(t[8]=e=>i.showBookmarkModal=!1),class:"cancel-btn"},"取消")])])])):(0,a.Q3)("",!0),i.showFeedbackModal?((0,a.uX)(),(0,a.CE)("div",ue,[(0,a.Lk)("div",he,[t[27]||(t[27]=(0,a.Lk)("h3",null,"题目问题反馈",-1)),(0,a.Lk)("div",ke,[t[25]||(t[25]=(0,a.Lk)("label",null,"题目:",-1)),(0,a.Lk)("input",{type:"text",value:i.problem.title,disabled:""},null,8,pe)]),(0,a.Lk)("div",me,[t[26]||(t[26]=(0,a.Lk)("label",null,"反馈内容:",-1)),(0,a.bo)((0,a.Lk)("textarea",{"onUpdate:modelValue":t[9]||(t[9]=e=>i.feedbackContent=e),placeholder:"请描述您遇到的问题...",rows:"4"},null,512),[[n.Jo,i.feedbackContent]])]),(0,a.Lk)("div",ge,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.quickTags,(e=>((0,a.uX)(),(0,a.CE)("button",{key:e,onClick:t=>s.appendTag(e),class:"tag-btn"},(0,f.v_)(e),9,be)))),128))]),(0,a.Lk)("div",fe,[(0,a.Lk)("button",{onClick:t[10]||(t[10]=(...e)=>s.submitFeedback&&s.submitFeedback(...e)),class:"submit-btn"},"提交"),(0,a.Lk)("button",{onClick:t[11]||(t[11]=e=>i.showFeedbackModal=!1),class:"cancel-btn"},"取消")])])])):(0,a.Q3)("",!0)],64)}var ye=o(642),Le=o(1995),we=o.n(Le),Ce=o(1109),Pe=(o(9351),o(437)),Ee=o(8734),Te=o.n(Ee),_e={data(){return{problem:null,md:null,token:h.A.get("token")||"",showFeedbackModal:!1,feedbackContent:"",quickTags:["图片无法加载","公式渲染错乱","题目内容有误"],showBookmarkModal:!1,bookmarkTitle:""}},created(){this.md=new ye.A({html:!0,breaks:!0,linkify:!0,highlight:function(e,t){if(t&&Ce.A.getLanguage(t))try{return Ce.A.highlight(e,{language:t}).value}catch(o){}return""}});const e=this.md.renderer.rules.text||function(e,t,o,n,a){return a.renderToken(e,t,o)};this.md.renderer.rules.text=function(t,o,n,a,l){let i=t[o].content;return i=i.replace(/(?{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX error:",o),e}})),i=i.replace(/(?{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX error:",o),e}})),t[o].content=i,e(t,o,n,a,l)},this.md.use(we())},computed:{renderedContent(){if(!this.problem)return"";let e=this.md.render(this.problem.content);return e=e.replace(/\$([^$\n]+?)\$/g,((e,t)=>{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX inline error:",o),e}})),e=e.replace(/\$\$([^$]+?)\$\$/g,((e,t)=>{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX display error:",o),e}})),e=Te().decode(e),e},renderedHint(){if(!this.problem||!this.problem.hint)return"";let e=this.md.render(this.problem.hint);return e=e.replace(/\$([^$\n]+?)\$/g,((e,t)=>{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX inline error:",o),e}})),e=e.replace(/\$\$([^$]+?)\$\$/g,((e,t)=>{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX display error:",o),e}})),e=Te().decode(e),e}},methods:{async fetchProblem(){try{const e=await fetch(`https://api.oj.东北大学.com/problem?problem_id=${this.$route.params.id}`,{headers:{Authorization:this.token}});this.problem=await e.json()}catch(e){console.error("Error:",e)}},async markProblem(e){try{const t=await fetch("https://api.oj.东北大学.com/mark",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({problem_id:this.problem.id,status:this.problem.status===e?2:e})});t.ok&&await this.fetchProblem()}catch(t){console.error("Error:",t)}},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},goToKnowledge(e){this.$router.push({path:"/problems",query:{knowledge_id:e.id}})},async goToNextProblem(){this.problem.next?this.$router.push(`/problem/${this.problem.next}`):alert("已经是最后一题了~")},async goToPreviousProblem(){this.problem.last?this.$router.push(`/problem/${this.problem.last}`):alert("已经是第一题了~")},appendTag(e){this.feedbackContent?this.feedbackContent+=" "+e:this.feedbackContent=e},async submitFeedback(){if(this.feedbackContent.trim())try{const e=await fetch("https://api.oj.东北大学.com/report",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({problem_id:this.problem.id,content:this.feedbackContent.trim()})});if(e.ok)alert("反馈已提交,感谢您的支持!"),this.showFeedbackModal=!1,this.feedbackContent="";else{const t=await e.json();alert(t.error||"提交失败,请稍后重试")}}catch(e){console.error("Error:",e),alert("提交失败,请稍后重试")}else alert("请输入反馈内容!")},async addBookmark(){if(this.problem)try{const e=await fetch("https://api.oj.东北大学.com/bookmark/add_mark",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({problem_id:this.problem.id,title:this.bookmarkTitle.trim()})});if(e.ok){await e.json();alert("书签添加成功!"),this.showBookmarkModal=!1,this.bookmarkTitle=""}else{const t=await e.json();alert(t.error||"添加书签失败,请稍后重试")}}catch(e){console.error("Error adding bookmark:",e),alert("添加书签失败,请稍后重试")}}},mounted(){this.fetchProblem()},watch:{"$route.params.id"(){this.fetchProblem()},"problem.title"(){this.problem&&this.problem.title&&(document.title=`${this.problem.title} - OJ题库 - NEU小站`)}}};const Se=(0,p.A)(_e,[["render",ve]]);var $e=Se;const je={class:"problem-list"},Ke={class:"filters"},Fe={class:"knowledge-search",ref:"knowledgeSearch"},Xe={key:0,class:"knowledge-list"},Oe=["onClick"],Ae={class:"problems-table"},xe=["onClick"],Me={key:1,class:"no-knowledge"},Je={class:"pagination"},Ne=["disabled"],Ie=["disabled"],Ue={class:"quick-jump"},Be=["max"];function Ve(e,t,o,l,i,s){return(0,a.uX)(),(0,a.CE)("div",je,[(0,a.Lk)("div",Ke,[(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>i.title=e),placeholder:"搜索题目标题"},null,512),[[n.Jo,i.title]]),(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=e=>i.content=e),placeholder:"搜索题目内容"},null,512),[[n.Jo,i.content]]),(0,a.bo)((0,a.Lk)("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>i.difficulty=e)},t[12]||(t[12]=[(0,a.Fv)('全部难度 1 2 3 4 5 6 7 8 9 10 ',11)]),512),[[n.u1,i.difficulty]]),(0,a.bo)((0,a.Lk)("select",{"onUpdate:modelValue":t[3]||(t[3]=e=>i.statusFilter=e)},t[13]||(t[13]=[(0,a.Lk)("option",{value:""},"全部状态",-1),(0,a.Lk)("option",{value:"0"},"只看不会的题",-1),(0,a.Lk)("option",{value:"1"},"只看已会的题",-1)]),512),[[n.u1,i.statusFilter]]),(0,a.Lk)("div",Fe,[(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=e=>i.knowledgeSearch=e),onFocus:t[5]||(t[5]=e=>s.fetchKnowledgePoints()),onInput:t[6]||(t[6]=e=>s.fetchKnowledgePoints()),placeholder:"搜索知识点"},null,544),[[n.Jo,i.knowledgeSearch]]),i.showKnowledgeList?((0,a.uX)(),(0,a.CE)("div",Xe,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.knowledgePoints,(e=>((0,a.uX)(),(0,a.CE)("div",{key:e.id,onClick:t=>s.selectKnowledge(e),class:"knowledge-item"},(0,f.v_)(e.title),9,Oe)))),128))])):(0,a.Q3)("",!0)],512)]),(0,a.Lk)("table",Ae,[t[14]||(t[14]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"编号"),(0,a.Lk)("th",null,"标题"),(0,a.Lk)("th",null,"难度"),(0,a.Lk)("th",null,"知识点"),(0,a.Lk)("th",null,"状态")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.problems,(e=>((0,a.uX)(),(0,a.CE)("tr",{key:e.id,onClick:t=>s.goToProblem(e.id)},[(0,a.Lk)("td",null,(0,f.v_)(e.id),1),(0,a.Lk)("td",null,(0,f.v_)(e.title),1),(0,a.Lk)("td",null,(0,f.v_)(s.getDifficultyText(e.difficulty)),1),(0,a.Lk)("td",null,[e.knowledge&&e.knowledge.length>0?((0,a.uX)(!0),(0,a.CE)(a.FK,{key:0},(0,a.pI)(e.knowledge,(e=>((0,a.uX)(),(0,a.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,a.uX)(),(0,a.CE)("span",Me,"无"))]),(0,a.Lk)("td",null,[(0,a.Lk)("span",{class:(0,f.C4)(["status-tag",{solved:1===e.status,unsolved:0===e.status}])},(0,f.v_)(s.getStatusText(e.status)),3)])],8,xe)))),128))])]),(0,a.Lk)("div",Je,[(0,a.Lk)("button",{disabled:1===i.page,onClick:t[7]||(t[7]=e=>s.changePage(i.page-1))},"上一页",8,Ne),(0,a.Lk)("span",null,"第 "+(0,f.v_)(i.page)+" 页 / 共 "+(0,f.v_)(i.totalPages)+" 页",1),(0,a.Lk)("button",{disabled:i.page===i.totalPages,onClick:t[8]||(t[8]=e=>s.changePage(i.page+1))},"下一页",8,Ie),(0,a.Lk)("div",Ue,[t[15]||(t[15]=(0,a.eW)(" 快速跳转至 ")),(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[9]||(t[9]=e=>i.jumpPage=e),type:"number",min:"1",max:i.totalPages,onKeyup:t[10]||(t[10]=(0,n.jR)(((...e)=>s.handleJump&&s.handleJump(...e)),["enter"]))},null,40,Be),[[n.Jo,i.jumpPage]]),t[16]||(t[16]=(0,a.eW)(" 页 ")),(0,a.Lk)("button",{onClick:t[11]||(t[11]=(...e)=>s.handleJump&&s.handleJump(...e))},"跳转")])])])}var qe={data(){return{problems:[],page:1,totalPages:1,title:"",content:"",difficulty:"",statusFilter:"",knowledgeSearch:"",knowledgePoints:[],showKnowledgeList:!1,selectedKnowledge:null,token:h.A.get("token")||"",jumpPage:""}},methods:{async fetchProblems(){try{const e=await fetch("https://api.oj.东北大学.com/my_problem_list",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({page:this.page,title:this.title||void 0,content:this.content||void 0,difficulty:this.difficulty?Number(this.difficulty):void 0,status_filter:this.statusFilter?Number(this.statusFilter):void 0,knowledge_id:this.selectedKnowledge?.id})}),t=await e.json();this.problems=t.problems,this.totalPages=t.pages}catch(e){console.error("Error:",e)}},goToProblem(e){this.$router.push(`/problem/${e}`)},changePage(e){this.page=e,this.fetchProblems()},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},getStatusText(e){return 1===e?"已会":"不会"},async fetchKnowledgePoints(){try{const e=await fetch("https://api.oj.东北大学.com/knowledge",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({search:this.knowledgeSearch})}),t=await e.json();this.knowledgePoints=t,this.showKnowledgeList=!0}catch(e){console.error("Error:",e)}},selectKnowledge(e){this.selectedKnowledge=e,this.knowledgeSearch=e.title,this.showKnowledgeList=!1,this.page=1,this.fetchProblems()},handleClickOutside(e){const t=this.$refs.knowledgeSearch;t&&!t.contains(e.target)&&(this.showKnowledgeList=!1,this.selectedKnowledge||(this.knowledgeSearch=""))},handleJump(){const e=parseInt(this.jumpPage);e&&e>=1&&e<=this.totalPages?this.changePage(e):alert("请输入有效的页码!"),this.jumpPage=""}},watch:{title(){this.page=1,this.fetchProblems()},difficulty(){this.page=1,this.fetchProblems()},statusFilter(){this.page=1,this.fetchProblems()},content(){this.page=1,this.fetchProblems()},knowledgeSearch(e){e||(this.selectedKnowledge=null,this.page=1,this.fetchProblems())}},mounted(){document.title="我标记的题目 - OJ题库 - NEU小站",this.fetchProblems(),document.addEventListener("click",this.handleClickOutside)},unmounted(){document.removeEventListener("click",this.handleClickOutside)}};const De=(0,p.A)(qe,[["render",Ve],["__scopeId","data-v-3fac1adc"]]);var We=De;const ze={class:"bookmark-page"},He={key:0,class:"loading"},Qe={key:1,class:"empty-state"},Re={key:2,class:"timeline"},Ye={class:"month-header"},Ge={class:"day-header"},Ze={class:"bookmark-grid"},et={class:"card-content"},tt={class:"problem-title"},ot={class:"bookmark-title"},nt={class:"bookmark-time"},at={class:"card-actions"},lt=["onClick"],it=["onClick"];function st(e,t,o,n,l,i){const s=(0,a.g2)("router-link");return(0,a.uX)(),(0,a.CE)("div",ze,[t[5]||(t[5]=(0,a.Lk)("h1",null,"我的书签",-1)),l.loading?((0,a.uX)(),(0,a.CE)("div",He," 加载中... ")):0===i.bookmarksByMonth.length?((0,a.uX)(),(0,a.CE)("div",Qe,[t[1]||(t[1]=(0,a.Lk)("div",{class:"empty-icon"},"📚",-1)),t[2]||(t[2]=(0,a.Lk)("p",null,"您还没有添加任何书签",-1)),(0,a.bF)(s,{to:"/problems",class:"empty-action"},{default:(0,a.k6)((()=>t[0]||(t[0]=[(0,a.eW)(" 去浏览题目 ")]))),_:1})])):((0,a.uX)(),(0,a.CE)("div",Re,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.bookmarksByMonth,((e,o)=>((0,a.uX)(),(0,a.CE)("div",{key:o,class:"month-section"},[(0,a.Lk)("div",Ye,[t[3]||(t[3]=(0,a.Lk)("div",{class:"month-dot"},null,-1)),(0,a.Lk)("h2",null,(0,f.v_)(e.label),1)]),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.days,((e,o)=>((0,a.uX)(),(0,a.CE)("div",{key:o,class:"day-section"},[(0,a.Lk)("div",Ge,[t[4]||(t[4]=(0,a.Lk)("div",{class:"day-dot"},null,-1)),(0,a.Lk)("h3",null,(0,f.v_)(e.label),1)]),(0,a.Lk)("div",Ze,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.bookmarks,(e=>((0,a.uX)(),(0,a.CE)("div",{key:e.id,class:"bookmark-card"},[(0,a.Lk)("div",et,[(0,a.Lk)("h4",tt,(0,f.v_)(e.problem_title),1),(0,a.Lk)("p",ot,(0,f.v_)(e.title||"未命名书签"),1),(0,a.Lk)("div",nt,(0,f.v_)(i.formatTime(e.created_at)),1)]),(0,a.Lk)("div",at,[(0,a.Lk)("button",{onClick:t=>i.goToProblem(e.problem_id),class:"action-btn view-btn"}," 进入本题 ",8,lt),(0,a.Lk)("button",{onClick:t=>i.deleteBookmark(e.id),class:"action-btn delete-btn"}," 删除书签 ",8,it)])])))),128))])])))),128))])))),128))]))])}o(8111),o(7588);var rt={data(){return{bookmarks:[],loading:!0,token:h.A.get("token")||""}},computed:{bookmarksByMonth(){if(!this.bookmarks.length)return[];const e=[],t=new Map;return this.bookmarks.forEach((o=>{const n=new Date(o.created_at),a=`${n.getFullYear()}-${n.getMonth()+1}`,l=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`;if(!t.has(a)){const o={key:a,label:`${n.getFullYear()}年${n.getMonth()+1}月`,days:[],dayMap:new Map};t.set(a,o),e.push(o)}const i=t.get(a);if(!i.dayMap.has(l)){const e={key:l,label:`${n.getMonth()+1}月${n.getDate()}日`,bookmarks:[]};i.dayMap.set(l,e),i.days.push(e)}i.dayMap.get(l).bookmarks.push(o)})),e.sort(((e,t)=>t.key.localeCompare(e.key))),e.forEach((e=>{e.days.sort(((e,t)=>t.key.localeCompare(e.key)))})),e}},methods:{async fetchBookmarks(){this.loading=!0;try{const e=await fetch("https://api.oj.东北大学.com/bookmark/get",{headers:{Authorization:this.token}});if(!e.ok)throw new Error("获取书签失败");const t=await e.json();this.bookmarks=t.bookmarks}catch(e){console.error("Error fetching bookmarks:",e)}finally{this.loading=!1}},formatTime(e){const t=new Date(e),o=t.getHours().toString().padStart(2,"0"),n=t.getMinutes().toString().padStart(2,"0");return`${o}:${n}`},goToProblem(e){this.$router.push(`/problem/${e}`)},async deleteBookmark(e){if(confirm("确定要删除这个书签吗?"))try{const t=await fetch("https://api.oj.东北大学.com/bookmark/delete_mark",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({mark_id:e})});if(!t.ok)throw new Error("删除书签失败");await this.fetchBookmarks()}catch(t){console.error("Error deleting bookmark:",t),alert("删除书签失败,请稍后重试")}}},mounted(){document.title="我的书签 - OJ题库 - NEU小站",this.fetchBookmarks()}};const ct=(0,p.A)(rt,[["render",st],["__scopeId","data-v-373b9fde"]]);var dt=ct;const ut=[{path:"/",redirect:"/problems"},{path:"/problems",name:"ProblemList",component:A},{path:"/problem/:id",name:"ProblemDetail",component:$e,meta:{title:"题目详情"}},{path:"/my",name:"MyProblemList",component:We},{path:"/bookmarks",name:"BookmarkList",component:dt,meta:{title:"我的书签"}},{path:"/about",name:"About",component:()=>o.e(878).then(o.bind(o,4878)),meta:{title:"关于"}},{path:"/:pathMatch(.*)*",redirect:"/problems"}],ht=(0,b.aE)({history:(0,b.LA)(),routes:ut});var kt=ht,pt=o(782),mt=(0,pt.y$)({state:{},getters:{},mutations:{},actions:{},modules:{}});(0,n.Ef)(g).use(mt).use(kt).mount("#app")}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var l=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(l.exports,l,l.exports,o),l.loaded=!0,l.exports}o.m=e,function(){var e=[];o.O=function(t,n,a,l){if(!n){var i=1/0;for(d=0;d=l)&&Object.keys(o.O).every((function(e){return o.O[e](n[r])}))?n.splice(r--,1):(s=!1,l0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[n,a,l]}}(),function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,{a:t}),t}}(),function(){o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(t,n){return o.f[n](e,t),t}),[]))}}(),function(){o.u=function(e){return"js/"+e+".871004f9.js"}}(),function(){o.miniCssF=function(e){return"css/"+e+".45ce97f4.css"}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="front:";o.l=function(n,a,l,i){if(e[n])e[n].push(a);else{var s,r;if(void 0!==l)for(var c=document.getElementsByTagName("script"),d=0;dt[4]||(t[4]=[(0,a.eW)("题目列表")]))),_:1}),(0,a.bF)(k,{to:"/my",class:"nav-item"},{default:(0,a.k6)((()=>t[5]||(t[5]=[(0,a.eW)("我标记的题目")]))),_:1}),(0,a.bF)(k,{to:"/bookmarks",class:"nav-item"},{default:(0,a.k6)((()=>t[6]||(t[6]=[(0,a.eW)("我的书签")]))),_:1}),(0,a.bF)(k,{to:"/about",class:"nav-item"},{default:(0,a.k6)((()=>t[7]||(t[7]=[(0,a.eW)("关于")]))),_:1})]),t[8]||(t[8]=(0,a.Lk)("div",{class:"footer-info"},[(0,a.Lk)("div",{class:"version-info"},"NEU小站OJ题库 - v1.0"),(0,a.Lk)("div",{class:"source-info"},[(0,a.eW)("© 2025 "),(0,a.Lk)("a",{href:"https://www.东北大学.com",target:"_blank"},"NEU小站")])],-1))]),(0,a.Lk)("div",d,[(0,a.bF)(p)])],64)):((0,a.uX)(),(0,a.CE)("div",s,[t[1]||(t[1]=(0,a.Lk)("div",{class:"login-message"},"请登录后进入NEU小站OJ题库!",-1)),(0,a.Lk)("button",{class:"login-button",onClick:t[0]||(t[0]=(...e)=>h.goToLogin&&h.goToLogin(...e))},"前往登录"),t[2]||(t[2]=(0,a.Lk)("div",{class:"login-note"},"本系统所有题目来自东北大学OJ系统,本站仅归纳展示题目,不提供在线评测环境。",-1)),t[3]||(t[3]=(0,a.Lk)("div",{class:"login-note"},"本系统向所有用户公开,仅需注册账号即可使用,无需经过校内验证。",-1))]))])}var h=o(8704),k={data(){return{isLoggedIn:!1,isLoading:!0,token:h.A.get("token")||""}},watch:{isLoggedIn:{handler(e){document.title=e?"NEU小站OJ题库 - 题目列表":"NEU小站OJ题库"},immediate:!0}},methods:{async checkLoginStatus(){try{const e=await fetch("https://api.oj.东北大学.com/check_login",{headers:{Authorization:this.token}}),t=await e.json();this.isLoggedIn=t.isLoggedIn}catch(e){console.error("Error:",e),this.isLoggedIn=!1}finally{this.isLoading=!1}},goToLogin(){window.location.href="https://www.东北大学.com/submission"}},mounted(){this.checkLoginStatus()}},p=o(1241);const m=(0,p.A)(k,[["render",u]]);var g=m,b=o(1387),f=o(4232);const v={class:"problem-list"},y={class:"filters"},L={class:"knowledge-search",ref:"knowledgeSearch"},w={key:0,class:"knowledge-list"},C=["onClick"],P={class:"problems-table"},E=["onClick"],T={key:1,class:"no-knowledge"},_={class:"pagination"},S=["disabled"],$=["disabled"],j={class:"quick-jump"},K=["max"];function F(e,t,o,l,i,s){return(0,a.uX)(),(0,a.CE)("div",v,[(0,a.Lk)("div",y,[(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>i.title=e),placeholder:"搜索题目标题"},null,512),[[n.Jo,i.title]]),(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=e=>i.content=e),placeholder:"搜索题目内容"},null,512),[[n.Jo,i.content]]),(0,a.bo)((0,a.Lk)("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>i.difficulty=e)},t[12]||(t[12]=[(0,a.Fv)('全部难度 1 2 3 4 5 6 7 8 9 10 ',11)]),512),[[n.u1,i.difficulty]]),(0,a.bo)((0,a.Lk)("select",{"onUpdate:modelValue":t[3]||(t[3]=e=>i.statusFilter=e)},t[13]||(t[13]=[(0,a.Lk)("option",{value:""},"全部状态",-1),(0,a.Lk)("option",{value:"0"},"不显示已会的题",-1),(0,a.Lk)("option",{value:"1"},"不显示已会和不会的题",-1)]),512),[[n.u1,i.statusFilter]]),(0,a.Lk)("div",L,[(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=e=>i.knowledgeSearch=e),onFocus:t[5]||(t[5]=e=>s.fetchKnowledgePoints()),onInput:t[6]||(t[6]=e=>s.fetchKnowledgePoints()),placeholder:"搜索知识点"},null,544),[[n.Jo,i.knowledgeSearch]]),i.showKnowledgeList?((0,a.uX)(),(0,a.CE)("div",w,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.knowledgePoints,(e=>((0,a.uX)(),(0,a.CE)("div",{key:e.id,onClick:t=>s.selectKnowledge(e),class:"knowledge-item"},(0,f.v_)(e.title),9,C)))),128))])):(0,a.Q3)("",!0)],512)]),(0,a.Lk)("table",P,[t[14]||(t[14]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"编号"),(0,a.Lk)("th",null,"标题"),(0,a.Lk)("th",null,"难度"),(0,a.Lk)("th",null,"知识点"),(0,a.Lk)("th",null,"状态")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.problems,(e=>((0,a.uX)(),(0,a.CE)("tr",{key:e.id,onClick:t=>s.goToProblem(e.id)},[(0,a.Lk)("td",null,(0,f.v_)(e.id),1),(0,a.Lk)("td",null,(0,f.v_)(e.title),1),(0,a.Lk)("td",null,(0,f.v_)(s.getDifficultyText(e.difficulty)),1),(0,a.Lk)("td",null,[e.knowledge&&e.knowledge.length>0?((0,a.uX)(!0),(0,a.CE)(a.FK,{key:0},(0,a.pI)(e.knowledge,(e=>((0,a.uX)(),(0,a.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,a.uX)(),(0,a.CE)("span",T,"无"))]),(0,a.Lk)("td",null,[(0,a.Lk)("span",{class:(0,f.C4)(["status-tag",{unmarked:null===e.status,solved:1===e.status,unsolved:0===e.status}])},(0,f.v_)(s.getStatusText(e.status)),3)])],8,E)))),128))])]),(0,a.Lk)("div",_,[(0,a.Lk)("button",{disabled:1===i.page,onClick:t[7]||(t[7]=e=>s.changePage(i.page-1))},"上一页",8,S),(0,a.Lk)("span",null,"第 "+(0,f.v_)(i.page)+" 页 / 共 "+(0,f.v_)(i.totalPages)+" 页",1),(0,a.Lk)("button",{disabled:i.page===i.totalPages,onClick:t[8]||(t[8]=e=>s.changePage(i.page+1))},"下一页",8,$),(0,a.Lk)("div",j,[t[15]||(t[15]=(0,a.eW)(" 快速跳转至 ")),(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[9]||(t[9]=e=>i.jumpPage=e),type:"number",min:"1",max:i.totalPages,onKeyup:t[10]||(t[10]=(0,n.jR)(((...e)=>s.handleJump&&s.handleJump(...e)),["enter"]))},null,40,K),[[n.Jo,i.jumpPage]]),t[16]||(t[16]=(0,a.eW)(" 页 ")),(0,a.Lk)("button",{onClick:t[11]||(t[11]=(...e)=>s.handleJump&&s.handleJump(...e))},"跳转")])])])}o(4114);var X={data(){return{problems:[],page:1,totalPages:1,title:"",content:"",difficulty:"",statusFilter:"",knowledgeSearch:"",knowledgePoints:[],showKnowledgeList:!1,selectedKnowledge:null,token:h.A.get("token")||"",jumpPage:""}},methods:{async fetchProblems(){try{const e=await fetch("https://api.oj.东北大学.com/problem_list",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({page:this.page,title:this.title||void 0,content:this.content||void 0,difficulty:this.difficulty?Number(this.difficulty):void 0,status_filter:this.statusFilter?Number(this.statusFilter):void 0,knowledge_id:this.selectedKnowledge?.id})}),t=await e.json();this.problems=t.problems,this.totalPages=t.pages;const o={...this.$route.query,page:this.page};this.$router.replace({query:o},{keepActiveRoute:!0})}catch(e){console.error("Error:",e)}},goToProblem(e){this.$router.push(`/problem/${e}`)},changePage(e){e<1||e>this.totalPages||(this.page=e,this.fetchProblems())},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},getStatusText(e){const t={0:"不会",1:"已会",null:"未标记"};return t[e]||"未标记"},async fetchKnowledgePoints(){try{const e=await fetch("https://api.oj.东北大学.com/knowledge",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({search:this.knowledgeSearch})}),t=await e.json();this.knowledgePoints=t,this.showKnowledgeList=!0}catch(e){console.error("Error:",e)}},selectKnowledge(e){this.selectedKnowledge=e,this.knowledgeSearch=e.title,this.showKnowledgeList=!1,this.page=1,this.fetchProblems()},goToKnowledge(e){this.$router.push({path:"/problems",query:{knowledge_id:e.id}})},handleClickOutside(e){const t=this.$refs.knowledgeSearch;t&&!t.contains(e.target)&&(this.showKnowledgeList=!1,this.selectedKnowledge||(this.knowledgeSearch=""))},handleJump(){const e=parseInt(this.jumpPage);e&&e>=1&&e<=this.totalPages?this.changePage(e):alert("请输入有效的页码!"),this.jumpPage=""}},watch:{title(){this.page=1,this.fetchProblems()},difficulty(){this.page=1,this.fetchProblems()},statusFilter(){this.page=1,this.fetchProblems()},content(){this.page=1,this.fetchProblems()},knowledgeSearch(e){e||(this.selectedKnowledge=null,this.page=1,this.fetchProblems())},"$route.query.page":{immediate:!0,handler(e){const t=parseInt(e);t&&t>=1&&(this.page=t,this.fetchProblems())}}},mounted(){const e=parseInt(this.$route.query.page);e&&e>=1&&(this.page=e),document.title="题目列表 - OJ题库 - NEU小站",this.fetchProblems(),document.addEventListener("click",this.handleClickOutside)},unmounted(){document.removeEventListener("click",this.handleClickOutside)}};const O=(0,p.A)(X,[["render",F],["__scopeId","data-v-4fb05069"]]);var A=O;const x={key:0,class:"problem-detail"},M={class:"problem-header"},J={class:"problem-meta"},N={class:"difficulty"},I={class:"knowledge-points",style:{"margin-top":"10px"}},U={key:1,class:"no-knowledge"},B={class:"feedback-section",style:{"margin-top":"10px"}},V={class:"problem-content"},q={class:"content-section"},D=["innerHTML"],W={class:"content-section"},z={class:"limits-container"},H={class:"limit-item"},Q={class:"limit-value"},R={class:"limit-item"},Y={class:"limit-value"},G={class:"content-section"},Z={class:"example"},ee={key:0,class:"content-section"},te=["innerHTML"],oe={class:"problem-status"},ne=["disabled"],ae=["disabled"],le={key:1,class:"modal"},ie={class:"modal-content"},se={class:"form-group"},re=["value"],ce={class:"form-group"},de={class:"modal-actions"},ue={key:2,class:"modal"},he={class:"modal-content"},ke={class:"form-group"},pe=["value"],me={class:"form-group"},ge={class:"quick-tags"},be=["onClick"],fe={class:"modal-actions"};function ve(e,t,o,l,i,s){return(0,a.uX)(),(0,a.CE)(a.FK,null,[i.problem?((0,a.uX)(),(0,a.CE)("div",x,[(0,a.Lk)("div",M,[(0,a.Lk)("h1",null,(0,f.v_)(i.problem.title),1),(0,a.Lk)("div",J,[(0,a.Lk)("span",N,"难度:"+(0,f.v_)(s.getDifficultyText(i.problem.difficulty)),1),(0,a.Lk)("div",I,[t[12]||(t[12]=(0,a.eW)(" 知识点: ")),i.problem.knowledge&&i.problem.knowledge.length>0?((0,a.uX)(!0),(0,a.CE)(a.FK,{key:0},(0,a.pI)(i.problem.knowledge,(e=>((0,a.uX)(),(0,a.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,a.uX)(),(0,a.CE)("span",U,"无"))]),(0,a.Lk)("div",B,[t[13]||(t[13]=(0,a.eW)(" 题目有问题?")),(0,a.Lk)("button",{class:"feedback-btn",onClick:t[0]||(t[0]=e=>i.showFeedbackModal=!0)},"反馈")])])]),(0,a.Lk)("div",V,[(0,a.Lk)("div",q,[t[14]||(t[14]=(0,a.Lk)("h2",null,"题目描述",-1)),(0,a.Lk)("div",{innerHTML:s.renderedContent},null,8,D)]),(0,a.Lk)("div",W,[t[17]||(t[17]=(0,a.Lk)("h2",null,"题目限制",-1)),(0,a.Lk)("div",z,[(0,a.Lk)("div",H,[t[15]||(t[15]=(0,a.Lk)("span",{class:"limit-label"},"内存限制:",-1)),(0,a.Lk)("span",Q,(0,f.v_)((i.problem.memory_limit/1024).toFixed(1))+" MB",1)]),(0,a.Lk)("div",R,[t[16]||(t[16]=(0,a.Lk)("span",{class:"limit-label"},"时间限制:",-1)),(0,a.Lk)("span",Y,(0,f.v_)(i.problem.time_limit)+" s",1)])])]),(0,a.Lk)("div",G,[t[20]||(t[20]=(0,a.Lk)("h2",null,"示例",-1)),(0,a.Lk)("div",Z,[t[18]||(t[18]=(0,a.Lk)("h3",null,"输入",-1)),(0,a.Lk)("pre",null,(0,f.v_)(i.problem.example_input),1),t[19]||(t[19]=(0,a.Lk)("h3",null,"输出",-1)),(0,a.Lk)("pre",null,(0,f.v_)(i.problem.example_output),1)])]),i.problem.hint?((0,a.uX)(),(0,a.CE)("div",ee,[t[21]||(t[21]=(0,a.Lk)("h2",null,"提示",-1)),(0,a.Lk)("div",{innerHTML:s.renderedHint},null,8,te)])):(0,a.Q3)("",!0)]),(0,a.Lk)("div",oe,[(0,a.Lk)("button",{onClick:t[1]||(t[1]=e=>s.markProblem(0)),class:(0,f.C4)({active:0===i.problem.status})}," 不会 ",2),(0,a.Lk)("button",{onClick:t[2]||(t[2]=e=>s.markProblem(1)),class:(0,f.C4)({active:1===i.problem.status})}," 已会 ",2),(0,a.Lk)("button",{onClick:t[3]||(t[3]=e=>i.showBookmarkModal=!0),class:"bookmark-btn"}," 添加书签 "),(0,a.Lk)("button",{onClick:t[4]||(t[4]=(...e)=>s.goToPreviousProblem&&s.goToPreviousProblem(...e)),class:"previous-problem",disabled:!i.problem.last}," 上一题 ",8,ne),(0,a.Lk)("button",{onClick:t[5]||(t[5]=(...e)=>s.goToNextProblem&&s.goToNextProblem(...e)),class:"next-problem",disabled:!i.problem.next}," 下一题 ",8,ae)])])):(0,a.Q3)("",!0),i.showBookmarkModal?((0,a.uX)(),(0,a.CE)("div",le,[(0,a.Lk)("div",ie,[t[24]||(t[24]=(0,a.Lk)("h3",null,"添加书签",-1)),(0,a.Lk)("div",se,[t[22]||(t[22]=(0,a.Lk)("label",null,"题目:",-1)),(0,a.Lk)("input",{type:"text",value:i.problem.title,disabled:""},null,8,re)]),(0,a.Lk)("div",ce,[t[23]||(t[23]=(0,a.Lk)("label",null,"书签内容(可选):",-1)),(0,a.bo)((0,a.Lk)("input",{type:"text","onUpdate:modelValue":t[6]||(t[6]=e=>i.bookmarkTitle=e),placeholder:"为这个书签添加描述..."},null,512),[[n.Jo,i.bookmarkTitle]])]),(0,a.Lk)("div",de,[(0,a.Lk)("button",{onClick:t[7]||(t[7]=(...e)=>s.addBookmark&&s.addBookmark(...e)),class:"submit-btn"},"确定"),(0,a.Lk)("button",{onClick:t[8]||(t[8]=e=>i.showBookmarkModal=!1),class:"cancel-btn"},"取消")])])])):(0,a.Q3)("",!0),i.showFeedbackModal?((0,a.uX)(),(0,a.CE)("div",ue,[(0,a.Lk)("div",he,[t[27]||(t[27]=(0,a.Lk)("h3",null,"题目问题反馈",-1)),(0,a.Lk)("div",ke,[t[25]||(t[25]=(0,a.Lk)("label",null,"题目:",-1)),(0,a.Lk)("input",{type:"text",value:i.problem.title,disabled:""},null,8,pe)]),(0,a.Lk)("div",me,[t[26]||(t[26]=(0,a.Lk)("label",null,"反馈内容:",-1)),(0,a.bo)((0,a.Lk)("textarea",{"onUpdate:modelValue":t[9]||(t[9]=e=>i.feedbackContent=e),placeholder:"请描述您遇到的问题...",rows:"4"},null,512),[[n.Jo,i.feedbackContent]])]),(0,a.Lk)("div",ge,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.quickTags,(e=>((0,a.uX)(),(0,a.CE)("button",{key:e,onClick:t=>s.appendTag(e),class:"tag-btn"},(0,f.v_)(e),9,be)))),128))]),(0,a.Lk)("div",fe,[(0,a.Lk)("button",{onClick:t[10]||(t[10]=(...e)=>s.submitFeedback&&s.submitFeedback(...e)),class:"submit-btn"},"提交"),(0,a.Lk)("button",{onClick:t[11]||(t[11]=e=>i.showFeedbackModal=!1),class:"cancel-btn"},"取消")])])])):(0,a.Q3)("",!0)],64)}var ye=o(642),Le=o(1995),we=o.n(Le),Ce=o(1109),Pe=(o(9351),o(437)),Ee=o(8734),Te=o.n(Ee),_e={data(){return{problem:null,md:null,token:h.A.get("token")||"",showFeedbackModal:!1,feedbackContent:"",quickTags:["图片无法加载","公式渲染错乱","题目内容有误"],showBookmarkModal:!1,bookmarkTitle:""}},created(){this.md=new ye.A({html:!0,breaks:!0,linkify:!0,highlight:function(e,t){if(t&&Ce.A.getLanguage(t))try{return Ce.A.highlight(e,{language:t}).value}catch(o){}return""}});const e=this.md.renderer.rules.text||function(e,t,o,n,a){return a.renderToken(e,t,o)};this.md.renderer.rules.text=function(t,o,n,a,l){let i=t[o].content;return i=i.replace(/(?{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX error:",o),e}})),i=i.replace(/(?{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX error:",o),e}})),t[o].content=i,e(t,o,n,a,l)},this.md.use(we())},computed:{renderedContent(){if(!this.problem)return"";let e=this.md.render(this.problem.content);return e=e.replace(/\$([^$\n]+?)\$/g,((e,t)=>{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX inline error:",o),e}})),e=e.replace(/\$\$([^$]+?)\$\$/g,((e,t)=>{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX display error:",o),e}})),e=Te().decode(e),e},renderedHint(){if(!this.problem||!this.problem.hint)return"";let e=this.md.render(this.problem.hint);return e=e.replace(/\$([^$\n]+?)\$/g,((e,t)=>{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX inline error:",o),e}})),e=e.replace(/\$\$([^$]+?)\$\$/g,((e,t)=>{try{return Pe.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX display error:",o),e}})),e=Te().decode(e),e}},methods:{async fetchProblem(){try{const e=await fetch(`https://api.oj.东北大学.com/problem?problem_id=${this.$route.params.id}`,{headers:{Authorization:this.token}});this.problem=await e.json()}catch(e){console.error("Error:",e)}},async markProblem(e){try{const t=await fetch("https://api.oj.东北大学.com/mark",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({problem_id:this.problem.id,status:this.problem.status===e?2:e})});t.ok&&await this.fetchProblem()}catch(t){console.error("Error:",t)}},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},goToKnowledge(e){this.$router.push({path:"/problems",query:{knowledge_id:e.id}})},async goToNextProblem(){this.problem.next?this.$router.push(`/problem/${this.problem.next}`):alert("已经是最后一题了~")},async goToPreviousProblem(){this.problem.last?this.$router.push(`/problem/${this.problem.last}`):alert("已经是第一题了~")},appendTag(e){this.feedbackContent?this.feedbackContent+=" "+e:this.feedbackContent=e},async submitFeedback(){if(this.feedbackContent.trim())try{const e=await fetch("https://api.oj.东北大学.com/report",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({problem_id:this.problem.id,content:this.feedbackContent.trim()})});if(e.ok)alert("反馈已提交,感谢您的支持!"),this.showFeedbackModal=!1,this.feedbackContent="";else{const t=await e.json();alert(t.error||"提交失败,请稍后重试")}}catch(e){console.error("Error:",e),alert("提交失败,请稍后重试")}else alert("请输入反馈内容!")},async addBookmark(){if(this.problem)try{const e=await fetch("https://api.oj.东北大学.com/bookmark/add_mark",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({problem_id:this.problem.id,title:this.bookmarkTitle.trim()})});if(e.ok){await e.json();alert("书签添加成功!"),this.showBookmarkModal=!1,this.bookmarkTitle=""}else{const t=await e.json();alert(t.error||"添加书签失败,请稍后重试")}}catch(e){console.error("Error adding bookmark:",e),alert("添加书签失败,请稍后重试")}}},mounted(){this.fetchProblem()},watch:{"$route.params.id"(){this.fetchProblem()},"problem.title"(){this.problem&&this.problem.title&&(document.title=`${this.problem.title} - OJ题库 - NEU小站`)}}};const Se=(0,p.A)(_e,[["render",ve]]);var $e=Se;const je={class:"problem-list"},Ke={class:"filters"},Fe={class:"knowledge-search",ref:"knowledgeSearch"},Xe={key:0,class:"knowledge-list"},Oe=["onClick"],Ae={class:"problems-table"},xe=["onClick"],Me={key:1,class:"no-knowledge"},Je={class:"pagination"},Ne=["disabled"],Ie=["disabled"],Ue={class:"quick-jump"},Be=["max"];function Ve(e,t,o,l,i,s){return(0,a.uX)(),(0,a.CE)("div",je,[(0,a.Lk)("div",Ke,[(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>i.title=e),placeholder:"搜索题目标题"},null,512),[[n.Jo,i.title]]),(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=e=>i.content=e),placeholder:"搜索题目内容"},null,512),[[n.Jo,i.content]]),(0,a.bo)((0,a.Lk)("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>i.difficulty=e)},t[12]||(t[12]=[(0,a.Fv)('全部难度 1 2 3 4 5 6 7 8 9 10 ',11)]),512),[[n.u1,i.difficulty]]),(0,a.bo)((0,a.Lk)("select",{"onUpdate:modelValue":t[3]||(t[3]=e=>i.statusFilter=e)},t[13]||(t[13]=[(0,a.Lk)("option",{value:""},"全部状态",-1),(0,a.Lk)("option",{value:"0"},"只看不会的题",-1),(0,a.Lk)("option",{value:"1"},"只看已会的题",-1)]),512),[[n.u1,i.statusFilter]]),(0,a.Lk)("div",Fe,[(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=e=>i.knowledgeSearch=e),onFocus:t[5]||(t[5]=e=>s.fetchKnowledgePoints()),onInput:t[6]||(t[6]=e=>s.fetchKnowledgePoints()),placeholder:"搜索知识点"},null,544),[[n.Jo,i.knowledgeSearch]]),i.showKnowledgeList?((0,a.uX)(),(0,a.CE)("div",Xe,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.knowledgePoints,(e=>((0,a.uX)(),(0,a.CE)("div",{key:e.id,onClick:t=>s.selectKnowledge(e),class:"knowledge-item"},(0,f.v_)(e.title),9,Oe)))),128))])):(0,a.Q3)("",!0)],512)]),(0,a.Lk)("table",Ae,[t[14]||(t[14]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"编号"),(0,a.Lk)("th",null,"标题"),(0,a.Lk)("th",null,"难度"),(0,a.Lk)("th",null,"知识点"),(0,a.Lk)("th",null,"状态")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.problems,(e=>((0,a.uX)(),(0,a.CE)("tr",{key:e.id,onClick:t=>s.goToProblem(e.id)},[(0,a.Lk)("td",null,(0,f.v_)(e.id),1),(0,a.Lk)("td",null,(0,f.v_)(e.title),1),(0,a.Lk)("td",null,(0,f.v_)(s.getDifficultyText(e.difficulty)),1),(0,a.Lk)("td",null,[e.knowledge&&e.knowledge.length>0?((0,a.uX)(!0),(0,a.CE)(a.FK,{key:0},(0,a.pI)(e.knowledge,(e=>((0,a.uX)(),(0,a.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,a.uX)(),(0,a.CE)("span",Me,"无"))]),(0,a.Lk)("td",null,[(0,a.Lk)("span",{class:(0,f.C4)(["status-tag",{solved:1===e.status,unsolved:0===e.status}])},(0,f.v_)(s.getStatusText(e.status)),3)])],8,xe)))),128))])]),(0,a.Lk)("div",Je,[(0,a.Lk)("button",{disabled:1===i.page,onClick:t[7]||(t[7]=e=>s.changePage(i.page-1))},"上一页",8,Ne),(0,a.Lk)("span",null,"第 "+(0,f.v_)(i.page)+" 页 / 共 "+(0,f.v_)(i.totalPages)+" 页",1),(0,a.Lk)("button",{disabled:i.page===i.totalPages,onClick:t[8]||(t[8]=e=>s.changePage(i.page+1))},"下一页",8,Ie),(0,a.Lk)("div",Ue,[t[15]||(t[15]=(0,a.eW)(" 快速跳转至 ")),(0,a.bo)((0,a.Lk)("input",{"onUpdate:modelValue":t[9]||(t[9]=e=>i.jumpPage=e),type:"number",min:"1",max:i.totalPages,onKeyup:t[10]||(t[10]=(0,n.jR)(((...e)=>s.handleJump&&s.handleJump(...e)),["enter"]))},null,40,Be),[[n.Jo,i.jumpPage]]),t[16]||(t[16]=(0,a.eW)(" 页 ")),(0,a.Lk)("button",{onClick:t[11]||(t[11]=(...e)=>s.handleJump&&s.handleJump(...e))},"跳转")])])])}var qe={data(){return{problems:[],page:1,totalPages:1,title:"",content:"",difficulty:"",statusFilter:"",knowledgeSearch:"",knowledgePoints:[],showKnowledgeList:!1,selectedKnowledge:null,token:h.A.get("token")||"",jumpPage:""}},methods:{async fetchProblems(){try{const e=await fetch("https://api.oj.东北大学.com/my_problem_list",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({page:this.page,title:this.title||void 0,content:this.content||void 0,difficulty:this.difficulty?Number(this.difficulty):void 0,status_filter:this.statusFilter?Number(this.statusFilter):void 0,knowledge_id:this.selectedKnowledge?.id})}),t=await e.json();this.problems=t.problems,this.totalPages=t.pages}catch(e){console.error("Error:",e)}},goToProblem(e){this.$router.push(`/problem/${e}`)},changePage(e){this.page=e,this.fetchProblems()},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},getStatusText(e){return 1===e?"已会":"不会"},async fetchKnowledgePoints(){try{const e=await fetch("https://api.oj.东北大学.com/knowledge",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({search:this.knowledgeSearch})}),t=await e.json();this.knowledgePoints=t,this.showKnowledgeList=!0}catch(e){console.error("Error:",e)}},selectKnowledge(e){this.selectedKnowledge=e,this.knowledgeSearch=e.title,this.showKnowledgeList=!1,this.page=1,this.fetchProblems()},handleClickOutside(e){const t=this.$refs.knowledgeSearch;t&&!t.contains(e.target)&&(this.showKnowledgeList=!1,this.selectedKnowledge||(this.knowledgeSearch=""))},handleJump(){const e=parseInt(this.jumpPage);e&&e>=1&&e<=this.totalPages?this.changePage(e):alert("请输入有效的页码!"),this.jumpPage=""}},watch:{title(){this.page=1,this.fetchProblems()},difficulty(){this.page=1,this.fetchProblems()},statusFilter(){this.page=1,this.fetchProblems()},content(){this.page=1,this.fetchProblems()},knowledgeSearch(e){e||(this.selectedKnowledge=null,this.page=1,this.fetchProblems())}},mounted(){document.title="我标记的题目 - OJ题库 - NEU小站",this.fetchProblems(),document.addEventListener("click",this.handleClickOutside)},unmounted(){document.removeEventListener("click",this.handleClickOutside)}};const De=(0,p.A)(qe,[["render",Ve],["__scopeId","data-v-3fac1adc"]]);var We=De;const ze={class:"bookmark-page"},He={key:0,class:"loading"},Qe={key:1,class:"empty-state"},Re={key:2,class:"timeline"},Ye={class:"month-header"},Ge={class:"day-header"},Ze={class:"bookmark-grid"},et={class:"card-content"},tt={class:"problem-title"},ot={class:"bookmark-title"},nt={class:"bookmark-time"},at={class:"card-actions"},lt=["onClick"],it=["onClick"];function st(e,t,o,n,l,i){const s=(0,a.g2)("router-link");return(0,a.uX)(),(0,a.CE)("div",ze,[t[5]||(t[5]=(0,a.Lk)("h1",null,"我的书签",-1)),l.loading?((0,a.uX)(),(0,a.CE)("div",He," 加载中... ")):0===i.bookmarksByMonth.length?((0,a.uX)(),(0,a.CE)("div",Qe,[t[1]||(t[1]=(0,a.Lk)("div",{class:"empty-icon"},"📚",-1)),t[2]||(t[2]=(0,a.Lk)("p",null,"您还没有添加任何书签",-1)),(0,a.bF)(s,{to:"/problems",class:"empty-action"},{default:(0,a.k6)((()=>t[0]||(t[0]=[(0,a.eW)(" 去浏览题目 ")]))),_:1})])):((0,a.uX)(),(0,a.CE)("div",Re,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.bookmarksByMonth,((e,o)=>((0,a.uX)(),(0,a.CE)("div",{key:o,class:"month-section"},[(0,a.Lk)("div",Ye,[t[3]||(t[3]=(0,a.Lk)("div",{class:"month-dot"},null,-1)),(0,a.Lk)("h2",null,(0,f.v_)(e.label),1)]),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.days,((e,o)=>((0,a.uX)(),(0,a.CE)("div",{key:o,class:"day-section"},[(0,a.Lk)("div",Ge,[t[4]||(t[4]=(0,a.Lk)("div",{class:"day-dot"},null,-1)),(0,a.Lk)("h3",null,(0,f.v_)(e.label),1)]),(0,a.Lk)("div",Ze,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.bookmarks,(e=>((0,a.uX)(),(0,a.CE)("div",{key:e.id,class:"bookmark-card"},[(0,a.Lk)("div",et,[(0,a.Lk)("h4",tt,(0,f.v_)(e.problem_title),1),(0,a.Lk)("p",ot,(0,f.v_)(e.title||"未命名书签"),1),(0,a.Lk)("div",nt,(0,f.v_)(i.formatTime(e.created_at)),1)]),(0,a.Lk)("div",at,[(0,a.Lk)("button",{onClick:t=>i.goToProblem(e.problem_id),class:"action-btn view-btn"}," 进入本题 ",8,lt),(0,a.Lk)("button",{onClick:t=>i.deleteBookmark(e.id),class:"action-btn delete-btn"}," 删除书签 ",8,it)])])))),128))])])))),128))])))),128))]))])}o(8111),o(7588);var rt={data(){return{bookmarks:[],loading:!0,token:h.A.get("token")||""}},computed:{bookmarksByMonth(){if(!this.bookmarks.length)return[];const e=[],t=new Map;return this.bookmarks.forEach((o=>{const n=new Date(o.created_at),a=`${n.getFullYear()}-${n.getMonth()+1}`,l=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`;if(!t.has(a)){const o={key:a,label:`${n.getFullYear()}年${n.getMonth()+1}月`,days:[],dayMap:new Map};t.set(a,o),e.push(o)}const i=t.get(a);if(!i.dayMap.has(l)){const e={key:l,label:`${n.getMonth()+1}月${n.getDate()}日`,bookmarks:[]};i.dayMap.set(l,e),i.days.push(e)}i.dayMap.get(l).bookmarks.push(o)})),e.sort(((e,t)=>t.key.localeCompare(e.key))),e.forEach((e=>{e.days.sort(((e,t)=>t.key.localeCompare(e.key)))})),e}},methods:{async fetchBookmarks(){this.loading=!0;try{const e=await fetch("https://api.oj.东北大学.com/bookmark/get",{headers:{Authorization:this.token}});if(!e.ok)throw new Error("获取书签失败");const t=await e.json();this.bookmarks=t.bookmarks}catch(e){console.error("Error fetching bookmarks:",e)}finally{this.loading=!1}},formatTime(e){const t=new Date(e),o=t.getHours().toString().padStart(2,"0"),n=t.getMinutes().toString().padStart(2,"0");return`${o}:${n}`},goToProblem(e){this.$router.push(`/problem/${e}`)},async deleteBookmark(e){if(confirm("确定要删除这个书签吗?"))try{const t=await fetch("https://api.oj.东北大学.com/bookmark/delete_mark",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({mark_id:e})});if(!t.ok)throw new Error("删除书签失败");await this.fetchBookmarks()}catch(t){console.error("Error deleting bookmark:",t),alert("删除书签失败,请稍后重试")}}},mounted(){document.title="我的书签 - OJ题库 - NEU小站",this.fetchBookmarks()}};const ct=(0,p.A)(rt,[["render",st],["__scopeId","data-v-373b9fde"]]);var dt=ct;const ut=[{path:"/",redirect:"/problems"},{path:"/problems",name:"ProblemList",component:A},{path:"/problem/:id",name:"ProblemDetail",component:$e,meta:{title:"题目详情"}},{path:"/my",name:"MyProblemList",component:We},{path:"/bookmarks",name:"BookmarkList",component:dt,meta:{title:"我的书签"}},{path:"/about",name:"About",component:()=>o.e(131).then(o.bind(o,1131)),meta:{title:"关于"}},{path:"/:pathMatch(.*)*",redirect:"/problems"}],ht=(0,b.aE)({history:(0,b.LA)(),routes:ut});var kt=ht,pt=o(782),mt=(0,pt.y$)({state:{},getters:{},mutations:{},actions:{},modules:{}});(0,n.Ef)(g).use(mt).use(kt).mount("#app")}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var l=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(l.exports,l,l.exports,o),l.loaded=!0,l.exports}o.m=e,function(){var e=[];o.O=function(t,n,a,l){if(!n){var i=1/0;for(d=0;d=l)&&Object.keys(o.O).every((function(e){return o.O[e](n[r])}))?n.splice(r--,1):(s=!1,l0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[n,a,l]}}(),function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,{a:t}),t}}(),function(){o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(t,n){return o.f[n](e,t),t}),[]))}}(),function(){o.u=function(e){return"js/"+e+".779032f2.js"}}(),function(){o.miniCssF=function(e){return"css/"+e+".27329b36.css"}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="front:";o.l=function(n,a,l,i){if(e[n])e[n].push(a);else{var s,r;if(void 0!==l)for(var c=document.getElementsByTagName("script"),d=0;d