From 6c9de8b31c63be028209476af6f4451128e3dcbf Mon Sep 17 00:00:00 2001
From: ember <1279347317@qq.com>
Date: Tue, 15 Apr 2025 20:32:33 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=8A=9F=E8=83=BD=E4=B8=8A?=
=?UTF-8?q?=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
dist/css/about.1029dc09.css | 1 +
dist/css/about.54f7f7a6.css | 1 -
dist/css/app.484c9482.css | 1 +
dist/css/app.91c3e0f8.css | 1 -
dist/index.html | 2 +-
dist/js/{11.b856e82b.js => 11.0cb09941.js} | 4 +-
dist/js/{287.f37f152f.js => 287.760a291e.js} | 4 +-
dist/js/{29.7c52a143.js => 29.b13d599a.js} | 4 +-
dist/js/{313.0593018b.js => 313.672a5e64.js} | 4 +-
dist/js/{34.f5c2eff0.js => 34.feeaf2ce.js} | 4 +-
dist/js/{340.64ae6864.js => 340.de4052ba.js} | 4 +-
dist/js/{368.658f248e.js => 368.7eb6e0f6.js} | 4 +-
dist/js/{899.a643b136.js => 899.b203dd0b.js} | 4 +-
dist/js/about.9892e603.js | 2 +
dist/js/about.e953c7d5.js | 2 -
dist/js/app.2e52ebcc.js | 2 -
dist/js/app.f657fb92.js | 2 +
....2587987c.js => chunk-vendors.f7fe2dc8.js} | 10 +-
src/components/NavBar.vue | 285 +++++++++++++++++-
src/views/AboutView.vue | 7 +
20 files changed, 319 insertions(+), 29 deletions(-)
create mode 100644 dist/css/about.1029dc09.css
delete mode 100644 dist/css/about.54f7f7a6.css
create mode 100644 dist/css/app.484c9482.css
delete mode 100644 dist/css/app.91c3e0f8.css
rename dist/js/{11.b856e82b.js => 11.0cb09941.js} (99%)
rename dist/js/{287.f37f152f.js => 287.760a291e.js} (98%)
rename dist/js/{29.7c52a143.js => 29.b13d599a.js} (99%)
rename dist/js/{313.0593018b.js => 313.672a5e64.js} (97%)
rename dist/js/{34.f5c2eff0.js => 34.feeaf2ce.js} (98%)
rename dist/js/{340.64ae6864.js => 340.de4052ba.js} (99%)
rename dist/js/{368.658f248e.js => 368.7eb6e0f6.js} (99%)
rename dist/js/{899.a643b136.js => 899.b203dd0b.js} (92%)
create mode 100644 dist/js/about.9892e603.js
delete mode 100644 dist/js/about.e953c7d5.js
delete mode 100644 dist/js/app.2e52ebcc.js
create mode 100644 dist/js/app.f657fb92.js
rename dist/js/{chunk-vendors.2587987c.js => chunk-vendors.f7fe2dc8.js} (94%)
diff --git a/dist/css/about.1029dc09.css b/dist/css/about.1029dc09.css
new file mode 100644
index 0000000..6762cfa
--- /dev/null
+++ b/dist/css/about.1029dc09.css
@@ -0,0 +1 @@
+.about-view[data-v-6a1c955e]{background-color:#f5f5f7;min-height:100vh;padding-top:60px}.container[data-v-6a1c955e]{max-width:1000px;margin:0 auto;padding:2rem 1rem}.page-title[data-v-6a1c955e]{font-size:2rem;font-weight:700;margin-bottom:2rem;color:#333;text-align:center}.intro-card[data-v-6a1c955e]{background-color:#fff;border-radius:10px;padding:2rem;margin-bottom:3rem;box-shadow:0 4px 15px rgba(0,0,0,.08);border-left:4px solid #3273dc;position:relative;overflow:hidden}.intro-card[data-v-6a1c955e]:before{content:"";position:absolute;top:0;right:0;width:200px;height:200px;background:radial-gradient(circle at top right,rgba(50,115,220,.08),transparent 70%);z-index:0}.intro-wrapper[data-v-6a1c955e]{display:flex;flex-direction:row;gap:2rem}@media(max-width:768px){.intro-wrapper[data-v-6a1c955e]{flex-direction:column;gap:1.5rem}}.intro-title[data-v-6a1c955e]{font-size:1.5rem;font-weight:600;margin-bottom:1.5rem;color:#333;position:relative;z-index:1}.intro-content[data-v-6a1c955e]{position:relative;z-index:1;flex:1}.intro-content p[data-v-6a1c955e]{margin-bottom:1rem;line-height:1.6;color:#555}.intro-content p[data-v-6a1c955e]:last-child{margin-bottom:0}.contact-author[data-v-6a1c955e]{display:flex;flex-direction:column;align-items:center;justify-content:center}.contact-author .qrcode-box[data-v-6a1c955e]{width:120px;height:120px;border-radius:8px;padding:8px;background-color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.1);margin-bottom:.8rem}.contact-author .qrcode-box .qrcode-img[data-v-6a1c955e]{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.contact-author .contact-title[data-v-6a1c955e]{font-weight:500;color:#444;text-align:center}.donation-section[data-v-6a1c955e]{background-color:#fff;border-radius:10px;padding:2rem;margin-bottom:3rem;text-align:center;box-shadow:0 4px 15px rgba(0,0,0,.08)}.section-title[data-v-6a1c955e]{font-size:1.5rem;font-weight:600;margin-bottom:1rem;color:#333}.donation-desc[data-v-6a1c955e]{margin-bottom:2rem;max-width:600px;margin-left:auto;margin-right:auto;color:#555}.qrcode-container[data-v-6a1c955e]{display:flex;justify-content:center;gap:3rem;flex-wrap:wrap}.qrcode-item[data-v-6a1c955e]{display:flex;flex-direction:column;align-items:center}.qrcode-box[data-v-6a1c955e]{width:150px;height:150px;border-radius:8px;padding:10px;background-color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.1);margin-bottom:1rem}.qrcode-box .qrcode-img[data-v-6a1c955e]{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.qrcode-title[data-v-6a1c955e]{font-weight:500;color:#444}.timeline-section[data-v-6a1c955e]{background-color:#fff;border-radius:10px;padding:2rem;box-shadow:0 4px 15px rgba(0,0,0,.08)}.timeline[data-v-6a1c955e]{position:relative;padding-left:2rem}.timeline[data-v-6a1c955e]:before{content:"";position:absolute;top:0;bottom:0;left:8px;width:2px;background-color:#e0e0e0}.timeline-month[data-v-6a1c955e]{position:relative;margin-bottom:2.5rem}.timeline-month[data-v-6a1c955e]:last-child{margin-bottom:0}.month-marker[data-v-6a1c955e]{position:absolute;left:-2rem;top:0}.month-marker .month-date[data-v-6a1c955e]{display:block;background-color:#3273dc;color:#fff;padding:.5rem 1rem;border-radius:20px;font-weight:600;font-size:.9rem;position:relative;z-index:2;margin-left:2rem}.month-marker[data-v-6a1c955e]:before{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background-color:#3273dc;left:0;top:10px;z-index:2}.month-events[data-v-6a1c955e]{padding-top:3.5rem}.timeline-event[data-v-6a1c955e]{position:relative;padding-left:1.5rem;margin-bottom:2rem}.timeline-event[data-v-6a1c955e]:last-child{margin-bottom:0}.timeline-event[data-v-6a1c955e]:before{content:"";position:absolute;width:12px;height:12px;border-radius:50%;background-color:#f0f0f0;border:2px solid #3273dc;left:-31px;top:4px;z-index:2}.event-date[data-v-6a1c955e]{font-size:.9rem;color:#666;margin-bottom:.5rem;font-weight:500}.event-title[data-v-6a1c955e]{font-size:1.1rem;font-weight:600;color:#333;margin-bottom:.5rem}.event-desc[data-v-6a1c955e]{color:#555;line-height:1.5}@media(max-width:768px){.page-title[data-v-6a1c955e]{font-size:1.6rem;text-align:left}.donation-section[data-v-6a1c955e],.intro-card[data-v-6a1c955e],.timeline-section[data-v-6a1c955e]{padding:1.5rem}.qrcode-container[data-v-6a1c955e]{gap:2rem}.timeline[data-v-6a1c955e]{padding-left:1rem}.month-marker[data-v-6a1c955e]{left:-1rem}.timeline-event[data-v-6a1c955e]{padding-left:.5rem}.timeline-event[data-v-6a1c955e]:before{left:-15px}}
\ No newline at end of file
diff --git a/dist/css/about.54f7f7a6.css b/dist/css/about.54f7f7a6.css
deleted file mode 100644
index 3b4153f..0000000
--- a/dist/css/about.54f7f7a6.css
+++ /dev/null
@@ -1 +0,0 @@
-.about-view[data-v-9fcdf76a]{background-color:#f5f5f7;min-height:100vh;padding-top:60px}.container[data-v-9fcdf76a]{max-width:1000px;margin:0 auto;padding:2rem 1rem}.page-title[data-v-9fcdf76a]{font-size:2rem;font-weight:700;margin-bottom:2rem;color:#333;text-align:center}.intro-card[data-v-9fcdf76a]{background-color:#fff;border-radius:10px;padding:2rem;margin-bottom:3rem;box-shadow:0 4px 15px rgba(0,0,0,.08);border-left:4px solid #3273dc;position:relative;overflow:hidden}.intro-card[data-v-9fcdf76a]:before{content:"";position:absolute;top:0;right:0;width:200px;height:200px;background:radial-gradient(circle at top right,rgba(50,115,220,.08),transparent 70%);z-index:0}.intro-wrapper[data-v-9fcdf76a]{display:flex;flex-direction:row;gap:2rem}@media(max-width:768px){.intro-wrapper[data-v-9fcdf76a]{flex-direction:column;gap:1.5rem}}.intro-title[data-v-9fcdf76a]{font-size:1.5rem;font-weight:600;margin-bottom:1.5rem;color:#333;position:relative;z-index:1}.intro-content[data-v-9fcdf76a]{position:relative;z-index:1;flex:1}.intro-content p[data-v-9fcdf76a]{margin-bottom:1rem;line-height:1.6;color:#555}.intro-content p[data-v-9fcdf76a]:last-child{margin-bottom:0}.contact-author[data-v-9fcdf76a]{display:flex;flex-direction:column;align-items:center;justify-content:center}.contact-author .qrcode-box[data-v-9fcdf76a]{width:120px;height:120px;border-radius:8px;padding:8px;background-color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.1);margin-bottom:.8rem}.contact-author .qrcode-box .qrcode-img[data-v-9fcdf76a]{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.contact-author .contact-title[data-v-9fcdf76a]{font-weight:500;color:#444;text-align:center}.donation-section[data-v-9fcdf76a]{background-color:#fff;border-radius:10px;padding:2rem;margin-bottom:3rem;text-align:center;box-shadow:0 4px 15px rgba(0,0,0,.08)}.section-title[data-v-9fcdf76a]{font-size:1.5rem;font-weight:600;margin-bottom:1rem;color:#333}.donation-desc[data-v-9fcdf76a]{margin-bottom:2rem;max-width:600px;margin-left:auto;margin-right:auto;color:#555}.qrcode-container[data-v-9fcdf76a]{display:flex;justify-content:center;gap:3rem;flex-wrap:wrap}.qrcode-item[data-v-9fcdf76a]{display:flex;flex-direction:column;align-items:center}.qrcode-box[data-v-9fcdf76a]{width:150px;height:150px;border-radius:8px;padding:10px;background-color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.1);margin-bottom:1rem}.qrcode-box .qrcode-img[data-v-9fcdf76a]{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.qrcode-title[data-v-9fcdf76a]{font-weight:500;color:#444}.timeline-section[data-v-9fcdf76a]{background-color:#fff;border-radius:10px;padding:2rem;box-shadow:0 4px 15px rgba(0,0,0,.08)}.timeline[data-v-9fcdf76a]{position:relative;padding-left:2rem}.timeline[data-v-9fcdf76a]:before{content:"";position:absolute;top:0;bottom:0;left:8px;width:2px;background-color:#e0e0e0}.timeline-month[data-v-9fcdf76a]{position:relative;margin-bottom:2.5rem}.timeline-month[data-v-9fcdf76a]:last-child{margin-bottom:0}.month-marker[data-v-9fcdf76a]{position:absolute;left:-2rem;top:0}.month-marker .month-date[data-v-9fcdf76a]{display:block;background-color:#3273dc;color:#fff;padding:.5rem 1rem;border-radius:20px;font-weight:600;font-size:.9rem;position:relative;z-index:2;margin-left:2rem}.month-marker[data-v-9fcdf76a]:before{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background-color:#3273dc;left:0;top:10px;z-index:2}.month-events[data-v-9fcdf76a]{padding-top:3.5rem}.timeline-event[data-v-9fcdf76a]{position:relative;padding-left:1.5rem;margin-bottom:2rem}.timeline-event[data-v-9fcdf76a]:last-child{margin-bottom:0}.timeline-event[data-v-9fcdf76a]:before{content:"";position:absolute;width:12px;height:12px;border-radius:50%;background-color:#f0f0f0;border:2px solid #3273dc;left:-31px;top:4px;z-index:2}.event-date[data-v-9fcdf76a]{font-size:.9rem;color:#666;margin-bottom:.5rem;font-weight:500}.event-title[data-v-9fcdf76a]{font-size:1.1rem;font-weight:600;color:#333;margin-bottom:.5rem}.event-desc[data-v-9fcdf76a]{color:#555;line-height:1.5}@media(max-width:768px){.page-title[data-v-9fcdf76a]{font-size:1.6rem;text-align:left}.donation-section[data-v-9fcdf76a],.intro-card[data-v-9fcdf76a],.timeline-section[data-v-9fcdf76a]{padding:1.5rem}.qrcode-container[data-v-9fcdf76a]{gap:2rem}.timeline[data-v-9fcdf76a]{padding-left:1rem}.month-marker[data-v-9fcdf76a]{left:-1rem}.timeline-event[data-v-9fcdf76a]{padding-left:.5rem}.timeline-event[data-v-9fcdf76a]:before{left:-15px}}
\ No newline at end of file
diff --git a/dist/css/app.484c9482.css b/dist/css/app.484c9482.css
new file mode 100644
index 0000000..7ea06c4
--- /dev/null
+++ b/dist/css/app.484c9482.css
@@ -0,0 +1 @@
+*{margin:0;padding:0;box-sizing:border-box}body,html{font-family:Helvetica Neue,Helvetica,Arial,Microsoft YaHei,sans-serif;font-size:16px;line-height:1.5;color:#333;background-color:#f8f9fa}#app{min-height:100vh;display:flex;flex-direction:column}a{text-decoration:none;color:inherit}img{max-width:100%;height:auto}.beian-footer{background-color:#f8f9fa;padding:15px 0;text-align:center;font-size:12px;color:#777;border-top:1px solid #e9ecef;margin-top:auto}.beian-footer a{color:#666}.beian-footer a:hover{color:#3273dc}.copyright{margin-top:8px}.container{width:100%;max-width:1200px;margin:0 auto;padding:0 15px}.message-overlay[data-v-076938bc]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.message-box[data-v-076938bc]{background-color:#fff;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);width:400px;max-width:90%;overflow:hidden;animation:message-in-076938bc .3s ease}.message-header[data-v-076938bc]{padding:16px 20px;border-bottom:1px solid #f0f0f0}.message-header h3[data-v-076938bc]{margin:0;font-size:16px;font-weight:600;color:#333}.message-content[data-v-076938bc]{padding:20px;font-size:14px;color:#555;line-height:1.6}.message-content p[data-v-076938bc]{margin:0;margin-bottom:1rem}.message-content .input-wrapper[data-v-076938bc]{margin-top:1rem}.message-content .input-wrapper .message-input[data-v-076938bc]{width:100%;padding:8px 12px;border:1px solid #dcdfe6;border-radius:4px;font-size:14px;line-height:1.5;color:#606266;transition:border-color .2s}.message-content .input-wrapper .message-input[data-v-076938bc]:focus{outline:none;border-color:#3273dc}.message-content .input-wrapper .message-input[data-v-076938bc]::-moz-placeholder{color:#c0c4cc}.message-content .input-wrapper .message-input[data-v-076938bc]::placeholder{color:#c0c4cc}.message-footer[data-v-076938bc]{padding:12px 20px;display:flex;justify-content:flex-end;gap:12px;border-top:1px solid #f0f0f0}.btn[data-v-076938bc]{padding:8px 16px;border-radius:4px;font-size:14px;cursor:pointer;transition:all .3s;border:none;outline:none}.btn-cancel[data-v-076938bc]{background-color:#f5f5f5;color:#666}.btn-cancel[data-v-076938bc]:hover{background-color:#e8e8e8}.btn-confirm[data-v-076938bc]{background-color:#3273dc;color:#fff}.btn-confirm[data-v-076938bc]:hover{background-color:#2366d1}.message-fade-enter-active[data-v-076938bc],.message-fade-leave-active[data-v-076938bc]{transition:opacity .3s}.message-fade-enter-from[data-v-076938bc],.message-fade-leave-to[data-v-076938bc]{opacity:0}@keyframes message-in-076938bc{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@media(max-width:768px){.message-box[data-v-076938bc]{width:320px}.message-content[data-v-076938bc]{padding:16px}.message-footer[data-v-076938bc]{padding:10px 16px}}.login-container[data-v-514354c8]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:9999}.login-overlay[data-v-514354c8]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5)}.login-box[data-v-514354c8]{background-color:#fff;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.1);padding:2rem;width:100%;max-width:400px;position:relative;z-index:1}.login-header[data-v-514354c8]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}.login-title[data-v-514354c8]{text-align:center;color:#333;font-size:1.5rem;margin:0;flex:1}.login-form[data-v-514354c8]{display:flex;flex-direction:column}.form-group[data-v-514354c8]{margin-bottom:1rem}label[data-v-514354c8]{display:block;margin-bottom:.5rem;font-weight:500}.form-input[data-v-514354c8]{width:100%;padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1rem;transition:border-color .3s}.form-input[data-v-514354c8]:focus{outline:none;border-color:#3273dc;box-shadow:0 0 0 2px rgba(50,115,220,.2)}.message[data-v-514354c8]{margin:1rem 0;padding:.75rem;border-radius:4px;text-align:center}.message.error[data-v-514354c8]{background-color:rgba(255,56,96,.1);color:#ff3860}.message.success[data-v-514354c8]{background-color:rgba(35,209,96,.1);color:#23d160}.button-group[data-v-514354c8]{display:flex;gap:1rem;margin-top:1rem}.btn[data-v-514354c8]{flex:1;padding:.75rem;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:background-color .3s,transform .2s}.btn[data-v-514354c8]:hover{transform:translateY(-2px)}.btn[data-v-514354c8]:active{transform:translateY(0)}.btn-primary[data-v-514354c8]{background-color:#3273dc;color:#fff}.btn-primary[data-v-514354c8]:hover{background-color:#2366d1}.btn-secondary[data-v-514354c8]{background-color:#f5f5f5;color:#333}.btn-secondary[data-v-514354c8]:hover{background-color:#e8e8e8}.modal[data-v-514354c8]{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);z-index:1000;align-items:center;justify-content:center}.modal.show[data-v-514354c8]{display:flex}.modal-content[data-v-514354c8]{background-color:#fff;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,.2);width:90%;max-width:400px;overflow:hidden}.modal-header[data-v-514354c8]{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid #eee}.modal-header h3[data-v-514354c8]{margin:0;font-size:1.25rem}.modal-body[data-v-514354c8]{padding:1.5rem}.modal-footer[data-v-514354c8]{padding:1rem;border-top:1px solid #eee;text-align:right}.close-btn[data-v-514354c8]{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#666}.close-btn[data-v-514354c8]:hover{color:#333}.captcha-instruction[data-v-514354c8]{margin-bottom:1rem}.captcha-message[data-v-514354c8]{margin-top:.5rem;font-size:.9rem}.captcha-message.error[data-v-514354c8]{color:#ff3860}.captcha-message.success[data-v-514354c8]{color:#23d160}.loading-overlay[data-v-514354c8]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:hsla(0,0%,100%,.8);display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:2000}.spinner[data-v-514354c8]{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #3273dc;border-radius:50%;animation:spin-514354c8 1s linear infinite;margin-bottom:1rem}@keyframes spin-514354c8{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media(max-width:480px){.login-box[data-v-514354c8]{padding:1.5rem}.button-group[data-v-514354c8]{flex-direction:column}.btn[data-v-514354c8]{margin-bottom:.5rem}}.navbar[data-v-2839ed63]{background-color:#fff;box-shadow:0 2px 4px rgba(0,0,0,.1);position:fixed;top:0;left:0;right:0;padding:.5rem 1rem;z-index:1000}.navbar .container[data-v-2839ed63]{display:flex;align-items:center;max-width:1200px;margin:0 auto;position:relative;width:100%}.navbar .navbar-brand[data-v-2839ed63]{display:flex;align-items:center;justify-content:space-between;flex:1}.navbar .navbar-logo[data-v-2839ed63]{font-size:1.5rem;font-weight:700;color:#333;text-decoration:none;display:flex;align-items:center}.navbar .navbar-logo-img[data-v-2839ed63]{width:30px;height:30px;margin-right:8px;-o-object-fit:contain;object-fit:contain}.navbar .navbar-burger[data-v-2839ed63]{display:none;width:2rem;height:1.2rem;cursor:pointer;margin-left:0;position:absolute;right:0;top:50%;transform:translateY(-50%)}.navbar .navbar-burger span[data-v-2839ed63]{display:block;height:2px;width:74%;background-color:#333;transition:all .3s ease-in-out;position:absolute;left:0}.navbar .navbar-burger span[data-v-2839ed63]:first-child{top:0}.navbar .navbar-burger span[data-v-2839ed63]:nth-child(2){top:50%;transform:translateY(-50%)}.navbar .navbar-burger span[data-v-2839ed63]:nth-child(3){bottom:0}.navbar .navbar-burger.is-active span[data-v-2839ed63]:nth-child(2){opacity:0}.navbar .navbar-burger.is-active span[data-v-2839ed63]:first-child{top:50%;transform:translateY(-50%) rotate(45deg)}.navbar .navbar-burger.is-active span[data-v-2839ed63]:nth-child(3){bottom:50%;transform:translateY(50%) rotate(-45deg)}.navbar .navbar-menu[data-v-2839ed63]{display:flex;align-items:center;transition:transform .3s ease,opacity .3s ease}.navbar .navbar-end[data-v-2839ed63]{display:flex;align-items:center}.navbar .navbar-item[data-v-2839ed63]{padding:.5rem 1rem;color:#333;text-decoration:none;transition:color .3s;white-space:nowrap}.navbar .navbar-item[data-v-2839ed63]:hover{color:#3273dc}.navbar .user-dropdown[data-v-2839ed63]{position:relative}.navbar .user-dropdown .user-info[data-v-2839ed63]{display:flex;align-items:center;cursor:pointer;padding:.5rem}.navbar .user-dropdown .user-info[data-v-2839ed63]:hover{background-color:#f5f5f5;border-radius:4px}.navbar .user-dropdown .user-avatar[data-v-2839ed63]{width:30px;height:30px;border-radius:50%;margin-right:8px;-o-object-fit:cover;object-fit:cover}.navbar .user-dropdown .user-nickname[data-v-2839ed63]{margin-right:4px;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.navbar .user-dropdown .dropdown-arrow[data-v-2839ed63]{font-size:12px;transition:transform .3s}.navbar .user-dropdown .dropdown-arrow.is-active[data-v-2839ed63]{transform:rotate(180deg)}.navbar .user-dropdown .dropdown-menu[data-v-2839ed63]{position:absolute;top:100%;right:0;background-color:#fff;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.1);min-width:120px;z-index:1001}.navbar .user-dropdown .dropdown-item[data-v-2839ed63]{padding:.75rem 1rem;cursor:pointer}.navbar .user-dropdown .dropdown-item[data-v-2839ed63]:hover{background-color:#f5f5f5}@media(max-width:768px){.navbar[data-v-2839ed63]{padding:0}.navbar .navbar-brand[data-v-2839ed63]{width:auto;padding:.5rem 1rem}.navbar .navbar-burger[data-v-2839ed63]{display:flex;margin-left:1rem}.navbar .navbar-menu[data-v-2839ed63]{display:block;position:absolute;top:100%;left:0;right:0;background-color:#fff;box-shadow:0 4px 6px rgba(0,0,0,.1);padding:.5rem 0;z-index:1000;opacity:0;transform:translateY(-20px);pointer-events:none}.navbar .navbar-menu.is-active[data-v-2839ed63]{opacity:1;transform:translateY(0);pointer-events:auto}.navbar .navbar-end[data-v-2839ed63]{flex-direction:column;align-items:stretch}.navbar .navbar-item[data-v-2839ed63]{padding:.75rem 1.5rem;text-align:left;border-bottom:1px solid #f5f5f5}.navbar .navbar-item[data-v-2839ed63]:last-child{border-bottom:none}.navbar .user-dropdown .dropdown-menu[data-v-2839ed63]{position:static;box-shadow:none;border-top:1px solid #f5f5f5}.navbar .user-dropdown .dropdown-item[data-v-2839ed63],.navbar .user-dropdown .user-info[data-v-2839ed63]{padding:.75rem 1.5rem}}.login-btn[data-v-2839ed63]{color:#333;cursor:pointer;text-decoration:none;transition:color .3s}.login-btn[data-v-2839ed63]:hover{color:#3273dc}.activation-dialog[data-v-2839ed63]{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:2000}.activation-dialog .activation-dialog-content[data-v-2839ed63]{background-color:#fff;border-radius:8px;padding:2rem;max-width:90%;width:500px;box-shadow:0 4px 20px rgba(0,0,0,.15)}.activation-dialog .activation-dialog-content h3[data-v-2839ed63]{font-size:1.5rem;margin-bottom:1rem;color:#333;text-align:center}.activation-dialog .activation-dialog-content p[data-v-2839ed63]{margin-bottom:1.5rem;color:#666}.activation-dialog .activation-dialog-content .activation-methods[data-v-2839ed63]{display:flex;flex-direction:column;gap:1.5rem;margin-bottom:1.5rem}.activation-dialog .activation-dialog-content .activation-method[data-v-2839ed63]{background-color:#f9f9f9;padding:1rem;border-radius:6px;border:1px solid #eee}.activation-dialog .activation-dialog-content .activation-method h4[data-v-2839ed63]{font-size:1.1rem;margin-bottom:.5rem;color:#444}.activation-dialog .activation-dialog-content .activation-method p[data-v-2839ed63]{margin-bottom:1rem;color:#666;font-size:.9rem}.activation-dialog .activation-dialog-content .verify-btn[data-v-2839ed63]{background-color:#3273dc;color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-weight:500;cursor:pointer;transition:background-color .3s}.activation-dialog .activation-dialog-content .verify-btn[data-v-2839ed63]:hover{background-color:#2366d1}.activation-dialog .activation-dialog-content .close-btn[data-v-2839ed63]{width:100%;background-color:#f0f0f0;color:#333;border:none;border-radius:4px;padding:.5rem 1rem;cursor:pointer;transition:background-color .3s}.activation-dialog .activation-dialog-content .close-btn[data-v-2839ed63]:hover{background-color:#e0e0e0}.unread-dot[data-v-2839ed63]{display:inline-block;width:8px;height:8px;background-color:#ff4d4f;border-radius:50%;margin-left:5px}.message-modal[data-v-2839ed63]{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:2000}.message-modal .message-modal-content[data-v-2839ed63]{background-color:#fff;border-radius:8px;padding:2rem;max-width:90%;width:500px;box-shadow:0 4px 20px rgba(0,0,0,.15)}.message-modal .message-modal-content .message-modal-header[data-v-2839ed63]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.message-modal .message-modal-content .message-modal-header h3[data-v-2839ed63]{font-size:1.5rem;color:#333}.message-modal .message-modal-content .message-modal-header .close-icon[data-v-2839ed63]{font-size:1.5rem;cursor:pointer}.message-modal .message-modal-content .message-modal-body .loading-spinner[data-v-2839ed63],.message-modal .message-modal-content .message-modal-body .no-messages[data-v-2839ed63]{text-align:center;margin-bottom:1rem}.message-modal .message-modal-content .message-modal-body .message-list[data-v-2839ed63]{max-height:60vh;overflow-y:auto;padding-right:5px;margin-right:-5px}.message-modal .message-modal-content .message-modal-body .message-list .message-item[data-v-2839ed63]{margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #f0f0f0}.message-modal .message-modal-content .message-modal-body .message-list .message-item[data-v-2839ed63]:last-child{border-bottom:none}.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-header[data-v-2839ed63]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-header .message-time[data-v-2839ed63]{font-size:.9rem;color:#666}.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-header .unread-tag[data-v-2839ed63]{background-color:#ff4d4f;color:#fff;padding:.2rem .5rem;border-radius:4px;font-size:.8rem}.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content[data-v-2839ed63]{font-size:1rem;color:#333}.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content .router-link-active[data-v-2839ed63],.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content a[data-v-2839ed63],.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content a[data-v-2839ed63]:link,.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content a[data-v-2839ed63]:visited,.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content[data-v-2839ed63] a{color:#3273dc!important;text-decoration:none!important;font-weight:500!important}.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content .router-link-active[data-v-2839ed63]:hover,.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content a[data-v-2839ed63]:hover,.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content a[data-v-2839ed63]:link:hover,.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content a[data-v-2839ed63]:visited:hover,.message-modal .message-modal-content .message-modal-body .message-list .message-item .message-content[data-v-2839ed63] a:hover{text-decoration:underline!important;color:#2366d1!important}.message-modal .message-modal-content .message-modal-body .pagination[data-v-2839ed63]{display:flex;justify-content:center;align-items:center;margin-top:1rem}.message-modal .message-modal-content .message-modal-body .pagination .page-btn[data-v-2839ed63]{background-color:#3273dc;color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;cursor:pointer;transition:background-color .3s}.message-modal .message-modal-content .message-modal-body .pagination .page-btn[data-v-2839ed63]:hover{background-color:#2366d1}.message-modal .message-modal-content .message-modal-body .pagination .page-btn[data-v-2839ed63]:disabled{background-color:#f0f0f0;cursor:not-allowed}.message-modal .message-modal-content .message-modal-body .pagination .page-info[data-v-2839ed63]{margin:0 1rem;font-size:.9rem;color:#666;display:flex;align-items:center}[data-v-2839ed63] .message-modal-body a{color:#3273dc!important;text-decoration:none!important;font-weight:500!important}[data-v-2839ed63] .message-modal-body a:hover{text-decoration:underline!important;color:#2366d1!important}.home[data-v-1c64fc58]{min-height:100vh;background-color:#f8f9fa;padding-top:60px}.container[data-v-1c64fc58]{max-width:1200px;margin:0 auto;padding:2rem 1rem}.welcome-section[data-v-1c64fc58]{text-align:center;padding:3rem 1rem}.welcome-section img[data-v-1c64fc58]{width:150px;margin-bottom:2rem}.welcome-section h1[data-v-1c64fc58]{font-size:2.5rem;margin-bottom:1rem;color:#333}.welcome-section p[data-v-1c64fc58]{font-size:1.2rem;margin-bottom:2rem;color:#555}.welcome-section .intro-text[data-v-1c64fc58]{background-color:#fff;border-radius:10px;padding:2rem;margin-top:2rem;box-shadow:0 4px 15px rgba(0,0,0,.08);text-align:left;border-left:4px solid #f6be05;position:relative;overflow:hidden;max-width:800px;margin-left:auto;margin-right:auto}.welcome-section .intro-text[data-v-1c64fc58]:before{content:"";position:absolute;top:0;right:0;width:200px;height:200px;background:radial-gradient(circle at top right,rgba(50,115,220,.08),transparent 70%);z-index:0}.welcome-section .intro-text p[data-v-1c64fc58]{position:relative;z-index:1;margin-bottom:1rem;font-size:1.1rem;line-height:1.6;color:#555}.welcome-section .intro-text p[data-v-1c64fc58]:last-child{margin-bottom:0}.welcome-section .cta-buttons[data-v-1c64fc58]{display:flex;justify-content:center;gap:1rem;margin-top:2rem}.welcome-section .cta-buttons .btn[data-v-1c64fc58]{padding:.75rem 1.5rem;border-radius:4px;font-weight:600;transition:all .3s;text-decoration:none}.welcome-section .cta-buttons .btn.btn-primary[data-v-1c64fc58]{background-color:#3273dc;color:#fff}.welcome-section .cta-buttons .btn.btn-primary[data-v-1c64fc58]:hover{background-color:#2366c9}.welcome-section .cta-buttons .btn.btn-secondary[data-v-1c64fc58]{background-color:#f5f5f5;color:#333}.welcome-section .cta-buttons .btn.btn-secondary[data-v-1c64fc58]:hover{background-color:#e8e8e8}@media(max-width:768px){.welcome-section[data-v-1c64fc58]{padding:2rem 1rem}.welcome-section h1[data-v-1c64fc58]{font-size:2rem}.welcome-section p[data-v-1c64fc58]{font-size:1rem}.welcome-section .intro-text[data-v-1c64fc58]{padding:1.5rem}.welcome-section .intro-text p[data-v-1c64fc58]{font-size:1rem}.welcome-section .cta-buttons[data-v-1c64fc58]{flex-direction:column;align-items:center}.welcome-section .cta-buttons .btn[data-v-1c64fc58]{width:100%;max-width:300px;margin-bottom:.5rem}}
\ No newline at end of file
diff --git a/dist/css/app.91c3e0f8.css b/dist/css/app.91c3e0f8.css
deleted file mode 100644
index 1551c82..0000000
--- a/dist/css/app.91c3e0f8.css
+++ /dev/null
@@ -1 +0,0 @@
-*{margin:0;padding:0;box-sizing:border-box}body,html{font-family:Helvetica Neue,Helvetica,Arial,Microsoft YaHei,sans-serif;font-size:16px;line-height:1.5;color:#333;background-color:#f8f9fa}#app{min-height:100vh;display:flex;flex-direction:column}a{text-decoration:none;color:inherit}img{max-width:100%;height:auto}.beian-footer{background-color:#f8f9fa;padding:15px 0;text-align:center;font-size:12px;color:#777;border-top:1px solid #e9ecef;margin-top:auto}.beian-footer a{color:#666}.beian-footer a:hover{color:#3273dc}.copyright{margin-top:8px}.container{width:100%;max-width:1200px;margin:0 auto;padding:0 15px}.message-overlay[data-v-076938bc]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.message-box[data-v-076938bc]{background-color:#fff;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);width:400px;max-width:90%;overflow:hidden;animation:message-in-076938bc .3s ease}.message-header[data-v-076938bc]{padding:16px 20px;border-bottom:1px solid #f0f0f0}.message-header h3[data-v-076938bc]{margin:0;font-size:16px;font-weight:600;color:#333}.message-content[data-v-076938bc]{padding:20px;font-size:14px;color:#555;line-height:1.6}.message-content p[data-v-076938bc]{margin:0;margin-bottom:1rem}.message-content .input-wrapper[data-v-076938bc]{margin-top:1rem}.message-content .input-wrapper .message-input[data-v-076938bc]{width:100%;padding:8px 12px;border:1px solid #dcdfe6;border-radius:4px;font-size:14px;line-height:1.5;color:#606266;transition:border-color .2s}.message-content .input-wrapper .message-input[data-v-076938bc]:focus{outline:none;border-color:#3273dc}.message-content .input-wrapper .message-input[data-v-076938bc]::-moz-placeholder{color:#c0c4cc}.message-content .input-wrapper .message-input[data-v-076938bc]::placeholder{color:#c0c4cc}.message-footer[data-v-076938bc]{padding:12px 20px;display:flex;justify-content:flex-end;gap:12px;border-top:1px solid #f0f0f0}.btn[data-v-076938bc]{padding:8px 16px;border-radius:4px;font-size:14px;cursor:pointer;transition:all .3s;border:none;outline:none}.btn-cancel[data-v-076938bc]{background-color:#f5f5f5;color:#666}.btn-cancel[data-v-076938bc]:hover{background-color:#e8e8e8}.btn-confirm[data-v-076938bc]{background-color:#3273dc;color:#fff}.btn-confirm[data-v-076938bc]:hover{background-color:#2366d1}.message-fade-enter-active[data-v-076938bc],.message-fade-leave-active[data-v-076938bc]{transition:opacity .3s}.message-fade-enter-from[data-v-076938bc],.message-fade-leave-to[data-v-076938bc]{opacity:0}@keyframes message-in-076938bc{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@media(max-width:768px){.message-box[data-v-076938bc]{width:320px}.message-content[data-v-076938bc]{padding:16px}.message-footer[data-v-076938bc]{padding:10px 16px}}.login-container[data-v-514354c8]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:9999}.login-overlay[data-v-514354c8]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5)}.login-box[data-v-514354c8]{background-color:#fff;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.1);padding:2rem;width:100%;max-width:400px;position:relative;z-index:1}.login-header[data-v-514354c8]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}.login-title[data-v-514354c8]{text-align:center;color:#333;font-size:1.5rem;margin:0;flex:1}.login-form[data-v-514354c8]{display:flex;flex-direction:column}.form-group[data-v-514354c8]{margin-bottom:1rem}label[data-v-514354c8]{display:block;margin-bottom:.5rem;font-weight:500}.form-input[data-v-514354c8]{width:100%;padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1rem;transition:border-color .3s}.form-input[data-v-514354c8]:focus{outline:none;border-color:#3273dc;box-shadow:0 0 0 2px rgba(50,115,220,.2)}.message[data-v-514354c8]{margin:1rem 0;padding:.75rem;border-radius:4px;text-align:center}.message.error[data-v-514354c8]{background-color:rgba(255,56,96,.1);color:#ff3860}.message.success[data-v-514354c8]{background-color:rgba(35,209,96,.1);color:#23d160}.button-group[data-v-514354c8]{display:flex;gap:1rem;margin-top:1rem}.btn[data-v-514354c8]{flex:1;padding:.75rem;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:background-color .3s,transform .2s}.btn[data-v-514354c8]:hover{transform:translateY(-2px)}.btn[data-v-514354c8]:active{transform:translateY(0)}.btn-primary[data-v-514354c8]{background-color:#3273dc;color:#fff}.btn-primary[data-v-514354c8]:hover{background-color:#2366d1}.btn-secondary[data-v-514354c8]{background-color:#f5f5f5;color:#333}.btn-secondary[data-v-514354c8]:hover{background-color:#e8e8e8}.modal[data-v-514354c8]{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);z-index:1000;align-items:center;justify-content:center}.modal.show[data-v-514354c8]{display:flex}.modal-content[data-v-514354c8]{background-color:#fff;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,.2);width:90%;max-width:400px;overflow:hidden}.modal-header[data-v-514354c8]{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid #eee}.modal-header h3[data-v-514354c8]{margin:0;font-size:1.25rem}.modal-body[data-v-514354c8]{padding:1.5rem}.modal-footer[data-v-514354c8]{padding:1rem;border-top:1px solid #eee;text-align:right}.close-btn[data-v-514354c8]{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#666}.close-btn[data-v-514354c8]:hover{color:#333}.captcha-instruction[data-v-514354c8]{margin-bottom:1rem}.captcha-message[data-v-514354c8]{margin-top:.5rem;font-size:.9rem}.captcha-message.error[data-v-514354c8]{color:#ff3860}.captcha-message.success[data-v-514354c8]{color:#23d160}.loading-overlay[data-v-514354c8]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:hsla(0,0%,100%,.8);display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:2000}.spinner[data-v-514354c8]{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #3273dc;border-radius:50%;animation:spin-514354c8 1s linear infinite;margin-bottom:1rem}@keyframes spin-514354c8{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media(max-width:480px){.login-box[data-v-514354c8]{padding:1.5rem}.button-group[data-v-514354c8]{flex-direction:column}.btn[data-v-514354c8]{margin-bottom:.5rem}}.navbar[data-v-868bf484]{background-color:#fff;box-shadow:0 2px 4px rgba(0,0,0,.1);position:fixed;top:0;left:0;right:0;padding:.5rem 1rem;z-index:1000}.navbar .container[data-v-868bf484]{display:flex;align-items:center;max-width:1200px;margin:0 auto;position:relative;width:100%}.navbar .navbar-brand[data-v-868bf484]{display:flex;align-items:center;justify-content:space-between;flex:1}.navbar .navbar-logo[data-v-868bf484]{font-size:1.5rem;font-weight:700;color:#333;text-decoration:none;display:flex;align-items:center}.navbar .navbar-logo-img[data-v-868bf484]{width:30px;height:30px;margin-right:8px;-o-object-fit:contain;object-fit:contain}.navbar .navbar-burger[data-v-868bf484]{display:none;width:2rem;height:1.2rem;cursor:pointer;margin-left:0;position:absolute;right:0;top:50%;transform:translateY(-50%)}.navbar .navbar-burger span[data-v-868bf484]{display:block;height:2px;width:74%;background-color:#333;transition:all .3s ease-in-out;position:absolute;left:0}.navbar .navbar-burger span[data-v-868bf484]:first-child{top:0}.navbar .navbar-burger span[data-v-868bf484]:nth-child(2){top:50%;transform:translateY(-50%)}.navbar .navbar-burger span[data-v-868bf484]:nth-child(3){bottom:0}.navbar .navbar-burger.is-active span[data-v-868bf484]:nth-child(2){opacity:0}.navbar .navbar-burger.is-active span[data-v-868bf484]:first-child{top:50%;transform:translateY(-50%) rotate(45deg)}.navbar .navbar-burger.is-active span[data-v-868bf484]:nth-child(3){bottom:50%;transform:translateY(50%) rotate(-45deg)}.navbar .navbar-menu[data-v-868bf484]{display:flex;align-items:center;transition:transform .3s ease,opacity .3s ease}.navbar .navbar-end[data-v-868bf484]{display:flex;align-items:center}.navbar .navbar-item[data-v-868bf484]{padding:.5rem 1rem;color:#333;text-decoration:none;transition:color .3s;white-space:nowrap}.navbar .navbar-item[data-v-868bf484]:hover{color:#3273dc}.navbar .user-dropdown[data-v-868bf484]{position:relative}.navbar .user-dropdown .user-info[data-v-868bf484]{display:flex;align-items:center;cursor:pointer;padding:.5rem}.navbar .user-dropdown .user-info[data-v-868bf484]:hover{background-color:#f5f5f5;border-radius:4px}.navbar .user-dropdown .user-avatar[data-v-868bf484]{width:30px;height:30px;border-radius:50%;margin-right:8px;-o-object-fit:cover;object-fit:cover}.navbar .user-dropdown .user-nickname[data-v-868bf484]{margin-right:4px;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.navbar .user-dropdown .dropdown-arrow[data-v-868bf484]{font-size:12px;transition:transform .3s}.navbar .user-dropdown .dropdown-arrow.is-active[data-v-868bf484]{transform:rotate(180deg)}.navbar .user-dropdown .dropdown-menu[data-v-868bf484]{position:absolute;top:100%;right:0;background-color:#fff;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.1);min-width:120px;z-index:1001}.navbar .user-dropdown .dropdown-item[data-v-868bf484]{padding:.75rem 1rem;cursor:pointer}.navbar .user-dropdown .dropdown-item[data-v-868bf484]:hover{background-color:#f5f5f5}@media(max-width:768px){.navbar[data-v-868bf484]{padding:0}.navbar .navbar-brand[data-v-868bf484]{width:auto;padding:.5rem 1rem}.navbar .navbar-burger[data-v-868bf484]{display:flex;margin-left:1rem}.navbar .navbar-menu[data-v-868bf484]{display:block;position:absolute;top:100%;left:0;right:0;background-color:#fff;box-shadow:0 4px 6px rgba(0,0,0,.1);padding:.5rem 0;z-index:1000;opacity:0;transform:translateY(-20px);pointer-events:none}.navbar .navbar-menu.is-active[data-v-868bf484]{opacity:1;transform:translateY(0);pointer-events:auto}.navbar .navbar-end[data-v-868bf484]{flex-direction:column;align-items:stretch}.navbar .navbar-item[data-v-868bf484]{padding:.75rem 1.5rem;text-align:left;border-bottom:1px solid #f5f5f5}.navbar .navbar-item[data-v-868bf484]:last-child{border-bottom:none}.navbar .user-dropdown .dropdown-menu[data-v-868bf484]{position:static;box-shadow:none;border-top:1px solid #f5f5f5}.navbar .user-dropdown .dropdown-item[data-v-868bf484],.navbar .user-dropdown .user-info[data-v-868bf484]{padding:.75rem 1.5rem}}.login-btn[data-v-868bf484]{color:#333;cursor:pointer;text-decoration:none;transition:color .3s}.login-btn[data-v-868bf484]:hover{color:#3273dc}.activation-dialog[data-v-868bf484]{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:2000}.activation-dialog .activation-dialog-content[data-v-868bf484]{background-color:#fff;border-radius:8px;padding:2rem;max-width:90%;width:500px;box-shadow:0 4px 20px rgba(0,0,0,.15)}.activation-dialog .activation-dialog-content h3[data-v-868bf484]{font-size:1.5rem;margin-bottom:1rem;color:#333;text-align:center}.activation-dialog .activation-dialog-content p[data-v-868bf484]{margin-bottom:1.5rem;color:#666}.activation-dialog .activation-dialog-content .activation-methods[data-v-868bf484]{display:flex;flex-direction:column;gap:1.5rem;margin-bottom:1.5rem}.activation-dialog .activation-dialog-content .activation-method[data-v-868bf484]{background-color:#f9f9f9;padding:1rem;border-radius:6px;border:1px solid #eee}.activation-dialog .activation-dialog-content .activation-method h4[data-v-868bf484]{font-size:1.1rem;margin-bottom:.5rem;color:#444}.activation-dialog .activation-dialog-content .activation-method p[data-v-868bf484]{margin-bottom:1rem;color:#666;font-size:.9rem}.activation-dialog .activation-dialog-content .verify-btn[data-v-868bf484]{background-color:#3273dc;color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-weight:500;cursor:pointer;transition:background-color .3s}.activation-dialog .activation-dialog-content .verify-btn[data-v-868bf484]:hover{background-color:#2366d1}.activation-dialog .activation-dialog-content .close-btn[data-v-868bf484]{width:100%;background-color:#f0f0f0;color:#333;border:none;border-radius:4px;padding:.5rem 1rem;cursor:pointer;transition:background-color .3s}.activation-dialog .activation-dialog-content .close-btn[data-v-868bf484]:hover{background-color:#e0e0e0}.home[data-v-1c64fc58]{min-height:100vh;background-color:#f8f9fa;padding-top:60px}.container[data-v-1c64fc58]{max-width:1200px;margin:0 auto;padding:2rem 1rem}.welcome-section[data-v-1c64fc58]{text-align:center;padding:3rem 1rem}.welcome-section img[data-v-1c64fc58]{width:150px;margin-bottom:2rem}.welcome-section h1[data-v-1c64fc58]{font-size:2.5rem;margin-bottom:1rem;color:#333}.welcome-section p[data-v-1c64fc58]{font-size:1.2rem;margin-bottom:2rem;color:#555}.welcome-section .intro-text[data-v-1c64fc58]{background-color:#fff;border-radius:10px;padding:2rem;margin-top:2rem;box-shadow:0 4px 15px rgba(0,0,0,.08);text-align:left;border-left:4px solid #f6be05;position:relative;overflow:hidden;max-width:800px;margin-left:auto;margin-right:auto}.welcome-section .intro-text[data-v-1c64fc58]:before{content:"";position:absolute;top:0;right:0;width:200px;height:200px;background:radial-gradient(circle at top right,rgba(50,115,220,.08),transparent 70%);z-index:0}.welcome-section .intro-text p[data-v-1c64fc58]{position:relative;z-index:1;margin-bottom:1rem;font-size:1.1rem;line-height:1.6;color:#555}.welcome-section .intro-text p[data-v-1c64fc58]:last-child{margin-bottom:0}.welcome-section .cta-buttons[data-v-1c64fc58]{display:flex;justify-content:center;gap:1rem;margin-top:2rem}.welcome-section .cta-buttons .btn[data-v-1c64fc58]{padding:.75rem 1.5rem;border-radius:4px;font-weight:600;transition:all .3s;text-decoration:none}.welcome-section .cta-buttons .btn.btn-primary[data-v-1c64fc58]{background-color:#3273dc;color:#fff}.welcome-section .cta-buttons .btn.btn-primary[data-v-1c64fc58]:hover{background-color:#2366c9}.welcome-section .cta-buttons .btn.btn-secondary[data-v-1c64fc58]{background-color:#f5f5f5;color:#333}.welcome-section .cta-buttons .btn.btn-secondary[data-v-1c64fc58]:hover{background-color:#e8e8e8}@media(max-width:768px){.welcome-section[data-v-1c64fc58]{padding:2rem 1rem}.welcome-section h1[data-v-1c64fc58]{font-size:2rem}.welcome-section p[data-v-1c64fc58]{font-size:1rem}.welcome-section .intro-text[data-v-1c64fc58]{padding:1.5rem}.welcome-section .intro-text p[data-v-1c64fc58]{font-size:1rem}.welcome-section .cta-buttons[data-v-1c64fc58]{flex-direction:column;align-items:center}.welcome-section .cta-buttons .btn[data-v-1c64fc58]{width:100%;max-width:300px;margin-bottom:.5rem}}
\ No newline at end of file
diff --git a/dist/index.html b/dist/index.html
index cfeebbd..350cc2a 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -1 +1 @@
-
NEU小站 抱歉,NEU小站无法在没有 JavaScript 的情况下正常工作。请启用 JavaScript 以继续。
\ No newline at end of file
+NEU小站 抱歉,NEU小站无法在没有 JavaScript 的情况下正常工作。请启用 JavaScript 以继续。
\ No newline at end of file
diff --git a/dist/js/11.b856e82b.js b/dist/js/11.0cb09941.js
similarity index 99%
rename from dist/js/11.b856e82b.js
rename to dist/js/11.0cb09941.js
index 61381d4..d47f513 100644
--- a/dist/js/11.b856e82b.js
+++ b/dist/js/11.0cb09941.js
@@ -1,2 +1,2 @@
-"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[11],{9011:function(e,t,s){s.r(t),s.d(t,{default:function(){return Ye}});var a=s(6768);const n={class:"user-center"},i={key:0,class:"loading-container"},o={key:1,class:"container"},r={class:"upper-section"},l={class:"user-info-container"},c={class:"coin-container"},d={class:"lower-section"},u={key:2,class:"login-required-container"};function h(e,t,s,h,g,k){const v=(0,a.g2)("Navbar"),m=(0,a.g2)("UserInfo"),p=(0,a.g2)("Coin"),L=(0,a.g2)("SubmissionList");return(0,a.uX)(),(0,a.CE)("div",n,[(0,a.bF)(v),g.isLoading?((0,a.uX)(),(0,a.CE)("div",i,t[0]||(t[0]=[(0,a.Lk)("div",{class:"loading-spinner"},"加载中...",-1)]))):g.isAuthenticated?((0,a.uX)(),(0,a.CE)("div",o,[(0,a.Lk)("div",r,[(0,a.Lk)("div",l,[(0,a.bF)(m,{ref:"userInfo"},null,512)]),(0,a.Lk)("div",c,[(0,a.bF)(p,{ref:"coin"},null,512)])]),(0,a.Lk)("div",d,[(0,a.bF)(L,{onManageWorks:k.handleManageWorks},null,8,["onManageWorks"])])])):((0,a.uX)(),(0,a.CE)("div",u,t[1]||(t[1]=[(0,a.Lk)("div",{class:"login-required-message"},[(0,a.Lk)("h2",null,"请先登录!"),(0,a.Lk)("p",null,"您需要登录后才能访问个人中心")],-1)])))])}s(4114);var g=s(3070),k=s(4232);const v={class:"user-info-card"},m={class:"card-container"},p={class:"detail-header"},L={class:"avatar-wrapper"},y=["src"],f={class:"detail-right"},b={class:"detail-name-container"},w={class:"detail-name"},C={class:"user-badges"},_=["title"],x=["title"],A={key:2,class:"badge medal"},E={class:"user-sign-container"},I={class:"user-sign"},M={class:"sign-text"},P={class:"user-email"},S={class:"email-text"},$={class:"user-stats"},K={class:"stat-item"},X={class:"stat-value"},T={class:"stat-item"},j={class:"stat-value"},F={class:"stat-item"},z={class:"stat-value"},D={key:0,class:"message-box"};function O(e,t,s,n,i,o){return(0,a.uX)(),(0,a.CE)("div",v,[(0,a.Lk)("div",m,[(0,a.Lk)("div",p,[t[6]||(t[6]=(0,a.Lk)("div",{class:"header-bg"},null,-1)),(0,a.Lk)("div",L,[(0,a.Lk)("img",{src:i.userInfo.avatar_path,alt:"用户头像",class:"detail-avatar"},null,8,y),(0,a.Lk)("div",{class:"avatar-edit-overlay",onClick:t[0]||(t[0]=(...e)=>o.triggerFileInput&&o.triggerFileInput(...e))},t[4]||(t[4]=[(0,a.Lk)("i",{class:"edit-icon"},"📷",-1)])),(0,a.Lk)("input",{type:"file",ref:"fileInput",style:{display:"none"},accept:"image/jpeg, image/png, image/gif",onChange:t[1]||(t[1]=(...e)=>o.uploadAvatar&&o.uploadAvatar(...e))},null,544)]),(0,a.Lk)("div",f,[(0,a.Lk)("div",b,[(0,a.Lk)("div",w,(0,k.v_)(i.userInfo.nickname),1),(0,a.Lk)("button",{class:"edit-btn",onClick:t[2]||(t[2]=(...e)=>o.editNickname&&o.editNickname(...e)),title:"修改昵称"},t[5]||(t[5]=[(0,a.Lk)("i",{class:"edit-icon"},"✏️",-1)]))]),(0,a.Lk)("div",C,[i.userInfo.verified?((0,a.uX)(),(0,a.CE)("span",{key:0,class:"badge verified",title:i.userInfo.verified},"认证",8,_)):(0,a.Q3)("",!0),i.userInfo.invited?((0,a.uX)(),(0,a.CE)("span",{key:1,class:"badge invited",title:i.userInfo.invited},"特邀",8,x)):(0,a.Q3)("",!0),i.userInfo.medal?((0,a.uX)(),(0,a.CE)("span",A,"小站奖章")):(0,a.Q3)("",!0)])])]),(0,a.Lk)("div",E,[(0,a.Lk)("div",I,[t[8]||(t[8]=(0,a.Lk)("div",{class:"sign-icon"},"✍️",-1)),(0,a.Lk)("div",M,(0,k.v_)(i.userInfo.sign||"这个人很懒,还没有写个性签名~"),1),(0,a.Lk)("button",{class:"edit-btn",onClick:t[3]||(t[3]=(...e)=>o.editSign&&o.editSign(...e)),title:"修改签名"},t[7]||(t[7]=[(0,a.Lk)("i",{class:"edit-icon"},"✏️",-1)]))])]),(0,a.Lk)("div",P,[t[9]||(t[9]=(0,a.Lk)("div",{class:"email-icon"},"📧",-1)),(0,a.Lk)("div",S,(0,k.v_)(i.userInfo.email),1)]),(0,a.Lk)("div",$,[(0,a.Lk)("div",K,[(0,a.Lk)("div",X,(0,k.v_)(i.userInfo.follower||0),1),t[10]||(t[10]=(0,a.Lk)("div",{class:"stat-label"},"粉丝",-1))]),t[13]||(t[13]=(0,a.Lk)("div",{class:"stat-separator"},null,-1)),(0,a.Lk)("div",T,[(0,a.Lk)("div",j,(0,k.v_)(i.userInfo.following||0),1),t[11]||(t[11]=(0,a.Lk)("div",{class:"stat-label"},"关注",-1))]),t[14]||(t[14]=(0,a.Lk)("div",{class:"stat-separator"},null,-1)),(0,a.Lk)("div",F,[(0,a.Lk)("div",z,(0,k.v_)(i.userInfo.coin||"未激活"),1),t[12]||(t[12]=(0,a.Lk)("div",{class:"stat-label"},"东币",-1))])]),i.message.show?((0,a.uX)(),(0,a.CE)("div",D,[(0,a.Lk)("div",{class:(0,k.C4)(["message-content",i.message.type])},(0,k.v_)(i.message.text),3)])):(0,a.Q3)("",!0)])])}var N=s(8704),U=s(6253),q={name:"UserInfo",data(){return{userInfo:{id:"",nickname:"加载中...",verified:null,invited:null,medal:!1,avatar_path:"",email:"",sign:"",follower:0,following:0,coin:0},message:{show:!1,text:"",type:"success",timer:null}}},created(){this.fetchUserInfo()},methods:{async fetchUserInfo(){try{const e=N.A.get("token");if(!e)return void this.showMessage("未登录或登录已过期","error");const t=await fetch("https://newfront.xn--xhq44jb2fzpc.com/user/info",{method:"GET",headers:{Authorization:e}});if(!t.ok)throw new Error("获取用户信息失败");const s=await t.json();this.userInfo=s}catch(e){console.error("获取用户信息出错:",e),this.showMessage("获取用户信息失败","error")}},triggerFileInput(){this.$refs.fileInput.click()},async uploadAvatar(e){const t=e.target.files[0];if(!t)return void this.showMessage("请选择一个文件","error");if(t.size>1048576)return void this.showMessage("头像必须小于1MB","error");const s=N.A.get("token");if(s)try{const e=new FormData;e.append("avatar",t);const a=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/avatar/upload",{method:"POST",headers:{Authorization:s},body:e});if(a.ok){const e=await a.json();this.userInfo.avatar_path=e.avatarUrl,this.showMessage("头像上传成功","success")}else 401===a.status||403===a.status?this.showMessage("权限错误,请重新登录后再试","error"):this.showMessage("上传失败,请稍后再试","error")}catch(a){console.error("头像上传错误:",a),this.showMessage("上传过程中发生错误","error")}else this.showMessage("请先登录,再上传头像","error")},async editNickname(){const e=N.A.get("token");e?(0,U.A)({title:"修改昵称",message:"请输入新的昵称:",showInput:!0,inputPlaceholder:"请输入新昵称",inputValue:this.userInfo.nickname,confirmText:"确认",cancelText:"取消",cancel:!0}).then((async({value:t})=>{if(null!==t&&""!==t.trim())try{const s=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/avatar/edit-nickname",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({nickname:t.trim()})});if(s.ok){await s.json();this.userInfo.nickname=t.trim(),this.showMessage("昵称修改成功","success")}else{const e=await s.json();this.showMessage(`修改昵称失败:${e.message}`,"error")}}catch(s){console.error("修改昵称错误:",s),this.showMessage("发生错误,请稍后再试","error")}else this.showMessage("昵称不能为空","error")})).catch((()=>{})):this.showMessage("您尚未登录,请登录后再尝试修改昵称","error")},async editSign(){const e=N.A.get("token");if(!e)return void this.showMessage("您尚未登录,请登录后再尝试修改签名","error");const t=this.userInfo.sign||"";(0,U.A)({title:"修改个性签名",message:"请输入新的个性签名 (最多20个汉字,留空表示删除个性签名):",showInput:!0,inputValue:t,inputPlaceholder:"请输入个性签名",confirmText:"确认",cancelText:"取消",cancel:!0}).then((async({value:t})=>{if(null!==t)try{const s=await fetch("https://newfront.xn--xhq44jb2fzpc.com/user/sign",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({sign:t.trim()})});if(s.ok)this.userInfo.sign=t.trim(),this.showMessage("个性签名修改成功","success");else{const e=await s.json();this.showMessage(`修改签名失败:${e.message}`,"error")}}catch(s){console.error("修改签名错误:",s),this.showMessage("发生错误,请稍后再试","error")}})).catch((()=>{}))},showMessage(e,t="success"){this.message.timer&&clearTimeout(this.message.timer),this.message.show=!0,this.message.text=e,this.message.type=t,this.message.timer=setTimeout((()=>{this.message.show=!1}),3e3)}}},Q=s(1241);const W=(0,Q.A)(q,[["render",O],["__scopeId","data-v-7c40ae87"]]);var B=W;const J={class:"coin-container"},V={key:0,class:"not-activated"},G={class:"alert alert-warning policy-notification"},H={key:1,class:"activated"},Y={class:"alert alert-warning policy-notification"},R={class:"coin-info"},Z={class:"coin-amount"},ee={class:"transactions"},te={key:0,class:"no-records"},se={key:1,class:"transaction-table"},ae={key:2,class:"pagination"},ne=["disabled"],ie={class:"page-info"},oe=["disabled"];function re(e,t,s,n,i,o){return(0,a.uX)(),(0,a.CE)("div",J,[i.isActivated?((0,a.uX)(),(0,a.CE)("div",H,[(0,a.Lk)("div",Y,(0,k.v_)(i.policyNotification),1),(0,a.Lk)("div",R,[(0,a.Lk)("h3",null,[t[3]||(t[3]=(0,a.eW)("您当前拥有 ")),(0,a.Lk)("span",Z,(0,k.v_)(i.coinAmount),1),t[4]||(t[4]=(0,a.eW)(" 枚东币"))])]),(0,a.Lk)("div",ee,[0===i.transactions.length?((0,a.uX)(),(0,a.CE)("div",te," 暂无交易记录 ")):((0,a.uX)(),(0,a.CE)("table",se,[t[5]||(t[5]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"时间"),(0,a.Lk)("th",null,"金额"),(0,a.Lk)("th",null,"备注")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.transactions,(e=>((0,a.uX)(),(0,a.CE)("tr",{key:e.id},[(0,a.Lk)("td",null,(0,k.v_)(o.formatDate(e.created_at)),1),(0,a.Lk)("td",{class:(0,k.C4)({credit:"credit"===e.type,debit:"debit"===e.type})},(0,k.v_)("credit"===e.type?"+":"-")+(0,k.v_)(e.amount),3),(0,a.Lk)("td",null,(0,k.v_)(e.note),1)])))),128))])])),i.totalPages>1?((0,a.uX)(),(0,a.CE)("div",ae,[(0,a.Lk)("button",{disabled:1===i.currentPage,onClick:t[0]||(t[0]=e=>o.loadTransactions(i.currentPage-1)),class:"btn btn-sm btn-outline-primary"}," 上一页 ",8,ne),(0,a.Lk)("span",ie,(0,k.v_)(i.currentPage)+" / "+(0,k.v_)(i.totalPages),1),(0,a.Lk)("button",{disabled:i.currentPage===i.totalPages,onClick:t[1]||(t[1]=e=>o.loadTransactions(i.currentPage+1)),class:"btn btn-sm btn-outline-primary"}," 下一页 ",8,oe)])):(0,a.Q3)("",!0)])])):((0,a.uX)(),(0,a.CE)("div",V,[(0,a.Lk)("div",G,(0,k.v_)(i.policyNotification),1),t[2]||(t[2]=(0,a.Lk)("div",{class:"alert alert-info"},[(0,a.Lk)("p",null,"东币系统在账号完成校园验证后自动激活。")],-1))]))])}var le={name:"CoinComponent",data(){return{isActivated:!1,coinAmount:0,transactions:[],currentPage:1,totalPages:1,policyNotification:"由于政策原因,短信验证码服务已于2025.4.13下线,后续东币系统将在校园验证通过后自动激活。之前已完成校园验证但未手动激活东币系统的用户,系统已为您自动激活东币系统。"}},created(){this.loadTransactions(1)},methods:{async loadTransactions(e){try{const t=N.A.get("token");if(!t)return console.error("未找到登录token"),void(this.isActivated=!1);const s=await fetch("https://newfront.xn--xhq44jb2fzpc.com/coin/transactions",{method:"POST",headers:{Authorization:t,"Content-Type":"application/json"},body:JSON.stringify({page_num:e})}),a=await s.json();if(s.ok)this.isActivated=!0,this.coinAmount=a.coinAmount,this.transactions=a.transactions,this.currentPage=a.current_page,this.totalPages=a.total_pages;else{if(403!==s.status||"用户未激活东币系统"!==a.message)throw new Error(a.message||"获取交易记录失败");this.isActivated=!1,this.coinAmount=0,this.transactions=[]}}catch(t){console.error("获取交易记录出错:",t),this.isActivated=!1}},formatDate(e){const t=new Date(e);return`${t.getFullYear()}/${t.getMonth()+1}/${t.getDate()} ${t.getHours()}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`}}};const ce=(0,Q.A)(le,[["render",re],["__scopeId","data-v-6b086920"]]);var de=ce,ue=s(5130);const he={class:"submission-container"},ge={class:"header"},ke={class:"header-buttons"},ve={class:"modal-content key-management-modal"},me={class:"modal-header"},pe={class:"modal-body"},Le={key:0,class:"key-table-wrapper"},ye={class:"key-table"},fe={class:"key-cell"},be={class:"key-content"},we=["onClick"],Ce={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24","stroke-width":"1.1"},_e={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24","stroke-width":"1.1"},xe={key:1,class:"loading-keys"},Ae={key:2,class:"empty-keys"},Ee={class:"modal-content exchange-key-modal"},Ie={class:"modal-header"},Me={class:"modal-body"},Pe={class:"form-group"},Se={class:"form-group"},$e={class:"form-actions"},Ke=["disabled"],Xe={class:"submission-table-wrapper"},Te={key:0,class:"submission-table"},je=["onClick"],Fe={class:"title-cell"},ze=["onClick"],De={key:1,class:"empty-state"},Oe={key:2,class:"pagination"},Ne=["disabled"],Ue={class:"page-info"},qe=["disabled"];function Qe(e,t,s,n,i,o){return(0,a.uX)(),(0,a.CE)("div",he,[(0,a.Lk)("div",ge,[t[12]||(t[12]=(0,a.Lk)("h3",{class:"title"},"我的投稿记录",-1)),(0,a.Lk)("div",ke,[(0,a.Lk)("button",{class:"key-manage-btn",onClick:t[0]||(t[0]=e=>i.showKeyManagement=!0)},"密钥管理"),(0,a.Lk)("button",{class:"manage-btn",onClick:t[1]||(t[1]=(...e)=>o.handleManage&&o.handleManage(...e))},"我要投稿")])]),i.showKeyManagement?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"modal-overlay",onClick:t[4]||(t[4]=(0,ue.D$)((e=>i.showKeyManagement=!1),["self"]))},[(0,a.Lk)("div",ve,[(0,a.Lk)("div",me,[t[13]||(t[13]=(0,a.Lk)("h3",null,"密钥管理",-1)),(0,a.Lk)("button",{class:"close-btn",onClick:t[2]||(t[2]=e=>i.showKeyManagement=!1)},"×")]),(0,a.Lk)("div",pe,[(0,a.Lk)("button",{class:"exchange-key-btn",onClick:t[3]||(t[3]=e=>i.showExchangeKey=!0)},"兑换密钥"),i.keyList.length>0?((0,a.uX)(),(0,a.CE)("div",Le,[(0,a.Lk)("table",ye,[t[16]||(t[16]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"密钥"),(0,a.Lk)("th",null,"状态"),(0,a.Lk)("th",null,"创建时间"),(0,a.Lk)("th",null,"最后使用时间")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.keyList,((e,s)=>((0,a.uX)(),(0,a.CE)("tr",{key:s},[(0,a.Lk)("td",fe,[(0,a.Lk)("div",be,[(0,a.Lk)("span",null,(0,k.v_)(i.visibleKeyIndex===s?e.key_plaintext:"******"),1),(0,a.Lk)("button",{class:"toggle-visibility",onClick:e=>o.toggleKeyVisibility(s)},[i.visibleKeyIndex!==s?((0,a.uX)(),(0,a.CE)("svg",Ce,t[14]||(t[14]=[(0,a.Lk)("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},null,-1),(0,a.Lk)("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"},null,-1)]))):((0,a.uX)(),(0,a.CE)("svg",_e,t[15]||(t[15]=[(0,a.Lk)("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"},null,-1),(0,a.Lk)("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"},null,-1),(0,a.Lk)("path",{d:"M3 3l18 18"},null,-1)])))],8,we)])]),(0,a.Lk)("td",null,[(0,a.Lk)("span",{class:(0,k.C4)(e.is_valid?"status-valid":"status-invalid")},(0,k.v_)(e.is_valid?"有效":"无效"),3)]),(0,a.Lk)("td",null,(0,k.v_)(o.formatDate(e.created_at)),1),(0,a.Lk)("td",null,(0,k.v_)(e.last_used_at?o.formatDate(e.last_used_at):"未使用"),1)])))),128))])])])):i.loadingKeyList?((0,a.uX)(),(0,a.CE)("div",xe," 加载中... ")):((0,a.uX)(),(0,a.CE)("div",Ae,t[17]||(t[17]=[(0,a.Lk)("p",null,"暂无密钥记录",-1)])))])])])):(0,a.Q3)("",!0),i.showExchangeKey?((0,a.uX)(),(0,a.CE)("div",{key:1,class:"modal-overlay",onClick:t[9]||(t[9]=(0,ue.D$)((e=>i.showExchangeKey=!1),["self"]))},[(0,a.Lk)("div",Ee,[(0,a.Lk)("div",Ie,[t[18]||(t[18]=(0,a.Lk)("h3",null,"兑换密钥",-1)),(0,a.Lk)("button",{class:"close-btn",onClick:t[5]||(t[5]=e=>i.showExchangeKey=!1)},"×")]),(0,a.Lk)("div",Me,[(0,a.Lk)("div",Pe,[t[19]||(t[19]=(0,a.Lk)("label",{for:"invite-code"},"邀请码",-1)),(0,a.bo)((0,a.Lk)("input",{id:"invite-code","onUpdate:modelValue":t[6]||(t[6]=e=>i.exchangeForm.invite_code=e),type:"text",placeholder:"输入邀请码"},null,512),[[ue.Jo,i.exchangeForm.invite_code]])]),(0,a.Lk)("div",Se,[t[20]||(t[20]=(0,a.Lk)("label",{for:"custom-key"},"自定义密钥",-1)),(0,a.bo)((0,a.Lk)("input",{id:"custom-key","onUpdate:modelValue":t[7]||(t[7]=e=>i.exchangeForm.key=e),type:"text",placeholder:"输入您的自定义密钥"},null,512),[[ue.Jo,i.exchangeForm.key]])]),(0,a.Lk)("div",$e,[(0,a.Lk)("button",{class:"submit-btn",disabled:!i.exchangeForm.invite_code||!i.exchangeForm.key||i.submitting,onClick:t[8]||(t[8]=(...e)=>o.exchangeKey&&o.exchangeKey(...e))},(0,k.v_)(i.submitting?"处理中...":"确认兑换"),9,Ke)])])])])):(0,a.Q3)("",!0),(0,a.Lk)("div",Xe,[i.submissions.length>0?((0,a.uX)(),(0,a.CE)("table",Te,[t[21]||(t[21]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"标题"),(0,a.Lk)("th",null,"板块"),(0,a.Lk)("th",null,"审核状态"),(0,a.Lk)("th",null,"审核备注"),(0,a.Lk)("th",null,"投稿时间"),(0,a.Lk)("th",null,"状态更新时间"),(0,a.Lk)("th",null,"操作")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.submissions,(e=>((0,a.uX)(),(0,a.CE)("tr",{key:e.id,class:(0,k.C4)({clickable:e.article_id}),onClick:t=>e.article_id&&o.navigateToArticle(e.article_id)},[(0,a.Lk)("td",Fe,(0,k.v_)(e.title),1),(0,a.Lk)("td",null,(0,k.v_)(e.section),1),(0,a.Lk)("td",null,[(0,a.Lk)("span",{class:(0,k.C4)(o.getStatusClass(e.status))},(0,k.v_)(e.status),3)]),(0,a.Lk)("td",null,(0,k.v_)(e.note||"无"),1),(0,a.Lk)("td",null,(0,k.v_)(o.formatDate(e.created_at)),1),(0,a.Lk)("td",null,(0,k.v_)(o.formatDate(e.updated_at)),1),(0,a.Lk)("td",null,["已通过"===e.status&&e.article_id?((0,a.uX)(),(0,a.CE)("button",{key:0,class:"edit-btn",onClick:(0,ue.D$)((t=>o.navigateToEdit(e.article_id)),["stop"])}," 编辑 ",8,ze)):(0,a.Q3)("",!0)])],10,je)))),128))])])):((0,a.uX)(),(0,a.CE)("div",De,t[22]||(t[22]=[(0,a.Lk)("p",null,"暂无投稿记录",-1)]))),i.totalPages>1?((0,a.uX)(),(0,a.CE)("div",Oe,[(0,a.Lk)("button",{disabled:1===i.currentPage,onClick:t[10]||(t[10]=e=>o.loadSubmissions(i.currentPage-1)),class:"page-btn"}," 上一页 ",8,Ne),(0,a.Lk)("span",Ue,(0,k.v_)(i.currentPage)+" / "+(0,k.v_)(i.totalPages),1),(0,a.Lk)("button",{disabled:i.currentPage===i.totalPages,onClick:t[11]||(t[11]=e=>o.loadSubmissions(i.currentPage+1)),class:"page-btn"}," 下一页 ",8,qe)])):(0,a.Q3)("",!0)])])}var We={name:"SubmissionList",data(){return{submissions:[],currentPage:1,totalPages:1,totalSubmissions:0,loading:!1,loadingKeyList:!1,showKeyManagement:!1,showExchangeKey:!1,keyList:[],visibleKeyIndex:-1,exchangeForm:{invite_code:"",key:""},submitting:!1}},created(){this.loadSubmissions(1)},methods:{async loadSubmissions(e){this.loading=!0;try{const t=N.A.get("token");if(!t)return void console.error("未找到登录token");const s=await fetch("https://newfront.xn--xhq44jb2fzpc.com/user/submission",{method:"POST",headers:{Authorization:t,"Content-Type":"application/json"},body:JSON.stringify({page_num:e})});if(!s.ok)throw new Error("获取投稿记录失败");const a=await s.json();this.submissions=a.submissions,this.currentPage=a.current_page,this.totalPages=a.total_pages,this.totalSubmissions=a.total_submissions}catch(t){console.error("获取投稿记录出错:",t)}finally{this.loading=!1}},handleManage(){console.log("点击了作品管理按钮"),this.$emit("manage-works")},navigateToArticle(e){this.$router.push(`/article/${e}`)},navigateToEdit(e){const t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<768;t?U.A.confirm("建议在电脑端进行编辑以获得最佳体验。仍要继续吗?","提示").then((()=>{this.$router.push(`/edit?article=${e}`)})).catch((()=>{console.log("用户取消了在移动端编辑")})):this.$router.push(`/edit?article=${e}`)},formatDate(e){if(!e)return"未知";const t=new Date(e);return`${t.getFullYear()}/${t.getMonth()+1}/${t.getDate()} ${t.getHours()}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`},getStatusClass(e){switch(e){case"已通过":return"status-approved";case"审核中":return"status-pending";case"未通过":return"status-rejected";default:return""}},async loadKeyList(){this.loadingKeyList=!0;try{const e=N.A.get("token");if(!e)return void console.error("未找到登录token");const t=await fetch("https://newfront.xn--xhq44jb2fzpc.com/encrypt/getcode",{method:"GET",headers:{Authorization:e,"Content-Type":"application/json"}});if(!t.ok)throw new Error("获取密钥列表失败");const s=await t.json();if(!s.success)throw new Error(s.message||"获取密钥列表失败");this.keyList=s.data||[]}catch(e){console.error("获取密钥列表出错:",e),U.A.alert(e.message||"获取密钥列表失败,请稍后再试","错误")}finally{this.loadingKeyList=!1}},toggleKeyVisibility(e){this.visibleKeyIndex===e?this.visibleKeyIndex=-1:this.visibleKeyIndex=e},async exchangeKey(){if(this.exchangeForm.invite_code&&this.exchangeForm.key){this.submitting=!0;try{const e=N.A.get("token");if(!e)return void console.error("未找到登录token");const t=await fetch("https://newfront.xn--xhq44jb2fzpc.com/encrypt/setcode",{method:"POST",headers:{Authorization:e,"Content-Type":"application/json"},body:JSON.stringify(this.exchangeForm)}),s=await t.json();if(!s.success)throw new Error(s.message||"密钥兑换失败");U.A.alert("密钥兑换成功","提示"),this.showExchangeKey=!1,this.exchangeForm.invite_code="",this.exchangeForm.key="",this.loadKeyList()}catch(e){console.error("密钥兑换出错:",e),U.A.alert(e.message||"密钥兑换失败,请稍后再试","错误")}finally{this.submitting=!1}}else U.A.alert("请输入邀请码和密钥","提示")}},watch:{showKeyManagement(e){e?this.loadKeyList():this.visibleKeyIndex=-1}}};const Be=(0,Q.A)(We,[["render",Qe],["__scopeId","data-v-03a6fef0"]]);var Je=Be,Ve=s(6965),Ge={name:"UserCenter",components:{Navbar:g.A,UserInfo:B,Coin:de,SubmissionList:Je},data(){return{isAuthenticated:!1,isLoading:!0}},created(){document.title="个人中心 - NEU小站"},mounted(){this.checkAuthAndFetchUserInfo()},methods:{async checkAuthAndFetchUserInfo(){const e=N.A.get("token");if(!e)return this.isLoading=!1,"/user-center"===this.$route.path?void this.$router.replace("/login"):void("/login"===this.$route.path&&this.showLoginDialog());try{const t=await fetch("https://newfront.xn--xhq44jb2fzpc.com/user/islogin",{method:"GET",headers:{Authorization:e}});if(!t.ok)throw new Error("Token 验证失败");const s=await t.json();if(!s||!s.isLoggedIn)throw new Error("Token 验证成功但返回状态不正确");this.isAuthenticated=!0,this.isLoading=!1,"/login"===this.$route.path&&this.$router.replace("/user-center")}catch(t){if(console.error("获取用户信息出错:",t),this.isLoading=!1,N.A.remove("token"),"/user-center"===this.$route.path)return void this.$router.replace("/login");"/login"===this.$route.path&&this.showLoginDialog()}},showLoginDialog(){(0,Ve.A)().then((e=>{console.log("登录成功:",e),this.isAuthenticated=!0,this.$router.replace("/user-center")})).catch((e=>{console.log("登录取消:",e)}))},handleManageWorks(){const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<768;e?U.A.confirm("建议在电脑端进行投稿以获得最佳体验。仍要继续吗?","提示").then((()=>{this.$router.push("/submit")})).catch((()=>{console.log("用户取消了在移动端投稿")})):this.$router.push("/submit")}}};const He=(0,Q.A)(Ge,[["render",h],["__scopeId","data-v-c5320252"]]);var Ye=He}}]);
-//# sourceMappingURL=11.b856e82b.js.map
\ No newline at end of file
+"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[11],{9011:function(e,t,s){s.r(t),s.d(t,{default:function(){return Ye}});var a=s(6768);const n={class:"user-center"},i={key:0,class:"loading-container"},o={key:1,class:"container"},r={class:"upper-section"},l={class:"user-info-container"},c={class:"coin-container"},d={class:"lower-section"},u={key:2,class:"login-required-container"};function h(e,t,s,h,g,k){const v=(0,a.g2)("Navbar"),m=(0,a.g2)("UserInfo"),p=(0,a.g2)("Coin"),L=(0,a.g2)("SubmissionList");return(0,a.uX)(),(0,a.CE)("div",n,[(0,a.bF)(v),g.isLoading?((0,a.uX)(),(0,a.CE)("div",i,t[0]||(t[0]=[(0,a.Lk)("div",{class:"loading-spinner"},"加载中...",-1)]))):g.isAuthenticated?((0,a.uX)(),(0,a.CE)("div",o,[(0,a.Lk)("div",r,[(0,a.Lk)("div",l,[(0,a.bF)(m,{ref:"userInfo"},null,512)]),(0,a.Lk)("div",c,[(0,a.bF)(p,{ref:"coin"},null,512)])]),(0,a.Lk)("div",d,[(0,a.bF)(L,{onManageWorks:k.handleManageWorks},null,8,["onManageWorks"])])])):((0,a.uX)(),(0,a.CE)("div",u,t[1]||(t[1]=[(0,a.Lk)("div",{class:"login-required-message"},[(0,a.Lk)("h2",null,"请先登录!"),(0,a.Lk)("p",null,"您需要登录后才能访问个人中心")],-1)])))])}s(4114);var g=s(4440),k=s(4232);const v={class:"user-info-card"},m={class:"card-container"},p={class:"detail-header"},L={class:"avatar-wrapper"},y=["src"],f={class:"detail-right"},b={class:"detail-name-container"},w={class:"detail-name"},C={class:"user-badges"},_=["title"],x=["title"],A={key:2,class:"badge medal"},E={class:"user-sign-container"},I={class:"user-sign"},M={class:"sign-text"},P={class:"user-email"},S={class:"email-text"},$={class:"user-stats"},K={class:"stat-item"},X={class:"stat-value"},T={class:"stat-item"},j={class:"stat-value"},F={class:"stat-item"},z={class:"stat-value"},D={key:0,class:"message-box"};function O(e,t,s,n,i,o){return(0,a.uX)(),(0,a.CE)("div",v,[(0,a.Lk)("div",m,[(0,a.Lk)("div",p,[t[6]||(t[6]=(0,a.Lk)("div",{class:"header-bg"},null,-1)),(0,a.Lk)("div",L,[(0,a.Lk)("img",{src:i.userInfo.avatar_path,alt:"用户头像",class:"detail-avatar"},null,8,y),(0,a.Lk)("div",{class:"avatar-edit-overlay",onClick:t[0]||(t[0]=(...e)=>o.triggerFileInput&&o.triggerFileInput(...e))},t[4]||(t[4]=[(0,a.Lk)("i",{class:"edit-icon"},"📷",-1)])),(0,a.Lk)("input",{type:"file",ref:"fileInput",style:{display:"none"},accept:"image/jpeg, image/png, image/gif",onChange:t[1]||(t[1]=(...e)=>o.uploadAvatar&&o.uploadAvatar(...e))},null,544)]),(0,a.Lk)("div",f,[(0,a.Lk)("div",b,[(0,a.Lk)("div",w,(0,k.v_)(i.userInfo.nickname),1),(0,a.Lk)("button",{class:"edit-btn",onClick:t[2]||(t[2]=(...e)=>o.editNickname&&o.editNickname(...e)),title:"修改昵称"},t[5]||(t[5]=[(0,a.Lk)("i",{class:"edit-icon"},"✏️",-1)]))]),(0,a.Lk)("div",C,[i.userInfo.verified?((0,a.uX)(),(0,a.CE)("span",{key:0,class:"badge verified",title:i.userInfo.verified},"认证",8,_)):(0,a.Q3)("",!0),i.userInfo.invited?((0,a.uX)(),(0,a.CE)("span",{key:1,class:"badge invited",title:i.userInfo.invited},"特邀",8,x)):(0,a.Q3)("",!0),i.userInfo.medal?((0,a.uX)(),(0,a.CE)("span",A,"小站奖章")):(0,a.Q3)("",!0)])])]),(0,a.Lk)("div",E,[(0,a.Lk)("div",I,[t[8]||(t[8]=(0,a.Lk)("div",{class:"sign-icon"},"✍️",-1)),(0,a.Lk)("div",M,(0,k.v_)(i.userInfo.sign||"这个人很懒,还没有写个性签名~"),1),(0,a.Lk)("button",{class:"edit-btn",onClick:t[3]||(t[3]=(...e)=>o.editSign&&o.editSign(...e)),title:"修改签名"},t[7]||(t[7]=[(0,a.Lk)("i",{class:"edit-icon"},"✏️",-1)]))])]),(0,a.Lk)("div",P,[t[9]||(t[9]=(0,a.Lk)("div",{class:"email-icon"},"📧",-1)),(0,a.Lk)("div",S,(0,k.v_)(i.userInfo.email),1)]),(0,a.Lk)("div",$,[(0,a.Lk)("div",K,[(0,a.Lk)("div",X,(0,k.v_)(i.userInfo.follower||0),1),t[10]||(t[10]=(0,a.Lk)("div",{class:"stat-label"},"粉丝",-1))]),t[13]||(t[13]=(0,a.Lk)("div",{class:"stat-separator"},null,-1)),(0,a.Lk)("div",T,[(0,a.Lk)("div",j,(0,k.v_)(i.userInfo.following||0),1),t[11]||(t[11]=(0,a.Lk)("div",{class:"stat-label"},"关注",-1))]),t[14]||(t[14]=(0,a.Lk)("div",{class:"stat-separator"},null,-1)),(0,a.Lk)("div",F,[(0,a.Lk)("div",z,(0,k.v_)(i.userInfo.coin||"未激活"),1),t[12]||(t[12]=(0,a.Lk)("div",{class:"stat-label"},"东币",-1))])]),i.message.show?((0,a.uX)(),(0,a.CE)("div",D,[(0,a.Lk)("div",{class:(0,k.C4)(["message-content",i.message.type])},(0,k.v_)(i.message.text),3)])):(0,a.Q3)("",!0)])])}var N=s(8704),U=s(6253),q={name:"UserInfo",data(){return{userInfo:{id:"",nickname:"加载中...",verified:null,invited:null,medal:!1,avatar_path:"",email:"",sign:"",follower:0,following:0,coin:0},message:{show:!1,text:"",type:"success",timer:null}}},created(){this.fetchUserInfo()},methods:{async fetchUserInfo(){try{const e=N.A.get("token");if(!e)return void this.showMessage("未登录或登录已过期","error");const t=await fetch("https://newfront.xn--xhq44jb2fzpc.com/user/info",{method:"GET",headers:{Authorization:e}});if(!t.ok)throw new Error("获取用户信息失败");const s=await t.json();this.userInfo=s}catch(e){console.error("获取用户信息出错:",e),this.showMessage("获取用户信息失败","error")}},triggerFileInput(){this.$refs.fileInput.click()},async uploadAvatar(e){const t=e.target.files[0];if(!t)return void this.showMessage("请选择一个文件","error");if(t.size>1048576)return void this.showMessage("头像必须小于1MB","error");const s=N.A.get("token");if(s)try{const e=new FormData;e.append("avatar",t);const a=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/avatar/upload",{method:"POST",headers:{Authorization:s},body:e});if(a.ok){const e=await a.json();this.userInfo.avatar_path=e.avatarUrl,this.showMessage("头像上传成功","success")}else 401===a.status||403===a.status?this.showMessage("权限错误,请重新登录后再试","error"):this.showMessage("上传失败,请稍后再试","error")}catch(a){console.error("头像上传错误:",a),this.showMessage("上传过程中发生错误","error")}else this.showMessage("请先登录,再上传头像","error")},async editNickname(){const e=N.A.get("token");e?(0,U.A)({title:"修改昵称",message:"请输入新的昵称:",showInput:!0,inputPlaceholder:"请输入新昵称",inputValue:this.userInfo.nickname,confirmText:"确认",cancelText:"取消",cancel:!0}).then((async({value:t})=>{if(null!==t&&""!==t.trim())try{const s=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/avatar/edit-nickname",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({nickname:t.trim()})});if(s.ok){await s.json();this.userInfo.nickname=t.trim(),this.showMessage("昵称修改成功","success")}else{const e=await s.json();this.showMessage(`修改昵称失败:${e.message}`,"error")}}catch(s){console.error("修改昵称错误:",s),this.showMessage("发生错误,请稍后再试","error")}else this.showMessage("昵称不能为空","error")})).catch((()=>{})):this.showMessage("您尚未登录,请登录后再尝试修改昵称","error")},async editSign(){const e=N.A.get("token");if(!e)return void this.showMessage("您尚未登录,请登录后再尝试修改签名","error");const t=this.userInfo.sign||"";(0,U.A)({title:"修改个性签名",message:"请输入新的个性签名 (最多20个汉字,留空表示删除个性签名):",showInput:!0,inputValue:t,inputPlaceholder:"请输入个性签名",confirmText:"确认",cancelText:"取消",cancel:!0}).then((async({value:t})=>{if(null!==t)try{const s=await fetch("https://newfront.xn--xhq44jb2fzpc.com/user/sign",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({sign:t.trim()})});if(s.ok)this.userInfo.sign=t.trim(),this.showMessage("个性签名修改成功","success");else{const e=await s.json();this.showMessage(`修改签名失败:${e.message}`,"error")}}catch(s){console.error("修改签名错误:",s),this.showMessage("发生错误,请稍后再试","error")}})).catch((()=>{}))},showMessage(e,t="success"){this.message.timer&&clearTimeout(this.message.timer),this.message.show=!0,this.message.text=e,this.message.type=t,this.message.timer=setTimeout((()=>{this.message.show=!1}),3e3)}}},Q=s(1241);const W=(0,Q.A)(q,[["render",O],["__scopeId","data-v-7c40ae87"]]);var B=W;const J={class:"coin-container"},V={key:0,class:"not-activated"},G={class:"alert alert-warning policy-notification"},H={key:1,class:"activated"},Y={class:"alert alert-warning policy-notification"},R={class:"coin-info"},Z={class:"coin-amount"},ee={class:"transactions"},te={key:0,class:"no-records"},se={key:1,class:"transaction-table"},ae={key:2,class:"pagination"},ne=["disabled"],ie={class:"page-info"},oe=["disabled"];function re(e,t,s,n,i,o){return(0,a.uX)(),(0,a.CE)("div",J,[i.isActivated?((0,a.uX)(),(0,a.CE)("div",H,[(0,a.Lk)("div",Y,(0,k.v_)(i.policyNotification),1),(0,a.Lk)("div",R,[(0,a.Lk)("h3",null,[t[3]||(t[3]=(0,a.eW)("您当前拥有 ")),(0,a.Lk)("span",Z,(0,k.v_)(i.coinAmount),1),t[4]||(t[4]=(0,a.eW)(" 枚东币"))])]),(0,a.Lk)("div",ee,[0===i.transactions.length?((0,a.uX)(),(0,a.CE)("div",te," 暂无交易记录 ")):((0,a.uX)(),(0,a.CE)("table",se,[t[5]||(t[5]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"时间"),(0,a.Lk)("th",null,"金额"),(0,a.Lk)("th",null,"备注")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.transactions,(e=>((0,a.uX)(),(0,a.CE)("tr",{key:e.id},[(0,a.Lk)("td",null,(0,k.v_)(o.formatDate(e.created_at)),1),(0,a.Lk)("td",{class:(0,k.C4)({credit:"credit"===e.type,debit:"debit"===e.type})},(0,k.v_)("credit"===e.type?"+":"-")+(0,k.v_)(e.amount),3),(0,a.Lk)("td",null,(0,k.v_)(e.note),1)])))),128))])])),i.totalPages>1?((0,a.uX)(),(0,a.CE)("div",ae,[(0,a.Lk)("button",{disabled:1===i.currentPage,onClick:t[0]||(t[0]=e=>o.loadTransactions(i.currentPage-1)),class:"btn btn-sm btn-outline-primary"}," 上一页 ",8,ne),(0,a.Lk)("span",ie,(0,k.v_)(i.currentPage)+" / "+(0,k.v_)(i.totalPages),1),(0,a.Lk)("button",{disabled:i.currentPage===i.totalPages,onClick:t[1]||(t[1]=e=>o.loadTransactions(i.currentPage+1)),class:"btn btn-sm btn-outline-primary"}," 下一页 ",8,oe)])):(0,a.Q3)("",!0)])])):((0,a.uX)(),(0,a.CE)("div",V,[(0,a.Lk)("div",G,(0,k.v_)(i.policyNotification),1),t[2]||(t[2]=(0,a.Lk)("div",{class:"alert alert-info"},[(0,a.Lk)("p",null,"东币系统在账号完成校园验证后自动激活。")],-1))]))])}var le={name:"CoinComponent",data(){return{isActivated:!1,coinAmount:0,transactions:[],currentPage:1,totalPages:1,policyNotification:"由于政策原因,短信验证码服务已于2025.4.13下线,后续东币系统将在校园验证通过后自动激活。之前已完成校园验证但未手动激活东币系统的用户,系统已为您自动激活东币系统。"}},created(){this.loadTransactions(1)},methods:{async loadTransactions(e){try{const t=N.A.get("token");if(!t)return console.error("未找到登录token"),void(this.isActivated=!1);const s=await fetch("https://newfront.xn--xhq44jb2fzpc.com/coin/transactions",{method:"POST",headers:{Authorization:t,"Content-Type":"application/json"},body:JSON.stringify({page_num:e})}),a=await s.json();if(s.ok)this.isActivated=!0,this.coinAmount=a.coinAmount,this.transactions=a.transactions,this.currentPage=a.current_page,this.totalPages=a.total_pages;else{if(403!==s.status||"用户未激活东币系统"!==a.message)throw new Error(a.message||"获取交易记录失败");this.isActivated=!1,this.coinAmount=0,this.transactions=[]}}catch(t){console.error("获取交易记录出错:",t),this.isActivated=!1}},formatDate(e){const t=new Date(e);return`${t.getFullYear()}/${t.getMonth()+1}/${t.getDate()} ${t.getHours()}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`}}};const ce=(0,Q.A)(le,[["render",re],["__scopeId","data-v-6b086920"]]);var de=ce,ue=s(5130);const he={class:"submission-container"},ge={class:"header"},ke={class:"header-buttons"},ve={class:"modal-content key-management-modal"},me={class:"modal-header"},pe={class:"modal-body"},Le={key:0,class:"key-table-wrapper"},ye={class:"key-table"},fe={class:"key-cell"},be={class:"key-content"},we=["onClick"],Ce={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24","stroke-width":"1.1"},_e={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24","stroke-width":"1.1"},xe={key:1,class:"loading-keys"},Ae={key:2,class:"empty-keys"},Ee={class:"modal-content exchange-key-modal"},Ie={class:"modal-header"},Me={class:"modal-body"},Pe={class:"form-group"},Se={class:"form-group"},$e={class:"form-actions"},Ke=["disabled"],Xe={class:"submission-table-wrapper"},Te={key:0,class:"submission-table"},je=["onClick"],Fe={class:"title-cell"},ze=["onClick"],De={key:1,class:"empty-state"},Oe={key:2,class:"pagination"},Ne=["disabled"],Ue={class:"page-info"},qe=["disabled"];function Qe(e,t,s,n,i,o){return(0,a.uX)(),(0,a.CE)("div",he,[(0,a.Lk)("div",ge,[t[12]||(t[12]=(0,a.Lk)("h3",{class:"title"},"我的投稿记录",-1)),(0,a.Lk)("div",ke,[(0,a.Lk)("button",{class:"key-manage-btn",onClick:t[0]||(t[0]=e=>i.showKeyManagement=!0)},"密钥管理"),(0,a.Lk)("button",{class:"manage-btn",onClick:t[1]||(t[1]=(...e)=>o.handleManage&&o.handleManage(...e))},"我要投稿")])]),i.showKeyManagement?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"modal-overlay",onClick:t[4]||(t[4]=(0,ue.D$)((e=>i.showKeyManagement=!1),["self"]))},[(0,a.Lk)("div",ve,[(0,a.Lk)("div",me,[t[13]||(t[13]=(0,a.Lk)("h3",null,"密钥管理",-1)),(0,a.Lk)("button",{class:"close-btn",onClick:t[2]||(t[2]=e=>i.showKeyManagement=!1)},"×")]),(0,a.Lk)("div",pe,[(0,a.Lk)("button",{class:"exchange-key-btn",onClick:t[3]||(t[3]=e=>i.showExchangeKey=!0)},"兑换密钥"),i.keyList.length>0?((0,a.uX)(),(0,a.CE)("div",Le,[(0,a.Lk)("table",ye,[t[16]||(t[16]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"密钥"),(0,a.Lk)("th",null,"状态"),(0,a.Lk)("th",null,"创建时间"),(0,a.Lk)("th",null,"最后使用时间")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.keyList,((e,s)=>((0,a.uX)(),(0,a.CE)("tr",{key:s},[(0,a.Lk)("td",fe,[(0,a.Lk)("div",be,[(0,a.Lk)("span",null,(0,k.v_)(i.visibleKeyIndex===s?e.key_plaintext:"******"),1),(0,a.Lk)("button",{class:"toggle-visibility",onClick:e=>o.toggleKeyVisibility(s)},[i.visibleKeyIndex!==s?((0,a.uX)(),(0,a.CE)("svg",Ce,t[14]||(t[14]=[(0,a.Lk)("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},null,-1),(0,a.Lk)("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"},null,-1)]))):((0,a.uX)(),(0,a.CE)("svg",_e,t[15]||(t[15]=[(0,a.Lk)("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"},null,-1),(0,a.Lk)("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"},null,-1),(0,a.Lk)("path",{d:"M3 3l18 18"},null,-1)])))],8,we)])]),(0,a.Lk)("td",null,[(0,a.Lk)("span",{class:(0,k.C4)(e.is_valid?"status-valid":"status-invalid")},(0,k.v_)(e.is_valid?"有效":"无效"),3)]),(0,a.Lk)("td",null,(0,k.v_)(o.formatDate(e.created_at)),1),(0,a.Lk)("td",null,(0,k.v_)(e.last_used_at?o.formatDate(e.last_used_at):"未使用"),1)])))),128))])])])):i.loadingKeyList?((0,a.uX)(),(0,a.CE)("div",xe," 加载中... ")):((0,a.uX)(),(0,a.CE)("div",Ae,t[17]||(t[17]=[(0,a.Lk)("p",null,"暂无密钥记录",-1)])))])])])):(0,a.Q3)("",!0),i.showExchangeKey?((0,a.uX)(),(0,a.CE)("div",{key:1,class:"modal-overlay",onClick:t[9]||(t[9]=(0,ue.D$)((e=>i.showExchangeKey=!1),["self"]))},[(0,a.Lk)("div",Ee,[(0,a.Lk)("div",Ie,[t[18]||(t[18]=(0,a.Lk)("h3",null,"兑换密钥",-1)),(0,a.Lk)("button",{class:"close-btn",onClick:t[5]||(t[5]=e=>i.showExchangeKey=!1)},"×")]),(0,a.Lk)("div",Me,[(0,a.Lk)("div",Pe,[t[19]||(t[19]=(0,a.Lk)("label",{for:"invite-code"},"邀请码",-1)),(0,a.bo)((0,a.Lk)("input",{id:"invite-code","onUpdate:modelValue":t[6]||(t[6]=e=>i.exchangeForm.invite_code=e),type:"text",placeholder:"输入邀请码"},null,512),[[ue.Jo,i.exchangeForm.invite_code]])]),(0,a.Lk)("div",Se,[t[20]||(t[20]=(0,a.Lk)("label",{for:"custom-key"},"自定义密钥",-1)),(0,a.bo)((0,a.Lk)("input",{id:"custom-key","onUpdate:modelValue":t[7]||(t[7]=e=>i.exchangeForm.key=e),type:"text",placeholder:"输入您的自定义密钥"},null,512),[[ue.Jo,i.exchangeForm.key]])]),(0,a.Lk)("div",$e,[(0,a.Lk)("button",{class:"submit-btn",disabled:!i.exchangeForm.invite_code||!i.exchangeForm.key||i.submitting,onClick:t[8]||(t[8]=(...e)=>o.exchangeKey&&o.exchangeKey(...e))},(0,k.v_)(i.submitting?"处理中...":"确认兑换"),9,Ke)])])])])):(0,a.Q3)("",!0),(0,a.Lk)("div",Xe,[i.submissions.length>0?((0,a.uX)(),(0,a.CE)("table",Te,[t[21]||(t[21]=(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,"标题"),(0,a.Lk)("th",null,"板块"),(0,a.Lk)("th",null,"审核状态"),(0,a.Lk)("th",null,"审核备注"),(0,a.Lk)("th",null,"投稿时间"),(0,a.Lk)("th",null,"状态更新时间"),(0,a.Lk)("th",null,"操作")])],-1)),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.submissions,(e=>((0,a.uX)(),(0,a.CE)("tr",{key:e.id,class:(0,k.C4)({clickable:e.article_id}),onClick:t=>e.article_id&&o.navigateToArticle(e.article_id)},[(0,a.Lk)("td",Fe,(0,k.v_)(e.title),1),(0,a.Lk)("td",null,(0,k.v_)(e.section),1),(0,a.Lk)("td",null,[(0,a.Lk)("span",{class:(0,k.C4)(o.getStatusClass(e.status))},(0,k.v_)(e.status),3)]),(0,a.Lk)("td",null,(0,k.v_)(e.note||"无"),1),(0,a.Lk)("td",null,(0,k.v_)(o.formatDate(e.created_at)),1),(0,a.Lk)("td",null,(0,k.v_)(o.formatDate(e.updated_at)),1),(0,a.Lk)("td",null,["已通过"===e.status&&e.article_id?((0,a.uX)(),(0,a.CE)("button",{key:0,class:"edit-btn",onClick:(0,ue.D$)((t=>o.navigateToEdit(e.article_id)),["stop"])}," 编辑 ",8,ze)):(0,a.Q3)("",!0)])],10,je)))),128))])])):((0,a.uX)(),(0,a.CE)("div",De,t[22]||(t[22]=[(0,a.Lk)("p",null,"暂无投稿记录",-1)]))),i.totalPages>1?((0,a.uX)(),(0,a.CE)("div",Oe,[(0,a.Lk)("button",{disabled:1===i.currentPage,onClick:t[10]||(t[10]=e=>o.loadSubmissions(i.currentPage-1)),class:"page-btn"}," 上一页 ",8,Ne),(0,a.Lk)("span",Ue,(0,k.v_)(i.currentPage)+" / "+(0,k.v_)(i.totalPages),1),(0,a.Lk)("button",{disabled:i.currentPage===i.totalPages,onClick:t[11]||(t[11]=e=>o.loadSubmissions(i.currentPage+1)),class:"page-btn"}," 下一页 ",8,qe)])):(0,a.Q3)("",!0)])])}var We={name:"SubmissionList",data(){return{submissions:[],currentPage:1,totalPages:1,totalSubmissions:0,loading:!1,loadingKeyList:!1,showKeyManagement:!1,showExchangeKey:!1,keyList:[],visibleKeyIndex:-1,exchangeForm:{invite_code:"",key:""},submitting:!1}},created(){this.loadSubmissions(1)},methods:{async loadSubmissions(e){this.loading=!0;try{const t=N.A.get("token");if(!t)return void console.error("未找到登录token");const s=await fetch("https://newfront.xn--xhq44jb2fzpc.com/user/submission",{method:"POST",headers:{Authorization:t,"Content-Type":"application/json"},body:JSON.stringify({page_num:e})});if(!s.ok)throw new Error("获取投稿记录失败");const a=await s.json();this.submissions=a.submissions,this.currentPage=a.current_page,this.totalPages=a.total_pages,this.totalSubmissions=a.total_submissions}catch(t){console.error("获取投稿记录出错:",t)}finally{this.loading=!1}},handleManage(){console.log("点击了作品管理按钮"),this.$emit("manage-works")},navigateToArticle(e){this.$router.push(`/article/${e}`)},navigateToEdit(e){const t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<768;t?U.A.confirm("建议在电脑端进行编辑以获得最佳体验。仍要继续吗?","提示").then((()=>{this.$router.push(`/edit?article=${e}`)})).catch((()=>{console.log("用户取消了在移动端编辑")})):this.$router.push(`/edit?article=${e}`)},formatDate(e){if(!e)return"未知";const t=new Date(e);return`${t.getFullYear()}/${t.getMonth()+1}/${t.getDate()} ${t.getHours()}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`},getStatusClass(e){switch(e){case"已通过":return"status-approved";case"审核中":return"status-pending";case"未通过":return"status-rejected";default:return""}},async loadKeyList(){this.loadingKeyList=!0;try{const e=N.A.get("token");if(!e)return void console.error("未找到登录token");const t=await fetch("https://newfront.xn--xhq44jb2fzpc.com/encrypt/getcode",{method:"GET",headers:{Authorization:e,"Content-Type":"application/json"}});if(!t.ok)throw new Error("获取密钥列表失败");const s=await t.json();if(!s.success)throw new Error(s.message||"获取密钥列表失败");this.keyList=s.data||[]}catch(e){console.error("获取密钥列表出错:",e),U.A.alert(e.message||"获取密钥列表失败,请稍后再试","错误")}finally{this.loadingKeyList=!1}},toggleKeyVisibility(e){this.visibleKeyIndex===e?this.visibleKeyIndex=-1:this.visibleKeyIndex=e},async exchangeKey(){if(this.exchangeForm.invite_code&&this.exchangeForm.key){this.submitting=!0;try{const e=N.A.get("token");if(!e)return void console.error("未找到登录token");const t=await fetch("https://newfront.xn--xhq44jb2fzpc.com/encrypt/setcode",{method:"POST",headers:{Authorization:e,"Content-Type":"application/json"},body:JSON.stringify(this.exchangeForm)}),s=await t.json();if(!s.success)throw new Error(s.message||"密钥兑换失败");U.A.alert("密钥兑换成功","提示"),this.showExchangeKey=!1,this.exchangeForm.invite_code="",this.exchangeForm.key="",this.loadKeyList()}catch(e){console.error("密钥兑换出错:",e),U.A.alert(e.message||"密钥兑换失败,请稍后再试","错误")}finally{this.submitting=!1}}else U.A.alert("请输入邀请码和密钥","提示")}},watch:{showKeyManagement(e){e?this.loadKeyList():this.visibleKeyIndex=-1}}};const Be=(0,Q.A)(We,[["render",Qe],["__scopeId","data-v-03a6fef0"]]);var Je=Be,Ve=s(6965),Ge={name:"UserCenter",components:{Navbar:g.A,UserInfo:B,Coin:de,SubmissionList:Je},data(){return{isAuthenticated:!1,isLoading:!0}},created(){document.title="个人中心 - NEU小站"},mounted(){this.checkAuthAndFetchUserInfo()},methods:{async checkAuthAndFetchUserInfo(){const e=N.A.get("token");if(!e)return this.isLoading=!1,"/user-center"===this.$route.path?void this.$router.replace("/login"):void("/login"===this.$route.path&&this.showLoginDialog());try{const t=await fetch("https://newfront.xn--xhq44jb2fzpc.com/user/islogin",{method:"GET",headers:{Authorization:e}});if(!t.ok)throw new Error("Token 验证失败");const s=await t.json();if(!s||!s.isLoggedIn)throw new Error("Token 验证成功但返回状态不正确");this.isAuthenticated=!0,this.isLoading=!1,"/login"===this.$route.path&&this.$router.replace("/user-center")}catch(t){if(console.error("获取用户信息出错:",t),this.isLoading=!1,N.A.remove("token"),"/user-center"===this.$route.path)return void this.$router.replace("/login");"/login"===this.$route.path&&this.showLoginDialog()}},showLoginDialog(){(0,Ve.A)().then((e=>{console.log("登录成功:",e),this.isAuthenticated=!0,this.$router.replace("/user-center")})).catch((e=>{console.log("登录取消:",e)}))},handleManageWorks(){const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<768;e?U.A.confirm("建议在电脑端进行投稿以获得最佳体验。仍要继续吗?","提示").then((()=>{this.$router.push("/submit")})).catch((()=>{console.log("用户取消了在移动端投稿")})):this.$router.push("/submit")}}};const He=(0,Q.A)(Ge,[["render",h],["__scopeId","data-v-c5320252"]]);var Ye=He}}]);
+//# sourceMappingURL=11.0cb09941.js.map
\ No newline at end of file
diff --git a/dist/js/287.f37f152f.js b/dist/js/287.760a291e.js
similarity index 98%
rename from dist/js/287.f37f152f.js
rename to dist/js/287.760a291e.js
index d3b800e..51b82fd 100644
--- a/dist/js/287.f37f152f.js
+++ b/dist/js/287.760a291e.js
@@ -1,2 +1,2 @@
-"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[287],{5287:function(e,a,t){t.r(a),t.d(a,{default:function(){return w}});var s=t(6768),l=t(4232),i=t(5130);const c={class:"resource-view"},n={class:"container"},r={class:"filters-container"},o={class:"tag-selection college-category"},g={class:"tag-header"},d={class:"tag-controls"},u={class:"tags-container"},h=["onClick"],C={key:0,class:"check-icon"},k={class:"tag-selection resource-category"},p={class:"tag-header"},v={class:"tag-controls"},m={class:"tags-container"},y=["onClick"],f={key:0,class:"check-icon"};function L(e,a,t,L,T,P){const b=(0,s.g2)("NavBar"),E=(0,s.g2)("CardList");return(0,s.uX)(),(0,s.CE)("div",c,[(0,s.bF)(b),(0,s.Lk)("div",n,[a[6]||(a[6]=(0,s.Lk)("h1",{class:"page-title"},"资源共享",-1)),a[7]||(a[7]=(0,s.Lk)("div",{class:"intro-card"},[(0,s.Lk)("p",{class:"intro-text"}," 为鼓励大家积极投稿,本站投稿者可获得专属访问密码以访问本站加密资源,感谢支持~ ")],-1)),(0,s.Lk)("div",{class:"filter-control",onClick:a[0]||(a[0]=(...e)=>P.toggleFilterPanel&&P.toggleFilterPanel(...e))},[a[3]||(a[3]=(0,s.Lk)("h2",{class:"filter-title"},"筛选",-1)),(0,s.Lk)("span",{class:(0,l.C4)(["toggle-icon",{"is-active":!T.filtersCollapsed}])},"▼",2)]),(0,s.bo)((0,s.Lk)("div",r,[(0,s.Lk)("div",o,[(0,s.Lk)("div",g,[a[4]||(a[4]=(0,s.Lk)("h2",{class:"tag-title"},"按学院筛选",-1)),(0,s.Lk)("div",d,[(0,s.Lk)("button",{class:"tag-control-btn",onClick:a[1]||(a[1]=(...e)=>P.clearCollegeTags&&P.clearCollegeTags(...e))},"清除")])]),(0,s.Lk)("div",u,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(T.collegeTags,(e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:(0,l.C4)(["tag-chip",{active:T.selectedCollegeTags.includes(e.id)}]),onClick:a=>P.toggleCollegeTag(e.id)},[(0,s.eW)((0,l.v_)(e.name)+" ",1),T.selectedCollegeTags.includes(e.id)?((0,s.uX)(),(0,s.CE)("span",C,"✓")):(0,s.Q3)("",!0)],10,h)))),128))])]),(0,s.Lk)("div",k,[(0,s.Lk)("div",p,[a[5]||(a[5]=(0,s.Lk)("h2",{class:"tag-title"},"按资源类别",-1)),(0,s.Lk)("div",v,[(0,s.Lk)("button",{class:"tag-control-btn",onClick:a[2]||(a[2]=(...e)=>P.clearCategoryTags&&P.clearCategoryTags(...e))},"清除")])]),(0,s.Lk)("div",m,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(T.categoryTags,(e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:(0,l.C4)(["tag-chip",{active:T.selectedCategoryTags.includes(e.id)}]),onClick:a=>P.toggleCategoryTag(e.id)},[(0,s.eW)((0,l.v_)(e.name)+" ",1),T.selectedCategoryTags.includes(e.id)?((0,s.uX)(),(0,s.CE)("span",f,"✓")):(0,s.Q3)("",!0)],10,y)))),128))])])],512),[[i.aG,!T.filtersCollapsed]]),(0,s.bF)(E,{searchParams:P.searchParams,mode:1,pageSize:12},null,8,["searchParams"])])])}t(4114),t(8111),t(2489);var T=t(3070),P=t(9009),b={name:"ResourceView",components:{NavBar:T.A,CardList:P.A},data(){return{filtersCollapsed:!0,selectedCollegeTags:[],selectedCategoryTags:[],collegeTags:[{id:1,name:"软件学院"},{id:2,name:"计算机学院"},{id:3,name:"工商管理学院"},{id:4,name:"理学院"},{id:18,name:"信息学院"}],categoryTags:[{id:5,name:"课件"},{id:7,name:"课本"},{id:8,name:"习题答案"},{id:9,name:"期末真题"},{id:10,name:"PDF"},{id:16,name:"公共课"},{id:17,name:"专业课"},{id:22,name:"选修课"},{id:20,name:"题库"}]}},created(){document.title="资源共享 - NEU小站"},computed:{searchParams(){const e={section:1},a=[...this.selectedCollegeTags,...this.selectedCategoryTags];return a.length>0&&(e.tags=a),e}},methods:{toggleFilterPanel(){this.filtersCollapsed=!this.filtersCollapsed},toggleCollegeTag(e){this.selectedCollegeTags.includes(e)?this.selectedCollegeTags=this.selectedCollegeTags.filter((a=>a!==e)):this.selectedCollegeTags.push(e)},toggleCategoryTag(e){this.selectedCategoryTags.includes(e)?this.selectedCategoryTags=this.selectedCategoryTags.filter((a=>a!==e)):this.selectedCategoryTags.push(e)},clearCollegeTags(){this.selectedCollegeTags=[]},clearCategoryTags(){this.selectedCategoryTags=[]}}},E=t(1241);const X=(0,E.A)(b,[["render",L],["__scopeId","data-v-0aab4a81"]]);var w=X},9009:function(e,a,t){t.d(a,{A:function(){return Q}});var s=t(6768),l=t(4232);const i={class:"card-list-container"},c={key:0,class:"card-grid"},n=["onClick"],r={class:"card-content"},o={class:"card-title"},g={class:"card-tags"},d={key:0,class:"article-tag official"},u={key:1,class:"article-tag highlight"},h={key:2,class:"article-tag top"},C={class:"card-meta"},k={class:"card-section"},p={class:"card-date"},v={class:"card-tags-list"},m={key:0,class:"no-data"},y={key:1,class:"table-container"},f={class:"articles-table"},L=["onClick"],T={key:0,class:"no-data"},P={key:2,class:"loading"},b={key:3,class:"pagination"},E=["disabled"],X={class:"page-info"},w=["disabled"];function _(e,a,t,_,A,F){return(0,s.uX)(),(0,s.CE)("div",i,[1===t.mode?((0,s.uX)(),(0,s.CE)("div",c,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(A.articles,(e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:"card",onClick:a=>F.viewArticle(e.id)},[(0,s.Lk)("div",r,[(0,s.Lk)("h3",o,(0,l.v_)(e.title),1),(0,s.Lk)("div",g,[e.official?((0,s.uX)(),(0,s.CE)("span",d,"官方")):(0,s.Q3)("",!0),e.highlight?((0,s.uX)(),(0,s.CE)("span",u,"优质")):(0,s.Q3)("",!0),e.top?((0,s.uX)(),(0,s.CE)("span",h,"置顶")):(0,s.Q3)("",!0)]),(0,s.Lk)("div",C,[(0,s.Lk)("span",k,(0,l.v_)(F.getSectionName(e.section)),1),(0,s.Lk)("span",p,"更新于 "+(0,l.v_)(F.formatDate(e.updated_at)),1)]),(0,s.Lk)("div",v,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.tags,(e=>((0,s.uX)(),(0,s.CE)("span",{key:e.id,class:"card-tag"},(0,l.v_)(e.name),1)))),128))])])],8,n)))),128)),0!==A.articles.length||A.loading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",m," 暂无符合条件的文章 "))])):((0,s.uX)(),(0,s.CE)("div",y,[(0,s.Lk)("table",f,[a[2]||(a[2]=(0,s.Lk)("thead",null,[(0,s.Lk)("tr",null,[(0,s.Lk)("th",null,"文章标题")])],-1)),(0,s.Lk)("tbody",null,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(A.articles,(e=>((0,s.uX)(),(0,s.CE)("tr",{key:e.id,onClick:a=>F.viewArticle(e.id)},[(0,s.Lk)("td",null,(0,l.v_)(e.title),1)],8,L)))),128))])]),0!==A.articles.length||A.loading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",T," 暂无符合条件的文章 "))])),A.loading?((0,s.uX)(),(0,s.CE)("div",P,a[3]||(a[3]=[(0,s.Lk)("div",{class:"loading-spinner"},null,-1),(0,s.Lk)("span",null,"正在加载...",-1)]))):(0,s.Q3)("",!0),A.totalPages>1&&!A.loading?((0,s.uX)(),(0,s.CE)("div",b,[(0,s.Lk)("button",{disabled:1===A.currentPage,onClick:a[0]||(a[0]=e=>F.changePage(A.currentPage-1)),class:"pagination-btn"}," 上一页 ",8,E),(0,s.Lk)("span",X,(0,l.v_)(A.currentPage)+" / "+(0,l.v_)(A.totalPages),1),(0,s.Lk)("button",{disabled:A.currentPage===A.totalPages,onClick:a[1]||(a[1]=e=>F.changePage(A.currentPage+1)),class:"pagination-btn"}," 下一页 ",8,w)])):(0,s.Q3)("",!0)])}t(4114);var A={name:"CardList",props:{searchParams:{type:Object,default:()=>({})},mode:{type:Number,default:1},pageSize:{type:Number,default:12}},data(){return{articles:[],currentPage:1,totalPages:0,total:0,loading:!1}},watch:{searchParams:{handler(){this.currentPage=1,this.fetchArticles()},deep:!0}},mounted(){this.fetchArticles()},methods:{async fetchArticles(){this.loading=!0;try{const e=await fetch("https://newfront.xn--xhq44jb2fzpc.com/search/general",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...this.searchParams,mode:this.mode,page:this.currentPage,pageSize:this.pageSize})});if(!e.ok)throw new Error("获取文章失败");const a=await e.json();this.articles=a.articles,this.totalPages=a.totalPages,this.total=a.total}catch(e){console.error("获取文章数据失败:",e),this.articles=[]}finally{this.loading=!1}},getSectionName(e){return 0===e?"攻略指南":"资源共享"},formatDate(e){if(!e)return"";const a=new Date(e);return a.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"})},changePage(e){e>=1&&e<=this.totalPages&&(this.currentPage=e,this.fetchArticles())},viewArticle(e){this.$router.push(`/article/${e}`)}}},F=t(1241);const N=(0,F.A)(A,[["render",_],["__scopeId","data-v-4c3bb6b4"]]);var Q=N}}]);
-//# sourceMappingURL=287.f37f152f.js.map
\ No newline at end of file
+"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[287],{5287:function(e,a,t){t.r(a),t.d(a,{default:function(){return w}});var s=t(6768),l=t(4232),i=t(5130);const c={class:"resource-view"},n={class:"container"},r={class:"filters-container"},o={class:"tag-selection college-category"},g={class:"tag-header"},d={class:"tag-controls"},u={class:"tags-container"},h=["onClick"],C={key:0,class:"check-icon"},k={class:"tag-selection resource-category"},p={class:"tag-header"},v={class:"tag-controls"},m={class:"tags-container"},y=["onClick"],f={key:0,class:"check-icon"};function L(e,a,t,L,T,P){const b=(0,s.g2)("NavBar"),E=(0,s.g2)("CardList");return(0,s.uX)(),(0,s.CE)("div",c,[(0,s.bF)(b),(0,s.Lk)("div",n,[a[6]||(a[6]=(0,s.Lk)("h1",{class:"page-title"},"资源共享",-1)),a[7]||(a[7]=(0,s.Lk)("div",{class:"intro-card"},[(0,s.Lk)("p",{class:"intro-text"}," 为鼓励大家积极投稿,本站投稿者可获得专属访问密码以访问本站加密资源,感谢支持~ ")],-1)),(0,s.Lk)("div",{class:"filter-control",onClick:a[0]||(a[0]=(...e)=>P.toggleFilterPanel&&P.toggleFilterPanel(...e))},[a[3]||(a[3]=(0,s.Lk)("h2",{class:"filter-title"},"筛选",-1)),(0,s.Lk)("span",{class:(0,l.C4)(["toggle-icon",{"is-active":!T.filtersCollapsed}])},"▼",2)]),(0,s.bo)((0,s.Lk)("div",r,[(0,s.Lk)("div",o,[(0,s.Lk)("div",g,[a[4]||(a[4]=(0,s.Lk)("h2",{class:"tag-title"},"按学院筛选",-1)),(0,s.Lk)("div",d,[(0,s.Lk)("button",{class:"tag-control-btn",onClick:a[1]||(a[1]=(...e)=>P.clearCollegeTags&&P.clearCollegeTags(...e))},"清除")])]),(0,s.Lk)("div",u,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(T.collegeTags,(e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:(0,l.C4)(["tag-chip",{active:T.selectedCollegeTags.includes(e.id)}]),onClick:a=>P.toggleCollegeTag(e.id)},[(0,s.eW)((0,l.v_)(e.name)+" ",1),T.selectedCollegeTags.includes(e.id)?((0,s.uX)(),(0,s.CE)("span",C,"✓")):(0,s.Q3)("",!0)],10,h)))),128))])]),(0,s.Lk)("div",k,[(0,s.Lk)("div",p,[a[5]||(a[5]=(0,s.Lk)("h2",{class:"tag-title"},"按资源类别",-1)),(0,s.Lk)("div",v,[(0,s.Lk)("button",{class:"tag-control-btn",onClick:a[2]||(a[2]=(...e)=>P.clearCategoryTags&&P.clearCategoryTags(...e))},"清除")])]),(0,s.Lk)("div",m,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(T.categoryTags,(e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:(0,l.C4)(["tag-chip",{active:T.selectedCategoryTags.includes(e.id)}]),onClick:a=>P.toggleCategoryTag(e.id)},[(0,s.eW)((0,l.v_)(e.name)+" ",1),T.selectedCategoryTags.includes(e.id)?((0,s.uX)(),(0,s.CE)("span",f,"✓")):(0,s.Q3)("",!0)],10,y)))),128))])])],512),[[i.aG,!T.filtersCollapsed]]),(0,s.bF)(E,{searchParams:P.searchParams,mode:1,pageSize:12},null,8,["searchParams"])])])}t(4114),t(8111),t(2489);var T=t(4440),P=t(9009),b={name:"ResourceView",components:{NavBar:T.A,CardList:P.A},data(){return{filtersCollapsed:!0,selectedCollegeTags:[],selectedCategoryTags:[],collegeTags:[{id:1,name:"软件学院"},{id:2,name:"计算机学院"},{id:3,name:"工商管理学院"},{id:4,name:"理学院"},{id:18,name:"信息学院"}],categoryTags:[{id:5,name:"课件"},{id:7,name:"课本"},{id:8,name:"习题答案"},{id:9,name:"期末真题"},{id:10,name:"PDF"},{id:16,name:"公共课"},{id:17,name:"专业课"},{id:22,name:"选修课"},{id:20,name:"题库"}]}},created(){document.title="资源共享 - NEU小站"},computed:{searchParams(){const e={section:1},a=[...this.selectedCollegeTags,...this.selectedCategoryTags];return a.length>0&&(e.tags=a),e}},methods:{toggleFilterPanel(){this.filtersCollapsed=!this.filtersCollapsed},toggleCollegeTag(e){this.selectedCollegeTags.includes(e)?this.selectedCollegeTags=this.selectedCollegeTags.filter((a=>a!==e)):this.selectedCollegeTags.push(e)},toggleCategoryTag(e){this.selectedCategoryTags.includes(e)?this.selectedCategoryTags=this.selectedCategoryTags.filter((a=>a!==e)):this.selectedCategoryTags.push(e)},clearCollegeTags(){this.selectedCollegeTags=[]},clearCategoryTags(){this.selectedCategoryTags=[]}}},E=t(1241);const X=(0,E.A)(b,[["render",L],["__scopeId","data-v-0aab4a81"]]);var w=X},9009:function(e,a,t){t.d(a,{A:function(){return Q}});var s=t(6768),l=t(4232);const i={class:"card-list-container"},c={key:0,class:"card-grid"},n=["onClick"],r={class:"card-content"},o={class:"card-title"},g={class:"card-tags"},d={key:0,class:"article-tag official"},u={key:1,class:"article-tag highlight"},h={key:2,class:"article-tag top"},C={class:"card-meta"},k={class:"card-section"},p={class:"card-date"},v={class:"card-tags-list"},m={key:0,class:"no-data"},y={key:1,class:"table-container"},f={class:"articles-table"},L=["onClick"],T={key:0,class:"no-data"},P={key:2,class:"loading"},b={key:3,class:"pagination"},E=["disabled"],X={class:"page-info"},w=["disabled"];function _(e,a,t,_,A,F){return(0,s.uX)(),(0,s.CE)("div",i,[1===t.mode?((0,s.uX)(),(0,s.CE)("div",c,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(A.articles,(e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:"card",onClick:a=>F.viewArticle(e.id)},[(0,s.Lk)("div",r,[(0,s.Lk)("h3",o,(0,l.v_)(e.title),1),(0,s.Lk)("div",g,[e.official?((0,s.uX)(),(0,s.CE)("span",d,"官方")):(0,s.Q3)("",!0),e.highlight?((0,s.uX)(),(0,s.CE)("span",u,"优质")):(0,s.Q3)("",!0),e.top?((0,s.uX)(),(0,s.CE)("span",h,"置顶")):(0,s.Q3)("",!0)]),(0,s.Lk)("div",C,[(0,s.Lk)("span",k,(0,l.v_)(F.getSectionName(e.section)),1),(0,s.Lk)("span",p,"更新于 "+(0,l.v_)(F.formatDate(e.updated_at)),1)]),(0,s.Lk)("div",v,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.tags,(e=>((0,s.uX)(),(0,s.CE)("span",{key:e.id,class:"card-tag"},(0,l.v_)(e.name),1)))),128))])])],8,n)))),128)),0!==A.articles.length||A.loading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",m," 暂无符合条件的文章 "))])):((0,s.uX)(),(0,s.CE)("div",y,[(0,s.Lk)("table",f,[a[2]||(a[2]=(0,s.Lk)("thead",null,[(0,s.Lk)("tr",null,[(0,s.Lk)("th",null,"文章标题")])],-1)),(0,s.Lk)("tbody",null,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(A.articles,(e=>((0,s.uX)(),(0,s.CE)("tr",{key:e.id,onClick:a=>F.viewArticle(e.id)},[(0,s.Lk)("td",null,(0,l.v_)(e.title),1)],8,L)))),128))])]),0!==A.articles.length||A.loading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",T," 暂无符合条件的文章 "))])),A.loading?((0,s.uX)(),(0,s.CE)("div",P,a[3]||(a[3]=[(0,s.Lk)("div",{class:"loading-spinner"},null,-1),(0,s.Lk)("span",null,"正在加载...",-1)]))):(0,s.Q3)("",!0),A.totalPages>1&&!A.loading?((0,s.uX)(),(0,s.CE)("div",b,[(0,s.Lk)("button",{disabled:1===A.currentPage,onClick:a[0]||(a[0]=e=>F.changePage(A.currentPage-1)),class:"pagination-btn"}," 上一页 ",8,E),(0,s.Lk)("span",X,(0,l.v_)(A.currentPage)+" / "+(0,l.v_)(A.totalPages),1),(0,s.Lk)("button",{disabled:A.currentPage===A.totalPages,onClick:a[1]||(a[1]=e=>F.changePage(A.currentPage+1)),class:"pagination-btn"}," 下一页 ",8,w)])):(0,s.Q3)("",!0)])}t(4114);var A={name:"CardList",props:{searchParams:{type:Object,default:()=>({})},mode:{type:Number,default:1},pageSize:{type:Number,default:12}},data(){return{articles:[],currentPage:1,totalPages:0,total:0,loading:!1}},watch:{searchParams:{handler(){this.currentPage=1,this.fetchArticles()},deep:!0}},mounted(){this.fetchArticles()},methods:{async fetchArticles(){this.loading=!0;try{const e=await fetch("https://newfront.xn--xhq44jb2fzpc.com/search/general",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...this.searchParams,mode:this.mode,page:this.currentPage,pageSize:this.pageSize})});if(!e.ok)throw new Error("获取文章失败");const a=await e.json();this.articles=a.articles,this.totalPages=a.totalPages,this.total=a.total}catch(e){console.error("获取文章数据失败:",e),this.articles=[]}finally{this.loading=!1}},getSectionName(e){return 0===e?"攻略指南":"资源共享"},formatDate(e){if(!e)return"";const a=new Date(e);return a.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"})},changePage(e){e>=1&&e<=this.totalPages&&(this.currentPage=e,this.fetchArticles())},viewArticle(e){this.$router.push(`/article/${e}`)}}},F=t(1241);const N=(0,F.A)(A,[["render",_],["__scopeId","data-v-4c3bb6b4"]]);var Q=N}}]);
+//# sourceMappingURL=287.760a291e.js.map
\ No newline at end of file
diff --git a/dist/js/29.7c52a143.js b/dist/js/29.b13d599a.js
similarity index 99%
rename from dist/js/29.7c52a143.js
rename to dist/js/29.b13d599a.js
index 446962e..23b967d 100644
--- a/dist/js/29.7c52a143.js
+++ b/dist/js/29.b13d599a.js
@@ -1,3 +1,3 @@
-"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[29],{29:function(e,t,n){n.r(t),n.d(t,{default:function(){return yl}});var l=n(6768),i=n(5130),o=n(4232);const r={class:"submit-page"},s={key:0,class:"course-selector-modal"},a={class:"modal-container"},c={class:"modal-header"},u={class:"modal-body"},d={class:"search-bar"},p={class:"course-results"},h={key:0,class:"course-loading"},m={key:1,class:"search-error"},g={key:2,class:"no-results"},f={key:3,class:"course-table"},v=["onClick"],b=["checked","onClick"],k={class:"rating"},y={class:"rating-count"},w={key:4,class:"pagination"},x=["disabled"],$={class:"page-info"},C=["disabled"],F={class:"modal-footer"},E=["disabled"],S={class:"container"},T={class:"page-header"},L={class:"submission-form"},z={class:"form-section"},A={class:"form-group"},I={for:"title"},_={class:"form-group"},j={class:"form-group"},R={class:"form-section"},D={class:"upload-area"},P={class:"file-input-container"},M={key:0,class:"file-list"},O={class:"file-name"},B={class:"file-size"},H={class:"total-size"},K={class:"form-section"},q={class:"section-desc",style:{color:"purple"}},V={"data-v-bcfef25c":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round",width:"20",height:"24","stroke-width":"1.1",style:{"vertical-align":"middle",display:"inline-block","margin-bottom":"2px"}},U={key:0,class:"section-desc",style:{color:"red"}},W={class:"editor-container"},N={class:"draft-actions"},Q={class:"form-actions"};function Z(e,t,n,Z,G,X){const Y=(0,l.g2)("Navbar"),J=(0,l.g2)("Loading"),ee=(0,l.g2)("MdEditor");return(0,l.uX)(),(0,l.CE)("div",r,[(0,l.bF)(Y),(0,l.bF)(J,{visible:G.isLoading,text:G.loadingText},null,8,["visible","text"]),G.showCourseSelector?((0,l.uX)(),(0,l.CE)("div",s,[(0,l.Lk)("div",{class:"modal-overlay",onClick:t[0]||(t[0]=(...e)=>X.closeCourseSelector&&X.closeCourseSelector(...e))}),(0,l.Lk)("div",a,[(0,l.Lk)("div",c,[t[19]||(t[19]=(0,l.Lk)("h3",null,"选择课程",-1)),(0,l.Lk)("button",{class:"close-btn",onClick:t[1]||(t[1]=(...e)=>X.closeCourseSelector&&X.closeCourseSelector(...e))},"×")]),(0,l.Lk)("div",u,[(0,l.Lk)("div",d,[(0,l.bo)((0,l.Lk)("input",{type:"text","onUpdate:modelValue":t[2]||(t[2]=e=>G.courseSearch=e),placeholder:"请输入课程名称",class:"search-input",onKeyup:t[3]||(t[3]=(0,i.jR)(((...e)=>X.searchCourses&&X.searchCourses(...e)),["enter"]))},null,544),[[i.Jo,G.courseSearch]]),(0,l.Lk)("button",{class:"search-btn",onClick:t[4]||(t[4]=(...e)=>X.searchCourses&&X.searchCourses(...e))},"搜索")]),(0,l.Lk)("div",p,[G.searchLoading?((0,l.uX)(),(0,l.CE)("div",h,t[20]||(t[20]=[(0,l.Lk)("div",{class:"spinner"},null,-1),(0,l.Lk)("span",null,"搜索中...",-1)]))):G.searchError?((0,l.uX)(),(0,l.CE)("div",m,(0,o.v_)(G.searchError),1)):0===G.courseResults.length?((0,l.uX)(),(0,l.CE)("div",g," 未找到相关课程 ")):((0,l.uX)(),(0,l.CE)("table",f,[t[21]||(t[21]=(0,l.Lk)("thead",null,[(0,l.Lk)("tr",null,[(0,l.Lk)("th",null,"选择"),(0,l.Lk)("th",null,"课程名称"),(0,l.Lk)("th",null,"课程类别"),(0,l.Lk)("th",null,"授课教师"),(0,l.Lk)("th",null,"评分")])],-1)),(0,l.Lk)("tbody",null,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(G.courseResults,(e=>((0,l.uX)(),(0,l.CE)("tr",{key:e.course_id,onClick:t=>X.selectCourse(e),class:(0,o.C4)({selected:G.selectedCourse&&G.selectedCourse.course_id===e.course_id})},[(0,l.Lk)("td",null,[(0,l.Lk)("input",{type:"radio",checked:G.selectedCourse&&G.selectedCourse.course_id===e.course_id,onClick:(0,i.D$)((t=>X.selectCourse(e)),["stop"])},null,8,b)]),(0,l.Lk)("td",null,(0,o.v_)(e.course_name),1),(0,l.Lk)("td",null,(0,o.v_)(X.getCategoryName(e.category_id)),1),(0,l.Lk)("td",null,(0,o.v_)(e.teachers),1),(0,l.Lk)("td",null,[(0,l.Lk)("span",k,(0,o.v_)(e.rating),1),(0,l.Lk)("span",y,"("+(0,o.v_)(e.rating_count)+"人评)",1)])],10,v)))),128))])])),G.totalPages>1?((0,l.uX)(),(0,l.CE)("div",w,[(0,l.Lk)("button",{class:"page-btn",disabled:1===G.currentPage,onClick:t[5]||(t[5]=e=>X.changePage(G.currentPage-1))}," 上一页 ",8,x),(0,l.Lk)("span",$,"第 "+(0,o.v_)(G.currentPage)+" / "+(0,o.v_)(G.totalPages)+" 页",1),(0,l.Lk)("button",{class:"page-btn",disabled:G.currentPage===G.totalPages,onClick:t[6]||(t[6]=e=>X.changePage(G.currentPage+1))}," 下一页 ",8,C)])):(0,l.Q3)("",!0)])]),(0,l.Lk)("div",F,[(0,l.Lk)("button",{class:"btn btn-secondary",onClick:t[7]||(t[7]=(...e)=>X.closeCourseSelector&&X.closeCourseSelector(...e))}," 取消 "),(0,l.Lk)("button",{class:"btn btn-primary",onClick:t[8]||(t[8]=(...e)=>X.confirmCourseSelection&&X.confirmCourseSelection(...e)),disabled:!G.selectedCourse}," 确定 ",8,E)])])])):(0,l.Q3)("",!0),(0,l.Lk)("div",S,[(0,l.Lk)("div",T,[(0,l.Lk)("h1",null,(0,o.v_)(G.isEditMode?"编辑投稿内容":"内容投稿"),1),t[22]||(t[22]=(0,l.Lk)("p",{class:"sub-title"},"感谢您分享您的学习资源或独到见解!",-1))]),(0,l.Lk)("div",L,[(0,l.Lk)("div",z,[(0,l.Lk)("div",A,[(0,l.Lk)("label",I,"标题 "+(0,o.v_)(G.isEditMode?"(如需更改标题,请不要更改【edit】前缀)":""),1),(0,l.bo)((0,l.Lk)("input",{type:"text",id:"title","onUpdate:modelValue":t[9]||(t[9]=e=>G.formData.title=e),class:"form-control",placeholder:"请输入投稿标题",maxlength:"50"},null,512),[[i.Jo,G.formData.title]])]),(0,l.Lk)("div",_,[t[24]||(t[24]=(0,l.Lk)("label",{for:"section"},"板块",-1)),(0,l.bo)((0,l.Lk)("select",{id:"section","onUpdate:modelValue":t[10]||(t[10]=e=>G.formData.section=e),class:"form-control"},t[23]||(t[23]=[(0,l.Lk)("option",{value:"",disabled:""},"请选择板块",-1),(0,l.Lk)("option",{value:"攻略指南"},"攻略指南",-1),(0,l.Lk)("option",{value:"资源共享"},"资源共享",-1)]),512),[[i.u1,G.formData.section]])]),(0,l.Lk)("div",j,[t[25]||(t[25]=(0,l.Lk)("label",{for:"note"},"备注信息 (选填)",-1)),(0,l.bo)((0,l.Lk)("input",{type:"text",id:"note","onUpdate:modelValue":t[11]||(t[11]=e=>G.formData.note=e),class:"form-control",placeholder:"可添加备注信息"},null,512),[[i.Jo,G.formData.note]])])]),(0,l.Lk)("div",R,[t[28]||(t[28]=(0,l.Lk)("h3",null,"附件上传",-1)),t[29]||(t[29]=(0,l.Lk)("p",{class:"section-desc"},"您可以上传最多10个文件,总大小不超过200MB。如果有压缩包,只允许上传此压缩文件。",-1)),(0,l.Lk)("div",D,[(0,l.Lk)("div",P,[t[26]||(t[26]=(0,l.Lk)("label",{for:"filePicker",class:"upload-label"},[(0,l.Lk)("span",{class:"upload-icon"},"📎"),(0,l.Lk)("span",null,"选择文件")],-1)),(0,l.Lk)("input",{type:"file",id:"filePicker",ref:"filePicker",onChange:t[12]||(t[12]=(...e)=>X.validateFiles&&X.validateFiles(...e)),multiple:"",class:"file-input"},null,544)]),G.selectedFiles.length>0?((0,l.uX)(),(0,l.CE)("div",M,[t[27]||(t[27]=(0,l.Lk)("h4",null,"已选择的文件:",-1)),(0,l.Lk)("ul",null,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(G.selectedFiles,((e,t)=>((0,l.uX)(),(0,l.CE)("li",{key:t},[(0,l.Lk)("span",O,(0,o.v_)(e.name),1),(0,l.Lk)("span",B,"("+(0,o.v_)(X.formatFileSize(e.size))+")",1)])))),128))]),(0,l.Lk)("p",H,"总大小: "+(0,o.v_)(X.formatFileSize(G.totalFileSize)),1)])):(0,l.Q3)("",!0)])]),(0,l.Lk)("div",K,[t[36]||(t[36]=(0,l.Lk)("h3",null,"内容编辑",-1)),t[37]||(t[37]=(0,l.Lk)("p",{class:"section-desc"},'此部分主要用于"攻略指南"板块,"资源共享"板块可以留空。',-1)),t[38]||(t[38]=(0,l.Lk)("p",{class:"section-desc"},"使用Markdown语法编辑您的投稿内容。插入图片后,如需修改图片大小,请在编辑器中找到插入的图片标签,修改其width属性。",-1)),t[39]||(t[39]=(0,l.Lk)("p",{class:"section-desc"},[(0,l.eW)("如上传了附件且需在文中指定位置展示,"),(0,l.Lk)("strong",null,"可以用[附件名]来表示附件位置"),(0,l.eW)("。如不指定,则审核人员将按照文章内容在适当位置展示。")],-1)),t[40]||(t[40]=(0,l.Lk)("p",{class:"section-desc"},[(0,l.Lk)("strong",null,"草稿功能和文章页预览只针对此部分内容,上传的附件等将不会保存并不支持文章页预览。")],-1)),(0,l.Lk)("p",q,[t[31]||(t[31]=(0,l.eW)("您可以轻松地插入课程卡片(点击")),((0,l.uX)(),(0,l.CE)("svg",V,t[30]||(t[30]=[(0,l.Lk)("path",{"data-v-bcfef25c":"",d:"M22 9l-10 -4l-10 4l10 4l10 -4v6"},null,-1),(0,l.Lk)("path",{"data-v-bcfef25c":"",d:"M6 10.6v5.4a6 3 0 0 0 12 0v-5.4"},null,-1)]))),t[32]||(t[32]=(0,l.eW)("按钮),引用课程评分系统中的课程数据。")),t[33]||(t[33]=(0,l.Lk)("strong",null,"注意:由于网站的安全设置,课程卡片前必须有其他内容,请勿在内容第一行插入课程卡片,否则将无法正常显示!",-1))]),G.isEditMode?((0,l.uX)(),(0,l.CE)("p",U,t[34]||(t[34]=[(0,l.Lk)("strong",null,"检测到您当前正在编辑已有的投稿内容,请注意您之前如有其他投稿的草稿内容,这些内容在此页面保存草稿或提交编辑后将不会保留。",-1)]))):(0,l.Q3)("",!0),(0,l.Lk)("div",W,[(0,l.bF)(ee,{modelValue:G.formData.content,"onUpdate:modelValue":t[14]||(t[14]=e=>G.formData.content=e),ref:"markdownEditor",theme:G.editorTheme,toolbars:G.editorToolbars,language:"zh-CN","preview-theme":"github",placeholder:G.editorPlaceholder,onOnUploadImg:X.handleImageUpload},{defToolbars:(0,l.k6)((()=>[(0,l.Lk)("span",{class:"md-editor-toolbar-item",title:"添加课程卡片",onClick:t[13]||(t[13]=(...e)=>X.chooseCourse&&X.chooseCourse(...e))},t[35]||(t[35]=[(0,l.Lk)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",width:"20",height:"24","stroke-width":"1.1"},[(0,l.Lk)("path",{d:"M22 9l-10 -4l-10 4l10 4l10 -4v6"}),(0,l.Lk)("path",{d:"M6 10.6v5.4a6 3 0 0 0 12 0v-5.4"})],-1)]))])),_:1},8,["modelValue","theme","toolbars","placeholder","onOnUploadImg"])]),(0,l.Lk)("div",N,[(0,l.Lk)("button",{type:"button",class:"btn btn-secondary",onClick:t[15]||(t[15]=(...e)=>X.loadDraft&&X.loadDraft(...e))}," 加载草稿 "),(0,l.Lk)("button",{type:"button",class:"btn btn-secondary",onClick:t[16]||(t[16]=(...e)=>X.saveDraftWithConfirm&&X.saveDraftWithConfirm(...e))}," 保存草稿 "),(0,l.Lk)("button",{type:"button",class:"btn btn-secondary preview-btn",onClick:t[17]||(t[17]=(...e)=>X.previewDraft&&X.previewDraft(...e))}," 在文章页中预览 ")])]),(0,l.Lk)("div",Q,[(0,l.Lk)("button",{type:"button",class:"btn btn-primary",onClick:t[18]||(t[18]=(...e)=>X.submitForm&&X.submitForm(...e))},(0,o.v_)(G.isEditMode?"提交编辑":"提交投稿"),1)])])])])}n(4114),n(8111),n(1701);var G=n(3070),X=(n(1148),n(2489),n(7588),n(8237),n(3579),n(4979),n(144)),Y=Object.defineProperty,J=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ie=(e,t,n)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))ne.call(t,n)&&ie(e,n,t[n]);if(te)for(var n of te(t))le.call(t,n)&&ie(e,n,t[n]);return e},re=(e,t)=>J(e,ee(t));const se="md-editor",ae="md-editor-v3",ce="https://at.alicdn.com/t/c/font_2605852_u82y61ve02.js",ue="https://cdnjs.cloudflare.com/ajax/libs",de=`${ue}/highlight.js/11.7.0/highlight.min.js`,pe={main:`${ue}/prettier/2.8.0/standalone.js`,markdown:`${ue}/prettier/2.8.0/parser-markdown.js`},he={css:`${ue}/cropperjs/1.5.13/cropper.min.css`,js:`${ue}/cropperjs/1.5.13/cropper.min.js`},me=`${ue}/screenfull.js/5.2.0/screenfull.min.js`,ge=["bold","underline","italic","strikeThrough","-","title","sub","sup","quote","unorderedList","orderedList","task","-","codeRow","code","link","image","table","mermaid","katex","-","revoke","next","save","=","prettier","pageFullscreen","fullscreen","preview","htmlPreview","catalog","github"],fe=["markdownTotal","=","scrollSwitch"],ve={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Img Link",upload:"Upload Img",clip2upload:"Clip Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Word Count",scrollAuto:"Scroll Auto"}}},be=`${ue}/mermaid/9.4.0/mermaid.min.js`,ke={js:`${ue}/KaTeX/0.16.3/katex.min.js`,css:`${ue}/KaTeX/0.16.3/katex.min.css`},ye={a11y:{light:`${ue}/highlight.js/11.7.0/styles/a11y-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/a11y-dark.min.css`},atom:{light:`${ue}/highlight.js/11.7.0/styles/atom-one-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/atom-one-dark.min.css`},github:{light:`${ue}/highlight.js/11.7.0/styles/github.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/github-dark.min.css`},gradient:{light:`${ue}/highlight.js/11.7.0/styles/gradient-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/gradient-dark.min.css`},kimbie:{light:`${ue}/highlight.js/11.7.0/styles/kimbie-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/kimbie-dark.min.css`},paraiso:{light:`${ue}/highlight.js/11.7.0/styles/paraiso-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/paraiso-dark.min.css`},qtcreator:{light:`${ue}/highlight.js/11.7.0/styles/qtcreator-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${ue}/highlight.js/11.7.0/styles/stackoverflow-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/stackoverflow-dark.min.css`}},we={markedRenderer:e=>e,markedExtensions:[],markedOptions:{},editorExtensions:{},editorConfig:{}},xe=e=>{if(e)for(const t in e){const n=e[t];n&&(we[t]=n)}};class $e{constructor(){this.pools={}}remove(e,t,n){const l=this.pools[e],i=l&&this.pools[e][t];i&&(this.pools[e][t]=i.filter((e=>e!==n)))}clear(e){this.pools[e]={}}on(e,t){return this.pools[e]||(this.pools[e]={}),this.pools[e][t.name]||(this.pools[e][t.name]=[]),this.pools[e][t.name].push(t.callback),this.pools[e][t.name].includes(t.callback)}emit(e,t,...n){this.pools[e]||(this.pools[e]={});const l=this.pools[e],i=l[t];i&&i.forEach((e=>{try{e(...n)}catch(l){console.error(`${t} monitor event exception!`,l)}}))}}var Ce=new $e;const Fe=(e,t=0,n=t)=>new Promise(((l,i)=>{e.setSelectionRange?setTimeout((()=>{e.setSelectionRange(t,n),e.focus(),l(!0)}),0):(console.error("Can not reset position!"),i())})),Ee=(e,t,n)=>{const{deviationStart:l=0,deviationEnd:i=0,direct:o=!1,select:r=!1}=n;let s="";if(e.selectionStart||0===e.selectionStart){const o=e.selectionStart,a=e.selectionEnd||0,{prefixVal:c=e.value.substring(0,o),subfixVal:u=e.value.substring(a,e.value.length)}=n;s=c+t+u,Fe(e,r?o+l:o+t.length+i,o+t.length+i)}else s+=t;return o&&(e.value=s),s},Se=(e,t={newWindow:!0,nofollow:!0})=>{e||console.error("error link!");const n=document.createElement("a");n.href=e,n.style.display="none",t.newWindow&&(n.target="_blank"),t.nofollow&&(n.rel="noopener noreferrer"),document.body.appendChild(n),n.click(),document.body.removeChild(n)},Te=(e,t)=>{const n=Ae((()=>{e.removeEventListener("scroll",l),e.addEventListener("scroll",l),t.removeEventListener("scroll",l),t.addEventListener("scroll",l)}),50),l=i=>{const o=e.clientHeight,r=t.clientHeight,s=e.scrollHeight,a=t.scrollHeight,c=(s-o)/(a-r);i.target===e?(t.removeEventListener("scroll",l),t.scrollTo({top:e.scrollTop/c}),n()):(e.removeEventListener("scroll",l),e.scrollTo({top:t.scrollTop*c}),n())};return[()=>{n().finally((()=>{e.dispatchEvent(new Event("scroll"))}))},()=>{e.removeEventListener("scroll",l),t.removeEventListener("scroll",l)}]},Le=(e,t="image.png")=>{const n=e.split(","),l=n[0].match(/:(.*?);/);if(l){const e=l[1],i=atob(n[1]);let o=i.length;const r=new Uint8Array(o);while(o--)r[o]=i.charCodeAt(o);return new File([r],t,{type:e})}return null},ze=e=>{if(!e.trim())return e;const t=e.split("\n"),n=[''];return t.forEach((()=>{n.push(" ")})),n.push(" "),`${e} ${n.join("")}`},Ae=(e,t=200)=>{let n=0;return(...l)=>new Promise((i=>{n&&(clearTimeout(n),i("cancel")),n=window.setTimeout((()=>{e.apply(globalThis,l),n=0,i("done")}),t)}))},Ie=(e,t=200)=>{let n=0,l=null;return(...i)=>{const o=i=>{0===n&&(n=i),i-n>=t?(e.apply(globalThis,l),l=null,n=0):window.requestAnimationFrame(o)};null===l&&window.requestAnimationFrame(o),l=i}},_e=(e,t="$")=>{const n=e.split(t);let l=t,i="";for(let o=1;o{var t;const n=navigator.userAgent;return n.indexOf("Firefox")>-1?e.value.substring(e.selectionStart,e.selectionEnd):(null==(t=window.getSelection())?void 0:t.toString())||""},Re=(e,t)=>{const n=null==e?void 0:e.getBoundingClientRect();if(t===document.documentElement)return n.top-t.clientTop;const l=null==t?void 0:t.getBoundingClientRect();return n.top-l.top},De=(e,t)=>{const n=oe({},e);return t.forEach((e=>{Reflect.deleteProperty(n,e)})),n},Pe=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,Me=(e,t)=>{const n=n=>{const l=e.parentElement||document.body,i=l.offsetWidth,o=l.offsetHeight,{clientWidth:r}=document.documentElement,{clientHeight:s}=document.documentElement,a=n.offsetX,c=n.offsetY,u=e=>{let n=e.x+document.body.scrollLeft-document.body.clientLeft-a,u=e.y+document.body.scrollTop-document.body.clientTop-c;n=n<1?1:n{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",d)};document.addEventListener("mouseup",d)};return e.addEventListener("mousedown",n),()=>{e.removeEventListener("mousedown",n)}},Oe=(e,t="")=>{const n=document.getElementById(e.id);n?""!==t&&e.onload instanceof Function&&(Reflect.get(window,t)?e.onload(new Event("load")):n.addEventListener("load",e.onload)):document.head.appendChild(e)},Be=Ae(((e,t,n)=>{const l=document.getElementById(e);l&&l.setAttribute(t,n)}),10),He="onSave",Ke="changeCatalogVisible",qe="changeFullscreen",Ve="pageFullscreenChanged",Ue="fullscreenChanged",We="previewChanged",Ne="htmlPreviewChanged",Qe="catalogVisibleChanged",Ze="textareaFocus",Ge=(e,t)=>{const{editorId:n,noPrettier:i,previewOnly:o}=e,r=(0,X.Kh)({buildFinished:!1,html:""}),s=t=>{if(t.target===document.querySelector(`#${e.editorId}-textarea`))if(Ce.emit(n,"selectTextChange"),t.ctrlKey||t.metaKey)switch(t.code){case"KeyS":t.shiftKey?Ce.emit(n,"replace","strikeThrough"):(Ce.emit(n,He,e.modelValue),t.preventDefault());break;case"KeyB":Ce.emit(n,"replace","bold"),t.preventDefault();break;case"KeyU":t.shiftKey?(Ce.emit(n,"replace","unorderedList"),t.preventDefault()):(Ce.emit(n,"replace","underline"),t.preventDefault());break;case"KeyI":t.shiftKey?(Ce.emit(n,"openModals","image"),t.preventDefault()):(Ce.emit(n,"replace","italic"),t.preventDefault());break;case"Digit1":Ce.emit(n,"replace","h1"),t.preventDefault();break;case"Digit2":Ce.emit(n,"replace","h2"),t.preventDefault();break;case"Digit3":Ce.emit(n,"replace","h3"),t.preventDefault();break;case"Digit4":Ce.emit(n,"replace","h4"),t.preventDefault();break;case"Digit5":Ce.emit(n,"replace","h5"),t.preventDefault();break;case"Digit6":Ce.emit(n,"replace","h6"),t.preventDefault();break;case"ArrowUp":Ce.emit(n,"replace","sup"),t.preventDefault();break;case"ArrowDown":Ce.emit(n,"replace","sub"),t.preventDefault();break;case"KeyQ":if("a"===t.key)return void t.target.select();Ce.emit(n,"replace","quote"),t.preventDefault();break;case"KeyA":if("q"===t.key){Ce.emit(n,"replace","quote"),t.preventDefault();break}return;case"KeyO":Ce.emit(n,"replace","orderedList"),t.preventDefault();break;case"KeyC":if(t.shiftKey)Ce.emit(n,"replace","code"),t.preventDefault();else{if(!t.altKey){t.preventDefault(),Ce.emit(n,"replace","ctrlC");break}Ce.emit(n,"replace","codeRow"),t.preventDefault()}break;case"KeyL":Ce.emit(n,"openModals","link"),t.preventDefault();break;case"KeyZ":if("w"===t.key)return;t.shiftKey?(Ce.emit(n,"ctrlShiftZ"),t.preventDefault()):(Ce.emit(n,"ctrlZ"),t.preventDefault());break;case"KeyW":if("z"===t.key){t.shiftKey?(Ce.emit(n,"ctrlShiftZ"),t.preventDefault()):(Ce.emit(n,"ctrlZ"),t.preventDefault());break}return;case"KeyF":t.shiftKey&&(i||(Ce.emit(n,"replace","prettier"),t.preventDefault()));break;case"KeyT":t.altKey&&t.shiftKey&&(Ce.emit(n,"replace","table"),t.preventDefault());break;case"KeyX":Ce.emit(n,"replace","ctrlX"),t.preventDefault();break;case"KeyD":t.preventDefault(),Ce.emit(n,"replace","ctrlD");break}else"Tab"===t.code&&(t.preventDefault(),t.shiftKey?Ce.emit(n,"replace","shiftTab"):Ce.emit(n,"replace","tab"))};(0,l.wB)((()=>e.modelValue),(()=>{r.buildFinished=!1})),(0,l.sV)((()=>{o||(window.addEventListener("keydown",s),Ce.on(n,{name:"buildFinished",callback(e){r.buildFinished=!0,r.html=e}}),Ce.on(n,{name:He,callback(){const l=new Promise((e=>{if(r.buildFinished)e(r.html);else{const t=l=>{e(l),Ce.remove(n,"buildFinished",t)};Ce.on(n,{name:"buildFinished",callback:t})}}));e.onSave?e.onSave(e.modelValue,l):t.emit("onSave",e.modelValue,l)}}))})),(0,l.xo)((()=>{o||window.removeEventListener("keydown",s)}))},Xe=e=>{var t;const{editorId:n,previewOnly:i}=e,o=null==(t=null==we?void 0:we.editorExtensions)?void 0:t.highlight;(0,l.Gt)("editorId",n),(0,l.Gt)("tabWidth",e.tabWidth),(0,l.Gt)("theme",(0,l.EW)((()=>e.theme))),(0,l.Gt)("highlight",(0,l.EW)((()=>{const t=oe(oe({},ye),null==o?void 0:o.css),n=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme;return{js:(null==o?void 0:o.js)||de,css:t[e.codeTheme]?t[e.codeTheme][n]:ye.atom[n]}}))),(0,l.Gt)("historyLength",e.historyLength),(0,l.Gt)("previewOnly",i),(0,l.Gt)("showCodeRowNumber",e.showCodeRowNumber);const r=(0,l.EW)((()=>{var t;const n=oe(oe({},ve),null==(t=null==we?void 0:we.editorConfig)?void 0:t.languageUserDefined);return n[e.language]?n[e.language]:ve["zh-CN"]}));(0,l.Gt)("usedLanguageText",r),(0,l.Gt)("previewTheme",(0,l.EW)((()=>e.previewTheme)))},Ye=e=>{var t,n,i,o,r,s;const{noPrettier:a,previewOnly:c,noIconfont:u,noUploadImg:d}=e,{editorExtensions:p}=we,h=a||!!(null==(n=null==(t=we.editorExtensions)?void 0:t.prettier)?void 0:n.prettierInstance),m=a||!!(null==(o=null==(i=we.editorExtensions)?void 0:i.prettier)?void 0:o.parserMarkdownInstance),g=d||!!(null==(s=null==(r=we.editorExtensions)?void 0:r.cropper)?void 0:s.instance);(0,l.sV)((()=>{var e,t,n,l;const i=document.createElement("script");i.src=(null==p?void 0:p.iconfont)||ce,i.id=`${se}-icon`;const o=document.createElement("script"),r=document.createElement("script");o.src=(null==(e=null==p?void 0:p.prettier)?void 0:e.standaloneJs)||pe.main,o.id=`${se}-prettier`,r.src=(null==(t=null==p?void 0:p.prettier)?void 0:t.parserMarkdownJs)||pe.markdown,r.id=`${se}-prettierMD`;const s=document.createElement("link");s.rel="stylesheet",s.href=(null==(n=null==p?void 0:p.cropper)?void 0:n.css)||he.css,s.id=`${se}-cropperCss`;const a=document.createElement("script");a.src=(null==(l=null==p?void 0:p.cropper)?void 0:l.js)||he.js,a.id=`${se}-cropper`,u||Oe(i),c||(g||(Oe(s),Oe(a)),h||Oe(o),m||Oe(r))}))},Je=(e,t)=>{const{editorId:n,previewOnly:i}=e,o=(0,X.Kh)({pageFullscreen:e.pageFullscreen,fullscreen:!1,preview:e.preview,htmlPreview:!e.preview&&e.htmlPreview}),r=(e,t)=>{o[e]=void 0===t?!o[e]:t,"preview"===e&&o.preview?o.htmlPreview=!1:"htmlPreview"===e&&o.htmlPreview&&(o.preview=!1)};let s="";const a=()=>{o.pageFullscreen||o.fullscreen?document.body.style.overflow="hidden":document.body.style.overflow=s};return(0,l.wB)((()=>[o.pageFullscreen,o.fullscreen]),a),(0,l.sV)((()=>{i||Ce.on(n,{name:"uploadImage",callback(l,i){const o=e=>{Ce.emit(n,"replace","image",{desc:"",urls:e}),i&&i()};e.onUploadImg?e.onUploadImg(l,o):t.emit("onUploadImg",l,o)}}),s=document.body.style.overflow,a()})),[o,r]},et=e=>{const{editorId:t}=e,n=(0,X.KR)(!1);(0,l.sV)((()=>{Ce.on(t,{name:Ke,callback:e=>{n.value=void 0===e?!n.value:e}})}));const i=(0,l.EW)((()=>!e.toolbarsExclude.includes("catalog")&&e.toolbars.includes("catalog")));return[n,i]},tt=(e,t,n,i,o)=>{const{editorId:r}=e;(0,l.wB)((()=>i.pageFullscreen),(e=>{Ce.emit(r,Ve,e)})),(0,l.wB)((()=>i.fullscreen),(e=>{Ce.emit(r,Ue,e)})),(0,l.wB)((()=>i.preview),(e=>{Ce.emit(r,We,e)})),(0,l.wB)((()=>i.htmlPreview),(e=>{Ce.emit(r,Ne,e)})),(0,l.wB)(n,(e=>{Ce.emit(r,Qe,e)}));const s={on(e,t){switch(e){case"pageFullscreen":Ce.on(r,{name:Ve,callback(e){t(e)}});break;case"fullscreen":Ce.on(r,{name:Ue,callback(e){t(e)}});break;case"preview":Ce.on(r,{name:We,callback(e){t(e)}});break;case"htmlPreview":Ce.on(r,{name:Ne,callback(e){t(e)}});break;case"catalog":Ce.on(r,{name:Qe,callback(e){t(e)}});break}},togglePageFullscreen(e){o("pageFullscreen",e)},toggleFullscreen(e){Ce.emit(r,qe,e)},togglePreview(e){o("preview",e)},toggleHtmlPreview(e){o("htmlPreview",e)},toggleCatalog(e){Ce.emit(r,Ke,e)},triggerSave(){Ce.emit(r,He)},insert(e){Ce.emit(r,"replace","universal",{generate:e})},focus(){Ce.emit(r,Ze)}};t.expose(s)};var nt=(0,l.pM)({setup(){return()=>(0,l.bF)("div",{class:`${se}-divider`},null)}});const lt=({instance:e,ctx:t,props:n={}},l="default")=>{const i=(null==e?void 0:e.$slots[l])||(null==t?void 0:t.slots[l]);return(i?i(e):"")||n[l]};const it=()=>({trigger:{type:String,default:"hover"},overlay:{type:[String,Object],default:""},visible:{type:Boolean,default:!1},onChange:{type:Function,default:()=>{}},relative:{type:String,default:"html"}});var ot=(0,l.pM)({props:it(),setup(e,t){const n=`${se}-dropdown-hidden`,i=(0,X.Kh)({overlayClass:[n],overlayStyle:{},triggerHover:!1,overlayHover:!1}),o=(0,X.KR)(),r=(0,X.KR)(),s=()=>{var t;"hover"===e.trigger&&(i.triggerHover=!0);const n=o.value,l=r.value,s=n.getBoundingClientRect(),a=n.offsetTop,c=n.offsetLeft,u=s.height,d=s.width,p=(null==(t=document.querySelector(e.relative))?void 0:t.scrollLeft)||0;i.overlayStyle=re(oe({},i.overlayStyle),{top:a+u+"px",left:c-l.offsetWidth/2+d/2-p+"px"}),e.onChange(!0)},a=()=>{i.overlayHover=!0};(0,l.wB)((()=>e.visible),(e=>{e?i.overlayClass=i.overlayClass.filter((e=>e!==n)):i.overlayClass.push(n)}));const c=t=>{const n=o.value,l=r.value;n.contains(t.target)||l.contains(t.target)||e.onChange(!1)};let u=-1;const d=t=>{o.value===t.target?i.triggerHover=!1:i.overlayHover=!1,clearTimeout(u),u=window.setTimeout((()=>{i.overlayHover||i.triggerHover||e.onChange(!1)}),10)};return(0,l.sV)((()=>{"click"===e.trigger?(o.value.addEventListener("click",s),document.addEventListener("click",c)):(o.value.addEventListener("mouseenter",s),o.value.addEventListener("mouseleave",d),r.value.addEventListener("mouseenter",a),r.value.addEventListener("mouseleave",d))})),(0,l.xo)((()=>{"click"===e.trigger?(o.value.removeEventListener("click",s),document.removeEventListener("click",c)):(o.value.removeEventListener("mouseenter",s),o.value.removeEventListener("mouseleave",d),r.value.removeEventListener("mouseenter",a),r.value.removeEventListener("mouseleave",d))})),()=>{const n=lt({ctx:t}),s=lt({props:e,ctx:t},"overlay"),a=(0,l.E3)(n instanceof Array?n[0]:n,{ref:o}),c=(0,l.bF)("div",{class:[`${se}-dropdown`,i.overlayClass],style:i.overlayStyle,ref:r},[(0,l.bF)("div",{class:`${se}-dropdown-overlay`},[s instanceof Array?s[0]:s])]);return[a,c]}}});const rt=()=>({title:{type:String,default:""},visible:{type:Boolean,default:!1},width:{type:String,default:"auto"},height:{type:String,default:"auto"},onClose:{type:Function,default:()=>{}},showAdjust:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},onAdjust:{type:Function,default:()=>{}},class:{type:String}});var st=(0,l.pM)({props:rt(),setup(e,t){const n=(0,X.KR)(e.visible),i=(0,X.KR)([`${se}-modal`]),o=(0,X.KR)(),r=(0,X.KR)();let s=()=>{};const a=(0,X.Kh)({initPos:{left:"0px",top:"0px"},historyPos:{left:"0px",top:"0px"}}),c=(0,l.EW)((()=>e.isFullscreen?{width:"100%",height:"100%"}:{width:e.width,height:e.height}));return(0,l.sV)((()=>{s=Me(r.value,((e,t)=>{a.initPos.left=e+"px",a.initPos.top=t+"px"}))})),(0,l.xo)((()=>{s()})),(0,l.wB)((()=>e.isFullscreen),(e=>{e?s():s=Me(r.value,((e,t)=>{a.initPos.left=e+"px",a.initPos.top=t+"px"}))})),(0,l.wB)((()=>e.visible),(e=>{e?(i.value.push("zoom-in"),n.value=e,(0,l.dY)((()=>{const e=o.value.offsetWidth/2,t=o.value.offsetHeight/2,n=document.documentElement.clientWidth/2,l=document.documentElement.clientHeight/2;a.initPos.left=n-e+"px",a.initPos.top=l-t+"px"})),setTimeout((()=>{i.value=i.value.filter((e=>"zoom-in"!==e))}),140)):(i.value.push("zoom-out"),setTimeout((()=>{i.value=i.value.filter((e=>"zoom-out"!==e)),n.value=e}),130))})),()=>{const s=lt({ctx:t}),u=lt({props:e,ctx:t},"title");return(0,l.bF)("div",{class:[e.class],style:{display:n.value?"block":"none"}},[(0,l.bF)("div",{class:`${se}-modal-mask`,onClick:e.onClose},null),(0,l.bF)("div",{class:i.value,style:oe(oe({},a.initPos),c.value),ref:o},[(0,l.bF)("div",{class:`${se}-modal-header`,ref:r},[u||""]),(0,l.bF)("div",{class:`${se}-modal-body`},[s]),(0,l.bF)("div",{class:`${se}-modal-func`},[e.showAdjust&&(0,l.bF)("div",{class:`${se}-modal-adjust`,onClick:t=>{t.stopPropagation(),e.isFullscreen?a.initPos=a.historyPos:(a.historyPos=a.initPos,a.initPos={left:"0",top:"0"}),e.onAdjust(!e.isFullscreen)}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-"+(e.isFullscreen?"suoxiao":"fangda")},null)])]),(0,l.bF)("div",{class:`${se}-modal-close`,onClick:t=>{t.stopPropagation(),e.onClose&&e.onClose()}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-close"},null)])])])])])}}});const at=()=>({type:{type:String,default:"link"},visible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>{}},onOk:{type:Function,default:()=>{}}});var ct=(0,l.pM)({props:at(),setup(e){const t=(0,l.WQ)("usedLanguageText"),n=(0,l.WQ)("editorId"),i=(0,l.EW)((()=>{var n,l;switch(e.type){case"link":return null==(n=t.value.linkModalTips)?void 0:n.linkTitle;case"image":return null==(l=t.value.linkModalTips)?void 0:l.imageTitle;default:return""}})),o=(0,X.Kh)({desc:"",url:""});return(0,l.wB)((()=>e.visible),(e=>{e||setTimeout((()=>{o.desc="",o.url=""}),200)})),()=>(0,l.bF)(st,{title:i.value,visible:e.visible,onClose:e.onCancel},{default:()=>{var i,r,s,a,c;return[(0,l.bF)("div",{class:`${se}-form-item`},[(0,l.bF)("label",{class:`${se}-label`,for:`link-desc-${n}`},[null==(i=t.value.linkModalTips)?void 0:i.descLabel]),(0,l.bF)("input",{placeholder:null==(r=t.value.linkModalTips)?void 0:r.descLabelPlaceHolder,class:`${se}-input`,id:`link-desc-${n}`,type:"text",value:o.desc,onChange:e=>{o.desc=e.target.value},autocomplete:"off"},null)]),(0,l.bF)("div",{class:`${se}-form-item`},[(0,l.bF)("label",{class:`${se}-label`,for:`link-url-${n}`},[null==(s=t.value.linkModalTips)?void 0:s.urlLabel]),(0,l.bF)("input",{placeholder:null==(a=t.value.linkModalTips)?void 0:a.urlLabelPlaceHolder,class:`${se}-input`,id:`link-url-${n}`,type:"text",value:o.url,onChange:e=>{o.url=e.target.value},autocomplete:"off"},null)]),(0,l.bF)("div",{class:`${se}-form-item`},[(0,l.bF)("button",{class:[`${se}-btn`,`${se}-btn-row`],type:"button",onClick:()=>{e.onOk(o),o.desc="",o.url=""}},[null==(c=t.value.linkModalTips)?void 0:c.buttonOK])])]}})}});const ut=()=>({visible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>{}},onOk:{type:Function,default:()=>{}}});var dt=(0,l.pM)({props:ut(),setup(e){var t,n;const i=(0,l.WQ)("usedLanguageText"),o=(0,l.WQ)("editorId");let r=null==(n=null==(t=null==we?void 0:we.editorExtensions)?void 0:t.cropper)?void 0:n.instance;const s=(0,X.KR)(),a=(0,X.KR)(),c=(0,X.KR)(),u=(0,X.Kh)({cropperInited:!1,imgSelected:!1,imgSrc:"",isFullscreen:!1});let d=null;(0,l.wB)((()=>e.visible),(()=>{e.visible&&!u.cropperInited&&(r=r||window.Cropper,s.value.onchange=()=>{if(!r)return void Ce.emit(o,"errorCatcher",{name:"Cropper",message:"Cropper is undefined"});const e=s.value.files||[];if(u.imgSelected=!0,(null==e?void 0:e.length)>0){const t=new FileReader;t.onload=e=>{u.imgSrc=e.target.result,(0,l.dY)((()=>{d=new r(a.value,{viewMode:2,preview:`.${se}-clip-preview-target`})}))},t.readAsDataURL(e[0])}})})),(0,l.wB)((()=>[u.imgSelected]),(()=>{c.value.style=""})),(0,l.wB)((()=>u.isFullscreen),(()=>{(0,l.dY)((()=>{null==d||d.destroy(),c.value.style="",a.value&&(d=new r(a.value,{viewMode:2,preview:`.${se}-clip-preview-target`}))}))}));const p=()=>{d.clear(),d.destroy(),d=null,s.value.value="",u.imgSelected=!1};return()=>{var t;return(0,l.bF)(st,{class:`${se}-modal-clip`,title:null==(t=i.value.clipModalTips)?void 0:t.title,visible:e.visible,onClose:e.onCancel,showAdjust:!0,isFullscreen:u.isFullscreen,onAdjust:e=>{u.isFullscreen=e},width:"668px",height:"421px"},{default:()=>{var t,n;return[(0,l.bF)("div",{class:`${se}-form-item ${se}-clip`},[(0,l.bF)("div",{class:`${se}-clip-main`},[u.imgSelected?(0,l.bF)("div",{class:`${se}-clip-cropper`},[(0,l.bF)("img",{src:u.imgSrc,ref:a,style:{display:"none"},alt:""},null),(0,l.bF)("div",{class:`${se}-clip-delete`,onClick:p},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-delete"},null)])])]):(0,l.bF)("div",{class:`${se}-clip-upload`,onClick:()=>{s.value.click()}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-upload"},null)])])]),(0,l.bF)("div",{class:`${se}-clip-preview`},[(0,l.bF)("div",{class:`${se}-clip-preview-target`,ref:c},null)])]),(0,l.bF)("div",{class:`${se}-form-item`},[(0,l.bF)("button",{class:`${se}-btn`,type:"button",onClick:()=>{if(d){const t=d.getCroppedCanvas();Ce.emit(o,"uploadImage",[Le(t.toDataURL("image/png"))],e.onOk),p()}}},[(null==(t=i.value.clipModalTips)?void 0:t.buttonUpload)||(null==(n=i.value.linkModalTips)?void 0:n.buttonOK)])]),(0,l.bF)("input",{ref:s,accept:"image/*",type:"file",multiple:!1,style:{display:"none"}},null)]}})}}});const pt=()=>({type:{type:String,default:"link"},linkVisible:{type:Boolean,default:!1},clipVisible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>{}},onOk:{type:Function,default:()=>{}}});var ht=(0,l.pM)({props:pt(),setup(e){return()=>(0,l.bF)(l.FK,null,[(0,l.bF)(ct,{type:e.type,visible:e.linkVisible,onOk:e.onOk,onCancel:e.onCancel},null),(0,l.bF)(dt,{visible:e.clipVisible,onOk:e.onOk,onCancel:e.onCancel},null)])}});const mt=e=>{var t,n,i,o;const r=(0,l.WQ)("editorId");let s=null==(n=null==(t=we.editorExtensions)?void 0:t.screenfull)?void 0:n.instance;const a=null==(o=null==(i=we.editorExtensions)?void 0:i.screenfull)?void 0:o.js,c=(0,X.KR)(!1),u=e=>{if(s)if(s.isEnabled){c.value=!0;const t=void 0===e?!s.isFullscreen:e;t?s.request():s.exit()}else console.error("browser does not support screenfull!");else Ce.emit(r,"errorCatcher",{name:"fullscreen",message:"fullscreen is undefined"})},d=()=>{s&&s.isEnabled&&s.on("change",(()=>{(c.value||e.setting.fullscreen)&&(c.value=!1,e.updateSetting("fullscreen"))}))},p=()=>{s=window.screenfull,d()};return(0,l.sV)((()=>{if(d(),!s){const e=document.createElement("script");e.src=a||me,e.onload=p,e.id=`${se}-screenfull`,Oe(e,"screenfull")}})),(0,l.sV)((()=>{Ce.on(r,{name:qe,callback:u})})),{fullscreenHandler:u}},gt=()=>({tableShape:{type:Array,default:()=>[6,4]},onSelected:{type:Function,default:()=>{}}}),ft=(0,l.pM)({name:"TableShape",props:gt(),setup(e){const t=(0,X.Kh)({x:-1,y:-1});return()=>(0,l.bF)("div",{class:`${se}-table-shape`,onMouseleave:()=>{t.x=-1,t.y=-1}},[new Array(e.tableShape[1]).fill("").map(((n,i)=>(0,l.bF)("div",{class:`${se}-table-shape-row`,key:`table-shape-row-${i}`},[new Array(e.tableShape[0]).fill("").map(((n,o)=>(0,l.bF)("div",{class:`${se}-table-shape-col`,key:`table-shape-col-${o}`,onMouseenter:()=>{t.x=i,t.y=o},onClick:()=>{e.onSelected(t)}},[(0,l.bF)("div",{class:[`${se}-table-shape-col-default`,i<=t.x&&o<=t.y&&`${se}-table-shape-col-include`]},null)])))])))])}}),vt=()=>({noPrettier:{type:Boolean},toolbars:{type:Array,default:()=>[]},toolbarsExclude:{type:Array,default:()=>[]},setting:{type:Object,default:()=>({})},screenfull:{type:Object,default:null},screenfullJs:{type:String,default:""},updateSetting:{type:Function,default:()=>{}},tableShape:{type:Array,default:()=>[6,4]},defToolbars:{type:Object},noUploadImg:{type:Boolean}});var bt=(0,l.pM)({name:"MDEditorToolbar",props:vt(),setup(e){const t=(0,l.WQ)("editorId"),n=(0,l.WQ)("usedLanguageText"),{fullscreenHandler:i}=mt(e),o=`${t}-toolbar-wrapper`,r=(0,X.Kh)({title:!1,catalog:!1,image:!1,table:!1,mermaid:!1,katex:!1}),s=(e,n)=>{Ce.emit(t,"replace",e,n)},a=(0,X.Kh)({type:"link",linkVisible:!1,clipVisible:!1}),c=(0,X.KR)();(0,l.sV)((()=>{Ce.on(t,{name:"openModals",callback(e){a.type=e,a.linkVisible=!0}})}));const u=(0,l.EW)((()=>{const t=e.toolbars.filter((t=>!e.toolbarsExclude.includes(t))),n=t.indexOf("="),l=-1===n?t:t.slice(0,n+1),i=-1===n?[]:t.slice(n,Number.MAX_SAFE_INTEGER);return[l,i]})),d=(0,X.KR)(),p=()=>{Ce.emit(t,"uploadImage",Array.from(d.value.files||[])),d.value.value=""};(0,l.sV)((()=>{d.value.addEventListener("change",p)}));const h=c=>{var u,p,h,m,g,f,v,b,k,y,w,x,$,C,F,E,S,T,L,z,A,I,_,j,R,D,P,M,O,B,H,K,q,V,U,W,N,Q,Z,G,X,Y,J;if(!ge.includes(c)){if(e.defToolbars instanceof Array){const t=e.defToolbars[c];return t||""}if(e.defToolbars&&e.defToolbars.children instanceof Array){const t=e.defToolbars.children[c];return t||""}return""}switch(c){case"-":return(0,l.bF)(nt,null,null);case"bold":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(u=n.value.toolbarTips)?void 0:u.bold,onClick:()=>{s("bold")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-bold"},null)])]);case"underline":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(p=n.value.toolbarTips)?void 0:p.underline,onClick:()=>{s("underline")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-underline"},null)])]);case"italic":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(h=n.value.toolbarTips)?void 0:h.italic,onClick:()=>{s("italic")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-italic"},null)])]);case"strikeThrough":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(m=n.value.toolbarTips)?void 0:m.strikeThrough,onClick:()=>{s("strikeThrough")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-strike-through"},null)])]);case"title":return(0,l.bF)(ot,{relative:`#${o}`,visible:r.title,onChange:e=>{r.title=e},overlay:(0,l.bF)("ul",{class:`${se}-menu`,onClick:()=>{r.title=!1}},[(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h1")}},[null==(g=n.value.titleItem)?void 0:g.h1]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h2")}},[null==(f=n.value.titleItem)?void 0:f.h2]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h3")}},[null==(v=n.value.titleItem)?void 0:v.h3]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h4")}},[null==(b=n.value.titleItem)?void 0:b.h4]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h5")}},[null==(k=n.value.titleItem)?void 0:k.h5]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h6")}},[null==(y=n.value.titleItem)?void 0:y.h6])])},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.title},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-title"},null)])])]}});case"sub":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(w=n.value.toolbarTips)?void 0:w.sub,onClick:()=>{s("sub")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-sub"},null)])]);case"sup":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(x=n.value.toolbarTips)?void 0:x.sup,onClick:()=>{s("sup")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-sup"},null)])]);case"quote":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==($=n.value.toolbarTips)?void 0:$.quote,onClick:()=>{s("quote")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-quote"},null)])]);case"unorderedList":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(C=n.value.toolbarTips)?void 0:C.unorderedList,onClick:()=>{s("unorderedList")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-unordered-list"},null)])]);case"orderedList":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(F=n.value.toolbarTips)?void 0:F.orderedList,onClick:()=>{s("orderedList")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-ordered-list"},null)])]);case"task":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(E=n.value.toolbarTips)?void 0:E.task,onClick:()=>{s("task")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-task"},null)])]);case"codeRow":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(S=n.value.toolbarTips)?void 0:S.codeRow,onClick:()=>{s("codeRow")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-code-row"},null)])]);case"code":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(T=n.value.toolbarTips)?void 0:T.code,onClick:()=>{s("code")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-code"},null)])]);case"link":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(L=n.value.toolbarTips)?void 0:L.link,onClick:()=>{a.type="link",a.linkVisible=!0}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-link"},null)])]);case"image":return e.noUploadImg?(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(z=n.value.toolbarTips)?void 0:z.image,onClick:()=>{a.type="image",a.linkVisible=!0}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-image"},null)])]):(0,l.bF)(ot,{relative:`#${o}`,visible:r.image,onChange:e=>{r.image=e},overlay:(0,l.bF)("ul",{class:`${se}-menu`,onClick:()=>{r.title=!1}},[(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{a.type="image",a.linkVisible=!0}},[null==(A=n.value.imgTitleItem)?void 0:A.link]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{d.value.click()}},[null==(I=n.value.imgTitleItem)?void 0:I.upload]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{a.clipVisible=!0}},[null==(_=n.value.imgTitleItem)?void 0:_.clip2upload])])},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.image},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-image"},null)])])]}});case"table":return(0,l.bF)(ot,{relative:`#${o}`,visible:r.table,onChange:e=>{r.table=e},key:"bar-table",overlay:(0,l.bF)(ft,{tableShape:e.tableShape,onSelected:e=>{s("table",{selectedShape:e})}},null)},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.table},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-table"},null)])])]}});case"revoke":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(j=n.value.toolbarTips)?void 0:j.revoke,onClick:()=>{Ce.emit(t,"ctrlZ")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-revoke"},null)])]);case"next":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(R=n.value.toolbarTips)?void 0:R.next,onClick:()=>{Ce.emit(t,"ctrlShiftZ")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-next"},null)])]);case"save":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(D=n.value.toolbarTips)?void 0:D.save,onClick:()=>{Ce.emit(t,He)}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-baocun"},null)])]);case"prettier":return e.noPrettier?"":(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(P=n.value.toolbarTips)?void 0:P.prettier,onClick:()=>{s("prettier")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-prettier"},null)])]);case"pageFullscreen":return!e.setting.fullscreen&&(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(M=n.value.toolbarTips)?void 0:M.pageFullscreen,onClick:()=>{e.updateSetting("pageFullscreen")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-"+(e.setting.pageFullscreen?"suoxiao":"fangda")},null)])]);case"fullscreen":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(O=n.value.toolbarTips)?void 0:O.fullscreen,onClick:()=>{i()}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-"+(e.setting.fullscreen?"fullscreen-exit":"fullscreen")},null)])]);case"preview":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(B=n.value.toolbarTips)?void 0:B.preview,onClick:()=>{e.updateSetting("preview")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-preview"},null)])]);case"htmlPreview":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(H=n.value.toolbarTips)?void 0:H.htmlPreview,onClick:()=>{e.updateSetting("htmlPreview")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-coding"},null)])]);case"catalog":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(K=n.value.toolbarTips)?void 0:K.catalog,onClick:()=>{Ce.emit(t,Ke)},key:"bar-catalog"},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-catalog"},null)])]);case"github":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(q=n.value.toolbarTips)?void 0:q.github,onClick:()=>Se("https://github.com/imzbf/md-editor-v3")},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-github"},null)])]);case"mermaid":return(0,l.bF)(ot,{relative:`#${o}`,visible:r.mermaid,onChange:e=>{r.mermaid=e},overlay:(0,l.bF)("ul",{class:`${se}-menu`,onClick:()=>{r.mermaid=!1}},[(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("flow")}},[null==(V=n.value.mermaid)?void 0:V.flow]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("sequence")}},[null==(U=n.value.mermaid)?void 0:U.sequence]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("gantt")}},[null==(W=n.value.mermaid)?void 0:W.gantt]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("class")}},[null==(N=n.value.mermaid)?void 0:N.class]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("state")}},[null==(Q=n.value.mermaid)?void 0:Q.state]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("pie")}},[null==(Z=n.value.mermaid)?void 0:Z.pie]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("relationship")}},[null==(G=n.value.mermaid)?void 0:G.relationship]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("journey")}},[null==(X=n.value.mermaid)?void 0:X.journey])]),key:"bar-mermaid"},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.mermaid},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-mermaid"},null)])])]}});case"katex":return(0,l.bF)(ot,{relative:`#${o}`,visible:r.katex,onChange:e=>{r.katex=e},overlay:(0,l.bF)("ul",{class:`${se}-menu`,onClick:()=>{r.katex=!1}},[(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("katexInline")}},[null==(Y=n.value.katex)?void 0:Y.inline]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("katexBlock")}},[null==(J=n.value.katex)?void 0:J.block])]),key:"bar-katex"},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.katex},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-formula"},null)])])]}})}};return()=>{const t=u.value[0].map((e=>h(e))),n=u.value[1].map((e=>h(e)));return(0,l.bF)(l.FK,null,[e.toolbars.length>0&&(0,l.bF)("div",{class:`${se}-toolbar-wrapper`,id:o},[(0,l.bF)("div",{class:`${se}-toolbar`},[(0,l.bF)("div",{class:`${se}-toolbar-left`,ref:c},[t]),(0,l.bF)("div",{class:`${se}-toolbar-right`},[n])])]),(0,l.bF)("input",{ref:d,accept:"image/*",type:"file",multiple:!0,style:{display:"none"}},null),(0,l.bF)(ht,{linkVisible:a.linkVisible,clipVisible:a.clipVisible,type:a.type,onCancel:()=>{a.linkVisible=!1,a.clipVisible=!1},onOk:e=>{e&&s(a.type,{desc:e.desc,url:e.url}),a.linkVisible=!1,a.clipVisible=!1}},null)])}}});function kt(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let yt=kt();function wt(e){yt=e}const xt=/[&<>"']/,$t=new RegExp(xt.source,"g"),Ct=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ft=new RegExp(Ct.source,"g"),Et={"&":"&","<":"<",">":">",'"':""","'":"'"},St=e=>Et[e];function Tt(e,t){if(t){if(xt.test(e))return e.replace($t,St)}else if(Ct.test(e))return e.replace(Ft,St);return e}const Lt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function zt(e){return e.replace(Lt,((e,t)=>(t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")))}const At=/(^|[^\[])\^/g;function It(e,t){e="string"===typeof e?e:e.source,t=t||"";const n={replace:(t,l)=>(l=l.source||l,l=l.replace(At,"$1"),e=e.replace(t,l),n),getRegex:()=>new RegExp(e,t)};return n}const _t=/[^\w:]/g,jt=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Rt(e,t,n){if(e){let e;try{e=decodeURIComponent(zt(n)).replace(_t,"").toLowerCase()}catch(l){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!jt.test(n)&&(n=Bt(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(l){return null}return n}const Dt={},Pt=/^[^:]+:\/*[^/]*$/,Mt=/^([^:]+:)[\s\S]*$/,Ot=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Bt(e,t){Dt[" "+e]||(Pt.test(e)?Dt[" "+e]=e+"/":Dt[" "+e]=Vt(e,"/",!0)),e=Dt[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(Mt,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(Ot,"$1")+t:e+t}const Ht={exec:function(){}};function Kt(e){let t,n,l=1;for(;l{let l=!1,i=t;while(--i>=0&&"\\"===n[i])l=!l;return l?"|":" |"})),l=n.split(/ \|/);let i=0;if(l[0].trim()||l.shift(),l.length>0&&!l[l.length-1].trim()&&l.pop(),l.length>t)l.splice(t);else while(l.length1)1&t&&(n+=e),t>>=1,e+=e;return n+e}function Qt(e,t,n,l){const i=t.href,o=t.title?Tt(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){l.state.inLink=!0;const e={type:"link",raw:n,href:i,title:o,text:r,tokens:l.inlineTokens(r)};return l.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:o,text:Tt(r)}}function Zt(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const l=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=l.length?e.slice(l.length):e})).join("\n")}class Gt{constructor(e){this.options=e||yt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Vt(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=Zt(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Vt(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,l,i,o,r,s,a,c,u,d,p,h,m=t[1].trim();const g=m.length>1,f={type:"list",raw:"",ordered:g,start:g?+m.slice(0,-1):"",loose:!1,items:[]};m=g?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=g?m:"[*+-]");const v=new RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);while(e){if(h=!1,!(t=v.exec(e)))break;if(this.rules.block.hr.test(e))break;if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(o=2,p=c.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,p=c.slice(o),o+=t[1].length),s=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),h=!0),!h){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),l=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),r=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);while(e){if(d=e.split("\n",1)[0],c=d,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(c))break;if(r.test(c))break;if(t.test(c))break;if(l.test(e))break;if(c.search(/[^ ]/)>=o||!c.trim())p+="\n"+c.slice(o);else{if(s)break;p+="\n"+c}s||c.trim()||(s=!0),n+=d+"\n",e=e.substring(d.length+1)}}f.loose||(a?f.loose=!0:/\n *\n *$/.test(n)&&(a=!0)),this.options.gfm&&(l=/^\[[ xX]\] /.exec(p),l&&(i="[ ] "!==l[0],p=p.replace(/^\[[ xX]\] +/,""))),f.items.push({type:"list_item",raw:n,task:!!l,checked:i,loose:!1,text:p}),f.raw+=n}f.items[f.items.length-1].raw=n.trimRight(),f.items[f.items.length-1].text=p.trimRight(),f.raw=f.raw.trimRight();const b=f.items.length;for(r=0;r"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let n=0;for(const l of t)if("\n"===l&&(n+=1),n>1)return!0;return!1}));!f.loose&&e.length&&t&&(f.loose=!0,f.items[r].loose=!0)}return f}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const n=this.options.sanitizer?this.options.sanitizer(t[0]):Tt(t[0]);e.type="paragraph",e.text=n,e.tokens=this.lexer.inline(n)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",l=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:l}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:qt(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,l,i,o,r=e.align.length;for(n=0;n({text:e})));for(r=e.header.length,l=0;l/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Tt(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=Vt(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=Ut(t[2],"()");if(e>-1){const n=0===t[0].indexOf("!")?5:4,l=n+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],l="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],l=e[3])}else l=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),Qt(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:l?l.replace(this.rules.inline._escapes,"$1"):l},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Qt(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let l=this.rules.inline.emStrong.lDelim.exec(e);if(!l)return;if(l[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=l[1]||l[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=l[0].length-1;let i,o,r=n,s=0;const a="*"===l[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;a.lastIndex=0,t=t.slice(-1*e.length+n);while(null!=(l=a.exec(t))){if(i=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!i)continue;if(o=i.length,l[3]||l[4]){r+=o;continue}if((l[5]||l[6])&&n%3&&!((n+o)%3)){s+=o;continue}if(r-=o,r>0)continue;o=Math.min(o,o+r+s);const t=e.slice(0,n+l.index+(l[0].length-i.length)+o);if(Math.min(n,o)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const a=t.slice(2,-2);return{type:"strong",raw:t,text:a,tokens:this.lexer.inlineTokens(a)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),l=/^ /.test(e)&&/ $/.test(e);return n&&l&&(e=e.substring(1,e.length-1)),e=Tt(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,l;return"@"===n[2]?(e=Tt(this.options.mangle?t(n[1]):n[1]),l="mailto:"+e):(e=Tt(n[1]),l=e),{type:"link",raw:n[0],text:e,href:l,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,l;if("@"===n[2])e=Tt(this.options.mangle?t(n[0]):n[0]),l="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=Tt(n[0]),l="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:l,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Tt(n[0]):n[0]:Tt(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const Xt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ht,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Xt.def=It(Xt.def).replace("label",Xt._label).replace("title",Xt._title).getRegex(),Xt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Xt.listItemStart=It(/^( *)(bull) */).replace("bull",Xt.bullet).getRegex(),Xt.list=It(Xt.list).replace(/bull/g,Xt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Xt.def.source+")").getRegex(),Xt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xt._comment=/|$)/,Xt.html=It(Xt.html,"i").replace("comment",Xt._comment).replace("tag",Xt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xt.paragraph=It(Xt._paragraph).replace("hr",Xt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt._tag).getRegex(),Xt.blockquote=It(Xt.blockquote).replace("paragraph",Xt.paragraph).getRegex(),Xt.normal=Kt({},Xt),Xt.gfm=Kt({},Xt.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Xt.gfm.table=It(Xt.gfm.table).replace("hr",Xt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt._tag).getRegex(),Xt.gfm.paragraph=It(Xt._paragraph).replace("hr",Xt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Xt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt._tag).getRegex(),Xt.pedantic=Kt({},Xt.normal,{html:It("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Xt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ht,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:It(Xt.normal._paragraph).replace("hr",Xt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Xt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Yt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ht,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ht,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),l+=""+n+";";return l}Yt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Yt.punctuation=It(Yt.punctuation).replace(/punctuation/g,Yt._punctuation).getRegex(),Yt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Yt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Yt._comment=It(Xt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Yt.emStrong.lDelim=It(Yt.emStrong.lDelim).replace(/punct/g,Yt._punctuation).getRegex(),Yt.emStrong.rDelimAst=It(Yt.emStrong.rDelimAst,"g").replace(/punct/g,Yt._punctuation).getRegex(),Yt.emStrong.rDelimUnd=It(Yt.emStrong.rDelimUnd,"g").replace(/punct/g,Yt._punctuation).getRegex(),Yt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Yt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Yt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Yt.autolink=It(Yt.autolink).replace("scheme",Yt._scheme).replace("email",Yt._email).getRegex(),Yt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Yt.tag=It(Yt.tag).replace("comment",Yt._comment).replace("attribute",Yt._attribute).getRegex(),Yt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Yt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Yt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Yt.link=It(Yt.link).replace("label",Yt._label).replace("href",Yt._href).replace("title",Yt._title).getRegex(),Yt.reflink=It(Yt.reflink).replace("label",Yt._label).replace("ref",Xt._label).getRegex(),Yt.nolink=It(Yt.nolink).replace("ref",Xt._label).getRegex(),Yt.reflinkSearch=It(Yt.reflinkSearch,"g").replace("reflink",Yt.reflink).replace("nolink",Yt.nolink).getRegex(),Yt.normal=Kt({},Yt),Yt.pedantic=Kt({},Yt.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:It(/^!?\[(label)\]\((.*?)\)/).replace("label",Yt._label).getRegex(),reflink:It(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yt._label).getRegex()}),Yt.gfm=Kt({},Yt.normal,{escape:It(Yt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));while(e)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((l=>!!(n=l.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),l=t[t.length-1],!l||"paragraph"!==l.type&&"text"!==l.type?t.push(n):(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=l.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),l=t[t.length-1],!l||"paragraph"!==l.type&&"text"!==l.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(l.raw+="\n"+n.raw,l.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=l.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let l;this.options.extensions.startBlock.forEach((function(e){l=e.call({lexer:this},n),"number"===typeof l&&l>=0&&(t=Math.min(t,l))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))l=t[t.length-1],o&&"paragraph"===l.type?(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):t.push(n),o=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),l=t[t.length-1],l&&"text"===l.type?(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,l,i,o,r,s,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)while(null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(a)))e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+Nt("a",o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(o=this.tokenizer.rules.inline.blockSkip.exec(a)))a=a.slice(0,o.index)+"["+Nt("a",o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(a)))a=a.slice(0,o.index+o[0].length-2)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;while(e)if(r||(s=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((l=>!!(n=l.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),l=t[t.length-1],l&&"text"===n.type&&"text"===l.type?(l.raw+=n.raw,l.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),l=t[t.length-1],l&&"text"===n.type&&"text"===l.type?(l.raw+=n.raw,l.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,s))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,en))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,en))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let l;this.options.extensions.startInline.forEach((function(e){l=e.call({lexer:this},n),"number"===typeof l&&l>=0&&(t=Math.min(t,l))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,Jt))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),r=!0,l=t[t.length-1],l&&"text"===l.type?(l.raw+=n.raw,l.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class nn{constructor(e){this.options=e||yt}code(e,t,n){const l=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,l);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",l?''+(n?e:Tt(e,!0))+"
\n":""+(n?e:Tt(e,!0))+"
\n"}blockquote(e){return`\n${e} \n`}html(e){return e}heading(e,t,n,l){if(this.options.headerIds){const i=this.options.headerPrefix+l.slug(n);return`${e} \n`}return`${e} \n`}hr(){return this.options.xhtml?" \n":" \n"}list(e,t,n){const l=t?"ol":"ul",i=t&&1!==n?' start="'+n+'"':"";return"<"+l+i+">\n"+e+""+l+">\n"}listitem(e){return`${e} \n`}checkbox(e){return" "}paragraph(e){return`${e}
\n`}table(e,t){return t&&(t=`${t} `),"\n"}tablerow(e){return`\n${e} \n`}tablecell(e,t){const n=t.header?"th":"td",l=t.align?`<${n} align="${t.align}">`:`<${n}>`;return l+e+`${n}>\n`}strong(e){return`${e} `}em(e){return`${e} `}codespan(e){return`${e}
`}br(){return this.options.xhtml?" ":" "}del(e){return`${e}`}link(e,t,n){if(e=Rt(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let l='"+n+" ",l}image(e,t,n){if(e=Rt(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let l=` ":">",l}text(e){return e}}class ln{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class on{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,l=0;if(this.seen.hasOwnProperty(n)){l=this.seen[e];do{l++,n=e+"-"+l}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=l,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class rn{constructor(e){this.options=e||yt,this.options.renderer=this.options.renderer||new nn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ln,this.slugger=new on}static parse(e,t){const n=new rn(t);return n.parse(e)}static parseInline(e,t){const n=new rn(t);return n.parseInline(e)}parse(e,t=!0){let n,l,i,o,r,s,a,c,u,d,p,h,m,g,f,v,b,k,y,w="";const x=e.length;for(n=0;n0&&"paragraph"===f.tokens[0].type?(f.tokens[0].text=k+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&"text"===f.tokens[0].tokens[0].type&&(f.tokens[0].tokens[0].text=k+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:k}):g+=k),g+=this.parse(f.tokens,m),u+=this.renderer.listitem(g,b,v);w+=this.renderer.list(u,p,h);continue;case"html":w+=this.renderer.html(d.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":u=d.tokens?this.parseInline(d.tokens):d.text;while(n+1{l(e.text,e.lang,(function(t,n){if(t)return r(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),s--,0===s&&r()}))}),0))})),void(0===s&&r())}function l(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"An error occurred:
"+Tt(e.message+"",!0)+" ";throw e}try{const n=tn.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(sn.walkTokens(n,t.walkTokens)).then((()=>rn.parse(n,t))).catch(l);sn.walkTokens(n,t.walkTokens)}return rn.parse(n,t)}catch(i){l(i)}}sn.options=sn.setOptions=function(e){return Kt(sn.defaults,e),wt(sn.defaults),sn},sn.getDefaults=kt,sn.defaults=yt,sn.use=function(...e){const t=sn.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const n=Kt({},e);if(n.async=sn.defaults.async||n.async,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let l=e.renderer.apply(this,t);return!1===l&&(l=n.apply(this,t)),l}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=sn.defaults.renderer||new nn;for(const n in e.renderer){const l=t[n];t[n]=(...i)=>{let o=e.renderer[n].apply(t,i);return!1===o&&(o=l.apply(t,i)),o}}n.renderer=t}if(e.tokenizer){const t=sn.defaults.tokenizer||new Gt;for(const n in e.tokenizer){const l=t[n];t[n]=(...i)=>{let o=e.tokenizer[n].apply(t,i);return!1===o&&(o=l.apply(t,i)),o}}n.tokenizer=t}if(e.walkTokens){const t=sn.defaults.walkTokens;n.walkTokens=function(n){let l=[];return l.push(e.walkTokens.call(this,n)),t&&(l=l.concat(t.call(this,n))),l}}sn.setOptions(n)}))},sn.walkTokens=function(e,t){let n=[];for(const l of e)switch(n=n.concat(t.call(sn,l)),l.type){case"table":for(const e of l.header)n=n.concat(sn.walkTokens(e.tokens,t));for(const e of l.rows)for(const l of e)n=n.concat(sn.walkTokens(l.tokens,t));break;case"list":n=n.concat(sn.walkTokens(l.items,t));break;default:sn.defaults.extensions&&sn.defaults.extensions.childTokens&&sn.defaults.extensions.childTokens[l.type]?sn.defaults.extensions.childTokens[l.type].forEach((function(e){n=n.concat(sn.walkTokens(l[e],t))})):l.tokens&&(n=n.concat(sn.walkTokens(l.tokens,t)))}return n},sn.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Kt({},sn.defaults,t||{}),Wt(t);try{const n=tn.lexInline(e,t);return t.walkTokens&&sn.walkTokens(n,t.walkTokens),rn.parseInline(n,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"An error occurred:
"+Tt(n.message+"",!0)+" ";throw n}},sn.Parser=rn,sn.parser=rn.parse,sn.Renderer=nn,sn.TextRenderer=ln,sn.Lexer=tn,sn.lexer=tn.lex,sn.Tokenizer=Gt,sn.Slugger=on,sn.parse=sn,rn.parse,tn.lex;var an=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],l=0;l1&&void 0!==arguments[1]?arguments[1]:{},l=window.Promise||function(e){function t(){}e(t,t)},i=function(e){var t=e.target;t!==F?-1!==k.indexOf(t)&&g({target:t}):m()},o=function(){if(!w&&C.original){var e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(x-e)>$.scrollOffset&&setTimeout(m,150)}},r=function(e){var t=e.key||e.keyCode;"Escape"!==t&&"Esc"!==t&&27!==t||m()},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e;if(e.background&&(F.style.background=e.background),e.container&&e.container instanceof Object&&(t.container=gn({},$.container,e.container)),e.template){var n=bn(e.template)?e.template:document.querySelector(e.template);t.template=n}return $=gn({},$,t),k.forEach((function(e){e.dispatchEvent($n("medium-zoom:update",{detail:{zoom:E}}))})),E},a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e(gn({},$,t))},c=function(){for(var e=arguments.length,t=Array(e),n=0;n0?t.reduce((function(e,t){return[].concat(e,yn(t))}),[]):k;return l.forEach((function(e){e.classList.remove("medium-zoom-image"),e.dispatchEvent($n("medium-zoom:detach",{detail:{zoom:E}}))})),k=k.filter((function(e){return-1===l.indexOf(e)})),E},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k.forEach((function(l){l.addEventListener("medium-zoom:"+e,t,n)})),y.push({type:"medium-zoom:"+e,listener:t,options:n}),E},p=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k.forEach((function(l){l.removeEventListener("medium-zoom:"+e,t,n)})),y=y.filter((function(n){return!(n.type==="medium-zoom:"+e&&n.listener.toString()===t.toString())})),E},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target,n=function(){var e={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},t=void 0,n=void 0;if($.container)if($.container instanceof Object)e=gn({},e,$.container),t=e.width-e.left-e.right-2*$.margin,n=e.height-e.top-e.bottom-2*$.margin;else{var l=bn($.container)?$.container:document.querySelector($.container),i=l.getBoundingClientRect(),o=i.width,r=i.height,s=i.left,a=i.top;e=gn({},e,{width:o,height:r,left:s,top:a})}t=t||e.width-2*$.margin,n=n||e.height-2*$.margin;var c=C.zoomedHd||C.original,u=kn(c)?t:c.naturalWidth||t,d=kn(c)?n:c.naturalHeight||n,p=c.getBoundingClientRect(),h=p.top,m=p.left,g=p.width,f=p.height,v=Math.min(Math.max(g,u),t)/g,b=Math.min(Math.max(f,d),n)/f,k=Math.min(v,b),y=((t-g)/2-m+$.margin+e.left)/k,w=((n-f)/2-h+$.margin+e.top)/k,x="scale("+k+") translate3d("+y+"px, "+w+"px, 0)";C.zoomed.style.transform=x,C.zoomedHd&&(C.zoomedHd.style.transform=x)};return new l((function(e){if(t&&-1===k.indexOf(t))e(E);else{var l=function t(){w=!1,C.zoomed.removeEventListener("transitionend",t),C.original.dispatchEvent($n("medium-zoom:opened",{detail:{zoom:E}})),e(E)};if(C.zoomed)e(E);else{if(t)C.original=t;else{if(!(k.length>0))return void e(E);var i=k;C.original=i[0]}if(C.original.dispatchEvent($n("medium-zoom:open",{detail:{zoom:E}})),x=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,w=!0,C.zoomed=xn(C.original),document.body.appendChild(F),$.template){var o=bn($.template)?$.template:document.querySelector($.template);C.template=document.createElement("div"),C.template.appendChild(o.content.cloneNode(!0)),document.body.appendChild(C.template)}if(C.original.parentElement&&"PICTURE"===C.original.parentElement.tagName&&C.original.currentSrc&&(C.zoomed.src=C.original.currentSrc),document.body.appendChild(C.zoomed),window.requestAnimationFrame((function(){document.body.classList.add("medium-zoom--opened")})),C.original.classList.add("medium-zoom-image--hidden"),C.zoomed.classList.add("medium-zoom-image--opened"),C.zoomed.addEventListener("click",m),C.zoomed.addEventListener("transitionend",l),C.original.getAttribute("data-zoom-src")){C.zoomedHd=C.zoomed.cloneNode(),C.zoomedHd.removeAttribute("srcset"),C.zoomedHd.removeAttribute("sizes"),C.zoomedHd.removeAttribute("loading"),C.zoomedHd.src=C.zoomed.getAttribute("data-zoom-src"),C.zoomedHd.onerror=function(){clearInterval(r),console.warn("Unable to reach the zoom image target "+C.zoomedHd.src),C.zoomedHd=null,n()};var r=setInterval((function(){C.zoomedHd.complete&&(clearInterval(r),C.zoomedHd.classList.add("medium-zoom-image--opened"),C.zoomedHd.addEventListener("click",m),document.body.appendChild(C.zoomedHd),n())}),10)}else if(C.original.hasAttribute("srcset")){C.zoomedHd=C.zoomed.cloneNode(),C.zoomedHd.removeAttribute("sizes"),C.zoomedHd.removeAttribute("loading");var s=C.zoomedHd.addEventListener("load",(function(){C.zoomedHd.removeEventListener("load",s),C.zoomedHd.classList.add("medium-zoom-image--opened"),C.zoomedHd.addEventListener("click",m),document.body.appendChild(C.zoomedHd),n()}))}else n()}}}))},m=function(){return new l((function(e){if(!w&&C.original){var t=function t(){C.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(C.zoomed),C.zoomedHd&&document.body.removeChild(C.zoomedHd),document.body.removeChild(F),C.zoomed.classList.remove("medium-zoom-image--opened"),C.template&&document.body.removeChild(C.template),w=!1,C.zoomed.removeEventListener("transitionend",t),C.original.dispatchEvent($n("medium-zoom:closed",{detail:{zoom:E}})),C.original=null,C.zoomed=null,C.zoomedHd=null,C.template=null,e(E)};w=!0,document.body.classList.remove("medium-zoom--opened"),C.zoomed.style.transform="",C.zoomedHd&&(C.zoomedHd.style.transform=""),C.template&&(C.template.style.transition="opacity 150ms",C.template.style.opacity=0),C.original.dispatchEvent($n("medium-zoom:close",{detail:{zoom:E}})),C.zoomed.addEventListener("transitionend",t)}else e(E)}))},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target;return C.original?m():h({target:t})},f=function(){return $},v=function(){return k},b=function(){return C.original},k=[],y=[],w=!1,x=0,$=n,C={original:null,zoomed:null,zoomedHd:null,template:null};"[object Object]"===Object.prototype.toString.call(t)?$=t:(t||"string"===typeof t)&&c(t),$=gn({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},$);var F=wn($.background);document.addEventListener("click",i),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",m);var E={open:h,close:m,toggle:g,update:s,clone:a,attach:c,detach:u,on:d,off:p,getOptions:f,getImages:v,getZoomedImage:b};return E};
+"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[29],{29:function(e,t,n){n.r(t),n.d(t,{default:function(){return yl}});var l=n(6768),i=n(5130),o=n(4232);const r={class:"submit-page"},s={key:0,class:"course-selector-modal"},a={class:"modal-container"},c={class:"modal-header"},u={class:"modal-body"},d={class:"search-bar"},p={class:"course-results"},h={key:0,class:"course-loading"},m={key:1,class:"search-error"},g={key:2,class:"no-results"},f={key:3,class:"course-table"},v=["onClick"],b=["checked","onClick"],k={class:"rating"},y={class:"rating-count"},w={key:4,class:"pagination"},x=["disabled"],$={class:"page-info"},C=["disabled"],F={class:"modal-footer"},E=["disabled"],S={class:"container"},T={class:"page-header"},L={class:"submission-form"},z={class:"form-section"},A={class:"form-group"},I={for:"title"},_={class:"form-group"},j={class:"form-group"},R={class:"form-section"},D={class:"upload-area"},P={class:"file-input-container"},M={key:0,class:"file-list"},O={class:"file-name"},B={class:"file-size"},H={class:"total-size"},K={class:"form-section"},q={class:"section-desc",style:{color:"purple"}},V={"data-v-bcfef25c":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round",width:"20",height:"24","stroke-width":"1.1",style:{"vertical-align":"middle",display:"inline-block","margin-bottom":"2px"}},U={key:0,class:"section-desc",style:{color:"red"}},W={class:"editor-container"},N={class:"draft-actions"},Q={class:"form-actions"};function Z(e,t,n,Z,G,X){const Y=(0,l.g2)("Navbar"),J=(0,l.g2)("Loading"),ee=(0,l.g2)("MdEditor");return(0,l.uX)(),(0,l.CE)("div",r,[(0,l.bF)(Y),(0,l.bF)(J,{visible:G.isLoading,text:G.loadingText},null,8,["visible","text"]),G.showCourseSelector?((0,l.uX)(),(0,l.CE)("div",s,[(0,l.Lk)("div",{class:"modal-overlay",onClick:t[0]||(t[0]=(...e)=>X.closeCourseSelector&&X.closeCourseSelector(...e))}),(0,l.Lk)("div",a,[(0,l.Lk)("div",c,[t[19]||(t[19]=(0,l.Lk)("h3",null,"选择课程",-1)),(0,l.Lk)("button",{class:"close-btn",onClick:t[1]||(t[1]=(...e)=>X.closeCourseSelector&&X.closeCourseSelector(...e))},"×")]),(0,l.Lk)("div",u,[(0,l.Lk)("div",d,[(0,l.bo)((0,l.Lk)("input",{type:"text","onUpdate:modelValue":t[2]||(t[2]=e=>G.courseSearch=e),placeholder:"请输入课程名称",class:"search-input",onKeyup:t[3]||(t[3]=(0,i.jR)(((...e)=>X.searchCourses&&X.searchCourses(...e)),["enter"]))},null,544),[[i.Jo,G.courseSearch]]),(0,l.Lk)("button",{class:"search-btn",onClick:t[4]||(t[4]=(...e)=>X.searchCourses&&X.searchCourses(...e))},"搜索")]),(0,l.Lk)("div",p,[G.searchLoading?((0,l.uX)(),(0,l.CE)("div",h,t[20]||(t[20]=[(0,l.Lk)("div",{class:"spinner"},null,-1),(0,l.Lk)("span",null,"搜索中...",-1)]))):G.searchError?((0,l.uX)(),(0,l.CE)("div",m,(0,o.v_)(G.searchError),1)):0===G.courseResults.length?((0,l.uX)(),(0,l.CE)("div",g," 未找到相关课程 ")):((0,l.uX)(),(0,l.CE)("table",f,[t[21]||(t[21]=(0,l.Lk)("thead",null,[(0,l.Lk)("tr",null,[(0,l.Lk)("th",null,"选择"),(0,l.Lk)("th",null,"课程名称"),(0,l.Lk)("th",null,"课程类别"),(0,l.Lk)("th",null,"授课教师"),(0,l.Lk)("th",null,"评分")])],-1)),(0,l.Lk)("tbody",null,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(G.courseResults,(e=>((0,l.uX)(),(0,l.CE)("tr",{key:e.course_id,onClick:t=>X.selectCourse(e),class:(0,o.C4)({selected:G.selectedCourse&&G.selectedCourse.course_id===e.course_id})},[(0,l.Lk)("td",null,[(0,l.Lk)("input",{type:"radio",checked:G.selectedCourse&&G.selectedCourse.course_id===e.course_id,onClick:(0,i.D$)((t=>X.selectCourse(e)),["stop"])},null,8,b)]),(0,l.Lk)("td",null,(0,o.v_)(e.course_name),1),(0,l.Lk)("td",null,(0,o.v_)(X.getCategoryName(e.category_id)),1),(0,l.Lk)("td",null,(0,o.v_)(e.teachers),1),(0,l.Lk)("td",null,[(0,l.Lk)("span",k,(0,o.v_)(e.rating),1),(0,l.Lk)("span",y,"("+(0,o.v_)(e.rating_count)+"人评)",1)])],10,v)))),128))])])),G.totalPages>1?((0,l.uX)(),(0,l.CE)("div",w,[(0,l.Lk)("button",{class:"page-btn",disabled:1===G.currentPage,onClick:t[5]||(t[5]=e=>X.changePage(G.currentPage-1))}," 上一页 ",8,x),(0,l.Lk)("span",$,"第 "+(0,o.v_)(G.currentPage)+" / "+(0,o.v_)(G.totalPages)+" 页",1),(0,l.Lk)("button",{class:"page-btn",disabled:G.currentPage===G.totalPages,onClick:t[6]||(t[6]=e=>X.changePage(G.currentPage+1))}," 下一页 ",8,C)])):(0,l.Q3)("",!0)])]),(0,l.Lk)("div",F,[(0,l.Lk)("button",{class:"btn btn-secondary",onClick:t[7]||(t[7]=(...e)=>X.closeCourseSelector&&X.closeCourseSelector(...e))}," 取消 "),(0,l.Lk)("button",{class:"btn btn-primary",onClick:t[8]||(t[8]=(...e)=>X.confirmCourseSelection&&X.confirmCourseSelection(...e)),disabled:!G.selectedCourse}," 确定 ",8,E)])])])):(0,l.Q3)("",!0),(0,l.Lk)("div",S,[(0,l.Lk)("div",T,[(0,l.Lk)("h1",null,(0,o.v_)(G.isEditMode?"编辑投稿内容":"内容投稿"),1),t[22]||(t[22]=(0,l.Lk)("p",{class:"sub-title"},"感谢您分享您的学习资源或独到见解!",-1))]),(0,l.Lk)("div",L,[(0,l.Lk)("div",z,[(0,l.Lk)("div",A,[(0,l.Lk)("label",I,"标题 "+(0,o.v_)(G.isEditMode?"(如需更改标题,请不要更改【edit】前缀)":""),1),(0,l.bo)((0,l.Lk)("input",{type:"text",id:"title","onUpdate:modelValue":t[9]||(t[9]=e=>G.formData.title=e),class:"form-control",placeholder:"请输入投稿标题",maxlength:"50"},null,512),[[i.Jo,G.formData.title]])]),(0,l.Lk)("div",_,[t[24]||(t[24]=(0,l.Lk)("label",{for:"section"},"板块",-1)),(0,l.bo)((0,l.Lk)("select",{id:"section","onUpdate:modelValue":t[10]||(t[10]=e=>G.formData.section=e),class:"form-control"},t[23]||(t[23]=[(0,l.Lk)("option",{value:"",disabled:""},"请选择板块",-1),(0,l.Lk)("option",{value:"攻略指南"},"攻略指南",-1),(0,l.Lk)("option",{value:"资源共享"},"资源共享",-1)]),512),[[i.u1,G.formData.section]])]),(0,l.Lk)("div",j,[t[25]||(t[25]=(0,l.Lk)("label",{for:"note"},"备注信息 (选填)",-1)),(0,l.bo)((0,l.Lk)("input",{type:"text",id:"note","onUpdate:modelValue":t[11]||(t[11]=e=>G.formData.note=e),class:"form-control",placeholder:"可添加备注信息"},null,512),[[i.Jo,G.formData.note]])])]),(0,l.Lk)("div",R,[t[28]||(t[28]=(0,l.Lk)("h3",null,"附件上传",-1)),t[29]||(t[29]=(0,l.Lk)("p",{class:"section-desc"},"您可以上传最多10个文件,总大小不超过200MB。如果有压缩包,只允许上传此压缩文件。",-1)),(0,l.Lk)("div",D,[(0,l.Lk)("div",P,[t[26]||(t[26]=(0,l.Lk)("label",{for:"filePicker",class:"upload-label"},[(0,l.Lk)("span",{class:"upload-icon"},"📎"),(0,l.Lk)("span",null,"选择文件")],-1)),(0,l.Lk)("input",{type:"file",id:"filePicker",ref:"filePicker",onChange:t[12]||(t[12]=(...e)=>X.validateFiles&&X.validateFiles(...e)),multiple:"",class:"file-input"},null,544)]),G.selectedFiles.length>0?((0,l.uX)(),(0,l.CE)("div",M,[t[27]||(t[27]=(0,l.Lk)("h4",null,"已选择的文件:",-1)),(0,l.Lk)("ul",null,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(G.selectedFiles,((e,t)=>((0,l.uX)(),(0,l.CE)("li",{key:t},[(0,l.Lk)("span",O,(0,o.v_)(e.name),1),(0,l.Lk)("span",B,"("+(0,o.v_)(X.formatFileSize(e.size))+")",1)])))),128))]),(0,l.Lk)("p",H,"总大小: "+(0,o.v_)(X.formatFileSize(G.totalFileSize)),1)])):(0,l.Q3)("",!0)])]),(0,l.Lk)("div",K,[t[36]||(t[36]=(0,l.Lk)("h3",null,"内容编辑",-1)),t[37]||(t[37]=(0,l.Lk)("p",{class:"section-desc"},'此部分主要用于"攻略指南"板块,"资源共享"板块可以留空。',-1)),t[38]||(t[38]=(0,l.Lk)("p",{class:"section-desc"},"使用Markdown语法编辑您的投稿内容。插入图片后,如需修改图片大小,请在编辑器中找到插入的图片标签,修改其width属性。",-1)),t[39]||(t[39]=(0,l.Lk)("p",{class:"section-desc"},[(0,l.eW)("如上传了附件且需在文中指定位置展示,"),(0,l.Lk)("strong",null,"可以用[附件名]来表示附件位置"),(0,l.eW)("。如不指定,则审核人员将按照文章内容在适当位置展示。")],-1)),t[40]||(t[40]=(0,l.Lk)("p",{class:"section-desc"},[(0,l.Lk)("strong",null,"草稿功能和文章页预览只针对此部分内容,上传的附件等将不会保存并不支持文章页预览。")],-1)),(0,l.Lk)("p",q,[t[31]||(t[31]=(0,l.eW)("您可以轻松地插入课程卡片(点击")),((0,l.uX)(),(0,l.CE)("svg",V,t[30]||(t[30]=[(0,l.Lk)("path",{"data-v-bcfef25c":"",d:"M22 9l-10 -4l-10 4l10 4l10 -4v6"},null,-1),(0,l.Lk)("path",{"data-v-bcfef25c":"",d:"M6 10.6v5.4a6 3 0 0 0 12 0v-5.4"},null,-1)]))),t[32]||(t[32]=(0,l.eW)("按钮),引用课程评分系统中的课程数据。")),t[33]||(t[33]=(0,l.Lk)("strong",null,"注意:由于网站的安全设置,课程卡片前必须有其他内容,请勿在内容第一行插入课程卡片,否则将无法正常显示!",-1))]),G.isEditMode?((0,l.uX)(),(0,l.CE)("p",U,t[34]||(t[34]=[(0,l.Lk)("strong",null,"检测到您当前正在编辑已有的投稿内容,请注意您之前如有其他投稿的草稿内容,这些内容在此页面保存草稿或提交编辑后将不会保留。",-1)]))):(0,l.Q3)("",!0),(0,l.Lk)("div",W,[(0,l.bF)(ee,{modelValue:G.formData.content,"onUpdate:modelValue":t[14]||(t[14]=e=>G.formData.content=e),ref:"markdownEditor",theme:G.editorTheme,toolbars:G.editorToolbars,language:"zh-CN","preview-theme":"github",placeholder:G.editorPlaceholder,onOnUploadImg:X.handleImageUpload},{defToolbars:(0,l.k6)((()=>[(0,l.Lk)("span",{class:"md-editor-toolbar-item",title:"添加课程卡片",onClick:t[13]||(t[13]=(...e)=>X.chooseCourse&&X.chooseCourse(...e))},t[35]||(t[35]=[(0,l.Lk)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",width:"20",height:"24","stroke-width":"1.1"},[(0,l.Lk)("path",{d:"M22 9l-10 -4l-10 4l10 4l10 -4v6"}),(0,l.Lk)("path",{d:"M6 10.6v5.4a6 3 0 0 0 12 0v-5.4"})],-1)]))])),_:1},8,["modelValue","theme","toolbars","placeholder","onOnUploadImg"])]),(0,l.Lk)("div",N,[(0,l.Lk)("button",{type:"button",class:"btn btn-secondary",onClick:t[15]||(t[15]=(...e)=>X.loadDraft&&X.loadDraft(...e))}," 加载草稿 "),(0,l.Lk)("button",{type:"button",class:"btn btn-secondary",onClick:t[16]||(t[16]=(...e)=>X.saveDraftWithConfirm&&X.saveDraftWithConfirm(...e))}," 保存草稿 "),(0,l.Lk)("button",{type:"button",class:"btn btn-secondary preview-btn",onClick:t[17]||(t[17]=(...e)=>X.previewDraft&&X.previewDraft(...e))}," 在文章页中预览 ")])]),(0,l.Lk)("div",Q,[(0,l.Lk)("button",{type:"button",class:"btn btn-primary",onClick:t[18]||(t[18]=(...e)=>X.submitForm&&X.submitForm(...e))},(0,o.v_)(G.isEditMode?"提交编辑":"提交投稿"),1)])])])])}n(4114),n(8111),n(1701);var G=n(4440),X=(n(1148),n(2489),n(7588),n(8237),n(3579),n(4979),n(144)),Y=Object.defineProperty,J=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ie=(e,t,n)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))ne.call(t,n)&&ie(e,n,t[n]);if(te)for(var n of te(t))le.call(t,n)&&ie(e,n,t[n]);return e},re=(e,t)=>J(e,ee(t));const se="md-editor",ae="md-editor-v3",ce="https://at.alicdn.com/t/c/font_2605852_u82y61ve02.js",ue="https://cdnjs.cloudflare.com/ajax/libs",de=`${ue}/highlight.js/11.7.0/highlight.min.js`,pe={main:`${ue}/prettier/2.8.0/standalone.js`,markdown:`${ue}/prettier/2.8.0/parser-markdown.js`},he={css:`${ue}/cropperjs/1.5.13/cropper.min.css`,js:`${ue}/cropperjs/1.5.13/cropper.min.js`},me=`${ue}/screenfull.js/5.2.0/screenfull.min.js`,ge=["bold","underline","italic","strikeThrough","-","title","sub","sup","quote","unorderedList","orderedList","task","-","codeRow","code","link","image","table","mermaid","katex","-","revoke","next","save","=","prettier","pageFullscreen","fullscreen","preview","htmlPreview","catalog","github"],fe=["markdownTotal","=","scrollSwitch"],ve={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Img Link",upload:"Upload Img",clip2upload:"Clip Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Word Count",scrollAuto:"Scroll Auto"}}},be=`${ue}/mermaid/9.4.0/mermaid.min.js`,ke={js:`${ue}/KaTeX/0.16.3/katex.min.js`,css:`${ue}/KaTeX/0.16.3/katex.min.css`},ye={a11y:{light:`${ue}/highlight.js/11.7.0/styles/a11y-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/a11y-dark.min.css`},atom:{light:`${ue}/highlight.js/11.7.0/styles/atom-one-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/atom-one-dark.min.css`},github:{light:`${ue}/highlight.js/11.7.0/styles/github.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/github-dark.min.css`},gradient:{light:`${ue}/highlight.js/11.7.0/styles/gradient-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/gradient-dark.min.css`},kimbie:{light:`${ue}/highlight.js/11.7.0/styles/kimbie-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/kimbie-dark.min.css`},paraiso:{light:`${ue}/highlight.js/11.7.0/styles/paraiso-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/paraiso-dark.min.css`},qtcreator:{light:`${ue}/highlight.js/11.7.0/styles/qtcreator-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${ue}/highlight.js/11.7.0/styles/stackoverflow-light.min.css`,dark:`${ue}/highlight.js/11.7.0/styles/stackoverflow-dark.min.css`}},we={markedRenderer:e=>e,markedExtensions:[],markedOptions:{},editorExtensions:{},editorConfig:{}},xe=e=>{if(e)for(const t in e){const n=e[t];n&&(we[t]=n)}};class $e{constructor(){this.pools={}}remove(e,t,n){const l=this.pools[e],i=l&&this.pools[e][t];i&&(this.pools[e][t]=i.filter((e=>e!==n)))}clear(e){this.pools[e]={}}on(e,t){return this.pools[e]||(this.pools[e]={}),this.pools[e][t.name]||(this.pools[e][t.name]=[]),this.pools[e][t.name].push(t.callback),this.pools[e][t.name].includes(t.callback)}emit(e,t,...n){this.pools[e]||(this.pools[e]={});const l=this.pools[e],i=l[t];i&&i.forEach((e=>{try{e(...n)}catch(l){console.error(`${t} monitor event exception!`,l)}}))}}var Ce=new $e;const Fe=(e,t=0,n=t)=>new Promise(((l,i)=>{e.setSelectionRange?setTimeout((()=>{e.setSelectionRange(t,n),e.focus(),l(!0)}),0):(console.error("Can not reset position!"),i())})),Ee=(e,t,n)=>{const{deviationStart:l=0,deviationEnd:i=0,direct:o=!1,select:r=!1}=n;let s="";if(e.selectionStart||0===e.selectionStart){const o=e.selectionStart,a=e.selectionEnd||0,{prefixVal:c=e.value.substring(0,o),subfixVal:u=e.value.substring(a,e.value.length)}=n;s=c+t+u,Fe(e,r?o+l:o+t.length+i,o+t.length+i)}else s+=t;return o&&(e.value=s),s},Se=(e,t={newWindow:!0,nofollow:!0})=>{e||console.error("error link!");const n=document.createElement("a");n.href=e,n.style.display="none",t.newWindow&&(n.target="_blank"),t.nofollow&&(n.rel="noopener noreferrer"),document.body.appendChild(n),n.click(),document.body.removeChild(n)},Te=(e,t)=>{const n=Ae((()=>{e.removeEventListener("scroll",l),e.addEventListener("scroll",l),t.removeEventListener("scroll",l),t.addEventListener("scroll",l)}),50),l=i=>{const o=e.clientHeight,r=t.clientHeight,s=e.scrollHeight,a=t.scrollHeight,c=(s-o)/(a-r);i.target===e?(t.removeEventListener("scroll",l),t.scrollTo({top:e.scrollTop/c}),n()):(e.removeEventListener("scroll",l),e.scrollTo({top:t.scrollTop*c}),n())};return[()=>{n().finally((()=>{e.dispatchEvent(new Event("scroll"))}))},()=>{e.removeEventListener("scroll",l),t.removeEventListener("scroll",l)}]},Le=(e,t="image.png")=>{const n=e.split(","),l=n[0].match(/:(.*?);/);if(l){const e=l[1],i=atob(n[1]);let o=i.length;const r=new Uint8Array(o);while(o--)r[o]=i.charCodeAt(o);return new File([r],t,{type:e})}return null},ze=e=>{if(!e.trim())return e;const t=e.split("\n"),n=[''];return t.forEach((()=>{n.push(" ")})),n.push(" "),`${e} ${n.join("")}`},Ae=(e,t=200)=>{let n=0;return(...l)=>new Promise((i=>{n&&(clearTimeout(n),i("cancel")),n=window.setTimeout((()=>{e.apply(globalThis,l),n=0,i("done")}),t)}))},Ie=(e,t=200)=>{let n=0,l=null;return(...i)=>{const o=i=>{0===n&&(n=i),i-n>=t?(e.apply(globalThis,l),l=null,n=0):window.requestAnimationFrame(o)};null===l&&window.requestAnimationFrame(o),l=i}},_e=(e,t="$")=>{const n=e.split(t);let l=t,i="";for(let o=1;o{var t;const n=navigator.userAgent;return n.indexOf("Firefox")>-1?e.value.substring(e.selectionStart,e.selectionEnd):(null==(t=window.getSelection())?void 0:t.toString())||""},Re=(e,t)=>{const n=null==e?void 0:e.getBoundingClientRect();if(t===document.documentElement)return n.top-t.clientTop;const l=null==t?void 0:t.getBoundingClientRect();return n.top-l.top},De=(e,t)=>{const n=oe({},e);return t.forEach((e=>{Reflect.deleteProperty(n,e)})),n},Pe=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,Me=(e,t)=>{const n=n=>{const l=e.parentElement||document.body,i=l.offsetWidth,o=l.offsetHeight,{clientWidth:r}=document.documentElement,{clientHeight:s}=document.documentElement,a=n.offsetX,c=n.offsetY,u=e=>{let n=e.x+document.body.scrollLeft-document.body.clientLeft-a,u=e.y+document.body.scrollTop-document.body.clientTop-c;n=n<1?1:n{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",d)};document.addEventListener("mouseup",d)};return e.addEventListener("mousedown",n),()=>{e.removeEventListener("mousedown",n)}},Oe=(e,t="")=>{const n=document.getElementById(e.id);n?""!==t&&e.onload instanceof Function&&(Reflect.get(window,t)?e.onload(new Event("load")):n.addEventListener("load",e.onload)):document.head.appendChild(e)},Be=Ae(((e,t,n)=>{const l=document.getElementById(e);l&&l.setAttribute(t,n)}),10),He="onSave",Ke="changeCatalogVisible",qe="changeFullscreen",Ve="pageFullscreenChanged",Ue="fullscreenChanged",We="previewChanged",Ne="htmlPreviewChanged",Qe="catalogVisibleChanged",Ze="textareaFocus",Ge=(e,t)=>{const{editorId:n,noPrettier:i,previewOnly:o}=e,r=(0,X.Kh)({buildFinished:!1,html:""}),s=t=>{if(t.target===document.querySelector(`#${e.editorId}-textarea`))if(Ce.emit(n,"selectTextChange"),t.ctrlKey||t.metaKey)switch(t.code){case"KeyS":t.shiftKey?Ce.emit(n,"replace","strikeThrough"):(Ce.emit(n,He,e.modelValue),t.preventDefault());break;case"KeyB":Ce.emit(n,"replace","bold"),t.preventDefault();break;case"KeyU":t.shiftKey?(Ce.emit(n,"replace","unorderedList"),t.preventDefault()):(Ce.emit(n,"replace","underline"),t.preventDefault());break;case"KeyI":t.shiftKey?(Ce.emit(n,"openModals","image"),t.preventDefault()):(Ce.emit(n,"replace","italic"),t.preventDefault());break;case"Digit1":Ce.emit(n,"replace","h1"),t.preventDefault();break;case"Digit2":Ce.emit(n,"replace","h2"),t.preventDefault();break;case"Digit3":Ce.emit(n,"replace","h3"),t.preventDefault();break;case"Digit4":Ce.emit(n,"replace","h4"),t.preventDefault();break;case"Digit5":Ce.emit(n,"replace","h5"),t.preventDefault();break;case"Digit6":Ce.emit(n,"replace","h6"),t.preventDefault();break;case"ArrowUp":Ce.emit(n,"replace","sup"),t.preventDefault();break;case"ArrowDown":Ce.emit(n,"replace","sub"),t.preventDefault();break;case"KeyQ":if("a"===t.key)return void t.target.select();Ce.emit(n,"replace","quote"),t.preventDefault();break;case"KeyA":if("q"===t.key){Ce.emit(n,"replace","quote"),t.preventDefault();break}return;case"KeyO":Ce.emit(n,"replace","orderedList"),t.preventDefault();break;case"KeyC":if(t.shiftKey)Ce.emit(n,"replace","code"),t.preventDefault();else{if(!t.altKey){t.preventDefault(),Ce.emit(n,"replace","ctrlC");break}Ce.emit(n,"replace","codeRow"),t.preventDefault()}break;case"KeyL":Ce.emit(n,"openModals","link"),t.preventDefault();break;case"KeyZ":if("w"===t.key)return;t.shiftKey?(Ce.emit(n,"ctrlShiftZ"),t.preventDefault()):(Ce.emit(n,"ctrlZ"),t.preventDefault());break;case"KeyW":if("z"===t.key){t.shiftKey?(Ce.emit(n,"ctrlShiftZ"),t.preventDefault()):(Ce.emit(n,"ctrlZ"),t.preventDefault());break}return;case"KeyF":t.shiftKey&&(i||(Ce.emit(n,"replace","prettier"),t.preventDefault()));break;case"KeyT":t.altKey&&t.shiftKey&&(Ce.emit(n,"replace","table"),t.preventDefault());break;case"KeyX":Ce.emit(n,"replace","ctrlX"),t.preventDefault();break;case"KeyD":t.preventDefault(),Ce.emit(n,"replace","ctrlD");break}else"Tab"===t.code&&(t.preventDefault(),t.shiftKey?Ce.emit(n,"replace","shiftTab"):Ce.emit(n,"replace","tab"))};(0,l.wB)((()=>e.modelValue),(()=>{r.buildFinished=!1})),(0,l.sV)((()=>{o||(window.addEventListener("keydown",s),Ce.on(n,{name:"buildFinished",callback(e){r.buildFinished=!0,r.html=e}}),Ce.on(n,{name:He,callback(){const l=new Promise((e=>{if(r.buildFinished)e(r.html);else{const t=l=>{e(l),Ce.remove(n,"buildFinished",t)};Ce.on(n,{name:"buildFinished",callback:t})}}));e.onSave?e.onSave(e.modelValue,l):t.emit("onSave",e.modelValue,l)}}))})),(0,l.xo)((()=>{o||window.removeEventListener("keydown",s)}))},Xe=e=>{var t;const{editorId:n,previewOnly:i}=e,o=null==(t=null==we?void 0:we.editorExtensions)?void 0:t.highlight;(0,l.Gt)("editorId",n),(0,l.Gt)("tabWidth",e.tabWidth),(0,l.Gt)("theme",(0,l.EW)((()=>e.theme))),(0,l.Gt)("highlight",(0,l.EW)((()=>{const t=oe(oe({},ye),null==o?void 0:o.css),n=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme;return{js:(null==o?void 0:o.js)||de,css:t[e.codeTheme]?t[e.codeTheme][n]:ye.atom[n]}}))),(0,l.Gt)("historyLength",e.historyLength),(0,l.Gt)("previewOnly",i),(0,l.Gt)("showCodeRowNumber",e.showCodeRowNumber);const r=(0,l.EW)((()=>{var t;const n=oe(oe({},ve),null==(t=null==we?void 0:we.editorConfig)?void 0:t.languageUserDefined);return n[e.language]?n[e.language]:ve["zh-CN"]}));(0,l.Gt)("usedLanguageText",r),(0,l.Gt)("previewTheme",(0,l.EW)((()=>e.previewTheme)))},Ye=e=>{var t,n,i,o,r,s;const{noPrettier:a,previewOnly:c,noIconfont:u,noUploadImg:d}=e,{editorExtensions:p}=we,h=a||!!(null==(n=null==(t=we.editorExtensions)?void 0:t.prettier)?void 0:n.prettierInstance),m=a||!!(null==(o=null==(i=we.editorExtensions)?void 0:i.prettier)?void 0:o.parserMarkdownInstance),g=d||!!(null==(s=null==(r=we.editorExtensions)?void 0:r.cropper)?void 0:s.instance);(0,l.sV)((()=>{var e,t,n,l;const i=document.createElement("script");i.src=(null==p?void 0:p.iconfont)||ce,i.id=`${se}-icon`;const o=document.createElement("script"),r=document.createElement("script");o.src=(null==(e=null==p?void 0:p.prettier)?void 0:e.standaloneJs)||pe.main,o.id=`${se}-prettier`,r.src=(null==(t=null==p?void 0:p.prettier)?void 0:t.parserMarkdownJs)||pe.markdown,r.id=`${se}-prettierMD`;const s=document.createElement("link");s.rel="stylesheet",s.href=(null==(n=null==p?void 0:p.cropper)?void 0:n.css)||he.css,s.id=`${se}-cropperCss`;const a=document.createElement("script");a.src=(null==(l=null==p?void 0:p.cropper)?void 0:l.js)||he.js,a.id=`${se}-cropper`,u||Oe(i),c||(g||(Oe(s),Oe(a)),h||Oe(o),m||Oe(r))}))},Je=(e,t)=>{const{editorId:n,previewOnly:i}=e,o=(0,X.Kh)({pageFullscreen:e.pageFullscreen,fullscreen:!1,preview:e.preview,htmlPreview:!e.preview&&e.htmlPreview}),r=(e,t)=>{o[e]=void 0===t?!o[e]:t,"preview"===e&&o.preview?o.htmlPreview=!1:"htmlPreview"===e&&o.htmlPreview&&(o.preview=!1)};let s="";const a=()=>{o.pageFullscreen||o.fullscreen?document.body.style.overflow="hidden":document.body.style.overflow=s};return(0,l.wB)((()=>[o.pageFullscreen,o.fullscreen]),a),(0,l.sV)((()=>{i||Ce.on(n,{name:"uploadImage",callback(l,i){const o=e=>{Ce.emit(n,"replace","image",{desc:"",urls:e}),i&&i()};e.onUploadImg?e.onUploadImg(l,o):t.emit("onUploadImg",l,o)}}),s=document.body.style.overflow,a()})),[o,r]},et=e=>{const{editorId:t}=e,n=(0,X.KR)(!1);(0,l.sV)((()=>{Ce.on(t,{name:Ke,callback:e=>{n.value=void 0===e?!n.value:e}})}));const i=(0,l.EW)((()=>!e.toolbarsExclude.includes("catalog")&&e.toolbars.includes("catalog")));return[n,i]},tt=(e,t,n,i,o)=>{const{editorId:r}=e;(0,l.wB)((()=>i.pageFullscreen),(e=>{Ce.emit(r,Ve,e)})),(0,l.wB)((()=>i.fullscreen),(e=>{Ce.emit(r,Ue,e)})),(0,l.wB)((()=>i.preview),(e=>{Ce.emit(r,We,e)})),(0,l.wB)((()=>i.htmlPreview),(e=>{Ce.emit(r,Ne,e)})),(0,l.wB)(n,(e=>{Ce.emit(r,Qe,e)}));const s={on(e,t){switch(e){case"pageFullscreen":Ce.on(r,{name:Ve,callback(e){t(e)}});break;case"fullscreen":Ce.on(r,{name:Ue,callback(e){t(e)}});break;case"preview":Ce.on(r,{name:We,callback(e){t(e)}});break;case"htmlPreview":Ce.on(r,{name:Ne,callback(e){t(e)}});break;case"catalog":Ce.on(r,{name:Qe,callback(e){t(e)}});break}},togglePageFullscreen(e){o("pageFullscreen",e)},toggleFullscreen(e){Ce.emit(r,qe,e)},togglePreview(e){o("preview",e)},toggleHtmlPreview(e){o("htmlPreview",e)},toggleCatalog(e){Ce.emit(r,Ke,e)},triggerSave(){Ce.emit(r,He)},insert(e){Ce.emit(r,"replace","universal",{generate:e})},focus(){Ce.emit(r,Ze)}};t.expose(s)};var nt=(0,l.pM)({setup(){return()=>(0,l.bF)("div",{class:`${se}-divider`},null)}});const lt=({instance:e,ctx:t,props:n={}},l="default")=>{const i=(null==e?void 0:e.$slots[l])||(null==t?void 0:t.slots[l]);return(i?i(e):"")||n[l]};const it=()=>({trigger:{type:String,default:"hover"},overlay:{type:[String,Object],default:""},visible:{type:Boolean,default:!1},onChange:{type:Function,default:()=>{}},relative:{type:String,default:"html"}});var ot=(0,l.pM)({props:it(),setup(e,t){const n=`${se}-dropdown-hidden`,i=(0,X.Kh)({overlayClass:[n],overlayStyle:{},triggerHover:!1,overlayHover:!1}),o=(0,X.KR)(),r=(0,X.KR)(),s=()=>{var t;"hover"===e.trigger&&(i.triggerHover=!0);const n=o.value,l=r.value,s=n.getBoundingClientRect(),a=n.offsetTop,c=n.offsetLeft,u=s.height,d=s.width,p=(null==(t=document.querySelector(e.relative))?void 0:t.scrollLeft)||0;i.overlayStyle=re(oe({},i.overlayStyle),{top:a+u+"px",left:c-l.offsetWidth/2+d/2-p+"px"}),e.onChange(!0)},a=()=>{i.overlayHover=!0};(0,l.wB)((()=>e.visible),(e=>{e?i.overlayClass=i.overlayClass.filter((e=>e!==n)):i.overlayClass.push(n)}));const c=t=>{const n=o.value,l=r.value;n.contains(t.target)||l.contains(t.target)||e.onChange(!1)};let u=-1;const d=t=>{o.value===t.target?i.triggerHover=!1:i.overlayHover=!1,clearTimeout(u),u=window.setTimeout((()=>{i.overlayHover||i.triggerHover||e.onChange(!1)}),10)};return(0,l.sV)((()=>{"click"===e.trigger?(o.value.addEventListener("click",s),document.addEventListener("click",c)):(o.value.addEventListener("mouseenter",s),o.value.addEventListener("mouseleave",d),r.value.addEventListener("mouseenter",a),r.value.addEventListener("mouseleave",d))})),(0,l.xo)((()=>{"click"===e.trigger?(o.value.removeEventListener("click",s),document.removeEventListener("click",c)):(o.value.removeEventListener("mouseenter",s),o.value.removeEventListener("mouseleave",d),r.value.removeEventListener("mouseenter",a),r.value.removeEventListener("mouseleave",d))})),()=>{const n=lt({ctx:t}),s=lt({props:e,ctx:t},"overlay"),a=(0,l.E3)(n instanceof Array?n[0]:n,{ref:o}),c=(0,l.bF)("div",{class:[`${se}-dropdown`,i.overlayClass],style:i.overlayStyle,ref:r},[(0,l.bF)("div",{class:`${se}-dropdown-overlay`},[s instanceof Array?s[0]:s])]);return[a,c]}}});const rt=()=>({title:{type:String,default:""},visible:{type:Boolean,default:!1},width:{type:String,default:"auto"},height:{type:String,default:"auto"},onClose:{type:Function,default:()=>{}},showAdjust:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},onAdjust:{type:Function,default:()=>{}},class:{type:String}});var st=(0,l.pM)({props:rt(),setup(e,t){const n=(0,X.KR)(e.visible),i=(0,X.KR)([`${se}-modal`]),o=(0,X.KR)(),r=(0,X.KR)();let s=()=>{};const a=(0,X.Kh)({initPos:{left:"0px",top:"0px"},historyPos:{left:"0px",top:"0px"}}),c=(0,l.EW)((()=>e.isFullscreen?{width:"100%",height:"100%"}:{width:e.width,height:e.height}));return(0,l.sV)((()=>{s=Me(r.value,((e,t)=>{a.initPos.left=e+"px",a.initPos.top=t+"px"}))})),(0,l.xo)((()=>{s()})),(0,l.wB)((()=>e.isFullscreen),(e=>{e?s():s=Me(r.value,((e,t)=>{a.initPos.left=e+"px",a.initPos.top=t+"px"}))})),(0,l.wB)((()=>e.visible),(e=>{e?(i.value.push("zoom-in"),n.value=e,(0,l.dY)((()=>{const e=o.value.offsetWidth/2,t=o.value.offsetHeight/2,n=document.documentElement.clientWidth/2,l=document.documentElement.clientHeight/2;a.initPos.left=n-e+"px",a.initPos.top=l-t+"px"})),setTimeout((()=>{i.value=i.value.filter((e=>"zoom-in"!==e))}),140)):(i.value.push("zoom-out"),setTimeout((()=>{i.value=i.value.filter((e=>"zoom-out"!==e)),n.value=e}),130))})),()=>{const s=lt({ctx:t}),u=lt({props:e,ctx:t},"title");return(0,l.bF)("div",{class:[e.class],style:{display:n.value?"block":"none"}},[(0,l.bF)("div",{class:`${se}-modal-mask`,onClick:e.onClose},null),(0,l.bF)("div",{class:i.value,style:oe(oe({},a.initPos),c.value),ref:o},[(0,l.bF)("div",{class:`${se}-modal-header`,ref:r},[u||""]),(0,l.bF)("div",{class:`${se}-modal-body`},[s]),(0,l.bF)("div",{class:`${se}-modal-func`},[e.showAdjust&&(0,l.bF)("div",{class:`${se}-modal-adjust`,onClick:t=>{t.stopPropagation(),e.isFullscreen?a.initPos=a.historyPos:(a.historyPos=a.initPos,a.initPos={left:"0",top:"0"}),e.onAdjust(!e.isFullscreen)}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-"+(e.isFullscreen?"suoxiao":"fangda")},null)])]),(0,l.bF)("div",{class:`${se}-modal-close`,onClick:t=>{t.stopPropagation(),e.onClose&&e.onClose()}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-close"},null)])])])])])}}});const at=()=>({type:{type:String,default:"link"},visible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>{}},onOk:{type:Function,default:()=>{}}});var ct=(0,l.pM)({props:at(),setup(e){const t=(0,l.WQ)("usedLanguageText"),n=(0,l.WQ)("editorId"),i=(0,l.EW)((()=>{var n,l;switch(e.type){case"link":return null==(n=t.value.linkModalTips)?void 0:n.linkTitle;case"image":return null==(l=t.value.linkModalTips)?void 0:l.imageTitle;default:return""}})),o=(0,X.Kh)({desc:"",url:""});return(0,l.wB)((()=>e.visible),(e=>{e||setTimeout((()=>{o.desc="",o.url=""}),200)})),()=>(0,l.bF)(st,{title:i.value,visible:e.visible,onClose:e.onCancel},{default:()=>{var i,r,s,a,c;return[(0,l.bF)("div",{class:`${se}-form-item`},[(0,l.bF)("label",{class:`${se}-label`,for:`link-desc-${n}`},[null==(i=t.value.linkModalTips)?void 0:i.descLabel]),(0,l.bF)("input",{placeholder:null==(r=t.value.linkModalTips)?void 0:r.descLabelPlaceHolder,class:`${se}-input`,id:`link-desc-${n}`,type:"text",value:o.desc,onChange:e=>{o.desc=e.target.value},autocomplete:"off"},null)]),(0,l.bF)("div",{class:`${se}-form-item`},[(0,l.bF)("label",{class:`${se}-label`,for:`link-url-${n}`},[null==(s=t.value.linkModalTips)?void 0:s.urlLabel]),(0,l.bF)("input",{placeholder:null==(a=t.value.linkModalTips)?void 0:a.urlLabelPlaceHolder,class:`${se}-input`,id:`link-url-${n}`,type:"text",value:o.url,onChange:e=>{o.url=e.target.value},autocomplete:"off"},null)]),(0,l.bF)("div",{class:`${se}-form-item`},[(0,l.bF)("button",{class:[`${se}-btn`,`${se}-btn-row`],type:"button",onClick:()=>{e.onOk(o),o.desc="",o.url=""}},[null==(c=t.value.linkModalTips)?void 0:c.buttonOK])])]}})}});const ut=()=>({visible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>{}},onOk:{type:Function,default:()=>{}}});var dt=(0,l.pM)({props:ut(),setup(e){var t,n;const i=(0,l.WQ)("usedLanguageText"),o=(0,l.WQ)("editorId");let r=null==(n=null==(t=null==we?void 0:we.editorExtensions)?void 0:t.cropper)?void 0:n.instance;const s=(0,X.KR)(),a=(0,X.KR)(),c=(0,X.KR)(),u=(0,X.Kh)({cropperInited:!1,imgSelected:!1,imgSrc:"",isFullscreen:!1});let d=null;(0,l.wB)((()=>e.visible),(()=>{e.visible&&!u.cropperInited&&(r=r||window.Cropper,s.value.onchange=()=>{if(!r)return void Ce.emit(o,"errorCatcher",{name:"Cropper",message:"Cropper is undefined"});const e=s.value.files||[];if(u.imgSelected=!0,(null==e?void 0:e.length)>0){const t=new FileReader;t.onload=e=>{u.imgSrc=e.target.result,(0,l.dY)((()=>{d=new r(a.value,{viewMode:2,preview:`.${se}-clip-preview-target`})}))},t.readAsDataURL(e[0])}})})),(0,l.wB)((()=>[u.imgSelected]),(()=>{c.value.style=""})),(0,l.wB)((()=>u.isFullscreen),(()=>{(0,l.dY)((()=>{null==d||d.destroy(),c.value.style="",a.value&&(d=new r(a.value,{viewMode:2,preview:`.${se}-clip-preview-target`}))}))}));const p=()=>{d.clear(),d.destroy(),d=null,s.value.value="",u.imgSelected=!1};return()=>{var t;return(0,l.bF)(st,{class:`${se}-modal-clip`,title:null==(t=i.value.clipModalTips)?void 0:t.title,visible:e.visible,onClose:e.onCancel,showAdjust:!0,isFullscreen:u.isFullscreen,onAdjust:e=>{u.isFullscreen=e},width:"668px",height:"421px"},{default:()=>{var t,n;return[(0,l.bF)("div",{class:`${se}-form-item ${se}-clip`},[(0,l.bF)("div",{class:`${se}-clip-main`},[u.imgSelected?(0,l.bF)("div",{class:`${se}-clip-cropper`},[(0,l.bF)("img",{src:u.imgSrc,ref:a,style:{display:"none"},alt:""},null),(0,l.bF)("div",{class:`${se}-clip-delete`,onClick:p},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-delete"},null)])])]):(0,l.bF)("div",{class:`${se}-clip-upload`,onClick:()=>{s.value.click()}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-upload"},null)])])]),(0,l.bF)("div",{class:`${se}-clip-preview`},[(0,l.bF)("div",{class:`${se}-clip-preview-target`,ref:c},null)])]),(0,l.bF)("div",{class:`${se}-form-item`},[(0,l.bF)("button",{class:`${se}-btn`,type:"button",onClick:()=>{if(d){const t=d.getCroppedCanvas();Ce.emit(o,"uploadImage",[Le(t.toDataURL("image/png"))],e.onOk),p()}}},[(null==(t=i.value.clipModalTips)?void 0:t.buttonUpload)||(null==(n=i.value.linkModalTips)?void 0:n.buttonOK)])]),(0,l.bF)("input",{ref:s,accept:"image/*",type:"file",multiple:!1,style:{display:"none"}},null)]}})}}});const pt=()=>({type:{type:String,default:"link"},linkVisible:{type:Boolean,default:!1},clipVisible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>{}},onOk:{type:Function,default:()=>{}}});var ht=(0,l.pM)({props:pt(),setup(e){return()=>(0,l.bF)(l.FK,null,[(0,l.bF)(ct,{type:e.type,visible:e.linkVisible,onOk:e.onOk,onCancel:e.onCancel},null),(0,l.bF)(dt,{visible:e.clipVisible,onOk:e.onOk,onCancel:e.onCancel},null)])}});const mt=e=>{var t,n,i,o;const r=(0,l.WQ)("editorId");let s=null==(n=null==(t=we.editorExtensions)?void 0:t.screenfull)?void 0:n.instance;const a=null==(o=null==(i=we.editorExtensions)?void 0:i.screenfull)?void 0:o.js,c=(0,X.KR)(!1),u=e=>{if(s)if(s.isEnabled){c.value=!0;const t=void 0===e?!s.isFullscreen:e;t?s.request():s.exit()}else console.error("browser does not support screenfull!");else Ce.emit(r,"errorCatcher",{name:"fullscreen",message:"fullscreen is undefined"})},d=()=>{s&&s.isEnabled&&s.on("change",(()=>{(c.value||e.setting.fullscreen)&&(c.value=!1,e.updateSetting("fullscreen"))}))},p=()=>{s=window.screenfull,d()};return(0,l.sV)((()=>{if(d(),!s){const e=document.createElement("script");e.src=a||me,e.onload=p,e.id=`${se}-screenfull`,Oe(e,"screenfull")}})),(0,l.sV)((()=>{Ce.on(r,{name:qe,callback:u})})),{fullscreenHandler:u}},gt=()=>({tableShape:{type:Array,default:()=>[6,4]},onSelected:{type:Function,default:()=>{}}}),ft=(0,l.pM)({name:"TableShape",props:gt(),setup(e){const t=(0,X.Kh)({x:-1,y:-1});return()=>(0,l.bF)("div",{class:`${se}-table-shape`,onMouseleave:()=>{t.x=-1,t.y=-1}},[new Array(e.tableShape[1]).fill("").map(((n,i)=>(0,l.bF)("div",{class:`${se}-table-shape-row`,key:`table-shape-row-${i}`},[new Array(e.tableShape[0]).fill("").map(((n,o)=>(0,l.bF)("div",{class:`${se}-table-shape-col`,key:`table-shape-col-${o}`,onMouseenter:()=>{t.x=i,t.y=o},onClick:()=>{e.onSelected(t)}},[(0,l.bF)("div",{class:[`${se}-table-shape-col-default`,i<=t.x&&o<=t.y&&`${se}-table-shape-col-include`]},null)])))])))])}}),vt=()=>({noPrettier:{type:Boolean},toolbars:{type:Array,default:()=>[]},toolbarsExclude:{type:Array,default:()=>[]},setting:{type:Object,default:()=>({})},screenfull:{type:Object,default:null},screenfullJs:{type:String,default:""},updateSetting:{type:Function,default:()=>{}},tableShape:{type:Array,default:()=>[6,4]},defToolbars:{type:Object},noUploadImg:{type:Boolean}});var bt=(0,l.pM)({name:"MDEditorToolbar",props:vt(),setup(e){const t=(0,l.WQ)("editorId"),n=(0,l.WQ)("usedLanguageText"),{fullscreenHandler:i}=mt(e),o=`${t}-toolbar-wrapper`,r=(0,X.Kh)({title:!1,catalog:!1,image:!1,table:!1,mermaid:!1,katex:!1}),s=(e,n)=>{Ce.emit(t,"replace",e,n)},a=(0,X.Kh)({type:"link",linkVisible:!1,clipVisible:!1}),c=(0,X.KR)();(0,l.sV)((()=>{Ce.on(t,{name:"openModals",callback(e){a.type=e,a.linkVisible=!0}})}));const u=(0,l.EW)((()=>{const t=e.toolbars.filter((t=>!e.toolbarsExclude.includes(t))),n=t.indexOf("="),l=-1===n?t:t.slice(0,n+1),i=-1===n?[]:t.slice(n,Number.MAX_SAFE_INTEGER);return[l,i]})),d=(0,X.KR)(),p=()=>{Ce.emit(t,"uploadImage",Array.from(d.value.files||[])),d.value.value=""};(0,l.sV)((()=>{d.value.addEventListener("change",p)}));const h=c=>{var u,p,h,m,g,f,v,b,k,y,w,x,$,C,F,E,S,T,L,z,A,I,_,j,R,D,P,M,O,B,H,K,q,V,U,W,N,Q,Z,G,X,Y,J;if(!ge.includes(c)){if(e.defToolbars instanceof Array){const t=e.defToolbars[c];return t||""}if(e.defToolbars&&e.defToolbars.children instanceof Array){const t=e.defToolbars.children[c];return t||""}return""}switch(c){case"-":return(0,l.bF)(nt,null,null);case"bold":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(u=n.value.toolbarTips)?void 0:u.bold,onClick:()=>{s("bold")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-bold"},null)])]);case"underline":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(p=n.value.toolbarTips)?void 0:p.underline,onClick:()=>{s("underline")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-underline"},null)])]);case"italic":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(h=n.value.toolbarTips)?void 0:h.italic,onClick:()=>{s("italic")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-italic"},null)])]);case"strikeThrough":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(m=n.value.toolbarTips)?void 0:m.strikeThrough,onClick:()=>{s("strikeThrough")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-strike-through"},null)])]);case"title":return(0,l.bF)(ot,{relative:`#${o}`,visible:r.title,onChange:e=>{r.title=e},overlay:(0,l.bF)("ul",{class:`${se}-menu`,onClick:()=>{r.title=!1}},[(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h1")}},[null==(g=n.value.titleItem)?void 0:g.h1]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h2")}},[null==(f=n.value.titleItem)?void 0:f.h2]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h3")}},[null==(v=n.value.titleItem)?void 0:v.h3]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h4")}},[null==(b=n.value.titleItem)?void 0:b.h4]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h5")}},[null==(k=n.value.titleItem)?void 0:k.h5]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("h6")}},[null==(y=n.value.titleItem)?void 0:y.h6])])},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.title},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-title"},null)])])]}});case"sub":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(w=n.value.toolbarTips)?void 0:w.sub,onClick:()=>{s("sub")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-sub"},null)])]);case"sup":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(x=n.value.toolbarTips)?void 0:x.sup,onClick:()=>{s("sup")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-sup"},null)])]);case"quote":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==($=n.value.toolbarTips)?void 0:$.quote,onClick:()=>{s("quote")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-quote"},null)])]);case"unorderedList":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(C=n.value.toolbarTips)?void 0:C.unorderedList,onClick:()=>{s("unorderedList")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-unordered-list"},null)])]);case"orderedList":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(F=n.value.toolbarTips)?void 0:F.orderedList,onClick:()=>{s("orderedList")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-ordered-list"},null)])]);case"task":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(E=n.value.toolbarTips)?void 0:E.task,onClick:()=>{s("task")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-task"},null)])]);case"codeRow":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(S=n.value.toolbarTips)?void 0:S.codeRow,onClick:()=>{s("codeRow")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-code-row"},null)])]);case"code":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(T=n.value.toolbarTips)?void 0:T.code,onClick:()=>{s("code")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-code"},null)])]);case"link":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(L=n.value.toolbarTips)?void 0:L.link,onClick:()=>{a.type="link",a.linkVisible=!0}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-link"},null)])]);case"image":return e.noUploadImg?(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(z=n.value.toolbarTips)?void 0:z.image,onClick:()=>{a.type="image",a.linkVisible=!0}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-image"},null)])]):(0,l.bF)(ot,{relative:`#${o}`,visible:r.image,onChange:e=>{r.image=e},overlay:(0,l.bF)("ul",{class:`${se}-menu`,onClick:()=>{r.title=!1}},[(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{a.type="image",a.linkVisible=!0}},[null==(A=n.value.imgTitleItem)?void 0:A.link]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{d.value.click()}},[null==(I=n.value.imgTitleItem)?void 0:I.upload]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{a.clipVisible=!0}},[null==(_=n.value.imgTitleItem)?void 0:_.clip2upload])])},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.image},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-image"},null)])])]}});case"table":return(0,l.bF)(ot,{relative:`#${o}`,visible:r.table,onChange:e=>{r.table=e},key:"bar-table",overlay:(0,l.bF)(ft,{tableShape:e.tableShape,onSelected:e=>{s("table",{selectedShape:e})}},null)},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.table},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-table"},null)])])]}});case"revoke":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(j=n.value.toolbarTips)?void 0:j.revoke,onClick:()=>{Ce.emit(t,"ctrlZ")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-revoke"},null)])]);case"next":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(R=n.value.toolbarTips)?void 0:R.next,onClick:()=>{Ce.emit(t,"ctrlShiftZ")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-next"},null)])]);case"save":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(D=n.value.toolbarTips)?void 0:D.save,onClick:()=>{Ce.emit(t,He)}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-baocun"},null)])]);case"prettier":return e.noPrettier?"":(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(P=n.value.toolbarTips)?void 0:P.prettier,onClick:()=>{s("prettier")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-prettier"},null)])]);case"pageFullscreen":return!e.setting.fullscreen&&(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(M=n.value.toolbarTips)?void 0:M.pageFullscreen,onClick:()=>{e.updateSetting("pageFullscreen")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-"+(e.setting.pageFullscreen?"suoxiao":"fangda")},null)])]);case"fullscreen":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(O=n.value.toolbarTips)?void 0:O.fullscreen,onClick:()=>{i()}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-"+(e.setting.fullscreen?"fullscreen-exit":"fullscreen")},null)])]);case"preview":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(B=n.value.toolbarTips)?void 0:B.preview,onClick:()=>{e.updateSetting("preview")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-preview"},null)])]);case"htmlPreview":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(H=n.value.toolbarTips)?void 0:H.htmlPreview,onClick:()=>{e.updateSetting("htmlPreview")}},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-coding"},null)])]);case"catalog":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(K=n.value.toolbarTips)?void 0:K.catalog,onClick:()=>{Ce.emit(t,Ke)},key:"bar-catalog"},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-catalog"},null)])]);case"github":return(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(q=n.value.toolbarTips)?void 0:q.github,onClick:()=>Se("https://github.com/imzbf/md-editor-v3")},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-github"},null)])]);case"mermaid":return(0,l.bF)(ot,{relative:`#${o}`,visible:r.mermaid,onChange:e=>{r.mermaid=e},overlay:(0,l.bF)("ul",{class:`${se}-menu`,onClick:()=>{r.mermaid=!1}},[(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("flow")}},[null==(V=n.value.mermaid)?void 0:V.flow]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("sequence")}},[null==(U=n.value.mermaid)?void 0:U.sequence]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("gantt")}},[null==(W=n.value.mermaid)?void 0:W.gantt]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("class")}},[null==(N=n.value.mermaid)?void 0:N.class]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("state")}},[null==(Q=n.value.mermaid)?void 0:Q.state]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("pie")}},[null==(Z=n.value.mermaid)?void 0:Z.pie]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("relationship")}},[null==(G=n.value.mermaid)?void 0:G.relationship]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("journey")}},[null==(X=n.value.mermaid)?void 0:X.journey])]),key:"bar-mermaid"},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.mermaid},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-mermaid"},null)])])]}});case"katex":return(0,l.bF)(ot,{relative:`#${o}`,visible:r.katex,onChange:e=>{r.katex=e},overlay:(0,l.bF)("ul",{class:`${se}-menu`,onClick:()=>{r.katex=!1}},[(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("katexInline")}},[null==(Y=n.value.katex)?void 0:Y.inline]),(0,l.bF)("li",{class:`${se}-menu-item`,onClick:()=>{s("katexBlock")}},[null==(J=n.value.katex)?void 0:J.block])]),key:"bar-katex"},{default:()=>{var e;return[(0,l.bF)("div",{class:`${se}-toolbar-item`,title:null==(e=n.value.toolbarTips)?void 0:e.katex},[(0,l.bF)("svg",{class:`${se}-icon`,"aria-hidden":"true"},[(0,l.bF)("use",{"xlink:href":"#md-editor-icon-formula"},null)])])]}})}};return()=>{const t=u.value[0].map((e=>h(e))),n=u.value[1].map((e=>h(e)));return(0,l.bF)(l.FK,null,[e.toolbars.length>0&&(0,l.bF)("div",{class:`${se}-toolbar-wrapper`,id:o},[(0,l.bF)("div",{class:`${se}-toolbar`},[(0,l.bF)("div",{class:`${se}-toolbar-left`,ref:c},[t]),(0,l.bF)("div",{class:`${se}-toolbar-right`},[n])])]),(0,l.bF)("input",{ref:d,accept:"image/*",type:"file",multiple:!0,style:{display:"none"}},null),(0,l.bF)(ht,{linkVisible:a.linkVisible,clipVisible:a.clipVisible,type:a.type,onCancel:()=>{a.linkVisible=!1,a.clipVisible=!1},onOk:e=>{e&&s(a.type,{desc:e.desc,url:e.url}),a.linkVisible=!1,a.clipVisible=!1}},null)])}}});function kt(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let yt=kt();function wt(e){yt=e}const xt=/[&<>"']/,$t=new RegExp(xt.source,"g"),Ct=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ft=new RegExp(Ct.source,"g"),Et={"&":"&","<":"<",">":">",'"':""","'":"'"},St=e=>Et[e];function Tt(e,t){if(t){if(xt.test(e))return e.replace($t,St)}else if(Ct.test(e))return e.replace(Ft,St);return e}const Lt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function zt(e){return e.replace(Lt,((e,t)=>(t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")))}const At=/(^|[^\[])\^/g;function It(e,t){e="string"===typeof e?e:e.source,t=t||"";const n={replace:(t,l)=>(l=l.source||l,l=l.replace(At,"$1"),e=e.replace(t,l),n),getRegex:()=>new RegExp(e,t)};return n}const _t=/[^\w:]/g,jt=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Rt(e,t,n){if(e){let e;try{e=decodeURIComponent(zt(n)).replace(_t,"").toLowerCase()}catch(l){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!jt.test(n)&&(n=Bt(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(l){return null}return n}const Dt={},Pt=/^[^:]+:\/*[^/]*$/,Mt=/^([^:]+:)[\s\S]*$/,Ot=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Bt(e,t){Dt[" "+e]||(Pt.test(e)?Dt[" "+e]=e+"/":Dt[" "+e]=Vt(e,"/",!0)),e=Dt[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(Mt,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(Ot,"$1")+t:e+t}const Ht={exec:function(){}};function Kt(e){let t,n,l=1;for(;l{let l=!1,i=t;while(--i>=0&&"\\"===n[i])l=!l;return l?"|":" |"})),l=n.split(/ \|/);let i=0;if(l[0].trim()||l.shift(),l.length>0&&!l[l.length-1].trim()&&l.pop(),l.length>t)l.splice(t);else while(l.length1)1&t&&(n+=e),t>>=1,e+=e;return n+e}function Qt(e,t,n,l){const i=t.href,o=t.title?Tt(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){l.state.inLink=!0;const e={type:"link",raw:n,href:i,title:o,text:r,tokens:l.inlineTokens(r)};return l.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:o,text:Tt(r)}}function Zt(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const l=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=l.length?e.slice(l.length):e})).join("\n")}class Gt{constructor(e){this.options=e||yt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Vt(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=Zt(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Vt(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,l,i,o,r,s,a,c,u,d,p,h,m=t[1].trim();const g=m.length>1,f={type:"list",raw:"",ordered:g,start:g?+m.slice(0,-1):"",loose:!1,items:[]};m=g?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=g?m:"[*+-]");const v=new RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);while(e){if(h=!1,!(t=v.exec(e)))break;if(this.rules.block.hr.test(e))break;if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(o=2,p=c.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,p=c.slice(o),o+=t[1].length),s=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),h=!0),!h){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),l=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),r=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);while(e){if(d=e.split("\n",1)[0],c=d,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(c))break;if(r.test(c))break;if(t.test(c))break;if(l.test(e))break;if(c.search(/[^ ]/)>=o||!c.trim())p+="\n"+c.slice(o);else{if(s)break;p+="\n"+c}s||c.trim()||(s=!0),n+=d+"\n",e=e.substring(d.length+1)}}f.loose||(a?f.loose=!0:/\n *\n *$/.test(n)&&(a=!0)),this.options.gfm&&(l=/^\[[ xX]\] /.exec(p),l&&(i="[ ] "!==l[0],p=p.replace(/^\[[ xX]\] +/,""))),f.items.push({type:"list_item",raw:n,task:!!l,checked:i,loose:!1,text:p}),f.raw+=n}f.items[f.items.length-1].raw=n.trimRight(),f.items[f.items.length-1].text=p.trimRight(),f.raw=f.raw.trimRight();const b=f.items.length;for(r=0;r"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let n=0;for(const l of t)if("\n"===l&&(n+=1),n>1)return!0;return!1}));!f.loose&&e.length&&t&&(f.loose=!0,f.items[r].loose=!0)}return f}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const n=this.options.sanitizer?this.options.sanitizer(t[0]):Tt(t[0]);e.type="paragraph",e.text=n,e.tokens=this.lexer.inline(n)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",l=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:l}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:qt(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,l,i,o,r=e.align.length;for(n=0;n({text:e})));for(r=e.header.length,l=0;l/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Tt(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=Vt(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=Ut(t[2],"()");if(e>-1){const n=0===t[0].indexOf("!")?5:4,l=n+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],l="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],l=e[3])}else l=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),Qt(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:l?l.replace(this.rules.inline._escapes,"$1"):l},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Qt(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let l=this.rules.inline.emStrong.lDelim.exec(e);if(!l)return;if(l[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=l[1]||l[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=l[0].length-1;let i,o,r=n,s=0;const a="*"===l[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;a.lastIndex=0,t=t.slice(-1*e.length+n);while(null!=(l=a.exec(t))){if(i=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!i)continue;if(o=i.length,l[3]||l[4]){r+=o;continue}if((l[5]||l[6])&&n%3&&!((n+o)%3)){s+=o;continue}if(r-=o,r>0)continue;o=Math.min(o,o+r+s);const t=e.slice(0,n+l.index+(l[0].length-i.length)+o);if(Math.min(n,o)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const a=t.slice(2,-2);return{type:"strong",raw:t,text:a,tokens:this.lexer.inlineTokens(a)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),l=/^ /.test(e)&&/ $/.test(e);return n&&l&&(e=e.substring(1,e.length-1)),e=Tt(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,l;return"@"===n[2]?(e=Tt(this.options.mangle?t(n[1]):n[1]),l="mailto:"+e):(e=Tt(n[1]),l=e),{type:"link",raw:n[0],text:e,href:l,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,l;if("@"===n[2])e=Tt(this.options.mangle?t(n[0]):n[0]),l="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=Tt(n[0]),l="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:l,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Tt(n[0]):n[0]:Tt(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const Xt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ht,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Xt.def=It(Xt.def).replace("label",Xt._label).replace("title",Xt._title).getRegex(),Xt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Xt.listItemStart=It(/^( *)(bull) */).replace("bull",Xt.bullet).getRegex(),Xt.list=It(Xt.list).replace(/bull/g,Xt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Xt.def.source+")").getRegex(),Xt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xt._comment=/|$)/,Xt.html=It(Xt.html,"i").replace("comment",Xt._comment).replace("tag",Xt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xt.paragraph=It(Xt._paragraph).replace("hr",Xt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt._tag).getRegex(),Xt.blockquote=It(Xt.blockquote).replace("paragraph",Xt.paragraph).getRegex(),Xt.normal=Kt({},Xt),Xt.gfm=Kt({},Xt.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Xt.gfm.table=It(Xt.gfm.table).replace("hr",Xt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt._tag).getRegex(),Xt.gfm.paragraph=It(Xt._paragraph).replace("hr",Xt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Xt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt._tag).getRegex(),Xt.pedantic=Kt({},Xt.normal,{html:It("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Xt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ht,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:It(Xt.normal._paragraph).replace("hr",Xt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Xt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Yt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ht,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ht,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),l+=""+n+";";return l}Yt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Yt.punctuation=It(Yt.punctuation).replace(/punctuation/g,Yt._punctuation).getRegex(),Yt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Yt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Yt._comment=It(Xt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Yt.emStrong.lDelim=It(Yt.emStrong.lDelim).replace(/punct/g,Yt._punctuation).getRegex(),Yt.emStrong.rDelimAst=It(Yt.emStrong.rDelimAst,"g").replace(/punct/g,Yt._punctuation).getRegex(),Yt.emStrong.rDelimUnd=It(Yt.emStrong.rDelimUnd,"g").replace(/punct/g,Yt._punctuation).getRegex(),Yt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Yt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Yt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Yt.autolink=It(Yt.autolink).replace("scheme",Yt._scheme).replace("email",Yt._email).getRegex(),Yt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Yt.tag=It(Yt.tag).replace("comment",Yt._comment).replace("attribute",Yt._attribute).getRegex(),Yt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Yt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Yt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Yt.link=It(Yt.link).replace("label",Yt._label).replace("href",Yt._href).replace("title",Yt._title).getRegex(),Yt.reflink=It(Yt.reflink).replace("label",Yt._label).replace("ref",Xt._label).getRegex(),Yt.nolink=It(Yt.nolink).replace("ref",Xt._label).getRegex(),Yt.reflinkSearch=It(Yt.reflinkSearch,"g").replace("reflink",Yt.reflink).replace("nolink",Yt.nolink).getRegex(),Yt.normal=Kt({},Yt),Yt.pedantic=Kt({},Yt.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:It(/^!?\[(label)\]\((.*?)\)/).replace("label",Yt._label).getRegex(),reflink:It(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yt._label).getRegex()}),Yt.gfm=Kt({},Yt.normal,{escape:It(Yt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));while(e)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((l=>!!(n=l.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),l=t[t.length-1],!l||"paragraph"!==l.type&&"text"!==l.type?t.push(n):(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=l.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),l=t[t.length-1],!l||"paragraph"!==l.type&&"text"!==l.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(l.raw+="\n"+n.raw,l.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=l.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let l;this.options.extensions.startBlock.forEach((function(e){l=e.call({lexer:this},n),"number"===typeof l&&l>=0&&(t=Math.min(t,l))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))l=t[t.length-1],o&&"paragraph"===l.type?(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):t.push(n),o=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),l=t[t.length-1],l&&"text"===l.type?(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,l,i,o,r,s,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)while(null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(a)))e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+Nt("a",o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(o=this.tokenizer.rules.inline.blockSkip.exec(a)))a=a.slice(0,o.index)+"["+Nt("a",o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(a)))a=a.slice(0,o.index+o[0].length-2)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;while(e)if(r||(s=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((l=>!!(n=l.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),l=t[t.length-1],l&&"text"===n.type&&"text"===l.type?(l.raw+=n.raw,l.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),l=t[t.length-1],l&&"text"===n.type&&"text"===l.type?(l.raw+=n.raw,l.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,s))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,en))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,en))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let l;this.options.extensions.startInline.forEach((function(e){l=e.call({lexer:this},n),"number"===typeof l&&l>=0&&(t=Math.min(t,l))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,Jt))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),r=!0,l=t[t.length-1],l&&"text"===l.type?(l.raw+=n.raw,l.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class nn{constructor(e){this.options=e||yt}code(e,t,n){const l=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,l);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",l?''+(n?e:Tt(e,!0))+"
\n":""+(n?e:Tt(e,!0))+"
\n"}blockquote(e){return`\n${e} \n`}html(e){return e}heading(e,t,n,l){if(this.options.headerIds){const i=this.options.headerPrefix+l.slug(n);return`${e} \n`}return`${e} \n`}hr(){return this.options.xhtml?" \n":" \n"}list(e,t,n){const l=t?"ol":"ul",i=t&&1!==n?' start="'+n+'"':"";return"<"+l+i+">\n"+e+""+l+">\n"}listitem(e){return`${e} \n`}checkbox(e){return" "}paragraph(e){return`${e}
\n`}table(e,t){return t&&(t=`${t} `),"\n"}tablerow(e){return`\n${e} \n`}tablecell(e,t){const n=t.header?"th":"td",l=t.align?`<${n} align="${t.align}">`:`<${n}>`;return l+e+`${n}>\n`}strong(e){return`${e} `}em(e){return`${e} `}codespan(e){return`${e}
`}br(){return this.options.xhtml?" ":" "}del(e){return`${e}`}link(e,t,n){if(e=Rt(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let l='"+n+" ",l}image(e,t,n){if(e=Rt(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let l=` ":">",l}text(e){return e}}class ln{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class on{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,l=0;if(this.seen.hasOwnProperty(n)){l=this.seen[e];do{l++,n=e+"-"+l}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=l,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class rn{constructor(e){this.options=e||yt,this.options.renderer=this.options.renderer||new nn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ln,this.slugger=new on}static parse(e,t){const n=new rn(t);return n.parse(e)}static parseInline(e,t){const n=new rn(t);return n.parseInline(e)}parse(e,t=!0){let n,l,i,o,r,s,a,c,u,d,p,h,m,g,f,v,b,k,y,w="";const x=e.length;for(n=0;n0&&"paragraph"===f.tokens[0].type?(f.tokens[0].text=k+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&"text"===f.tokens[0].tokens[0].type&&(f.tokens[0].tokens[0].text=k+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:k}):g+=k),g+=this.parse(f.tokens,m),u+=this.renderer.listitem(g,b,v);w+=this.renderer.list(u,p,h);continue;case"html":w+=this.renderer.html(d.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":u=d.tokens?this.parseInline(d.tokens):d.text;while(n+1{l(e.text,e.lang,(function(t,n){if(t)return r(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),s--,0===s&&r()}))}),0))})),void(0===s&&r())}function l(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"An error occurred:
"+Tt(e.message+"",!0)+" ";throw e}try{const n=tn.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(sn.walkTokens(n,t.walkTokens)).then((()=>rn.parse(n,t))).catch(l);sn.walkTokens(n,t.walkTokens)}return rn.parse(n,t)}catch(i){l(i)}}sn.options=sn.setOptions=function(e){return Kt(sn.defaults,e),wt(sn.defaults),sn},sn.getDefaults=kt,sn.defaults=yt,sn.use=function(...e){const t=sn.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const n=Kt({},e);if(n.async=sn.defaults.async||n.async,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let l=e.renderer.apply(this,t);return!1===l&&(l=n.apply(this,t)),l}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=sn.defaults.renderer||new nn;for(const n in e.renderer){const l=t[n];t[n]=(...i)=>{let o=e.renderer[n].apply(t,i);return!1===o&&(o=l.apply(t,i)),o}}n.renderer=t}if(e.tokenizer){const t=sn.defaults.tokenizer||new Gt;for(const n in e.tokenizer){const l=t[n];t[n]=(...i)=>{let o=e.tokenizer[n].apply(t,i);return!1===o&&(o=l.apply(t,i)),o}}n.tokenizer=t}if(e.walkTokens){const t=sn.defaults.walkTokens;n.walkTokens=function(n){let l=[];return l.push(e.walkTokens.call(this,n)),t&&(l=l.concat(t.call(this,n))),l}}sn.setOptions(n)}))},sn.walkTokens=function(e,t){let n=[];for(const l of e)switch(n=n.concat(t.call(sn,l)),l.type){case"table":for(const e of l.header)n=n.concat(sn.walkTokens(e.tokens,t));for(const e of l.rows)for(const l of e)n=n.concat(sn.walkTokens(l.tokens,t));break;case"list":n=n.concat(sn.walkTokens(l.items,t));break;default:sn.defaults.extensions&&sn.defaults.extensions.childTokens&&sn.defaults.extensions.childTokens[l.type]?sn.defaults.extensions.childTokens[l.type].forEach((function(e){n=n.concat(sn.walkTokens(l[e],t))})):l.tokens&&(n=n.concat(sn.walkTokens(l.tokens,t)))}return n},sn.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Kt({},sn.defaults,t||{}),Wt(t);try{const n=tn.lexInline(e,t);return t.walkTokens&&sn.walkTokens(n,t.walkTokens),rn.parseInline(n,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"An error occurred:
"+Tt(n.message+"",!0)+" ";throw n}},sn.Parser=rn,sn.parser=rn.parse,sn.Renderer=nn,sn.TextRenderer=ln,sn.Lexer=tn,sn.lexer=tn.lex,sn.Tokenizer=Gt,sn.Slugger=on,sn.parse=sn,rn.parse,tn.lex;var an=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],l=0;l1&&void 0!==arguments[1]?arguments[1]:{},l=window.Promise||function(e){function t(){}e(t,t)},i=function(e){var t=e.target;t!==F?-1!==k.indexOf(t)&&g({target:t}):m()},o=function(){if(!w&&C.original){var e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(x-e)>$.scrollOffset&&setTimeout(m,150)}},r=function(e){var t=e.key||e.keyCode;"Escape"!==t&&"Esc"!==t&&27!==t||m()},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e;if(e.background&&(F.style.background=e.background),e.container&&e.container instanceof Object&&(t.container=gn({},$.container,e.container)),e.template){var n=bn(e.template)?e.template:document.querySelector(e.template);t.template=n}return $=gn({},$,t),k.forEach((function(e){e.dispatchEvent($n("medium-zoom:update",{detail:{zoom:E}}))})),E},a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e(gn({},$,t))},c=function(){for(var e=arguments.length,t=Array(e),n=0;n0?t.reduce((function(e,t){return[].concat(e,yn(t))}),[]):k;return l.forEach((function(e){e.classList.remove("medium-zoom-image"),e.dispatchEvent($n("medium-zoom:detach",{detail:{zoom:E}}))})),k=k.filter((function(e){return-1===l.indexOf(e)})),E},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k.forEach((function(l){l.addEventListener("medium-zoom:"+e,t,n)})),y.push({type:"medium-zoom:"+e,listener:t,options:n}),E},p=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k.forEach((function(l){l.removeEventListener("medium-zoom:"+e,t,n)})),y=y.filter((function(n){return!(n.type==="medium-zoom:"+e&&n.listener.toString()===t.toString())})),E},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target,n=function(){var e={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},t=void 0,n=void 0;if($.container)if($.container instanceof Object)e=gn({},e,$.container),t=e.width-e.left-e.right-2*$.margin,n=e.height-e.top-e.bottom-2*$.margin;else{var l=bn($.container)?$.container:document.querySelector($.container),i=l.getBoundingClientRect(),o=i.width,r=i.height,s=i.left,a=i.top;e=gn({},e,{width:o,height:r,left:s,top:a})}t=t||e.width-2*$.margin,n=n||e.height-2*$.margin;var c=C.zoomedHd||C.original,u=kn(c)?t:c.naturalWidth||t,d=kn(c)?n:c.naturalHeight||n,p=c.getBoundingClientRect(),h=p.top,m=p.left,g=p.width,f=p.height,v=Math.min(Math.max(g,u),t)/g,b=Math.min(Math.max(f,d),n)/f,k=Math.min(v,b),y=((t-g)/2-m+$.margin+e.left)/k,w=((n-f)/2-h+$.margin+e.top)/k,x="scale("+k+") translate3d("+y+"px, "+w+"px, 0)";C.zoomed.style.transform=x,C.zoomedHd&&(C.zoomedHd.style.transform=x)};return new l((function(e){if(t&&-1===k.indexOf(t))e(E);else{var l=function t(){w=!1,C.zoomed.removeEventListener("transitionend",t),C.original.dispatchEvent($n("medium-zoom:opened",{detail:{zoom:E}})),e(E)};if(C.zoomed)e(E);else{if(t)C.original=t;else{if(!(k.length>0))return void e(E);var i=k;C.original=i[0]}if(C.original.dispatchEvent($n("medium-zoom:open",{detail:{zoom:E}})),x=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,w=!0,C.zoomed=xn(C.original),document.body.appendChild(F),$.template){var o=bn($.template)?$.template:document.querySelector($.template);C.template=document.createElement("div"),C.template.appendChild(o.content.cloneNode(!0)),document.body.appendChild(C.template)}if(C.original.parentElement&&"PICTURE"===C.original.parentElement.tagName&&C.original.currentSrc&&(C.zoomed.src=C.original.currentSrc),document.body.appendChild(C.zoomed),window.requestAnimationFrame((function(){document.body.classList.add("medium-zoom--opened")})),C.original.classList.add("medium-zoom-image--hidden"),C.zoomed.classList.add("medium-zoom-image--opened"),C.zoomed.addEventListener("click",m),C.zoomed.addEventListener("transitionend",l),C.original.getAttribute("data-zoom-src")){C.zoomedHd=C.zoomed.cloneNode(),C.zoomedHd.removeAttribute("srcset"),C.zoomedHd.removeAttribute("sizes"),C.zoomedHd.removeAttribute("loading"),C.zoomedHd.src=C.zoomed.getAttribute("data-zoom-src"),C.zoomedHd.onerror=function(){clearInterval(r),console.warn("Unable to reach the zoom image target "+C.zoomedHd.src),C.zoomedHd=null,n()};var r=setInterval((function(){C.zoomedHd.complete&&(clearInterval(r),C.zoomedHd.classList.add("medium-zoom-image--opened"),C.zoomedHd.addEventListener("click",m),document.body.appendChild(C.zoomedHd),n())}),10)}else if(C.original.hasAttribute("srcset")){C.zoomedHd=C.zoomed.cloneNode(),C.zoomedHd.removeAttribute("sizes"),C.zoomedHd.removeAttribute("loading");var s=C.zoomedHd.addEventListener("load",(function(){C.zoomedHd.removeEventListener("load",s),C.zoomedHd.classList.add("medium-zoom-image--opened"),C.zoomedHd.addEventListener("click",m),document.body.appendChild(C.zoomedHd),n()}))}else n()}}}))},m=function(){return new l((function(e){if(!w&&C.original){var t=function t(){C.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(C.zoomed),C.zoomedHd&&document.body.removeChild(C.zoomedHd),document.body.removeChild(F),C.zoomed.classList.remove("medium-zoom-image--opened"),C.template&&document.body.removeChild(C.template),w=!1,C.zoomed.removeEventListener("transitionend",t),C.original.dispatchEvent($n("medium-zoom:closed",{detail:{zoom:E}})),C.original=null,C.zoomed=null,C.zoomedHd=null,C.template=null,e(E)};w=!0,document.body.classList.remove("medium-zoom--opened"),C.zoomed.style.transform="",C.zoomedHd&&(C.zoomedHd.style.transform=""),C.template&&(C.template.style.transition="opacity 150ms",C.template.style.opacity=0),C.original.dispatchEvent($n("medium-zoom:close",{detail:{zoom:E}})),C.zoomed.addEventListener("transitionend",t)}else e(E)}))},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target;return C.original?m():h({target:t})},f=function(){return $},v=function(){return k},b=function(){return C.original},k=[],y=[],w=!1,x=0,$=n,C={original:null,zoomed:null,zoomedHd:null,template:null};"[object Object]"===Object.prototype.toString.call(t)?$=t:(t||"string"===typeof t)&&c(t),$=gn({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},$);var F=wn($.background);document.addEventListener("click",i),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",m);var E={open:h,close:m,toggle:g,update:s,clone:a,attach:c,detach:u,on:d,off:p,getOptions:f,getImages:v,getZoomedImage:b};return E};
/*! medium-zoom 1.0.8 | MIT License | https://github.com/francoischalifour/medium-zoom */function Fn(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var En=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Fn(En);var Sn=Cn;const Tn=e=>{const t=e.value,n=t.substring(0,e.selectionStart),l=t.substring(e.selectionEnd,t.length),i=n.lastIndexOf("\n"),o=n.substring(0,i+1),r=l.indexOf("\n"),s=l.substring(-1===r?l.length:r,l.length),a=n.substring(i+1,n.length),c=l.substring(0,r);return{prefixStr:n,subfixStr:l,prefixStrEndRow:o,subfixStrEndRow:s,prefixSupply:a,subfixSupply:c}},Ln=(e,t="",n,l)=>{var i,o,r,s,a,c;let u,d,p="",h=0,m=0,g=!1;const f=null==(i=we.editorConfig)?void 0:i.mermaidTemplate;if(/^h[1-6]{1}$/.test(e)){const n=e.replace(/^h(\d)/,((e,t)=>new Array(Number(t)).fill("#",0,t).join("")));p=`${n} ${t}`,h=n.length+1}else{if("prettier"===e){const e=window.prettier||(null==(r=null==(o=we.editorExtensions)?void 0:o.prettier)?void 0:r.prettierInstance),t=[(null==(s=window.prettierPlugins)?void 0:s.markdown)||(null==(c=null==(a=we.editorExtensions)?void 0:a.prettier)?void 0:c.parserMarkdownInstance)];return e&&void 0!==t[0]?e.format(n.value,{parser:"markdown",plugins:t}):(Ce.emit(l.editorId,"errorCatcher",{name:"prettier",message:"prettier is undefined"}),n.value)}switch(e){case"bold":p=`**${t}**`,h=2,m=-2;break;case"underline":p=`${t} `,h=3,m=-4;break;case"italic":p=`*${t}*`,h=1,m=-1;break;case"strikeThrough":p=`~${t}~`,h=1,m=-1;break;case"sub":p=`${t} `,h=5,m=-6;break;case"sup":p=`${t} `,h=5,m=-6;break;case"codeRow":p="`"+t+"`",h=1,m=-1;break;case"quote":p=`> ${t}`,h=2;break;case"orderedList":p=`1. ${t}`,h=3;break;case"unorderedList":p=`- ${t}`,h=2;break;case"task":p=`- [ ] ${t}`,h=6,g=!0;break;case"code":{const e=l.text||t||"",n=l.mode||"language";p=`\`\`\`${n}\n${e}\n\`\`\`\n`,h=3,m=3+n.length-p.length,g=!0;break}case"table":{p="|";const{selectedShape:e={x:1,y:1}}=l,{x:t,y:n}=e;for(let l=0;l<=n;l++)p+=" col |";p+="\n|";for(let l=0;l<=n;l++)p+=" - |";for(let l=0;l<=t;l++){p+="\n|";for(let e=0;e<=n;e++)p+=" content |"}h=2,m=5-p.length,g=!0;break}case"link":{const{desc:e,url:t}=l;p=`[${e}](${t})`;break}case"image":{const{desc:e,url:t,urls:n}=l;p=n instanceof Array?n.reduce(((t,n)=>t+` \n`),""):` \n`;break}case"tab":{const{tabWidth:e=2}=l,i=new Array(e).fill(" ").join("");if(""===t)p=i;else if(/\n/.test(t)){const{prefixStr:l,subfixStr:o,prefixSupply:r,subfixSupply:s}=Tn(n),a=`${r}${t}${s}`,c=a.split("\n");p=c.map((e=>`${i}${e}`)).join("\n"),u=l.substring(0,l.length-r.length),d=o.substring(s.length,o.length),g=!0,h=e,m=-r.length-s.length}else{const e=n.value,l=e.substring(0,n.selectionStart);/\n$/.test(l)||""===l?(p=`${i}${t}`,g=!0):p=i}break}case"shiftTab":{const{tabWidth:e=2}=l,{prefixStr:i,prefixStrEndRow:o,subfixStrEndRow:r,prefixSupply:s,subfixSupply:a}=Tn(n),c=new RegExp(`^\\s{${e}}`),u=(l=!1,u=!1)=>{const d=`${s}${t}${a}`;if(c.test(d)){const s=i.length-(u?0:e),a=l?s+t.length-e:s;return Fe(n,s,a),`${o}${d.replace(c,"")}${r}`}if(/^\s/.test(d)){const e=d.replace(/^\s/,""),i=d.length-e.length,s=n.selectionStart-(u?0:i),a=l?s+t.length-i:s;return Fe(n,s,a),`${o}${e}${r}`}p=t};if(""===t){const e=u();if(e)return e}else{if(/\n/.test(t)){const l=`${s}${t}${a}`,i=l.split("\n");let[u,d]=[0,0];const p=i.map(((t,n)=>{if(c.test(t))return 0===n&&(u=e),d+=e,t.replace(c,"");if(/^\s/.test(t)){const e=t.replace(/^\s/,"");return d+=t.length-e.length,e}return t})).join("\n");return Fe(n,n.selectionStart-u,n.selectionEnd-d),`${o}${p}${r}`}{const e=u(!0,!0);if(e)return e}}break}case"ctrlC":{const{prefixSupply:e,subfixSupply:l}=Tn(n);return mn(""===t?`${e}${l}`:t),n.value}case"ctrlX":{const{prefixStrEndRow:e,subfixStrEndRow:l,prefixStr:i,subfixStr:o,prefixSupply:r,subfixSupply:s}=Tn(n);return""===t?(mn(`${r}${s}`),Fe(n,e.length),`${e}${l.replace(/^\n/,"")}`):(mn(t),Fe(n,i.length),`${i}${o}`)}case"ctrlD":{const{prefixStrEndRow:e,subfixStrEndRow:t}=Tn(n);return Fe(n,e.length),`${e}${t.replace(/^\n/,"")}`}case"flow":p=`\`\`\`mermaid\n${(null==f?void 0:f.flow)||"flowchart TD \n Start --\x3e Stop"}\n\`\`\`\n`,h=2;break;case"sequence":p=`\`\`\`mermaid\n${(null==f?void 0:f.sequence)||"sequenceDiagram\n A->>B: hello!\n B--\x3e>A: hi!\n A-)B: bye!"}\n\`\`\`\n`,h=2;break;case"gantt":p=`\`\`\`mermaid\n${(null==f?void 0:f.gantt)||"gantt\ntitle A Gantt Diagram\ndateFormat YYYY-MM-DD\nsection Section\nA task :a1, 2014-01-01, 30d\nAnother task :after a1, 20d"}\n\`\`\`\n`,h=2;break;case"class":p=`\`\`\`mermaid\n${(null==f?void 0:f.class)||"classDiagram\n class Animal\n Vehicle <|-- Car"}\n\`\`\`\n`,h=2;break;case"state":p=`\`\`\`mermaid\n${(null==f?void 0:f.state)||"stateDiagram-v2\n s1 --\x3e s2"}\n\`\`\`\n`,h=2;break;case"pie":p=`\`\`\`mermaid\n${(null==f?void 0:f.pie)||'pie title Pets adopted by volunteers\n "Dogs" : 386\n "Cats" : 85\n "Rats" : 15'}\n\`\`\`\n`,h=2;break;case"relationship":p=`\`\`\`mermaid\n${(null==f?void 0:f.relationship)||"erDiagram\n CAR ||--o{ NAMED-DRIVER : allows\n PERSON ||--o{ NAMED-DRIVER : is"}\n\`\`\`\n`,h=2;break;case"journey":p=`\`\`\`mermaid\n${(null==f?void 0:f.journey)||"journey\n title My working day\n section Go to work\n Make tea: 5: Me\n Go upstairs: 3: Me\n Do work: 1: Me, Cat\n section Go home\n Go downstairs: 5: Me\n Sit down: 5: Me"}\n\`\`\`\n`,h=2;break;case"katexInline":p="$$",h=1,m=-1;break;case"katexBlock":p="$$\n\n$$\n",h=1,m=-4;break;case"universal":{const{generate:e}=l,n=e(t);p=n.targetValue,g=n.select,h=n.deviationStart,m=n.deviationEnd}}}return Ee(n,p,{deviationStart:h,deviationEnd:m,select:g,prefixVal:u,subfixVal:d})};var zn={block(e,t){return{name:"KaTexBlockExtension",level:"block",start:e=>{var t;return null==(t=e.match(/\n\$\$/))?void 0:t.index},tokenizer(e){if(/^\$\$/.test(e)&&e.split("$$").length>2){const t=_e(e,"$$");return{type:"KaTexBlockExtension",raw:t[0],text:t[1].trim(),tokens:[]}}},renderer(n){const l=t||"undefined"!==typeof window&&window.katex;if(l){const t=l.renderToString(n.text,{throwOnError:!1,displayMode:!0});return`${t}
`}return`${n.text}
`}}},inline(e,t){return{name:"KaTexInlineExtension",level:"inline",start:e=>{var t;return null==(t=e.match(/\$[^\n]*/))?void 0:t.index},tokenizer(e){if(/^\$[^\n]*\$/.test(e)){const t=_e(e);return{type:"KaTexInlineExtension",raw:t[0],text:t[1].trim(),tokens:[]}}},renderer(n){const l=t||"undefined"!==typeof window&&window.katex;if(l){const t=l.renderToString(n.text,{throwOnError:!1});return`${t} `}return`${n.text} `}}}};const An=["abstract","attention","bug","caution","danger","error","example","failure","hint","info","note","question","quote","success","tip","warning"],In=new RegExp(`^!!!\\s*(${An.join("|")})\\s*(.*)$`),_n=/^!!!\s*$/,jn={name:"alert",level:"block",start(e){var t;const n=null==(t=e.match(new RegExp(`(^|[\\r\\n])!!!\\s*(${An.join("|")})\\s*(.*)`)))?void 0:t.index;return n},tokenizer(e){const t=e.split(/\n/);if(In.test(t[0])){const e={x:-1,y:-1},n=[];for(let l=0,i=t.length;l=0&&(n.push(oe({},e)),e.x=-1,e.y=-1));if(n.length){const e=n[0],[l,i,o]=In.exec(t[e.x])||[],r=t.slice(e.x+1,e.y).join("\n"),s=t.slice(e.x,e.y+1).join("\n"),a={type:"alert",raw:s,icon:i,title:o,text:r,titleTokens:[],tokens:[],childTokens:["title","text"]};return this.lexer.inlineTokens(a.title,a.titleTokens),this.lexer.blockTokens(a.text,a.tokens),a}}},renderer(e){const t=`\n
${this.parser.parseInline(e.titleTokens,null)}
\n ${this.parser.parse(e.tokens)}\n
`;return t}},Rn="undefined"===typeof window,Dn=(e,t,n)=>{var i,o;const r=(0,l.WQ)("previewOnly"),s=(0,l.WQ)("historyLength"),a=(0,l.WQ)("editorId");if(r)return;let c=-1;const u={list:[{content:e.value,startPos:(null==(i=t.value)?void 0:i.selectionStart)||0,endPos:(null==(o=t.value)?void 0:o.selectionEnd)||0}],userUpdated:!0,curr:0},d=[0,0];let p=d;const h=n=>{var l,i;const o=(null==(l=t.value)?void 0:l.selectionStart)||0,r=(null==(i=t.value)?void 0:i.selectionEnd)||0;u.list[u.curr].startPos=o,u.list[u.curr].endPos=r,u.userUpdated=!1,u.curr=n;const s=u.list[u.curr];p=[s.startPos,s.endPos],e.onChange(s.content),Fe(t.value,s.startPos,s.endPos).then((()=>{Ce.emit(a,"selectTextChange")}))},m=e=>{var n,l;clearTimeout(c);const i=(null==(n=t.value)?void 0:n.selectionStart)||0,o=(null==(l=t.value)?void 0:l.selectionEnd)||0;c=setTimeout((()=>{if(u.userUpdated){u.currs&&u.list.shift();const t=u.list.pop()||{startPos:0,endPos:0,content:e};t.startPos=p[0],t.endPos=p[1],p=d,Array.prototype.push.call(u.list,t,{content:e,startPos:i,endPos:o}),u.curr=u.list.length-1}else u.userUpdated=!0}),150)},g=e=>{var n,l;(p===d||e)&&(p=[null==(n=t.value)?void 0:n.selectionStart,null==(l=t.value)?void 0:l.selectionEnd])};(0,l.wB)([(0,X.lW)(e,"value"),n],(()=>{n.value&&m(e.value)})),(0,l.wB)((()=>e.value),(()=>{Ce.emit(a,"selectTextChange")}),{flush:"post"}),(0,l.sV)((()=>{Ce.on(a,{name:"ctrlZ",callback(){h(u.curr-1<0?0:u.curr-1)}}),Ce.on(a,{name:"ctrlShiftZ",callback(){h(u.curr+1===u.list.length?u.curr:u.curr+1)}}),Ce.on(a,{name:"saveHistoryPos",callback:g})}))},Pn=(e,t)=>{var n;const i=null==(n=we.editorExtensions)?void 0:n.katex,o=null==i?void 0:i.instance,r=(0,X.KR)(!1);return e.noKatex||t.use({extensions:[zn.inline(se,o),zn.block(se,o)]}),(0,l.sV)((()=>{if(!e.noKatex&&!o){const e=document.createElement("script");e.src=(null==i?void 0:i.js)||ke.js,e.onload=()=>{r.value=!0},e.id=`${se}-katex`;const t=document.createElement("link");t.rel="stylesheet",t.href=(null==i?void 0:i.css)||ke.css,t.id=`${se}-katexCss`,Oe(e,"katex"),Oe(t)}})),r},Mn=e=>{var t,n,i;const{markedRenderer:o,markedExtensions:r,markedOptions:s,editorExtensions:a,editorConfig:c}=we,u=(0,l.WQ)("showCodeRowNumber"),d=(0,l.WQ)("editorId"),p=(0,l.WQ)("highlight"),h=(0,l.WQ)("previewOnly"),m=null==(t=null==a?void 0:a.highlight)?void 0:t.instance,g=null==(n=null==a?void 0:a.mermaid)?void 0:n.instance,f=null==(i=null==a?void 0:a.katex)?void 0:i.instance,v=null==a?void 0:a.katex,b=(0,X.KR)(!1),k=(0,X.KR)([]);let y=[],w=[],x=new sn.Renderer;x.image=(e,t,n)=>`${n||""} `,x.listitem=(e,t)=>t?`${e} `:`${e} `,o instanceof Function&&(x=o(x));const $=x.code;x.code=(t,n,l)=>{if(!e.noMermaid&&"mermaid"===n){const e=Pe();try{if(Rn)return`${t}
`;{const n=g||window.mermaid;if(!n)return`${t}
`;y.push(n.mermaidAPI.render(e,t))}const n=`