diff --git a/dist/css/143.8861eb94.css b/dist/css/143.8861eb94.css new file mode 100644 index 0000000..c076d04 --- /dev/null +++ b/dist/css/143.8861eb94.css @@ -0,0 +1 @@ +.favorite-view[data-v-39496cde]{min-height:calc(100vh - 64px)} \ No newline at end of file diff --git a/dist/css/924.1c0bd8d0.css b/dist/css/223.9de559c7.css similarity index 94% rename from dist/css/924.1c0bd8d0.css rename to dist/css/223.9de559c7.css index e430005..58bc4fa 100644 --- a/dist/css/924.1c0bd8d0.css +++ b/dist/css/223.9de559c7.css @@ -1 +1 @@ -.word-card:hover h3[data-v-7038ea55]{color:var(--n-color-primary)}.note-detail-modal .markdown-body strong{font-weight:700;color:#4f46e5}.dark .note-detail-modal .markdown-body strong{color:#818cf8}.note-detail-modal .markdown-body{line-height:1.6;font-size:1rem}.note-detail-modal .markdown-body p{margin-bottom:.5em}.note-detail-modal .markdown-body ul{list-style-type:disc;padding-left:1.5em;margin-bottom:.5em}.note-detail-modal .markdown-body ol{list-style-type:decimal;padding-left:1.5em;margin-bottom:.5em}.note-detail-modal .markdown-body li{margin-bottom:.1em;padding-left:.25em}.note-detail-modal .markdown-body li>p{margin-top:.1em;margin-bottom:.1em}.note-detail-modal .markdown-body ol ul,.note-detail-modal .markdown-body ul ul{list-style-type:circle;margin-top:.25em}.note-detail-modal .markdown-body ol ol,.note-detail-modal .markdown-body ul ol{list-style-type:lower-roman;margin-top:.25em}.note-detail-modal .markdown-body blockquote{border-left:4px solid #e5e7eb;padding-left:1rem;font-style:italic;color:#6b7280;margin-bottom:1em;background-color:#f9fafb;padding-top:.5em;padding-bottom:.5em;border-radius:0 .25rem .25rem 0}.dark .note-detail-modal .markdown-body blockquote{border-color:#374151;color:#9ca3af;background-color:hsla(0,0%,100%,.05)}.note-detail-modal .markdown-body code{background-color:rgba(175,184,193,.2);padding:.2em .4em;border-radius:6px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:85%}.note-detail-modal .markdown-body pre code{background-color:transparent;padding:0} \ No newline at end of file +.word-card:hover h3[data-v-615b21bc]{color:var(--n-color-primary)}.note-detail-modal .markdown-body strong{font-weight:700;color:#4f46e5}.dark .note-detail-modal .markdown-body strong{color:#818cf8}.note-detail-modal .markdown-body{line-height:1.6;font-size:1rem}.note-detail-modal .markdown-body p{margin-bottom:.5em}.note-detail-modal .markdown-body ul{list-style-type:disc;padding-left:1.5em;margin-bottom:.5em}.note-detail-modal .markdown-body ol{list-style-type:decimal;padding-left:1.5em;margin-bottom:.5em}.note-detail-modal .markdown-body li{margin-bottom:.1em;padding-left:.25em}.note-detail-modal .markdown-body li>p{margin-top:.1em;margin-bottom:.1em}.note-detail-modal .markdown-body ol ul,.note-detail-modal .markdown-body ul ul{list-style-type:circle;margin-top:.25em}.note-detail-modal .markdown-body ol ol,.note-detail-modal .markdown-body ul ol{list-style-type:lower-roman;margin-top:.25em}.note-detail-modal .markdown-body blockquote{border-left:4px solid #e5e7eb;padding-left:1rem;font-style:italic;color:#6b7280;margin-bottom:1em;background-color:#f9fafb;padding-top:.5em;padding-bottom:.5em;border-radius:0 .25rem .25rem 0}.dark .note-detail-modal .markdown-body blockquote{border-color:#374151;color:#9ca3af;background-color:hsla(0,0%,100%,.05)}.note-detail-modal .markdown-body code{background-color:rgba(175,184,193,.2);padding:.2em .4em;border-radius:6px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:85%}.note-detail-modal .markdown-body pre code{background-color:transparent;padding:0} \ No newline at end of file diff --git a/dist/css/405.86dfd5fb.css b/dist/css/405.86dfd5fb.css deleted file mode 100644 index 45e007a..0000000 --- a/dist/css/405.86dfd5fb.css +++ /dev/null @@ -1 +0,0 @@ -.favorite-view[data-v-7e7e4605]{min-height:calc(100vh - 64px)} \ No newline at end of file diff --git a/dist/css/416.94c42108.css b/dist/css/416.94c42108.css deleted file mode 100644 index 66fc9b3..0000000 --- a/dist/css/416.94c42108.css +++ /dev/null @@ -1 +0,0 @@ -[data-v-191a7506] .n-timeline-item-content{margin-bottom:24px} \ No newline at end of file diff --git a/dist/css/55.89084f96.css b/dist/css/55.89084f96.css deleted file mode 100644 index 4d6bd50..0000000 --- a/dist/css/55.89084f96.css +++ /dev/null @@ -1 +0,0 @@ -.line-clamp-2[data-v-25b7032f]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden} \ No newline at end of file diff --git a/dist/css/553.d3b36629.css b/dist/css/553.d3b36629.css new file mode 100644 index 0000000..6abf326 --- /dev/null +++ b/dist/css/553.d3b36629.css @@ -0,0 +1 @@ +.n-card[data-v-7e4a47f6]{transition:all .3s cubic-bezier(.4,0,.2,1)} \ No newline at end of file diff --git a/dist/css/774.1b803950.css b/dist/css/774.1b803950.css deleted file mode 100644 index 2776db7..0000000 --- a/dist/css/774.1b803950.css +++ /dev/null @@ -1 +0,0 @@ -.n-card[data-v-0f0ff0fe]{transition:all .3s cubic-bezier(.4,0,.2,1)} \ No newline at end of file diff --git a/dist/css/78.e7bcbc26.css b/dist/css/78.e7bcbc26.css new file mode 100644 index 0000000..d5cd6ae --- /dev/null +++ b/dist/css/78.e7bcbc26.css @@ -0,0 +1 @@ +.line-clamp-2[data-v-7b31df80]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden} \ No newline at end of file diff --git a/dist/css/933.55ccfbb8.css b/dist/css/933.55ccfbb8.css new file mode 100644 index 0000000..2ecb10b --- /dev/null +++ b/dist/css/933.55ccfbb8.css @@ -0,0 +1 @@ +[data-v-f61e1e9c] .n-timeline-item-content{margin-bottom:24px} \ No newline at end of file diff --git a/dist/index.html b/dist/index.html index 24d51b9..b1814ed 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -Word Helper
\ No newline at end of file +Word Helper
\ No newline at end of file diff --git a/dist/js/405.f97998f1.js b/dist/js/143.81f28fac.js similarity index 62% rename from dist/js/405.f97998f1.js rename to dist/js/143.81f28fac.js index d2311cd..f551834 100644 --- a/dist/js/405.f97998f1.js +++ b/dist/js/143.81f28fac.js @@ -1,21 +1,21 @@ -"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[405],{55727:function(e,t,a){a.d(t,{A:function(){return l}});var r=a(45525); +"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[143],{55727:function(e,t,a){a.d(t,{A:function(){return l}});var r=a(45525); /** * @license lucide-vue-next v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const l=(0,r.A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},77405:function(e,t,a){a.r(t),a.d(t,{default:function(){return V}});a(44114),a(18111),a(22489);var r=a(56768),l=a(90144),o=a(24232),i=a(45130),s=a(98728),n=a(97387),c=a(36909),d=a(54880),u=a(42517),v=a(35161),y=a(91733),p=a(55727),k=a(45525); + */const l=(0,r.A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},91733:function(e,t,a){a.d(t,{A:function(){return l}});var r=a(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l=(0,r.A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},95524:function(e,t,a){a.r(t),a.d(t,{default:function(){return V}});a(44114),a(18111),a(22489);var r=a(56768),l=a(90144),o=a(24232),i=a(45130),s=a(98728),n=a(97387),c=a(36909),d=a(54880),u=a(42517),v=a(35161),y=a(91733),p=a(55727),k=a(45525); /** * @license lucide-vue-next v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const g=(0,k.A)("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);var h=a(35720);const x={class:"favorite-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},f={class:"flex items-center gap-2 mb-8",initial:{opacity:0,x:-20},enter:{opacity:1,x:0,transition:{duration:500}}},w={key:0,class:"flex flex-col items-center justify-center py-20"},m={class:"w-24 h-24 bg-gray-100 dark:bg-gray-800 rounded-full flex items-center justify-center mb-4"},b={key:1,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},C=["enter"],_={class:"flex justify-between items-start"},A={class:"text-2xl font-bold text-gray-900 dark:text-white group-hover:text-primary transition-colors"},L={class:"flex items-center gap-1 mt-2 text-sm text-gray-500 dark:text-gray-400"},R={class:"flex items-center gap-2"},F={class:"p-2 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg"},j=["onClick"],E={key:2,class:"flex justify-center mt-8"},X={key:3,class:"text-center mt-8 text-gray-400 text-sm"};var M={__name:"FavoriteView",setup(e){const t=(0,s.rd)(),a=(0,n.J)(),k=(0,c.s)(),{isDark:M}=(0,r.WQ)("themeContext"),D=(0,l.KR)(!1),K=(0,l.KR)([]),V=(0,l.KR)(1),W=(0,l.KR)(0),z=(0,r.EW)(()=>K.value.lengthe?new Date(e).toLocaleDateString():"",Q=async(e=1)=>{D.value=!0;try{const t=await h.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/favorite/list",{params:{page:e}});if(t.data&&0===t.data.code&&t.data.data){const a=t.data.data;K.value=1===e?a.list:[...K.value,...a.list],W.value=a.total,V.value=e}}catch(t){a.error("获取生词本失败")}finally{D.value=!1}},$=()=>{!D.value&&z.value&&Q(V.value+1)},H=async e=>{k.warning({title:"确认移除",content:`确定要将单词 "${e.word}" 移出生词本吗?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{try{const t=await h.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/favorite",{word_id:e.id});t.data&&!1===t.data.is_favorite&&(a.success("已将单词移出生词本"),K.value=K.value.filter(t=>t.id!==e.id),W.value=Math.max(0,W.value-1))}catch(t){console.error("Delete favorite failed:",t),a.error("删除失败")}}})},I=e=>{const a=t.resolve({name:"word-detail",query:{word_id:e}});window.open(a.href,"_blank")};return(0,r.sV)(()=>{Q(),document.title="我的生词本 - Word Helper"}),(e,t)=>{const a=(0,r.gN)("motion");return(0,r.uX)(),(0,r.CE)("div",x,[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",f,[(0,r.bF)((0,l.R1)(v.A),{class:"w-8 h-8 text-yellow-500 fill-current"}),t[1]||(t[1]=(0,r.Lk)("h1",{class:"text-3xl font-bold text-gray-900 dark:text-white"},"我的生词本",-1))])),[[a]]),D.value||0!==K.value.length?((0,r.uX)(),(0,r.CE)("div",b,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(K.value,(e,t)=>(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",{key:e.favorite_id,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:50*t}}},[(0,r.bF)((0,l.R1)(u.Ay),{class:"h-full rounded-xl shadow-sm hover:shadow-md transition-all cursor-pointer dark:bg-gray-800 group",bordered:!1,onClick:t=>I(e.id)},{default:(0,r.k6)(()=>[(0,r.Lk)("div",_,[(0,r.Lk)("div",null,[(0,r.Lk)("h3",A,(0,o.v_)(e.word),1),(0,r.Lk)("div",L,[(0,r.bF)((0,l.R1)(p.A),{class:"w-4 h-4"}),(0,r.Lk)("span",null,"收藏于 "+(0,o.v_)(q(e.created_at)),1)])]),(0,r.Lk)("div",R,[(0,r.Lk)("div",F,[(0,r.bF)((0,l.R1)(v.A),{class:"w-5 h-5 text-yellow-500 fill-current"})]),(0,r.Lk)("div",{class:"p-2 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors cursor-pointer group/btn",onClick:(0,i.D$)(t=>H(e),["stop"]),title:"移除生词"},[(0,r.bF)((0,l.R1)(g),{class:"w-5 h-5 text-gray-400 group-hover/btn:text-red-500 transition-colors"})],8,j)])])]),_:2},1032,["onClick"])],8,C)),[[a]])),128))])):((0,r.uX)(),(0,r.CE)("div",w,[(0,r.Lk)("div",m,[(0,r.bF)((0,l.R1)(y.A),{class:"w-12 h-12 text-gray-400"})]),t[3]||(t[3]=(0,r.Lk)("p",{class:"text-gray-500 mb-3 dark:text-gray-400 text-lg"},"还没有添加任何单词哦",-1)),(0,r.bF)((0,l.R1)(d.Ay),{class:"mt-8",type:"primary",onClick:t[0]||(t[0]=t=>e.$router.push("/dict"))},{default:(0,r.k6)(()=>[...t[2]||(t[2]=[(0,r.eW)(" 去背单词 ",-1)])]),_:1})])),z.value?((0,r.uX)(),(0,r.CE)("div",E,[(0,r.bF)((0,l.R1)(d.Ay),{loading:D.value,size:"large",secondary:"",round:"",onClick:$},{default:(0,r.k6)(()=>[...t[4]||(t[4]=[(0,r.eW)(" 加载更多 ",-1)])]),_:1},8,["loading"])])):(0,r.Q3)("",!0),!z.value&&K.value.length>0?((0,r.uX)(),(0,r.CE)("div",X," 没有更多了 ")):(0,r.Q3)("",!0)])}}},D=a(71241);const K=(0,D.A)(M,[["__scopeId","data-v-7e7e4605"]]);var V=K},91733:function(e,t,a){a.d(t,{A:function(){return l}});var r=a(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const l=(0,r.A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])}}]); -//# sourceMappingURL=405.f97998f1.js.map \ No newline at end of file +const g=(0,k.A)("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);var h=a(35720);const x={class:"favorite-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},f={class:"flex items-center gap-2 mb-8",initial:{opacity:0,x:-20},enter:{opacity:1,x:0,transition:{duration:500}}},w={key:0,class:"flex flex-col items-center justify-center py-20"},m={class:"w-24 h-24 bg-gray-100 dark:bg-gray-800 rounded-full flex items-center justify-center mb-4"},b={key:1,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},C=["enter"],_={class:"flex justify-between items-start"},A={class:"text-2xl font-bold text-gray-900 dark:text-white group-hover:text-primary transition-colors"},L={class:"flex items-center gap-1 mt-2 text-sm text-gray-500 dark:text-gray-400"},R={class:"flex items-center gap-2"},F={class:"p-2 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg"},j=["onClick"],E={key:2,class:"flex justify-center mt-8"},X={key:3,class:"text-center mt-8 text-gray-400 text-sm"};var M={__name:"FavoriteView",setup(e){const t=(0,s.rd)(),a=(0,n.J)(),k=(0,c.s)(),{isDark:M}=(0,r.WQ)("themeContext"),D=(0,l.KR)(!1),K=(0,l.KR)([]),V=(0,l.KR)(1),W=(0,l.KR)(0),z=(0,r.EW)(()=>K.value.lengthe?new Date(e).toLocaleDateString():"",Q=async(e=1)=>{D.value=!0;try{const t=await h.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/favorite/list",{params:{page:e}});if(t.data&&0===t.data.code&&t.data.data){const a=t.data.data;K.value=1===e?a.list:[...K.value,...a.list],W.value=a.total,V.value=e}}catch(t){a.error("获取生词本失败")}finally{D.value=!1}},$=()=>{!D.value&&z.value&&Q(V.value+1)},H=async e=>{k.warning({title:"确认移除",content:`确定要将单词 "${e.word}" 移出生词本吗?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{try{const t=await h.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/favorite",{word_id:e.id});t.data&&!1===t.data.is_favorite&&(a.success("已将单词移出生词本"),K.value=K.value.filter(t=>t.id!==e.id),W.value=Math.max(0,W.value-1))}catch(t){console.error("Delete favorite failed:",t),a.error("删除失败")}}})},I=e=>{const a=t.resolve({name:"word-detail",query:{word_id:e}});window.open(a.href,"_blank")};return(0,r.sV)(()=>{Q(),document.title="我的生词本 - Word Helper"}),(e,t)=>{const a=(0,r.gN)("motion");return(0,r.uX)(),(0,r.CE)("div",x,[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",f,[(0,r.bF)((0,l.R1)(v.A),{class:"w-8 h-8 text-yellow-500 fill-current"}),t[1]||(t[1]=(0,r.Lk)("h1",{class:"text-3xl font-bold text-gray-900 dark:text-white"},"我的生词本",-1))])),[[a]]),D.value||0!==K.value.length?((0,r.uX)(),(0,r.CE)("div",b,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(K.value,(e,t)=>(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",{key:e.favorite_id,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:t%18*50}}},[(0,r.bF)((0,l.R1)(u.Ay),{class:"h-full rounded-xl shadow-sm hover:shadow-md transition-all cursor-pointer dark:bg-gray-800 group",bordered:!1,onClick:t=>I(e.id)},{default:(0,r.k6)(()=>[(0,r.Lk)("div",_,[(0,r.Lk)("div",null,[(0,r.Lk)("h3",A,(0,o.v_)(e.word),1),(0,r.Lk)("div",L,[(0,r.bF)((0,l.R1)(p.A),{class:"w-4 h-4"}),(0,r.Lk)("span",null,"收藏于 "+(0,o.v_)(q(e.created_at)),1)])]),(0,r.Lk)("div",R,[(0,r.Lk)("div",F,[(0,r.bF)((0,l.R1)(v.A),{class:"w-5 h-5 text-yellow-500 fill-current"})]),(0,r.Lk)("div",{class:"p-2 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors cursor-pointer group/btn",onClick:(0,i.D$)(t=>H(e),["stop"]),title:"移除生词"},[(0,r.bF)((0,l.R1)(g),{class:"w-5 h-5 text-gray-400 group-hover/btn:text-red-500 transition-colors"})],8,j)])])]),_:2},1032,["onClick"])],8,C)),[[a]])),128))])):((0,r.uX)(),(0,r.CE)("div",w,[(0,r.Lk)("div",m,[(0,r.bF)((0,l.R1)(y.A),{class:"w-12 h-12 text-gray-400"})]),t[3]||(t[3]=(0,r.Lk)("p",{class:"text-gray-500 mb-3 dark:text-gray-400 text-lg"},"还没有添加任何单词哦",-1)),(0,r.bF)((0,l.R1)(d.Ay),{class:"mt-8",type:"primary",onClick:t[0]||(t[0]=t=>e.$router.push("/dict"))},{default:(0,r.k6)(()=>[...t[2]||(t[2]=[(0,r.eW)(" 去背单词 ",-1)])]),_:1})])),z.value?((0,r.uX)(),(0,r.CE)("div",E,[(0,r.bF)((0,l.R1)(d.Ay),{loading:D.value,size:"large",secondary:"",round:"",onClick:$},{default:(0,r.k6)(()=>[...t[4]||(t[4]=[(0,r.eW)(" 加载更多 ",-1)])]),_:1},8,["loading"])])):(0,r.Q3)("",!0),!z.value&&K.value.length>0?((0,r.uX)(),(0,r.CE)("div",X," 没有更多了 ")):(0,r.Q3)("",!0)])}}},D=a(71241);const K=(0,D.A)(M,[["__scopeId","data-v-39496cde"]]);var V=K}}]); +//# sourceMappingURL=143.81f28fac.js.map \ No newline at end of file diff --git a/dist/js/924.d5ee35b1.js b/dist/js/223.2a258d5f.js similarity index 85% rename from dist/js/924.d5ee35b1.js rename to dist/js/223.2a258d5f.js index 4343b19..d9b36cb 100644 --- a/dist/js/924.d5ee35b1.js +++ b/dist/js/223.2a258d5f.js @@ -1,17 +1,17 @@ -"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[924],{9845:function(e,n,t){t.d(n,{A:function(){return m}});var i=t(56768),o=t(84279),s=(0,i.pM)({name:"Empty",render(){return(0,i.h)("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),(0,i.h)("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),l=t(79882),r=t(88733),a=t(82813),c=t(25216),d=t(34350),u=t(52945),v=(0,d.cB)("empty","\n display: flex;\n flex-direction: column;\n align-items: center;\n font-size: var(--n-font-size);\n",[(0,d.cE)("icon","\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n line-height: var(--n-icon-size);\n color: var(--n-icon-color);\n transition:\n color .3s var(--n-bezier);\n ",[(0,d.c)("+",[(0,d.cE)("description","\n margin-top: 8px;\n ")])]),(0,d.cE)("description","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),(0,d.cE)("extra","\n text-align: center;\n transition: color .3s var(--n-bezier);\n margin-top: 12px;\n color: var(--n-extra-text-color);\n ")]);const p=Object.assign(Object.assign({},l.A.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function});var m=(0,i.pM)({name:"Empty",props:p,slots:Object,setup(e){const{mergedClsPrefixRef:n,inlineThemeDisabled:t,mergedComponentPropsRef:o}=(0,r.Ay)(e),p=(0,l.A)("Empty","-empty",v,u.A,e,n),{localeRef:m}=(0,a.A)("Empty"),h=(0,i.EW)(()=>{var n,t,i;return null!==(n=e.description)&&void 0!==n?n:null===(i=null===(t=null===o||void 0===o?void 0:o.value)||void 0===t?void 0:t.Empty)||void 0===i?void 0:i.description}),f=(0,i.EW)(()=>{var e,n;return(null===(n=null===(e=null===o||void 0===o?void 0:o.value)||void 0===e?void 0:e.Empty)||void 0===n?void 0:n.renderIcon)||(()=>(0,i.h)(s,null))}),y=(0,i.EW)(()=>{const{size:n}=e,{common:{cubicBezierEaseInOut:t},self:{[(0,d.cF)("iconSize",n)]:i,[(0,d.cF)("fontSize",n)]:o,textColor:s,iconColor:l,extraTextColor:r}}=p.value;return{"--n-icon-size":i,"--n-font-size":o,"--n-bezier":t,"--n-text-color":s,"--n-icon-color":l,"--n-extra-text-color":r}}),g=t?(0,c.R)("empty",(0,i.EW)(()=>{let n="";const{size:t}=e;return n+=t[0],n}),y,e):void 0;return{mergedClsPrefix:n,mergedRenderIcon:f,localizedDescription:(0,i.EW)(()=>h.value||m.value.description),cssVars:t?void 0:y,themeClass:null===g||void 0===g?void 0:g.themeClass,onRender:null===g||void 0===g?void 0:g.onRender}},render(){const{$slots:e,mergedClsPrefix:n,onRender:t}=this;return null===t||void 0===t||t(),(0,i.h)("div",{class:[`${n}-empty`,this.themeClass],style:this.cssVars},this.showIcon?(0,i.h)("div",{class:`${n}-empty__icon`},e.icon?e.icon():(0,i.h)(o.A,{clsPrefix:n},{default:this.mergedRenderIcon})):null,this.showDescription?(0,i.h)("div",{class:`${n}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?(0,i.h)("div",{class:`${n}-empty__extra`},e.extra()):null)}})},38307:function(e,n,t){t.d(n,{A:function(){return o}});var i=t(45525); +"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[223],{9845:function(e,n,t){t.d(n,{A:function(){return m}});var i=t(56768),o=t(84279),s=(0,i.pM)({name:"Empty",render(){return(0,i.h)("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),(0,i.h)("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),l=t(79882),r=t(88733),a=t(82813),c=t(25216),d=t(34350),u=t(52945),v=(0,d.cB)("empty","\n display: flex;\n flex-direction: column;\n align-items: center;\n font-size: var(--n-font-size);\n",[(0,d.cE)("icon","\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n line-height: var(--n-icon-size);\n color: var(--n-icon-color);\n transition:\n color .3s var(--n-bezier);\n ",[(0,d.c)("+",[(0,d.cE)("description","\n margin-top: 8px;\n ")])]),(0,d.cE)("description","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),(0,d.cE)("extra","\n text-align: center;\n transition: color .3s var(--n-bezier);\n margin-top: 12px;\n color: var(--n-extra-text-color);\n ")]);const p=Object.assign(Object.assign({},l.A.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function});var m=(0,i.pM)({name:"Empty",props:p,slots:Object,setup(e){const{mergedClsPrefixRef:n,inlineThemeDisabled:t,mergedComponentPropsRef:o}=(0,r.Ay)(e),p=(0,l.A)("Empty","-empty",v,u.A,e,n),{localeRef:m}=(0,a.A)("Empty"),h=(0,i.EW)(()=>{var n,t,i;return null!==(n=e.description)&&void 0!==n?n:null===(i=null===(t=null===o||void 0===o?void 0:o.value)||void 0===t?void 0:t.Empty)||void 0===i?void 0:i.description}),f=(0,i.EW)(()=>{var e,n;return(null===(n=null===(e=null===o||void 0===o?void 0:o.value)||void 0===e?void 0:e.Empty)||void 0===n?void 0:n.renderIcon)||(()=>(0,i.h)(s,null))}),y=(0,i.EW)(()=>{const{size:n}=e,{common:{cubicBezierEaseInOut:t},self:{[(0,d.cF)("iconSize",n)]:i,[(0,d.cF)("fontSize",n)]:o,textColor:s,iconColor:l,extraTextColor:r}}=p.value;return{"--n-icon-size":i,"--n-font-size":o,"--n-bezier":t,"--n-text-color":s,"--n-icon-color":l,"--n-extra-text-color":r}}),g=t?(0,c.R)("empty",(0,i.EW)(()=>{let n="";const{size:t}=e;return n+=t[0],n}),y,e):void 0;return{mergedClsPrefix:n,mergedRenderIcon:f,localizedDescription:(0,i.EW)(()=>h.value||m.value.description),cssVars:t?void 0:y,themeClass:null===g||void 0===g?void 0:g.themeClass,onRender:null===g||void 0===g?void 0:g.onRender}},render(){const{$slots:e,mergedClsPrefix:n,onRender:t}=this;return null===t||void 0===t||t(),(0,i.h)("div",{class:[`${n}-empty`,this.themeClass],style:this.cssVars},this.showIcon?(0,i.h)("div",{class:`${n}-empty__icon`},e.icon?e.icon():(0,i.h)(o.A,{clsPrefix:n},{default:this.mergedRenderIcon})):null,this.showDescription?(0,i.h)("div",{class:`${n}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?(0,i.h)("div",{class:`${n}-empty__extra`},e.extra()):null)}})},38307:function(e,n,t){t.d(n,{A:function(){return o}});var i=t(45525); /** * @license lucide-vue-next v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const o=(0,i.A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},53924:function(e,n,t){t.r(n),t.d(n,{default:function(){return ne}});t(18111),t(22489);var i=t(56768),o=t(90144),s=t(24232),l=t(45130),r=t(98728),a=t(97387),c=t(68042),d=t(92720),u=t(59856),v=t(42517),p=t(54880),m=t(71168),h=t(9845),f=t(48129),y=t(55200),g=t(45525); + */const o=(0,i.A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},53223:function(e,n,t){t.r(n),t.d(n,{default:function(){return ne}});t(18111),t(22489);var i=t(56768),o=t(90144),s=t(24232),l=t(45130),r=t(98728),a=t(97387),c=t(68042),d=t(92720),u=t(59856),v=t(42517),p=t(54880),m=t(71168),h=t(9845),f=t(48129),y=t(55200),g=t(45525); /** * @license lucide-vue-next v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const x=(0,g.A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);var k=t(38307),C=t(91733),b=t(2231),w=t(62784),_=t(6127),z=t(35720),R=t(74911);const A={class:"list-detail-view max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},P={key:0,class:"flex justify-center py-20"},E={class:"mb-8",initial:{opacity:0,y:-20},enter:{opacity:1,y:0}},L={class:"flex flex-col md:flex-row md:items-center justify-between gap-4 mb-4"},j={class:"flex items-center gap-3 mb-2"},W={class:"text-3xl font-bold text-gray-900 dark:text-white"},T={class:"text-gray-500 dark:text-gray-400 text-lg"},S={class:"flex items-center gap-4 text-sm text-gray-500"},B={class:"flex items-center gap-1"},$={class:"flex items-center gap-1"},M={class:"space-y-4"},O={class:"flex items-start justify-between gap-4"},F={class:"flex-1 min-w-0"},X={class:"flex flex-col md:flex-row md:items-baseline md:gap-3 mb-3"},N={class:"text-2xl font-bold text-gray-900 dark:text-white hover:text-primary transition-colors break-all"},V={class:"flex flex-col md:flex-row md:gap-3 text-sm text-gray-500 dark:text-gray-400"},I={key:0},K={key:1},H={class:"space-y-2"},D={class:"flex-shrink-0 px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 font-mono text-xs font-bold min-w-[2rem] text-center"},q={class:"text-gray-800 dark:text-gray-200 text-base leading-relaxed"},Q={class:"mt-8 flex justify-center pb-8"},Y={key:1,class:"text-gray-400 text-sm"},Z={key:0,class:"flex justify-center py-8"},U=["innerHTML"];var G={__name:"ListDetailView",setup(e){const n=new R.A({html:!0,breaks:!0}),t=e=>{if(!e)return"";let t=e.replace(/([^\n])\n(\s*\d+\.\s)/g,"$1\n\n$2").replace(/([^\n])\n(\s*[-*+]\s)/g,"$1\n\n$2");return n.render(t)},g=(0,r.lq)(),G=(0,r.rd)(),J=(0,a.J)(),ee=g.query.list_id,ne=(0,o.KR)(!1),te=(0,o.KR)(!1),ie=(0,o.KR)(null),oe=(0,o.KR)([]),se=(0,o.KR)(1),le=(0,o.KR)(0),re=(0,o.KR)(!1),ae=(0,o.KR)(!1),ce=(0,o.KR)(!1),de=(0,o.KR)(""),ue=e=>(0,_.NR)(e,"YYYY-MM-DD").value,ve=async(e=!1)=>{if(ee){e?te.value=!0:ne.value=!0;try{const n=await z.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/detail",{params:{list_id:ee,page:se.value}}),t=n.data;e?t.words&&t.words.length>0&&(oe.value=[...oe.value,...t.words]):(ie.value={id:t.id,name:t.name,note:t.note,word_count:t.word_count,created_at:t.created_at,official:t.official,admin:t.admin,has_note:t.has_note},oe.value=t.words||[]),le.value=t.pagination.total_items,re.value=se.value{re.value&&(se.value++,ve(!0))},me=e=>{const n=G.resolve({path:"/word",query:{word_id:e}});window.open(n.href,"_blank")},he=async e=>{try{const n=await z.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/rmv_word",{list_id:ie.value.id,word_id:[e.id]});J.success("移除成功"),oe.value=oe.value.filter(n=>n.id!==e.id),ie.value&&(ie.value.word_count=n.data.current_count)}catch(n){console.error(n),J.error("移除失败")}},fe=async e=>{ae.value=!0,ce.value=!0,de.value="";try{const n=await z.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/note/detail",{params:{note_id:e}}),t=n.data;de.value=t.content||""}catch(n){console.error(n),J.error("获取笔记失败"),de.value="加载失败"}finally{ce.value=!1}};return(0,i.sV)(()=>{document.title="词单详情 - Word Helper",ve()}),(e,n)=>{const r=(0,i.gN)("motion");return(0,i.uX)(),(0,i.CE)("div",A,[ne.value&&!ie.value?((0,i.uX)(),(0,i.CE)("div",P,[(0,i.bF)((0,o.R1)(c.A),{size:"large"})])):ie.value?((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",E,[(0,i.Lk)("div",L,[(0,i.Lk)("div",null,[(0,i.Lk)("div",j,[(0,i.Lk)("h1",W,(0,s.v_)(ie.value.name),1),ie.value.official?((0,i.uX)(),(0,i.Wv)((0,o.R1)(d.Ay),{key:0,type:"success",round:"",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(y.A)},null,8,["component"])]),default:(0,i.k6)(()=>[n[3]||(n[3]=(0,i.eW)(" 官方词单 ",-1))]),_:1})):((0,i.uX)(),(0,i.Wv)((0,o.R1)(d.Ay),{key:1,type:"info",round:"",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(x)},null,8,["component"])]),default:(0,i.k6)(()=>[n[4]||(n[4]=(0,i.eW)(" 我创建的词单 ",-1))]),_:1})),ie.value.has_note?((0,i.uX)(),(0,i.Wv)((0,o.R1)(d.Ay),{key:2,type:"warning",round:"",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(k.A)},null,8,["component"])]),default:(0,i.k6)(()=>[n[5]||(n[5]=(0,i.eW)(" 配套笔记 ",-1))]),_:1})):(0,i.Q3)("",!0)]),(0,i.Lk)("p",T,(0,s.v_)(ie.value.note||"暂无描述"),1)]),(0,i.Lk)("div",S,[(0,i.Lk)("div",B,[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(C.A)},null,8,["component"]),(0,i.Lk)("span",null,(0,s.v_)(ie.value.word_count)+" 词",1)]),(0,i.Lk)("div",$,[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(b.A)},null,8,["component"]),(0,i.Lk)("span",null,(0,s.v_)(ue(ie.value.created_at)),1)])])])])),[[r]]),(0,i.Lk)("div",M,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(oe.value,(e,t)=>(0,i.bo)(((0,i.uX)(),(0,i.Wv)((0,o.R1)(v.Ay),{key:e.id,class:"word-card rounded-xl shadow-sm hover:shadow-md transition-shadow cursor-pointer border-gray-100 dark:border-gray-800",bordered:!0,size:"medium",initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:50*t}},onClick:n=>me(e.id)},{default:(0,i.k6)(()=>[(0,i.Lk)("div",O,[(0,i.Lk)("div",F,[(0,i.Lk)("div",X,[(0,i.Lk)("h3",N,(0,s.v_)(e.word),1),(0,i.Lk)("div",V,[e.uk_accent?((0,i.uX)(),(0,i.CE)("span",I,"英 ["+(0,s.v_)(e.uk_accent)+"]",1)):(0,i.Q3)("",!0),e.us_accent?((0,i.uX)(),(0,i.CE)("span",K,"美 ["+(0,s.v_)(e.us_accent)+"]",1)):(0,i.Q3)("",!0)])]),(0,i.Lk)("div",H,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.translations,(e,n)=>((0,i.uX)(),(0,i.CE)("div",{key:n,class:"flex items-baseline gap-2"},[(0,i.Lk)("span",D,(0,s.v_)(e.pos),1),(0,i.Lk)("span",q,(0,s.v_)(e.meaning),1)]))),128))])]),(0,i.Lk)("div",{class:"flex-shrink-0 ml-2 flex items-center gap-1",onClick:n[0]||(n[0]=(0,l.D$)(()=>{},["stop"]))},[e.note_id?((0,i.uX)(),(0,i.Wv)((0,o.R1)(p.Ay),{key:0,quaternary:"",circle:"",type:"warning",size:"small",onClick:n=>fe(e.note_id),title:"查看配套笔记"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(k.A)},null,8,["component"])]),_:1},8,["onClick"])):(0,i.Q3)("",!0),!ie.value.official||ie.value.admin?((0,i.uX)(),(0,i.Wv)((0,o.R1)(m.A),{key:1,onPositiveClick:n=>he(e),"negative-text":"取消","positive-text":"确认移除"},{trigger:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(p.Ay),{quaternary:"",circle:"",type:"error",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(w.A)},null,8,["component"])]),_:1})]),default:(0,i.k6)(()=>[(0,i.eW)(' 确定要将 "'+(0,s.v_)(e.word)+'" 移出本词单吗? ',1)]),_:2},1032,["onPositiveClick"])):(0,i.Q3)("",!0)])])]),_:2},1032,["enter","onClick"])),[[r]])),128))]),(0,i.Lk)("div",Q,[re.value?((0,i.uX)(),(0,i.Wv)((0,o.R1)(p.Ay),{key:0,loading:te.value,onClick:pe,secondary:"",round:"",size:"large",class:"w-full md:w-auto px-8"},{default:(0,i.k6)(()=>[...n[6]||(n[6]=[(0,i.eW)(" 加载更多单词 ",-1)])]),_:1},8,["loading"])):oe.value.length>0?((0,i.uX)(),(0,i.CE)("div",Y," 已加载全部 "+(0,s.v_)(oe.value.length)+" 个单词 ",1)):((0,i.uX)(),(0,i.Wv)((0,o.R1)(h.A),{key:2,description:"本词单暂无单词",class:"mt-12"}))])],64)):((0,i.uX)(),(0,i.Wv)((0,o.R1)(h.A),{key:2,description:"未找到词单信息",class:"mt-20"},{extra:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(p.Ay),{onClick:n[1]||(n[1]=n=>e.$router.back())},{default:(0,i.k6)(()=>[...n[7]||(n[7]=[(0,i.eW)("返回上一页",-1)])]),_:1})]),_:1})),(0,i.bF)((0,o.R1)(f.A),{show:ae.value,"onUpdate:show":n[2]||(n[2]=e=>ae.value=e),preset:"card",title:"配套笔记",class:"w-full max-w-2xl note-detail-modal",style:{"max-height":"80vh"}},{default:(0,i.k6)(()=>[ce.value?((0,i.uX)(),(0,i.CE)("div",Z,[(0,i.bF)((0,o.R1)(c.A),{size:"medium"})])):((0,i.uX)(),(0,i.CE)("div",{key:1,class:"markdown-body text-gray-700 dark:text-gray-300 leading-relaxed overflow-y-auto custom-scrollbar",style:{"max-height":"calc(80vh - 100px)","padding-right":"10px"},innerHTML:t(de.value)},null,8,U))]),_:1},8,["show"])])}}},J=t(71241);const ee=(0,J.A)(G,[["__scopeId","data-v-7038ea55"]]);var ne=ee},55200:function(e,n,t){t.d(n,{A:function(){return o}});var i=t(45525); +const x=(0,g.A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);var k=t(38307),C=t(91733),b=t(2231),w=t(62784),_=t(6127),z=t(35720),R=t(74911);const A={class:"list-detail-view max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},P={key:0,class:"flex justify-center py-20"},E={class:"mb-8",initial:{opacity:0,y:-20},enter:{opacity:1,y:0}},L={class:"flex flex-col md:flex-row md:items-center justify-between gap-4 mb-4"},j={class:"flex items-center gap-3 mb-2"},W={class:"text-3xl font-bold text-gray-900 dark:text-white"},T={class:"text-gray-500 dark:text-gray-400 text-lg"},S={class:"flex items-center gap-4 text-sm text-gray-500"},B={class:"flex items-center gap-1"},$={class:"flex items-center gap-1"},M={class:"space-y-4"},O={class:"flex items-start justify-between gap-4"},F={class:"flex-1 min-w-0"},X={class:"flex flex-col md:flex-row md:items-baseline md:gap-3 mb-3"},N={class:"text-2xl font-bold text-gray-900 dark:text-white hover:text-primary transition-colors break-all"},V={class:"flex flex-col md:flex-row md:gap-3 text-sm text-gray-500 dark:text-gray-400"},I={key:0},K={key:1},H={class:"space-y-2"},D={class:"flex-shrink-0 px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 font-mono text-xs font-bold min-w-[2rem] text-center"},q={class:"text-gray-800 dark:text-gray-200 text-base leading-relaxed"},Q={class:"mt-8 flex justify-center pb-8"},Y={key:1,class:"text-gray-400 text-sm"},Z={key:0,class:"flex justify-center py-8"},U=["innerHTML"];var G={__name:"ListDetailView",setup(e){const n=new R.A({html:!0,breaks:!0}),t=e=>{if(!e)return"";let t=e.replace(/([^\n])\n(\s*\d+\.\s)/g,"$1\n\n$2").replace(/([^\n])\n(\s*[-*+]\s)/g,"$1\n\n$2");return n.render(t)},g=(0,r.lq)(),G=(0,r.rd)(),J=(0,a.J)(),ee=g.query.list_id,ne=(0,o.KR)(!1),te=(0,o.KR)(!1),ie=(0,o.KR)(null),oe=(0,o.KR)([]),se=(0,o.KR)(1),le=(0,o.KR)(0),re=(0,o.KR)(!1),ae=(0,o.KR)(!1),ce=(0,o.KR)(!1),de=(0,o.KR)(""),ue=e=>(0,_.NR)(e,"YYYY-MM-DD").value,ve=async(e=!1)=>{if(ee){e?te.value=!0:ne.value=!0;try{const n=await z.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/detail",{params:{list_id:ee,page:se.value}}),t=n.data;e?t.words&&t.words.length>0&&(oe.value=[...oe.value,...t.words]):(ie.value={id:t.id,name:t.name,note:t.note,word_count:t.word_count,created_at:t.created_at,official:t.official,admin:t.admin,has_note:t.has_note},oe.value=t.words||[]),le.value=t.pagination.total_items,re.value=se.value{re.value&&(se.value++,ve(!0))},me=e=>{const n=G.resolve({path:"/word",query:{word_id:e}});window.open(n.href,"_blank")},he=async e=>{try{const n=await z.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/rmv_word",{list_id:ie.value.id,word_id:[e.id]});J.success("移除成功"),oe.value=oe.value.filter(n=>n.id!==e.id),ie.value&&(ie.value.word_count=n.data.current_count)}catch(n){console.error(n),J.error("移除失败")}},fe=async e=>{ae.value=!0,ce.value=!0,de.value="";try{const n=await z.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/note/detail",{params:{note_id:e}}),t=n.data;de.value=t.content||""}catch(n){console.error(n),J.error("获取笔记失败"),de.value="加载失败"}finally{ce.value=!1}};return(0,i.sV)(()=>{document.title="词单详情 - Word Helper",ve()}),(e,n)=>{const r=(0,i.gN)("motion");return(0,i.uX)(),(0,i.CE)("div",A,[ne.value&&!ie.value?((0,i.uX)(),(0,i.CE)("div",P,[(0,i.bF)((0,o.R1)(c.A),{size:"large"})])):ie.value?((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",E,[(0,i.Lk)("div",L,[(0,i.Lk)("div",null,[(0,i.Lk)("div",j,[(0,i.Lk)("h1",W,(0,s.v_)(ie.value.name),1),ie.value.official?((0,i.uX)(),(0,i.Wv)((0,o.R1)(d.Ay),{key:0,type:"success",round:"",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(y.A)},null,8,["component"])]),default:(0,i.k6)(()=>[n[3]||(n[3]=(0,i.eW)(" 官方词单 ",-1))]),_:1})):((0,i.uX)(),(0,i.Wv)((0,o.R1)(d.Ay),{key:1,type:"info",round:"",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(x)},null,8,["component"])]),default:(0,i.k6)(()=>[n[4]||(n[4]=(0,i.eW)(" 我创建的词单 ",-1))]),_:1})),ie.value.has_note?((0,i.uX)(),(0,i.Wv)((0,o.R1)(d.Ay),{key:2,type:"warning",round:"",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(k.A)},null,8,["component"])]),default:(0,i.k6)(()=>[n[5]||(n[5]=(0,i.eW)(" 配套笔记 ",-1))]),_:1})):(0,i.Q3)("",!0)]),(0,i.Lk)("p",T,(0,s.v_)(ie.value.note||"暂无描述"),1)]),(0,i.Lk)("div",S,[(0,i.Lk)("div",B,[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(C.A)},null,8,["component"]),(0,i.Lk)("span",null,(0,s.v_)(ie.value.word_count)+" 词",1)]),(0,i.Lk)("div",$,[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(b.A)},null,8,["component"]),(0,i.Lk)("span",null,(0,s.v_)(ue(ie.value.created_at)),1)])])])])),[[r]]),(0,i.Lk)("div",M,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(oe.value,(e,t)=>(0,i.bo)(((0,i.uX)(),(0,i.Wv)((0,o.R1)(v.Ay),{key:e.id,class:"word-card rounded-xl shadow-sm hover:shadow-md transition-shadow cursor-pointer border-gray-100 dark:border-gray-800",bordered:!0,size:"medium",initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:t%10*50}},onClick:n=>me(e.id)},{default:(0,i.k6)(()=>[(0,i.Lk)("div",O,[(0,i.Lk)("div",F,[(0,i.Lk)("div",X,[(0,i.Lk)("h3",N,(0,s.v_)(e.word),1),(0,i.Lk)("div",V,[e.uk_accent?((0,i.uX)(),(0,i.CE)("span",I,"英 ["+(0,s.v_)(e.uk_accent)+"]",1)):(0,i.Q3)("",!0),e.us_accent?((0,i.uX)(),(0,i.CE)("span",K,"美 ["+(0,s.v_)(e.us_accent)+"]",1)):(0,i.Q3)("",!0)])]),(0,i.Lk)("div",H,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.translations,(e,n)=>((0,i.uX)(),(0,i.CE)("div",{key:n,class:"flex items-baseline gap-2"},[(0,i.Lk)("span",D,(0,s.v_)(e.pos),1),(0,i.Lk)("span",q,(0,s.v_)(e.meaning),1)]))),128))])]),(0,i.Lk)("div",{class:"flex-shrink-0 ml-2 flex items-center gap-1",onClick:n[0]||(n[0]=(0,l.D$)(()=>{},["stop"]))},[e.note_id?((0,i.uX)(),(0,i.Wv)((0,o.R1)(p.Ay),{key:0,quaternary:"",circle:"",type:"warning",size:"small",onClick:n=>fe(e.note_id),title:"查看配套笔记"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(k.A)},null,8,["component"])]),_:1},8,["onClick"])):(0,i.Q3)("",!0),!ie.value.official||ie.value.admin?((0,i.uX)(),(0,i.Wv)((0,o.R1)(m.A),{key:1,onPositiveClick:n=>he(e),"negative-text":"取消","positive-text":"确认移除"},{trigger:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(p.Ay),{quaternary:"",circle:"",type:"error",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(u._),{component:(0,o.R1)(w.A)},null,8,["component"])]),_:1})]),default:(0,i.k6)(()=>[(0,i.eW)(' 确定要将 "'+(0,s.v_)(e.word)+'" 移出本词单吗? ',1)]),_:2},1032,["onPositiveClick"])):(0,i.Q3)("",!0)])])]),_:2},1032,["enter","onClick"])),[[r]])),128))]),(0,i.Lk)("div",Q,[re.value?((0,i.uX)(),(0,i.Wv)((0,o.R1)(p.Ay),{key:0,loading:te.value,onClick:pe,secondary:"",round:"",size:"large",class:"w-full md:w-auto px-8"},{default:(0,i.k6)(()=>[...n[6]||(n[6]=[(0,i.eW)(" 加载更多单词 ",-1)])]),_:1},8,["loading"])):oe.value.length>0?((0,i.uX)(),(0,i.CE)("div",Y," 已加载全部 "+(0,s.v_)(oe.value.length)+" 个单词 ",1)):((0,i.uX)(),(0,i.Wv)((0,o.R1)(h.A),{key:2,description:"本词单暂无单词",class:"mt-12"}))])],64)):((0,i.uX)(),(0,i.Wv)((0,o.R1)(h.A),{key:2,description:"未找到词单信息",class:"mt-20"},{extra:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(p.Ay),{onClick:n[1]||(n[1]=n=>e.$router.back())},{default:(0,i.k6)(()=>[...n[7]||(n[7]=[(0,i.eW)("返回上一页",-1)])]),_:1})]),_:1})),(0,i.bF)((0,o.R1)(f.A),{show:ae.value,"onUpdate:show":n[2]||(n[2]=e=>ae.value=e),preset:"card",title:"配套笔记",class:"w-full max-w-2xl note-detail-modal",style:{"max-height":"80vh"}},{default:(0,i.k6)(()=>[ce.value?((0,i.uX)(),(0,i.CE)("div",Z,[(0,i.bF)((0,o.R1)(c.A),{size:"medium"})])):((0,i.uX)(),(0,i.CE)("div",{key:1,class:"markdown-body text-gray-700 dark:text-gray-300 leading-relaxed overflow-y-auto custom-scrollbar",style:{"max-height":"calc(80vh - 100px)","padding-right":"10px"},innerHTML:t(de.value)},null,8,U))]),_:1},8,["show"])])}}},J=t(71241);const ee=(0,J.A)(G,[["__scopeId","data-v-615b21bc"]]);var ne=ee},55200:function(e,n,t){t.d(n,{A:function(){return o}});var i=t(45525); /** * @license lucide-vue-next v0.562.0 - ISC * @@ -24,4 +24,4 @@ const x=(0,g.A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",k * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const o=(0,i.A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},68042:function(e,n,t){t.d(n,{A:function(){return g}});var i=t(55472),o=t(37485),s=t(56768),l=t(90144),r=t(45130),a=t(21905),c=t(79882),d=t(88733),u=t(25216),v=t(34350),p=t(54507),m=t(29895),h=(0,v.c)([(0,v.c)("@keyframes spin-rotate","\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n "),(0,v.cB)("spin-container","\n position: relative;\n ",[(0,v.cB)("spin-body","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n ",[(0,m.v)()])]),(0,v.cB)("spin-body","\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n "),(0,v.cB)("spin","\n display: inline-flex;\n height: var(--n-size);\n width: var(--n-size);\n font-size: var(--n-size);\n color: var(--n-color);\n ",[(0,v.cM)("rotate","\n animation: spin-rotate 2s linear infinite;\n ")]),(0,v.cB)("spin-description","\n display: inline-block;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n margin-top: 8px;\n "),(0,v.cB)("spin-content","\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n pointer-events: all;\n ",[(0,v.cM)("spinning","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: none;\n opacity: var(--n-opacity-spinning);\n ")])]);const f={small:20,medium:18,large:16},y=Object.assign(Object.assign({},c.A.props),{contentClass:String,contentStyle:[Object,String],description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number});var g=(0,s.pM)({name:"Spin",props:y,slots:Object,setup(e){const{mergedClsPrefixRef:n,inlineThemeDisabled:t}=(0,d.Ay)(e),r=(0,c.A)("Spin","-spin",h,p.A,e,n),a=(0,s.EW)(()=>{const{size:n}=e,{common:{cubicBezierEaseInOut:t},self:o}=r.value,{opacitySpinning:s,color:l,textColor:a}=o,c="number"===typeof n?(0,i.Cw)(n):o[(0,v.cF)("size",n)];return{"--n-bezier":t,"--n-opacity-spinning":s,"--n-size":c,"--n-color":l,"--n-text-color":a}}),m=t?(0,u.R)("spin",(0,s.EW)(()=>{const{size:n}=e;return"number"===typeof n?String(n):n[0]}),a,e):void 0,y=(0,o.A)(e,["spinning","show"]),g=(0,l.KR)(!1);return(0,s.nT)(n=>{let t;if(y.value){const{delay:i}=e;if(i)return t=window.setTimeout(()=>{g.value=!0},i),void n(()=>{clearTimeout(t)})}g.value=y.value}),{mergedClsPrefix:n,active:g,mergedStrokeWidth:(0,s.EW)(()=>{const{strokeWidth:n}=e;if(void 0!==n)return n;const{size:t}=e;return f["number"===typeof t?"medium":t]}),cssVars:t?void 0:a,themeClass:null===m||void 0===m?void 0:m.themeClass,onRender:null===m||void 0===m?void 0:m.onRender}},render(){var e,n;const{$slots:t,mergedClsPrefix:i,description:o}=this,l=t.icon&&this.rotate,c=(o||t.description)&&(0,s.h)("div",{class:`${i}-spin-description`},o||(null===(e=t.description)||void 0===e?void 0:e.call(t))),d=t.icon?(0,s.h)("div",{class:[`${i}-spin-body`,this.themeClass]},(0,s.h)("div",{class:[`${i}-spin`,l&&`${i}-spin--rotate`],style:t.default?"":this.cssVars},t.icon()),c):(0,s.h)("div",{class:[`${i}-spin-body`,this.themeClass]},(0,s.h)(a.A,{clsPrefix:i,style:t.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${i}-spin`}),c);return null===(n=this.onRender)||void 0===n||n.call(this),t.default?(0,s.h)("div",{class:[`${i}-spin-container`,this.themeClass],style:this.cssVars},(0,s.h)("div",{class:[`${i}-spin-content`,this.active&&`${i}-spin-content--spinning`,this.contentClass],style:this.contentStyle},t),(0,s.h)(r.eB,{name:"fade-in-transition"},{default:()=>this.active?d:null})):d}})},71168:function(e,n,t){t.d(n,{A:function(){return A}});var i=t(56768),o=t(90144),s=t(79882),l=t(88733),r=t(37901),a=t(86866),c=t(91462),d=t(36921),u=t(29767),v=t(77727);const p=(0,v.D)("n-popconfirm");var m=t(84279),h=t(73921),f=t(82813),y=t(25216),g=t(52126),x=t(25972),k=t(54880);const C={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},b=(0,g.Y)(C);var w=(0,i.pM)({name:"NPopconfirmPanel",props:C,setup(e){const{localeRef:n}=(0,f.A)("Popconfirm"),{inlineThemeDisabled:t}=(0,l.Ay)(),{mergedClsPrefixRef:s,mergedThemeRef:r,props:a}=(0,i.WQ)(p),c=(0,i.EW)(()=>{const{common:{cubicBezierEaseInOut:e},self:{fontSize:n,iconSize:t,iconColor:i}}=r.value;return{"--n-bezier":e,"--n-font-size":n,"--n-icon-size":t,"--n-icon-color":i}}),d=t?(0,y.R)("popconfirm-panel",void 0,c,a):void 0;return Object.assign(Object.assign({},(0,f.A)("Popconfirm")),{mergedClsPrefix:s,cssVars:t?void 0:c,localizedPositiveText:(0,i.EW)(()=>e.positiveText||n.value.positiveText),localizedNegativeText:(0,i.EW)(()=>e.negativeText||n.value.negativeText),positiveButtonProps:(0,o.lW)(a,"positiveButtonProps"),negativeButtonProps:(0,o.lW)(a,"negativeButtonProps"),handlePositiveClick(n){e.onPositiveClick(n)},handleNegativeClick(n){e.onNegativeClick(n)},themeClass:null===d||void 0===d?void 0:d.themeClass,onRender:null===d||void 0===d?void 0:d.onRender})},render(){var e;const{mergedClsPrefix:n,showIcon:t,$slots:o}=this,s=(0,x.Nj)(o.action,()=>null===this.negativeText&&null===this.positiveText?[]:[null!==this.negativeText&&(0,i.h)(k.Ay,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),null!==this.positiveText&&(0,i.h)(k.Ay,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return null===(e=this.onRender)||void 0===e||e.call(this),(0,i.h)("div",{class:[`${n}-popconfirm__panel`,this.themeClass],style:this.cssVars},(0,x.iQ)(o.default,e=>t||e?(0,i.h)("div",{class:`${n}-popconfirm__body`},t?(0,i.h)("div",{class:`${n}-popconfirm__icon`},(0,x.Nj)(o.icon,()=>[(0,i.h)(m.A,{clsPrefix:n},{default:()=>(0,i.h)(h.A,null)})])):null,e):null),s?(0,i.h)("div",{class:[`${n}-popconfirm__action`]},s):null)}}),_=t(34350),z=(0,_.cB)("popconfirm",[(0,_.cE)("body","\n font-size: var(--n-font-size);\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n position: relative;\n ",[(0,_.cE)("icon","\n display: flex;\n font-size: var(--n-icon-size);\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n margin: 0 8px 0 0;\n ")]),(0,_.cE)("action","\n display: flex;\n justify-content: flex-end;\n ",[(0,_.c)("&:not(:first-child)","margin-top: 8px"),(0,_.cB)("button",[(0,_.c)("&:not(:last-child)","margin-right: 8px;")])])]);const R=Object.assign(Object.assign(Object.assign({},s.A.props),d.vY),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:"click"},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function});var A=(0,i.pM)({name:"Popconfirm",props:R,slots:Object,__popover__:!0,setup(e){const{mergedClsPrefixRef:n}=(0,l.Ay)(),t=(0,s.A)("Popconfirm","-popconfirm",z,u.A,e,n),a=(0,o.KR)(null);function c(n){var t;if(!(null===(t=a.value)||void 0===t?void 0:t.getMergedShow()))return;const{onPositiveClick:i,"onUpdate:show":o}=e;Promise.resolve(!i||i(n)).then(e=>{var n;!1!==e&&(null===(n=a.value)||void 0===n||n.setShow(!1),o&&(0,r.T)(o,!1))})}function d(n){var t;if(!(null===(t=a.value)||void 0===t?void 0:t.getMergedShow()))return;const{onNegativeClick:i,"onUpdate:show":o}=e;Promise.resolve(!i||i(n)).then(e=>{var n;!1!==e&&(null===(n=a.value)||void 0===n||n.setShow(!1),o&&(0,r.T)(o,!1))})}(0,i.Gt)(p,{mergedThemeRef:t,mergedClsPrefixRef:n,props:e});const v={setShow(e){var n;null===(n=a.value)||void 0===n||n.setShow(e)},syncPosition(){var e;null===(e=a.value)||void 0===e||e.syncPosition()},mergedTheme:t,popoverInstRef:a,handlePositiveClick:c,handleNegativeClick:d};return v},render(){const{$slots:e,$props:n,mergedTheme:t}=this;return(0,i.h)(d.Ay,Object.assign({},(0,a.c)(n,b),{theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalExtraClass:["popconfirm"],ref:"popoverInstRef"}),{trigger:e.trigger,default:()=>{const t=(0,c.a)(n,b);return(0,i.h)(w,Object.assign({},t,{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}})}}]); -//# sourceMappingURL=924.d5ee35b1.js.map \ No newline at end of file +//# sourceMappingURL=223.2a258d5f.js.map \ No newline at end of file diff --git a/dist/js/416.9258341d.js b/dist/js/416.9258341d.js deleted file mode 100644 index 4629c36..0000000 --- a/dist/js/416.9258341d.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[416],{9845:function(e,n,t){t.d(n,{A:function(){return v}});var i=t(56768),o=t(84279),r=(0,i.pM)({name:"Empty",render(){return(0,i.h)("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),(0,i.h)("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),l=t(79882),s=t(88733),a=t(82813),c=t(25216),d=t(34350),m=t(52945),p=(0,d.cB)("empty","\n display: flex;\n flex-direction: column;\n align-items: center;\n font-size: var(--n-font-size);\n",[(0,d.cE)("icon","\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n line-height: var(--n-icon-size);\n color: var(--n-icon-color);\n transition:\n color .3s var(--n-bezier);\n ",[(0,d.c)("+",[(0,d.cE)("description","\n margin-top: 8px;\n ")])]),(0,d.cE)("description","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),(0,d.cE)("extra","\n text-align: center;\n transition: color .3s var(--n-bezier);\n margin-top: 12px;\n color: var(--n-extra-text-color);\n ")]);const u=Object.assign(Object.assign({},l.A.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function});var v=(0,i.pM)({name:"Empty",props:u,slots:Object,setup(e){const{mergedClsPrefixRef:n,inlineThemeDisabled:t,mergedComponentPropsRef:o}=(0,s.Ay)(e),u=(0,l.A)("Empty","-empty",p,m.A,e,n),{localeRef:v}=(0,a.A)("Empty"),h=(0,i.EW)(()=>{var n,t,i;return null!==(n=e.description)&&void 0!==n?n:null===(i=null===(t=null===o||void 0===o?void 0:o.value)||void 0===t?void 0:t.Empty)||void 0===i?void 0:i.description}),f=(0,i.EW)(()=>{var e,n;return(null===(n=null===(e=null===o||void 0===o?void 0:o.value)||void 0===e?void 0:e.Empty)||void 0===n?void 0:n.renderIcon)||(()=>(0,i.h)(r,null))}),g=(0,i.EW)(()=>{const{size:n}=e,{common:{cubicBezierEaseInOut:t},self:{[(0,d.cF)("iconSize",n)]:i,[(0,d.cF)("fontSize",n)]:o,textColor:r,iconColor:l,extraTextColor:s}}=u.value;return{"--n-icon-size":i,"--n-font-size":o,"--n-bezier":t,"--n-text-color":r,"--n-icon-color":l,"--n-extra-text-color":s}}),y=t?(0,c.R)("empty",(0,i.EW)(()=>{let n="";const{size:t}=e;return n+=t[0],n}),g,e):void 0;return{mergedClsPrefix:n,mergedRenderIcon:f,localizedDescription:(0,i.EW)(()=>h.value||v.value.description),cssVars:t?void 0:g,themeClass:null===y||void 0===y?void 0:y.themeClass,onRender:null===y||void 0===y?void 0:y.onRender}},render(){const{$slots:e,mergedClsPrefix:n,onRender:t}=this;return null===t||void 0===t||t(),(0,i.h)("div",{class:[`${n}-empty`,this.themeClass],style:this.cssVars},this.showIcon?(0,i.h)("div",{class:`${n}-empty__icon`},e.icon?e.icon():(0,i.h)(o.A,{clsPrefix:n},{default:this.mergedRenderIcon})):null,this.showDescription?(0,i.h)("div",{class:`${n}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?(0,i.h)("div",{class:`${n}-empty__extra`},e.extra()):null)}})},27416:function(e,n,t){t.r(n),t.d(n,{default:function(){return le}});t(44114);var i=t(56768),o=t(90144),r=t(24232),l=t(98728),s=t(97387),a=t(59856),c=t(68042),d=t(79882),m=t(88733),p=t(77727),u=t(64075),v=t(96092);function h(e){const{textColor3:n,infoColor:t,errorColor:i,successColor:o,warningColor:r,textColor1:l,textColor2:s,railColor:a,fontWeightStrong:c,fontSize:d}=e;return Object.assign(Object.assign({},v.A),{contentFontSize:d,titleFontWeight:c,circleBorder:`2px solid ${n}`,circleBorderInfo:`2px solid ${t}`,circleBorderError:`2px solid ${i}`,circleBorderSuccess:`2px solid ${o}`,circleBorderWarning:`2px solid ${r}`,iconColor:n,iconColorInfo:t,iconColorError:i,iconColorSuccess:o,iconColorWarning:r,titleTextColor:l,contentTextColor:s,metaTextColor:n,lineColor:a})}const f={name:"Timeline",common:u.A,self:h};var g=f,y=t(34350);const x=1.25;var z=(0,y.cB)("timeline",`\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n line-height: ${x};\n`,[(0,y.cM)("horizontal","\n flex-direction: row;\n ",[(0,y.c)(">",[(0,y.cB)("timeline-item","\n flex-shrink: 0;\n padding-right: 40px;\n ",[(0,y.cM)("dashed-line-type",[(0,y.c)(">",[(0,y.cB)("timeline-item-timeline",[(0,y.cE)("line","\n background-image: linear-gradient(90deg, var(--n-color-start), var(--n-color-start) 50%, transparent 50%, transparent 100%);\n background-size: 10px 1px;\n ")])])]),(0,y.c)(">",[(0,y.cB)("timeline-item-content","\n margin-top: calc(var(--n-icon-size) + 12px);\n ",[(0,y.c)(">",[(0,y.cE)("meta","\n margin-top: 6px;\n margin-bottom: unset;\n ")])]),(0,y.cB)("timeline-item-timeline","\n width: 100%;\n height: calc(var(--n-icon-size) + 12px);\n ",[(0,y.cE)("line","\n left: var(--n-icon-size);\n top: calc(var(--n-icon-size) / 2 - 1px);\n right: 0px;\n width: unset;\n height: 2px;\n ")])])])])]),(0,y.cM)("right-placement",[(0,y.cB)("timeline-item",[(0,y.cB)("timeline-item-content","\n text-align: right;\n margin-right: calc(var(--n-icon-size) + 12px);\n "),(0,y.cB)("timeline-item-timeline","\n width: var(--n-icon-size);\n right: 0;\n ")])]),(0,y.cM)("left-placement",[(0,y.cB)("timeline-item",[(0,y.cB)("timeline-item-content","\n margin-left: calc(var(--n-icon-size) + 12px);\n "),(0,y.cB)("timeline-item-timeline","\n left: 0;\n ")])]),(0,y.cB)("timeline-item","\n position: relative;\n ",[(0,y.c)("&:last-child",[(0,y.cB)("timeline-item-timeline",[(0,y.cE)("line","\n display: none;\n ")]),(0,y.cB)("timeline-item-content",[(0,y.cE)("meta","\n margin-bottom: 0;\n ")])]),(0,y.cB)("timeline-item-content",[(0,y.cE)("title","\n margin: var(--n-title-margin);\n font-size: var(--n-title-font-size);\n transition: color .3s var(--n-bezier);\n font-weight: var(--n-title-font-weight);\n color: var(--n-title-text-color);\n "),(0,y.cE)("content","\n transition: color .3s var(--n-bezier);\n font-size: var(--n-content-font-size);\n color: var(--n-content-text-color);\n "),(0,y.cE)("meta","\n transition: color .3s var(--n-bezier);\n font-size: 12px;\n margin-top: 6px;\n margin-bottom: 20px;\n color: var(--n-meta-text-color);\n ")]),(0,y.cM)("dashed-line-type",[(0,y.cB)("timeline-item-timeline",[(0,y.cE)("line","\n --n-color-start: var(--n-line-color);\n transition: --n-color-start .3s var(--n-bezier);\n background-color: transparent;\n background-image: linear-gradient(180deg, var(--n-color-start), var(--n-color-start) 50%, transparent 50%, transparent 100%);\n background-size: 1px 10px;\n ")])]),(0,y.cB)("timeline-item-timeline",`\n width: calc(var(--n-icon-size) + 12px);\n position: absolute;\n top: calc(var(--n-title-font-size) * ${x} / 2 - var(--n-icon-size) / 2);\n height: 100%;\n `,[(0,y.cE)("circle","\n border: var(--n-circle-border);\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n border-radius: var(--n-icon-size);\n box-sizing: border-box;\n "),(0,y.cE)("icon","\n color: var(--n-icon-color);\n font-size: var(--n-icon-size);\n height: var(--n-icon-size);\n width: var(--n-icon-size);\n display: flex;\n align-items: center;\n justify-content: center;\n "),(0,y.cE)("line","\n transition: background-color .3s var(--n-bezier);\n position: absolute;\n top: var(--n-icon-size);\n left: calc(var(--n-icon-size) / 2 - 1px);\n bottom: 0px;\n width: 2px;\n background-color: var(--n-line-color);\n ")])])]);const b=Object.assign(Object.assign({},d.A.props),{horizontal:Boolean,itemPlacement:{type:String,default:"left"},size:{type:String,default:"medium"},iconSize:Number}),C=(0,p.D)("n-timeline");var k=(0,i.pM)({name:"Timeline",props:b,setup(e,{slots:n}){const{mergedClsPrefixRef:t}=(0,m.Ay)(e),o=(0,d.A)("Timeline","-timeline",z,g,e,t);return(0,i.Gt)(C,{props:e,mergedThemeRef:o,mergedClsPrefixRef:t}),()=>{const{value:o}=t;return(0,i.h)("div",{class:[`${o}-timeline`,e.horizontal&&`${o}-timeline--horizontal`,`${o}-timeline--${e.size}-size`,!e.horizontal&&`${o}-timeline--${e.itemPlacement}-placement`]},n)}}}),w=t(25216),R=t(35268),$=t(87996),_=t(35444),E=t(25972);const S={time:[String,Number],title:String,content:String,color:String,lineType:{type:String,default:"default"},type:{type:String,default:"default"}};var B=(0,i.pM)({name:"TimelineItem",props:S,slots:Object,setup(e){const n=(0,i.WQ)(C);n||(0,R.$8)("timeline-item","`n-timeline-item` must be placed inside `n-timeline`."),(0,$.w)();const{inlineThemeDisabled:t}=(0,m.Ay)(),o=(0,i.EW)(()=>{const{props:{size:t,iconSize:i},mergedThemeRef:o}=n,{type:r}=e,{self:{titleTextColor:l,contentTextColor:s,metaTextColor:a,lineColor:c,titleFontWeight:d,contentFontSize:m,[(0,y.cF)("iconSize",t)]:p,[(0,y.cF)("titleMargin",t)]:u,[(0,y.cF)("titleFontSize",t)]:v,[(0,y.cF)("circleBorder",r)]:h,[(0,y.cF)("iconColor",r)]:f},common:{cubicBezierEaseInOut:g}}=o.value;return{"--n-bezier":g,"--n-circle-border":h,"--n-icon-color":f,"--n-content-font-size":m,"--n-content-text-color":s,"--n-line-color":c,"--n-meta-text-color":a,"--n-title-font-size":v,"--n-title-font-weight":d,"--n-title-margin":u,"--n-title-text-color":l,"--n-icon-size":(0,_.i)(i)||p}}),r=t?(0,w.R)("timeline-item",(0,i.EW)(()=>{const{props:{size:t,iconSize:i}}=n,{type:o}=e;return`${t[0]}${i||"a"}${o[0]}`}),o,n.props):void 0;return{mergedClsPrefix:n.mergedClsPrefixRef,cssVars:t?void 0:o,themeClass:null===r||void 0===r?void 0:r.themeClass,onRender:null===r||void 0===r?void 0:r.onRender}},render(){const{mergedClsPrefix:e,color:n,onRender:t,$slots:o}=this;return null===t||void 0===t||t(),(0,i.h)("div",{class:[`${e}-timeline-item`,this.themeClass,`${e}-timeline-item--${this.type}-type`,`${e}-timeline-item--${this.lineType}-line-type`],style:this.cssVars},(0,i.h)("div",{class:`${e}-timeline-item-timeline`},(0,i.h)("div",{class:`${e}-timeline-item-timeline__line`}),(0,E.iQ)(o.icon,t=>t?(0,i.h)("div",{class:`${e}-timeline-item-timeline__icon`,style:{color:n}},t):(0,i.h)("div",{class:`${e}-timeline-item-timeline__circle`,style:{borderColor:n}}))),(0,i.h)("div",{class:`${e}-timeline-item-content`},(0,E.iQ)(o.header,n=>{const t=n||this.title;return t?(0,i.h)("div",{class:`${e}-timeline-item-content__title`},n||this.title):null}),(0,i.h)("div",{class:`${e}-timeline-item-content__content`},(0,E.Nj)(o.default,()=>[this.content])),(0,i.h)("div",{class:`${e}-timeline-item-content__meta`},(0,E.Nj)(o.footer,()=>[this.time]))))}}),A=t(42517),W=t(92720),L=t(54880),j=t(9845),F=t(26961),M=t(55200),T=t(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */ -const V=(0,T.A)("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);var P=t(91733),O=t(29554),I=t(6127),X=t(35720);const H={class:"page-container max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},D={class:"mb-8 flex items-center justify-between",initial:{opacity:0,y:-20},enter:{opacity:1,y:0,transition:{duration:500}}},N={class:"flex items-center gap-3"},K={class:"p-3 bg-primary/10 rounded-xl dark:bg-primary/20"},Y={key:0,class:"flex justify-center py-12"},Z={key:1},Q={class:"flex items-start justify-between gap-4"},q={class:"flex-1"},G={class:"flex items-center gap-2 mb-2"},J=["onClick"],U={class:"flex items-center gap-2"},ee={class:"flex justify-center mt-8 mb-12"},ne={key:1,class:"text-gray-400 text-sm py-4"},te={key:2,class:"flex flex-col items-center justify-center py-20"};var ie={__name:"LearnRecView",setup(e){const n=(0,l.rd)(),t=(0,s.J)(),d=(0,o.KR)([]),m=(0,o.KR)(1),p=(0,o.KR)(!1),u=(0,o.KR)(!0),v=(0,o.KR)(0),h=e=>(0,I.NR)(e,"YYYY-MM-DD HH:mm:ss").value,f=e=>{const n=["success","info","warning","error"];return n[e%n.length]},g=e=>{const t=n.resolve({path:"/word",query:{word_id:e}});window.open(t.href,"_blank")},y=async(e=!1)=>{if(!p.value){p.value=!0;try{const n=await X.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/learn_record/list",{params:{page:m.value}});if(200===n.data.code||n.data.list){const t=n.data,i=t.list||[],o=t.pagination;e?d.value.push(...i):d.value=i,v.value=o.total_items,m.value>=o.total_pages?u.value=!1:u.value=!0}}catch(n){console.error("获取学习记录失败:",n),t.error("获取学习记录失败,请稍后重试")}finally{p.value=!1}}},x=()=>{u.value&&!p.value&&(m.value++,y(!0))};return(0,i.sV)(()=>{document.title="学习记录 - Word Helper",y()}),(e,n)=>{const t=(0,i.gN)("motion");return(0,i.uX)(),(0,i.CE)("div",H,[(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",D,[(0,i.Lk)("div",N,[(0,i.Lk)("div",K,[(0,i.bF)((0,o.R1)(a._),{size:"24",class:"text-primary"},{default:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(F.A))]),_:1})]),n[1]||(n[1]=(0,i.Lk)("div",null,[(0,i.Lk)("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"学习足迹"),(0,i.Lk)("p",{class:"text-sm text-gray-500 dark:text-gray-400 mt-1"}," 记录你的每一次进步 ")],-1))])])),[[t]]),p.value&&0===d.value.length?((0,i.uX)(),(0,i.CE)("div",Y,[(0,i.bF)((0,o.R1)(c.A),{size:"large"})])):d.value.length>0?((0,i.uX)(),(0,i.CE)("div",Z,[(0,i.bF)((0,o.R1)(k),{size:"large"},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(d.value,(e,l)=>(0,i.bo)(((0,i.uX)(),(0,i.Wv)((0,o.R1)(B),{key:e.id,type:f(l),time:h(e.created_at),initial:{opacity:0,x:-20},enter:{opacity:1,x:0,transition:{duration:300,delay:50*l}}},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(a._),null,{default:(0,i.k6)(()=>[e.dictionary?((0,i.uX)(),(0,i.Wv)((0,o.R1)(M.A),{key:0})):((0,i.uX)(),(0,i.Wv)((0,o.R1)(V),{key:1}))]),_:2},1024)]),default:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(A.Ay),{class:"mb-4 shadow-sm hover:shadow-md transition-shadow duration-300 rounded-xl border-gray-100 dark:border-gray-800",size:"small",bordered:!0},{default:(0,i.k6)(()=>[(0,i.Lk)("div",Q,[(0,i.Lk)("div",q,[(0,i.Lk)("div",G,[(0,i.Lk)("h3",{class:"text-lg font-bold text-gray-900 dark:text-white hover:text-primary cursor-pointer transition-colors",onClick:n=>g(e.word.id)},(0,r.v_)(e.word.content),9,J),(0,i.Lk)("div",U,[e.dictionary?((0,i.uX)(),(0,i.Wv)((0,o.R1)(W.Ay),{key:0,type:"success",size:"small",round:"",class:"flex items-center"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(a._),{component:(0,o.R1)(P.A)},null,8,["component"])]),default:(0,i.k6)(()=>[(0,i.eW)(" 在词书 "+(0,r.v_)(e.dictionary.tag||e.dictionary.name)+" 中学习 ",1)]),_:2},1024)):((0,i.uX)(),(0,i.Wv)((0,o.R1)(W.Ay),{key:1,type:"info",size:"small",round:"",class:"flex items-center"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(a._),{component:(0,o.R1)(O.A)},null,8,["component"])]),default:(0,i.k6)(()=>[n[2]||(n[2]=(0,i.eW)(" 自主学习 ",-1))]),_:1}))])])])])]),_:2},1024)]),_:2},1032,["type","time","enter"])),[[t]])),128))]),_:1}),(0,i.Lk)("div",ee,[u.value?((0,i.uX)(),(0,i.Wv)((0,o.R1)(L.Ay),{key:0,loading:p.value,onClick:x,secondary:"",type:"primary",round:"",size:"large"},{default:(0,i.k6)(()=>[(0,i.eW)((0,r.v_)(p.value?"加载中...":"加载更多记录"),1)]),_:1},8,["loading"])):((0,i.uX)(),(0,i.CE)("div",ne," 没有更多记录了 "))])])):((0,i.uX)(),(0,i.CE)("div",te,[(0,i.bF)((0,o.R1)(j.A),{description:"暂无学习记录"},{extra:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(L.Ay),{type:"primary",onClick:n[0]||(n[0]=n=>e.$router.push("/dict"))},{default:(0,i.k6)(()=>[...n[3]||(n[3]=[(0,i.eW)(" 去开始学习 ",-1)])]),_:1})]),_:1})]))])}}},oe=t(71241);const re=(0,oe.A)(ie,[["__scopeId","data-v-191a7506"]]);var le=re},55200:function(e,n,t){t.d(n,{A:function(){return o}});var i=t(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o=(0,i.A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},68042:function(e,n,t){t.d(n,{A:function(){return y}});var i=t(55472),o=t(37485),r=t(56768),l=t(90144),s=t(45130),a=t(21905),c=t(79882),d=t(88733),m=t(25216),p=t(34350),u=t(54507),v=t(29895),h=(0,p.c)([(0,p.c)("@keyframes spin-rotate","\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n "),(0,p.cB)("spin-container","\n position: relative;\n ",[(0,p.cB)("spin-body","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n ",[(0,v.v)()])]),(0,p.cB)("spin-body","\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n "),(0,p.cB)("spin","\n display: inline-flex;\n height: var(--n-size);\n width: var(--n-size);\n font-size: var(--n-size);\n color: var(--n-color);\n ",[(0,p.cM)("rotate","\n animation: spin-rotate 2s linear infinite;\n ")]),(0,p.cB)("spin-description","\n display: inline-block;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n margin-top: 8px;\n "),(0,p.cB)("spin-content","\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n pointer-events: all;\n ",[(0,p.cM)("spinning","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: none;\n opacity: var(--n-opacity-spinning);\n ")])]);const f={small:20,medium:18,large:16},g=Object.assign(Object.assign({},c.A.props),{contentClass:String,contentStyle:[Object,String],description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number});var y=(0,r.pM)({name:"Spin",props:g,slots:Object,setup(e){const{mergedClsPrefixRef:n,inlineThemeDisabled:t}=(0,d.Ay)(e),s=(0,c.A)("Spin","-spin",h,u.A,e,n),a=(0,r.EW)(()=>{const{size:n}=e,{common:{cubicBezierEaseInOut:t},self:o}=s.value,{opacitySpinning:r,color:l,textColor:a}=o,c="number"===typeof n?(0,i.Cw)(n):o[(0,p.cF)("size",n)];return{"--n-bezier":t,"--n-opacity-spinning":r,"--n-size":c,"--n-color":l,"--n-text-color":a}}),v=t?(0,m.R)("spin",(0,r.EW)(()=>{const{size:n}=e;return"number"===typeof n?String(n):n[0]}),a,e):void 0,g=(0,o.A)(e,["spinning","show"]),y=(0,l.KR)(!1);return(0,r.nT)(n=>{let t;if(g.value){const{delay:i}=e;if(i)return t=window.setTimeout(()=>{y.value=!0},i),void n(()=>{clearTimeout(t)})}y.value=g.value}),{mergedClsPrefix:n,active:y,mergedStrokeWidth:(0,r.EW)(()=>{const{strokeWidth:n}=e;if(void 0!==n)return n;const{size:t}=e;return f["number"===typeof t?"medium":t]}),cssVars:t?void 0:a,themeClass:null===v||void 0===v?void 0:v.themeClass,onRender:null===v||void 0===v?void 0:v.onRender}},render(){var e,n;const{$slots:t,mergedClsPrefix:i,description:o}=this,l=t.icon&&this.rotate,c=(o||t.description)&&(0,r.h)("div",{class:`${i}-spin-description`},o||(null===(e=t.description)||void 0===e?void 0:e.call(t))),d=t.icon?(0,r.h)("div",{class:[`${i}-spin-body`,this.themeClass]},(0,r.h)("div",{class:[`${i}-spin`,l&&`${i}-spin--rotate`],style:t.default?"":this.cssVars},t.icon()),c):(0,r.h)("div",{class:[`${i}-spin-body`,this.themeClass]},(0,r.h)(a.A,{clsPrefix:i,style:t.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${i}-spin`}),c);return null===(n=this.onRender)||void 0===n||n.call(this),t.default?(0,r.h)("div",{class:[`${i}-spin-container`,this.themeClass],style:this.cssVars},(0,r.h)("div",{class:[`${i}-spin-content`,this.active&&`${i}-spin-content--spinning`,this.contentClass],style:this.contentStyle},t),(0,r.h)(s.eB,{name:"fade-in-transition"},{default:()=>this.active?d:null})):d}})},87996:function(e,n,t){t.d(n,{w:function(){return r}});var i=t(62889);let o=!1;function r(){if(i.B&&window.CSS&&!o&&(o=!0,"registerProperty"in(null===window||void 0===window?void 0:window.CSS)))try{CSS.registerProperty({name:"--n-color-start",syntax:"",inherits:!1,initialValue:"#0000"}),CSS.registerProperty({name:"--n-color-end",syntax:"",inherits:!1,initialValue:"#0000"})}catch(e){}}},91733:function(e,n,t){t.d(n,{A:function(){return o}});var i=t(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o=(0,i.A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])}}]); -//# sourceMappingURL=416.9258341d.js.map \ No newline at end of file diff --git a/dist/js/553.3921e97f.js b/dist/js/553.3921e97f.js new file mode 100644 index 0000000..1a0361d --- /dev/null +++ b/dist/js/553.3921e97f.js @@ -0,0 +1,38 @@ +"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[553],{7023:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r=(0,n.A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},19629:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r=(0,n.A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},23553:function(e,t,o){o.r(t),o.d(t,{default:function(){return Ye}});o(44114),o(18111),o(20116),o(61701);var n=o(56768),r=o(90144),a=o(24232),i=o(45130),l=o(98728),s=o(97387),c=o(95802),d=o(19629),u=o(7023),p=o(55727),v=o(96530),h=o(62784),g=o(38307),m=o(54880),f=o(68042),b=o(42517),w=o(71168),y=o(34707),x=o(84279),C=(0,n.pM)({name:"Forward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z",fill:"currentColor"}))}}),k=(0,n.pM)({name:"Backward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z",fill:"currentColor"}))}}),F=(0,n.pM)({name:"FastBackward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"}))))}}),A=(0,n.pM)({name:"FastForward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))}}),z=(0,n.pM)({name:"More",render(){return(0,n.h)("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z"}))))}}),P=o(79882),B=o(88733),M=o(82813),R=o(25216),S=o(38741),I=o(62334);const T={tiny:"mini",small:"tiny",medium:"small",large:"medium",huge:"large"};function _(e){const t=T[e];if(void 0===t)throw new Error(`${e} has no smaller size.`);return t}var j=o(37901),E=o(34350),$=o(25972),L=o(93913),O=o(86866),W=o(91462),N=o(41519),H=o(94035),K=o(36921),U=o(11766),V=o(77727);const D=(0,V.D)("n-popselect");o(7588);var Q=o(11336),X=o(47794),q=o(44650),J=o(52126),Y=o(28828),Z=(0,E.cB)("popselect-menu","\n box-shadow: var(--n-menu-box-shadow);\n");const G={multiple:Boolean,value:{type:[String,Number,Array],default:null},cancelable:Boolean,options:{type:Array,default:()=>[]},size:{type:String,default:"medium"},scrollable:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onMouseenter:Function,onMouseleave:Function,renderLabel:Function,showCheckmark:{type:Boolean,default:void 0},nodeProps:Function,virtualScroll:Boolean,onChange:[Function,Array]},ee=(0,J.Y)(G);var te=(0,n.pM)({name:"PopselectPanel",props:G,setup(e){const t=(0,n.WQ)(D),{mergedClsPrefixRef:o,inlineThemeDisabled:a}=(0,B.Ay)(e),i=(0,P.A)("Popselect","-pop-select",Z,U.A,t.props,o),l=(0,n.EW)(()=>(0,X.G)(e.options,(0,Y.ag)("value","children")));function s(t,o){const{onUpdateValue:n,"onUpdate:value":r,onChange:a}=e;n&&(0,j.T)(n,t,o),r&&(0,j.T)(r,t,o),a&&(0,j.T)(a,t,o)}function c(e){u(e.key)}function d(e){(0,Q.d)(e,"action")||(0,Q.d)(e,"empty")||(0,Q.d)(e,"header")||e.preventDefault()}function u(o){const{value:{getNode:r}}=l;if(e.multiple)if(Array.isArray(e.value)){const t=[],n=[];let a=!0;e.value.forEach(e=>{if(e===o)return void(a=!1);const i=r(e);i&&(t.push(i.key),n.push(i.rawNode))}),a&&(t.push(o),n.push(r(o).rawNode)),s(t,n)}else{const e=r(o);e&&s([o],[e.rawNode])}else if(e.value===o&&e.cancelable)s(null,null);else{const e=r(o);e&&s(o,e.rawNode);const{"onUpdate:show":n,onUpdateShow:a}=t.props;n&&(0,j.T)(n,!1),a&&(0,j.T)(a,!1),t.setShow(!1)}(0,n.dY)(()=>{t.syncPosition()})}(0,n.wB)((0,r.lW)(e,"options"),()=>{(0,n.dY)(()=>{t.syncPosition()})});const p=(0,n.EW)(()=>{const{self:{menuBoxShadow:e}}=i.value;return{"--n-menu-box-shadow":e}}),v=a?(0,R.R)("select",void 0,p,t.props):void 0;return{mergedTheme:t.mergedThemeRef,mergedClsPrefix:o,treeMate:l,handleToggle:c,handleMenuMousedown:d,cssVars:a?void 0:p,themeClass:null===v||void 0===v?void 0:v.themeClass,onRender:null===v||void 0===v?void 0:v.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),(0,n.h)(q.A,{clsPrefix:this.mergedClsPrefix,focusable:!0,nodeProps:this.nodeProps,class:[`${this.mergedClsPrefix}-popselect-menu`,this.themeClass],style:this.cssVars,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,multiple:this.multiple,treeMate:this.treeMate,size:this.size,value:this.value,virtualScroll:this.virtualScroll,scrollable:this.scrollable,renderLabel:this.renderLabel,onToggle:this.handleToggle,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseenter,onMousedown:this.handleMenuMousedown,showCheckmark:this.showCheckmark},{header:()=>{var e,t;return(null===(t=(e=this.$slots).header)||void 0===t?void 0:t.call(e))||[]},action:()=>{var e,t;return(null===(t=(e=this.$slots).action)||void 0===t?void 0:t.call(e))||[]},empty:()=>{var e,t;return(null===(t=(e=this.$slots).empty)||void 0===t?void 0:t.call(e))||[]}})}});const oe=Object.assign(Object.assign(Object.assign(Object.assign({},P.A.props),(0,O.c)(K.vY,["showArrow","arrow"])),{placement:Object.assign(Object.assign({},K.vY.placement),{default:"bottom"}),trigger:{type:String,default:"hover"}}),G);var ne=(0,n.pM)({name:"Popselect",props:oe,slots:Object,inheritAttrs:!1,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=(0,B.Ay)(e),o=(0,P.A)("Popselect","-popselect",void 0,U.A,e,t),a=(0,r.KR)(null);function i(){var e;null===(e=a.value)||void 0===e||e.syncPosition()}function l(e){var t;null===(t=a.value)||void 0===t||t.setShow(e)}(0,n.Gt)(D,{props:e,mergedThemeRef:o,syncPosition:i,setShow:l});const s={syncPosition:i,setShow:l};return Object.assign(Object.assign({},s),{popoverInstRef:a,mergedTheme:o})},render(){const{mergedTheme:e}=this,t={theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:{padding:"0"},ref:"popoverInstRef",internalRenderBody:(e,t,o,r,a)=>{const{$attrs:i}=this;return(0,n.h)(te,Object.assign({},i,{class:[i.class,e],style:[i.style,...o]},(0,W.a)(this.$props,ee),{ref:(0,N.V)(t),onMouseenter:(0,H.u)([r,i.onMouseenter]),onMouseleave:(0,H.u)([a,i.onMouseleave])}),{header:()=>{var e,t;return null===(t=(e=this.$slots).header)||void 0===t?void 0:t.call(e)},action:()=>{var e,t;return null===(t=(e=this.$slots).action)||void 0===t?void 0:t.call(e)},empty:()=>{var e,t;return null===(t=(e=this.$slots).empty)||void 0===t?void 0:t.call(e)}})}};return(0,n.h)(K.Ay,Object.assign({},(0,O.c)(this.$props,ee),t,{internalDeactivateImmediately:!0}),{trigger:()=>{var e,t;return null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)}})}}),re=o(19605),ae=o(37448);const ie="\n background: var(--n-item-color-hover);\n color: var(--n-item-text-color-hover);\n border: var(--n-item-border-hover);\n",le=[(0,E.cM)("button","\n background: var(--n-button-color-hover);\n border: var(--n-button-border-hover);\n color: var(--n-button-icon-color-hover);\n ")];var se=(0,E.cB)("pagination","\n display: flex;\n vertical-align: middle;\n font-size: var(--n-item-font-size);\n flex-wrap: nowrap;\n",[(0,E.cB)("pagination-prefix","\n display: flex;\n align-items: center;\n margin: var(--n-prefix-margin);\n "),(0,E.cB)("pagination-suffix","\n display: flex;\n align-items: center;\n margin: var(--n-suffix-margin);\n "),(0,E.c)("> *:not(:first-child)","\n margin: var(--n-item-margin);\n "),(0,E.cB)("select","\n width: var(--n-select-width);\n "),(0,E.c)("&.transition-disabled",[(0,E.cB)("pagination-item","transition: none!important;")]),(0,E.cB)("pagination-quick-jumper","\n white-space: nowrap;\n display: flex;\n color: var(--n-jumper-text-color);\n transition: color .3s var(--n-bezier);\n align-items: center;\n font-size: var(--n-jumper-font-size);\n ",[(0,E.cB)("input","\n margin: var(--n-input-margin);\n width: var(--n-input-width);\n ")]),(0,E.cB)("pagination-item","\n position: relative;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: var(--n-item-size);\n height: var(--n-item-size);\n padding: var(--n-item-padding);\n background-color: var(--n-item-color);\n color: var(--n-item-text-color);\n border-radius: var(--n-item-border-radius);\n border: var(--n-item-border);\n fill: var(--n-button-icon-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n fill .3s var(--n-bezier);\n ",[(0,E.cM)("button","\n background: var(--n-button-color);\n color: var(--n-button-icon-color);\n border: var(--n-button-border);\n padding: 0;\n ",[(0,E.cB)("base-icon","\n font-size: var(--n-button-icon-size);\n ")]),(0,E.C5)("disabled",[(0,E.cM)("hover",ie,le),(0,E.c)("&:hover",ie,le),(0,E.c)("&:active","\n background: var(--n-item-color-pressed);\n color: var(--n-item-text-color-pressed);\n border: var(--n-item-border-pressed);\n ",[(0,E.cM)("button","\n background: var(--n-button-color-pressed);\n border: var(--n-button-border-pressed);\n color: var(--n-button-icon-color-pressed);\n ")]),(0,E.cM)("active","\n background: var(--n-item-color-active);\n color: var(--n-item-text-color-active);\n border: var(--n-item-border-active);\n ",[(0,E.c)("&:hover","\n background: var(--n-item-color-active-hover);\n ")])]),(0,E.cM)("disabled","\n cursor: not-allowed;\n color: var(--n-item-text-color-disabled);\n ",[(0,E.cM)("active, button","\n background-color: var(--n-item-color-disabled);\n border: var(--n-item-border-disabled);\n ")])]),(0,E.cM)("disabled","\n cursor: not-allowed;\n ",[(0,E.cB)("pagination-quick-jumper","\n color: var(--n-jumper-text-color-disabled);\n ")]),(0,E.cM)("simple","\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n ",[(0,E.cB)("pagination-quick-jumper",[(0,E.cB)("input","\n margin: 0;\n ")])])]);function ce(e){var t;if(!e)return 10;const{defaultPageSize:o}=e;if(void 0!==o)return o;const n=null===(t=e.pageSizes)||void 0===t?void 0:t[0];return"number"===typeof n?n:(null===n||void 0===n?void 0:n.value)||10}function de(e,t,o,n){let r=!1,a=!1,i=1,l=t;if(1===t)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:l,fastBackwardTo:i,items:[{type:"page",label:1,active:1===e,mayBeFastBackward:!1,mayBeFastForward:!1}]};if(2===t)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:l,fastBackwardTo:i,items:[{type:"page",label:1,active:1===e,mayBeFastBackward:!1,mayBeFastForward:!1},{type:"page",label:2,active:2===e,mayBeFastBackward:!0,mayBeFastForward:!1}]};const s=1,c=t;let d=e,u=e;const p=(o-5)/2;u+=Math.ceil(p),u=Math.min(Math.max(u,s+o-3),c-2),d-=Math.floor(p),d=Math.max(Math.min(d,c-o+3),s+2);let v=!1,h=!1;d>s+2&&(v=!0),u=s+1&&g.push({type:"page",label:s+1,mayBeFastBackward:!0,mayBeFastForward:!1,active:e===s+1});for(let m=d;m<=u;++m)g.push({type:"page",label:m,mayBeFastBackward:!1,mayBeFastForward:!1,active:e===m});return h?(a=!0,l=u+1,g.push({type:"fast-forward",active:!1,label:void 0,options:n?ue(u+1,c-1):null})):u===c-2&&g[g.length-1].label!==c-1&&g.push({type:"page",mayBeFastForward:!0,mayBeFastBackward:!1,label:c-1,active:e===c-1}),g[g.length-1].label!==c&&g.push({type:"page",mayBeFastForward:!1,mayBeFastBackward:!1,label:c,active:e===c}),{hasFastBackward:r,hasFastForward:a,fastBackwardTo:i,fastForwardTo:l,items:g}}function ue(e,t){const o=[];for(let n=e;n<=t;++n)o.push({label:`${n}`,value:n});return o}const pe=Object.assign(Object.assign({},P.A.props),{simple:Boolean,page:Number,defaultPage:{type:Number,default:1},itemCount:Number,pageCount:Number,defaultPageCount:{type:Number,default:1},showSizePicker:Boolean,pageSize:Number,defaultPageSize:Number,pageSizes:{type:Array,default(){return[10]}},showQuickJumper:Boolean,size:{type:String,default:"medium"},disabled:Boolean,pageSlot:{type:Number,default:9},selectProps:Object,prev:Function,next:Function,goto:Function,prefix:Function,suffix:Function,label:Function,displayOrder:{type:Array,default:["pages","size-picker","quick-jumper"]},to:I.$.propTo,showQuickJumpDropdown:{type:Boolean,default:!0},"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],onPageSizeChange:[Function,Array],onChange:[Function,Array]});var ve=(0,n.pM)({name:"Pagination",props:pe,slots:Object,setup(e){const{mergedComponentPropsRef:t,mergedClsPrefixRef:o,inlineThemeDisabled:a,mergedRtlRef:i}=(0,B.Ay)(e),l=(0,P.A)("Pagination","-pagination",se,ae.A,e,o),{localeRef:s}=(0,M.A)("Pagination"),c=(0,r.KR)(null),d=(0,r.KR)(e.defaultPage),u=(0,r.KR)(ce(e)),p=(0,y.A)((0,r.lW)(e,"page"),d),v=(0,y.A)((0,r.lW)(e,"pageSize"),u),h=(0,n.EW)(()=>{const{itemCount:t}=e;if(void 0!==t)return Math.max(1,Math.ceil(t/v.value));const{pageCount:o}=e;return void 0!==o?Math.max(o,1):1}),g=(0,r.KR)("");(0,n.nT)(()=>{e.simple,g.value=String(p.value)});const m=(0,r.KR)(!1),f=(0,r.KR)(!1),b=(0,r.KR)(!1),w=(0,r.KR)(!1),x=()=>{e.disabled||(m.value=!0,H())},C=()=>{e.disabled||(m.value=!1,H())},k=()=>{f.value=!0,H()},F=()=>{f.value=!1,H()},A=e=>{K(e)},z=(0,n.EW)(()=>de(p.value,h.value,e.pageSlot,e.showQuickJumpDropdown));(0,n.nT)(()=>{z.value.hasFastBackward?z.value.hasFastForward||(m.value=!1,b.value=!1):(f.value=!1,w.value=!1)});const I=(0,n.EW)(()=>{const t=s.value.selectionSuffix;return e.pageSizes.map(e=>"number"===typeof e?{label:`${e} / ${t}`,value:e}:e)}),T=(0,n.EW)(()=>{var o,n;return(null===(n=null===(o=null===t||void 0===t?void 0:t.value)||void 0===o?void 0:o.Pagination)||void 0===n?void 0:n.inputSize)||_(e.size)}),$=(0,n.EW)(()=>{var o,n;return(null===(n=null===(o=null===t||void 0===t?void 0:t.value)||void 0===o?void 0:o.Pagination)||void 0===n?void 0:n.selectSize)||_(e.size)}),L=(0,n.EW)(()=>(p.value-1)*v.value),O=(0,n.EW)(()=>{const t=p.value*v.value-1,{itemCount:o}=e;return void 0!==o&&t>o-1?o-1:t}),W=(0,n.EW)(()=>{const{itemCount:t}=e;return void 0!==t?t:(e.pageCount||1)*v.value}),N=(0,S.I)("Pagination",i,o);function H(){(0,n.dY)(()=>{var e;const{value:t}=c;t&&(t.classList.add("transition-disabled"),null===(e=c.value)||void 0===e||e.offsetWidth,t.classList.remove("transition-disabled"))})}function K(t){if(t===p.value)return;const{"onUpdate:page":o,onUpdatePage:n,onChange:r,simple:a}=e;o&&(0,j.T)(o,t),n&&(0,j.T)(n,t),r&&(0,j.T)(r,t),d.value=t,a&&(g.value=String(t))}function U(t){if(t===v.value)return;const{"onUpdate:pageSize":o,onUpdatePageSize:n,onPageSizeChange:r}=e;o&&(0,j.T)(o,t),n&&(0,j.T)(n,t),r&&(0,j.T)(r,t),u.value=t,h.value{p.value,v.value,H()});const ee=(0,n.EW)(()=>{const{size:t}=e,{self:{buttonBorder:o,buttonBorderHover:n,buttonBorderPressed:r,buttonIconColor:a,buttonIconColorHover:i,buttonIconColorPressed:s,itemTextColor:c,itemTextColorHover:d,itemTextColorPressed:u,itemTextColorActive:p,itemTextColorDisabled:v,itemColor:h,itemColorHover:g,itemColorPressed:m,itemColorActive:f,itemColorActiveHover:b,itemColorDisabled:w,itemBorder:y,itemBorderHover:x,itemBorderPressed:C,itemBorderActive:k,itemBorderDisabled:F,itemBorderRadius:A,jumperTextColor:z,jumperTextColorDisabled:P,buttonColor:B,buttonColorHover:M,buttonColorPressed:R,[(0,E.cF)("itemPadding",t)]:S,[(0,E.cF)("itemMargin",t)]:I,[(0,E.cF)("inputWidth",t)]:T,[(0,E.cF)("selectWidth",t)]:_,[(0,E.cF)("inputMargin",t)]:j,[(0,E.cF)("selectMargin",t)]:$,[(0,E.cF)("jumperFontSize",t)]:L,[(0,E.cF)("prefixMargin",t)]:O,[(0,E.cF)("suffixMargin",t)]:W,[(0,E.cF)("itemSize",t)]:N,[(0,E.cF)("buttonIconSize",t)]:H,[(0,E.cF)("itemFontSize",t)]:K,[`${(0,E.cF)("itemMargin",t)}Rtl`]:U,[`${(0,E.cF)("inputMargin",t)}Rtl`]:V},common:{cubicBezierEaseInOut:D}}=l.value;return{"--n-prefix-margin":O,"--n-suffix-margin":W,"--n-item-font-size":K,"--n-select-width":_,"--n-select-margin":$,"--n-input-width":T,"--n-input-margin":j,"--n-input-margin-rtl":V,"--n-item-size":N,"--n-item-text-color":c,"--n-item-text-color-disabled":v,"--n-item-text-color-hover":d,"--n-item-text-color-active":p,"--n-item-text-color-pressed":u,"--n-item-color":h,"--n-item-color-hover":g,"--n-item-color-disabled":w,"--n-item-color-active":f,"--n-item-color-active-hover":b,"--n-item-color-pressed":m,"--n-item-border":y,"--n-item-border-hover":x,"--n-item-border-disabled":F,"--n-item-border-active":k,"--n-item-border-pressed":C,"--n-item-padding":S,"--n-item-border-radius":A,"--n-bezier":D,"--n-jumper-font-size":L,"--n-jumper-text-color":z,"--n-jumper-text-color-disabled":P,"--n-item-margin":I,"--n-item-margin-rtl":U,"--n-button-icon-size":H,"--n-button-icon-color":a,"--n-button-icon-color-hover":i,"--n-button-icon-color-pressed":s,"--n-button-color-hover":M,"--n-button-color":B,"--n-button-color-pressed":R,"--n-button-border":o,"--n-button-border-hover":n,"--n-button-border-pressed":r}}),te=a?(0,R.R)("pagination",(0,n.EW)(()=>{let t="";const{size:o}=e;return t+=o[0],t}),ee,e):void 0;return{rtlEnabled:N,mergedClsPrefix:o,locale:s,selfRef:c,mergedPage:p,pageItems:(0,n.EW)(()=>z.value.items),mergedItemCount:W,jumperValue:g,pageSizeOptions:I,mergedPageSize:v,inputSize:T,selectSize:$,mergedTheme:l,mergedPageCount:h,startIndex:L,endIndex:O,showFastForwardMenu:b,showFastBackwardMenu:w,fastForwardActive:m,fastBackwardActive:f,handleMenuSelect:A,handleFastForwardMouseenter:x,handleFastForwardMouseleave:C,handleFastBackwardMouseenter:k,handleFastBackwardMouseleave:F,handleJumperInput:G,handleBackwardClick:D,handleForwardClick:V,handlePageItemClick:Z,handleSizePickerChange:q,handleQuickJumperChange:Y,cssVars:a?void 0:ee,themeClass:null===te||void 0===te?void 0:te.themeClass,onRender:null===te||void 0===te?void 0:te.onRender}},render(){const{$slots:e,mergedClsPrefix:t,disabled:o,cssVars:r,mergedPage:a,mergedPageCount:i,pageItems:l,showSizePicker:s,showQuickJumper:c,mergedTheme:d,locale:u,inputSize:p,selectSize:v,mergedPageSize:h,pageSizeOptions:g,jumperValue:m,simple:f,prev:b,next:w,prefix:y,suffix:P,label:B,goto:M,handleJumperInput:R,handleSizePickerChange:S,handleBackwardClick:I,handlePageItemClick:T,handleForwardClick:_,handleQuickJumperChange:j,onRender:E}=this;null===E||void 0===E||E();const O=y||e.prefix,W=P||e.suffix,N=b||e.prev,H=w||e.next,K=B||e.label;return(0,n.h)("div",{ref:"selfRef",class:[`${t}-pagination`,this.themeClass,this.rtlEnabled&&`${t}-pagination--rtl`,o&&`${t}-pagination--disabled`,f&&`${t}-pagination--simple`],style:r},O?(0,n.h)("div",{class:`${t}-pagination-prefix`},O({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null,this.displayOrder.map(e=>{switch(e){case"pages":return(0,n.h)(n.FK,null,(0,n.h)("div",{class:[`${t}-pagination-item`,!N&&`${t}-pagination-item--button`,(a<=1||a>i||o)&&`${t}-pagination-item--disabled`],onClick:I},N?N({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(C,null):(0,n.h)(k,null)})),f?(0,n.h)(n.FK,null,(0,n.h)("div",{class:`${t}-pagination-quick-jumper`},(0,n.h)(L.A,{value:m,onUpdateValue:R,size:p,placeholder:"",disabled:o,theme:d.peers.Input,themeOverrides:d.peerOverrides.Input,onChange:j}))," /"," ",i):l.map((e,r)=>{let a,i,l;const{type:s}=e;switch(s){case"page":const o=e.label;a=K?K({type:"page",node:o,active:e.active}):o;break;case"fast-forward":const r=this.fastForwardActive?(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(F,null):(0,n.h)(A,null)}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>(0,n.h)(z,null)});a=K?K({type:"fast-forward",node:r,active:this.fastForwardActive||this.showFastForwardMenu}):r,i=this.handleFastForwardMouseenter,l=this.handleFastForwardMouseleave;break;case"fast-backward":const s=this.fastBackwardActive?(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(A,null):(0,n.h)(F,null)}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>(0,n.h)(z,null)});a=K?K({type:"fast-backward",node:s,active:this.fastBackwardActive||this.showFastBackwardMenu}):s,i=this.handleFastBackwardMouseenter,l=this.handleFastBackwardMouseleave;break}const c=(0,n.h)("div",{key:r,class:[`${t}-pagination-item`,e.active&&`${t}-pagination-item--active`,"page"!==s&&("fast-backward"===s&&this.showFastBackwardMenu||"fast-forward"===s&&this.showFastForwardMenu)&&`${t}-pagination-item--hover`,o&&`${t}-pagination-item--disabled`,"page"===s&&`${t}-pagination-item--clickable`],onClick:()=>{T(e)},onMouseenter:i,onMouseleave:l},a);if("page"!==s||e.mayBeFastBackward||e.mayBeFastForward){const t="page"===e.type?e.mayBeFastBackward?"fast-backward":"fast-forward":e.type;return"page"===e.type||e.options?(0,n.h)(ne,{to:this.to,key:t,disabled:o,trigger:"hover",virtualScroll:!0,style:{width:"60px"},theme:d.peers.Popselect,themeOverrides:d.peerOverrides.Popselect,builtinThemeOverrides:{peers:{InternalSelectMenu:{height:"calc(var(--n-option-height) * 4.6)"}}},nodeProps:()=>({style:{justifyContent:"center"}}),show:"page"!==s&&("fast-backward"===s?this.showFastBackwardMenu:this.showFastForwardMenu),onUpdateShow:e=>{"page"!==s&&(e?"fast-backward"===s?this.showFastBackwardMenu=e:this.showFastForwardMenu=e:(this.showFastBackwardMenu=!1,this.showFastForwardMenu=!1))},options:"page"!==e.type&&e.options?e.options:[],onUpdateValue:this.handleMenuSelect,scrollable:!0,showCheckmark:!1},{default:()=>c}):c}return c}),(0,n.h)("div",{class:[`${t}-pagination-item`,!H&&`${t}-pagination-item--button`,{[`${t}-pagination-item--disabled`]:a<1||a>=i||o}],onClick:_},H?H({page:a,pageSize:h,pageCount:i,itemCount:this.mergedItemCount,startIndex:this.startIndex,endIndex:this.endIndex}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(k,null):(0,n.h)(C,null)})));case"size-picker":return!f&&s?(0,n.h)(re.A,Object.assign({consistentMenuWidth:!1,placeholder:"",showCheckmark:!1,to:this.to},this.selectProps,{size:v,options:g,value:h,disabled:o,theme:d.peers.Select,themeOverrides:d.peerOverrides.Select,onUpdateValue:S})):null;case"quick-jumper":return!f&&c?(0,n.h)("div",{class:`${t}-pagination-quick-jumper`},M?M():(0,$.Nj)(this.$slots.goto,()=>[u.goto]),(0,n.h)(L.A,{value:m,onUpdateValue:R,size:p,placeholder:"",disabled:o,theme:d.peers.Input,themeOverrides:d.peerOverrides.Input,onChange:j})):null;default:return null}}),W?(0,n.h)("div",{class:`${t}-pagination-suffix`},W({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null)}}),he=o(48129),ge=o(64498),me=o(35720);const fe={class:"note-mng-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},be={class:"mb-8 flex items-center justify-between",initial:{opacity:0,y:-20},enter:{opacity:1,y:0,transition:{duration:500}}},we={class:"flex items-center gap-3"},ye={class:"p-3 bg-primary/10 rounded-xl"},xe={class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},Ce={key:0,class:"flex justify-center py-12"},ke={key:1},Fe={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},Ae=["enter"],ze=["onClick"],Pe={class:"flex items-center justify-between mb-2"},Be={class:"text-xl font-bold text-gray-900 dark:text-white group-hover:text-primary transition-colors"},Me={class:"flex items-center gap-2 text-xs text-gray-400"},Re={key:0},Se={key:0,class:"text-sm text-gray-600 dark:text-gray-300 line-clamp-1"},Ie={class:"font-mono text-xs opacity-70"},Te={class:"flex-grow bg-yellow-50/50 dark:bg-yellow-900/5 rounded-lg p-3 mb-4"},_e={class:"text-gray-700 dark:text-gray-300 whitespace-pre-wrap text-sm leading-relaxed"},je={class:"flex items-center justify-between pt-2 mt-auto border-t border-gray-100 dark:border-gray-700/50"},Ee={class:"text-xs text-gray-400 flex items-center gap-1"},$e={class:"flex items-center gap-2 opacity-100 sm:opacity-0 group-hover:opacity-100 transition-opacity"},Le={class:"flex justify-center mt-12 mb-8"},Oe={key:2,class:"flex flex-col items-center justify-center py-20 text-center"},We={class:"bg-gray-100 dark:bg-gray-800 p-6 rounded-full mb-4"},Ne={class:"mb-4"},He={class:"text-lg font-bold text-gray-900 dark:text-white mb-1"},Ke={class:"text-sm text-gray-500"},Ue={key:0},Ve={class:"flex justify-end gap-2"},De={class:"space-y-4"},Qe={class:"flex justify-end gap-2"};var Xe={__name:"NoteMngView",setup(e){const t=(0,l.rd)(),o=(0,s.J)(),y=(0,r.KR)(!1),x=(0,r.KR)([]),C=(0,r.KR)(0),k=(0,r.KR)(1),F=(0,r.KR)(1),A=(0,r.KR)(9),z=(0,r.KR)(!1),P=(0,r.KR)(!1),B=(0,r.KR)(null),M=(0,r.KR)({content:""}),R=(0,r.KR)(!1),S=(0,r.KR)(!1),I=(0,r.KR)({word_id:null,content:""}),T=(0,r.KR)([]),_=(0,r.KR)(!1),j=async(e=1)=>{y.value=!0;try{const t=await me.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/note/list",{params:{page:e,limit:A.value}}),o=t.data;x.value=o.list||[],o.pagination&&(C.value=o.pagination.total_items,k.value=o.pagination.total_pages,F.value=o.pagination.current_page)}catch(t){console.error("Fetch notes failed:",t),o.error("获取笔记列表失败")}finally{y.value=!1}},E=e=>{j(e),window.scrollTo({top:0,behavior:"smooth"})},$=e=>{const o=t.resolve({name:"word-detail",query:{word_id:e}});window.open(o.href,"_blank")},O=e=>{B.value=e,M.value.content=e.content,z.value=!0},W=async()=>{if(M.value.content.trim()){P.value=!0;try{const e={word_id:B.value.word_id,content:M.value.content,note_id:B.value.id},t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/note",e);o.success(t.data.message||"保存成功"),z.value=!1;const n=x.value.find(e=>e.id===B.value.id);n&&(n.content=M.value.content,n.updated_at=(new Date).toISOString())}catch(e){console.error("Save note failed:",e),o.error("保存笔记失败")}finally{P.value=!1}}else o.warning("笔记内容不能为空")},N=async e=>{try{const t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/del_note",{note_id:e});o.success(t.data.message||"删除成功"),1===x.value.length&&F.value>1?j(F.value-1):j(F.value)}catch(t){console.error("Delete note failed:",t),o.error("删除笔记失败")}},H=()=>{I.value={word_id:null,content:""},T.value=[],R.value=!0},K=async e=>{if(e){_.value=!0;try{const t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/search",{keyword:e,page:1,limit:5}),o=t.data;T.value=(o.list||[]).map(e=>({label:e.word,value:e.id}))}catch(t){console.error("Search failed:",t)}finally{_.value=!1}}else T.value=[]},U=async()=>{if(I.value.word_id)if(I.value.content.trim()){S.value=!0;try{const e={word_id:I.value.word_id,content:I.value.content},t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/note",e);o.success(t.data.message||"添加成功"),R.value=!1,j(1)}catch(e){console.error("Add note failed:",e),o.error("添加笔记失败")}finally{S.value=!1}}else o.warning("笔记内容不能为空");else o.warning("请选择一个单词")};return(0,n.sV)(()=>{document.title="我的笔记 - Word Helper",j()}),(e,t)=>{const o=(0,n.gN)("motion");return(0,n.uX)(),(0,n.CE)("div",fe,[(0,n.bo)(((0,n.uX)(),(0,n.CE)("div",be,[(0,n.Lk)("div",we,[(0,n.Lk)("div",ye,[(0,n.bF)((0,r.R1)(c.A),{class:"w-6 h-6 text-primary"})]),(0,n.Lk)("div",null,[t[10]||(t[10]=(0,n.Lk)("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"我的笔记",-1)),(0,n.Lk)("p",xe," 共 "+(0,a.v_)(C.value)+" 条笔记 ",1)])]),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",onClick:H},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(d.A),{class:"w-4 h-4"})]),default:(0,n.k6)(()=>[t[11]||(t[11]=(0,n.eW)(" 快速添加 ",-1))]),_:1})])),[[o]]),y.value&&0===x.value.length?((0,n.uX)(),(0,n.CE)("div",Ce,[(0,n.bF)((0,r.R1)(f.A),{size:"large"})])):x.value.length>0?((0,n.uX)(),(0,n.CE)("div",ke,[(0,n.Lk)("div",Fe,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(x.value,(e,l)=>(0,n.bo)(((0,n.uX)(),(0,n.CE)("div",{key:e.id,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:l%A.value*50}},class:"group relative flex flex-col h-full"},[(0,n.bF)((0,r.R1)(b.Ay),{class:"h-full rounded-xl shadow-sm hover:shadow-md transition-all duration-300 dark:bg-gray-800 border-l-4 border-l-primary",bordered:!1,"content-style":"display: flex; flex-direction: column; height: 100%;"},{default:(0,n.k6)(()=>[(0,n.Lk)("div",{class:"mb-4 cursor-pointer",onClick:t=>$(e.word_id)},[(0,n.Lk)("div",Pe,[(0,n.Lk)("h3",Be,(0,a.v_)(e.word),1),(0,n.Lk)("div",Me,[e.us_accent?((0,n.uX)(),(0,n.CE)("span",Re,"美 ["+(0,a.v_)(e.us_accent)+"]",1)):(0,n.Q3)("",!0),(0,n.bF)((0,r.R1)(u.A),{class:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity"})])]),e.translations&&e.translations.length>0?((0,n.uX)(),(0,n.CE)("div",Se,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.translations.slice(0,2),(e,t)=>((0,n.uX)(),(0,n.CE)("span",{key:t,class:"mr-2"},[(0,n.Lk)("span",Ie,(0,a.v_)(e.pos),1),(0,n.eW)(" "+(0,a.v_)(e.meaning),1)]))),128))])):(0,n.Q3)("",!0)],8,ze),(0,n.Lk)("div",Te,[(0,n.Lk)("p",_e,(0,a.v_)(e.content),1)]),(0,n.Lk)("div",je,[(0,n.Lk)("div",Ee,[(0,n.bF)((0,r.R1)(p.A),{class:"w-3 h-3"}),(0,n.eW)(" "+(0,a.v_)(new Date(e.updated_at).toLocaleDateString()),1)]),(0,n.Lk)("div",$e,[(0,n.bF)((0,r.R1)(m.Ay),{size:"tiny",secondary:"",circle:"",type:"primary",onClick:(0,i.D$)(t=>O(e),["stop"])},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(v.A),{class:"w-3 h-3"})]),_:1},8,["onClick"]),(0,n.bF)((0,r.R1)(w.A),{onPositiveClick:t=>N(e.id)},{trigger:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(m.Ay),{size:"tiny",secondary:"",circle:"",type:"error",onClick:t[0]||(t[0]=(0,i.D$)(()=>{},["stop"]))},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(h.A),{class:"w-3 h-3"})]),_:1})]),default:(0,n.k6)(()=>[t[12]||(t[12]=(0,n.eW)(" 确定要删除这条笔记吗? ",-1))]),_:1},8,["onPositiveClick"])])])]),_:2},1024)],8,Ae)),[[o]])),128))]),(0,n.Lk)("div",Le,[(0,n.bF)((0,r.R1)(ve),{page:F.value,"onUpdate:page":[t[1]||(t[1]=e=>F.value=e),E],"page-count":k.value,"page-size":A.value},null,8,["page","page-count","page-size"])])])):((0,n.uX)(),(0,n.CE)("div",Oe,[(0,n.Lk)("div",We,[(0,n.bF)((0,r.R1)(g.A),{class:"w-12 h-12 text-gray-400"})]),t[14]||(t[14]=(0,n.Lk)("h3",{class:"text-lg font-medium text-gray-900 dark:text-white mb-2"},"还没有笔记",-1)),t[15]||(t[15]=(0,n.Lk)("p",{class:"text-gray-500 mb-3 dark:text-gray-400 max-w-sm"}," 随时记录你的心得体会和助记方法 ",-1)),(0,n.bF)((0,r.R1)(m.Ay),{class:"mt-6",type:"primary",onClick:t[2]||(t[2]=t=>e.$router.push("/dict"))},{default:(0,n.k6)(()=>[...t[13]||(t[13]=[(0,n.eW)(" 去学习 ",-1)])]),_:1})])),(0,n.bF)((0,r.R1)(he.A),{show:z.value,"onUpdate:show":t[5]||(t[5]=e=>z.value=e),preset:"card",title:"编辑笔记",class:"w-full max-w-lg"},{footer:(0,n.k6)(()=>[(0,n.Lk)("div",Ve,[(0,n.bF)((0,r.R1)(m.Ay),{onClick:t[4]||(t[4]=e=>z.value=!1)},{default:(0,n.k6)(()=>[...t[16]||(t[16]=[(0,n.eW)("取消",-1)])]),_:1}),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",loading:P.value,onClick:W},{default:(0,n.k6)(()=>[...t[17]||(t[17]=[(0,n.eW)("保存",-1)])]),_:1},8,["loading"])])]),default:(0,n.k6)(()=>[(0,n.Lk)("div",Ne,[(0,n.Lk)("div",He,(0,a.v_)(B.value?.word),1),(0,n.Lk)("div",Ke,[B.value?.translations&&B.value.translations.length>0?((0,n.uX)(),(0,n.CE)("span",Ue,(0,a.v_)(B.value.translations[0].meaning),1)):(0,n.Q3)("",!0)])]),(0,n.bF)((0,r.R1)(L.A),{value:M.value.content,"onUpdate:value":t[3]||(t[3]=e=>M.value.content=e),type:"textarea",placeholder:"记录你的学习心得...",autosize:{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["show"]),(0,n.bF)((0,r.R1)(he.A),{show:R.value,"onUpdate:show":t[9]||(t[9]=e=>R.value=e),preset:"card",title:"快速添加笔记",class:"w-full max-w-lg"},{footer:(0,n.k6)(()=>[(0,n.Lk)("div",Qe,[(0,n.bF)((0,r.R1)(m.Ay),{onClick:t[8]||(t[8]=e=>R.value=!1)},{default:(0,n.k6)(()=>[...t[21]||(t[21]=[(0,n.eW)("取消",-1)])]),_:1}),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",loading:S.value,onClick:U},{default:(0,n.k6)(()=>[...t[22]||(t[22]=[(0,n.eW)("保存",-1)])]),_:1},8,["loading"])])]),default:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(ge.A),{type:"warning",class:"mb-6","show-icon":""},{default:(0,n.k6)(()=>[...t[18]||(t[18]=[(0,n.eW)(" 如果此单词下已有笔记,此处输入的内容将替换原笔记内容,原笔记内容不会保存。 ",-1)])]),_:1}),(0,n.Lk)("div",De,[(0,n.Lk)("div",null,[t[19]||(t[19]=(0,n.Lk)("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"选择单词",-1)),(0,n.bF)((0,r.R1)(re.A),{value:I.value.word_id,"onUpdate:value":t[6]||(t[6]=e=>I.value.word_id=e),filterable:"",remote:"",placeholder:"输入单词搜索...",options:T.value,loading:_.value,onSearch:K,clearable:""},null,8,["value","options","loading"])]),(0,n.Lk)("div",null,[t[20]||(t[20]=(0,n.Lk)("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"笔记内容",-1)),(0,n.bF)((0,r.R1)(L.A),{value:I.value.content,"onUpdate:value":t[7]||(t[7]=e=>I.value.content=e),type:"textarea",placeholder:"记录你的学习心得...",autosize:{minRows:4,maxRows:8}},null,8,["value"])])])]),_:1},8,["show"])])}}},qe=o(71241);const Je=(0,qe.A)(Xe,[["__scopeId","data-v-7e4a47f6"]]);var Ye=Je},38307:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r=(0,n.A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},55727:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r=(0,n.A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},62784:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r=(0,n.A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},64498:function(e,t,o){o.d(t,{A:function(){return B}});var n=o(55472),r=o(56768),a=o(90144),i=o(55405),l=o(81260),s=o(84279),c=o(4660),d=o(31603),u=o(73921),p=o(98351),v=o(79882),h=o(88733),g=o(25216),m=o(38741),f=o(34350),b=o(25972),w=o(13707),y=o(64075),x=o(98659);function C(e){const{lineHeight:t,borderRadius:o,fontWeightStrong:n,baseColor:r,dividerColor:a,actionColor:i,textColor1:l,textColor2:s,closeColorHover:c,closeColorPressed:d,closeIconColor:u,closeIconColorHover:p,closeIconColorPressed:v,infoColor:h,successColor:g,warningColor:m,errorColor:f,fontSize:b}=e;return Object.assign(Object.assign({},x.A),{fontSize:b,lineHeight:t,titleFontWeight:n,borderRadius:o,border:`1px solid ${a}`,color:i,titleTextColor:l,iconColor:s,contentTextColor:s,closeBorderRadius:o,closeColorHover:c,closeColorPressed:d,closeIconColor:u,closeIconColorHover:p,closeIconColorPressed:v,borderInfo:`1px solid ${(0,w.sN)(r,(0,w.QX)(h,{alpha:.25}))}`,colorInfo:(0,w.sN)(r,(0,w.QX)(h,{alpha:.08})),titleTextColorInfo:l,iconColorInfo:h,contentTextColorInfo:s,closeColorHoverInfo:c,closeColorPressedInfo:d,closeIconColorInfo:u,closeIconColorHoverInfo:p,closeIconColorPressedInfo:v,borderSuccess:`1px solid ${(0,w.sN)(r,(0,w.QX)(g,{alpha:.25}))}`,colorSuccess:(0,w.sN)(r,(0,w.QX)(g,{alpha:.08})),titleTextColorSuccess:l,iconColorSuccess:g,contentTextColorSuccess:s,closeColorHoverSuccess:c,closeColorPressedSuccess:d,closeIconColorSuccess:u,closeIconColorHoverSuccess:p,closeIconColorPressedSuccess:v,borderWarning:`1px solid ${(0,w.sN)(r,(0,w.QX)(m,{alpha:.33}))}`,colorWarning:(0,w.sN)(r,(0,w.QX)(m,{alpha:.08})),titleTextColorWarning:l,iconColorWarning:m,contentTextColorWarning:s,closeColorHoverWarning:c,closeColorPressedWarning:d,closeIconColorWarning:u,closeIconColorHoverWarning:p,closeIconColorPressedWarning:v,borderError:`1px solid ${(0,w.sN)(r,(0,w.QX)(f,{alpha:.25}))}`,colorError:(0,w.sN)(r,(0,w.QX)(f,{alpha:.08})),titleTextColorError:l,iconColorError:f,contentTextColorError:s,closeColorHoverError:c,closeColorPressedError:d,closeIconColorError:u,closeIconColorHoverError:p,closeIconColorPressedError:v})}const k={name:"Alert",common:y.A,self:C};var F=k,A=o(92548),z=(0,f.cB)("alert","\n line-height: var(--n-line-height);\n border-radius: var(--n-border-radius);\n position: relative;\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-color);\n text-align: start;\n word-break: break-word;\n",[(0,f.cE)("border","\n border-radius: inherit;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n transition: border-color .3s var(--n-bezier);\n border: var(--n-border);\n pointer-events: none;\n "),(0,f.cM)("closable",[(0,f.cB)("alert-body",[(0,f.cE)("title","\n padding-right: 24px;\n ")])]),(0,f.cE)("icon",{color:"var(--n-icon-color)"}),(0,f.cB)("alert-body",{padding:"var(--n-padding)"},[(0,f.cE)("title",{color:"var(--n-title-text-color)"}),(0,f.cE)("content",{color:"var(--n-content-text-color)"})]),(0,A._)({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),(0,f.cE)("icon","\n position: absolute;\n left: 0;\n top: 0;\n align-items: center;\n justify-content: center;\n display: flex;\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n margin: var(--n-icon-margin);\n "),(0,f.cE)("close","\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n position: absolute;\n right: 0;\n top: 0;\n margin: var(--n-close-margin);\n "),(0,f.cM)("show-icon",[(0,f.cB)("alert-body",{paddingLeft:"calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))"})]),(0,f.cM)("right-adjust",[(0,f.cB)("alert-body",{paddingRight:"calc(var(--n-close-size) + var(--n-padding) + 2px)"})]),(0,f.cB)("alert-body","\n border-radius: var(--n-border-radius);\n transition: border-color .3s var(--n-bezier);\n ",[(0,f.cE)("title","\n transition: color .3s var(--n-bezier);\n font-size: 16px;\n line-height: 19px;\n font-weight: var(--n-title-font-weight);\n ",[(0,f.c)("& +",[(0,f.cE)("content",{marginTop:"9px"})])]),(0,f.cE)("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),(0,f.cE)("icon",{transition:"color .3s var(--n-bezier)"})]);const P=Object.assign(Object.assign({},v.A.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function});var B=(0,r.pM)({name:"Alert",inheritAttrs:!1,props:P,slots:Object,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:o,inlineThemeDisabled:i,mergedRtlRef:l}=(0,h.Ay)(e),s=(0,v.A)("Alert","-alert",z,F,e,t),c=(0,m.I)("Alert",l,t),d=(0,r.EW)(()=>{const{common:{cubicBezierEaseInOut:t},self:o}=s.value,{fontSize:r,borderRadius:a,titleFontWeight:i,lineHeight:l,iconSize:c,iconMargin:d,iconMarginRtl:u,closeIconSize:p,closeBorderRadius:v,closeSize:h,closeMargin:g,closeMarginRtl:m,padding:b}=o,{type:w}=e,{left:y,right:x}=(0,n.Tj)(d);return{"--n-bezier":t,"--n-color":o[(0,f.cF)("color",w)],"--n-close-icon-size":p,"--n-close-border-radius":v,"--n-close-color-hover":o[(0,f.cF)("closeColorHover",w)],"--n-close-color-pressed":o[(0,f.cF)("closeColorPressed",w)],"--n-close-icon-color":o[(0,f.cF)("closeIconColor",w)],"--n-close-icon-color-hover":o[(0,f.cF)("closeIconColorHover",w)],"--n-close-icon-color-pressed":o[(0,f.cF)("closeIconColorPressed",w)],"--n-icon-color":o[(0,f.cF)("iconColor",w)],"--n-border":o[(0,f.cF)("border",w)],"--n-title-text-color":o[(0,f.cF)("titleTextColor",w)],"--n-content-text-color":o[(0,f.cF)("contentTextColor",w)],"--n-line-height":l,"--n-border-radius":a,"--n-font-size":r,"--n-title-font-weight":i,"--n-icon-size":c,"--n-icon-margin":d,"--n-icon-margin-rtl":u,"--n-close-size":h,"--n-close-margin":g,"--n-close-margin-rtl":m,"--n-padding":b,"--n-icon-margin-left":y,"--n-icon-margin-right":x}}),u=i?(0,g.R)("alert",(0,r.EW)(()=>e.type[0]),d,e):void 0,p=(0,a.KR)(!0),b=()=>{const{onAfterLeave:t,onAfterHide:o}=e;t&&t(),o&&o()},w=()=>{var t;Promise.resolve(null===(t=e.onClose)||void 0===t?void 0:t.call(e)).then(e=>{!1!==e&&(p.value=!1)})},y=()=>{b()};return{rtlEnabled:c,mergedClsPrefix:t,mergedBordered:o,visible:p,handleCloseClick:w,handleAfterLeave:y,mergedTheme:s,cssVars:i?void 0:d,themeClass:null===u||void 0===u?void 0:u.themeClass,onRender:null===u||void 0===u?void 0:u.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),(0,r.h)(i.A,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:e,$slots:t}=this,o={class:[`${e}-alert`,this.themeClass,this.closable&&`${e}-alert--closable`,this.showIcon&&`${e}-alert--show-icon`,!this.title&&this.closable&&`${e}-alert--right-adjust`,this.rtlEnabled&&`${e}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?(0,r.h)("div",Object.assign({},(0,r.v6)(this.$attrs,o)),this.closable&&(0,r.h)(l.A,{clsPrefix:e,class:`${e}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&(0,r.h)("div",{class:`${e}-alert__border`}),this.showIcon&&(0,r.h)("div",{class:`${e}-alert__icon`,"aria-hidden":"true"},(0,b.Nj)(t.icon,()=>[(0,r.h)(s.A,{clsPrefix:e},{default:()=>{switch(this.type){case"success":return(0,r.h)(c.A,null);case"info":return(0,r.h)(d.A,null);case"warning":return(0,r.h)(u.A,null);case"error":return(0,r.h)(p.A,null);default:return null}}})])),(0,r.h)("div",{class:[`${e}-alert-body`,this.mergedBordered&&`${e}-alert-body--bordered`]},(0,b.iQ)(t.header,t=>{const o=t||this.title;return o?(0,r.h)("div",{class:`${e}-alert-body__title`},o):null}),t.default&&(0,r.h)("div",{class:`${e}-alert-body__content`},t))):null}})}})},71168:function(e,t,o){o.d(t,{A:function(){return P}});var n=o(56768),r=o(90144),a=o(79882),i=o(88733),l=o(37901),s=o(86866),c=o(91462),d=o(36921),u=o(29767),p=o(77727);const v=(0,p.D)("n-popconfirm");var h=o(84279),g=o(73921),m=o(82813),f=o(25216),b=o(52126),w=o(25972),y=o(54880);const x={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},C=(0,b.Y)(x);var k=(0,n.pM)({name:"NPopconfirmPanel",props:x,setup(e){const{localeRef:t}=(0,m.A)("Popconfirm"),{inlineThemeDisabled:o}=(0,i.Ay)(),{mergedClsPrefixRef:a,mergedThemeRef:l,props:s}=(0,n.WQ)(v),c=(0,n.EW)(()=>{const{common:{cubicBezierEaseInOut:e},self:{fontSize:t,iconSize:o,iconColor:n}}=l.value;return{"--n-bezier":e,"--n-font-size":t,"--n-icon-size":o,"--n-icon-color":n}}),d=o?(0,f.R)("popconfirm-panel",void 0,c,s):void 0;return Object.assign(Object.assign({},(0,m.A)("Popconfirm")),{mergedClsPrefix:a,cssVars:o?void 0:c,localizedPositiveText:(0,n.EW)(()=>e.positiveText||t.value.positiveText),localizedNegativeText:(0,n.EW)(()=>e.negativeText||t.value.negativeText),positiveButtonProps:(0,r.lW)(s,"positiveButtonProps"),negativeButtonProps:(0,r.lW)(s,"negativeButtonProps"),handlePositiveClick(t){e.onPositiveClick(t)},handleNegativeClick(t){e.onNegativeClick(t)},themeClass:null===d||void 0===d?void 0:d.themeClass,onRender:null===d||void 0===d?void 0:d.onRender})},render(){var e;const{mergedClsPrefix:t,showIcon:o,$slots:r}=this,a=(0,w.Nj)(r.action,()=>null===this.negativeText&&null===this.positiveText?[]:[null!==this.negativeText&&(0,n.h)(y.Ay,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),null!==this.positiveText&&(0,n.h)(y.Ay,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return null===(e=this.onRender)||void 0===e||e.call(this),(0,n.h)("div",{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},(0,w.iQ)(r.default,e=>o||e?(0,n.h)("div",{class:`${t}-popconfirm__body`},o?(0,n.h)("div",{class:`${t}-popconfirm__icon`},(0,w.Nj)(r.icon,()=>[(0,n.h)(h.A,{clsPrefix:t},{default:()=>(0,n.h)(g.A,null)})])):null,e):null),a?(0,n.h)("div",{class:[`${t}-popconfirm__action`]},a):null)}}),F=o(34350),A=(0,F.cB)("popconfirm",[(0,F.cE)("body","\n font-size: var(--n-font-size);\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n position: relative;\n ",[(0,F.cE)("icon","\n display: flex;\n font-size: var(--n-icon-size);\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n margin: 0 8px 0 0;\n ")]),(0,F.cE)("action","\n display: flex;\n justify-content: flex-end;\n ",[(0,F.c)("&:not(:first-child)","margin-top: 8px"),(0,F.cB)("button",[(0,F.c)("&:not(:last-child)","margin-right: 8px;")])])]);const z=Object.assign(Object.assign(Object.assign({},a.A.props),d.vY),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:"click"},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function});var P=(0,n.pM)({name:"Popconfirm",props:z,slots:Object,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=(0,i.Ay)(),o=(0,a.A)("Popconfirm","-popconfirm",A,u.A,e,t),s=(0,r.KR)(null);function c(t){var o;if(!(null===(o=s.value)||void 0===o?void 0:o.getMergedShow()))return;const{onPositiveClick:n,"onUpdate:show":r}=e;Promise.resolve(!n||n(t)).then(e=>{var t;!1!==e&&(null===(t=s.value)||void 0===t||t.setShow(!1),r&&(0,l.T)(r,!1))})}function d(t){var o;if(!(null===(o=s.value)||void 0===o?void 0:o.getMergedShow()))return;const{onNegativeClick:n,"onUpdate:show":r}=e;Promise.resolve(!n||n(t)).then(e=>{var t;!1!==e&&(null===(t=s.value)||void 0===t||t.setShow(!1),r&&(0,l.T)(r,!1))})}(0,n.Gt)(v,{mergedThemeRef:o,mergedClsPrefixRef:t,props:e});const p={setShow(e){var t;null===(t=s.value)||void 0===t||t.setShow(e)},syncPosition(){var e;null===(e=s.value)||void 0===e||e.syncPosition()},mergedTheme:o,popoverInstRef:s,handlePositiveClick:c,handleNegativeClick:d};return p},render(){const{$slots:e,$props:t,mergedTheme:o}=this;return(0,n.h)(d.Ay,Object.assign({},(0,s.c)(t,C),{theme:o.peers.Popover,themeOverrides:o.peerOverrides.Popover,internalExtraClass:["popconfirm"],ref:"popoverInstRef"}),{trigger:e.trigger,default:()=>{const o=(0,c.a)(t,C);return(0,n.h)(k,Object.assign({},o,{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}})},96530:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r=(0,n.A)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])}}]); +//# sourceMappingURL=553.3921e97f.js.map \ No newline at end of file diff --git a/dist/js/774.e1ca78ab.js b/dist/js/774.e1ca78ab.js deleted file mode 100644 index e612811..0000000 --- a/dist/js/774.e1ca78ab.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[774],{7023:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r=(0,n.A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},19629:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r=(0,n.A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},38307:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r=(0,n.A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},55727:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r=(0,n.A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},58774:function(e,t,o){o.r(t),o.d(t,{default:function(){return Ye}});o(44114),o(18111),o(20116),o(61701);var n=o(56768),r=o(90144),a=o(24232),i=o(45130),l=o(98728),s=o(97387),c=o(95802),d=o(19629),u=o(7023),p=o(55727),v=o(96530),h=o(62784),g=o(38307),m=o(54880),f=o(68042),b=o(42517),w=o(71168),y=o(34707),x=o(84279),C=(0,n.pM)({name:"Forward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z",fill:"currentColor"}))}}),k=(0,n.pM)({name:"Backward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z",fill:"currentColor"}))}}),F=(0,n.pM)({name:"FastBackward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"}))))}}),A=(0,n.pM)({name:"FastForward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))}}),z=(0,n.pM)({name:"More",render(){return(0,n.h)("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z"}))))}}),P=o(79882),B=o(88733),M=o(82813),R=o(25216),S=o(38741),I=o(62334);const T={tiny:"mini",small:"tiny",medium:"small",large:"medium",huge:"large"};function _(e){const t=T[e];if(void 0===t)throw new Error(`${e} has no smaller size.`);return t}var j=o(37901),E=o(34350),$=o(25972),L=o(93913),O=o(86866),W=o(91462),N=o(41519),H=o(94035),K=o(36921),U=o(11766),V=o(77727);const D=(0,V.D)("n-popselect");o(7588);var Q=o(11336),X=o(47794),q=o(44650),J=o(52126),Y=o(28828),Z=(0,E.cB)("popselect-menu","\n box-shadow: var(--n-menu-box-shadow);\n");const G={multiple:Boolean,value:{type:[String,Number,Array],default:null},cancelable:Boolean,options:{type:Array,default:()=>[]},size:{type:String,default:"medium"},scrollable:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onMouseenter:Function,onMouseleave:Function,renderLabel:Function,showCheckmark:{type:Boolean,default:void 0},nodeProps:Function,virtualScroll:Boolean,onChange:[Function,Array]},ee=(0,J.Y)(G);var te=(0,n.pM)({name:"PopselectPanel",props:G,setup(e){const t=(0,n.WQ)(D),{mergedClsPrefixRef:o,inlineThemeDisabled:a}=(0,B.Ay)(e),i=(0,P.A)("Popselect","-pop-select",Z,U.A,t.props,o),l=(0,n.EW)(()=>(0,X.G)(e.options,(0,Y.ag)("value","children")));function s(t,o){const{onUpdateValue:n,"onUpdate:value":r,onChange:a}=e;n&&(0,j.T)(n,t,o),r&&(0,j.T)(r,t,o),a&&(0,j.T)(a,t,o)}function c(e){u(e.key)}function d(e){(0,Q.d)(e,"action")||(0,Q.d)(e,"empty")||(0,Q.d)(e,"header")||e.preventDefault()}function u(o){const{value:{getNode:r}}=l;if(e.multiple)if(Array.isArray(e.value)){const t=[],n=[];let a=!0;e.value.forEach(e=>{if(e===o)return void(a=!1);const i=r(e);i&&(t.push(i.key),n.push(i.rawNode))}),a&&(t.push(o),n.push(r(o).rawNode)),s(t,n)}else{const e=r(o);e&&s([o],[e.rawNode])}else if(e.value===o&&e.cancelable)s(null,null);else{const e=r(o);e&&s(o,e.rawNode);const{"onUpdate:show":n,onUpdateShow:a}=t.props;n&&(0,j.T)(n,!1),a&&(0,j.T)(a,!1),t.setShow(!1)}(0,n.dY)(()=>{t.syncPosition()})}(0,n.wB)((0,r.lW)(e,"options"),()=>{(0,n.dY)(()=>{t.syncPosition()})});const p=(0,n.EW)(()=>{const{self:{menuBoxShadow:e}}=i.value;return{"--n-menu-box-shadow":e}}),v=a?(0,R.R)("select",void 0,p,t.props):void 0;return{mergedTheme:t.mergedThemeRef,mergedClsPrefix:o,treeMate:l,handleToggle:c,handleMenuMousedown:d,cssVars:a?void 0:p,themeClass:null===v||void 0===v?void 0:v.themeClass,onRender:null===v||void 0===v?void 0:v.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),(0,n.h)(q.A,{clsPrefix:this.mergedClsPrefix,focusable:!0,nodeProps:this.nodeProps,class:[`${this.mergedClsPrefix}-popselect-menu`,this.themeClass],style:this.cssVars,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,multiple:this.multiple,treeMate:this.treeMate,size:this.size,value:this.value,virtualScroll:this.virtualScroll,scrollable:this.scrollable,renderLabel:this.renderLabel,onToggle:this.handleToggle,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseenter,onMousedown:this.handleMenuMousedown,showCheckmark:this.showCheckmark},{header:()=>{var e,t;return(null===(t=(e=this.$slots).header)||void 0===t?void 0:t.call(e))||[]},action:()=>{var e,t;return(null===(t=(e=this.$slots).action)||void 0===t?void 0:t.call(e))||[]},empty:()=>{var e,t;return(null===(t=(e=this.$slots).empty)||void 0===t?void 0:t.call(e))||[]}})}});const oe=Object.assign(Object.assign(Object.assign(Object.assign({},P.A.props),(0,O.c)(K.vY,["showArrow","arrow"])),{placement:Object.assign(Object.assign({},K.vY.placement),{default:"bottom"}),trigger:{type:String,default:"hover"}}),G);var ne=(0,n.pM)({name:"Popselect",props:oe,slots:Object,inheritAttrs:!1,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=(0,B.Ay)(e),o=(0,P.A)("Popselect","-popselect",void 0,U.A,e,t),a=(0,r.KR)(null);function i(){var e;null===(e=a.value)||void 0===e||e.syncPosition()}function l(e){var t;null===(t=a.value)||void 0===t||t.setShow(e)}(0,n.Gt)(D,{props:e,mergedThemeRef:o,syncPosition:i,setShow:l});const s={syncPosition:i,setShow:l};return Object.assign(Object.assign({},s),{popoverInstRef:a,mergedTheme:o})},render(){const{mergedTheme:e}=this,t={theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:{padding:"0"},ref:"popoverInstRef",internalRenderBody:(e,t,o,r,a)=>{const{$attrs:i}=this;return(0,n.h)(te,Object.assign({},i,{class:[i.class,e],style:[i.style,...o]},(0,W.a)(this.$props,ee),{ref:(0,N.V)(t),onMouseenter:(0,H.u)([r,i.onMouseenter]),onMouseleave:(0,H.u)([a,i.onMouseleave])}),{header:()=>{var e,t;return null===(t=(e=this.$slots).header)||void 0===t?void 0:t.call(e)},action:()=>{var e,t;return null===(t=(e=this.$slots).action)||void 0===t?void 0:t.call(e)},empty:()=>{var e,t;return null===(t=(e=this.$slots).empty)||void 0===t?void 0:t.call(e)}})}};return(0,n.h)(K.Ay,Object.assign({},(0,O.c)(this.$props,ee),t,{internalDeactivateImmediately:!0}),{trigger:()=>{var e,t;return null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)}})}}),re=o(19605),ae=o(37448);const ie="\n background: var(--n-item-color-hover);\n color: var(--n-item-text-color-hover);\n border: var(--n-item-border-hover);\n",le=[(0,E.cM)("button","\n background: var(--n-button-color-hover);\n border: var(--n-button-border-hover);\n color: var(--n-button-icon-color-hover);\n ")];var se=(0,E.cB)("pagination","\n display: flex;\n vertical-align: middle;\n font-size: var(--n-item-font-size);\n flex-wrap: nowrap;\n",[(0,E.cB)("pagination-prefix","\n display: flex;\n align-items: center;\n margin: var(--n-prefix-margin);\n "),(0,E.cB)("pagination-suffix","\n display: flex;\n align-items: center;\n margin: var(--n-suffix-margin);\n "),(0,E.c)("> *:not(:first-child)","\n margin: var(--n-item-margin);\n "),(0,E.cB)("select","\n width: var(--n-select-width);\n "),(0,E.c)("&.transition-disabled",[(0,E.cB)("pagination-item","transition: none!important;")]),(0,E.cB)("pagination-quick-jumper","\n white-space: nowrap;\n display: flex;\n color: var(--n-jumper-text-color);\n transition: color .3s var(--n-bezier);\n align-items: center;\n font-size: var(--n-jumper-font-size);\n ",[(0,E.cB)("input","\n margin: var(--n-input-margin);\n width: var(--n-input-width);\n ")]),(0,E.cB)("pagination-item","\n position: relative;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: var(--n-item-size);\n height: var(--n-item-size);\n padding: var(--n-item-padding);\n background-color: var(--n-item-color);\n color: var(--n-item-text-color);\n border-radius: var(--n-item-border-radius);\n border: var(--n-item-border);\n fill: var(--n-button-icon-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n fill .3s var(--n-bezier);\n ",[(0,E.cM)("button","\n background: var(--n-button-color);\n color: var(--n-button-icon-color);\n border: var(--n-button-border);\n padding: 0;\n ",[(0,E.cB)("base-icon","\n font-size: var(--n-button-icon-size);\n ")]),(0,E.C5)("disabled",[(0,E.cM)("hover",ie,le),(0,E.c)("&:hover",ie,le),(0,E.c)("&:active","\n background: var(--n-item-color-pressed);\n color: var(--n-item-text-color-pressed);\n border: var(--n-item-border-pressed);\n ",[(0,E.cM)("button","\n background: var(--n-button-color-pressed);\n border: var(--n-button-border-pressed);\n color: var(--n-button-icon-color-pressed);\n ")]),(0,E.cM)("active","\n background: var(--n-item-color-active);\n color: var(--n-item-text-color-active);\n border: var(--n-item-border-active);\n ",[(0,E.c)("&:hover","\n background: var(--n-item-color-active-hover);\n ")])]),(0,E.cM)("disabled","\n cursor: not-allowed;\n color: var(--n-item-text-color-disabled);\n ",[(0,E.cM)("active, button","\n background-color: var(--n-item-color-disabled);\n border: var(--n-item-border-disabled);\n ")])]),(0,E.cM)("disabled","\n cursor: not-allowed;\n ",[(0,E.cB)("pagination-quick-jumper","\n color: var(--n-jumper-text-color-disabled);\n ")]),(0,E.cM)("simple","\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n ",[(0,E.cB)("pagination-quick-jumper",[(0,E.cB)("input","\n margin: 0;\n ")])])]);function ce(e){var t;if(!e)return 10;const{defaultPageSize:o}=e;if(void 0!==o)return o;const n=null===(t=e.pageSizes)||void 0===t?void 0:t[0];return"number"===typeof n?n:(null===n||void 0===n?void 0:n.value)||10}function de(e,t,o,n){let r=!1,a=!1,i=1,l=t;if(1===t)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:l,fastBackwardTo:i,items:[{type:"page",label:1,active:1===e,mayBeFastBackward:!1,mayBeFastForward:!1}]};if(2===t)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:l,fastBackwardTo:i,items:[{type:"page",label:1,active:1===e,mayBeFastBackward:!1,mayBeFastForward:!1},{type:"page",label:2,active:2===e,mayBeFastBackward:!0,mayBeFastForward:!1}]};const s=1,c=t;let d=e,u=e;const p=(o-5)/2;u+=Math.ceil(p),u=Math.min(Math.max(u,s+o-3),c-2),d-=Math.floor(p),d=Math.max(Math.min(d,c-o+3),s+2);let v=!1,h=!1;d>s+2&&(v=!0),u=s+1&&g.push({type:"page",label:s+1,mayBeFastBackward:!0,mayBeFastForward:!1,active:e===s+1});for(let m=d;m<=u;++m)g.push({type:"page",label:m,mayBeFastBackward:!1,mayBeFastForward:!1,active:e===m});return h?(a=!0,l=u+1,g.push({type:"fast-forward",active:!1,label:void 0,options:n?ue(u+1,c-1):null})):u===c-2&&g[g.length-1].label!==c-1&&g.push({type:"page",mayBeFastForward:!0,mayBeFastBackward:!1,label:c-1,active:e===c-1}),g[g.length-1].label!==c&&g.push({type:"page",mayBeFastForward:!1,mayBeFastBackward:!1,label:c,active:e===c}),{hasFastBackward:r,hasFastForward:a,fastBackwardTo:i,fastForwardTo:l,items:g}}function ue(e,t){const o=[];for(let n=e;n<=t;++n)o.push({label:`${n}`,value:n});return o}const pe=Object.assign(Object.assign({},P.A.props),{simple:Boolean,page:Number,defaultPage:{type:Number,default:1},itemCount:Number,pageCount:Number,defaultPageCount:{type:Number,default:1},showSizePicker:Boolean,pageSize:Number,defaultPageSize:Number,pageSizes:{type:Array,default(){return[10]}},showQuickJumper:Boolean,size:{type:String,default:"medium"},disabled:Boolean,pageSlot:{type:Number,default:9},selectProps:Object,prev:Function,next:Function,goto:Function,prefix:Function,suffix:Function,label:Function,displayOrder:{type:Array,default:["pages","size-picker","quick-jumper"]},to:I.$.propTo,showQuickJumpDropdown:{type:Boolean,default:!0},"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],onPageSizeChange:[Function,Array],onChange:[Function,Array]});var ve=(0,n.pM)({name:"Pagination",props:pe,slots:Object,setup(e){const{mergedComponentPropsRef:t,mergedClsPrefixRef:o,inlineThemeDisabled:a,mergedRtlRef:i}=(0,B.Ay)(e),l=(0,P.A)("Pagination","-pagination",se,ae.A,e,o),{localeRef:s}=(0,M.A)("Pagination"),c=(0,r.KR)(null),d=(0,r.KR)(e.defaultPage),u=(0,r.KR)(ce(e)),p=(0,y.A)((0,r.lW)(e,"page"),d),v=(0,y.A)((0,r.lW)(e,"pageSize"),u),h=(0,n.EW)(()=>{const{itemCount:t}=e;if(void 0!==t)return Math.max(1,Math.ceil(t/v.value));const{pageCount:o}=e;return void 0!==o?Math.max(o,1):1}),g=(0,r.KR)("");(0,n.nT)(()=>{e.simple,g.value=String(p.value)});const m=(0,r.KR)(!1),f=(0,r.KR)(!1),b=(0,r.KR)(!1),w=(0,r.KR)(!1),x=()=>{e.disabled||(m.value=!0,H())},C=()=>{e.disabled||(m.value=!1,H())},k=()=>{f.value=!0,H()},F=()=>{f.value=!1,H()},A=e=>{K(e)},z=(0,n.EW)(()=>de(p.value,h.value,e.pageSlot,e.showQuickJumpDropdown));(0,n.nT)(()=>{z.value.hasFastBackward?z.value.hasFastForward||(m.value=!1,b.value=!1):(f.value=!1,w.value=!1)});const I=(0,n.EW)(()=>{const t=s.value.selectionSuffix;return e.pageSizes.map(e=>"number"===typeof e?{label:`${e} / ${t}`,value:e}:e)}),T=(0,n.EW)(()=>{var o,n;return(null===(n=null===(o=null===t||void 0===t?void 0:t.value)||void 0===o?void 0:o.Pagination)||void 0===n?void 0:n.inputSize)||_(e.size)}),$=(0,n.EW)(()=>{var o,n;return(null===(n=null===(o=null===t||void 0===t?void 0:t.value)||void 0===o?void 0:o.Pagination)||void 0===n?void 0:n.selectSize)||_(e.size)}),L=(0,n.EW)(()=>(p.value-1)*v.value),O=(0,n.EW)(()=>{const t=p.value*v.value-1,{itemCount:o}=e;return void 0!==o&&t>o-1?o-1:t}),W=(0,n.EW)(()=>{const{itemCount:t}=e;return void 0!==t?t:(e.pageCount||1)*v.value}),N=(0,S.I)("Pagination",i,o);function H(){(0,n.dY)(()=>{var e;const{value:t}=c;t&&(t.classList.add("transition-disabled"),null===(e=c.value)||void 0===e||e.offsetWidth,t.classList.remove("transition-disabled"))})}function K(t){if(t===p.value)return;const{"onUpdate:page":o,onUpdatePage:n,onChange:r,simple:a}=e;o&&(0,j.T)(o,t),n&&(0,j.T)(n,t),r&&(0,j.T)(r,t),d.value=t,a&&(g.value=String(t))}function U(t){if(t===v.value)return;const{"onUpdate:pageSize":o,onUpdatePageSize:n,onPageSizeChange:r}=e;o&&(0,j.T)(o,t),n&&(0,j.T)(n,t),r&&(0,j.T)(r,t),u.value=t,h.value{p.value,v.value,H()});const ee=(0,n.EW)(()=>{const{size:t}=e,{self:{buttonBorder:o,buttonBorderHover:n,buttonBorderPressed:r,buttonIconColor:a,buttonIconColorHover:i,buttonIconColorPressed:s,itemTextColor:c,itemTextColorHover:d,itemTextColorPressed:u,itemTextColorActive:p,itemTextColorDisabled:v,itemColor:h,itemColorHover:g,itemColorPressed:m,itemColorActive:f,itemColorActiveHover:b,itemColorDisabled:w,itemBorder:y,itemBorderHover:x,itemBorderPressed:C,itemBorderActive:k,itemBorderDisabled:F,itemBorderRadius:A,jumperTextColor:z,jumperTextColorDisabled:P,buttonColor:B,buttonColorHover:M,buttonColorPressed:R,[(0,E.cF)("itemPadding",t)]:S,[(0,E.cF)("itemMargin",t)]:I,[(0,E.cF)("inputWidth",t)]:T,[(0,E.cF)("selectWidth",t)]:_,[(0,E.cF)("inputMargin",t)]:j,[(0,E.cF)("selectMargin",t)]:$,[(0,E.cF)("jumperFontSize",t)]:L,[(0,E.cF)("prefixMargin",t)]:O,[(0,E.cF)("suffixMargin",t)]:W,[(0,E.cF)("itemSize",t)]:N,[(0,E.cF)("buttonIconSize",t)]:H,[(0,E.cF)("itemFontSize",t)]:K,[`${(0,E.cF)("itemMargin",t)}Rtl`]:U,[`${(0,E.cF)("inputMargin",t)}Rtl`]:V},common:{cubicBezierEaseInOut:D}}=l.value;return{"--n-prefix-margin":O,"--n-suffix-margin":W,"--n-item-font-size":K,"--n-select-width":_,"--n-select-margin":$,"--n-input-width":T,"--n-input-margin":j,"--n-input-margin-rtl":V,"--n-item-size":N,"--n-item-text-color":c,"--n-item-text-color-disabled":v,"--n-item-text-color-hover":d,"--n-item-text-color-active":p,"--n-item-text-color-pressed":u,"--n-item-color":h,"--n-item-color-hover":g,"--n-item-color-disabled":w,"--n-item-color-active":f,"--n-item-color-active-hover":b,"--n-item-color-pressed":m,"--n-item-border":y,"--n-item-border-hover":x,"--n-item-border-disabled":F,"--n-item-border-active":k,"--n-item-border-pressed":C,"--n-item-padding":S,"--n-item-border-radius":A,"--n-bezier":D,"--n-jumper-font-size":L,"--n-jumper-text-color":z,"--n-jumper-text-color-disabled":P,"--n-item-margin":I,"--n-item-margin-rtl":U,"--n-button-icon-size":H,"--n-button-icon-color":a,"--n-button-icon-color-hover":i,"--n-button-icon-color-pressed":s,"--n-button-color-hover":M,"--n-button-color":B,"--n-button-color-pressed":R,"--n-button-border":o,"--n-button-border-hover":n,"--n-button-border-pressed":r}}),te=a?(0,R.R)("pagination",(0,n.EW)(()=>{let t="";const{size:o}=e;return t+=o[0],t}),ee,e):void 0;return{rtlEnabled:N,mergedClsPrefix:o,locale:s,selfRef:c,mergedPage:p,pageItems:(0,n.EW)(()=>z.value.items),mergedItemCount:W,jumperValue:g,pageSizeOptions:I,mergedPageSize:v,inputSize:T,selectSize:$,mergedTheme:l,mergedPageCount:h,startIndex:L,endIndex:O,showFastForwardMenu:b,showFastBackwardMenu:w,fastForwardActive:m,fastBackwardActive:f,handleMenuSelect:A,handleFastForwardMouseenter:x,handleFastForwardMouseleave:C,handleFastBackwardMouseenter:k,handleFastBackwardMouseleave:F,handleJumperInput:G,handleBackwardClick:D,handleForwardClick:V,handlePageItemClick:Z,handleSizePickerChange:q,handleQuickJumperChange:Y,cssVars:a?void 0:ee,themeClass:null===te||void 0===te?void 0:te.themeClass,onRender:null===te||void 0===te?void 0:te.onRender}},render(){const{$slots:e,mergedClsPrefix:t,disabled:o,cssVars:r,mergedPage:a,mergedPageCount:i,pageItems:l,showSizePicker:s,showQuickJumper:c,mergedTheme:d,locale:u,inputSize:p,selectSize:v,mergedPageSize:h,pageSizeOptions:g,jumperValue:m,simple:f,prev:b,next:w,prefix:y,suffix:P,label:B,goto:M,handleJumperInput:R,handleSizePickerChange:S,handleBackwardClick:I,handlePageItemClick:T,handleForwardClick:_,handleQuickJumperChange:j,onRender:E}=this;null===E||void 0===E||E();const O=y||e.prefix,W=P||e.suffix,N=b||e.prev,H=w||e.next,K=B||e.label;return(0,n.h)("div",{ref:"selfRef",class:[`${t}-pagination`,this.themeClass,this.rtlEnabled&&`${t}-pagination--rtl`,o&&`${t}-pagination--disabled`,f&&`${t}-pagination--simple`],style:r},O?(0,n.h)("div",{class:`${t}-pagination-prefix`},O({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null,this.displayOrder.map(e=>{switch(e){case"pages":return(0,n.h)(n.FK,null,(0,n.h)("div",{class:[`${t}-pagination-item`,!N&&`${t}-pagination-item--button`,(a<=1||a>i||o)&&`${t}-pagination-item--disabled`],onClick:I},N?N({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(C,null):(0,n.h)(k,null)})),f?(0,n.h)(n.FK,null,(0,n.h)("div",{class:`${t}-pagination-quick-jumper`},(0,n.h)(L.A,{value:m,onUpdateValue:R,size:p,placeholder:"",disabled:o,theme:d.peers.Input,themeOverrides:d.peerOverrides.Input,onChange:j}))," /"," ",i):l.map((e,r)=>{let a,i,l;const{type:s}=e;switch(s){case"page":const o=e.label;a=K?K({type:"page",node:o,active:e.active}):o;break;case"fast-forward":const r=this.fastForwardActive?(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(F,null):(0,n.h)(A,null)}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>(0,n.h)(z,null)});a=K?K({type:"fast-forward",node:r,active:this.fastForwardActive||this.showFastForwardMenu}):r,i=this.handleFastForwardMouseenter,l=this.handleFastForwardMouseleave;break;case"fast-backward":const s=this.fastBackwardActive?(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(A,null):(0,n.h)(F,null)}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>(0,n.h)(z,null)});a=K?K({type:"fast-backward",node:s,active:this.fastBackwardActive||this.showFastBackwardMenu}):s,i=this.handleFastBackwardMouseenter,l=this.handleFastBackwardMouseleave;break}const c=(0,n.h)("div",{key:r,class:[`${t}-pagination-item`,e.active&&`${t}-pagination-item--active`,"page"!==s&&("fast-backward"===s&&this.showFastBackwardMenu||"fast-forward"===s&&this.showFastForwardMenu)&&`${t}-pagination-item--hover`,o&&`${t}-pagination-item--disabled`,"page"===s&&`${t}-pagination-item--clickable`],onClick:()=>{T(e)},onMouseenter:i,onMouseleave:l},a);if("page"!==s||e.mayBeFastBackward||e.mayBeFastForward){const t="page"===e.type?e.mayBeFastBackward?"fast-backward":"fast-forward":e.type;return"page"===e.type||e.options?(0,n.h)(ne,{to:this.to,key:t,disabled:o,trigger:"hover",virtualScroll:!0,style:{width:"60px"},theme:d.peers.Popselect,themeOverrides:d.peerOverrides.Popselect,builtinThemeOverrides:{peers:{InternalSelectMenu:{height:"calc(var(--n-option-height) * 4.6)"}}},nodeProps:()=>({style:{justifyContent:"center"}}),show:"page"!==s&&("fast-backward"===s?this.showFastBackwardMenu:this.showFastForwardMenu),onUpdateShow:e=>{"page"!==s&&(e?"fast-backward"===s?this.showFastBackwardMenu=e:this.showFastForwardMenu=e:(this.showFastBackwardMenu=!1,this.showFastForwardMenu=!1))},options:"page"!==e.type&&e.options?e.options:[],onUpdateValue:this.handleMenuSelect,scrollable:!0,showCheckmark:!1},{default:()=>c}):c}return c}),(0,n.h)("div",{class:[`${t}-pagination-item`,!H&&`${t}-pagination-item--button`,{[`${t}-pagination-item--disabled`]:a<1||a>=i||o}],onClick:_},H?H({page:a,pageSize:h,pageCount:i,itemCount:this.mergedItemCount,startIndex:this.startIndex,endIndex:this.endIndex}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(k,null):(0,n.h)(C,null)})));case"size-picker":return!f&&s?(0,n.h)(re.A,Object.assign({consistentMenuWidth:!1,placeholder:"",showCheckmark:!1,to:this.to},this.selectProps,{size:v,options:g,value:h,disabled:o,theme:d.peers.Select,themeOverrides:d.peerOverrides.Select,onUpdateValue:S})):null;case"quick-jumper":return!f&&c?(0,n.h)("div",{class:`${t}-pagination-quick-jumper`},M?M():(0,$.Nj)(this.$slots.goto,()=>[u.goto]),(0,n.h)(L.A,{value:m,onUpdateValue:R,size:p,placeholder:"",disabled:o,theme:d.peers.Input,themeOverrides:d.peerOverrides.Input,onChange:j})):null;default:return null}}),W?(0,n.h)("div",{class:`${t}-pagination-suffix`},W({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null)}}),he=o(48129),ge=o(64498),me=o(35720);const fe={class:"note-mng-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},be={class:"mb-8 flex items-center justify-between",initial:{opacity:0,y:-20},enter:{opacity:1,y:0,transition:{duration:500}}},we={class:"flex items-center gap-3"},ye={class:"p-3 bg-primary/10 rounded-xl"},xe={class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},Ce={key:0,class:"flex justify-center py-12"},ke={key:1},Fe={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},Ae=["enter"],ze=["onClick"],Pe={class:"flex items-center justify-between mb-2"},Be={class:"text-xl font-bold text-gray-900 dark:text-white group-hover:text-primary transition-colors"},Me={class:"flex items-center gap-2 text-xs text-gray-400"},Re={key:0},Se={key:0,class:"text-sm text-gray-600 dark:text-gray-300 line-clamp-1"},Ie={class:"font-mono text-xs opacity-70"},Te={class:"flex-grow bg-yellow-50/50 dark:bg-yellow-900/5 rounded-lg p-3 mb-4"},_e={class:"text-gray-700 dark:text-gray-300 whitespace-pre-wrap text-sm leading-relaxed"},je={class:"flex items-center justify-between pt-2 mt-auto border-t border-gray-100 dark:border-gray-700/50"},Ee={class:"text-xs text-gray-400 flex items-center gap-1"},$e={class:"flex items-center gap-2 opacity-100 sm:opacity-0 group-hover:opacity-100 transition-opacity"},Le={class:"flex justify-center mt-12 mb-8"},Oe={key:2,class:"flex flex-col items-center justify-center py-20 text-center"},We={class:"bg-gray-100 dark:bg-gray-800 p-6 rounded-full mb-4"},Ne={class:"mb-4"},He={class:"text-lg font-bold text-gray-900 dark:text-white mb-1"},Ke={class:"text-sm text-gray-500"},Ue={key:0},Ve={class:"flex justify-end gap-2"},De={class:"space-y-4"},Qe={class:"flex justify-end gap-2"};var Xe={__name:"NoteMngView",setup(e){const t=(0,l.rd)(),o=(0,s.J)(),y=(0,r.KR)(!1),x=(0,r.KR)([]),C=(0,r.KR)(0),k=(0,r.KR)(1),F=(0,r.KR)(1),A=(0,r.KR)(9),z=(0,r.KR)(!1),P=(0,r.KR)(!1),B=(0,r.KR)(null),M=(0,r.KR)({content:""}),R=(0,r.KR)(!1),S=(0,r.KR)(!1),I=(0,r.KR)({word_id:null,content:""}),T=(0,r.KR)([]),_=(0,r.KR)(!1),j=async(e=1)=>{y.value=!0;try{const t=await me.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/note/list",{params:{page:e,limit:A.value}}),o=t.data;x.value=o.list||[],o.pagination&&(C.value=o.pagination.total_items,k.value=o.pagination.total_pages,F.value=o.pagination.current_page)}catch(t){console.error("Fetch notes failed:",t),o.error("获取笔记列表失败")}finally{y.value=!1}},E=e=>{j(e),window.scrollTo({top:0,behavior:"smooth"})},$=e=>{const o=t.resolve({name:"word-detail",query:{word_id:e}});window.open(o.href,"_blank")},O=e=>{B.value=e,M.value.content=e.content,z.value=!0},W=async()=>{if(M.value.content.trim()){P.value=!0;try{const e={word_id:B.value.word_id,content:M.value.content,note_id:B.value.id},t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/note",e);o.success(t.data.message||"保存成功"),z.value=!1;const n=x.value.find(e=>e.id===B.value.id);n&&(n.content=M.value.content,n.updated_at=(new Date).toISOString())}catch(e){console.error("Save note failed:",e),o.error("保存笔记失败")}finally{P.value=!1}}else o.warning("笔记内容不能为空")},N=async e=>{try{const t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/del_note",{note_id:e});o.success(t.data.message||"删除成功"),1===x.value.length&&F.value>1?j(F.value-1):j(F.value)}catch(t){console.error("Delete note failed:",t),o.error("删除笔记失败")}},H=()=>{I.value={word_id:null,content:""},T.value=[],R.value=!0},K=async e=>{if(e){_.value=!0;try{const t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/search",{keyword:e,page:1,limit:5}),o=t.data;T.value=(o.list||[]).map(e=>({label:e.word,value:e.id}))}catch(t){console.error("Search failed:",t)}finally{_.value=!1}}else T.value=[]},U=async()=>{if(I.value.word_id)if(I.value.content.trim()){S.value=!0;try{const e={word_id:I.value.word_id,content:I.value.content},t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/note",e);o.success(t.data.message||"添加成功"),R.value=!1,j(1)}catch(e){console.error("Add note failed:",e),o.error("添加笔记失败")}finally{S.value=!1}}else o.warning("笔记内容不能为空");else o.warning("请选择一个单词")};return(0,n.sV)(()=>{document.title="我的笔记 - Word Helper",j()}),(e,t)=>{const o=(0,n.gN)("motion");return(0,n.uX)(),(0,n.CE)("div",fe,[(0,n.bo)(((0,n.uX)(),(0,n.CE)("div",be,[(0,n.Lk)("div",we,[(0,n.Lk)("div",ye,[(0,n.bF)((0,r.R1)(c.A),{class:"w-6 h-6 text-primary"})]),(0,n.Lk)("div",null,[t[10]||(t[10]=(0,n.Lk)("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"我的笔记",-1)),(0,n.Lk)("p",xe," 共 "+(0,a.v_)(C.value)+" 条笔记 ",1)])]),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",onClick:H},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(d.A),{class:"w-4 h-4"})]),default:(0,n.k6)(()=>[t[11]||(t[11]=(0,n.eW)(" 快速添加 ",-1))]),_:1})])),[[o]]),y.value&&0===x.value.length?((0,n.uX)(),(0,n.CE)("div",Ce,[(0,n.bF)((0,r.R1)(f.A),{size:"large"})])):x.value.length>0?((0,n.uX)(),(0,n.CE)("div",ke,[(0,n.Lk)("div",Fe,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(x.value,(e,l)=>(0,n.bo)(((0,n.uX)(),(0,n.CE)("div",{key:e.id,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:50*l}},class:"group relative flex flex-col h-full"},[(0,n.bF)((0,r.R1)(b.Ay),{class:"h-full rounded-xl shadow-sm hover:shadow-md transition-all duration-300 dark:bg-gray-800 border-l-4 border-l-primary",bordered:!1,"content-style":"display: flex; flex-direction: column; height: 100%;"},{default:(0,n.k6)(()=>[(0,n.Lk)("div",{class:"mb-4 cursor-pointer",onClick:t=>$(e.word_id)},[(0,n.Lk)("div",Pe,[(0,n.Lk)("h3",Be,(0,a.v_)(e.word),1),(0,n.Lk)("div",Me,[e.us_accent?((0,n.uX)(),(0,n.CE)("span",Re,"美 ["+(0,a.v_)(e.us_accent)+"]",1)):(0,n.Q3)("",!0),(0,n.bF)((0,r.R1)(u.A),{class:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity"})])]),e.translations&&e.translations.length>0?((0,n.uX)(),(0,n.CE)("div",Se,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.translations.slice(0,2),(e,t)=>((0,n.uX)(),(0,n.CE)("span",{key:t,class:"mr-2"},[(0,n.Lk)("span",Ie,(0,a.v_)(e.pos),1),(0,n.eW)(" "+(0,a.v_)(e.meaning),1)]))),128))])):(0,n.Q3)("",!0)],8,ze),(0,n.Lk)("div",Te,[(0,n.Lk)("p",_e,(0,a.v_)(e.content),1)]),(0,n.Lk)("div",je,[(0,n.Lk)("div",Ee,[(0,n.bF)((0,r.R1)(p.A),{class:"w-3 h-3"}),(0,n.eW)(" "+(0,a.v_)(new Date(e.updated_at).toLocaleDateString()),1)]),(0,n.Lk)("div",$e,[(0,n.bF)((0,r.R1)(m.Ay),{size:"tiny",secondary:"",circle:"",type:"primary",onClick:(0,i.D$)(t=>O(e),["stop"])},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(v.A),{class:"w-3 h-3"})]),_:1},8,["onClick"]),(0,n.bF)((0,r.R1)(w.A),{onPositiveClick:t=>N(e.id)},{trigger:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(m.Ay),{size:"tiny",secondary:"",circle:"",type:"error",onClick:t[0]||(t[0]=(0,i.D$)(()=>{},["stop"]))},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(h.A),{class:"w-3 h-3"})]),_:1})]),default:(0,n.k6)(()=>[t[12]||(t[12]=(0,n.eW)(" 确定要删除这条笔记吗? ",-1))]),_:1},8,["onPositiveClick"])])])]),_:2},1024)],8,Ae)),[[o]])),128))]),(0,n.Lk)("div",Le,[(0,n.bF)((0,r.R1)(ve),{page:F.value,"onUpdate:page":[t[1]||(t[1]=e=>F.value=e),E],"page-count":k.value,"page-size":A.value},null,8,["page","page-count","page-size"])])])):((0,n.uX)(),(0,n.CE)("div",Oe,[(0,n.Lk)("div",We,[(0,n.bF)((0,r.R1)(g.A),{class:"w-12 h-12 text-gray-400"})]),t[14]||(t[14]=(0,n.Lk)("h3",{class:"text-lg font-medium text-gray-900 dark:text-white mb-2"},"还没有笔记",-1)),t[15]||(t[15]=(0,n.Lk)("p",{class:"text-gray-500 mb-3 dark:text-gray-400 max-w-sm"}," 随时记录你的心得体会和助记方法 ",-1)),(0,n.bF)((0,r.R1)(m.Ay),{class:"mt-6",type:"primary",onClick:t[2]||(t[2]=t=>e.$router.push("/dict"))},{default:(0,n.k6)(()=>[...t[13]||(t[13]=[(0,n.eW)(" 去学习 ",-1)])]),_:1})])),(0,n.bF)((0,r.R1)(he.A),{show:z.value,"onUpdate:show":t[5]||(t[5]=e=>z.value=e),preset:"card",title:"编辑笔记",class:"w-full max-w-lg"},{footer:(0,n.k6)(()=>[(0,n.Lk)("div",Ve,[(0,n.bF)((0,r.R1)(m.Ay),{onClick:t[4]||(t[4]=e=>z.value=!1)},{default:(0,n.k6)(()=>[...t[16]||(t[16]=[(0,n.eW)("取消",-1)])]),_:1}),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",loading:P.value,onClick:W},{default:(0,n.k6)(()=>[...t[17]||(t[17]=[(0,n.eW)("保存",-1)])]),_:1},8,["loading"])])]),default:(0,n.k6)(()=>[(0,n.Lk)("div",Ne,[(0,n.Lk)("div",He,(0,a.v_)(B.value?.word),1),(0,n.Lk)("div",Ke,[B.value?.translations&&B.value.translations.length>0?((0,n.uX)(),(0,n.CE)("span",Ue,(0,a.v_)(B.value.translations[0].meaning),1)):(0,n.Q3)("",!0)])]),(0,n.bF)((0,r.R1)(L.A),{value:M.value.content,"onUpdate:value":t[3]||(t[3]=e=>M.value.content=e),type:"textarea",placeholder:"记录你的学习心得...",autosize:{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["show"]),(0,n.bF)((0,r.R1)(he.A),{show:R.value,"onUpdate:show":t[9]||(t[9]=e=>R.value=e),preset:"card",title:"快速添加笔记",class:"w-full max-w-lg"},{footer:(0,n.k6)(()=>[(0,n.Lk)("div",Qe,[(0,n.bF)((0,r.R1)(m.Ay),{onClick:t[8]||(t[8]=e=>R.value=!1)},{default:(0,n.k6)(()=>[...t[21]||(t[21]=[(0,n.eW)("取消",-1)])]),_:1}),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",loading:S.value,onClick:U},{default:(0,n.k6)(()=>[...t[22]||(t[22]=[(0,n.eW)("保存",-1)])]),_:1},8,["loading"])])]),default:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(ge.A),{type:"warning",class:"mb-6","show-icon":""},{default:(0,n.k6)(()=>[...t[18]||(t[18]=[(0,n.eW)(" 如果此单词下已有笔记,此处输入的内容将替换原笔记内容,原笔记内容不会保存。 ",-1)])]),_:1}),(0,n.Lk)("div",De,[(0,n.Lk)("div",null,[t[19]||(t[19]=(0,n.Lk)("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"选择单词",-1)),(0,n.bF)((0,r.R1)(re.A),{value:I.value.word_id,"onUpdate:value":t[6]||(t[6]=e=>I.value.word_id=e),filterable:"",remote:"",placeholder:"输入单词搜索...",options:T.value,loading:_.value,onSearch:K,clearable:""},null,8,["value","options","loading"])]),(0,n.Lk)("div",null,[t[20]||(t[20]=(0,n.Lk)("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"笔记内容",-1)),(0,n.bF)((0,r.R1)(L.A),{value:I.value.content,"onUpdate:value":t[7]||(t[7]=e=>I.value.content=e),type:"textarea",placeholder:"记录你的学习心得...",autosize:{minRows:4,maxRows:8}},null,8,["value"])])])]),_:1},8,["show"])])}}},qe=o(71241);const Je=(0,qe.A)(Xe,[["__scopeId","data-v-0f0ff0fe"]]);var Ye=Je},62784:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r=(0,n.A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},64498:function(e,t,o){o.d(t,{A:function(){return B}});var n=o(55472),r=o(56768),a=o(90144),i=o(55405),l=o(81260),s=o(84279),c=o(4660),d=o(31603),u=o(73921),p=o(98351),v=o(79882),h=o(88733),g=o(25216),m=o(38741),f=o(34350),b=o(25972),w=o(13707),y=o(64075),x=o(98659);function C(e){const{lineHeight:t,borderRadius:o,fontWeightStrong:n,baseColor:r,dividerColor:a,actionColor:i,textColor1:l,textColor2:s,closeColorHover:c,closeColorPressed:d,closeIconColor:u,closeIconColorHover:p,closeIconColorPressed:v,infoColor:h,successColor:g,warningColor:m,errorColor:f,fontSize:b}=e;return Object.assign(Object.assign({},x.A),{fontSize:b,lineHeight:t,titleFontWeight:n,borderRadius:o,border:`1px solid ${a}`,color:i,titleTextColor:l,iconColor:s,contentTextColor:s,closeBorderRadius:o,closeColorHover:c,closeColorPressed:d,closeIconColor:u,closeIconColorHover:p,closeIconColorPressed:v,borderInfo:`1px solid ${(0,w.sN)(r,(0,w.QX)(h,{alpha:.25}))}`,colorInfo:(0,w.sN)(r,(0,w.QX)(h,{alpha:.08})),titleTextColorInfo:l,iconColorInfo:h,contentTextColorInfo:s,closeColorHoverInfo:c,closeColorPressedInfo:d,closeIconColorInfo:u,closeIconColorHoverInfo:p,closeIconColorPressedInfo:v,borderSuccess:`1px solid ${(0,w.sN)(r,(0,w.QX)(g,{alpha:.25}))}`,colorSuccess:(0,w.sN)(r,(0,w.QX)(g,{alpha:.08})),titleTextColorSuccess:l,iconColorSuccess:g,contentTextColorSuccess:s,closeColorHoverSuccess:c,closeColorPressedSuccess:d,closeIconColorSuccess:u,closeIconColorHoverSuccess:p,closeIconColorPressedSuccess:v,borderWarning:`1px solid ${(0,w.sN)(r,(0,w.QX)(m,{alpha:.33}))}`,colorWarning:(0,w.sN)(r,(0,w.QX)(m,{alpha:.08})),titleTextColorWarning:l,iconColorWarning:m,contentTextColorWarning:s,closeColorHoverWarning:c,closeColorPressedWarning:d,closeIconColorWarning:u,closeIconColorHoverWarning:p,closeIconColorPressedWarning:v,borderError:`1px solid ${(0,w.sN)(r,(0,w.QX)(f,{alpha:.25}))}`,colorError:(0,w.sN)(r,(0,w.QX)(f,{alpha:.08})),titleTextColorError:l,iconColorError:f,contentTextColorError:s,closeColorHoverError:c,closeColorPressedError:d,closeIconColorError:u,closeIconColorHoverError:p,closeIconColorPressedError:v})}const k={name:"Alert",common:y.A,self:C};var F=k,A=o(92548),z=(0,f.cB)("alert","\n line-height: var(--n-line-height);\n border-radius: var(--n-border-radius);\n position: relative;\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-color);\n text-align: start;\n word-break: break-word;\n",[(0,f.cE)("border","\n border-radius: inherit;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n transition: border-color .3s var(--n-bezier);\n border: var(--n-border);\n pointer-events: none;\n "),(0,f.cM)("closable",[(0,f.cB)("alert-body",[(0,f.cE)("title","\n padding-right: 24px;\n ")])]),(0,f.cE)("icon",{color:"var(--n-icon-color)"}),(0,f.cB)("alert-body",{padding:"var(--n-padding)"},[(0,f.cE)("title",{color:"var(--n-title-text-color)"}),(0,f.cE)("content",{color:"var(--n-content-text-color)"})]),(0,A._)({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),(0,f.cE)("icon","\n position: absolute;\n left: 0;\n top: 0;\n align-items: center;\n justify-content: center;\n display: flex;\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n margin: var(--n-icon-margin);\n "),(0,f.cE)("close","\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n position: absolute;\n right: 0;\n top: 0;\n margin: var(--n-close-margin);\n "),(0,f.cM)("show-icon",[(0,f.cB)("alert-body",{paddingLeft:"calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))"})]),(0,f.cM)("right-adjust",[(0,f.cB)("alert-body",{paddingRight:"calc(var(--n-close-size) + var(--n-padding) + 2px)"})]),(0,f.cB)("alert-body","\n border-radius: var(--n-border-radius);\n transition: border-color .3s var(--n-bezier);\n ",[(0,f.cE)("title","\n transition: color .3s var(--n-bezier);\n font-size: 16px;\n line-height: 19px;\n font-weight: var(--n-title-font-weight);\n ",[(0,f.c)("& +",[(0,f.cE)("content",{marginTop:"9px"})])]),(0,f.cE)("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),(0,f.cE)("icon",{transition:"color .3s var(--n-bezier)"})]);const P=Object.assign(Object.assign({},v.A.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function});var B=(0,r.pM)({name:"Alert",inheritAttrs:!1,props:P,slots:Object,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:o,inlineThemeDisabled:i,mergedRtlRef:l}=(0,h.Ay)(e),s=(0,v.A)("Alert","-alert",z,F,e,t),c=(0,m.I)("Alert",l,t),d=(0,r.EW)(()=>{const{common:{cubicBezierEaseInOut:t},self:o}=s.value,{fontSize:r,borderRadius:a,titleFontWeight:i,lineHeight:l,iconSize:c,iconMargin:d,iconMarginRtl:u,closeIconSize:p,closeBorderRadius:v,closeSize:h,closeMargin:g,closeMarginRtl:m,padding:b}=o,{type:w}=e,{left:y,right:x}=(0,n.Tj)(d);return{"--n-bezier":t,"--n-color":o[(0,f.cF)("color",w)],"--n-close-icon-size":p,"--n-close-border-radius":v,"--n-close-color-hover":o[(0,f.cF)("closeColorHover",w)],"--n-close-color-pressed":o[(0,f.cF)("closeColorPressed",w)],"--n-close-icon-color":o[(0,f.cF)("closeIconColor",w)],"--n-close-icon-color-hover":o[(0,f.cF)("closeIconColorHover",w)],"--n-close-icon-color-pressed":o[(0,f.cF)("closeIconColorPressed",w)],"--n-icon-color":o[(0,f.cF)("iconColor",w)],"--n-border":o[(0,f.cF)("border",w)],"--n-title-text-color":o[(0,f.cF)("titleTextColor",w)],"--n-content-text-color":o[(0,f.cF)("contentTextColor",w)],"--n-line-height":l,"--n-border-radius":a,"--n-font-size":r,"--n-title-font-weight":i,"--n-icon-size":c,"--n-icon-margin":d,"--n-icon-margin-rtl":u,"--n-close-size":h,"--n-close-margin":g,"--n-close-margin-rtl":m,"--n-padding":b,"--n-icon-margin-left":y,"--n-icon-margin-right":x}}),u=i?(0,g.R)("alert",(0,r.EW)(()=>e.type[0]),d,e):void 0,p=(0,a.KR)(!0),b=()=>{const{onAfterLeave:t,onAfterHide:o}=e;t&&t(),o&&o()},w=()=>{var t;Promise.resolve(null===(t=e.onClose)||void 0===t?void 0:t.call(e)).then(e=>{!1!==e&&(p.value=!1)})},y=()=>{b()};return{rtlEnabled:c,mergedClsPrefix:t,mergedBordered:o,visible:p,handleCloseClick:w,handleAfterLeave:y,mergedTheme:s,cssVars:i?void 0:d,themeClass:null===u||void 0===u?void 0:u.themeClass,onRender:null===u||void 0===u?void 0:u.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),(0,r.h)(i.A,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:e,$slots:t}=this,o={class:[`${e}-alert`,this.themeClass,this.closable&&`${e}-alert--closable`,this.showIcon&&`${e}-alert--show-icon`,!this.title&&this.closable&&`${e}-alert--right-adjust`,this.rtlEnabled&&`${e}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?(0,r.h)("div",Object.assign({},(0,r.v6)(this.$attrs,o)),this.closable&&(0,r.h)(l.A,{clsPrefix:e,class:`${e}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&(0,r.h)("div",{class:`${e}-alert__border`}),this.showIcon&&(0,r.h)("div",{class:`${e}-alert__icon`,"aria-hidden":"true"},(0,b.Nj)(t.icon,()=>[(0,r.h)(s.A,{clsPrefix:e},{default:()=>{switch(this.type){case"success":return(0,r.h)(c.A,null);case"info":return(0,r.h)(d.A,null);case"warning":return(0,r.h)(u.A,null);case"error":return(0,r.h)(p.A,null);default:return null}}})])),(0,r.h)("div",{class:[`${e}-alert-body`,this.mergedBordered&&`${e}-alert-body--bordered`]},(0,b.iQ)(t.header,t=>{const o=t||this.title;return o?(0,r.h)("div",{class:`${e}-alert-body__title`},o):null}),t.default&&(0,r.h)("div",{class:`${e}-alert-body__content`},t))):null}})}})},71168:function(e,t,o){o.d(t,{A:function(){return P}});var n=o(56768),r=o(90144),a=o(79882),i=o(88733),l=o(37901),s=o(86866),c=o(91462),d=o(36921),u=o(29767),p=o(77727);const v=(0,p.D)("n-popconfirm");var h=o(84279),g=o(73921),m=o(82813),f=o(25216),b=o(52126),w=o(25972),y=o(54880);const x={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},C=(0,b.Y)(x);var k=(0,n.pM)({name:"NPopconfirmPanel",props:x,setup(e){const{localeRef:t}=(0,m.A)("Popconfirm"),{inlineThemeDisabled:o}=(0,i.Ay)(),{mergedClsPrefixRef:a,mergedThemeRef:l,props:s}=(0,n.WQ)(v),c=(0,n.EW)(()=>{const{common:{cubicBezierEaseInOut:e},self:{fontSize:t,iconSize:o,iconColor:n}}=l.value;return{"--n-bezier":e,"--n-font-size":t,"--n-icon-size":o,"--n-icon-color":n}}),d=o?(0,f.R)("popconfirm-panel",void 0,c,s):void 0;return Object.assign(Object.assign({},(0,m.A)("Popconfirm")),{mergedClsPrefix:a,cssVars:o?void 0:c,localizedPositiveText:(0,n.EW)(()=>e.positiveText||t.value.positiveText),localizedNegativeText:(0,n.EW)(()=>e.negativeText||t.value.negativeText),positiveButtonProps:(0,r.lW)(s,"positiveButtonProps"),negativeButtonProps:(0,r.lW)(s,"negativeButtonProps"),handlePositiveClick(t){e.onPositiveClick(t)},handleNegativeClick(t){e.onNegativeClick(t)},themeClass:null===d||void 0===d?void 0:d.themeClass,onRender:null===d||void 0===d?void 0:d.onRender})},render(){var e;const{mergedClsPrefix:t,showIcon:o,$slots:r}=this,a=(0,w.Nj)(r.action,()=>null===this.negativeText&&null===this.positiveText?[]:[null!==this.negativeText&&(0,n.h)(y.Ay,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),null!==this.positiveText&&(0,n.h)(y.Ay,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return null===(e=this.onRender)||void 0===e||e.call(this),(0,n.h)("div",{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},(0,w.iQ)(r.default,e=>o||e?(0,n.h)("div",{class:`${t}-popconfirm__body`},o?(0,n.h)("div",{class:`${t}-popconfirm__icon`},(0,w.Nj)(r.icon,()=>[(0,n.h)(h.A,{clsPrefix:t},{default:()=>(0,n.h)(g.A,null)})])):null,e):null),a?(0,n.h)("div",{class:[`${t}-popconfirm__action`]},a):null)}}),F=o(34350),A=(0,F.cB)("popconfirm",[(0,F.cE)("body","\n font-size: var(--n-font-size);\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n position: relative;\n ",[(0,F.cE)("icon","\n display: flex;\n font-size: var(--n-icon-size);\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n margin: 0 8px 0 0;\n ")]),(0,F.cE)("action","\n display: flex;\n justify-content: flex-end;\n ",[(0,F.c)("&:not(:first-child)","margin-top: 8px"),(0,F.cB)("button",[(0,F.c)("&:not(:last-child)","margin-right: 8px;")])])]);const z=Object.assign(Object.assign(Object.assign({},a.A.props),d.vY),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:"click"},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function});var P=(0,n.pM)({name:"Popconfirm",props:z,slots:Object,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=(0,i.Ay)(),o=(0,a.A)("Popconfirm","-popconfirm",A,u.A,e,t),s=(0,r.KR)(null);function c(t){var o;if(!(null===(o=s.value)||void 0===o?void 0:o.getMergedShow()))return;const{onPositiveClick:n,"onUpdate:show":r}=e;Promise.resolve(!n||n(t)).then(e=>{var t;!1!==e&&(null===(t=s.value)||void 0===t||t.setShow(!1),r&&(0,l.T)(r,!1))})}function d(t){var o;if(!(null===(o=s.value)||void 0===o?void 0:o.getMergedShow()))return;const{onNegativeClick:n,"onUpdate:show":r}=e;Promise.resolve(!n||n(t)).then(e=>{var t;!1!==e&&(null===(t=s.value)||void 0===t||t.setShow(!1),r&&(0,l.T)(r,!1))})}(0,n.Gt)(v,{mergedThemeRef:o,mergedClsPrefixRef:t,props:e});const p={setShow(e){var t;null===(t=s.value)||void 0===t||t.setShow(e)},syncPosition(){var e;null===(e=s.value)||void 0===e||e.syncPosition()},mergedTheme:o,popoverInstRef:s,handlePositiveClick:c,handleNegativeClick:d};return p},render(){const{$slots:e,$props:t,mergedTheme:o}=this;return(0,n.h)(d.Ay,Object.assign({},(0,s.c)(t,C),{theme:o.peers.Popover,themeOverrides:o.peerOverrides.Popover,internalExtraClass:["popconfirm"],ref:"popoverInstRef"}),{trigger:e.trigger,default:()=>{const o=(0,c.a)(t,C);return(0,n.h)(k,Object.assign({},o,{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}})},96530:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r=(0,n.A)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])}}]); -//# sourceMappingURL=774.e1ca78ab.js.map \ No newline at end of file diff --git a/dist/js/55.78a12f3b.js b/dist/js/78.f13937b1.js similarity index 52% rename from dist/js/55.78a12f3b.js rename to dist/js/78.f13937b1.js index 730e4f9..06b7fcd 100644 --- a/dist/js/55.78a12f3b.js +++ b/dist/js/78.f13937b1.js @@ -1,11 +1,4 @@ -(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[55],{1055:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return pe}});n(44114),n(18111),n(22489),n(61701),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698);var a=n(56768),r=n(90144),i=n(45130),s=n(24232),l=n(98728),o=n(97387),u=n(93913),c=n(59856),d=n(54880),f=n(43585),v=n(68042),h=n(9845),p=n(42517),m=n(92720),y=n(71168),g=n(48129),k=n(58911),x=n(52384),b=n(64498),w=n(19605),_=n(35720),$=n(57273),A=n(18169),R=n(19629),C=n(82089),M=n(6270),S=n(91733),F=n(55727),z=n(45525); -/** - * @license lucide-vue-next v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */ -const D=(0,z.A)("import",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m8 11 4 4 4-4",key:"1dohi6"}],["path",{d:"M8 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4",key:"1ywtjm"}]]);var j=n(96530),P=n(62784),W=n(1576),L=n.n(W),O=n(60782);const T={class:"page-container max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},I={class:"flex flex-col md:flex-row md:items-center justify-between gap-4 mb-8",initial:{opacity:0,y:-20},enter:{opacity:1,y:0}},E={class:"flex items-center gap-3 mb-2"},N={class:"flex flex-col sm:flex-row items-start sm:items-center gap-4"},K={class:"flex items-center gap-2 w-full sm:w-auto"},Y={class:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-lg shadow-sm border border-gray-100 dark:border-gray-700"},X={key:0,class:"mb-6"},q={key:0,class:"bg-blue-50 dark:bg-blue-900/20 p-4 rounded-lg flex items-start gap-3"},B={key:1,class:"bg-yellow-50 dark:bg-yellow-900/20 p-4 rounded-lg flex items-start gap-3"},H={key:1,class:"flex justify-center py-12"},U={key:2,class:"flex flex-col items-center justify-center py-16 text-center"},V={key:3,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},Q={class:"flex items-start justify-between gap-2"},J={class:"flex-1 min-w-0"},Z=["title"],G={class:"flex items-center gap-2 flex-shrink-0"},ee={class:"flex-1 flex flex-col gap-4"},te={class:"text-gray-500 dark:text-gray-400 text-sm line-clamp-2 h-10"},ne={class:"flex items-center justify-between mt-auto pt-4 border-t border-gray-50 dark:border-gray-800"},ae={class:"flex items-center gap-4 text-xs text-gray-400"},re={class:"flex items-center gap-1"},ie={class:"flex items-center gap-1"},se={key:4,class:"flex justify-center mt-8"},le={key:1,class:"text-gray-400 text-sm"},oe={class:"flex justify-end gap-3"},ue={class:"space-y-4"},ce={class:"mt-1 text-xs text-gray-500 text-right"},de={class:"flex justify-end gap-3"};var fe={__name:"ListsView",setup(e){const t=(0,O.Pj)(),n=(0,l.rd)(),z=(0,o.J)(),W=(0,r.KR)([]),fe=(0,r.KR)(!1),ve=(0,r.KR)(1),he=(0,r.KR)(!0),pe=(0,r.KR)(!1),me=(0,r.KR)(!1),ye=(0,r.KR)(""),ge=(0,a.EW)(()=>t.getters.userInfo),ke=(0,a.EW)(()=>ge.value?.detail?.is_vip),xe=(0,r.KR)(!1),be=(0,r.KR)("create"),we=(0,r.KR)(!1),_e=(0,r.KR)(null),$e=(0,r.Kh)({id:null,name:"",note:""}),Ae=(0,r.KR)(!1),Re=(0,r.KR)(!1),Ce=(0,r.KR)(!1),Me=(0,r.KR)([]),Se=(0,r.Kh)({listId:null,wordIds:[]}),Fe={name:{required:!0,message:"请输入词单名称",trigger:["blur","input"]}},ze=e=>L()(e).format("YYYY-MM-DD"),De=async(e=!1)=>{if(!fe.value){fe.value=!0;try{const t=await _.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/list",{params:{page:ve.value,limit:9,own:pe.value,search:ye.value}}),n=t.data.data||t.data,a=n.list||[],r=n.pagination||{};me.value=!!n.admin,W.value=e?[...W.value,...a]:a,he.value=ve.value<(r.total_pages||0)}catch(t){console.error(t),z.error("加载词单失败")}finally{fe.value=!1}}},je=()=>{he.value&&(ve.value++,De(!0))},Pe=()=>{ve.value=1,W.value=[],he.value=!0,De()};(0,a.wB)(pe,()=>{ve.value=1,W.value=[],he.value=!0,De()});const We=e=>{n.push({name:"list_detail",query:{list_id:e}})},Le=()=>{be.value="create",$e.id=null,$e.name="",$e.note="",xe.value=!0},Oe=e=>{be.value="edit",$e.id=e.id,$e.name=e.name,$e.note=e.note,xe.value=!0},Te=e=>{e.preventDefault(),_e.value?.validate(async e=>{if(!e){we.value=!0;try{const e={name:$e.name,note:$e.note};"edit"===be.value&&(e.list_id=$e.id),await _.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/adjust",e),z.success("create"===be.value?"创建成功":"更新成功"),xe.value=!1,ve.value=1,De()}catch(t){console.error(t),t.response?.data?.message.includes("只能创建")?z.error(t.response?.data?.message):z.error("操作失败")}finally{we.value=!1}}})},Ie=async e=>{try{await _.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/del",{list_id:e.id}),z.success("删除成功"),1===W.value.length&&ve.value>1&&ve.value--,ve.value=1,De()}catch(t){console.error(t),z.error("删除失败")}},Ee=e=>{Se.listId=e.id,Se.wordIds=[],Me.value=[],Ae.value=!0},Ne=async e=>{if(!e){const e=new Set(Se.wordIds);return void(Me.value=Me.value.filter(t=>e.has(t.value)))}Ce.value=!0;try{const t=await _.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/search",{keyword:e,page:1,limit:5}),n=t.data.data||t.data,a=(n.list||[]).map(e=>({label:e.word+(e.translations&&e.translations[0]?` (${e.translations[0].meaning})`:""),value:e.id})),r=new Set(Se.wordIds),i=Me.value.filter(e=>r.has(e.value)),s=[...i,...a],l=new Map;s.forEach(e=>l.set(e.value,e)),Me.value=Array.from(l.values())}catch(t){console.error("Search failed:",t)}finally{Ce.value=!1}},Ke=async()=>{if(0!==Se.wordIds.length)if(Se.wordIds.length>50)z.warning("一次最多只能导入50个单词");else{Re.value=!0;try{const e=await _.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/add_word",{list_id:Se.listId,word_id:Se.wordIds}),t=e.data.data||e.data;z.success(`导入成功,新增 ${t.added_count} 个单词`),Ae.value=!1,De()}catch(e){console.error("Import failed:",e),z.error(e.response?.data?.message||"导入失败")}finally{Re.value=!1}}else z.warning("请至少选择一个单词")};return(0,a.sV)(()=>{document.title="我的词单 - Word Helper",De()}),(e,t)=>{const n=(0,a.gN)("motion"),l=(0,a.gN)("motion-fade");return(0,a.uX)(),(0,a.CE)("div",T,[(0,a.bo)(((0,a.uX)(),(0,a.CE)("div",I,[(0,a.Lk)("div",null,[(0,a.Lk)("div",E,[(0,a.bF)((0,r.R1)($.A),{class:"w-8 h-8 text-primary"}),t[11]||(t[11]=(0,a.Lk)("h1",{class:"text-3xl font-bold text-gray-900 dark:text-white"},"我的词单",-1))]),t[12]||(t[12]=(0,a.Lk)("p",{class:"text-gray-500 dark:text-gray-400"},"管理您的自建词汇集合",-1))]),(0,a.Lk)("div",N,[(0,a.Lk)("div",K,[(0,a.bF)((0,r.R1)(u.A),{value:ye.value,"onUpdate:value":t[0]||(t[0]=e=>ye.value=e),placeholder:"输入词单名...",onKeyup:(0,i.jR)(Pe,["enter"]),clearable:"",onClear:Pe},{prefix:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),{component:(0,r.R1)(A.A)},null,8,["component"])]),_:1},8,["value"]),(0,a.bF)((0,r.R1)(d.Ay),{onClick:Pe},{default:(0,a.k6)(()=>[...t[13]||(t[13]=[(0,a.eW)("搜索",-1)])]),_:1})]),(0,a.Lk)("div",Y,[t[14]||(t[14]=(0,a.Lk)("span",{class:"text-sm text-gray-600 dark:text-gray-300"},"仅自建",-1)),(0,a.bF)((0,r.R1)(f.A),{value:pe.value,"onUpdate:value":t[1]||(t[1]=e=>pe.value=e),size:"small"},null,8,["value"])]),(0,a.bF)((0,r.R1)(d.Ay),{type:"primary",size:"medium",onClick:Le},{icon:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(R.A))]),_:1})]),default:(0,a.k6)(()=>[t[15]||(t[15]=(0,a.eW)(" 创建词单 ",-1))]),_:1})])])),[[n]]),ge.value?(0,a.bo)(((0,a.uX)(),(0,a.CE)("div",X,[ke.value?((0,a.uX)(),(0,a.CE)("div",q,[(0,a.bF)((0,r.R1)(C.A),{class:"w-5 h-5 text-blue-500 mt-0.5 flex-shrink-0"}),t[16]||(t[16]=(0,a.Lk)("p",{class:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed"}," 您是VIP用户,可无限量创建自建词单。 ",-1))])):((0,a.uX)(),(0,a.CE)("div",B,[(0,a.bF)((0,r.R1)(M.A),{class:"w-5 h-5 text-yellow-500 mt-0.5 flex-shrink-0"}),t[17]||(t[17]=(0,a.Lk)("p",{class:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed"},[(0,a.eW)(" 非VIP用户最多可创建5个自建词单,"),(0,a.Lk)("a",{href:"https://www.xn--xhq44jb2fzpc.com/subscribe",target:"_blank",class:"text-yellow-600 dark:text-yellow-400 font-bold hover:underline"},"赞助"),(0,a.eW)("可获得会员权限。 ")],-1))]))])),[[l]]):(0,a.Q3)("",!0),fe.value&&!W.value.length?((0,a.uX)(),(0,a.CE)("div",H,[(0,a.bF)((0,r.R1)(v.A),{size:"large"})])):W.value.length?((0,a.uX)(),(0,a.CE)("div",V,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(W.value,(e,l)=>(0,a.bo)(((0,a.uX)(),(0,a.Wv)((0,r.R1)(p.Ay),{key:e.id,class:"group cursor-pointer hover:shadow-lg transition-all duration-300 border-gray-100 dark:border-gray-800",bordered:!0,size:"medium","content-style":"display: flex; flex-direction: column; height: 100%;",initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:50*l}},onClick:t=>We(e.id)},{header:(0,a.k6)(()=>[(0,a.Lk)("div",Q,[(0,a.Lk)("div",J,[(0,a.Lk)("h3",{class:"text-lg font-bold text-gray-900 dark:text-white truncate",title:e.name},(0,s.v_)(e.name),9,Z)]),(0,a.Lk)("div",G,[(0,a.bF)((0,r.R1)(m.Ay),{type:e.official?"success":"info",size:"small",round:"",bordered:!1},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.official?"官方":"自建"),1)]),_:2},1032,["type"]),e.has_note?((0,a.uX)(),(0,a.Wv)((0,r.R1)(m.Ay),{key:0,type:"warning",size:"small",round:"",bordered:!1},{default:(0,a.k6)(()=>[...t[20]||(t[20]=[(0,a.eW)(" 配套笔记 ",-1)])]),_:1})):(0,a.Q3)("",!0)])])]),default:(0,a.k6)(()=>[(0,a.Lk)("div",ee,[(0,a.Lk)("p",te,(0,s.v_)(e.note||"暂无备注"),1),(0,a.Lk)("div",ne,[(0,a.Lk)("div",ae,[(0,a.Lk)("span",re,[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(S.A),{size:"14"})]),_:1}),(0,a.eW)(" "+(0,s.v_)(e.word_count)+" 词 ",1)]),(0,a.Lk)("span",ie,[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(F.A),{size:"14"})]),_:1}),(0,a.eW)(" "+(0,s.v_)(ze(e.created_at)),1)])]),!e.official||me.value?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"flex items-center gap-1 opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity",onClick:t[3]||(t[3]=(0,i.D$)(()=>{},["stop"]))},[(0,a.bF)((0,r.R1)(d.Ay),{quaternary:"",circle:"",size:"small",type:"success",onClick:t=>Ee(e),title:"导入单词"},{icon:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(D),{size:"16"})]),_:1})]),_:1},8,["onClick"]),(0,a.bF)((0,r.R1)(d.Ay),{quaternary:"",circle:"",size:"small",type:"primary",onClick:t=>Oe(e),title:"编辑词单"},{icon:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(j.A),{size:"16"})]),_:1})]),_:1},8,["onClick"]),(0,a.bF)((0,r.R1)(y.A),{onPositiveClick:t=>Ie(e),"negative-text":"取消","positive-text":"确定"},{trigger:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(d.Ay),{quaternary:"",circle:"",size:"small",type:"error",title:"删除词单"},{icon:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(P.A),{size:"16"})]),_:1})]),_:1})]),default:(0,a.k6)(()=>[t[21]||(t[21]=(0,a.eW)(" 确认删除该词单吗? ",-1))]),_:1},8,["onPositiveClick"])])):(0,a.Q3)("",!0)])])]),_:2},1032,["enter","onClick"])),[[n]])),128))])):((0,a.uX)(),(0,a.CE)("div",U,[(0,a.bF)((0,r.R1)(h.A),{description:"暂无词单数据",size:"large"},{extra:(0,a.k6)(()=>[pe.value?((0,a.uX)(),(0,a.Wv)((0,r.R1)(d.Ay),{key:0,size:"small",onClick:t[2]||(t[2]=e=>pe.value=!1)},{default:(0,a.k6)(()=>[...t[18]||(t[18]=[(0,a.eW)(" 查看所有词单 ",-1)])]),_:1})):((0,a.uX)(),(0,a.Wv)((0,r.R1)(d.Ay),{key:1,type:"primary",size:"medium",onClick:Le},{default:(0,a.k6)(()=>[...t[19]||(t[19]=[(0,a.eW)(" 创建第一个词单 ",-1)])]),_:1}))]),_:1})])),W.value.length>0?((0,a.uX)(),(0,a.CE)("div",se,[he.value?((0,a.uX)(),(0,a.Wv)((0,r.R1)(d.Ay),{key:0,loading:fe.value,ghost:"",type:"primary",onClick:je},{default:(0,a.k6)(()=>[...t[22]||(t[22]=[(0,a.eW)(" 加载更多 ",-1)])]),_:1},8,["loading"])):((0,a.uX)(),(0,a.CE)("span",le,"没有更多了"))])):(0,a.Q3)("",!0),(0,a.bF)((0,r.R1)(g.A),{show:xe.value,"onUpdate:show":t[7]||(t[7]=e=>xe.value=e),preset:"card",title:"create"===be.value?"创建新词单":"编辑词单",class:"w-full max-w-md"},{footer:(0,a.k6)(()=>[(0,a.Lk)("div",oe,[(0,a.bF)((0,r.R1)(d.Ay),{onClick:t[6]||(t[6]=e=>xe.value=!1)},{default:(0,a.k6)(()=>[...t[23]||(t[23]=[(0,a.eW)("取消",-1)])]),_:1}),(0,a.bF)((0,r.R1)(d.Ay),{type:"primary",loading:we.value,onClick:Te},{default:(0,a.k6)(()=>[...t[24]||(t[24]=[(0,a.eW)(" 确定 ",-1)])]),_:1},8,["loading"])])]),default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(k.A),{ref_key:"formRef",ref:_e,model:$e,rules:Fe,"label-placement":"left","label-width":"80","require-mark-placement":"right-hanging"},{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(x.Ay),{label:"名称",path:"name"},{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(u.A),{value:$e.name,"onUpdate:value":t[4]||(t[4]=e=>$e.name=e),placeholder:"请输入词单名称"},null,8,["value"])]),_:1}),(0,a.bF)((0,r.R1)(x.Ay),{label:"备注",path:"note"},{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(u.A),{value:$e.note,"onUpdate:value":t[5]||(t[5]=e=>$e.note=e),type:"textarea",placeholder:"请输入备注信息(可选)",autosize:{minRows:3,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["show","title"]),(0,a.bF)((0,r.R1)(g.A),{show:Ae.value,"onUpdate:show":t[10]||(t[10]=e=>Ae.value=e),preset:"card",title:"导入单词",class:"w-full max-w-lg"},{footer:(0,a.k6)(()=>[(0,a.Lk)("div",de,[(0,a.bF)((0,r.R1)(d.Ay),{onClick:t[9]||(t[9]=e=>Ae.value=!1)},{default:(0,a.k6)(()=>[...t[27]||(t[27]=[(0,a.eW)("取消",-1)])]),_:1}),(0,a.bF)((0,r.R1)(d.Ay),{type:"primary",loading:Re.value,onClick:Ke},{default:(0,a.k6)(()=>[...t[28]||(t[28]=[(0,a.eW)(" 开始导入 ",-1)])]),_:1},8,["loading"])])]),default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(b.A),{type:"info",class:"mb-6","show-icon":""},{default:(0,a.k6)(()=>[...t[25]||(t[25]=[(0,a.eW)(" 一次性最多导入50个单词,已存在的单词将不会被再次导入。 ",-1)])]),_:1}),(0,a.Lk)("div",ue,[(0,a.Lk)("div",null,[t[26]||(t[26]=(0,a.Lk)("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"选择单词 (最多50个)",-1)),(0,a.bF)((0,r.R1)(w.A),{value:Se.wordIds,"onUpdate:value":t[8]||(t[8]=e=>Se.wordIds=e),multiple:"",filterable:"",remote:"",placeholder:"输入单词搜索并选择...",options:Me.value,loading:Ce.value,onSearch:Ne,"max-tag-count":10,clearable:""},null,8,["value","options","loading"]),(0,a.Lk)("div",ce," 已选: "+(0,s.v_)(Se.wordIds.length)+" / 50 ",1)])])]),_:1},8,["show"])])}}},ve=n(71241);const he=(0,ve.A)(fe,[["__scopeId","data-v-25b7032f"]]);var pe=he},1576:function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";var e=1e3,t=6e4,n=36e5,a="millisecond",r="second",i="minute",s="hour",l="day",o="week",u="month",c="quarter",d="year",f="date",v="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},y=function(e,t,n){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),a=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+y(a,2,"0")+":"+y(r,2,"0")},m:function e(t,n){if(t.date()1)return e(s[0])}else{var l=t.name;x[l]=t,r=l}return!a&&r&&(k=r),r||!a&&k},$=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new R(n)},A=g;A.l=_,A.i=w,A.w=function(e,t){return $(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var R=function(){function m(e){this.$L=_(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[b]=!0}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(A.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var a=t.match(h);if(a){var r=a[2]-1||0,i=(a[7]||"0").substring(0,3);return n?new Date(Date.UTC(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,i)):new Date(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,i)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return A},y.isValid=function(){return!(this.$d.toString()===v)},y.isSame=function(e,t){var n=$(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return $(e)=t?e:""+Array(t+1-a.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),a=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+y(a,2,"0")+":"+y(r,2,"0")},m:function e(t,n){if(t.date()1)return e(s[0])}else{var l=t.name;x[l]=t,r=l}return!a&&r&&(k=r),r||!a&&k},$=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new R(n)},A=g;A.l=_,A.i=w,A.w=function(e,t){return $(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var R=function(){function m(e){this.$L=_(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[b]=!0}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(A.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var a=t.match(h);if(a){var r=a[2]-1||0,i=(a[7]||"0").substring(0,3);return n?new Date(Date.UTC(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,i)):new Date(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,i)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return A},y.isValid=function(){return!(this.$d.toString()===v)},y.isSame=function(e,t){var n=$(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return $(e)t.getters.userInfo),ke=(0,a.EW)(()=>ge.value?.detail?.is_vip),xe=(0,r.KR)(!1),be=(0,r.KR)("create"),we=(0,r.KR)(!1),_e=(0,r.KR)(null),$e=(0,r.Kh)({id:null,name:"",note:""}),Ae=(0,r.KR)(!1),Re=(0,r.KR)(!1),Ce=(0,r.KR)(!1),Me=(0,r.KR)([]),Se=(0,r.Kh)({listId:null,wordIds:[]}),Fe={name:{required:!0,message:"请输入词单名称",trigger:["blur","input"]}},ze=e=>L()(e).format("YYYY-MM-DD"),De=async(e=!1)=>{if(!fe.value){fe.value=!0;try{const t=await _.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/list",{params:{page:ve.value,limit:9,own:pe.value,search:ye.value}}),n=t.data.data||t.data,a=n.list||[],r=n.pagination||{};me.value=!!n.admin,W.value=e?[...W.value,...a]:a,he.value=ve.value<(r.total_pages||0)}catch(t){console.error(t),z.error("加载词单失败")}finally{fe.value=!1}}},je=()=>{he.value&&(ve.value++,De(!0))},Pe=()=>{ve.value=1,W.value=[],he.value=!0,De()};(0,a.wB)(pe,()=>{ve.value=1,W.value=[],he.value=!0,De()});const We=e=>{n.push({name:"list_detail",query:{list_id:e}})},Le=()=>{be.value="create",$e.id=null,$e.name="",$e.note="",xe.value=!0},Oe=e=>{be.value="edit",$e.id=e.id,$e.name=e.name,$e.note=e.note,xe.value=!0},Te=e=>{e.preventDefault(),_e.value?.validate(async e=>{if(!e){we.value=!0;try{const e={name:$e.name,note:$e.note};"edit"===be.value&&(e.list_id=$e.id),await _.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/adjust",e),z.success("create"===be.value?"创建成功":"更新成功"),xe.value=!1,ve.value=1,De()}catch(t){console.error(t),t.response?.data?.message.includes("只能创建")?z.error(t.response?.data?.message):z.error("操作失败")}finally{we.value=!1}}})},Ie=async e=>{try{await _.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/del",{list_id:e.id}),z.success("删除成功"),1===W.value.length&&ve.value>1&&ve.value--,ve.value=1,De()}catch(t){console.error(t),z.error("删除失败")}},Ee=e=>{Se.listId=e.id,Se.wordIds=[],Me.value=[],Ae.value=!0},Ne=async e=>{if(!e){const e=new Set(Se.wordIds);return void(Me.value=Me.value.filter(t=>e.has(t.value)))}Ce.value=!0;try{const t=await _.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/search",{keyword:e,page:1,limit:5}),n=t.data.data||t.data,a=(n.list||[]).map(e=>({label:e.word+(e.translations&&e.translations[0]?` (${e.translations[0].meaning})`:""),value:e.id})),r=new Set(Se.wordIds),i=Me.value.filter(e=>r.has(e.value)),s=[...i,...a],l=new Map;s.forEach(e=>l.set(e.value,e)),Me.value=Array.from(l.values())}catch(t){console.error("Search failed:",t)}finally{Ce.value=!1}},Ke=async()=>{if(0!==Se.wordIds.length)if(Se.wordIds.length>50)z.warning("一次最多只能导入50个单词");else{Re.value=!0;try{const e=await _.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/add_word",{list_id:Se.listId,word_id:Se.wordIds}),t=e.data.data||e.data;z.success(`导入成功,新增 ${t.added_count} 个单词`),Ae.value=!1,De()}catch(e){console.error("Import failed:",e),z.error(e.response?.data?.message||"导入失败")}finally{Re.value=!1}}else z.warning("请至少选择一个单词")};return(0,a.sV)(()=>{document.title="我的词单 - Word Helper",De()}),(e,t)=>{const n=(0,a.gN)("motion"),l=(0,a.gN)("motion-fade");return(0,a.uX)(),(0,a.CE)("div",T,[(0,a.bo)(((0,a.uX)(),(0,a.CE)("div",I,[(0,a.Lk)("div",null,[(0,a.Lk)("div",E,[(0,a.bF)((0,r.R1)($.A),{class:"w-8 h-8 text-primary"}),t[11]||(t[11]=(0,a.Lk)("h1",{class:"text-3xl font-bold text-gray-900 dark:text-white"},"我的词单",-1))]),t[12]||(t[12]=(0,a.Lk)("p",{class:"text-gray-500 dark:text-gray-400"},"管理您的自建词汇集合",-1))]),(0,a.Lk)("div",N,[(0,a.Lk)("div",K,[(0,a.bF)((0,r.R1)(u.A),{value:ye.value,"onUpdate:value":t[0]||(t[0]=e=>ye.value=e),placeholder:"输入词单名...",onKeyup:(0,i.jR)(Pe,["enter"]),clearable:"",onClear:Pe},{prefix:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),{component:(0,r.R1)(A.A)},null,8,["component"])]),_:1},8,["value"]),(0,a.bF)((0,r.R1)(d.Ay),{onClick:Pe},{default:(0,a.k6)(()=>[...t[13]||(t[13]=[(0,a.eW)("搜索",-1)])]),_:1})]),(0,a.Lk)("div",Y,[t[14]||(t[14]=(0,a.Lk)("span",{class:"text-sm text-gray-600 dark:text-gray-300"},"仅自建",-1)),(0,a.bF)((0,r.R1)(f.A),{value:pe.value,"onUpdate:value":t[1]||(t[1]=e=>pe.value=e),size:"small"},null,8,["value"])]),(0,a.bF)((0,r.R1)(d.Ay),{type:"primary",size:"medium",onClick:Le},{icon:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(R.A))]),_:1})]),default:(0,a.k6)(()=>[t[15]||(t[15]=(0,a.eW)(" 创建词单 ",-1))]),_:1})])])),[[n]]),ge.value?(0,a.bo)(((0,a.uX)(),(0,a.CE)("div",X,[ke.value?((0,a.uX)(),(0,a.CE)("div",q,[(0,a.bF)((0,r.R1)(C.A),{class:"w-5 h-5 text-blue-500 mt-0.5 flex-shrink-0"}),t[16]||(t[16]=(0,a.Lk)("p",{class:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed"}," 您是VIP用户,可无限量创建自建词单。 ",-1))])):((0,a.uX)(),(0,a.CE)("div",B,[(0,a.bF)((0,r.R1)(M.A),{class:"w-5 h-5 text-yellow-500 mt-0.5 flex-shrink-0"}),t[17]||(t[17]=(0,a.Lk)("p",{class:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed"},[(0,a.eW)(" 非VIP用户最多可创建5个自建词单,"),(0,a.Lk)("a",{href:"https://www.xn--xhq44jb2fzpc.com/subscribe",target:"_blank",class:"text-yellow-600 dark:text-yellow-400 font-bold hover:underline"},"赞助"),(0,a.eW)("可获得会员权限。 ")],-1))]))])),[[l]]):(0,a.Q3)("",!0),fe.value&&!W.value.length?((0,a.uX)(),(0,a.CE)("div",H,[(0,a.bF)((0,r.R1)(v.A),{size:"large"})])):W.value.length?((0,a.uX)(),(0,a.CE)("div",V,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(W.value,(e,l)=>(0,a.bo)(((0,a.uX)(),(0,a.Wv)((0,r.R1)(p.Ay),{key:e.id,class:"group cursor-pointer hover:shadow-lg transition-all duration-300 border-gray-100 dark:border-gray-800",bordered:!0,size:"medium","content-style":"display: flex; flex-direction: column; height: 100%;",initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:l%9*50}},onClick:t=>We(e.id)},{header:(0,a.k6)(()=>[(0,a.Lk)("div",Q,[(0,a.Lk)("div",J,[(0,a.Lk)("h3",{class:"text-lg font-bold text-gray-900 dark:text-white truncate",title:e.name},(0,s.v_)(e.name),9,Z)]),(0,a.Lk)("div",G,[(0,a.bF)((0,r.R1)(m.Ay),{type:e.official?"success":"info",size:"small",round:"",bordered:!1},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.official?"官方":"自建"),1)]),_:2},1032,["type"]),e.has_note?((0,a.uX)(),(0,a.Wv)((0,r.R1)(m.Ay),{key:0,type:"warning",size:"small",round:"",bordered:!1},{default:(0,a.k6)(()=>[...t[20]||(t[20]=[(0,a.eW)(" 配套笔记 ",-1)])]),_:1})):(0,a.Q3)("",!0)])])]),default:(0,a.k6)(()=>[(0,a.Lk)("div",ee,[(0,a.Lk)("p",te,(0,s.v_)(e.note||"暂无备注"),1),(0,a.Lk)("div",ne,[(0,a.Lk)("div",ae,[(0,a.Lk)("span",re,[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(S.A),{size:"14"})]),_:1}),(0,a.eW)(" "+(0,s.v_)(e.word_count)+" 词 ",1)]),(0,a.Lk)("span",ie,[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(F.A),{size:"14"})]),_:1}),(0,a.eW)(" "+(0,s.v_)(ze(e.created_at)),1)])]),!e.official||me.value?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"flex items-center gap-1 opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity",onClick:t[3]||(t[3]=(0,i.D$)(()=>{},["stop"]))},[(0,a.bF)((0,r.R1)(d.Ay),{quaternary:"",circle:"",size:"small",type:"success",onClick:t=>Ee(e),title:"导入单词"},{icon:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(D),{size:"16"})]),_:1})]),_:1},8,["onClick"]),(0,a.bF)((0,r.R1)(d.Ay),{quaternary:"",circle:"",size:"small",type:"primary",onClick:t=>Oe(e),title:"编辑词单"},{icon:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(j.A),{size:"16"})]),_:1})]),_:1},8,["onClick"]),(0,a.bF)((0,r.R1)(y.A),{onPositiveClick:t=>Ie(e),"negative-text":"取消","positive-text":"确定"},{trigger:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(d.Ay),{quaternary:"",circle:"",size:"small",type:"error",title:"删除词单"},{icon:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(c._),null,{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(P.A),{size:"16"})]),_:1})]),_:1})]),default:(0,a.k6)(()=>[t[21]||(t[21]=(0,a.eW)(" 确认删除该词单吗? ",-1))]),_:1},8,["onPositiveClick"])])):(0,a.Q3)("",!0)])])]),_:2},1032,["enter","onClick"])),[[n]])),128))])):((0,a.uX)(),(0,a.CE)("div",U,[(0,a.bF)((0,r.R1)(h.A),{description:"暂无词单数据",size:"large"},{extra:(0,a.k6)(()=>[pe.value?((0,a.uX)(),(0,a.Wv)((0,r.R1)(d.Ay),{key:0,size:"small",onClick:t[2]||(t[2]=e=>pe.value=!1)},{default:(0,a.k6)(()=>[...t[18]||(t[18]=[(0,a.eW)(" 查看所有词单 ",-1)])]),_:1})):((0,a.uX)(),(0,a.Wv)((0,r.R1)(d.Ay),{key:1,type:"primary",size:"medium",onClick:Le},{default:(0,a.k6)(()=>[...t[19]||(t[19]=[(0,a.eW)(" 创建第一个词单 ",-1)])]),_:1}))]),_:1})])),W.value.length>0?((0,a.uX)(),(0,a.CE)("div",se,[he.value?((0,a.uX)(),(0,a.Wv)((0,r.R1)(d.Ay),{key:0,loading:fe.value,ghost:"",type:"primary",onClick:je},{default:(0,a.k6)(()=>[...t[22]||(t[22]=[(0,a.eW)(" 加载更多 ",-1)])]),_:1},8,["loading"])):((0,a.uX)(),(0,a.CE)("span",le,"没有更多了"))])):(0,a.Q3)("",!0),(0,a.bF)((0,r.R1)(g.A),{show:xe.value,"onUpdate:show":t[7]||(t[7]=e=>xe.value=e),preset:"card",title:"create"===be.value?"创建新词单":"编辑词单",class:"w-full max-w-md"},{footer:(0,a.k6)(()=>[(0,a.Lk)("div",oe,[(0,a.bF)((0,r.R1)(d.Ay),{onClick:t[6]||(t[6]=e=>xe.value=!1)},{default:(0,a.k6)(()=>[...t[23]||(t[23]=[(0,a.eW)("取消",-1)])]),_:1}),(0,a.bF)((0,r.R1)(d.Ay),{type:"primary",loading:we.value,onClick:Te},{default:(0,a.k6)(()=>[...t[24]||(t[24]=[(0,a.eW)(" 确定 ",-1)])]),_:1},8,["loading"])])]),default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(k.A),{ref_key:"formRef",ref:_e,model:$e,rules:Fe,"label-placement":"left","label-width":"80","require-mark-placement":"right-hanging"},{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(x.Ay),{label:"名称",path:"name"},{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(u.A),{value:$e.name,"onUpdate:value":t[4]||(t[4]=e=>$e.name=e),placeholder:"请输入词单名称"},null,8,["value"])]),_:1}),(0,a.bF)((0,r.R1)(x.Ay),{label:"备注",path:"note"},{default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(u.A),{value:$e.note,"onUpdate:value":t[5]||(t[5]=e=>$e.note=e),type:"textarea",placeholder:"请输入备注信息(可选)",autosize:{minRows:3,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["show","title"]),(0,a.bF)((0,r.R1)(g.A),{show:Ae.value,"onUpdate:show":t[10]||(t[10]=e=>Ae.value=e),preset:"card",title:"导入单词",class:"w-full max-w-lg"},{footer:(0,a.k6)(()=>[(0,a.Lk)("div",de,[(0,a.bF)((0,r.R1)(d.Ay),{onClick:t[9]||(t[9]=e=>Ae.value=!1)},{default:(0,a.k6)(()=>[...t[27]||(t[27]=[(0,a.eW)("取消",-1)])]),_:1}),(0,a.bF)((0,r.R1)(d.Ay),{type:"primary",loading:Re.value,onClick:Ke},{default:(0,a.k6)(()=>[...t[28]||(t[28]=[(0,a.eW)(" 开始导入 ",-1)])]),_:1},8,["loading"])])]),default:(0,a.k6)(()=>[(0,a.bF)((0,r.R1)(b.A),{type:"info",class:"mb-6","show-icon":""},{default:(0,a.k6)(()=>[...t[25]||(t[25]=[(0,a.eW)(" 一次性最多导入50个单词,已存在的单词将不会被再次导入。 ",-1)])]),_:1}),(0,a.Lk)("div",ue,[(0,a.Lk)("div",null,[t[26]||(t[26]=(0,a.Lk)("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"选择单词 (最多50个)",-1)),(0,a.bF)((0,r.R1)(w.A),{value:Se.wordIds,"onUpdate:value":t[8]||(t[8]=e=>Se.wordIds=e),multiple:"",filterable:"",remote:"",placeholder:"输入单词搜索并选择...",options:Me.value,loading:Ce.value,onSearch:Ne,"max-tag-count":10,clearable:""},null,8,["value","options","loading"]),(0,a.Lk)("div",ce," 已选: "+(0,s.v_)(Se.wordIds.length)+" / 50 ",1)])])]),_:1},8,["show"])])}}},ve=n(71241);const he=(0,ve.A)(fe,[["__scopeId","data-v-7b31df80"]]);var pe=he},55727:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});var a=n(45525); /** * @license lucide-vue-next v0.562.0 - ISC * @@ -42,4 +42,4 @@ const D=(0,z.A)("import",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m8 11 * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const r=(0,a.A)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])}}]); -//# sourceMappingURL=55.78a12f3b.js.map \ No newline at end of file +//# sourceMappingURL=78.f13937b1.js.map \ No newline at end of file diff --git a/dist/js/933.be643a77.js b/dist/js/933.be643a77.js new file mode 100644 index 0000000..d82508a --- /dev/null +++ b/dist/js/933.be643a77.js @@ -0,0 +1,21 @@ +"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[933],{9845:function(e,n,t){t.d(n,{A:function(){return v}});var i=t(56768),o=t(84279),r=(0,i.pM)({name:"Empty",render(){return(0,i.h)("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),(0,i.h)("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),l=t(79882),s=t(88733),a=t(82813),c=t(25216),d=t(34350),m=t(52945),p=(0,d.cB)("empty","\n display: flex;\n flex-direction: column;\n align-items: center;\n font-size: var(--n-font-size);\n",[(0,d.cE)("icon","\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n line-height: var(--n-icon-size);\n color: var(--n-icon-color);\n transition:\n color .3s var(--n-bezier);\n ",[(0,d.c)("+",[(0,d.cE)("description","\n margin-top: 8px;\n ")])]),(0,d.cE)("description","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),(0,d.cE)("extra","\n text-align: center;\n transition: color .3s var(--n-bezier);\n margin-top: 12px;\n color: var(--n-extra-text-color);\n ")]);const u=Object.assign(Object.assign({},l.A.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function});var v=(0,i.pM)({name:"Empty",props:u,slots:Object,setup(e){const{mergedClsPrefixRef:n,inlineThemeDisabled:t,mergedComponentPropsRef:o}=(0,s.Ay)(e),u=(0,l.A)("Empty","-empty",p,m.A,e,n),{localeRef:v}=(0,a.A)("Empty"),h=(0,i.EW)(()=>{var n,t,i;return null!==(n=e.description)&&void 0!==n?n:null===(i=null===(t=null===o||void 0===o?void 0:o.value)||void 0===t?void 0:t.Empty)||void 0===i?void 0:i.description}),f=(0,i.EW)(()=>{var e,n;return(null===(n=null===(e=null===o||void 0===o?void 0:o.value)||void 0===e?void 0:e.Empty)||void 0===n?void 0:n.renderIcon)||(()=>(0,i.h)(r,null))}),g=(0,i.EW)(()=>{const{size:n}=e,{common:{cubicBezierEaseInOut:t},self:{[(0,d.cF)("iconSize",n)]:i,[(0,d.cF)("fontSize",n)]:o,textColor:r,iconColor:l,extraTextColor:s}}=u.value;return{"--n-icon-size":i,"--n-font-size":o,"--n-bezier":t,"--n-text-color":r,"--n-icon-color":l,"--n-extra-text-color":s}}),y=t?(0,c.R)("empty",(0,i.EW)(()=>{let n="";const{size:t}=e;return n+=t[0],n}),g,e):void 0;return{mergedClsPrefix:n,mergedRenderIcon:f,localizedDescription:(0,i.EW)(()=>h.value||v.value.description),cssVars:t?void 0:g,themeClass:null===y||void 0===y?void 0:y.themeClass,onRender:null===y||void 0===y?void 0:y.onRender}},render(){const{$slots:e,mergedClsPrefix:n,onRender:t}=this;return null===t||void 0===t||t(),(0,i.h)("div",{class:[`${n}-empty`,this.themeClass],style:this.cssVars},this.showIcon?(0,i.h)("div",{class:`${n}-empty__icon`},e.icon?e.icon():(0,i.h)(o.A,{clsPrefix:n},{default:this.mergedRenderIcon})):null,this.showDescription?(0,i.h)("div",{class:`${n}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?(0,i.h)("div",{class:`${n}-empty__extra`},e.extra()):null)}})},55200:function(e,n,t){t.d(n,{A:function(){return o}});var i=t(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o=(0,i.A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},61933:function(e,n,t){t.r(n),t.d(n,{default:function(){return le}});t(44114);var i=t(56768),o=t(90144),r=t(24232),l=t(98728),s=t(97387),a=t(59856),c=t(68042),d=t(79882),m=t(88733),p=t(77727),u=t(64075),v=t(96092);function h(e){const{textColor3:n,infoColor:t,errorColor:i,successColor:o,warningColor:r,textColor1:l,textColor2:s,railColor:a,fontWeightStrong:c,fontSize:d}=e;return Object.assign(Object.assign({},v.A),{contentFontSize:d,titleFontWeight:c,circleBorder:`2px solid ${n}`,circleBorderInfo:`2px solid ${t}`,circleBorderError:`2px solid ${i}`,circleBorderSuccess:`2px solid ${o}`,circleBorderWarning:`2px solid ${r}`,iconColor:n,iconColorInfo:t,iconColorError:i,iconColorSuccess:o,iconColorWarning:r,titleTextColor:l,contentTextColor:s,metaTextColor:n,lineColor:a})}const f={name:"Timeline",common:u.A,self:h};var g=f,y=t(34350);const x=1.25;var z=(0,y.cB)("timeline",`\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n line-height: ${x};\n`,[(0,y.cM)("horizontal","\n flex-direction: row;\n ",[(0,y.c)(">",[(0,y.cB)("timeline-item","\n flex-shrink: 0;\n padding-right: 40px;\n ",[(0,y.cM)("dashed-line-type",[(0,y.c)(">",[(0,y.cB)("timeline-item-timeline",[(0,y.cE)("line","\n background-image: linear-gradient(90deg, var(--n-color-start), var(--n-color-start) 50%, transparent 50%, transparent 100%);\n background-size: 10px 1px;\n ")])])]),(0,y.c)(">",[(0,y.cB)("timeline-item-content","\n margin-top: calc(var(--n-icon-size) + 12px);\n ",[(0,y.c)(">",[(0,y.cE)("meta","\n margin-top: 6px;\n margin-bottom: unset;\n ")])]),(0,y.cB)("timeline-item-timeline","\n width: 100%;\n height: calc(var(--n-icon-size) + 12px);\n ",[(0,y.cE)("line","\n left: var(--n-icon-size);\n top: calc(var(--n-icon-size) / 2 - 1px);\n right: 0px;\n width: unset;\n height: 2px;\n ")])])])])]),(0,y.cM)("right-placement",[(0,y.cB)("timeline-item",[(0,y.cB)("timeline-item-content","\n text-align: right;\n margin-right: calc(var(--n-icon-size) + 12px);\n "),(0,y.cB)("timeline-item-timeline","\n width: var(--n-icon-size);\n right: 0;\n ")])]),(0,y.cM)("left-placement",[(0,y.cB)("timeline-item",[(0,y.cB)("timeline-item-content","\n margin-left: calc(var(--n-icon-size) + 12px);\n "),(0,y.cB)("timeline-item-timeline","\n left: 0;\n ")])]),(0,y.cB)("timeline-item","\n position: relative;\n ",[(0,y.c)("&:last-child",[(0,y.cB)("timeline-item-timeline",[(0,y.cE)("line","\n display: none;\n ")]),(0,y.cB)("timeline-item-content",[(0,y.cE)("meta","\n margin-bottom: 0;\n ")])]),(0,y.cB)("timeline-item-content",[(0,y.cE)("title","\n margin: var(--n-title-margin);\n font-size: var(--n-title-font-size);\n transition: color .3s var(--n-bezier);\n font-weight: var(--n-title-font-weight);\n color: var(--n-title-text-color);\n "),(0,y.cE)("content","\n transition: color .3s var(--n-bezier);\n font-size: var(--n-content-font-size);\n color: var(--n-content-text-color);\n "),(0,y.cE)("meta","\n transition: color .3s var(--n-bezier);\n font-size: 12px;\n margin-top: 6px;\n margin-bottom: 20px;\n color: var(--n-meta-text-color);\n ")]),(0,y.cM)("dashed-line-type",[(0,y.cB)("timeline-item-timeline",[(0,y.cE)("line","\n --n-color-start: var(--n-line-color);\n transition: --n-color-start .3s var(--n-bezier);\n background-color: transparent;\n background-image: linear-gradient(180deg, var(--n-color-start), var(--n-color-start) 50%, transparent 50%, transparent 100%);\n background-size: 1px 10px;\n ")])]),(0,y.cB)("timeline-item-timeline",`\n width: calc(var(--n-icon-size) + 12px);\n position: absolute;\n top: calc(var(--n-title-font-size) * ${x} / 2 - var(--n-icon-size) / 2);\n height: 100%;\n `,[(0,y.cE)("circle","\n border: var(--n-circle-border);\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n border-radius: var(--n-icon-size);\n box-sizing: border-box;\n "),(0,y.cE)("icon","\n color: var(--n-icon-color);\n font-size: var(--n-icon-size);\n height: var(--n-icon-size);\n width: var(--n-icon-size);\n display: flex;\n align-items: center;\n justify-content: center;\n "),(0,y.cE)("line","\n transition: background-color .3s var(--n-bezier);\n position: absolute;\n top: var(--n-icon-size);\n left: calc(var(--n-icon-size) / 2 - 1px);\n bottom: 0px;\n width: 2px;\n background-color: var(--n-line-color);\n ")])])]);const b=Object.assign(Object.assign({},d.A.props),{horizontal:Boolean,itemPlacement:{type:String,default:"left"},size:{type:String,default:"medium"},iconSize:Number}),C=(0,p.D)("n-timeline");var k=(0,i.pM)({name:"Timeline",props:b,setup(e,{slots:n}){const{mergedClsPrefixRef:t}=(0,m.Ay)(e),o=(0,d.A)("Timeline","-timeline",z,g,e,t);return(0,i.Gt)(C,{props:e,mergedThemeRef:o,mergedClsPrefixRef:t}),()=>{const{value:o}=t;return(0,i.h)("div",{class:[`${o}-timeline`,e.horizontal&&`${o}-timeline--horizontal`,`${o}-timeline--${e.size}-size`,!e.horizontal&&`${o}-timeline--${e.itemPlacement}-placement`]},n)}}}),w=t(25216),R=t(35268),$=t(87996),_=t(35444),E=t(25972);const S={time:[String,Number],title:String,content:String,color:String,lineType:{type:String,default:"default"},type:{type:String,default:"default"}};var B=(0,i.pM)({name:"TimelineItem",props:S,slots:Object,setup(e){const n=(0,i.WQ)(C);n||(0,R.$8)("timeline-item","`n-timeline-item` must be placed inside `n-timeline`."),(0,$.w)();const{inlineThemeDisabled:t}=(0,m.Ay)(),o=(0,i.EW)(()=>{const{props:{size:t,iconSize:i},mergedThemeRef:o}=n,{type:r}=e,{self:{titleTextColor:l,contentTextColor:s,metaTextColor:a,lineColor:c,titleFontWeight:d,contentFontSize:m,[(0,y.cF)("iconSize",t)]:p,[(0,y.cF)("titleMargin",t)]:u,[(0,y.cF)("titleFontSize",t)]:v,[(0,y.cF)("circleBorder",r)]:h,[(0,y.cF)("iconColor",r)]:f},common:{cubicBezierEaseInOut:g}}=o.value;return{"--n-bezier":g,"--n-circle-border":h,"--n-icon-color":f,"--n-content-font-size":m,"--n-content-text-color":s,"--n-line-color":c,"--n-meta-text-color":a,"--n-title-font-size":v,"--n-title-font-weight":d,"--n-title-margin":u,"--n-title-text-color":l,"--n-icon-size":(0,_.i)(i)||p}}),r=t?(0,w.R)("timeline-item",(0,i.EW)(()=>{const{props:{size:t,iconSize:i}}=n,{type:o}=e;return`${t[0]}${i||"a"}${o[0]}`}),o,n.props):void 0;return{mergedClsPrefix:n.mergedClsPrefixRef,cssVars:t?void 0:o,themeClass:null===r||void 0===r?void 0:r.themeClass,onRender:null===r||void 0===r?void 0:r.onRender}},render(){const{mergedClsPrefix:e,color:n,onRender:t,$slots:o}=this;return null===t||void 0===t||t(),(0,i.h)("div",{class:[`${e}-timeline-item`,this.themeClass,`${e}-timeline-item--${this.type}-type`,`${e}-timeline-item--${this.lineType}-line-type`],style:this.cssVars},(0,i.h)("div",{class:`${e}-timeline-item-timeline`},(0,i.h)("div",{class:`${e}-timeline-item-timeline__line`}),(0,E.iQ)(o.icon,t=>t?(0,i.h)("div",{class:`${e}-timeline-item-timeline__icon`,style:{color:n}},t):(0,i.h)("div",{class:`${e}-timeline-item-timeline__circle`,style:{borderColor:n}}))),(0,i.h)("div",{class:`${e}-timeline-item-content`},(0,E.iQ)(o.header,n=>{const t=n||this.title;return t?(0,i.h)("div",{class:`${e}-timeline-item-content__title`},n||this.title):null}),(0,i.h)("div",{class:`${e}-timeline-item-content__content`},(0,E.Nj)(o.default,()=>[this.content])),(0,i.h)("div",{class:`${e}-timeline-item-content__meta`},(0,E.Nj)(o.footer,()=>[this.time]))))}}),A=t(42517),W=t(92720),L=t(54880),j=t(9845),F=t(26961),M=t(55200),T=t(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const V=(0,T.A)("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);var P=t(91733),O=t(29554),I=t(6127),X=t(35720);const H={class:"page-container max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},D={class:"mb-8 flex items-center justify-between",initial:{opacity:0,y:-20},enter:{opacity:1,y:0,transition:{duration:500}}},N={class:"flex items-center gap-3"},K={class:"p-3 bg-primary/10 rounded-xl dark:bg-primary/20"},Y={key:0,class:"flex justify-center py-12"},Z={key:1},Q={class:"flex items-start justify-between gap-4"},q={class:"flex-1"},G={class:"flex items-center gap-2 mb-2"},J=["onClick"],U={class:"flex items-center gap-2"},ee={class:"flex justify-center mt-8 mb-12"},ne={key:1,class:"text-gray-400 text-sm py-4"},te={key:2,class:"flex flex-col items-center justify-center py-20"};var ie={__name:"LearnRecView",setup(e){const n=(0,l.rd)(),t=(0,s.J)(),d=(0,o.KR)([]),m=(0,o.KR)(1),p=(0,o.KR)(!1),u=(0,o.KR)(!0),v=(0,o.KR)(0),h=e=>(0,I.NR)(e,"YYYY-MM-DD HH:mm:ss").value,f=e=>{const n=["success","info","warning","error"];return n[e%n.length]},g=e=>{const t=n.resolve({path:"/word",query:{word_id:e}});window.open(t.href,"_blank")},y=async(e=!1)=>{if(!p.value){p.value=!0;try{const n=await X.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/learn_record/list",{params:{page:m.value}});if(200===n.data.code||n.data.list){const t=n.data,i=t.list||[],o=t.pagination;e?d.value.push(...i):d.value=i,v.value=o.total_items,m.value>=o.total_pages?u.value=!1:u.value=!0}}catch(n){console.error("获取学习记录失败:",n),t.error("获取学习记录失败,请稍后重试")}finally{p.value=!1}}},x=()=>{u.value&&!p.value&&(m.value++,y(!0))};return(0,i.sV)(()=>{document.title="学习记录 - Word Helper",y()}),(e,n)=>{const t=(0,i.gN)("motion");return(0,i.uX)(),(0,i.CE)("div",H,[(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",D,[(0,i.Lk)("div",N,[(0,i.Lk)("div",K,[(0,i.bF)((0,o.R1)(a._),{size:"24",class:"text-primary"},{default:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(F.A))]),_:1})]),n[1]||(n[1]=(0,i.Lk)("div",null,[(0,i.Lk)("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"学习足迹"),(0,i.Lk)("p",{class:"text-sm text-gray-500 dark:text-gray-400 mt-1"}," 记录你的每一次进步 ")],-1))])])),[[t]]),p.value&&0===d.value.length?((0,i.uX)(),(0,i.CE)("div",Y,[(0,i.bF)((0,o.R1)(c.A),{size:"large"})])):d.value.length>0?((0,i.uX)(),(0,i.CE)("div",Z,[(0,i.bF)((0,o.R1)(k),{size:"large"},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(d.value,(e,l)=>(0,i.bo)(((0,i.uX)(),(0,i.Wv)((0,o.R1)(B),{key:e.id,type:f(l),time:h(e.created_at),initial:{opacity:0,x:-20},enter:{opacity:1,x:0,transition:{duration:300,delay:l%20*50}}},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(a._),null,{default:(0,i.k6)(()=>[e.dictionary?((0,i.uX)(),(0,i.Wv)((0,o.R1)(M.A),{key:0})):((0,i.uX)(),(0,i.Wv)((0,o.R1)(V),{key:1}))]),_:2},1024)]),default:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(A.Ay),{class:"mb-4 shadow-sm hover:shadow-md transition-shadow duration-300 rounded-xl border-gray-100 dark:border-gray-800",size:"small",bordered:!0},{default:(0,i.k6)(()=>[(0,i.Lk)("div",Q,[(0,i.Lk)("div",q,[(0,i.Lk)("div",G,[(0,i.Lk)("h3",{class:"text-lg font-bold text-gray-900 dark:text-white hover:text-primary cursor-pointer transition-colors",onClick:n=>g(e.word.id)},(0,r.v_)(e.word.content),9,J),(0,i.Lk)("div",U,[e.dictionary?((0,i.uX)(),(0,i.Wv)((0,o.R1)(W.Ay),{key:0,type:"success",size:"small",round:"",class:"flex items-center"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(a._),{component:(0,o.R1)(P.A)},null,8,["component"])]),default:(0,i.k6)(()=>[(0,i.eW)(" 在词书 "+(0,r.v_)(e.dictionary.tag||e.dictionary.name)+" 中学习 ",1)]),_:2},1024)):((0,i.uX)(),(0,i.Wv)((0,o.R1)(W.Ay),{key:1,type:"info",size:"small",round:"",class:"flex items-center"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(a._),{component:(0,o.R1)(O.A)},null,8,["component"])]),default:(0,i.k6)(()=>[n[2]||(n[2]=(0,i.eW)(" 自主学习 ",-1))]),_:1}))])])])])]),_:2},1024)]),_:2},1032,["type","time","enter"])),[[t]])),128))]),_:1}),(0,i.Lk)("div",ee,[u.value?((0,i.uX)(),(0,i.Wv)((0,o.R1)(L.Ay),{key:0,loading:p.value,onClick:x,secondary:"",type:"primary",round:"",size:"large"},{default:(0,i.k6)(()=>[(0,i.eW)((0,r.v_)(p.value?"加载中...":"加载更多记录"),1)]),_:1},8,["loading"])):((0,i.uX)(),(0,i.CE)("div",ne," 没有更多记录了 "))])])):((0,i.uX)(),(0,i.CE)("div",te,[(0,i.bF)((0,o.R1)(j.A),{description:"暂无学习记录"},{extra:(0,i.k6)(()=>[(0,i.bF)((0,o.R1)(L.Ay),{type:"primary",onClick:n[0]||(n[0]=n=>e.$router.push("/dict"))},{default:(0,i.k6)(()=>[...n[3]||(n[3]=[(0,i.eW)(" 去开始学习 ",-1)])]),_:1})]),_:1})]))])}}},oe=t(71241);const re=(0,oe.A)(ie,[["__scopeId","data-v-f61e1e9c"]]);var le=re},68042:function(e,n,t){t.d(n,{A:function(){return y}});var i=t(55472),o=t(37485),r=t(56768),l=t(90144),s=t(45130),a=t(21905),c=t(79882),d=t(88733),m=t(25216),p=t(34350),u=t(54507),v=t(29895),h=(0,p.c)([(0,p.c)("@keyframes spin-rotate","\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n "),(0,p.cB)("spin-container","\n position: relative;\n ",[(0,p.cB)("spin-body","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n ",[(0,v.v)()])]),(0,p.cB)("spin-body","\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n "),(0,p.cB)("spin","\n display: inline-flex;\n height: var(--n-size);\n width: var(--n-size);\n font-size: var(--n-size);\n color: var(--n-color);\n ",[(0,p.cM)("rotate","\n animation: spin-rotate 2s linear infinite;\n ")]),(0,p.cB)("spin-description","\n display: inline-block;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n margin-top: 8px;\n "),(0,p.cB)("spin-content","\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n pointer-events: all;\n ",[(0,p.cM)("spinning","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: none;\n opacity: var(--n-opacity-spinning);\n ")])]);const f={small:20,medium:18,large:16},g=Object.assign(Object.assign({},c.A.props),{contentClass:String,contentStyle:[Object,String],description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number});var y=(0,r.pM)({name:"Spin",props:g,slots:Object,setup(e){const{mergedClsPrefixRef:n,inlineThemeDisabled:t}=(0,d.Ay)(e),s=(0,c.A)("Spin","-spin",h,u.A,e,n),a=(0,r.EW)(()=>{const{size:n}=e,{common:{cubicBezierEaseInOut:t},self:o}=s.value,{opacitySpinning:r,color:l,textColor:a}=o,c="number"===typeof n?(0,i.Cw)(n):o[(0,p.cF)("size",n)];return{"--n-bezier":t,"--n-opacity-spinning":r,"--n-size":c,"--n-color":l,"--n-text-color":a}}),v=t?(0,m.R)("spin",(0,r.EW)(()=>{const{size:n}=e;return"number"===typeof n?String(n):n[0]}),a,e):void 0,g=(0,o.A)(e,["spinning","show"]),y=(0,l.KR)(!1);return(0,r.nT)(n=>{let t;if(g.value){const{delay:i}=e;if(i)return t=window.setTimeout(()=>{y.value=!0},i),void n(()=>{clearTimeout(t)})}y.value=g.value}),{mergedClsPrefix:n,active:y,mergedStrokeWidth:(0,r.EW)(()=>{const{strokeWidth:n}=e;if(void 0!==n)return n;const{size:t}=e;return f["number"===typeof t?"medium":t]}),cssVars:t?void 0:a,themeClass:null===v||void 0===v?void 0:v.themeClass,onRender:null===v||void 0===v?void 0:v.onRender}},render(){var e,n;const{$slots:t,mergedClsPrefix:i,description:o}=this,l=t.icon&&this.rotate,c=(o||t.description)&&(0,r.h)("div",{class:`${i}-spin-description`},o||(null===(e=t.description)||void 0===e?void 0:e.call(t))),d=t.icon?(0,r.h)("div",{class:[`${i}-spin-body`,this.themeClass]},(0,r.h)("div",{class:[`${i}-spin`,l&&`${i}-spin--rotate`],style:t.default?"":this.cssVars},t.icon()),c):(0,r.h)("div",{class:[`${i}-spin-body`,this.themeClass]},(0,r.h)(a.A,{clsPrefix:i,style:t.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${i}-spin`}),c);return null===(n=this.onRender)||void 0===n||n.call(this),t.default?(0,r.h)("div",{class:[`${i}-spin-container`,this.themeClass],style:this.cssVars},(0,r.h)("div",{class:[`${i}-spin-content`,this.active&&`${i}-spin-content--spinning`,this.contentClass],style:this.contentStyle},t),(0,r.h)(s.eB,{name:"fade-in-transition"},{default:()=>this.active?d:null})):d}})},87996:function(e,n,t){t.d(n,{w:function(){return r}});var i=t(62889);let o=!1;function r(){if(i.B&&window.CSS&&!o&&(o=!0,"registerProperty"in(null===window||void 0===window?void 0:window.CSS)))try{CSS.registerProperty({name:"--n-color-start",syntax:"",inherits:!1,initialValue:"#0000"}),CSS.registerProperty({name:"--n-color-end",syntax:"",inherits:!1,initialValue:"#0000"})}catch(e){}}},91733:function(e,n,t){t.d(n,{A:function(){return o}});var i=t(45525); +/** + * @license lucide-vue-next v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o=(0,i.A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])}}]); +//# sourceMappingURL=933.be643a77.js.map \ No newline at end of file diff --git a/dist/js/app.dbba7872.js b/dist/js/app.ceac3d0c.js similarity index 73% rename from dist/js/app.dbba7872.js rename to dist/js/app.ceac3d0c.js index bdb0610..0bb2226 100644 --- a/dist/js/app.dbba7872.js +++ b/dist/js/app.ceac3d0c.js @@ -1,2 +1,2 @@ -(function(){"use strict";var e={35720:function(e,t,a){var n=a(94373),r=a(55129);const o=n.A.create({timeout:5e3});o.interceptors.request.use(e=>{const t=r.A.getters.token;return t&&(e.headers["Authorization"]=t),e.url&&e.url.includes("/ai_passage/generate")&&(e.timeout=24e4),e},e=>(console.log(e),Promise.reject(e))),t.A=o},55129:function(e,t,a){var n=a(60782),r=a(35720);t.A=(0,n.y$)({state:{token:"",userInfo:null},getters:{token:e=>e.token,userInfo:e=>e.userInfo},mutations:{setToken(e,t){e.token=t},setUserInfo(e,t){e.userInfo=t}},actions:{fetchUserInfo({commit:e}){return new Promise((t,a)=>{r.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/userinfo/info").then(n=>{const r=n.data;r?(e("setUserInfo",r),t(r)):a(new Error("No user info"))}).catch(e=>{a(e)})})}},modules:{}})},66441:function(e,t,a){var n=a(45130),r=a(56768),o=a(90144),l=a(58075),s=a(22646),i=a(28686),d=a(78597),c=a(3575),u={__name:"App",setup(e){const t=(0,o.KR)(null),a=(0,o.KR)(!1),n={Menu:{borderRadius:"50px",itemHeight:"42px",itemMargin:"4px 8px"}},u=e=>{a.value=e,t.value=e?l.a:null,e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",e?"dark":"light")},m=()=>{u(!a.value)};return(0,r.sV)(()=>{const e=localStorage.getItem("theme");if(e)u("dark"===e);else{const e=window.matchMedia("(prefers-color-scheme: dark)").matches;u(e)}}),(0,r.Gt)("themeContext",{isDark:a,toggleTheme:m}),(e,a)=>{const l=(0,r.g2)("router-view");return(0,r.uX)(),(0,r.Wv)((0,o.R1)(s.A),{theme:t.value,"theme-overrides":n},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(i.A)),(0,r.bF)((0,o.R1)(d.A),null,{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(c.K),null,{default:(0,r.k6)(()=>[(0,r.bF)(l)]),_:1})]),_:1})]),_:1},8,["theme"])}}};const m=u;var f=m,b=(a(44114),a(98728)),g=a(95404),h=a(24232),p=a(60782),v=a(36909),k=a(59856),y=a(33889),x=a(13230),w=a(99310),_=a(4814),A=a(86727),L=a(30284),R=a(36921),E=a(28451),C=a(54880),F=a(6609),j=a(58096),I=a(56714),z=a(93812),P=a(35161),W=a(18169),q=a(95802),S=a(57273),T=a(26961),X=a(29554),O=a(41829),K=a(22695),N=a(82089),U=a(94578),V=a(51415),B=a(55704),H=a(36022),M=a(78704);const D={class:"h-16 flex items-center justify-center border-b border-gray-200 dark:border-gray-800"},G={key:0,class:"flex items-center gap-3 px-4 truncate"},Q={key:1,class:"flex justify-center w-full"},Y={class:"flex items-center gap-4"},$={class:"flex items-center gap-4"},J={class:"flex items-center gap-3 pl-4 border-l border-gray-200 dark:border-gray-700"},Z={class:"text-right hidden sm:block"},ee={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},te={key:0,class:"inline-flex items-center gap-1 px-2 py-0.5 mt-0.5 rounded-full text-xs font-medium bg-amber-50 text-amber-600 border border-amber-200 dark:bg-amber-900/20 dark:text-amber-400 dark:border-amber-800/50"},ae={key:1,class:"inline-flex items-center px-2 py-0.5 mt-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-500 border border-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700"},ne={class:"p-4 min-w-[200px] bg-white dark:bg-gray-900 rounded-lg"},re={class:"flex flex-col items-center border-b border-gray-100 dark:border-gray-800 pb-4 mb-2"},oe={class:"text-base font-medium text-gray-900 dark:text-gray-100 mb-2"},le={key:0,class:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-amber-50 text-amber-600 border border-amber-200 dark:bg-amber-900/20 dark:text-amber-400 dark:border-amber-800/50"},se={key:1,class:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-500 border border-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700"},ie={class:"flex flex-col"};var de={__name:"MainLayout",setup(e){const t=(0,p.Pj)(),a=(0,b.rd)(),l=(0,b.lq)(),s=(0,v.s)(),{isDark:i,toggleTheme:d}=(0,r.WQ)("themeContext"),c=(0,o.KR)(!1),u=(0,o.KR)(!1),m=(0,o.KR)(!1),f=()=>{m.value=window.innerWidth<768};(0,r.sV)(()=>{f(),window.addEventListener("resize",f)}),(0,r.hi)(()=>{window.removeEventListener("resize",f)});const g=(0,r.EW)(()=>t.getters.userInfo);function de(e){return()=>(0,r.h)(k._,null,{default:()=>(0,r.h)(e)})}const ce=[{label:"我的数据",key:"home",icon:de(I.A)},{label:"词书",key:"dict",icon:de(z.A)},{label:"生词本",key:"favorite",icon:de(P.A)},{label:"单词搜索",key:"search",icon:de(W.A)},{label:"我的笔记",key:"note",icon:de(q.A)},{label:"我的词单",key:"lists",icon:de(S.A)},{label:"学习记录",key:"learn",icon:de(T.A)},{label:"智能抽查",key:"check",icon:de(X.A)},{label:"猜单词",key:"guess",icon:de(O.A)},{label:"AI 助记短文",key:"passage",icon:de(K.A)},{label:"关于",key:"about",icon:de(N.A)}],ue=(0,r.EW)(()=>l.name),me=e=>{a.push({name:e}),u.value=!1},fe=()=>{s.warning({title:"退出登录",content:"确定要退出登录吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{M.A.remove("auth_token",{domain:"localhost"===window.location.hostname?"localhost":"wh.ember.ac.cn"}),M.A.remove("cb_token",{domain:"localhost"===window.location.hostname?"localhost":"wh.ember.ac.cn"}),t.commit("setToken",""),t.commit("setUserInfo",null),a.push({name:"login-required"})}})};return(e,t)=>{const a=(0,r.g2)("router-view");return(0,r.uX)(),(0,r.Wv)((0,o.R1)(y.Ay),{class:"h-screen","has-sider":""},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(x.A),{show:u.value,"onUpdate:show":t[0]||(t[0]=e=>u.value=e),placement:"left",width:240,class:"md:hidden"},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(w.A),{"body-content-style":"padding: 0;"},{header:(0,r.k6)(()=>[...t[5]||(t[5]=[(0,r.Lk)("div",{class:"flex items-center gap-2"},[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/wh_logo.png",class:"w-8 h-8",alt:"Logo"}),(0,r.Lk)("span",{class:"text-lg font-bold text-gray-900 dark:text-white"},"Word Helper")],-1)])]),default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(_.A),{options:ce,value:ue.value,"onUpdate:value":me,class:"custom-menu"},null,8,["value"])]),_:1})]),_:1},8,["show"]),m.value?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.Wv)((0,o.R1)(A.A),{key:0,bordered:"","collapse-mode":"width","collapsed-width":64,width:240,collapsed:c.value,"show-trigger":"",onCollapse:t[1]||(t[1]=e=>c.value=!0),onExpand:t[2]||(t[2]=e=>c.value=!1),class:"hidden md:block bg-white dark:bg-gray-900 h-screen shadow-sm z-10"},{default:(0,r.k6)(()=>[(0,r.Lk)("div",D,[c.value?((0,r.uX)(),(0,r.CE)("div",Q,[...t[7]||(t[7]=[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/wh_logo.png",class:"w-8 h-8",alt:"Logo"},null,-1)])])):((0,r.uX)(),(0,r.CE)("div",G,[...t[6]||(t[6]=[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/wh_logo.png",class:"w-8 h-8",alt:"Logo"},null,-1),(0,r.Lk)("h1",{class:"text-xl font-bold text-primary"},"Word Helper",-1)])]))]),(0,r.bF)((0,o.R1)(_.A),{class:"mt-2",collapsed:c.value,"collapsed-width":64,"collapsed-icon-size":22,options:ce,value:ue.value,"onUpdate:value":me},null,8,["collapsed","value"])]),_:1},8,["collapsed"])),(0,r.bF)((0,o.R1)(y.Ay),{class:"h-screen bg-gray-50 dark:bg-gray-950","native-scrollbar":!1},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(L.A),{bordered:"",class:"h-16 px-4 flex items-center justify-between bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-800 shadow-sm z-10 sticky top-0"},{default:(0,r.k6)(()=>[(0,r.Lk)("div",Y,[(0,r.Lk)("button",{onClick:t[3]||(t[3]=e=>u.value=!0),class:"md:hidden p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"},[(0,r.bF)((0,o.R1)(U.A),{class:"w-6 h-6 text-gray-600 dark:text-gray-300"})]),t[8]||(t[8]=(0,r.Lk)("div",{class:"flex items-center gap-2 md:hidden"},[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/wh_logo.png",class:"w-8 h-8",alt:"Logo"}),(0,r.Lk)("span",{class:"text-lg font-bold text-gray-800 dark:text-white"},"Word Helper")],-1))]),(0,r.Lk)("div",$,[(0,r.Lk)("button",{onClick:t[4]||(t[4]=(...e)=>(0,o.R1)(d)&&(0,o.R1)(d)(...e)),class:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"},[(0,o.R1)(i)?((0,r.uX)(),(0,r.Wv)((0,o.R1)(V.A),{key:0,class:"w-5 h-5 text-yellow-500"})):((0,r.uX)(),(0,r.Wv)((0,o.R1)(B.A),{key:1,class:"w-5 h-5 text-gray-600"}))]),(0,r.Lk)("div",J,[(0,r.Lk)("div",Z,[(0,r.Lk)("div",ee,(0,h.v_)(g.value?.detail?.nickname||"Guest"),1),g.value?.detail?.is_vip?((0,r.uX)(),(0,r.CE)("div",te,[...t[9]||(t[9]=[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/vip_g3.svg",class:"w-3 h-3",alt:"VIP"},null,-1),(0,r.Lk)("span",null,"VIP用户",-1)])])):((0,r.uX)(),(0,r.CE)("div",ae," 普通用户 "))]),m.value?((0,r.uX)(),(0,r.Wv)((0,o.R1)(R.Ay),{key:0,trigger:"click",placement:"bottom-end",style:{padding:"0"}},{trigger:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(E.A),{round:"",size:"medium",src:g.value?.detail?.avatar_path,"fallback-src":"https://download.xn--xhq44jb2fzpc.com/avatar/default.png",class:"cursor-pointer"},null,8,["src"])]),default:(0,r.k6)(()=>[(0,r.Lk)("div",ne,[(0,r.Lk)("div",re,[(0,r.Lk)("div",oe,(0,h.v_)(g.value?.detail?.nickname||"Guest"),1),g.value?.detail?.is_vip?((0,r.uX)(),(0,r.CE)("div",le,[...t[10]||(t[10]=[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/vip_g3.svg",class:"w-3 h-3",alt:"VIP"},null,-1),(0,r.Lk)("span",null,"VIP用户",-1)])])):((0,r.uX)(),(0,r.CE)("div",se," 普通用户 "))]),(0,r.Lk)("div",ie,[(0,r.bF)((0,o.R1)(C.Ay),{quaternary:"",type:"error",onClick:fe,class:"w-full justify-start"},{icon:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(k._),null,{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(H.A))]),_:1})]),default:(0,r.k6)(()=>[t[11]||(t[11]=(0,r.eW)(" 退出登录 ",-1))]),_:1})])])]),_:1})):((0,r.uX)(),(0,r.CE)(r.FK,{key:1},[(0,r.bF)((0,o.R1)(E.A),{round:"",size:"medium",src:g.value?.detail?.avatar_path,"fallback-src":"https://download.xn--xhq44jb2fzpc.com/avatar/default.png"},null,8,["src"]),(0,r.bF)((0,o.R1)(F.A),{trigger:"hover"},{trigger:(0,r.k6)(()=>[(0,r.Lk)("button",{onClick:fe,class:"ml-2 p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-500 hover:text-red-500 transition-colors"},[(0,r.bF)((0,o.R1)(H.A),{class:"w-5 h-5"})])]),default:(0,r.k6)(()=>[t[12]||(t[12]=(0,r.eW)(" 退出登录 ",-1))]),_:1})],64))])])]),_:1}),(0,r.bF)((0,o.R1)(j.A),{class:"p-4 md:p-6 bg-gray-50 dark:bg-gray-950","content-style":"min-height: calc(100vh - 64px)"},{default:(0,r.k6)(()=>[(0,r.bF)(a,null,{default:(0,r.k6)(({Component:e})=>[(0,r.bF)(n.eB,{"enter-active-class":"animate__animated animate__fadeIn animate__faster","leave-active-class":"animate__animated animate__fadeOut animate__faster",mode:"out-in"},{default:(0,r.k6)(()=>[((0,r.uX)(),(0,r.Wv)((0,r.$y)(e)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})}}},ce=a(71241);const ue=(0,ce.A)(de,[["__scopeId","data-v-2b338d36"]]);var me=ue,fe=(a(18111),a(61701),a(97387)),be=a(91332),ge=a(2231),he=a(49912),pe=a(42517),ve=a(37006),ke=a(35720),ye=a(60501),xe=a(2043),we=a(75095),_e=a(32685),Ae=a(53708),Le=a(89536),Re=a(5143),Ee=a(40623),Ce=a(92080),Fe=a(56677);const je={class:"home-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},Ie={initial:{opacity:0,y:20},enter:{opacity:1,y:0},class:"mb-8"},ze={class:"text-3xl font-bold text-gray-900 dark:text-white mb-2"},Pe={class:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"},We={class:"flex items-center justify-between"},qe={class:"text-3xl font-bold text-primary mt-1"},Se={class:"p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg"},Te={class:"flex items-center justify-between"},Xe={class:"text-3xl font-bold text-green-600 dark:text-green-400 mt-1"},Oe={class:"p-3 bg-green-50 dark:bg-green-900/20 rounded-lg"},Ke={class:"flex items-center justify-between"},Ne={class:"text-3xl font-bold text-purple-600 dark:text-purple-400 mt-1"},Ue={class:"p-3 bg-purple-50 dark:bg-purple-900/20 rounded-lg"},Ve={class:"h-[400px] w-full relative",ref:"chartContainer"};var Be={__name:"HomeView",setup(e){(0,xe.Y)([we.a,_e.a,Ae.a,Le.a,Re.a,Ee.a,Ce.i]);const t=(0,p.Pj)(),a=(0,fe.J)(),{isDark:n}=(0,r.WQ)("themeContext"),l=(0,r.EW)(()=>t.getters.userInfo||t.state.userInfo),s=(0,o.KR)(!1),i=(0,o.KR)(null),d=(0,o.KR)({today_count:0,week_count:0,month_count:0,last_7_days:[]}),c=()=>{const e=i.value?.getEChartsInstance?.();e&&e.resize()},u=async()=>{await(0,r.dY)(),requestAnimationFrame(()=>{c(),requestAnimationFrame(c)})},m=(0,r.EW)(()=>{const e=n.value,t=e?"#e5e7eb":"#374151",a=e?"rgba(255, 255, 255, 0.05)":"rgba(0, 0, 0, 0.05)",r=e?"rgba(31, 41, 55, 0.9)":"rgba(255, 255, 255, 0.9)",o=e?"#374151":"#e5e7eb";return{backgroundColor:"transparent",grid:{left:48,right:20,bottom:28,top:40},tooltip:{trigger:"axis",backgroundColor:r,borderColor:o,textStyle:{color:t},axisPointer:{type:"line",lineStyle:{color:"#6366f1",type:"dashed"}}},xAxis:{type:"category",boundaryGap:!1,data:d.value.last_7_days.map(e=>e.date.slice(5)),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:t,margin:15},splitLine:{show:!0,lineStyle:{color:a}}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:t},splitLine:{show:!0,lineStyle:{color:a,type:"dashed"}}},series:[{name:"学习次数",type:"line",smooth:!0,showSymbol:!1,symbolSize:8,itemStyle:{color:"#6366f1",borderWidth:2,borderColor:"#fff"},lineStyle:{width:3,color:new Fe.A(0,0,1,0,[{offset:0,color:"#6366f1"},{offset:1,color:"#818cf8"}])},areaStyle:{color:new Fe.A(0,0,0,1,[{offset:0,color:"rgba(99, 102, 241, 0.2)"},{offset:1,color:"rgba(99, 102, 241, 0)"}])},data:d.value.last_7_days.map(e=>e.count)}]}}),f=async()=>{s.value=!0;try{const e=await ke.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/home/stats");e.data&&(d.value=e.data,await u())}catch(e){console.error("Failed to fetch stats:",e),a.error("获取学习数据失败,请稍后重试")}finally{s.value=!1}},b=()=>{u()},g=()=>{u()},v=()=>{u()};return(0,r.sV)(async()=>{window.addEventListener("pageshow",b),window.addEventListener("orientationchange",g),window.visualViewport?.addEventListener("resize",v),await u(),await f(),document.title="我的数据 - Word Helper"}),(0,r.hi)(()=>{window.removeEventListener("pageshow",b),window.removeEventListener("orientationchange",g),window.visualViewport?.removeEventListener("resize",v)}),(0,r.wB)(()=>d.value.last_7_days.length,()=>{u()}),(0,r.wB)(n,()=>{u()}),(e,t)=>{const a=(0,r.gN)("motion");return(0,r.uX)(),(0,r.CE)("div",je,[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Ie,[(0,r.Lk)("h1",ze," 欢迎回来,"+(0,h.v_)(l.value?.detail?.nickname||"学习者")+" 👋 ",1),t[0]||(t[0]=(0,r.Lk)("p",{class:"text-gray-600 dark:text-gray-400"}," 保持学习节奏,今天也要加油哦! ",-1))])),[[a]]),(0,r.Lk)("div",Pe,[(0,r.bo)(((0,r.uX)(),(0,r.Wv)((0,o.R1)(pe.Ay),{initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:100}},class:"rounded-xl shadow-sm hover:shadow-md transition-shadow dark:bg-gray-800",bordered:!1},{default:(0,r.k6)(()=>[(0,r.Lk)("div",We,[(0,r.Lk)("div",null,[t[1]||(t[1]=(0,r.Lk)("p",{class:"text-sm font-medium text-gray-500 dark:text-gray-400"},"今日学习次数",-1)),(0,r.Lk)("h3",qe,[(0,r.bF)((0,o.R1)(ve.A),{from:0,to:d.value.today_count},null,8,["to"])])]),(0,r.Lk)("div",Se,[(0,r.bF)((0,o.R1)(k._),{size:"24",class:"text-blue-600 dark:text-blue-400"},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(be.A))]),_:1})])])]),_:1})),[[a]]),(0,r.bo)(((0,r.uX)(),(0,r.Wv)((0,o.R1)(pe.Ay),{initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:200}},class:"rounded-xl shadow-sm hover:shadow-md transition-shadow dark:bg-gray-800",bordered:!1},{default:(0,r.k6)(()=>[(0,r.Lk)("div",Te,[(0,r.Lk)("div",null,[t[2]||(t[2]=(0,r.Lk)("p",{class:"text-sm font-medium text-gray-500 dark:text-gray-400"},"本周学习次数",-1)),(0,r.Lk)("h3",Xe,[(0,r.bF)((0,o.R1)(ve.A),{from:0,to:d.value.week_count},null,8,["to"])])]),(0,r.Lk)("div",Oe,[(0,r.bF)((0,o.R1)(k._),{size:"24",class:"text-green-600 dark:text-green-400"},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(ge.A))]),_:1})])])]),_:1})),[[a]]),(0,r.bo)(((0,r.uX)(),(0,r.Wv)((0,o.R1)(pe.Ay),{initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:300}},class:"rounded-xl shadow-sm hover:shadow-md transition-shadow dark:bg-gray-800",bordered:!1},{default:(0,r.k6)(()=>[(0,r.Lk)("div",Ke,[(0,r.Lk)("div",null,[t[3]||(t[3]=(0,r.Lk)("p",{class:"text-sm font-medium text-gray-500 dark:text-gray-400"},"本月学习次数",-1)),(0,r.Lk)("h3",Ne,[(0,r.bF)((0,o.R1)(ve.A),{from:0,to:d.value.month_count},null,8,["to"])])]),(0,r.Lk)("div",Ue,[(0,r.bF)((0,o.R1)(k._),{size:"24",class:"text-purple-600 dark:text-purple-400"},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(he.A))]),_:1})])])]),_:1})),[[a]])]),(0,r.bo)(((0,r.uX)(),(0,r.Wv)((0,o.R1)(pe.Ay),{initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:400}},title:"近7天学习趋势",class:"rounded-xl shadow-sm dark:bg-gray-800",bordered:!1},{"header-extra":(0,r.k6)(()=>[...t[4]||(t[4]=[(0,r.Lk)("div",{class:"flex items-center gap-2"},[(0,r.Lk)("span",{class:"w-3 h-3 rounded-full bg-primary"}),(0,r.Lk)("span",{class:"text-xs text-gray-500"},"本数据实时更新")],-1)])]),default:(0,r.k6)(()=>[(0,r.Lk)("div",Ve,[(0,r.bF)((0,o.R1)(ye.Ay),{ref_key:"chartRef",ref:i,class:"chart",option:m.value,autoresize:"",loading:s.value},null,8,["option","loading"])],512)]),_:1})),[[a]])])}}};const He=(0,ce.A)(Be,[["__scopeId","data-v-5304782a"]]);var Me=He,De=a(55129);const Ge=[{path:"/login-required",name:"login-required",component:()=>Promise.all([a.e(913),a.e(62),a.e(117)]).then(a.bind(a,95117))},{path:"/",component:me,children:[{path:"",name:"home",component:Me},{path:"about",name:"about",component:()=>a.e(594).then(a.bind(a,51144))},{path:"/word",name:"word-detail",component:()=>Promise.all([a.e(913),a.e(259),a.e(410),a.e(868)]).then(a.bind(a,73868))},{path:"/dict",name:"dict",component:()=>Promise.all([a.e(205),a.e(387)]).then(a.bind(a,71387))},{path:"/favorite",name:"favorite",component:()=>a.e(405).then(a.bind(a,77405))},{path:"/search",name:"search",component:()=>Promise.all([a.e(913),a.e(67)]).then(a.bind(a,46067))},{path:"/check",name:"check",component:()=>Promise.all([a.e(913),a.e(150),a.e(62),a.e(493),a.e(410),a.e(205),a.e(938)]).then(a.bind(a,67686))},{path:"/guess",name:"guess",component:()=>Promise.all([a.e(913),a.e(150),a.e(62),a.e(493),a.e(765)]).then(a.bind(a,75765))},{path:"/note",name:"note",component:()=>Promise.all([a.e(913),a.e(150),a.e(774)]).then(a.bind(a,58774))},{path:"/learn",name:"learn",component:()=>a.e(416).then(a.bind(a,27416))},{path:"/list_detail",name:"list_detail",component:()=>Promise.all([a.e(259),a.e(924)]).then(a.bind(a,53924))},{path:"/lists",name:"lists",component:()=>Promise.all([a.e(913),a.e(150),a.e(62),a.e(410),a.e(55)]).then(a.bind(a,1055))},{path:"/passage",name:"passage",component:()=>Promise.all([a.e(913),a.e(150),a.e(62),a.e(259),a.e(493),a.e(828)]).then(a.bind(a,8508))}]}],Qe=(0,b.aE)({history:(0,b.LA)("/"),routes:Ge}),Ye=e=>{const{dialog:t}=(0,g.e)(["dialog"]);t.error({title:"您的账号已被封禁!",content:()=>(0,r.h)("div",[(0,r.h)("div",{style:"margin-bottom: 8px"},"3秒后自动退出登录..."),(0,r.h)("div",{style:"font-size: 12px; color: gray;"},"如有疑问,请及时联系网站管理员")]),closable:!1,maskClosable:!1,closeOnEsc:!1,positiveText:null}),setTimeout(()=>{t.destroyAll();const a="localhost"===window.location.hostname?"localhost":"wh.ember.ac.cn";M.A.remove("auth_token",{domain:a}),M.A.remove("cb_token",{domain:a}),De.A.commit("setToken",""),De.A.commit("setUserInfo",null),e.push({name:"login-required"})},3e3)};Qe.beforeEach(async(e,t,a)=>{if("login-required"===e.name)return void a();const n=M.A.get("auth_token");if(n)if(De.A.getters.token||De.A.commit("setToken",n),De.A.getters.userInfo)De.A.getters.userInfo?.detail?.banned&&Ye(Qe),a();else try{await De.A.dispatch("fetchUserInfo"),De.A.getters.userInfo?.detail?.banned&&Ye(Qe),a()}catch(r){M.A.remove("auth_token"),a({name:"login-required"})}else a({name:"login-required"})});var $e=Qe,Je=a(12424);(0,n.Ef)(f).use(De.A).use($e).use(Je.uy).mount("#app")}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,a),o.exports}a.m=e,function(){var e=[];a.O=function(t,n,r,o){if(!n){var l=1/0;for(c=0;c=o)&&Object.keys(a.O).every(function(e){return a.O[e](n[i])})?n.splice(i--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o]}}(),function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce(function(t,n){return a.f[n](e,t),t},[]))}}(),function(){a.u=function(e){return"js/"+(594===e?"about":e)+"."+{55:"78a12f3b",62:"97b91111",67:"c5181ab8",117:"1e169a6a",150:"49b65dd0",205:"5e1a6eef",259:"4d766dbd",387:"2c1359c2",405:"f97998f1",410:"5d08c1a8",416:"9258341d",493:"2428ffad",594:"e8da17fa",765:"fbd42649",774:"e1ca78ab",828:"f2eb34f0",868:"9ae31e3b",913:"57fbc7fd",924:"d5ee35b1",938:"77996131"}[e]+".js"}}(),function(){a.miniCssF=function(e){return"css/"+(594===e?"about":e)+"."+{55:"89084f96",67:"91d1e5b7",387:"c1c3debd",405:"86dfd5fb",416:"94c42108",594:"29136f20",765:"3e3d4a68",774:"1b803950",828:"99b47517",868:"3e4eb23a",924:"1c0bd8d0",938:"ea8ed904"}[e]+".css"}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="wordhelper:";a.l=function(n,r,o,l){if(e[n])e[n].push(r);else{var s,i;if(void 0!==o)for(var d=document.getElementsByTagName("script"),c=0;c{const t=r.A.getters.token;return t&&(e.headers["Authorization"]=t),e.url&&e.url.includes("/ai_passage/generate")&&(e.timeout=24e4),e},e=>(console.log(e),Promise.reject(e))),t.A=o},55129:function(e,t,a){var n=a(60782),r=a(35720);t.A=(0,n.y$)({state:{token:"",userInfo:null},getters:{token:e=>e.token,userInfo:e=>e.userInfo},mutations:{setToken(e,t){e.token=t},setUserInfo(e,t){e.userInfo=t}},actions:{fetchUserInfo({commit:e}){return new Promise((t,a)=>{r.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/userinfo/info").then(n=>{const r=n.data;r?(e("setUserInfo",r),t(r)):a(new Error("No user info"))}).catch(e=>{a(e)})})}},modules:{}})},66441:function(e,t,a){var n=a(45130),r=a(56768),o=a(90144),l=a(58075),s=a(22646),i=a(28686),d=a(78597),c=a(3575),u={__name:"App",setup(e){const t=(0,o.KR)(null),a=(0,o.KR)(!1),n={Menu:{borderRadius:"50px",itemHeight:"42px",itemMargin:"4px 8px"}},u=e=>{a.value=e,t.value=e?l.a:null,e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",e?"dark":"light")},m=()=>{u(!a.value)};return(0,r.sV)(()=>{const e=localStorage.getItem("theme");if(e)u("dark"===e);else{const e=window.matchMedia("(prefers-color-scheme: dark)").matches;u(e)}}),(0,r.Gt)("themeContext",{isDark:a,toggleTheme:m}),(e,a)=>{const l=(0,r.g2)("router-view");return(0,r.uX)(),(0,r.Wv)((0,o.R1)(s.A),{theme:t.value,"theme-overrides":n},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(i.A)),(0,r.bF)((0,o.R1)(d.A),null,{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(c.K),null,{default:(0,r.k6)(()=>[(0,r.bF)(l)]),_:1})]),_:1})]),_:1},8,["theme"])}}};const m=u;var f=m,b=(a(44114),a(98728)),g=a(95404),h=a(24232),p=a(60782),v=a(36909),k=a(59856),y=a(33889),x=a(13230),w=a(99310),_=a(4814),A=a(86727),L=a(30284),R=a(36921),E=a(28451),C=a(54880),F=a(6609),j=a(58096),I=a(56714),z=a(93812),P=a(35161),W=a(18169),q=a(95802),S=a(57273),T=a(26961),X=a(29554),O=a(41829),K=a(22695),N=a(82089),U=a(94578),V=a(51415),B=a(55704),H=a(36022),M=a(78704);const D={class:"h-16 flex items-center justify-center border-b border-gray-200 dark:border-gray-800"},G={key:0,class:"flex items-center gap-3 px-4 truncate"},Q={key:1,class:"flex justify-center w-full"},Y={class:"flex items-center gap-4"},$={class:"flex items-center gap-4"},J={class:"flex items-center gap-3 pl-4 border-l border-gray-200 dark:border-gray-700"},Z={class:"text-right hidden sm:block"},ee={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},te={key:0,class:"inline-flex items-center gap-1 px-2 py-0.5 mt-0.5 rounded-full text-xs font-medium bg-amber-50 text-amber-600 border border-amber-200 dark:bg-amber-900/20 dark:text-amber-400 dark:border-amber-800/50"},ae={key:1,class:"inline-flex items-center px-2 py-0.5 mt-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-500 border border-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700"},ne={class:"p-4 min-w-[200px] bg-white dark:bg-gray-900 rounded-lg"},re={class:"flex flex-col items-center border-b border-gray-100 dark:border-gray-800 pb-4 mb-2"},oe={class:"text-base font-medium text-gray-900 dark:text-gray-100 mb-2"},le={key:0,class:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-amber-50 text-amber-600 border border-amber-200 dark:bg-amber-900/20 dark:text-amber-400 dark:border-amber-800/50"},se={key:1,class:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-500 border border-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700"},ie={class:"flex flex-col"};var de={__name:"MainLayout",setup(e){const t=(0,p.Pj)(),a=(0,b.rd)(),l=(0,b.lq)(),s=(0,v.s)(),{isDark:i,toggleTheme:d}=(0,r.WQ)("themeContext"),c=(0,o.KR)(!1),u=(0,o.KR)(!1),m=(0,o.KR)(!1),f=()=>{m.value=window.innerWidth<768};(0,r.sV)(()=>{f(),window.addEventListener("resize",f)}),(0,r.hi)(()=>{window.removeEventListener("resize",f)});const g=(0,r.EW)(()=>t.getters.userInfo);function de(e){return()=>(0,r.h)(k._,null,{default:()=>(0,r.h)(e)})}const ce=[{label:"我的数据",key:"home",icon:de(I.A)},{label:"词书",key:"dict",icon:de(z.A)},{label:"生词本",key:"favorite",icon:de(P.A)},{label:"单词搜索",key:"search",icon:de(W.A)},{label:"我的笔记",key:"note",icon:de(q.A)},{label:"我的词单",key:"lists",icon:de(S.A)},{label:"学习记录",key:"learn",icon:de(T.A)},{label:"智能抽查",key:"check",icon:de(X.A)},{label:"猜单词",key:"guess",icon:de(O.A)},{label:"AI 助记短文",key:"passage",icon:de(K.A)},{label:"关于",key:"about",icon:de(N.A)}],ue=(0,r.EW)(()=>l.name),me=e=>{a.push({name:e}),u.value=!1},fe=()=>{s.warning({title:"退出登录",content:"确定要退出登录吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{M.A.remove("auth_token",{domain:"localhost"===window.location.hostname?"localhost":"wh.ember.ac.cn"}),M.A.remove("cb_token",{domain:"localhost"===window.location.hostname?"localhost":"wh.ember.ac.cn"}),t.commit("setToken",""),t.commit("setUserInfo",null),a.push({name:"login-required"})}})};return(e,t)=>{const a=(0,r.g2)("router-view");return(0,r.uX)(),(0,r.Wv)((0,o.R1)(y.Ay),{class:"h-screen","has-sider":""},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(x.A),{show:u.value,"onUpdate:show":t[0]||(t[0]=e=>u.value=e),placement:"left",width:240,class:"md:hidden"},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(w.A),{"body-content-style":"padding: 0;"},{header:(0,r.k6)(()=>[...t[5]||(t[5]=[(0,r.Lk)("div",{class:"flex items-center gap-2"},[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/wh_logo.png",class:"w-8 h-8",alt:"Logo"}),(0,r.Lk)("span",{class:"text-lg font-bold text-gray-900 dark:text-white"},"Word Helper")],-1)])]),default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(_.A),{options:ce,value:ue.value,"onUpdate:value":me,class:"custom-menu"},null,8,["value"])]),_:1})]),_:1},8,["show"]),m.value?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.Wv)((0,o.R1)(A.A),{key:0,bordered:"","collapse-mode":"width","collapsed-width":64,width:240,collapsed:c.value,"show-trigger":"",onCollapse:t[1]||(t[1]=e=>c.value=!0),onExpand:t[2]||(t[2]=e=>c.value=!1),class:"hidden md:block bg-white dark:bg-gray-900 h-screen shadow-sm z-10"},{default:(0,r.k6)(()=>[(0,r.Lk)("div",D,[c.value?((0,r.uX)(),(0,r.CE)("div",Q,[...t[7]||(t[7]=[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/wh_logo.png",class:"w-8 h-8",alt:"Logo"},null,-1)])])):((0,r.uX)(),(0,r.CE)("div",G,[...t[6]||(t[6]=[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/wh_logo.png",class:"w-8 h-8",alt:"Logo"},null,-1),(0,r.Lk)("h1",{class:"text-xl font-bold text-primary"},"Word Helper",-1)])]))]),(0,r.bF)((0,o.R1)(_.A),{class:"mt-2",collapsed:c.value,"collapsed-width":64,"collapsed-icon-size":22,options:ce,value:ue.value,"onUpdate:value":me},null,8,["collapsed","value"])]),_:1},8,["collapsed"])),(0,r.bF)((0,o.R1)(y.Ay),{class:"h-screen bg-gray-50 dark:bg-gray-950","native-scrollbar":!1},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(L.A),{bordered:"",class:"h-16 px-4 flex items-center justify-between bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-800 shadow-sm z-10 sticky top-0"},{default:(0,r.k6)(()=>[(0,r.Lk)("div",Y,[(0,r.Lk)("button",{onClick:t[3]||(t[3]=e=>u.value=!0),class:"md:hidden p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"},[(0,r.bF)((0,o.R1)(U.A),{class:"w-6 h-6 text-gray-600 dark:text-gray-300"})]),t[8]||(t[8]=(0,r.Lk)("div",{class:"flex items-center gap-2 md:hidden"},[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/wh_logo.png",class:"w-8 h-8",alt:"Logo"}),(0,r.Lk)("span",{class:"text-lg font-bold text-gray-800 dark:text-white"},"Word Helper")],-1))]),(0,r.Lk)("div",$,[(0,r.Lk)("button",{onClick:t[4]||(t[4]=(...e)=>(0,o.R1)(d)&&(0,o.R1)(d)(...e)),class:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"},[(0,o.R1)(i)?((0,r.uX)(),(0,r.Wv)((0,o.R1)(V.A),{key:0,class:"w-5 h-5 text-yellow-500"})):((0,r.uX)(),(0,r.Wv)((0,o.R1)(B.A),{key:1,class:"w-5 h-5 text-gray-600"}))]),(0,r.Lk)("div",J,[(0,r.Lk)("div",Z,[(0,r.Lk)("div",ee,(0,h.v_)(g.value?.detail?.nickname||"Guest"),1),g.value?.detail?.is_vip?((0,r.uX)(),(0,r.CE)("div",te,[...t[9]||(t[9]=[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/vip_g3.svg",class:"w-3 h-3",alt:"VIP"},null,-1),(0,r.Lk)("span",null,"VIP用户",-1)])])):((0,r.uX)(),(0,r.CE)("div",ae," 普通用户 "))]),m.value?((0,r.uX)(),(0,r.Wv)((0,o.R1)(R.Ay),{key:0,trigger:"click",placement:"bottom-end",style:{padding:"0"}},{trigger:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(E.A),{round:"",size:"medium",src:g.value?.detail?.avatar_path,"fallback-src":"https://download.xn--xhq44jb2fzpc.com/avatar/default.png",class:"cursor-pointer"},null,8,["src"])]),default:(0,r.k6)(()=>[(0,r.Lk)("div",ne,[(0,r.Lk)("div",re,[(0,r.Lk)("div",oe,(0,h.v_)(g.value?.detail?.nickname||"Guest"),1),g.value?.detail?.is_vip?((0,r.uX)(),(0,r.CE)("div",le,[...t[10]||(t[10]=[(0,r.Lk)("img",{src:"https://download.xn--xhq44jb2fzpc.com/images/vip_g3.svg",class:"w-3 h-3",alt:"VIP"},null,-1),(0,r.Lk)("span",null,"VIP用户",-1)])])):((0,r.uX)(),(0,r.CE)("div",se," 普通用户 "))]),(0,r.Lk)("div",ie,[(0,r.bF)((0,o.R1)(C.Ay),{quaternary:"",type:"error",onClick:fe,class:"w-full justify-start"},{icon:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(k._),null,{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(H.A))]),_:1})]),default:(0,r.k6)(()=>[t[11]||(t[11]=(0,r.eW)(" 退出登录 ",-1))]),_:1})])])]),_:1})):((0,r.uX)(),(0,r.CE)(r.FK,{key:1},[(0,r.bF)((0,o.R1)(E.A),{round:"",size:"medium",src:g.value?.detail?.avatar_path,"fallback-src":"https://download.xn--xhq44jb2fzpc.com/avatar/default.png"},null,8,["src"]),(0,r.bF)((0,o.R1)(F.A),{trigger:"hover"},{trigger:(0,r.k6)(()=>[(0,r.Lk)("button",{onClick:fe,class:"ml-2 p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-500 hover:text-red-500 transition-colors"},[(0,r.bF)((0,o.R1)(H.A),{class:"w-5 h-5"})])]),default:(0,r.k6)(()=>[t[12]||(t[12]=(0,r.eW)(" 退出登录 ",-1))]),_:1})],64))])])]),_:1}),(0,r.bF)((0,o.R1)(j.A),{class:"p-4 md:p-6 bg-gray-50 dark:bg-gray-950","content-style":"min-height: calc(100vh - 64px)"},{default:(0,r.k6)(()=>[(0,r.bF)(a,null,{default:(0,r.k6)(({Component:e})=>[(0,r.bF)(n.eB,{"enter-active-class":"animate__animated animate__fadeIn animate__faster","leave-active-class":"animate__animated animate__fadeOut animate__faster",mode:"out-in"},{default:(0,r.k6)(()=>[((0,r.uX)(),(0,r.Wv)((0,r.$y)(e)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})}}},ce=a(71241);const ue=(0,ce.A)(de,[["__scopeId","data-v-2b338d36"]]);var me=ue,fe=(a(18111),a(61701),a(97387)),be=a(91332),ge=a(2231),he=a(49912),pe=a(42517),ve=a(37006),ke=a(35720),ye=a(60501),xe=a(2043),we=a(75095),_e=a(32685),Ae=a(53708),Le=a(89536),Re=a(5143),Ee=a(40623),Ce=a(92080),Fe=a(56677);const je={class:"home-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},Ie={initial:{opacity:0,y:20},enter:{opacity:1,y:0},class:"mb-8"},ze={class:"text-3xl font-bold text-gray-900 dark:text-white mb-2"},Pe={class:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"},We={class:"flex items-center justify-between"},qe={class:"text-3xl font-bold text-primary mt-1"},Se={class:"p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg"},Te={class:"flex items-center justify-between"},Xe={class:"text-3xl font-bold text-green-600 dark:text-green-400 mt-1"},Oe={class:"p-3 bg-green-50 dark:bg-green-900/20 rounded-lg"},Ke={class:"flex items-center justify-between"},Ne={class:"text-3xl font-bold text-purple-600 dark:text-purple-400 mt-1"},Ue={class:"p-3 bg-purple-50 dark:bg-purple-900/20 rounded-lg"},Ve={class:"h-[400px] w-full relative",ref:"chartContainer"};var Be={__name:"HomeView",setup(e){(0,xe.Y)([we.a,_e.a,Ae.a,Le.a,Re.a,Ee.a,Ce.i]);const t=(0,p.Pj)(),a=(0,fe.J)(),{isDark:n}=(0,r.WQ)("themeContext"),l=(0,r.EW)(()=>t.getters.userInfo||t.state.userInfo),s=(0,o.KR)(!1),i=(0,o.KR)(null),d=(0,o.KR)({today_count:0,week_count:0,month_count:0,last_7_days:[]}),c=()=>{const e=i.value?.getEChartsInstance?.();e&&e.resize()},u=async()=>{await(0,r.dY)(),requestAnimationFrame(()=>{c(),requestAnimationFrame(c)})},m=(0,r.EW)(()=>{const e=n.value,t=e?"#e5e7eb":"#374151",a=e?"rgba(255, 255, 255, 0.05)":"rgba(0, 0, 0, 0.05)",r=e?"rgba(31, 41, 55, 0.9)":"rgba(255, 255, 255, 0.9)",o=e?"#374151":"#e5e7eb";return{backgroundColor:"transparent",grid:{left:48,right:20,bottom:28,top:40},tooltip:{trigger:"axis",backgroundColor:r,borderColor:o,textStyle:{color:t},axisPointer:{type:"line",lineStyle:{color:"#6366f1",type:"dashed"}}},xAxis:{type:"category",boundaryGap:!1,data:d.value.last_7_days.map(e=>e.date.slice(5)),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:t,margin:15},splitLine:{show:!0,lineStyle:{color:a}}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:t},splitLine:{show:!0,lineStyle:{color:a,type:"dashed"}}},series:[{name:"学习次数",type:"line",smooth:!0,showSymbol:!1,symbolSize:8,itemStyle:{color:"#6366f1",borderWidth:2,borderColor:"#fff"},lineStyle:{width:3,color:new Fe.A(0,0,1,0,[{offset:0,color:"#6366f1"},{offset:1,color:"#818cf8"}])},areaStyle:{color:new Fe.A(0,0,0,1,[{offset:0,color:"rgba(99, 102, 241, 0.2)"},{offset:1,color:"rgba(99, 102, 241, 0)"}])},data:d.value.last_7_days.map(e=>e.count)}]}}),f=async()=>{s.value=!0;try{const e=await ke.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/home/stats");e.data&&(d.value=e.data,await u())}catch(e){console.error("Failed to fetch stats:",e),a.error("获取学习数据失败,请稍后重试")}finally{s.value=!1}},b=()=>{u()},g=()=>{u()},v=()=>{u()};return(0,r.sV)(async()=>{window.addEventListener("pageshow",b),window.addEventListener("orientationchange",g),window.visualViewport?.addEventListener("resize",v),await u(),await f(),document.title="我的数据 - Word Helper"}),(0,r.hi)(()=>{window.removeEventListener("pageshow",b),window.removeEventListener("orientationchange",g),window.visualViewport?.removeEventListener("resize",v)}),(0,r.wB)(()=>d.value.last_7_days.length,()=>{u()}),(0,r.wB)(n,()=>{u()}),(e,t)=>{const a=(0,r.gN)("motion");return(0,r.uX)(),(0,r.CE)("div",je,[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Ie,[(0,r.Lk)("h1",ze," 欢迎回来,"+(0,h.v_)(l.value?.detail?.nickname||"学习者")+" 👋 ",1),t[0]||(t[0]=(0,r.Lk)("p",{class:"text-gray-600 dark:text-gray-400"}," 保持学习节奏,今天也要加油哦! ",-1))])),[[a]]),(0,r.Lk)("div",Pe,[(0,r.bo)(((0,r.uX)(),(0,r.Wv)((0,o.R1)(pe.Ay),{initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:100}},class:"rounded-xl shadow-sm hover:shadow-md transition-shadow dark:bg-gray-800",bordered:!1},{default:(0,r.k6)(()=>[(0,r.Lk)("div",We,[(0,r.Lk)("div",null,[t[1]||(t[1]=(0,r.Lk)("p",{class:"text-sm font-medium text-gray-500 dark:text-gray-400"},"今日学习次数",-1)),(0,r.Lk)("h3",qe,[(0,r.bF)((0,o.R1)(ve.A),{from:0,to:d.value.today_count},null,8,["to"])])]),(0,r.Lk)("div",Se,[(0,r.bF)((0,o.R1)(k._),{size:"24",class:"text-blue-600 dark:text-blue-400"},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(be.A))]),_:1})])])]),_:1})),[[a]]),(0,r.bo)(((0,r.uX)(),(0,r.Wv)((0,o.R1)(pe.Ay),{initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:200}},class:"rounded-xl shadow-sm hover:shadow-md transition-shadow dark:bg-gray-800",bordered:!1},{default:(0,r.k6)(()=>[(0,r.Lk)("div",Te,[(0,r.Lk)("div",null,[t[2]||(t[2]=(0,r.Lk)("p",{class:"text-sm font-medium text-gray-500 dark:text-gray-400"},"本周学习次数",-1)),(0,r.Lk)("h3",Xe,[(0,r.bF)((0,o.R1)(ve.A),{from:0,to:d.value.week_count},null,8,["to"])])]),(0,r.Lk)("div",Oe,[(0,r.bF)((0,o.R1)(k._),{size:"24",class:"text-green-600 dark:text-green-400"},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(ge.A))]),_:1})])])]),_:1})),[[a]]),(0,r.bo)(((0,r.uX)(),(0,r.Wv)((0,o.R1)(pe.Ay),{initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:300}},class:"rounded-xl shadow-sm hover:shadow-md transition-shadow dark:bg-gray-800",bordered:!1},{default:(0,r.k6)(()=>[(0,r.Lk)("div",Ke,[(0,r.Lk)("div",null,[t[3]||(t[3]=(0,r.Lk)("p",{class:"text-sm font-medium text-gray-500 dark:text-gray-400"},"本月学习次数",-1)),(0,r.Lk)("h3",Ne,[(0,r.bF)((0,o.R1)(ve.A),{from:0,to:d.value.month_count},null,8,["to"])])]),(0,r.Lk)("div",Ue,[(0,r.bF)((0,o.R1)(k._),{size:"24",class:"text-purple-600 dark:text-purple-400"},{default:(0,r.k6)(()=>[(0,r.bF)((0,o.R1)(he.A))]),_:1})])])]),_:1})),[[a]])]),(0,r.bo)(((0,r.uX)(),(0,r.Wv)((0,o.R1)(pe.Ay),{initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:400}},title:"近7天学习趋势",class:"rounded-xl shadow-sm dark:bg-gray-800",bordered:!1},{"header-extra":(0,r.k6)(()=>[...t[4]||(t[4]=[(0,r.Lk)("div",{class:"flex items-center gap-2"},[(0,r.Lk)("span",{class:"w-3 h-3 rounded-full bg-primary"}),(0,r.Lk)("span",{class:"text-xs text-gray-500"},"本数据实时更新")],-1)])]),default:(0,r.k6)(()=>[(0,r.Lk)("div",Ve,[(0,r.bF)((0,o.R1)(ye.Ay),{ref_key:"chartRef",ref:i,class:"chart",option:m.value,autoresize:"",loading:s.value},null,8,["option","loading"])],512)]),_:1})),[[a]])])}}};const He=(0,ce.A)(Be,[["__scopeId","data-v-5304782a"]]);var Me=He,De=a(55129);const Ge=[{path:"/login-required",name:"login-required",component:()=>Promise.all([a.e(913),a.e(62),a.e(117)]).then(a.bind(a,95117))},{path:"/",component:me,children:[{path:"",name:"home",component:Me},{path:"about",name:"about",component:()=>a.e(594).then(a.bind(a,51144))},{path:"/word",name:"word-detail",component:()=>Promise.all([a.e(913),a.e(259),a.e(410),a.e(868)]).then(a.bind(a,73868))},{path:"/dict",name:"dict",component:()=>Promise.all([a.e(205),a.e(387)]).then(a.bind(a,71387))},{path:"/favorite",name:"favorite",component:()=>a.e(143).then(a.bind(a,95524))},{path:"/search",name:"search",component:()=>Promise.all([a.e(913),a.e(67)]).then(a.bind(a,46067))},{path:"/check",name:"check",component:()=>Promise.all([a.e(913),a.e(150),a.e(62),a.e(493),a.e(410),a.e(205),a.e(938)]).then(a.bind(a,67686))},{path:"/guess",name:"guess",component:()=>Promise.all([a.e(913),a.e(150),a.e(62),a.e(493),a.e(765)]).then(a.bind(a,75765))},{path:"/note",name:"note",component:()=>Promise.all([a.e(913),a.e(150),a.e(553)]).then(a.bind(a,23553))},{path:"/learn",name:"learn",component:()=>a.e(933).then(a.bind(a,61933))},{path:"/list_detail",name:"list_detail",component:()=>Promise.all([a.e(259),a.e(223)]).then(a.bind(a,53223))},{path:"/lists",name:"lists",component:()=>Promise.all([a.e(913),a.e(150),a.e(62),a.e(410),a.e(78)]).then(a.bind(a,27078))},{path:"/passage",name:"passage",component:()=>Promise.all([a.e(913),a.e(150),a.e(62),a.e(259),a.e(493),a.e(828)]).then(a.bind(a,8508))}]}],Qe=(0,b.aE)({history:(0,b.LA)("/"),routes:Ge}),Ye=e=>{const{dialog:t}=(0,g.e)(["dialog"]);t.error({title:"您的账号已被封禁!",content:()=>(0,r.h)("div",[(0,r.h)("div",{style:"margin-bottom: 8px"},"3秒后自动退出登录..."),(0,r.h)("div",{style:"font-size: 12px; color: gray;"},"如有疑问,请及时联系网站管理员")]),closable:!1,maskClosable:!1,closeOnEsc:!1,positiveText:null}),setTimeout(()=>{t.destroyAll();const a="localhost"===window.location.hostname?"localhost":"wh.ember.ac.cn";M.A.remove("auth_token",{domain:a}),M.A.remove("cb_token",{domain:a}),De.A.commit("setToken",""),De.A.commit("setUserInfo",null),e.push({name:"login-required"})},3e3)};Qe.beforeEach(async(e,t,a)=>{if("login-required"===e.name)return void a();const n=M.A.get("auth_token");if(n)if(De.A.getters.token||De.A.commit("setToken",n),De.A.getters.userInfo)De.A.getters.userInfo?.detail?.banned&&Ye(Qe),a();else try{await De.A.dispatch("fetchUserInfo"),De.A.getters.userInfo?.detail?.banned&&Ye(Qe),a()}catch(r){M.A.remove("auth_token"),a({name:"login-required"})}else a({name:"login-required"})});var $e=Qe,Je=a(12424);(0,n.Ef)(f).use(De.A).use($e).use(Je.uy).mount("#app")}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,a),o.exports}a.m=e,function(){var e=[];a.O=function(t,n,r,o){if(!n){var l=1/0;for(c=0;c=o)&&Object.keys(a.O).every(function(e){return a.O[e](n[i])})?n.splice(i--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o]}}(),function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce(function(t,n){return a.f[n](e,t),t},[]))}}(),function(){a.u=function(e){return"js/"+(594===e?"about":e)+"."+{62:"97b91111",67:"c5181ab8",78:"f13937b1",117:"1e169a6a",143:"81f28fac",150:"49b65dd0",205:"5e1a6eef",223:"2a258d5f",259:"4d766dbd",387:"2c1359c2",410:"5d08c1a8",493:"2428ffad",553:"3921e97f",594:"e8da17fa",765:"fbd42649",828:"f2eb34f0",868:"9ae31e3b",913:"57fbc7fd",933:"be643a77",938:"77996131"}[e]+".js"}}(),function(){a.miniCssF=function(e){return"css/"+(594===e?"about":e)+"."+{67:"91d1e5b7",78:"e7bcbc26",143:"8861eb94",223:"9de559c7",387:"c1c3debd",553:"d3b36629",594:"29136f20",765:"3e3d4a68",828:"99b47517",868:"3e4eb23a",933:"55ccfbb8",938:"ea8ed904"}[e]+".css"}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="wordhelper:";a.l=function(n,r,o,l){if(e[n])e[n].push(r);else{var s,i;if(void 0!==o)for(var d=document.getElementsByTagName("script"),c=0;c { try { const res = await request.get('https://newfront.xn--xhq44jb2fzpc.com/word_helper/favorite/list', { params: { page: pageNum } + // 后端一页 18 个,3*6 }) if (res.data && res.data.code === 0 && res.data.data) { diff --git a/src/views/LearnRecView.vue b/src/views/LearnRecView.vue index 2e1318c..f3b5881 100644 --- a/src/views/LearnRecView.vue +++ b/src/views/LearnRecView.vue @@ -36,7 +36,7 @@ :time="formatTime(item.created_at)" v-motion :initial="{ opacity: 0, x: -20 }" - :enter="{ opacity: 1, x: 0, transition: { duration: 300, delay: index * 50 } }" + :enter="{ opacity: 1, x: 0, transition: { duration: 300, delay: (index % 20) * 50 } }" >