@doocs/md-cli 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/apple-touch-icon.png +0 -0
  2. package/dist/favicon-16x16.png +0 -0
  3. package/dist/favicon-32x32.png +0 -0
  4. package/dist/favicon.ico +0 -0
  5. package/dist/index.html +17 -3
  6. package/dist/manifest.webmanifest +1 -0
  7. package/dist/pwa-192x192-maskable.png +0 -0
  8. package/dist/pwa-192x192.png +0 -0
  9. package/dist/pwa-512x512-maskable.png +0 -0
  10. package/dist/pwa-512x512.png +0 -0
  11. package/dist/registerSW.js +1 -0
  12. package/dist/static/css/md-index-B4AMcWDE.css +1 -0
  13. package/dist/static/css/md-vendor_-D8IL6iVj.css +1 -0
  14. package/dist/static/js/md-hljs-DzXSk77f.js +10 -0
  15. package/dist/static/js/md-index-CvCnfZRB.js +626 -0
  16. package/dist/static/js/md-mermaid-BPz6h6Vo.js +1972 -0
  17. package/dist/static/js/md-vendor_.pnpm-BdZ7DMjQ.js +1245 -0
  18. package/dist/sw.js +1 -0
  19. package/dist/workbox-3aa584b4.js +1 -0
  20. package/index.js +48 -29
  21. package/package.json +8 -6
  22. package/server.js +106 -0
  23. package/util.js +53 -100
  24. package/dist/static/css/md-index-CwlSfNZa.css +0 -1
  25. package/dist/static/js/md-_basePickBy-6ybsJX4x.js +0 -1
  26. package/dist/static/js/md-_baseUniq-C2ybNeBy.js +0 -1
  27. package/dist/static/js/md-arc-Bvhvbfcq.js +0 -1
  28. package/dist/static/js/md-architectureDiagram-IEHRJDOE-CD797YU5.js +0 -36
  29. package/dist/static/js/md-blockDiagram-JOT3LUYC-NxgsmysZ.js +0 -121
  30. package/dist/static/js/md-c4Diagram-VJAJSXHY-C_QBJ76C.js +0 -10
  31. package/dist/static/js/md-channel-T3FtoWLA.js +0 -1
  32. package/dist/static/js/md-chunk-4BMEZGHF-B0f1u3NG.js +0 -1
  33. package/dist/static/js/md-chunk-A2AXSNBT-CPXsz34E.js +0 -164
  34. package/dist/static/js/md-chunk-AEK57VVT-CzkfXXrX.js +0 -220
  35. package/dist/static/js/md-chunk-D6G4REZN-L36E8ytS.js +0 -1
  36. package/dist/static/js/md-chunk-RZ5BOZE2-wCxCYXfv.js +0 -1
  37. package/dist/static/js/md-chunk-XZIHB7SX-nZwkN4Me.js +0 -1
  38. package/dist/static/js/md-classDiagram-GIVACNV2-BwldW2WM.js +0 -1
  39. package/dist/static/js/md-classDiagram-v2-COTLJTTW-BwldW2WM.js +0 -1
  40. package/dist/static/js/md-clone-BnmGrwCC.js +0 -1
  41. package/dist/static/js/md-cytoscape.esm-BKRYsM4t.js +0 -191
  42. package/dist/static/js/md-dagre-OKDRZEBW-BrUIbTpL.js +0 -4
  43. package/dist/static/js/md-diagram-SSKATNLV-C6aV2Syz.js +0 -43
  44. package/dist/static/js/md-diagram-VNBRO52H-CMSixOy2.js +0 -24
  45. package/dist/static/js/md-erDiagram-Q7BY3M3F-CFf59yHU.js +0 -60
  46. package/dist/static/js/md-flowDiagram-4HSFHLVR-B7Q1A2HV.js +0 -161
  47. package/dist/static/js/md-ganttDiagram-APWFNJXF-DhvQZFe3.js +0 -257
  48. package/dist/static/js/md-gitGraphDiagram-7IBYFJ6S-DC_6TQJa.js +0 -65
  49. package/dist/static/js/md-graph-yVHbLpuH.js +0 -1
  50. package/dist/static/js/md-index-4K8vrVBp.js +0 -1420
  51. package/dist/static/js/md-infoDiagram-PH2N3AL5-xVb-dRKj.js +0 -2
  52. package/dist/static/js/md-init-Gi6I4Gst.js +0 -1
  53. package/dist/static/js/md-journeyDiagram-U35MCT3I-DXpRkO1g.js +0 -138
  54. package/dist/static/js/md-kanban-definition-NDS4AKOZ-X9VrCEnQ.js +0 -88
  55. package/dist/static/js/md-layout-Drj-TQiV.js +0 -1
  56. package/dist/static/js/md-linear-CyC-SZqE.js +0 -1
  57. package/dist/static/js/md-mindmap-definition-ALO5MXBD-B1b4s-xJ.js +0 -95
  58. package/dist/static/js/md-ordinal-CxVaQH2l.js +0 -1
  59. package/dist/static/js/md-pieDiagram-IB7DONF6-BqHgJG9f.js +0 -30
  60. package/dist/static/js/md-quadrantDiagram-7GDLP6J5-Dy5qehP9.js +0 -7
  61. package/dist/static/js/md-radar-MK3ICKWK-CxWAMR2W.js +0 -128
  62. package/dist/static/js/md-requirementDiagram-KVF5MWMF-D0Nwe7Nw.js +0 -64
  63. package/dist/static/js/md-sankeyDiagram-QLVOVGJD-DlX1f6cH.js +0 -10
  64. package/dist/static/js/md-sequenceDiagram-X6HHIX6F-DyPBZGqk.js +0 -122
  65. package/dist/static/js/md-stateDiagram-DGXRK772-8Kif4E8Q.js +0 -1
  66. package/dist/static/js/md-stateDiagram-v2-YXO3MK2T-Cx_SEk82.js +0 -1
  67. package/dist/static/js/md-timeline-definition-BDJGKUSR-BZGK3wfS.js +0 -61
  68. package/dist/static/js/md-xychartDiagram-VJFVF3MP-DT5XWb5g.js +0 -7
  69. package/mm.config.js +0 -55
@@ -0,0 +1,626 @@
1
+ import{aJ as defineComponent,aK as ref,aL as onMounted,aM as createBlock,aN as openBlock,aO as withCtx,aP as createElementBlock,aQ as createCommentVNode,aR as unref,aS as createBaseVNode,aT as Transition,aU as mergeProps,aV as Toaster_default,H as d,aW as DOMPurify,aX as deflateSync,aY as cloneDeep,aZ as toMerged,a_ as frontMatter,a$ as readingTime,b0 as unified,b1 as remarkParse,b2 as visit,b3 as remarkStringify,b4 as axios,b5 as gu,b6 as prettierPluginCss,b7 as prettierPluginMarkdown,b8 as prettierPluginBabel,b9 as prettierPluginEstree,ba as juice,bb as B,bc as defineStore,bd as useDark,be as useStorage,bf as computed,bg as v4,bh as onBeforeUnmount,bi as onBeforeMount,bj as watch,bk as toRaw,bl as reactive,bm as markRaw,bn as CodeMirror,bo as useToggle,bp as toast,bq as toPng,br as storeToRefs,bs as toDisplayString,bt as Se,bu as renderSlot,bv as normalizeProps,bw as guardReactiveProps,bx as Tv,by as twMerge,bz as clsx,bA as createVNode,bB as kv,bC as Ov,bD as Av,bE as normalizeClass,bF as O,bG as cva,bH as Nv,bI as Mv,bJ as Fv,bK as Vv,bL as nu,bM as $u,bN as Pu,bO as Xl,bP as X,bQ as Iv,bR as useVModel,bS as withDirectives,bT as vModelText,bU as isRef,bV as Vh,bW as Ot,bX as Bu,bY as toTypedSchema,bZ as create$3,b_ as create$6,b$ as createTextVNode,c0 as Info,c1 as Form,c2 as Field,c3 as gy,c4 as Cy,c5 as Plus,c6 as by,c7 as wy,c8 as Minus,c9 as Fragment,ca as renderList,cb as Cg,cc as useLocalStorage,cd as useTemplateRef,ce as nextTick,cf as gg,cg as bg,ch as _g,ci as Ky,cj as Xy,ck as qy,cl as Yy,cm as Check,cn as Jy,co as tg,cp as ChevronDown,cq as eg,cr as ChevronUp,cs as Hy,ct as ng,cu as ag,cv as Wy,cw as jy,cx as Qy,cy as wg,cz as xg,cA as create$7,cB as useFileDialog,cC as withModifiers,cD as CloudUpload,cE as normalizeStyle,cF as Re,cG as Sun,cH as Moon,cI as Iu,cJ as vShow,cK as PenLine,cL as List,cM as throttle,cN as onUnmounted,cO as ArrowUpFromLine,cP as rm,cQ as um,cR as dm,cS as vm,cT as fm,cU as im,cV as Hg,cW as Wg,cX as Ug,cY as qg,cZ as jg,c_ as customRef,c$ as ou,d0 as Settings,d1 as Trash2,d2 as Copy,d3 as SquarePen,d4 as RefreshCcw,d5 as resolveDynamicComponent,d6 as Pause,d7 as Send,d8 as Bot,d9 as Rv,da as ap,db as uh,dc as fh,dd as ch,de as vh,df as dh,dg as resolveComponent,dh as ChevronRight,di as Ellipsis,dj as SquarePlus,dk as History,dl as Ch,dm as hh,dn as gh,dp as Circle,dq as wh,dr as withKeys,ds as ArrowUpNarrowWide,dt as ChevronsDownUp,du as ChevronsUpDown,dv as Wv,dw as jv,dx as Uh,dy as Gh,dz as Xh,dA as Yh,dB as ay,dC as ty,dD as qh,dE as Rh,dF as Oh,dG as kh,dH as Ah,dI as ey,dJ as sy,dK as ry,dL as iy,dM as Jh,dN as Undo2,dO as Redo2,dP as Table,dQ as ContactRound,dR as ClipboardPaste,dS as vModelCheckbox,dT as Expand,dU as Upload,dV as Download,dW as FileCode,dX as FileText,dY as FileCog,dZ as useClipboard,d_ as PanelLeftOpen,d$ as PanelLeftClose,e0 as reactiveOmit,e1 as useForwardPropsEmits,e2 as GripVertical,e3 as SplitterResizeHandle_default,e4 as SplitterGroup_default,e5 as Replace,e6 as ReplaceAll,e7 as useDebounceFn,e8 as qiniu,e9 as Buffer,ea as COS,eb as OSS,ec as CryptoJS,ed as S3Client,ee as getSignedUrl,ef as PutObjectCommand,eg as upload,eh as SplitterPanel_default,ei as Eye,ej as Pen,ek as codemirrorExports,el as createApp,em as createPinia}from"./md-vendor_.pnpm-BdZ7DMjQ.js";import{H as HighlightJS}from"./md-hljs-DzXSk77f.js";import{m as mermaid_default}from"./md-mermaid-BPz6h6Vo.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function o(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(n){if(n.ep)return;n.ep=!0;const r=o(n);fetch(n.href,r)}})();const _hoisted_1$q={key:0,class:"loading"},_sfc_main$1K=defineComponent({__name:"AppSplash",setup(t){const e=ref(!0);return onMounted(()=>{setTimeout(()=>{e.value=!1},100)}),(o,a)=>(openBlock(),createBlock(Transition,{name:"fade"},{default:withCtx(()=>[unref(e)?(openBlock(),createElementBlock("div",_hoisted_1$q,a[0]||(a[0]=[createBaseVNode("strong",null,"致力于让 Markdown 编辑更简单",-1)]))):createCommentVNode("",!0)]),_:1}))}}),_export_sfc=(t,e)=>{const o=t.__vccOpts||t;for(const[a,n]of e)o[a]=n;return o},__unplugin_components_0$3=_export_sfc(_sfc_main$1K,[["__scopeId","data-v-8d32b142"]]),_sfc_main$1J=defineComponent({__name:"Sonner",props:{id:{},invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(Toaster_default),mergeProps({class:"toaster group"},e),null,16))}});function ucfirst(t){return t.slice(0,1).toUpperCase()+t.slice(1).toLowerCase()}function renderMarkdown(t,e){const{markdownContent:o,readingTime:a}=e.parseFrontMatterAndContent(t);let n=d.parse(o);return n=DOMPurify.sanitize(n,{ADD_TAGS:["mp-common-profile"]}),{html:n,readingTime:a}}function postProcessHtml(t,e,o){let a=t;return a=o.buildReadingTime(e)+a,a=a.replace(/(style=".*?)"/,'$1;margin-top: 0"'),a+=o.buildFootnotes(),a+=o.buildAddition(),a+=`
2
+ <style>
3
+ .hljs.code__pre > .mac-sign {
4
+ display: ${o.getOpts().isMacCodeBlock?"flex":"none"};
5
+ }
6
+ </style>
7
+ `,a+=`
8
+ <style>
9
+ .code__pre {
10
+ padding: 0 !important;
11
+ }
12
+
13
+ .hljs.code__pre code {
14
+ display: -webkit-box;
15
+ padding: 0.5em 1em 1em;
16
+ overflow-x: auto;
17
+ text-indent: 0;
18
+ }
19
+ h2 strong {
20
+ color: inherit !important;
21
+ }
22
+ </style>
23
+ `,o.createContainer(a)}function customizeTheme(t,e){const o=JSON.parse(JSON.stringify(t)),{fontSize:a,color:n}=e;if(a)for(let r=1;r<=6;r++){const s=o.block[`h${r}`]["font-size"];o.block[`h${r}`]["font-size"]=`${a*Number.parseFloat(s)}px`}return n&&(o.base["--md-primary-color"]=n),o}function customCssWithTemplate(t,e,o){const a=customizeTheme(o,{color:e}),n=(l,u,c)=>{c.forEach(p=>{u[p]&&(l[p]=Object.assign(l[p]||{},u[p]))})},r=["container","h1","h2","h3","h4","h5","h6","code","code_pre","p","hr","blockquote","blockquote_note","blockquote_tip","blockquote_important","blockquote_warning","blockquote_caution","blockquote_p","blockquote_p_note","blockquote_p_tip","blockquote_p_important","blockquote_p_warning","blockquote_p_caution","blockquote_title","blockquote_title_note","blockquote_title_tip","blockquote_title_important","blockquote_title_warning","blockquote_title_caution","image","ul","ol","block_katex"],s=["listitem","codespan","link","wx_link","strong","table","thead","td","footnote","figcaption","em","inline_katex"];return n(a.block,t,r),n(a.inline,t,s),a}function getStyleString(t){return Object.entries(t??{}).map(([e,o])=>`${e}: ${o}`).join("; ")}function markedAlert(t={}){const{className:e="markdown-alert",variants:o=[],withoutStyle:a=!1}=t,n=resolveVariants(o);function r(l,u,c=!1){const{styles:p}=t;return{className:e,variant:l,icon:u.icon,title:u.title??ucfirst(l),titleClassName:`${e}-title`,fromContainer:c,wrapperStyle:{...p==null?void 0:p.blockquote,...p==null?void 0:p[`blockquote_${l}`]},titleStyle:{...p==null?void 0:p.blockquote_title,...p==null?void 0:p[`blockquote_title_${l}`]},contentStyle:{...p==null?void 0:p.blockquote_p,...p==null?void 0:p[`blockquote_p_${l}`]}}}function s(l){var i;const{meta:u,tokens:c=[]}=l;let p=this.parser.parse(c);p=p.replace(/<p .*?>/g,`<p style="${getStyleString(u.contentStyle)}">`);let w=`<blockquote class="${u.className} ${u.className}-${u.variant}" style="${getStyleString(u.wrapperStyle)}">
24
+ `;return w+=`<p class="${u.titleClassName}" style="${getStyleString(u.titleStyle)}">`,a||(w+=u.icon.replace("<svg",`<svg style="fill: ${((i=u.titleStyle)==null?void 0:i.color)??"inherit"}"`)),w+=u.title,w+=`</p>
25
+ `,w+=p,w+=`</blockquote>
26
+ `,w}return{walkTokens(l){var c,p,w,i;if(l.type!=="blockquote")return;const u=n.find(({type:C})=>new RegExp(createSyntaxPattern(C),"i").test(l.text));if(u){const{type:C}=u,$=new RegExp(createSyntaxPattern(C),"i");Object.assign(l,{type:"alert",meta:r(C,u)});const g=(c=l.tokens)==null?void 0:c[0];if((p=g.raw)==null?void 0:p.replace($,"").trim()){const h=g.tokens[0];Object.assign(h,{raw:h.raw.replace($,""),text:h.text.replace($,"")}),((w=g.tokens[1])==null?void 0:w.type)==="br"&&g.tokens.splice(1,1)}else(i=l.tokens)==null||i.shift()}},extensions:[{name:"alert",level:"block",renderer:s},{name:"alertContainer",level:"block",start(l){var u;return(u=l.match(/^:::/))==null?void 0:u.index},tokenizer(l,u){const c=/^:::\s*(\w+)\s*\n([\s\S]*?)\n:::/.exec(l);if(c){const[p,w,i]=c,C=n.find($=>$.type===w);return C?{type:"alert",raw:p,text:i.trim(),tokens:this.lexer.blockTokens(i.trim()),meta:r(w,C,!0)}:void 0}},renderer:s}]}}const defaultAlertVariant=[{type:"note",icon:'<svg class="octicon octicon-info" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},{type:"info",icon:'<svg class="octicon octicon-info" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},{type:"tip",icon:'<svg class="octicon octicon-light-bulb" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>'},{type:"important",icon:'<svg class="octicon octicon-report" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>'},{type:"warning",icon:'<svg class="octicon octicon-alert" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>'},{type:"caution",icon:'<svg class="octicon octicon-stop" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'}];function resolveVariants(t){return t.length?Object.values([...defaultAlertVariant,...t].reduce((e,o)=>(e[o.type]=o,e),{})):defaultAlertVariant}function createSyntaxPattern(t){return`^(?:\\[!${t}])\\s*?
27
+ *`}const fnMap=new Map;function markedFootnotes(){return{extensions:[{name:"footnoteDef",level:"block",start(t){var e;return fnMap.clear(),(e=t.match(/^\[\^/))==null?void 0:e.index},tokenizer(t){const e=t.match(/^\[\^(.*)\]:(.*)/);if(e){const[o,a,n]=e,r=fnMap.size+1;return fnMap.set(a,{index:r,text:n}),{type:"footnoteDef",raw:o,fnId:a,index:r,text:n}}},renderer(t){const{index:e,text:o,fnId:a}=t,n=`
28
+ <code>${e}.</code>
29
+ <span>${o}</span>
30
+ <a id="fnDef-${a}" href="#fnRef-${a}" style="color: var(--md-primary-color);">↩︎</a>
31
+ <br>`;return e===1?`
32
+ <p style="font-size: 80%;margin: 0.5em 8px;word-break:break-all;">${n}`:e===fnMap.size?`${n}</p>`:n}},{name:"footnoteRef",level:"inline",start(t){var e;return(e=t.match(/\[\^/))==null?void 0:e.index},tokenizer(t){const e=t.match(/^\[\^(.*?)\]/);if(e){const[o,a]=e;if(fnMap.has(a))return{type:"footnoteRef",raw:o,fnId:a}}},renderer(t){const{fnId:e}=t,{index:o}=fnMap.get(e);return`<sup style="color: var(--md-primary-color);">
33
+ <a href="#fnDef-${e}" id="fnRef-${e}">[${o}]</a>
34
+ </sup>`}}]}}const inlineRule=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:?!。,:]|$)/,inlineRuleNonStandard=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1/,blockRule=/^\s{0,3}(\${1,2})[ \t]*\n([\s\S]+?)\n\s{0,3}\1[ \t]*(?:\n|$)/;function createRenderer(t,e,o){return a=>{window.MathJax.texReset();const r=window.MathJax.tex2svg(a.text,{display:t}).firstChild,s=r.style["min-width"]||r.getAttribute("width");return r.removeAttribute("width"),r.style.display="initial",r.style.maxWidth="300vw",r.style.flexShrink="0",r.style.width=s,t?`<section ${o}>${r.outerHTML}</section>`:`<span ${e}>${r.outerHTML}</span>`}}function inlineKatex(t,e){const o=t&&t.nonStandard,a=o?inlineRuleNonStandard:inlineRule;return{name:"inlineKatex",level:"inline",start(n){let r,s=n;for(;s;){if(r=s.indexOf("$"),r===-1)return;if((o?r>-1:r===0||s.charAt(r-1)===" ")&&s.substring(r).match(a))return r;s=s.substring(r+1).replace(/^\$+/,"")}},tokenizer(n){const r=n.match(a);if(r)return{type:"inlineKatex",raw:r[0],text:r[2].trim(),displayMode:r[1].length===2}},renderer:e}}function blockKatex(t,e){return{name:"blockKatex",level:"block",tokenizer(o){const a=o.match(blockRule);if(a)return{type:"blockKatex",raw:a[0],text:a[2].trim(),displayMode:a[1].length===2}},renderer:e}}function MDKatex(t,e,o){return{extensions:[inlineKatex(t,createRenderer(!1,e,o)),blockKatex(t,createRenderer(!0,e,o))]}}function encode6bit(t){return t<10?String.fromCharCode(48+t):(t-=10,t<26?String.fromCharCode(65+t):(t-=26,t<26?String.fromCharCode(97+t):(t-=26,t===0?"-":t===1?"_":"?")))}function append3bytes(t,e,o){const a=t>>2,n=(t&3)<<4|e>>4,r=(e&15)<<2|o>>6,s=o&63;let l="";return l+=encode6bit(a&63),l+=encode6bit(n&63),l+=encode6bit(r&63),l+=encode6bit(s&63),l}function encode64(t){let e="";for(let o=0;o<t.length;o+=3)o+2===t.length?e+=append3bytes(t.charCodeAt(o),t.charCodeAt(o+1),0):o+1===t.length?e+=append3bytes(t.charCodeAt(o),0,0):e+=append3bytes(t.charCodeAt(o),t.charCodeAt(o+1),t.charCodeAt(o+2));return e}function performDeflate(t){try{const e=new TextEncoder().encode(t),o=deflateSync(e,{level:9});return String.fromCharCode(...o)}catch(e){return console.warn("Deflate compression failed:",e),t}}function encodePlantUML(t){try{const e=performDeflate(t);return encode64(e)}catch(e){console.warn("PlantUML encoding failed, using fallback:",e);const o=new TextEncoder().encode(t);return`~1${btoa(String.fromCharCode(...o)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}`}}function generatePlantUMLUrl(t,e){const o=encodePlantUML(t),a=e.format==="svg"?"svg":"png";return`${e.serverUrl}/${a}/${o}`}function renderPlantUMLDiagram(t,e){const{text:o}=t,a=!o.trim().includes("@start")||!o.trim().includes("@end")?`@startuml
35
+ ${o.trim()}
36
+ @enduml`:o,n=generatePlantUMLUrl(a,e);if(e.inlineSvg&&e.format==="svg"){const r=`plantuml-placeholder-${Math.random().toString(36).slice(2,11)}`;fetchSvgContent(n).then(l=>{const u=document.querySelector(`[data-placeholder="${r}"]`);u&&(u.outerHTML=createPlantUMLHTML(n,e,l))});const s=e.styles.container?Object.entries(e.styles.container).map(([l,u])=>`${l.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${u}`).join("; "):"";return`<div class="${e.className}" style="${s}" data-placeholder="${r}">
37
+ <div style="color: #666; font-style: italic;">正在加载PlantUML图表...</div>
38
+ </div>`}return createPlantUMLHTML(n,e)}async function fetchSvgContent(t){try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP ${e.status}`);return(await e.text()).replace(/(<svg[^>]*)\swidth="[^"]*"/g,"$1").replace(/(<svg[^>]*)\sheight="[^"]*"/g,"$1").replace(/(<svg[^>]*style="[^"]*?)width:[^;]*;?/g,"$1").replace(/(<svg[^>]*style="[^"]*?)height:[^;]*;?/g,"$1")}catch(e){return console.warn(`Failed to fetch SVG content from ${t}:`,e),'<div style="color: #666; font-style: italic;">PlantUML图表加载失败</div>'}}function createPlantUMLHTML(t,e,o){const a=e.styles.container?Object.entries(e.styles.container).map(([n,r])=>`${n.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${r}`).join("; "):"";return o?`<div class="${e.className}" style="${a}">
39
+ ${o}
40
+ </div>`:`<div class="${e.className}" style="${a}">
41
+ <img src="${t}" alt="PlantUML Diagram" style="max-width: 100%; height: auto;" />
42
+ </div>`}function markedPlantUML(t={}){var o;const e={serverUrl:t.serverUrl||"https://www.plantuml.com/plantuml",format:t.format||"svg",className:t.className||"plantuml-diagram",inlineSvg:t.inlineSvg||!1,styles:{container:{textAlign:"center",margin:"16px 8px",overflowX:"auto",...(o=t.styles)==null?void 0:o.container}}};return{extensions:[{name:"plantuml",level:"block",start(a){var n;return(n=a.match(/^```plantuml/m))==null?void 0:n.index},tokenizer(a){const n=/^```plantuml\r?\n([\s\S]*?)\r?\n```/.exec(a);if(n){const[r,s]=n;return{type:"plantuml",raw:r,text:s.trim()}}},renderer(a){return renderPlantUMLDiagram(a,e)}}],walkTokens(a){a.type==="code"&&a.lang==="plantuml"&&(a.type="plantuml")}}}function markedRuby(){return{extensions:[{name:"ruby",level:"inline",start(t){var e;return(e=t.match(/\[/))==null?void 0:e.index},tokenizer(t){let o=/^\[([^\]]+)\]\{([^}]+)\}/.exec(t);if(o)return{type:"ruby",raw:o[0],text:o[1].trim(),ruby:o[2].trim(),format:"basic"};if(o=/^\[([^\]]+)\]\^\(([^)]+)\)/.exec(t),o)return{type:"ruby",raw:o[0],text:o[1].trim(),ruby:o[2].trim(),format:"basic-hat"}},renderer(t){const{text:e,ruby:o,format:a}=t,n=/[・.。-]/g;if(n.test(o)){const s=o.split(n).filter(c=>c.trim()!==""),l=e.split(""),u=[];if(l.length>=s.length){let c=0;for(let p=0;p<s.length;p++){const w=s[p],i=l.length-c,C=s.length-p;let $=1;C===1&&($=i);const g=l.slice(c,c+$).join("");u.push(`<ruby data-text="${g}" data-ruby="${w}" data-format="${a}">${g}<rp>(</rp><rt>${w}</rt><rp>)</rp></ruby>`),c+=$}c<l.length&&u.push(l.slice(c).join(""))}else for(let c=0;c<l.length;c++){const p=l[c],w=s[c]||"";w?u.push(`<ruby data-text="${p}" data-ruby="${w}" data-format="${a}">${p}<rp>(</rp><rt>${w}</rt><rp>)</rp></ruby>`):u.push(p)}return u.join("")}return`<ruby data-text="${e}" data-ruby="${o}" data-format="${a}">${e}<rp>(</rp><rt>${o}</rt><rp>)</rp></ruby>`}}]}}function markedSlider(t={}){return{extensions:[{name:"horizontalSlider",level:"block",start(e){var o;return(o=e.match(/^<!\[/))==null?void 0:o.index},tokenizer(e){const o=/^<(!\[.*?\]\(.*?\)(?:,!\[.*?\]\(.*?\))*)>/,a=e.match(o);if(a)return{type:"horizontalSlider",raw:a[0],text:a[1]}},renderer(e){const{text:o}=e,a=o.match(/!\[(.*?)\]\((.*?)\)/g)||[];return a.length===0?"":`
43
+ <section style="box-sizing: border-box; font-size: 16px;">
44
+ <section data-role="outer" style="font-family: 微软雅黑; font-size: 16px;">
45
+ <section data-role="paragraph" style="margin: 0px auto; box-sizing: border-box; width: 100%;">
46
+ <section style="margin: 0px auto; text-align: center;">
47
+ <section style="display: inline-block; width: 100%;">
48
+ <!-- 微信公众号支持的滑动图片容器 -->
49
+ <section style="overflow-x: scroll; -webkit-overflow-scrolling: touch; white-space: nowrap; width: 100%; text-align: center;">
50
+ ${a.map(r=>{const s=r.match(/!\[(.*?)\]/)||[],l=r.match(/\]\((.*?)\)/)||[],u=s[1]||"",c=l[1]||"",{styles:p}=t,w=p?getStyleString(p.image):"";return{src:c,alt:u,imgStyles:w}}).map((r,s)=>`<section style="display: inline-block; width: 100%; margin-right: 0; vertical-align: top;">
51
+ <img src="${r.src}" alt="${r.alt}" title="${r.alt}" style="${r.imgStyles}; width: 100%; height: auto; border-radius: 4px; vertical-align: top;"/>
52
+ <p style="margin-top: 5px; font-size: 14px; color: #666; text-align: center; white-space: normal;">${r.alt}</p>
53
+ </section>`).join("")}
54
+ </section>
55
+ </section>
56
+ </section>
57
+ </section>
58
+ </section>
59
+ <p style="font-size: 14px; color: #999; text-align: center; margin-top: 5px;"><<< 左右滑动看更多 >>></p>
60
+ </section>
61
+ `}}]}}function markedToc(){let t=[],e=!0;return{walkTokens(o){if(e&&(t=[],e=!1),o.type==="heading"){const a=o.text||"",n=o.depth||1,r=t.length;t.push({text:a,depth:n,index:r})}},extensions:[{name:"toc",level:"block",start(o){const a=o.match(/^\s*\[TOC\]\s*$/m);return a?a.index:void 0},tokenizer(o){const a=/^\[TOC\]/.exec(o);if(a)return{type:"toc",raw:a[0]}},renderer(){if(!t.length)return"";let o='<nav class="markdown-toc"><ul class="toc-ul toc-level-1 pl-4 border-l ml-2">',a=1;t.forEach(({text:n,depth:r,index:s})=>{if(r>a)for(let l=a+1;l<=r;l++)o+=`<ul class="toc-ul toc-level-${l} pl-4 border-l ml-2">`;else if(r<a)for(let l=a;l>r;l--)o+="</ul>";o+=`<li class="toc-li toc-level-${r} mb-1"><a class="text-gray-700 hover:text-blue-600 underline transition-colors" href="#${s}">${n}</a></li>`,a=r});for(let n=a;n>1;n--)o+="</ul>";return o+="</ul></nav>",e=!0,o}}]}}d.setOptions({breaks:!0});d.use(markedSlider());function buildTheme({theme:t,fonts:e,size:o,isUseIndent:a,isUseJustify:n}){const r=cloneDeep(t),s=toMerged(r.base,{"font-family":e,"font-size":o});a&&(r.block.p={"text-indent":"2em",...r.block.p}),n&&(r.block.p={"text-align":"justify",...r.block.p});const l=u=>Object.fromEntries(Object.entries(u).map(([c,p])=>[c,toMerged(s,p)]));return{...l(r.inline),...l(r.block)}}function escapeHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/`/g,"&#96;")}function buildAddition(){return`
62
+ <style>
63
+ .preview-wrapper pre::before {
64
+ position: absolute;
65
+ top: 0;
66
+ right: 0;
67
+ color: #ccc;
68
+ text-align: center;
69
+ font-size: 0.8em;
70
+ padding: 5px 10px 0;
71
+ line-height: 15px;
72
+ height: 15px;
73
+ font-weight: 600;
74
+ }
75
+ </style>
76
+ `}function getStyles(t,e,o=""){const a=t[e];return a?`style="${getStyleString(a)}${o}"`:""}function buildFootnoteArray(t){return t.map(([e,o,a])=>a===o?`<code style="font-size: 90%; opacity: 0.6;">[${e}]</code>: <i style="word-break: break-all">${o}</i><br/>`:`<code style="font-size: 90%; opacity: 0.6;">[${e}]</code> ${o}: <i style="word-break: break-all">${a}</i><br/>`).join(`
77
+ `)}function transform(t,e,o){const a=t.split("-");for(const n of a){if(n==="alt"&&e)return e;if(n==="title"&&o)return o}return""}const macCodeSvg=`
78
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" width="45px" height="13px" viewBox="0 0 450 130">
79
+ <ellipse cx="50" cy="65" rx="50" ry="52" stroke="rgb(220,60,54)" stroke-width="2" fill="rgb(237,108,96)" />
80
+ <ellipse cx="225" cy="65" rx="50" ry="52" stroke="rgb(218,151,33)" stroke-width="2" fill="rgb(247,193,81)" />
81
+ <ellipse cx="400" cy="65" rx="50" ry="52" stroke="rgb(27,161,37)" stroke-width="2" fill="rgb(100,200,86)" />
82
+ </svg>
83
+ `.trim();function parseFrontMatterAndContent(t){try{const e=frontMatter(t),o=e.attributes,a=e.body,n=readingTime(a);return{yamlData:o,markdownContent:a,readingTime:n}}catch(e){return console.error("Error parsing front-matter:",e),{yamlData:{},markdownContent:t,readingTime:readingTime(t)}}}function initRenderer(t){const e=[];let o=0,a=buildTheme(t),n=0;const r=[],s=[];function l(){return t}function u(f,h=""){return getStyles(a,f,h)}function c(f,h,x){const _=x??f;return`<${_} ${/^h\d$/.test(_)?'data-heading="true"':""} ${u(f)}>${h}</${_}>`}function p(f,h){return e.push([++o,f,h]),o}function w(f){e.length=0,o=0,i(f)}function i(f){t={...t,...f};const h=JSON.stringify(a);a=buildTheme(t);const x=JSON.stringify(a);h!==x&&(d.use(markedAlert({styles:a})),d.use(MDKatex({nonStandard:!0},u("inline_katex",";line-height: 1;"),u("block_katex",";text-align: center;"))))}function C(f){return!t.countStatus||!f.words?"":`
84
+ <blockquote ${u("blockquote")}>
85
+ <p ${u("blockquote_p")}>字数 ${f==null?void 0:f.words},阅读大约需 ${Math.ceil(f==null?void 0:f.minutes)} 分钟</p>
86
+ </blockquote>
87
+ `}const $=()=>e.length?c("h4","引用链接")+c("footnotes",buildFootnoteArray(e),"p"):"",g={heading({tokens:f,depth:h}){const x=this.parser.parseInline(f),_=`h${h}`;return c(_,x)},paragraph({tokens:f}){const h=this.parser.parseInline(f),x=h.includes("<figure")&&h.includes("<img"),_=h.trim()==="";return x||_?h:c("p",h)},blockquote({tokens:f}){let h=this.parser.parse(f);return h=h.replace(/<p .*?>/g,`<p ${u("blockquote_p")}>`),c("blockquote",h)},code({text:f,lang:h=""}){if(h.startsWith("mermaid"))return clearTimeout(n),n=setTimeout(()=>{mermaid_default.run()},0),`<pre class="mermaid">${f}</pre>`;const x=h.split(" ")[0],_=HighlightJS.getLanguage(x)?x:"plaintext";let b=HighlightJS.highlight(f,{language:_}).value;b=b.replace(/(<span[^>]*>[^<]*<\/span>)(\s+)(<span[^>]*>[^<]*<\/span>)/g,(D,k,N,A)=>k+A.replace(/^(<span[^>]*>)/,`$1${N}`)),b=b.replace(/(\s+)(<span[^>]*>)/g,(D,k,N)=>N.replace(/^(<span[^>]*>)/,`$1${k}`)),b=b.replace(/\t/g," "),b=b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>").replace(/(>[^<]+)|(^[^<]+)/g,D=>D.replace(/\s/g,"&nbsp;"));const M=`<span class="mac-sign" style="padding: 10px 14px 0;">${macCodeSvg}</span>`,L=`<code class="language-${h}" ${u("code")}>${b}</code>`;return`<pre class="hljs code__pre" ${u("code_pre")}>${M}${L}</pre>`},codespan({text:f}){const h=escapeHtml(f);return c("codespan",h,"code")},list({ordered:f,items:h,start:x=1}){r.push(f),s.push(Number(x));const _=h.map(b=>this.listitem(b)).join("");return r.pop(),s.pop(),c(f?"ol":"ul",_)},listitem(f){const h=r[r.length-1],x=s[s.length-1];s[s.length-1]=x+1;const _=h?`${x}. `:"• ";let b;try{b=this.parser.parseInline(f.tokens)}catch{b=this.parser.parse(f.tokens).replace(/^<p(?:\s[^>]*)?>([\s\S]*?)<\/p>/,"$1")}return c("listitem",`${_}${b}`,"li")},image({href:f,title:h,text:x}){const _=c("figcaption",transform(t.legend,x,h)),b=u("figure"),M=u("image");return`<figure ${b}><img ${M} src="${f}" title="${h}" alt="${x}"/>${_}</figure>`},link({href:f,title:h,text:x,tokens:_}){const b=this.parser.parseInline(_);if(/^https?:\/\/mp\.weixin\.qq\.com/.test(f))return`<a href="${f}" title="${h||x}" ${u("wx_link")}>${b}</a>`;if(f===x)return b;if(t.citeStatus){const M=p(h||x,f);return`<span ${u("link")}>${b}<sup>[${M}]</sup></span>`}return c("link",b,"span")},strong({tokens:f}){return c("strong",this.parser.parseInline(f))},em({tokens:f}){return c("em",this.parser.parseInline(f),"span")},table({header:f,rows:h}){const x=f.map(b=>{const M=this.parser.parseInline(b.tokens);return c("th",M)}).join(""),_=h.map(b=>{const M=b.map(L=>this.tablecell(L)).join("");return c("tr",M)}).join("");return`
88
+ <section style="padding:0 8px; max-width: 100%; overflow: auto">
89
+ <table class="preview-table">
90
+ <thead ${u("thead")}>${x}</thead>
91
+ <tbody>${_}</tbody>
92
+ </table>
93
+ </section>
94
+ `},tablecell(f){const h=this.parser.parseInline(f.tokens);return c("td",h)},hr(f){return c("hr","")}};return d.use({renderer:g}),d.use(markedToc()),d.use(markedSlider({styles:a})),d.use(markedAlert({styles:a})),d.use(MDKatex({nonStandard:!0},u("inline_katex",";line-height: 1;"),u("block_katex",";text-align: center;"))),d.use(markedFootnotes()),d.use(markedPlantUML({inlineSvg:!0})),d.use(markedRuby()),{buildAddition,buildFootnotes:$,setOptions:i,reset:w,parseFrontMatterAndContent,buildReadingTime:C,createContainer(f){return c("container",f,"section")},getOpts:l}}const DEFAULT_SERVICE_ENDPOINT="https://proxy-ai.doocs.org/v1",DEFAULT_SERVICE_TEMPERATURE=1,DEFAULT_SERVICE_MAX_TOKEN=1024,DEFAULT_SERVICE_TYPE="default",DEFAULT_SERVICE_KEY="",serviceOptions=[{value:"default",label:"默认服务(无需配置 sk)",endpoint:DEFAULT_SERVICE_ENDPOINT,models:["Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-7B-Instruct","Qwen/Qwen2-7B-Instruct","Qwen/Qwen2-1.5B-Instruct","deepseek-ai/DeepSeek-R1-Distill-Qwen-7B","deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B","THUDM/GLM-Z1-9B-0414","THUDM/GLM-4-9B-0414","internlm/internlm2_5-7b-chat","qwen/qwen3-30b-a3b:free","qwen/qwen3-8b:free","qwen/qwen3-14b:free","qwen/qwen3-32b:free","qwen/qwen3-235b-a22b:free","tngtech/deepseek-r1t-chimera:free","thudm/glm-z1-9b:free","thudm/glm-z1-32b:free","thudm/glm-4-9b:free","thudm/glm-4-32b:free","microsoft/mai-ds-r1:free","arliai/qwq-32b-arliai-rpr-v1:free","nvidia/llama-3.3-nemotron-super-49b-v1:free","nvidia/llama-3.1-nemotron-ultra-253b-v1:free","meta-llama/llama-4-maverick:free","meta-llama/llama-4-scout:free","deepseek/deepseek-v3-base:free","qwen/qwen2.5-vl-3b-instruct:free","qwen/qwen2.5-vl-32b-instruct:free"]},{value:"deepseek",label:"DeepSeek",endpoint:"https://api.deepseek.com/v1",models:["deepseek-chat","deepseek-reasoner"]},{value:"openai",label:"OpenAI",endpoint:"https://api.openai.com/v1",models:["gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4-turbo","gpt-4o","gpt-3.5-turbo"]},{value:"qwen",label:"通义千问",endpoint:"https://dashscope.aliyuncs.com/compatible-mode/v1",models:["qwen-vl-max-2025-04-02","deepseek-v3","deepseek-r1-distill-llama-70b","deepseek-r1-distill-qwen-32b","deepseek-r1-distill-qwen-14b","deepseek-r1-distill-llama-8b","deepseek-r1-distill-qwen-1.5b","deepseek-r1-distill-qwen-7b","deepseek-r1","qwen1.5-7b-chat","qwen-coder-plus-1106","qwen-coder-plus","qwen-coder-plus-latest","qwen2.5-coder-3b-instruct","qwen2.5-coder-0.5b-instruct","qwen2.5-coder-14b-instruct","qwen2.5-coder-32b-instruct","qwen-coder-turbo-0919","qwen2.5-0.5b-instruct","qwen2.5-1.5b-instruct","qwen2.5-3b-instruct","qwen2.5-7b-instruct","qwen2.5-14b-instruct","qwen2.5-32b-instruct","qwen2.5-72b-instruct","qwen2.5-coder-7b-instruct","qwen2.5-math-1.5b-instruct","qwen2.5-math-7b-instruct","qwen2.5-math-72b-instruct","qwen-turbo-0919","qwen-turbo-latest","qwen-plus-0919","qwen-plus-latest","qwen-max-0919","qwen-max-latest","qwen-coder-turbo","qwen-coder-turbo-latest","qwen-math-turbo-0919","qwen-math-turbo","qwen-math-turbo-latest","qwen-math-plus-0919","qwen-math-plus","qwen-math-plus-latest","qwen2-57b-a14b-instruct","qwen2-72b-instruct","qwen2-7b-instruct","qwen2-0.5b-instruct","qwen2-1.5b-instruct","qwen-long","qwen-vl-max","qwen-vl-plus","qwen-max-0428","qwen1.5-110b-chat","qwen-72b-chat","codeqwen1.5-7b-chat","qwen1.5-0.5b-chat","qwen-1.8b-chat","qwen-1.8b-longcontext-chat","qwen-7b-chat","qwen-14b-chat","qwen1.5-14b-chat","qwen1.5-1.8b-chat","qwen1.5-32b-chat","qwen1.5-72b-chat","qwen-max-1201","qwen-max-longcontext","qwen-max-0403","qwen-max-0107","qwen-turbo","qwen-max","qwen-plus"]},{value:"hunyuan",label:"腾讯混元",endpoint:"https://api.hunyuan.cloud.tencent.com/v1",models:["hunyuan-pro","hunyuan-vision","hunyuan-lite","hunyuan-standard","hunyuan-standard-32K","hunyuan-standard-256k","hunyuan-code","hunyuan-role","hunyuan-functioncall","hunyuan-turbo-vision","hunyuan-turbo"]},{value:"doubao",label:"火山方舟",endpoint:"https://ark.cn-beijing.volces.com/api/v3",models:["doubao-1-5-thinking-pro-250415","doubao-1-5-thinking-pro-m-250415","deepseek-r1-250120","deepseek-r1-distill-qwen-32b-250120","deepseek-r1-distill-qwen-7b-250120","deepseek-v3-250324","deepseek-v3-241226","doubao-1-5-vision-pro-250328","doubao-1-5-vision-lite-250315","doubao-1-5-vision-pro-32k-250115","doubao-1-5-ui-tars-250328","doubao-vision-pro-32k-241028","doubao-vision-lite-32k-241015","doubao-1-5-pro-32k-250115","doubao-1-5-pro-256k-250115","doubao-1-5-lite-32k-250115","doubao-pro-4k-240515","doubao-pro-32k-241215","doubao-pro-32k-240828","doubao-pro-32k-240615","doubao-pro-256k-241115","doubao-lite-4k-character-240828","doubao-lite-32k-240828","doubao-lite-32k-character-241015","doubao-lite-128k-240828","moonshot-v1-8k","moonshot-v1-32k","moonshot-v1-128k"]},{value:"siliconflow",label:"硅基流动",endpoint:"https://api.siliconflow.cn/v1",models:["Qwen/Qwen3-235B-A22B","Qwen/Qwen3-30B-A3B","Qwen/Qwen3-32B","Qwen/Qwen3-14B","Qwen/Qwen3-8B","THUDM/GLM-Z1-32B-0414","THUDM/GLM-4-32B-0414","THUDM/GLM-Z1-Rumination-32B-0414","THUDM/GLM-4-9B-0414","Qwen/QwQ-32B","Pro/deepseek-ai/DeepSeek-R1","Pro/deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-7B","deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B","Pro/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B","Pro/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B","deepseek-ai/DeepSeek-V2.5","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-Coder-7B-Instruct","Qwen/Qwen2-7B-Instruct","Qwen/Qwen2-1.5B-Instruct","Qwen/QwQ-32B-Preview","TeleAI/TeleChat2","THUDM/glm-4-9b-chat","Vendor-A/Qwen/Qwen2.5-72B-Instruct","internlm/internlm2_5-7b-chat","internlm/internlm2_5-20b-chat","Pro/Qwen/Qwen2.5-7B-Instruct","Pro/Qwen/Qwen2-7B-Instruct","Pro/Qwen/Qwen2-1.5B-Instruct","Pro/THUDM/chatglm3-6b","Pro/THUDM/glm-4-9b-chat"]},{value:"bigmodel",label:"智谱 AI",endpoint:"https://open.bigmodel.cn/api/paas/v4/",models:["glm-4-plus","glm-4-0520","glm-4","glm-4-air","glm-4-airx","glm-4-long","glm-4-flashx","glm-4-flash"]},{value:"baichuan",label:"百川智能",endpoint:"https://api.baichuan-ai.com/v1",models:["Baichuan4","Baichuan3-Turbo","Baichuan3-Turbo-128k","Baichuan2-Turbo"]},{value:"lingyiwanwu",label:"零一万物",endpoint:"https://api.lingyiwanwu.com/v1",models:["yi-lightning"]},{value:"moonshot",label:"月之暗面",endpoint:"https://api.moonshot.cn/v1",models:["moonshot-v1-8k","moonshot-v1-32k","moonshot-v1-128k"]},{value:"ernie",label:"百度千帆",endpoint:"https://qianfan.baidubce.com/v2",models:["ernie-4.5-turbo-128k","ernie-4.5-turbo-32k","ernie-4.5-8k-preview","ernie-4.0-8k","ernie-4.0-8k-latest","ernie-4.0-8k-preview","ernie-4.0-turbo-128k","ernie-4.0-turbo-8k","ernie-4.0-turbo-8k-latest","ernie-4.0-turbo-8k-preview","ernie-3.5-128k","ernie-3.5-8k","ernie-3.5-8k-preview","ernie-speed-128k","ernie-speed-8k","ernie-speed-pro-128k","ernie-lite-8k","ernie-lite-pro-128k","ernie-tiny-8k","ernie-novel-8k"]},{value:"custom",label:"自定义兼容 OpenAI API 的服务",endpoint:"",models:[]}];serviceOptions[0].models[0];const githubConfig={username:"bucketio",repoList:Array.from({length:20},(t,e)=>`img${e}`),branch:"main",accessTokenList:["ghp_sqQg5y7XC7Fy8XdoocsmdVEYRiRiTZPvbwzTL4MRjQc","ghp_jB5JXzBjpGbgzdoocsmdogWfSHhfCKGVstozw1cAsPv","ghp_zvy8wkHo259g7doocsmdJnUKOQd1WO1SPzZ9G0O9cJD","ghp_DnCJc2Ms0RVZ1doocsmdiWOAN78FurfSeD1Pv2Y28pO","ghp_EsMYDv9WVjXWP5doocsmd1nnDml2DEP95rOiz44bSo0","ghp_L4isHf01nllOOdoocsmdHBGoDG6jscCA09WV44QDvlg","ghp_qWciwYXHPakAUGdoocsmdBOBZdRcV08JThKey3mBZNJ","ghp_rxkvIO08wVL2DMdoocsmd2jDEhcatp2rfVyhd3A7RiS","ghp_1RvkWKboSxr0yVdoocsmd7OtBCpecYwoV6deh3utifJ","ghp_cduanDnAug60ngdoocsmdF1uDstXUi6S9RMhY1qdada","ghp_q6mxuJIkqAcsCXdoocsmdkkjWvzGlMVRuy5zI0IWNDx","ghp_Pv4npPeJpChKFMTdoocsmdCQneopUcqJrqrjl3vrt9A","ghp_gKMCFqMaQiLTqhjdoocsmd7BJE8RyK6AdRw4b42CutS","ghp_2oShgb33qFlqBmadoocsmdludmuLYxBFY5bao1XrsVo","ghp_eYyd3kxWTZmsV8doocsmdDFbAa7AEGQTJgmOd0GUmtY"]},giteeConfig={username:"filesss",repoList:Array.from({length:20},(t,e)=>`img${e}`),branch:"main",accessTokenList:["ed5fc9866bd6c2fdoocsmddd433f806fd2f399c","5448ffebbbf1151doocsmdc4e337cf814fc8a62","25b05efd2557ca2doocsmd75b5c0835e3395911","11628c7a5aef015doocsmd2eeff9fb9566f0458","cb2f5145ed938dedoocsmdbd063b4ed244eecf8","d8c0b57500672c1doocsmd55f48b866b5ebcd98","78c56eadb88e453doocsmd43ddd95753351771a","03e1a688003948fdoocsmda16fcf41e6f03f1f0","c49121cf4d191fbdoocsmdd6a7877ed537e474a","adfeb2fadcdc4aadoocsmdfe1ee869ac9c968ff","116c94549ca4a0ddoocsmd192653af5c0694616","ecf30ed7f2eb184doocsmd51ea4ec8300371d9e","5837cf2bd5afd93doocsmd73904bed31934949e","b5b7e1c7d57e01fdoocsmd5266f552574297d78","684d55564ffbd0bdoocsmd7d747e5cc23aed6d6","3fc04a9d272ab71doocsmd010c56cb57d88d2ba"]},prefix="MD",storeLabels={isDark:"深色模式",isEditOnLeft:"左侧编辑",isMacCodeBlock:"Mac 代码块",isCiteStatus:"微信外链接底部引用状态",isCountStatus:"字数统计状态",isUseIndent:"使用缩进",isUseJustify:"使用两端对齐",isOpenRightSlider:"开启右侧滑块",isOpenPostSlider:"开启右侧发布滑块",showAIToolbox:"AI 工具箱状态",theme:"主题",fontFamily:"字体",fontSize:"字体大小",primaryColor:"自定义主题色",codeBlockTheme:"代码块主题",legend:"图注格式",fontSizeNumber:"字体大小",currentPostId:"当前文章 ID",currentPostIndex:"当前文章索引",posts:"内容列表",cssContentConfig:"自定义 CSS",titleList:"文章标题列表",readingTime:"阅读时间",isShowCssEditor:"显示 CSS 编辑器",isShowInsertFormDialog:"显示插入表单对话框",isShowInsertMpCardDialog:"显示插入公众号名片对话框",isShowUploadImgDialog:"显示上传图片对话框",aiDialogVisible:"AI 对话框可见"},defaultTheme={base:{"--md-primary-color":"#000000","text-align":"left","line-height":"1.75"},block:{container:{},h1:{display:"table",padding:"0 1em","border-bottom":"2px solid var(--md-primary-color)",margin:"2em auto 1em",color:"hsl(var(--foreground))","font-size":"1.2em","font-weight":"bold","text-align":"center"},h2:{display:"table",padding:"0 0.2em",margin:"4em auto 2em",color:"#fff",background:"var(--md-primary-color)","font-size":"1.2em","font-weight":"bold","text-align":"center"},h3:{"padding-left":"8px","border-left":"3px solid var(--md-primary-color)",margin:"2em 8px 0.75em 0",color:"hsl(var(--foreground))","font-size":"1.1em","font-weight":"bold","line-height":"1.2"},h4:{margin:"2em 8px 0.5em",color:"var(--md-primary-color)","font-size":"1em","font-weight":"bold"},h5:{margin:"1.5em 8px 0.5em",color:"var(--md-primary-color)","font-size":"1em","font-weight":"bold"},h6:{margin:"1.5em 8px 0.5em","font-size":"1em",color:"var(--md-primary-color)"},p:{margin:"1.5em 8px","letter-spacing":"0.1em",color:"hsl(var(--foreground))"},blockquote:{"font-style":"normal",padding:"1em","border-left":"4px solid var(--md-primary-color)","border-radius":"6px",color:"rgba(0,0,0,0.5)",background:"var(--blockquote-background)","margin-bottom":"1em"},blockquote_p:{display:"block","font-size":"1em","letter-spacing":"0.1em",color:"hsl(var(--foreground))"},blockquote_note:{},blockquote_tip:{},blockquote_info:{},blockquote_important:{},blockquote_warning:{},blockquote_caution:{},blockquote_title:{display:"flex","align-items":"center",gap:"0.5em","margin-bottom":"0.5em"},blockquote_title_note:{color:"#478be6"},blockquote_title_tip:{color:"#57ab5a"},blockquote_title_info:{color:"#93c5fd"},blockquote_title_important:{color:"#986ee2"},blockquote_title_warning:{color:"#c69026"},blockquote_title_caution:{color:"#e5534b"},blockquote_p_note:{},blockquote_p_tip:{},blockquote_p_info:{},blockquote_p_important:{},blockquote_p_warning:{},blockquote_p_caution:{},code_pre:{"font-size":"90%","overflow-x":"auto","border-radius":"8px",padding:"1em","line-height":"1.5",margin:"10px 8px"},code:{margin:0,"white-space":"nowrap","font-size":"90%","font-family":"Menlo, Operator Mono, Consolas, Monaco, monospace"},image:{display:"block","max-width":"100%",margin:"0.1em auto 0.5em","border-radius":"4px"},ol:{"padding-left":"1em","margin-left":"0",color:"hsl(var(--foreground))"},ul:{"list-style":"circle","padding-left":"1em","margin-left":"0",color:"hsl(var(--foreground))"},footnotes:{margin:"0.5em 8px","font-size":"80%",color:"hsl(var(--foreground))"},figure:{margin:"1.5em 8px",color:"hsl(var(--foreground))"},hr:{"border-style":"solid","border-width":"2px 0 0","border-color":"rgba(0,0,0,0.1)","-webkit-transform-origin":"0 0","-webkit-transform":"scale(1, 0.5)","transform-origin":"0 0",transform:"scale(1, 0.5)",height:"0.4em",margin:"1.5em 0"},block_katex:{"max-width":"100%","overflow-x":"auto","-webkit-overflow-scrolling":"touch",padding:"0.5em 0"}},inline:{listitem:{display:"block",margin:"0.2em 8px",color:"hsl(var(--foreground))"},codespan:{"font-size":"90%",color:"#d14",background:"rgba(27,31,35,.05)",padding:"3px 5px","border-radius":"4px"},em:{"font-style":"italic","font-size":"inherit"},link:{color:"#576b95"},wx_link:{color:"#576b95","text-decoration":"none"},strong:{color:"var(--md-primary-color)","font-weight":"bold","font-size":"inherit"},table:{"border-collapse":"collapse","text-align":"center",margin:"1em 8px",color:"hsl(var(--foreground))"},thead:{"font-weight":"bold",color:"hsl(var(--foreground))"},th:{border:"1px solid #dfdfdf",padding:"0.25em 0.5em",color:"hsl(var(--foreground))","word-break":"keep-all",background:"rgba(0, 0, 0, 0.05)"},td:{border:"1px solid #dfdfdf",padding:"0.25em 0.5em",color:"hsl(var(--foreground))","word-break":"keep-all"},footnote:{"font-size":"12px",color:"hsl(var(--foreground))"},figcaption:{"text-align":"center",color:"#888","font-size":"0.8em"},inline_katex:{"max-width":"100%","overflow-x":"auto"}}},graceTheme=toMerged(defaultTheme,{base:{},block:{container:{},h1:{padding:"0.5em 1em","border-bottom":"2px solid var(--md-primary-color)","font-size":"1.4em","text-shadow":"2px 2px 4px rgba(0,0,0,0.1)"},h2:{padding:"0.3em 1em","border-radius":"8px","font-size":"1.3em","box-shadow":"0 4px 6px rgba(0,0,0,0.1)"},h3:{"padding-left":"12px","font-size":"1.2em","border-left":"4px solid var(--md-primary-color)","border-bottom":"1px dashed var(--md-primary-color)"},h4:{"font-size":"1.1em"},h5:{"font-size":"1em"},h6:{"font-size":"1em"},p:{},blockquote:{"font-style":"italic",padding:"1em 1em 1em 2em","border-left":"4px solid var(--md-primary-color)","border-radius":"6px",color:"rgba(0,0,0,0.6)","box-shadow":"0 4px 6px rgba(0,0,0,0.05)","margin-bottom":"1em"},blockquote_p:{},"markdown-alert":{"font-style":"italic"},code_pre:{"box-shadow":"inset 0 0 10px rgba(0,0,0,0.05)"},code:{"font-family":"'Fira Code', Menlo, Operator Mono, Consolas, Monaco, monospace"},image:{"border-radius":"8px","box-shadow":"0 4px 8px rgba(0,0,0,0.1)"},ol:{"padding-left":"1.5em"},ul:{"list-style":"none","padding-left":"1.5em"},footnotes:{},figure:{},hr:{height:"1px",border:"none",margin:"2em 0",background:"linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0))"}},inline:{listitem:{margin:"0.5em 8px"},codespan:{},em:{},link:{},wx_link:{},strong:{},table:{"border-collapse":"separate","border-spacing":"0","border-radius":"8px",margin:"1em 8px",color:"hsl(var(--foreground))","box-shadow":"0 4px 6px rgba(0,0,0,0.1)",overflow:"hidden"},thead:{color:"#fff"},td:{padding:"0.5em 1em"},footnote:{color:"rgba(0,0,0,0.5)"},figcaption:{}}}),simpleTheme=toMerged(defaultTheme,{base:{},block:{container:{},h1:{padding:"0.5em 1em","font-size":"1.4em","text-shadow":"1px 1px 3px rgba(0,0,0,0.05)"},h2:{padding:"0.3em 1.2em","font-size":"1.3em","border-radius":"8px 24px 8px 24px","box-shadow":"0 2px 6px rgba(0,0,0,0.06)"},h3:{"padding-left":"12px","font-size":"1.2em","border-radius":"6px","line-height":"2.4em","border-left":"4px solid var(--md-primary-color)","border-right":"1px solid color-mix(in srgb, var(--md-primary-color) 10%, transparent)","border-bottom":"1px solid color-mix(in srgb, var(--md-primary-color) 10%, transparent)","border-top":"1px solid color-mix(in srgb, var(--md-primary-color) 10%, transparent)",background:"color-mix(in srgb, var(--md-primary-color) 8%, transparent)"},h4:{"font-size":"1.1em","border-radius":"6px"},h5:{"border-radius":"6px"},h6:{"border-radius":"6px"},blockquote:{"font-style":"italic",padding:"1em 1em 1em 2em",color:"rgba(0,0,0,0.6)","border-bottom":"0.2px solid rgba(0, 0, 0, 0.04)","border-top":"0.2px solid rgba(0, 0, 0, 0.04)","border-right":"0.2px solid rgba(0, 0, 0, 0.04)"},blockquote_note:{"font-style":"italic"},blockquote_tip:{"font-style":"italic"},blockquote_info:{"font-style":"italic"},blockquote_important:{"font-style":"italic"},blockquote_warning:{"font-style":"italic"},blockquote_caution:{"font-style":"italic"},blockquote_title:{},blockquote_title_note:{},blockquote_title_tip:{},blockquote_title_info:{},blockquote_title_important:{},blockquote_title_warning:{},blockquote_title_caution:{},blockquote_p_note:{},blockquote_p_tip:{},blockquote_p_info:{},blockquote_p_important:{},blockquote_p_warning:{},blockquote_p_caution:{},code_pre:{border:"1px solid rgba(0, 0, 0, 0.04)"},code:{"font-family":"'Fira Code', Menlo, Operator Mono, Consolas, Monaco, monospace"},image:{"border-radius":"8px",border:"1px solid rgba(0, 0, 0, 0.04)"},ol:{"padding-left":"1.5em"},ul:{"list-style":"none","padding-left":"1.5em"},hr:{height:"1px",border:"none",margin:"2em 0",background:"linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0))"}},inline:{listitem:{margin:"0.5em 8px"}}}),themeMap={default:defaultTheme,grace:graceTheme,simple:simpleTheme},themeOptions=[{label:"经典",value:"default",desc:""},{label:"优雅",value:"grace",desc:"@brzhang"},{label:"简洁",value:"simple",desc:"@okooo5km"}],fontFamilyOptions=[{label:"无衬线",value:"-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif",desc:"字体123Abc"},{label:"衬线",value:"Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif",desc:"字体123Abc"},{label:"等宽",value:"Menlo, Monaco, 'Courier New', monospace",desc:"字体123Abc"}],fontSizeOptions=[{label:"14px",value:"14px",desc:"更小"},{label:"15px",value:"15px",desc:"稍小"},{label:"16px",value:"16px",desc:"推荐"},{label:"17px",value:"17px",desc:"稍大"},{label:"18px",value:"18px",desc:"更大"}],colorOptions=[{label:"经典蓝",value:"#0F4C81",desc:"稳重冷静"},{label:"翡翠绿",value:"#009874",desc:"自然平衡"},{label:"活力橘",value:"#FA5151",desc:"热情活力"},{label:"柠檬黄",value:"#FECE00",desc:"明亮温暖"},{label:"薰衣紫",value:"#92617E",desc:"优雅神秘"},{label:"天空蓝",value:"#55C9EA",desc:"清爽自由"},{label:"玫瑰金",value:"#B76E79",desc:"奢华现代"},{label:"橄榄绿",value:"#556B2F",desc:"沉稳自然"},{label:"石墨黑",value:"#333333",desc:"内敛极简"},{label:"雾烟灰",value:"#A9A9A9",desc:"柔和低调"},{label:"樱花粉",value:"#FFB7C5",desc:"浪漫甜美"}],widthOptions=[{label:"移动端",value:"w-[375px]",desc:"固定"},{label:"电脑端",value:"w-full",desc:"适应"}],codeBlockUrlPrefix="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/highlightjs/11.11.1/styles/",codeBlockThemeList=["1c-light","a11y-dark","a11y-light","agate","an-old-hope","androidstudio","arduino-light","arta","ascetic","atom-one-dark-reasonable","atom-one-dark","atom-one-light","brown-paper","codepen-embed","color-brewer","dark","default","devibeans","docco","far","felipec","foundation","github-dark-dimmed","github-dark","github","gml","googlecode","gradient-dark","gradient-light","grayscale","hybrid","idea","intellij-light","ir-black","isbl-editor-dark","isbl-editor-light","kimbie-dark","kimbie-light","lightfair","lioshi","magula","mono-blue","monokai-sublime","monokai","night-owl","nnfx-dark","nnfx-light","nord","obsidian","panda-syntax-dark","panda-syntax-light","paraiso-dark","paraiso-light","pojoaque","purebasic","qtcreator-dark","qtcreator-light","rainbow","routeros","school-book","shades-of-purple","srcery","stackoverflow-dark","stackoverflow-light","sunburst","tokyo-night-dark","tokyo-night-light","tomorrow-night-blue","tomorrow-night-bright","vs","vs2015","xcode","xt256"],codeBlockThemeOptions=codeBlockThemeList.map(t=>({label:t,value:`${codeBlockUrlPrefix}${t}.min.css`,desc:""})),legendOptions=[{label:"title 优先",value:"title-alt",desc:""},{label:"alt 优先",value:"alt-title",desc:""},{label:"只显示 title",value:"title",desc:""},{label:"只显示 alt",value:"alt",desc:""},{label:"不显示",value:"none",desc:""}],defaultStyleConfig={isCiteStatus:!1,isMacCodeBlock:!0,isCountStatus:!1,theme:themeOptions[0].value,fontFamily:fontFamilyOptions[0].value,fontSize:fontSizeOptions[2].value,primaryColor:colorOptions[0].value,codeBlockTheme:codeBlockThemeOptions[23].value,legend:legendOptions[3].value},DEFAULT_CONTENT=`# 探索 Markdown 的奇妙世界
95
+
96
+ 欢迎来到 Markdown 的奇妙世界!无论你是写作爱好者、开发者、博主,还是想要简单记录点什么的人,Markdown 都能成为你新的好伙伴。它不仅让写作变得简单明了,还能轻松地将内容转化为漂亮的网页格式。今天,我们将全面探讨 Markdown 的基础和进阶语法,让你在这个过程中充分享受写作的乐趣!
97
+
98
+ Markdown 是一种轻量级标记语言,用于格式化纯文本。它以简单、直观的语法而著称,可以快速地生成 HTML。Markdown 是写作与代码的完美结合,既简单又强大。
99
+
100
+ ## Markdown 基础语法
101
+
102
+ ### 1. 标题:让你的内容层次分明
103
+
104
+ 用 \`#\` 号来创建标题。标题从 \`#\` 开始,\`#\` 的数量表示标题的级别。
105
+
106
+ \`\`\`markdown
107
+ # 一级标题
108
+
109
+ ## 二级标题
110
+
111
+ ### 三级标题
112
+
113
+ #### 四级标题
114
+ \`\`\`
115
+
116
+ 以上代码将渲染出一组层次分明的标题,使你的内容井井有条。
117
+
118
+ ### 2. 段落与换行:自然流畅
119
+
120
+ Markdown 中的段落就是一行接一行的文本。要创建新段落,只需在两行文本之间空一行。
121
+
122
+ ### 3. 字体样式:强调你的文字
123
+
124
+ - **粗体**:用两个星号或下划线包裹文字,如 \`**粗体**\` 或 \`__粗体__\`。
125
+ - _斜体_:用一个星号或下划线包裹文字,如 \`*斜体*\` 或 \`_斜体_\`。
126
+ - ~~删除线~~:用两个波浪线包裹文字,如 \`~~删除线~~\`。
127
+
128
+ 这些简单的标记可以让你的内容更有层次感和重点突出。
129
+
130
+ ### 4. 列表:整洁有序
131
+
132
+ - **无序列表**:用 \`-\`、\`*\` 或 \`+\` 加空格开始一行。
133
+ - **有序列表**:使用数字加点号(\`1.\`、\`2.\`)开始一行。
134
+
135
+ 在列表中嵌套其他内容?只需缩进即可实现嵌套效果。
136
+
137
+ - 无序列表项 1
138
+ 1. 嵌套有序列表项 1
139
+ 2. 嵌套有序列表项 2
140
+ - 无序列表项 2
141
+
142
+ 1. 有序列表项 1
143
+ 2. 有序列表项 2
144
+
145
+ ### 5. 链接与图片:丰富内容
146
+
147
+ - **链接**:用方括号和圆括号创建链接 \`[显示文本](链接地址)\`。
148
+ - **图片**:和链接类似,只需在前面加上 \`!\`,如 \`![描述文本](图片链接)\`。
149
+
150
+ [访问 Doocs](https://github.com/doocs)
151
+
152
+ ![doocs](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/logo-2.png)
153
+
154
+ 轻松实现富媒体内容展示!
155
+
156
+ > 因微信公众号平台不支持除公众号内容以外的链接,故其他平台的链接,会呈现链接样式但无法点击跳转。
157
+
158
+ > 对于这些链接请注意明文书写,或点击左上角「格式->微信外链接转底部引用」开启引用,这样就可以在底部观察到链接指向。
159
+
160
+ 另外,使用 \`<![alt](url),![alt](url)>\` 语法可以创建横屏滑动幻灯片,支持微信公众号平台。建议使用相似尺寸的图片以获得最佳显示效果。
161
+
162
+ ### 6. 引用:引用名言或引人深思的句子
163
+
164
+ 使用 \`>\` 来创建引用,只需在文本前面加上它。多层引用?在前一层 \`>\` 后再加一个就行。
165
+
166
+ > 这是一个引用
167
+ >
168
+ > > 这是一个嵌套引用
169
+
170
+ 这让你的引用更加富有层次感。
171
+
172
+ ### 7. 代码块:展示你的代码
173
+
174
+ - **行内代码**:用反引号包裹,如 \`code\`。
175
+ - **代码块**:用三个反引号包裹,并指定语言,如:
176
+
177
+ \`\`\`js
178
+ console.log(\`Hello, Doocs!\`)
179
+ \`\`\`
180
+
181
+ 语法高亮让你的代码更易读。
182
+
183
+ ### 8. 分割线:分割内容
184
+
185
+ 用三个或更多的 \`-\`、\`*\` 或 \`_\` 来创建分割线。
186
+
187
+ ---
188
+
189
+ 为你的内容添加视觉分隔。
190
+
191
+ ### 9. 表格:清晰展示数据
192
+
193
+ Markdown 支持简单的表格,用 \`|\` 和 \`-\` 分隔单元格和表头。
194
+
195
+ | 项目人员 | 邮箱 | 微信号 |
196
+ | ------------------------------------------- | ---------------------- | ------------ |
197
+ | [yanglbme](https://github.com/yanglbme) | contact@yanglibin.info | YLB0109 |
198
+ | [YangFong](https://github.com/YangFong) | yangfong2022@gmail.com | yq2419731931 |
199
+ | [thinkasany](https://github.com/thinkasany) | thinkasany@gmail.com | thinkasany |
200
+
201
+ 这样的表格让数据展示更为清爽!
202
+
203
+ > 手动编写标记太麻烦?我们提供了便捷方式。左上方点击「编辑->插入表格」,即可快速实现表格渲染。
204
+
205
+ ## Markdown 进阶技巧
206
+
207
+ ### 1. LaTeX 公式:完美展示数学表达式
208
+
209
+ Markdown 允许嵌入 LaTeX 语法展示数学公式:
210
+
211
+ - **行内公式**:用 \`$\` 包裹公式,如 $E = mc^2$。
212
+ - **块级公式**:用 \`$$\` 包裹公式,如:
213
+
214
+ $$
215
+ \\begin{aligned}
216
+ d_{i, j} &\\leftarrow d_{i, j} + 1 \\\\
217
+ d_{i, y + 1} &\\leftarrow d_{i, y + 1} - 1 \\\\
218
+ d_{x + 1, j} &\\leftarrow d_{x + 1, j} - 1 \\\\
219
+ d_{x + 1, y + 1} &\\leftarrow d_{x + 1, y + 1} + 1
220
+ \\end{aligned}
221
+ $$
222
+
223
+ 1. 列表内块公式 1
224
+
225
+ $$
226
+ \\chi^2 = \\sum \\frac{(O - E)^2}{E}
227
+ $$
228
+
229
+ 2. 列表内块公式 2
230
+
231
+ $$
232
+ \\chi^2 = \\sum \\frac{(|O - E| - 0.5)^2}{E}
233
+ $$
234
+
235
+ 这是展示复杂数学表达的利器!
236
+
237
+ ### 2. Mermaid 流程图:可视化流程
238
+
239
+ Mermaid 是强大的可视化工具,可以在 Markdown 中创建流程图、时序图等。
240
+
241
+ \`\`\`mermaid
242
+ graph LR
243
+ A[GraphCommand] --> B[update]
244
+ A --> C[goto]
245
+ A --> D[send]
246
+
247
+ B --> B1[更新状态]
248
+ C --> C1[流程控制]
249
+ D --> D1[消息传递]
250
+ \`\`\`
251
+
252
+ \`\`\`mermaid
253
+ graph TD;
254
+ A-->B;
255
+ A-->C;
256
+ B-->D;
257
+ C-->D;
258
+ \`\`\`
259
+
260
+ \`\`\`mermaid
261
+ pie
262
+ title Key elements in Product X
263
+ "Calcium" : 42.96
264
+ "Potassium" : 50.05
265
+ "Magnesium" : 10.01
266
+ "Iron" : 5
267
+ \`\`\`
268
+
269
+ \`\`\`mermaid
270
+ pie
271
+ title 为什么总是宅在家里?
272
+ "喜欢宅" : 45
273
+ "天气太热" : 70
274
+ "穷" : 500
275
+ "没人约" : 95
276
+ \`\`\`
277
+
278
+ 这种方式不仅能直观展示流程,还能提升文档的专业性。
279
+
280
+ > 更多用法,参见:[Mermaid User Guide](https://mermaid.js.org/intro/getting-started.html)。
281
+
282
+ ### 3. PlantUML 流程图:可视化流程
283
+
284
+ PlantUML 是强大的可视化工具,可以在 Markdown 中创建流程图、时序图等。
285
+
286
+ \`\`\`plantuml
287
+ @startuml
288
+ participant Participant as Foo
289
+ actor Actor as Foo1
290
+ boundary Boundary as Foo2
291
+ control Control as Foo3
292
+ entity Entity as Foo4
293
+ database Database as Foo5
294
+ collections Collections as Foo6
295
+ queue Queue as Foo7
296
+ Foo -> Foo1 : To actor
297
+ Foo -> Foo2 : To boundary
298
+ Foo -> Foo3 : To control
299
+ Foo -> Foo4 : To entity
300
+ Foo -> Foo5 : To database
301
+ Foo -> Foo6 : To collections
302
+ Foo -> Foo7: To queue
303
+ @enduml
304
+ \`\`\`
305
+
306
+ > 更多用法,参见:[PlantUML 主页](https://plantuml.com/zh/)。
307
+
308
+ ### 4. Ruby 注音:注音标注
309
+
310
+ 支持两种格式:
311
+
312
+ \`\`\`md
313
+ 1. [文字]{注音}
314
+ 2. [文字]^(注音)
315
+ \`\`\`
316
+
317
+ 渲染效果如下:
318
+
319
+ [你好]{nǐ hǎo} [世界]{shì jiè}
320
+
321
+ 支持四种分隔符: \`・\`(中点)、\`.\` (全角句点)、\`。\` (中文句号)、\`-\` (英文减号)
322
+
323
+ 示例:
324
+
325
+ \`\`\`md
326
+ [你好世界]{nǐ・hǎo・shì・jiè}
327
+ [小夜時雨]^(さ・よ・しぐれ)
328
+ \`\`\`
329
+
330
+ [你好世界]{nǐ・hǎo・shì・jiè}
331
+ [小夜時雨]^(さ・よ・しぐれ)
332
+
333
+
334
+ 当字符串数量与分隔符数量不匹配时,会自动匹配到最合适的分隔符。
335
+
336
+ \`\`\`md
337
+ [小夜時雨]{さ・よ・しぐれ}
338
+ [小夜時雨]{さ・よ}
339
+ [小夜]{さ・よ・しぐれ}
340
+ [小夜時雨]{さ・よ・しぐれ・extra}
341
+ \`\`\`
342
+
343
+ [小夜時雨]{さ・よ・しぐれ}
344
+ [小夜時雨]{さ・よ}
345
+ [小夜]{さ・よ・しぐれ}
346
+ [小夜時雨]{さ・よ・しぐれ・extra}
347
+
348
+
349
+ ## 结语
350
+
351
+ Markdown 是一种简单、强大且易于掌握的标记语言,通过学习基础和进阶语法,你可以快速创作内容并有效传达信息。无论是技术文档、个人博客还是项目说明,Markdown 都是你的得力助手。希望这篇内容能够带你全面了解 Markdown 的潜力,让你的写作更加丰富多彩!
352
+
353
+ 现在,拿起 Markdown 编辑器,开始创作吧!探索 Markdown 的世界,你会发现它远比想象中更精彩!
354
+
355
+ #### 推荐阅读
356
+
357
+ - [阿里又一个 20k+ stars 开源项目诞生,恭喜 fastjson!](https://mp.weixin.qq.com/s/RNKDCK2KoyeuMeEs6GUrow)
358
+ - [刷掉 90% 候选人的互联网大厂海量数据面试题(附题解 + 方法总结)](https://mp.weixin.qq.com/s/rjGqxUvrEqJNlo09GrT1Dw)
359
+ - [好用!期待已久的文本块功能究竟如何在 Java 13 中发挥作用?](https://mp.weixin.qq.com/s/kalGv5T8AZGxTnLHr2wDsA)
360
+ - [2019 GitHub 开源贡献排行榜新鲜出炉!微软谷歌领头,阿里跻身前 12!](https://mp.weixin.qq.com/s/_q812aGD1b9QvZ2WFI0Qgw)
361
+
362
+ ---
363
+
364
+ <center>
365
+ <img src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png" style="width: 100px;">
366
+ </center>
367
+ `,DEFAULT_CSS_CONTENT=`/**
368
+ * 按 Alt/Option + Shift + F 可格式化
369
+ * 如需使用主题色,请使用 var(--md-primary-color) 代替颜色值
370
+ * 如:color: var(--md-primary-color);
371
+ *
372
+ * 召集令:如果你有好看的主题样式,欢迎分享,让更多人能够使用到你的主题。
373
+ * 提交区:https://github.com/doocs/md/discussions/426
374
+ */
375
+ /* 顶层容器样式 */
376
+ container {
377
+ }
378
+ /* 一级标题样式 */
379
+ h1 {
380
+ }
381
+ /* 二级标题样式 */
382
+ h2 {
383
+ }
384
+ /* 三级标题样式 */
385
+ h3 {
386
+ }
387
+ /* 四级标题样式 */
388
+ h4 {
389
+ }
390
+ /* 五级标题样式 */
391
+ h5 {
392
+ }
393
+ /* 六级标题样式 */
394
+ h6 {
395
+ }
396
+ /* 图片样式 */
397
+ image {
398
+ }
399
+ /* 引用样式 */
400
+ blockquote {
401
+ }
402
+ /* 引用段落样式 */
403
+ blockquote_p {
404
+ }
405
+ /* 段落样式 */
406
+ p {
407
+ }
408
+ /* 分割线样式 */
409
+ hr {
410
+ }
411
+ /* 行内代码样式 */
412
+ codespan {
413
+ }
414
+ /* 斜体样式 */
415
+ em {
416
+ }
417
+ /* 粗体样式 */
418
+ strong {
419
+ }
420
+ /* 链接样式 */
421
+ link {
422
+ }
423
+ /* 微信链接样式 */
424
+ wx_link {
425
+ }
426
+ /* 有序列表样式 */
427
+ ol {
428
+ }
429
+ /* 无序列表样式 */
430
+ ul {
431
+ }
432
+ /* 列表项样式 */
433
+ listitem {
434
+ }
435
+ /* 代码块样式 */
436
+ code {
437
+ }
438
+ /* 代码块外层样式 */
439
+ code_pre {
440
+ }
441
+ /* 行内公式样式 */
442
+ inline_katex {
443
+ }
444
+ /* 公式块样式 */
445
+ block_katex {
446
+ }
447
+ /* GFM note 样式 */
448
+ blockquote_note {
449
+ }
450
+ /* GFM tip 样式 */
451
+ blockquote_tip {
452
+ }
453
+ /* GFM info 样式 */
454
+ blockquote_info {
455
+ }
456
+ /* GFM important 样式 */
457
+ blockquote_important {
458
+ }
459
+ /* GFM warning 样式 */
460
+ blockquote_warning {
461
+ }
462
+ /* GFM caution 样式 */
463
+ blockquote_caution {
464
+ }
465
+ /* GFM 通用标题 */
466
+ blockquote_title {
467
+ }
468
+ /* GFM note 标题 */
469
+ blockquote_title_note {
470
+ }
471
+ /* GFM tip 标题 */
472
+ blockquote_title_tip {
473
+ }
474
+ /* GFM info 标题 */
475
+ blockquote_title_info {
476
+ }
477
+ /* GFM important 标题 */
478
+ blockquote_title_important {
479
+ }
480
+ /* GFM warning 标题 */
481
+ blockquote_title_warning {
482
+ }
483
+ /* GFM caution 标题 */
484
+ blockquote_title_caution {
485
+ }
486
+ /* GFM note 段落样式 */
487
+ blockquote_p_note {
488
+ }
489
+ /* GFM tip 段落样式 */
490
+ blockquote_p_tip {
491
+ }
492
+ /* GFM info 段落样式 */
493
+ blockquote_p_info {
494
+ }
495
+ /* GFM important 段落样式 */
496
+ blockquote_p_important {
497
+ }
498
+ /* GFM warning 段落样式 */
499
+ blockquote_p_warning {
500
+ }
501
+ /* GFM caution 段落样式 */
502
+ blockquote_p_caution {
503
+ }
504
+ `,isMac=/Mac/i.test(navigator.userAgent),ctrlKey=isMac?"Cmd":"Ctrl",altKey="Alt",shiftKey="Shift",ctrlSign=isMac?"⌘":"Ctrl",altSign=isMac?"⌥":"Alt",shiftSign=isMac?"⇧":"Shift";async function addSpacingToMarkdown(t){const e=await unified().use(remarkParse).use(()=>o=>{visit(o,"text",(a,n,r)=>{var s;if(r&&!(r.type==="code"||r.type==="inlineCode")){if(r.type==="link"){const l=r,u=(s=l.children)==null?void 0:s[0];if((u==null?void 0:u.type)==="text"&&u.value===l.url)return}a.value=insertSpace(String(a.value))}})}).use(remarkStringify,{fences:!0,bullet:"-"}).process(t);return String(e)}function insertSpace(t){return t.replace(/([\u4E00-\u9FA5])([A-Za-z0-9@#&\u0080-\u00FF`])/g,"$1 $2").replace(/([\w~!$%^&*+\-=|\\;:'",.<>/?@#\u0080-\u00FF`])([\u4E00-\u9FA5])/g,"$1 $2").replace(/\s{2,}/g," ")}function sanitizeTitle(t){const o=/[\\/:*?"<>|]/g;if(!o.test(t)&&t.length<=100)return t.trim()||"untitled";const a=t.replace(o,"_").trim();return(a.length>100?a.slice(0,100):a)||"untitled"}function removeLeft(t){const e=t.split(`
505
+ `),o=e.filter(a=>a.trim()).map(a=>a.match(/(^\s+)?/)[0].length).sort((a,n)=>a-n)[0];return e.map(a=>a.slice(o)).join(`
506
+ `)}function checkImage(t){if(!/\.(?:gif|jpe?g|png)$/i.test(t.name))return{ok:!1,msg:"请上传 JPG/PNG/GIF 格式的图片"};const o=10;return t.size>o*1024*1024?{ok:!1,msg:`由于公众号限制,图片大小不能超过 ${o}M`}:{ok:!0,msg:""}}function css2json(t){t=t.replace(/\/\*[\s\S]*?\*\//g,"");const e={},o=a=>a.reduce((n,r)=>{const[s,...l]=r.split(":").map(u=>u.trim());return s&&(n[s]=l.join(":")),n},{});for(;t.includes("{")&&t.includes("}");){const a=t.indexOf("{"),n=t.indexOf("}"),r=t.substring(a+1,n).split(";").map(u=>u.trim()).filter(Boolean),s=t.substring(0,a).split(",").map(u=>u.trim()),l=o(r);s.forEach(u=>{e[u]={...e[u]||{},...l}}),t=t.slice(n+1).trim()}return e}const service=axios.create({baseURL:"",timeout:30*1e3});service.interceptors.request.use(t=>(/^(?:post|put|delete)$/i.test(`${t.method}`)&&t.data&&t.data.upload&&(t.headers["Content-Type"]="multipart/form-data"),t),t=>{Promise.reject(t)});service.interceptors.response.use(t=>t.data?t.data:Promise.reject(t),t=>Promise.reject(t));function downloadFile(t,e,o="text/plain"){if(typeof document>"u")throw new TypeError("downloadFile can only be used in browser environment");const a=document.createElement("a");if(a.download=e,a.style.display="none",t.startsWith("data:"))a.href=t;else if(o==="text/html")a.href=`data:text/html;charset=utf-8,${encodeURIComponent(t)}`;else{const n=new Blob([t],{type:o});a.href=URL.createObjectURL(n)}document.body.appendChild(a),a.click(),document.body.removeChild(a),!t.startsWith("data:")&&o!=="text/html"&&URL.revokeObjectURL(a.href)}function toBase64(t){return new Promise((e,o)=>{const a=new FileReader;a.readAsDataURL(t),a.onload=()=>e(a.result.split(",").pop()),a.onerror=n=>o(n)})}function createTable({data:t,rows:e,cols:o}){let a="";for(let n=0;n<e+2;++n){a+="| ";const r=[];for(let s=0;s<o;++s){const l=n>1?n-1:n;r.push(n===1?"---":t[`k_${l}_${s}`]||" ")}a+=r.join(" | "),a+=` |
507
+ `}return a}async function formatDoc(t,e="markdown"){const o={markdown:[prettierPluginMarkdown,prettierPluginBabel,prettierPluginEstree],css:[prettierPluginCss]},a=await addSpacingToMarkdown(t),n=e in o?e:"markdown";return await gu(a,{parser:n,plugins:o[n]})}function utf16to8(t){let e="";const o=t.length;for(let a=0;a<o;a++){const n=t.charCodeAt(a);n>=1&&n<=127?e+=t.charAt(a):n>2047?(e+=String.fromCharCode(224|n>>12&15),e+=String.fromCharCode(128|n>>6&63),e+=String.fromCharCode(128|n&63)):(e+=String.fromCharCode(192|n>>6&31),e+=String.fromCharCode(128|n&63))}return e}function utf8to16(t){let e="",o=0;const a=t.length;for(;o<a;){const n=t.charCodeAt(o++);let r,s;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:e+=t.charAt(o-1);break;case 12:case 13:r=t.charCodeAt(o++),e+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=t.charCodeAt(o++),s=t.charCodeAt(o++),e+=String.fromCharCode((n&15)<<12|(r&63)<<6|s&63);break}}return e}const base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",base64DecodeChars=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];function base64encode(t){let e="",o=0;const a=t.length;for(;o<a;){const n=t.charCodeAt(o++)&255;if(o===a){e+=base64EncodeChars.charAt(n>>2),e+=base64EncodeChars.charAt((n&3)<<4),e+="==";break}const r=t.charCodeAt(o++);if(o===a){e+=base64EncodeChars.charAt(n>>2),e+=base64EncodeChars.charAt((n&3)<<4|(r&240)>>4),e+=base64EncodeChars.charAt((r&15)<<2),e+="=";break}const s=t.charCodeAt(o++);e+=base64EncodeChars.charAt(n>>2),e+=base64EncodeChars.charAt((n&3)<<4|(r&240)>>4),e+=base64EncodeChars.charAt((r&15)<<2|(s&192)>>6),e+=base64EncodeChars.charAt(s&63)}return e}function base64decode(t){let e,o,a,n,r=0;const s=t.length;let l="";for(;r<s;){do e=base64DecodeChars[t.charCodeAt(r++)&255];while(r<s&&e===-1);if(e===-1)break;do o=base64DecodeChars[t.charCodeAt(r++)&255];while(r<s&&o===-1);if(o===-1)break;l+=String.fromCharCode(e<<2|(o&48)>>4);do{if(a=t.charCodeAt(r++)&255,a===61)return l;a=base64DecodeChars[a]}while(r<s&&a===-1);if(a===-1)break;l+=String.fromCharCode((o&15)<<4|(a&60)>>2);do{if(n=t.charCodeAt(r++)&255,n===61)return l;n=base64DecodeChars[n]}while(r<s&&n===-1);if(n===-1)break;l+=String.fromCharCode((a&3)<<6|n)}return l}function safe64(t){return t=t.replace(/\+/g,"-"),t=t.replace(/\//g,"_"),t}const tokenTools=Object.freeze(Object.defineProperty({__proto__:null,base64decode,base64encode,safe64,utf16to8,utf8to16},Symbol.toStringTag,{value:"Module"}));function addPrefix(t){return`${prefix}__${t}`}function downloadMD(t,e="untitled"){const o=sanitizeTitle(e);downloadFile(t,`${o}.md`,"text/markdown;charset=utf-8")}function setStyles(t){function e(r,s=["width","height","inlineSize","webkitLogicalWidth","webkitLogicalHeight"]){const l=getComputedStyle(r,null);return Object.entries(l).filter(([u])=>{const c=u.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`);return l.getPropertyValue(c)&&!s.includes(u)}).map(([u,c])=>`${u.replace(/[A-Z]/g,w=>`-${w.toLowerCase()}`)}:${c};`).join("")}switch(!0){case o(t):case a(t):case n(t):t.setAttribute("style",e(t))}t.children.length&&Array.from(t.children).forEach(r=>setStyles(r));function o(r){return r.tagName==="PRE"&&Array.from(r.classList).includes("code__pre")}function a(r){return r==null?!1:r.tagName==="CODE"}function n(r){return r.tagName==="SPAN"&&(a(r.parentElement)||a(r.parentElement.parentElement))}}function processHtmlContent(t){const e=document.querySelector("#output");return setStyles(e),e.innerHTML.replace(/var\(--md-primary-color\)/g,t).replace(/--md-primary-color:.+?;/g,"")}function exportHTML(t,e="untitled"){const a=`<html><head><meta charset="utf-8" /></head><body><div style="width: 750px; margin: auto;">${processHtmlContent(t)}</div></body></html>`;downloadFile(a,`${sanitizeTitle(e)}.html`,"text/html")}async function exportPureHTML(t,e="untitled"){const o=sanitizeTitle(e),a=new B;a.use(markedAlert({withoutStyle:!0})),a.use(MDKatex({nonStandard:!0},"",""));const n=await a.parse(t);downloadFile(n,`${o}.html`,"text/html")}function exportPDF(t,e="untitled"){const o=processHtmlContent(t),a=sanitizeTitle(e),n=window.open("","_blank");if(!n){console.error("无法打开打印窗口");return}n.document.write(`
508
+ <!DOCTYPE html>
509
+ <html>
510
+ <head>
511
+ <meta charset="utf-8">
512
+ <title>${a}</title>
513
+ <style>
514
+ @page {
515
+ @top-center {
516
+ content: "${a}";
517
+ font-size: 12px;
518
+ color: #666;
519
+ }
520
+ @bottom-left {
521
+ content: "微信 Markdown 编辑器";
522
+ font-size: 10px;
523
+ color: #999;
524
+ }
525
+ @bottom-right {
526
+ content: "第 " counter(page) " 页,共 " counter(pages) " 页";
527
+ font-size: 10px;
528
+ color: #999;
529
+ }
530
+ }
531
+
532
+ @media print {
533
+ body { margin: 0; }
534
+ }
535
+ </style>
536
+ </head>
537
+ <body>
538
+ <div style="width: 100%; max-width: 750px; margin: auto;">
539
+ ${o}
540
+ </div>
541
+ </body>
542
+ </html>
543
+ `),n.document.close(),n.onload=()=>{n.print(),n.onafterprint=()=>{n.close()}}}function solveWeChatImage(){const e=document.getElementById("output").getElementsByTagName("img");Array.from(e).forEach(o=>{const a=o.getAttribute("width"),n=o.getAttribute("height");o.removeAttribute("width"),o.removeAttribute("height"),o.style.width=a,o.style.height=n})}async function getHljsStyles(){const t=document.querySelector("#hljs");if(!t)return"";try{const o=await(await fetch(t.href)).text();return console.log(o,"cssText"),`<style>${o}</style>`}catch(e){return console.warn("Failed to fetch highlight.js styles:",e),""}}function mergeCss(t){return juice(t,{inlinePseudoElements:!0,preserveImportant:!0})}function modifyHtmlStructure(t){const e=document.createElement("div");return e.innerHTML=t,e.querySelectorAll("li > ul, li > ol").forEach(o=>{o.parentElement.insertAdjacentElement("afterend",o)}),e.innerHTML}function createEmptyNode(){const t=document.createElement("p");return t.style.fontSize="0",t.style.lineHeight="0",t.style.margin="0",t.innerHTML="&nbsp;",t}async function processClipboardContent(t){const e=document.getElementById("output"),o=await getHljsStyles();o&&(e.innerHTML=o+e.innerHTML),e.innerHTML=modifyHtmlStructure(mergeCss(e.innerHTML)),e.innerHTML=e.innerHTML.replace(/([^-])top:(.*?)em/g,"$1transform: translateY($2em)").replace(/hsl\(var\(--foreground\)\)/g,"#3f3f3f").replace(/var\(--blockquote-background\)/g,"#f7f7f7").replace(/var\(--md-primary-color\)/g,t).replace(/--md-primary-color:.+?;/g,"").replace(/<span class="nodeLabel"([^>]*)><p[^>]*>(.*?)<\/p><\/span>/g,'<span class="nodeLabel"$1>$2</span>').replace(/<span class="edgeLabel"([^>]*)><p[^>]*>(.*?)<\/p><\/span>/g,'<span class="edgeLabel"$1>$2</span>'),solveWeChatImage();const a=createEmptyNode(),n=createEmptyNode();e.insertBefore(a,e.firstChild),e.appendChild(n),e.querySelectorAll(".nodeLabel").forEach(s=>{const l=s.parentElement,u=l.getAttribute("xmlns"),c=l.getAttribute("style"),p=document.createElement("section");p.setAttribute("xmlns",u),p.setAttribute("style",c),p.innerHTML=l.innerHTML;const w=l.parentElement;w.innerHTML="",w.appendChild(p)})}function legacyCopy(t){return new Promise((e,o)=>{try{const a=document.createElement("textarea");a.value=t,a.setAttribute("readonly","true"),a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select();const n=document.execCommand("copy");document.body.removeChild(a),n?e():o(new Error("execCommand failed"))}catch(a){o(a)}})}async function copyPlain(t){var e;if(window.isSecureContext&&((e=navigator.clipboard)!=null&&e.writeText))try{await navigator.clipboard.writeText(t);return}catch{}await legacyCopy(t)}const useStore=defineStore("store",()=>{const t=useDark(),e=useToggle(t),o=useStorage("isMacCodeBlock",defaultStyleConfig.isMacCodeBlock),a=useToggle(o),n=useStorage("isEditOnLeft",!0),r=useToggle(n),s=useStorage("isCiteStatus",defaultStyleConfig.isCiteStatus),l=useToggle(s),u=useStorage("showAIToolbox",!0),c=useToggle(u),p=useStorage("isCountStatus",defaultStyleConfig.isCountStatus),w=useToggle(p),i=useStorage(addPrefix("use_indent"),!1),C=useToggle(i),$=useStorage(addPrefix("use_justify"),!1),g=useToggle($),f=ref(""),h=useStorage(addPrefix("theme"),defaultStyleConfig.theme),x=useStorage("fonts",defaultStyleConfig.fontFamily),_=useStorage("size",defaultStyleConfig.fontSize),b=useStorage("color",defaultStyleConfig.primaryColor),M=useStorage("codeBlockTheme",defaultStyleConfig.codeBlockTheme),L=useStorage("legend",defaultStyleConfig.legend),D=useStorage("previewWidth",widthOptions[0].value),k=computed(()=>Number(_.value.replace("px",""))),N=ref(null),A=useStorage("__editor_content",DEFAULT_CONTENT),j=useStorage(addPrefix("is_open_right_slider"),!1),ae=useStorage(addPrefix("is_open_post_slider"),!1),J=useStorage(addPrefix("posts"),[{id:v4(),title:"内容1",content:DEFAULT_CONTENT,history:[{datetime:new Date().toLocaleString("zh-cn"),content:DEFAULT_CONTENT}],createDatetime:new Date,updateDatetime:new Date}]),I=useStorage(addPrefix("current_post_id"),""),v=useStorage("isMobile",!1);function H(){v.value=window.innerWidth<=768}onMounted(()=>{H(),window.addEventListener("resize",H)}),onBeforeUnmount(()=>{window.removeEventListener("resize",H)}),onBeforeMount(()=>{var S;J.value=J.value.map((Z,se)=>{const ge=Date.now();return{...Z,id:Z.id??v4(),createDatetime:Z.createDatetime??new Date(ge+se),updateDatetime:Z.updateDatetime??new Date(ge+se)}}),(!I.value||!J.value.some(Z=>Z.id===I.value))&&(I.value=((S=J.value[0])==null?void 0:S.id)??"")});const W=S=>J.value.findIndex(Z=>Z.id===S),P=computed({get:()=>W(I.value),set:S=>{S>=0&&S<J.value.length&&(I.value=J.value[S].id)}}),oe=S=>J.value.find(Z=>Z.id===S),Q=(S,Z=null)=>{const se={id:v4(),title:S,content:`# ${S}`,history:[{datetime:new Date().toLocaleString("zh-cn"),content:`# ${S}`}],createDatetime:new Date,updateDatetime:new Date,parentId:Z};J.value.push(se),I.value=se.id},le=(S,Z)=>{const se=oe(S);se&&(se.title=Z)},R=S=>{var se;const Z=W(S);Z!==-1&&(J.value.splice(Z,1),I.value=((se=J.value[Math.min(Z,J.value.length-1)])==null?void 0:se.id)??"")},K=(S,Z)=>{const se=oe(S);se&&(se.parentId=Z,se.updateDatetime=new Date)},te=()=>{J.value.forEach(S=>{S.collapsed=!0})},F=()=>{J.value.forEach(S=>{S.collapsed=!1})};watch(I,()=>{const S=oe(I.value);S&&N.value&&toRaw(N.value).setValue(S.content)}),onMounted(()=>{if(A.value!==DEFAULT_CONTENT){const S=oe(I.value);S&&(S.content=A.value),A.value=DEFAULT_CONTENT}});const E=()=>{formatDoc(N.value.getValue()).then(S=>{J.value[P.value].content=S,toRaw(N.value).setValue(S)})},z=()=>{const S=M.value,Z=document.querySelector("#hljs");if(Z)Z.setAttribute("href",S);else{const se=document.createElement("link");se.setAttribute("type","text/css"),se.setAttribute("rel","stylesheet"),se.setAttribute("href",S),se.setAttribute("id","hljs"),document.head.appendChild(se)}},q=ref(null),ne=S=>{q.value.setValue(S)},ee=useStorage("__css_content",DEFAULT_CSS_CONTENT),ie=useStorage(addPrefix("css_content_config"),{active:"方案1",tabs:[{title:"方案1",name:"方案1",content:ee.value||DEFAULT_CSS_CONTENT}]});onMounted(()=>{ee.value=""});const U=()=>ie.value.tabs.find(S=>S.name===ie.value.active),G=S=>{ie.value.active=S;const Z=ie.value.tabs.find(se=>se.name===S).content;ne(Z)},re=S=>{const Z=U();Z.title=S,Z.name=S,ie.value.active=S},de=S=>{ie.value.tabs.push({name:S,title:S,content:DEFAULT_CSS_CONTENT}),ie.value.active=S,ne(DEFAULT_CSS_CONTENT)},fe=S=>ie.value.tabs.every(({name:Z})=>Z!==S),we=initRenderer({theme:customCssWithTemplate(css2json(U().content),b.value,customizeTheme(themeMap[h.value],{fontSize:k.value,color:b.value})),fonts:x.value,size:_.value,isUseIndent:i.value,isUseJustify:$.value,isMacCodeBlock:o.value}),me=reactive({chars:0,words:0,minutes:0}),be=ref([]),_e=()=>{z(),we.reset({citeStatus:s.value,legend:L.value,isUseIndent:i.value,isUseJustify:$.value,countStatus:p.value,isMacCodeBlock:o.value});const S=N.value.getValue(),{html:Z,readingTime:se}=renderMarkdown(S,we);me.chars=S.length,me.words=se.words,me.minutes=Math.ceil(se.minutes),f.value=postProcessHtml(Z,se,we);const ge=document.createElement("div");ge.innerHTML=f.value;const ke=ge.querySelectorAll("[data-heading]");be.value=[];let Be=0;for(const Ve of ke)Ve.setAttribute("id",`${Be}`),be.value.push({url:`#${Be}`,title:`${Ve.textContent}`,level:Number(Ve.tagName.slice(1))}),Be++;f.value=ge.innerHTML},ve=()=>{const S=css2json(q.value.getValue()),Z=customCssWithTemplate(S,b.value,customizeTheme(themeMap[h.value],{fontSize:k.value,color:b.value}));we.setOptions({theme:Z}),_e()};onMounted(()=>{const S=document.querySelector("#cssEditor");S.value=U().content;const Z=t.value?"darcula":"xq-light";q.value=markRaw(CodeMirror.fromTextArea(S,{mode:"css",theme:Z,lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,matchBrackets:!0,autofocus:!0,extraKeys:{[`${shiftKey}-${altKey}-F`]:function(ge){formatDoc(ge.getValue(),"css").then(ke=>{U().content=ke,ge.setValue(ke)})}}})),q.value.on("keyup",(se,ge)=>{(ge.keyCode>=65&&ge.keyCode<=90||ge.keyCode===189)&&se.showHint(ge)}),q.value.on("update",()=>{ve(),U().content=q.value.getValue()})}),watch(t,()=>{var Z,se;const S=t.value?"darcula":"xq-light";(se=(Z=toRaw(q.value))==null?void 0:Z.setOption)==null||se.call(Z,"theme",S)});const he=()=>{s.value=defaultStyleConfig.isCiteStatus,o.value=defaultStyleConfig.isMacCodeBlock,p.value=defaultStyleConfig.isCountStatus,h.value=defaultStyleConfig.theme,x.value=defaultStyleConfig.fontFamily,_.value=defaultStyleConfig.fontSize,b.value=defaultStyleConfig.primaryColor,M.value=defaultStyleConfig.codeBlockTheme,L.value=defaultStyleConfig.legend,ie.value={active:"方案 1",tabs:[{title:"方案 1",name:"方案 1",content:ee.value||DEFAULT_CSS_CONTENT}]},q.value.setValue(DEFAULT_CSS_CONTENT),ve(),_e(),toast.success("样式已重置")},pe=S=>(...Z)=>{S(...Z),_e()},ue=(S,Z)=>{const se=themeMap[h.value],ge=Number(S.replace("px",""));return customCssWithTemplate(css2json(U().content),Z,customizeTheme(se,{fontSize:ge,color:Z}))},Y=pe(S=>{we.setOptions({theme:customCssWithTemplate(css2json(U().content),b.value,customizeTheme(themeMap[S],{fontSize:k.value}))}),h.value=S}),V=pe(S=>{we.setOptions({fonts:S}),x.value=S}),ce=pe(S=>{const Z=ue(S,b.value);we.setOptions({size:S,theme:Z}),_.value=S}),xe=pe(S=>{const Z=ue(_.value,S);we.setOptions({theme:Z}),b.value=S}),Ce=pe(S=>{M.value=S}),Ne=pe(S=>{D.value=S}),Ee=pe(S=>{L.value=S}),ye=pe(()=>{a()}),m=pe(()=>{l()}),y=pe(()=>{w()}),T=pe(()=>{C()}),$e=pe(()=>{g()}),Ge=pe(()=>{c()}),De=()=>{const S=processHtmlContent(b.value);return document.querySelector("#output").innerHTML=f.value,S},Ae=()=>{exportHTML(b.value,J.value[P.value].title),document.querySelector("#output").innerHTML=f.value},Le=()=>{exportPureHTML(N.value.getValue(),J.value[P.value].title)},Ie=async()=>{const S=document.querySelector("#output-wrapper>.preview"),Z=await toPng(S,{backgroundColor:t.value?"":"#fff",skipFonts:!0,pixelRatio:Math.max(window.devicePixelRatio||1,2),style:{margin:"0"}});downloadFile(Z,`${sanitizeTitle(J.value[P.value].title)}.png`,"image/png")},Pe=()=>{exportPDF(b.value,J.value[P.value].title),document.querySelector("#output").innerHTML=f.value},Oe=()=>{downloadMD(N.value.getValue(),J.value[P.value].title)},Me=()=>{toRaw(N.value).setValue(DEFAULT_CONTENT),toast.success("文档已重置")},Ue=()=>{toRaw(N.value).setValue(""),toast.success("内容已清空")},Fe=async()=>{const S=N.value.getSelection();copyPlain(S)},ze=async()=>{try{const S=await navigator.clipboard.readText();N.value.replaceSelection(S)}catch(S){console.log("粘贴失败",S)}},He=()=>{N.value&&N.value.undo()},qe=()=>{N.value&&N.value.redo()},Te=ref(!1);return{isDark:t,toggleDark:e,isEditOnLeft:n,toggleEditOnLeft:r,isMacCodeBlock:o,isCiteStatus:s,citeStatusChanged:m,showAIToolbox:u,aiToolboxChanged:Ge,isUseIndent:i,useIndentChanged:T,isUseJustify:$,useJustifyChanged:$e,isCountStatus:p,countStatusChanged:y,output:f,editor:N,cssEditor:q,theme:h,fontFamily:x,fontSize:_,primaryColor:b,codeBlockTheme:M,legend:L,readingTime:me,previewWidth:D,previewWidthChanged:Ne,editorRefresh:_e,themeChanged:Y,fontChanged:V,sizeChanged:ce,colorChanged:xe,codeBlockThemeChanged:Ce,legendChanged:Ee,macCodeBlockChanged:ye,formatContent:E,exportEditorContent2HTML:Ae,exportEditorContent2PureHTML:Le,exportEditorContent2MD:Oe,exportEditorContent2PDF:Pe,downloadAsCardImage:Ie,importDefaultContent:Me,clearContent:Ue,copyToClipboard:Fe,pasteFromClipboard:ze,undo:He,redo:qe,isOpenConfirmDialog:Te,resetStyleConfirm:()=>{Te.value=!0},resetStyle:he,cssContentConfig:ie,addCssContentTab:de,validatorTabName:fe,setCssEditorValue:ne,tabChanged:G,renameTab:re,posts:J,currentPostId:I,currentPostIndex:P,getPostById:oe,addPost:Q,renamePost:le,delPost:R,isOpenPostSlider:ae,isOpenRightSlider:j,titleList:be,isMobile:v,updatePostParentId:K,collapseAllPosts:te,expandAllPosts:F,editorContent2HTML:De}}),useDisplayStore=defineStore("display",()=>{const t=useStorage("isShowCssEditor",!1),e=useToggle(t),o=ref(!1),a=useToggle(o),n=ref(!1),r=useToggle(n),s=ref(!1),l=useToggle(s),u=ref(!1);function c(p){u.value=p??!u.value}return{isShowCssEditor:t,toggleShowCssEditor:e,isShowInsertFormDialog:o,toggleShowInsertFormDialog:a,isShowInsertMpCardDialog:n,toggleShowInsertMpCardDialog:r,isShowUploadImgDialog:s,toggleShowUploadImgDialog:l,aiDialogVisible:u,toggleAIDialog:c}});function getAllStoreStates(){const t=useStore(),e=useDisplayStore();return{isDark:t.isDark,isEditOnLeft:t.isEditOnLeft,isMacCodeBlock:t.isMacCodeBlock,isCiteStatus:t.isCiteStatus,showAIToolbox:t.showAIToolbox,isCountStatus:t.isCountStatus,isUseIndent:t.isUseIndent,isUseJustify:t.isUseJustify,isOpenRightSlider:t.isOpenRightSlider,isOpenPostSlider:t.isOpenPostSlider,theme:t.theme,fontFamily:t.fontFamily,fontSize:t.fontSize,primaryColor:t.primaryColor,codeBlockTheme:t.codeBlockTheme,legend:t.legend,currentPostId:t.currentPostId,currentPostIndex:t.currentPostIndex,posts:t.posts,cssContentConfig:t.cssContentConfig,titleList:t.titleList,readingTime:t.readingTime,isShowCssEditor:e.isShowCssEditor,isShowInsertFormDialog:e.isShowInsertFormDialog,isShowUploadImgDialog:e.isShowUploadImgDialog,isShowInsertMpCardDialog:e.isShowInsertMpCardDialog,aiDialogVisible:e.aiDialogVisible}}const _hoisted_1$p={class:"flex select-none items-center justify-end px-5 py-2 text-xs"},_hoisted_2$i={class:"space-x-2"},_sfc_main$1I=defineComponent({__name:"Footer",setup(t){const e=useStore(),{readingTime:o}=storeToRefs(e);return(a,n)=>(openBlock(),createElementBlock("footer",_hoisted_1$p,[createBaseVNode("div",_hoisted_2$i,[createBaseVNode("span",null,toDisplayString(unref(o).words)+" 个词 ",1),createBaseVNode("span",null,toDisplayString(unref(o).chars)+" 个字符 ",1),createBaseVNode("span",null," 阅读大约需 "+toDisplayString(unref(o).minutes)+" 分钟 ",1)])]))}}),_sfc_main$1H=defineComponent({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(Tv),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}});function cn(...t){return twMerge(clsx(t))}const _sfc_main$1G=defineComponent({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(Av),null,{default:withCtx(()=>[createVNode(unref(kv),{class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),createVNode(unref(Ov),mergeProps(unref(r),{class:unref(cn)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$1F=defineComponent({__name:"AlertDialogFooter",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",e.class))},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$1E=defineComponent({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(O),{as:o.as,"as-child":o.asChild,class:normalizeClass(unref(cn)(unref(buttonVariants)({variant:o.variant,size:o.size}),e.class))},{default:withCtx(()=>[renderSlot(o.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),buttonVariants=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),_sfc_main$1D=defineComponent({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(Nv),mergeProps(o.value,{class:unref(cn)(unref(buttonVariants)(),e.class)}),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1C=defineComponent({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(Mv),mergeProps(o.value,{class:unref(cn)(unref(buttonVariants)({variant:"outline"}),"mt-2 sm:mt-0",e.class)}),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1B=defineComponent({__name:"AlertDialogHeader",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn)("flex flex-col gap-y-2 text-center sm:text-left",e.class))},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$1A=defineComponent({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(Fv),mergeProps(o.value,{class:unref(cn)("text-sm text-muted-foreground",e.class)}),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1z=defineComponent({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(Vv),mergeProps(o.value,{class:unref(cn)("text-lg font-semibold",e.class)}),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1y=defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(nu),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_sfc_main$1x=defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(Iv),null,{default:withCtx(()=>[createVNode(unref($u),{class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),createVNode(unref(Pu),mergeProps(unref(r),{class:unref(cn)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default"),createVNode(unref(Xl),{class:"data-[state=open]:bg-accent ring-offset-background data-[state=open]:text-muted-foreground focus:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity disabled:pointer-events-none hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-offset-2"},{default:withCtx(()=>[createVNode(unref(X),{class:"h-4 w-4"}),l[0]||(l[0]=createBaseVNode("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),_sfc_main$1w=defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},setup(t,{emit:e}){const o=t,n=useVModel(o,"modelValue",e,{passive:!0,defaultValue:o.defaultValue});return(r,s)=>withDirectives((openBlock(),createElementBlock("textarea",{"onUpdate:modelValue":s[0]||(s[0]=l=>isRef(n)?n.value=l:null),class:normalizeClass(unref(cn)("flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",o.class))},null,2)),[[vModelText,unref(n)]])}}),_sfc_main$1v=defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(Vh),mergeProps(o.value,{class:unref(cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e.class)}),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$o={class:"min-h-[64px]"},_hoisted_2$h={class:"flex flex-1 flex-col justify-between"},_hoisted_3$e={class:"min-h-[40px] flex items-center"},_hoisted_4$c={key:0,class:"min-h-[24px] flex items-center text-[12px] text-red-500"},_hoisted_5$a={key:1,class:"mb-[-24px]"},_sfc_main$1u=defineComponent({__name:"FormItem",props:{label:{},required:{type:Boolean},error:{}},setup(t){const e=t;return(o,a)=>{const n=_sfc_main$1v;return openBlock(),createElementBlock("div",_hoisted_1$o,[createVNode(n,{class:"mb-[24px] flex items-center"},{default:withCtx(()=>[createBaseVNode("span",{class:normalizeClass(["mr-4 min-h-[40px] w-[150px] flex shrink-0 items-center justify-end font-bold",{required:e.required}])},toDisplayString(e.label),3),createBaseVNode("div",_hoisted_2$h,[createBaseVNode("div",_hoisted_3$e,[renderSlot(o.$slots,"default",{},void 0,!0)]),o.error?(openBlock(),createElementBlock("p",_hoisted_4$c,toDisplayString(o.error),1)):createCommentVNode("",!0),o.error?(openBlock(),createElementBlock("div",_hoisted_5$a)):createCommentVNode("",!0)])]),_:3})])}}}),__unplugin_components_12=_export_sfc(_sfc_main$1u,[["__scopeId","data-v-534cdc1e"]]),_sfc_main$1t=defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},setup(t,{emit:e}){const o=t,n=useVModel(o,"modelValue",e,{passive:!0,defaultValue:o.defaultValue});return(r,s)=>withDirectives((openBlock(),createElementBlock("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>isRef(n)?n.value=l:null),class:normalizeClass(unref(cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",o.class))},null,2)),[[vModelText,unref(n)]])}}),_sfc_main$1s=defineComponent({__name:"AlertDescription",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn)("text-sm [&_p]:leading-relaxed",e.class))},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$1r=defineComponent({__name:"AlertTitle",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("h5",{class:normalizeClass(unref(cn)("mb-1 font-medium leading-none tracking-tight",e.class))},[renderSlot(o.$slots,"default")],2))}}),alertVariants=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),_sfc_main$1q=defineComponent({__name:"Alert",props:{class:{},variant:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn)(unref(alertVariants)({variant:o.variant}),e.class)),role:"alert"},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$1p=defineComponent({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn)("flex flex-col gap-y-1.5 text-center sm:text-left",e.class))},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$1o=defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(Bu),mergeProps(unref(a),{class:unref(cn)("text-lg font-semibold leading-none tracking-tight",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1n=defineComponent({__name:"InsertMpCardDialog",setup(t){const e=useStore(),o=useDisplayStore(),{toggleShowInsertMpCardDialog:a}=o,n=useStorage(addPrefix("mp-profile"),{id:"",name:"",logo:"",desc:""}),r=useStorage("mpId",""),s=useStorage("mpName",""),l=useStorage("mpLogo",""),u=useStorage("mpDesc","");onMounted(()=>{n.value.id=r.value||n.value.id,n.value.name=s.value||n.value.name,n.value.logo=l.value||n.value.logo,n.value.desc=u.value||n.value.desc,r.value="",s.value="",l.value="",u.value=""});const c=toTypedSchema(create$3({id:create$6().required("公众号 ID 不能为空"),name:create$6().required("公众号名称 不能为空"),logo:create$6().optional().url("公众号 Logo 必须是一个有效的 URL"),desc:create$6().optional()}));function p(i){const C=i.logo||"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/mp-logo.png";return`<section class="mp_profile_iframe_wrp custom_select_card_wrp" nodeleaf="">
544
+ <mp-common-profile class="mpprofile js_uneditable custom_select_card mp_profile_iframe" ${['data-pluginname="mpprofile"',`data-id="${i.id}"`,`data-nickname="${i.name}"`,`data-headimg="${C}"`,i.desc&&`data-signature="${i.desc}"`,'data-service_type="1"','data-verify_status="1"'].filter(Boolean).join(" ")}></mp-common-profile>
545
+ <br class="ProseMirror-trailingBreak">
546
+ </section>`}function w(i){n.value=i;const C=p(i);toRaw(e.editor).replaceSelection(`
547
+ ${C}
548
+ `,"end"),toast.success("公众号名片插入成功"),a(!1)}return(i,C)=>{const $=_sfc_main$1o,g=_sfc_main$1p,f=_sfc_main$1r,h=_sfc_main$1s,x=_sfc_main$1q,_=_sfc_main$1t,b=__unplugin_components_12,M=_sfc_main$1w,L=_sfc_main$1E,D=_sfc_main$1x,k=_sfc_main$1y;return openBlock(),createBlock(k,{open:unref(o).isShowInsertMpCardDialog,"onUpdate:open":C[0]||(C[0]=N=>unref(o).isShowInsertMpCardDialog=N)},{default:withCtx(()=>[createVNode(D,null,{default:withCtx(()=>[createVNode(g,null,{default:withCtx(()=>[createVNode($,null,{default:withCtx(()=>C[1]||(C[1]=[createTextVNode("插入公众号名片",-1)])),_:1,__:[1]})]),_:1}),createVNode(x,null,{default:withCtx(()=>[createVNode(unref(Info),{class:"h-4 w-4"}),createVNode(f,null,{default:withCtx(()=>C[2]||(C[2]=[createTextVNode("提示",-1)])),_:1,__:[2]}),createVNode(h,null,{default:withCtx(()=>C[3]||(C[3]=[createTextVNode(" 此功能用于插入微信公众号名片,数据会缓存至本地,可长期使用。 ",-1)])),_:1,__:[3]})]),_:1}),createVNode(unref(Form),{"validation-schema":unref(c),"initial-values":unref(n),onSubmit:w},{default:withCtx(()=>[createVNode(unref(Field),{name:"id"},{default:withCtx(({field:N,errorMessage:A})=>[createVNode(b,{label:"公众号 ID",required:"",error:A},{default:withCtx(()=>[createVNode(_,mergeProps(N,{modelValue:N.value,"onUpdate:modelValue":j=>N.value=j,modelModifiers:{trim:!0},placeholder:"例:MzIxNjA5ODQ0OQ=="}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"name"},{default:withCtx(({field:N,errorMessage:A})=>[createVNode(b,{label:"公众号名称",required:"",error:A},{default:withCtx(()=>[createVNode(_,mergeProps(N,{modelValue:N.value,"onUpdate:modelValue":j=>N.value=j,modelModifiers:{trim:!0},placeholder:"例:Doocs"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"logo"},{default:withCtx(({field:N,errorMessage:A})=>[createVNode(b,{label:"公众号 Logo",error:A},{default:withCtx(()=>[createVNode(_,mergeProps(N,{modelValue:N.value,"onUpdate:modelValue":j=>N.value=j,modelModifiers:{trim:!0},placeholder:"例:https://doocs.com/mp-logo.png"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"desc"},{default:withCtx(({field:N,errorMessage:A})=>[createVNode(b,{label:"公众号描述",error:A},{default:withCtx(()=>[createVNode(M,mergeProps(N,{modelValue:N.value,"onUpdate:modelValue":j=>N.value=j,modelModifiers:{trim:!0},rows:"3",placeholder:"例:GitHub 开源组织 @Doocs 旗下唯一公众号,专注分享技术领域相关知识及行业最新资讯。"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(b,null,{default:withCtx(()=>[createVNode(L,{type:"submit"},{default:withCtx(()=>C[4]||(C[4]=[createTextVNode(" 确认 ",-1)])),_:1,__:[4]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1})]),_:1},8,["open"])}}}),_sfc_main$1m=defineComponent({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",e.class))},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$1l=defineComponent({__name:"NumberField",props:{defaultValue:{},modelValue:{},min:{},max:{},step:{},formatOptions:{},locale:{},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(gy),mergeProps(unref(r),{class:unref(cn)("grid gap-1.5",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1k=defineComponent({__name:"NumberFieldContent",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn)("relative has-data-[slot=increment]:*:data-[slot=input]:pr-5 has-data-[slot=decrement]:*:data-[slot=input]:pl-5",e.class))},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$1j=defineComponent({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(Cy),mergeProps({"data-slot":"increment"},unref(a),{class:unref(cn)("absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default",{},()=>[createVNode(unref(Plus),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$1i=defineComponent({__name:"NumberFieldInput",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(by),{"data-slot":"input",class:normalizeClass(unref(cn)("flex h-10 w-full rounded-md border border-input bg-background py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e.class))},null,8,["class"]))}}),_sfc_main$1h=defineComponent({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(wy),mergeProps({"data-slot":"decrement"},unref(a),{class:unref(cn)("absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default",{},()=>[createVNode(unref(Minus),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_hoisted_1$n={class:"space-x-2 flex justify-between"},_hoisted_2$g={class:"space-y-2 border rounded p-2"},_sfc_main$1g=defineComponent({__name:"InsertFormDialog",setup(t){const e=useStore(),o=useDisplayStore(),{toggleShowInsertFormDialog:a}=o,n=ref(3),r=ref(3),s=ref({});function l(){n.value=3,r.value=3,s.value={}}function u(){const p=createTable({rows:n.value,cols:r.value,data:s.value});toRaw(e.editor).replaceSelection(`
549
+ ${p}
550
+ `,"end"),l(),a()}function c(p){p||a(!1)}return(p,w)=>{const i=_sfc_main$1o,C=_sfc_main$1p,$=_sfc_main$1v,g=_sfc_main$1h,f=_sfc_main$1i,h=_sfc_main$1j,x=_sfc_main$1k,_=_sfc_main$1l,b=_sfc_main$1t,M=_sfc_main$1E,L=_sfc_main$1m,D=_sfc_main$1x,k=_sfc_main$1y;return openBlock(),createBlock(k,{open:unref(o).isShowInsertFormDialog,"onUpdate:open":c},{default:withCtx(()=>[createVNode(D,null,{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>w[3]||(w[3]=[createTextVNode("插入表格",-1)])),_:1,__:[3]})]),_:1}),createBaseVNode("div",_hoisted_1$n,[createVNode(_,{modelValue:unref(n),"onUpdate:modelValue":w[0]||(w[0]=N=>isRef(n)?n.value=N:null),min:1,max:100},{default:withCtx(()=>[createVNode($,null,{default:withCtx(()=>w[4]||(w[4]=[createTextVNode("行数",-1)])),_:1,__:[4]}),createVNode(x,null,{default:withCtx(()=>[createVNode(g),createVNode(f),createVNode(h)]),_:1})]),_:1},8,["modelValue"]),createVNode(_,{modelValue:unref(r),"onUpdate:modelValue":w[1]||(w[1]=N=>isRef(r)?r.value=N:null),min:1,max:100},{default:withCtx(()=>[createVNode($,null,{default:withCtx(()=>w[5]||(w[5]=[createTextVNode("列数",-1)])),_:1,__:[5]}),createVNode(x,null,{default:withCtx(()=>[createVNode(g),createVNode(f),createVNode(h)]),_:1})]),_:1},8,["modelValue"])]),createBaseVNode("div",_hoisted_2$g,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(n)+1,N=>(openBlock(),createElementBlock("div",{key:N,class:normalizeClass([{"head-style":N===1},"space-x-2 flex"])},[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(r),A=>(openBlock(),createBlock(b,{key:A,modelValue:unref(s)[`k_${N-1}_${A-1}`],"onUpdate:modelValue":j=>unref(s)[`k_${N-1}_${A-1}`]=j,class:normalizeClass({"bg-gray-100 dark:bg-gray-900":N===1}),placeholder:N===1?"表头":""},null,8,["modelValue","onUpdate:modelValue","class","placeholder"]))),128))],2))),128))]),createVNode(L,null,{default:withCtx(()=>[createVNode(M,{variant:"outline",onClick:w[2]||(w[2]=N=>unref(a)(!1))},{default:withCtx(()=>w[6]||(w[6]=[createTextVNode(" 取 消 ",-1)])),_:1,__:[6]}),createVNode(M,{onClick:u},{default:withCtx(()=>w[7]||(w[7]=[createTextVNode(" 确 定 ",-1)])),_:1,__:[7]})]),_:1})]),_:1})]),_:1},8,["open"])}}}),_sfc_main$1f=defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(Cg),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_hoisted_1$m={class:"space-y-4"},_hoisted_2$f={class:"h-60 border"},_sfc_main$1e=defineComponent({__name:"CustomUploadForm",setup(t){const e=useStore(),o=useLocalStorage("formCustomConfig",removeLeft(`
551
+ const {file, util, okCb, errCb} = CUSTOM_ARG
552
+ const param = new FormData()
553
+ param.append('file', file)
554
+ util.axios.post('${window.location.origin}/upload', param, {
555
+ headers: { 'Content-Type': 'multipart/form-data' }
556
+ }).then(res => {
557
+ okCb(res.url)
558
+ }).catch(err => {
559
+ errCb(err)
560
+ })
561
+ `).trim()),a=useTemplateRef("formCustomTextarea"),n=ref(null);onMounted(()=>{n.value=markRaw(CodeMirror.fromTextArea(a.value,{mode:"javascript",theme:e.isDark?"darcula":"xq-light",lineNumbers:!0})),nextTick(()=>{nextTick(()=>{var s;(s=n.value)==null||s.setValue(o.value)})})});function r(){const s=n.value.getValue();localStorage.setItem("formCustomConfig",s),toast.success("保存成功")}return(s,l)=>{const u=_sfc_main$1E;return openBlock(),createElementBlock("div",_hoisted_1$m,[createBaseVNode("div",_hoisted_2$f,[createBaseVNode("textarea",{ref_key:"formCustomTextarea",ref:a,placeholder:"Your custom code here."},null,512)]),createVNode(u,{variant:"link",class:"p-0",as:"a",href:"https://github.com/doocs/md/blob/main/docs/custom-upload.md",target:"_blank"},{default:withCtx(()=>l[0]||(l[0]=[createTextVNode(" 参数详情? ",-1)])),_:1,__:[0]}),createVNode(u,{class:"block",onClick:r},{default:withCtx(()=>l[1]||(l[1]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[1]})])}}}),_sfc_main$1d=defineComponent({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(gg),mergeProps(unref(r),{class:unref(cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",o.class)}),{default:withCtx(()=>[createVNode(unref(bg),{class:normalizeClass(unref(cn)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5"))},{default:withCtx(()=>[renderSlot(s.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),_sfc_main$1c=defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(_g),mergeProps({class:unref(cn)("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e.class)},o.value),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1b=defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(Ky),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_sfc_main$1a=defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(Xy),mergeProps({class:unref(cn)("p-1 w-full",e.class)},o.value),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$l={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$19=defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(qy),mergeProps(unref(a),{class:unref(cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",e.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$l,[createVNode(unref(Yy),null,{default:withCtx(()=>[createVNode(unref(Check),{class:"h-4 w-4"})]),_:1})]),createVNode(unref(Jy),null,{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),_sfc_main$18=defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(tg),mergeProps(unref(a),{class:unref(cn)("flex cursor-default items-center justify-center py-1",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default",{},()=>[createVNode(unref(ChevronDown),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$17=defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(eg),mergeProps(unref(a),{class:unref(cn)("flex cursor-default items-center justify-center py-1",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default",{},()=>[createVNode(unref(ChevronUp),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$16=defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(Hy),mergeProps(unref(a),{class:unref(cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default"),createVNode(unref(ng),{"as-child":""},{default:withCtx(()=>[createVNode(unref(ChevronDown),{class:"h-4 w-4 shrink-0 opacity-50"})]),_:1})]),_:3},16,["class"]))}}),_sfc_main$15=defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(ag),normalizeProps(guardReactiveProps(e)),{default:withCtx(()=>[renderSlot(o.$slots,"default")]),_:3},16))}}),_sfc_main$14=defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(Wy),null,{default:withCtx(()=>[createVNode(unref(jy),mergeProps({...unref(r),...s.$attrs},{class:unref(cn)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",o.class)}),{default:withCtx(()=>[createVNode(unref(_sfc_main$17)),createVNode(unref(Qy),{class:normalizeClass(unref(cn)("p-1",s.position==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"))},{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},8,["class"]),createVNode(unref(_sfc_main$18))]),_:3},16,["class"])]),_:3}))}}),_sfc_main$13=defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(wg),mergeProps(o.value,{class:unref(cn)("inline-flex items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e.class)}),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$k={class:"truncate"},_sfc_main$12=defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(xg),mergeProps(unref(a),{class:unref(cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-xs",e.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$k,[renderSlot(n.$slots,"default")])]),_:3},16,["class"]))}}),_hoisted_1$j={class:"flex flex-col items-start"},_hoisted_2$e={class:"flex flex-col items-start"},_sfc_main$11=defineComponent({__name:"UploadImgDialog",emits:["uploadImage"],setup(t,{emit:e}){const o=e,a=useDisplayStore(),n=toTypedSchema(create$3({repo:create$6().required("GitHub 仓库不能为空"),branch:create$6().optional(),accessToken:create$6().required("GitHub Token 不能为空")})),r=ref(localStorage.getItem("githubConfig")?JSON.parse(localStorage.getItem("githubConfig")):{repo:"",branch:"",accessToken:""});function s(U){localStorage.setItem("githubConfig",JSON.stringify(U)),r.value=U,toast.success("保存成功")}const l=toTypedSchema(create$3({accessKeyId:create$6().required("AccessKey ID 不能为空"),accessKeySecret:create$6().required("AccessKey Secret 不能为空"),bucket:create$6().required("Bucket 不能为空"),region:create$6().required("Region 不能为空"),useSSL:create$7().required(),cdnHost:create$6().optional(),path:create$6().optional()})),u=ref(localStorage.getItem("aliOSSConfig")?JSON.parse(localStorage.getItem("aliOSSConfig")):{accessKeyId:"",accessKeySecret:"",bucket:"",region:"",useSSL:!0,cdnHost:"",path:""});function c(U){localStorage.setItem("aliOSSConfig",JSON.stringify(U)),u.value=U,toast.success("保存成功")}const p=toTypedSchema(create$3({secretId:create$6().required("Secret ID 不能为空"),secretKey:create$6().required("Secret Key 不能为空"),bucket:create$6().required("Bucket 不能为空"),region:create$6().required("Region 不能为空"),cdnHost:create$6().optional(),path:create$6().optional()})),w=ref(localStorage.getItem("txCOSConfig")?JSON.parse(localStorage.getItem("txCOSConfig")):{secretId:"",secretKey:"",bucket:"",region:"",cdnHost:"",path:""});function i(U){localStorage.setItem("txCOSConfig",JSON.stringify(U)),w.value=U,toast.success("保存成功")}const C=toTypedSchema(create$3({accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空"),bucket:create$6().required("Bucket 不能为空"),domain:create$6().required("Bucket 对应域名不能为空"),region:create$6().optional(),path:create$6().optional()})),$=ref(localStorage.getItem("qiniuConfig")?JSON.parse(localStorage.getItem("qiniuConfig")):{accessKey:"",secretKey:"",bucket:"",domain:"",region:"",path:""});function g(U){localStorage.setItem("qiniuConfig",JSON.stringify(U)),$.value=U,toast.success("保存成功")}const f=toTypedSchema(create$3({endpoint:create$6().required("Endpoint 不能为空"),port:create$6().optional(),useSSL:create$7().required(),bucket:create$6().required("Bucket 不能为空"),accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空")})),h=ref(localStorage.getItem("minioConfig")?JSON.parse(localStorage.getItem("minioConfig")):{endpoint:"",port:"",useSSL:!0,bucket:"",accessKey:"",secretKey:""});function x(U){localStorage.setItem("minioConfig",JSON.stringify(U)),h.value=U,toast.success("保存成功")}const _=toTypedSchema(create$3({token:create$6().required("Bot Token 不能为空"),chatId:create$6().required("Chat ID 不能为空")})),b=ref(localStorage.getItem("telegramConfig")?JSON.parse(localStorage.getItem("telegramConfig")):{token:"",chatId:""});function M(U){localStorage.setItem("telegramConfig",JSON.stringify(U)),b.value=U,toast.success("保存成功")}const D=!window.location.protocol.startsWith("http"),k=computed(()=>!D&&!0),N=computed(()=>k.value?"如:http://proxy.example.com":"可不填"),A=computed(()=>toTypedSchema(create$3({proxyOrigin:k.value?create$6().required("代理域名不能为空"):create$6().optional(),appID:create$6().required("AppID 不能为空"),appsecret:create$6().required("AppSecret 不能为空")}))),j=ref(localStorage.getItem("mpConfig")?JSON.parse(localStorage.getItem("mpConfig")):{proxyOrigin:"",appID:"",appsecret:""});function ae(U){localStorage.setItem("mpConfig",JSON.stringify(U)),j.value=U,toast.success("保存成功")}const J=toTypedSchema(create$3({accountId:create$6().required("Account ID 不能为空"),accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空"),bucket:create$6().required("Bucket 不能为空"),domain:create$6().required("Bucket 对应域名不能为空"),path:create$6().optional()})),I=ref(localStorage.getItem("r2Config")?JSON.parse(localStorage.getItem("r2Config")):{accountId:"",accessKey:"",secretKey:"",bucket:"",domain:"",path:""});function v(U){localStorage.setItem("r2Config",JSON.stringify(U)),I.value=U,toast.success("保存成功")}const H=computed(()=>toTypedSchema(create$3({bucket:create$6().required("Bucket 不能为空"),operator:create$6().required("操作员 不能为空"),password:create$6().required("密码 不能为空"),domain:create$6().required("CDN 域名不能为空"),path:create$6().optional()}))),W=ref(localStorage.getItem("upyunConfig")?JSON.parse(localStorage.getItem("upyunConfig")):{bucket:"",operator:"",password:"",domain:"",path:""});function P(U){localStorage.setItem("upyunConfig",JSON.stringify(U)),W.value=U,toast.success("保存成功")}const oe=toTypedSchema(create$3({cloudName:create$6().required("Cloud Name 不能为空"),apiKey:create$6().required("API Key 不能为空"),apiSecret:create$6().optional(),uploadPreset:create$6().when("apiSecret",{is:U=>!U||U.length===0,then:U=>U.required("未填写 apiSecret 时必须提供上传预设名"),otherwise:U=>U.optional()}),folder:create$6().optional(),domain:create$6().optional()})),Q=ref(localStorage.getItem("cloudinaryConfig")?JSON.parse(localStorage.getItem("cloudinaryConfig")):{cloudName:"",apiKey:"",apiSecret:"",uploadPreset:"",folder:"",domain:""});function le(U){localStorage.setItem("cloudinaryConfig",JSON.stringify(U)),Q.value=U,toast.success("保存成功")}const R=[{value:"default",label:"默认"},{value:"github",label:"GitHub"},{value:"aliOSS",label:"阿里云"},{value:"txCOS",label:"腾讯云"},{value:"qiniu",label:"七牛云"},{value:"minio",label:"MinIO"},{value:"mp",label:"公众号图床"},{value:"r2",label:"Cloudflare R2"},{value:"upyun",label:"又拍云"},{value:"telegram",label:"Telegram"},{value:"cloudinary",label:"Cloudinary"},{value:"formCustom",label:"自定义代码"}],K=ref("default"),te=ref("upload");onBeforeMount(()=>{localStorage.getItem("imgHost")&&(K.value=localStorage.getItem("imgHost"))});function F(){localStorage.setItem("imgHost",K.value),toast.success("图床已切换")}function E(U){const G=checkImage(U);if(!G.ok)return toast.error(G.msg),!1;let re=localStorage.getItem("imgHost");re=re||"default",localStorage.setItem("imgHost",re);const de=localStorage.getItem(`${re}Config`);return re==="default"||de?!0:(toast.error(`请先配置 ${re} 图床参数`),!1)}const z=ref(!1),{open:q,reset:ne,onChange:ee}=useFileDialog({accept:"image/*"});ee(U=>{if(U==null)return;const G=U[0];E(G)&&o("uploadImage",G),ne()});function ie(U){z.value=!1,U.stopPropagation();const G=Array.from(U.dataTransfer.files)[0];E(G)&&o("uploadImage",G)}return(U,G)=>{const re=_sfc_main$1o,de=_sfc_main$1p,fe=_sfc_main$12,we=_sfc_main$13,me=_sfc_main$15,be=_sfc_main$16,_e=_sfc_main$19,ve=_sfc_main$14,he=_sfc_main$1b,pe=_sfc_main$1v,ue=_sfc_main$1c,Y=_sfc_main$1t,V=__unplugin_components_12,ce=_sfc_main$1E,xe=_sfc_main$1d,Ce=_sfc_main$1e,Ne=_sfc_main$1f,Ee=_sfc_main$1x,ye=_sfc_main$1y;return openBlock(),createBlock(ye,{open:unref(a).isShowUploadImgDialog,"onUpdate:open":G[6]||(G[6]=m=>unref(a).isShowUploadImgDialog=m)},{default:withCtx(()=>[createVNode(Ee,{class:"max-w-max",onPointerDownOutside:G[5]||(G[5]=m=>m.preventDefault())},{default:withCtx(()=>[createVNode(de,null,{default:withCtx(()=>[createVNode(re,null,{default:withCtx(()=>G[7]||(G[7]=[createTextVNode("本地上传",-1)])),_:1,__:[7]})]),_:1}),createVNode(Ne,{modelValue:unref(te),"onUpdate:modelValue":G[4]||(G[4]=m=>isRef(te)?te.value=m:null),class:"w-max"},{default:withCtx(()=>[createVNode(we,null,{default:withCtx(()=>[createVNode(fe,{value:"upload"},{default:withCtx(()=>G[8]||(G[8]=[createTextVNode(" 选择上传 ",-1)])),_:1,__:[8]}),(openBlock(!0),createElementBlock(Fragment,null,renderList(R.filter(m=>m.value!=="default"),m=>(openBlock(),createBlock(fe,{key:m.value,value:m.value},{default:withCtx(()=>[createTextVNode(toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1}),createVNode(ue,{value:"upload"},{default:withCtx(()=>[createVNode(pe,null,{default:withCtx(()=>[G[9]||(G[9]=createBaseVNode("span",{class:"my-4 block"}," 图床 ",-1)),createVNode(he,{modelValue:unref(K),"onUpdate:modelValue":[G[0]||(G[0]=m=>isRef(K)?K.value=m:null),F]},{default:withCtx(()=>[createVNode(be,null,{default:withCtx(()=>[createVNode(me,{placeholder:"请选择"})]),_:1}),createVNode(ve,null,{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(R,m=>createVNode(_e,{key:m.value,label:m.label,value:m.value},{default:withCtx(()=>[createTextVNode(toDisplayString(m.label),1)]),_:2},1032,["label","value"])),64))]),_:1})]),_:1},8,["modelValue"])]),_:1,__:[9]}),createBaseVNode("div",{class:normalizeClass(["bg-clip-padding mt-4 h-50 flex flex-col cursor-pointer items-center justify-evenly border-2 rounded border-dashed transition-colors hover:border-gray-700 hover:bg-gray-400/50 dark:hover:border-gray-200 dark:hover:bg-gray-500/50",{"border-gray-700 bg-gray-400/50 dark:border-gray-200 dark:bg-gray-500/50":unref(z)}]),onClick:G[1]||(G[1]=m=>unref(q)()),onDrop:withModifiers(ie,["prevent"]),onDragover:G[2]||(G[2]=withModifiers(m=>z.value=!0,["prevent"])),onDragleave:G[3]||(G[3]=withModifiers(m=>z.value=!1,["prevent"]))},[createVNode(unref(CloudUpload),{class:"size-20"}),G[10]||(G[10]=createBaseVNode("p",null,[createTextVNode(" 将图片拖到此处,或 "),createBaseVNode("strong",null,"点击上传")],-1))],34)]),_:1}),createVNode(ue,{value:"github"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(n),"initial-values":unref(r),onSubmit:s},{default:withCtx(()=>[createVNode(unref(Field),{name:"repo"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"GitHub 仓库",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:github.com/yanglbme/resource"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"branch"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"分支",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:release,可不填,默认 master"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessToken"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Token",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,type:"password",placeholder:"如:cc1d0c1426d0fd0902bd2d7184b14da61b8abc46"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token",target:"_blank"},{default:withCtx(()=>G[11]||(G[11]=[createTextVNode(" 如何获取 GitHub Token? ",-1)])),_:1,__:[11]})]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[12]||(G[12]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[12]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"aliOSS"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(l),"initial-values":unref(u),onSubmit:c},{default:withCtx(()=>[createVNode(unref(Field),{name:"accessKeyId"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"AccessKey ID",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:LTAI4GdoocsmdoxUf13ylbaNHk"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKeySecret"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"AccessKey Secret",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,type:"password",placeholder:"如:cc1d0c142doocs0902bd2d7md4b14da6ylbabc46"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:doocs"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket 所在区域",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:oss-cn-shenzhen"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"useSSL",type:"boolean"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"UseSSL",required:"",error:y},{default:withCtx(()=>[createVNode(xe,{checked:m.value,name:m.name,"onUpdate:checked":m.onChange,onBlur:m.onBlur},null,8,["checked","name","onUpdate:checked","onBlur"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"cdnHost"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"自定义 CDN 域名",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:https://imagecdn.alidaodao.com,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"存储路径",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://help.aliyun.com/document_detail/31883.html",target:"_blank"},{default:withCtx(()=>G[13]||(G[13]=[createTextVNode(" 如何使用阿里云 OSS? ",-1)])),_:1,__:[13]})]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[14]||(G[14]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[14]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"txCOS"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(p),"initial-values":unref(w),onSubmit:i},{default:withCtx(()=>[createVNode(unref(Field),{name:"secretId"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"SecretId",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:AKIDnQp1w3DOOCSs8F5MDp9tdoocsmdUPonW3"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"SecretKey",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,type:"password",placeholder:"如:ukLmdtEJ9271f3DOocsMDsCXdS3YlbW0"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:doocs-3212520134"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket 所在区域",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:ap-guangzhou"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"cdnHost"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"自定义 CDN 域名",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:https://imagecdn.alidaodao.com,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"存储路径",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:img,可不填,默认根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://cloud.tencent.com/document/product/436/38484",target:"_blank"},{default:withCtx(()=>G[15]||(G[15]=[createTextVNode(" 如何使用腾讯云 COS? ",-1)])),_:1,__:[15]})]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[16]||(G[16]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[16]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"qiniu"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(C),"initial-values":unref($),onSubmit:g},{default:withCtx(()=>[createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"AccessKey",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:6DD3VaLJ_SQgOdoocsyTV_YWaDmdnL2n8EGx7kG"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"SecretKey",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,type:"password",placeholder:"如:qgZa5qrvDOOcsmdKStD1oCjZ9nB7MDvJUs_34SIm"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:md"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"domain"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket 对应域名",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:https://images.123ylb.cn"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"存储区域",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:z2,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"存储路径",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://developer.qiniu.com/kodo",target:"_blank"},{default:withCtx(()=>G[17]||(G[17]=[createTextVNode(" 如何使用七牛云 Kodo? ",-1)])),_:1,__:[17]})]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[18]||(G[18]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[18]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"minio"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(f),"initial-values":unref(h),onSubmit:x},{default:withCtx(()=>[createVNode(unref(Field),{name:"endpoint"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Endpoint",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:play.min.io"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"port"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Port",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,type:"number",placeholder:"如:9000,可不填,http 默认为 80,https 默认为 443"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"useSSL",type:"boolean"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"UseSSL",required:"",error:y},{default:withCtx(()=>[createVNode(xe,{checked:m.value,name:m.name,"onUpdate:checked":m.onChange,onBlur:m.onBlur},null,8,["checked","name","onUpdate:checked","onBlur"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:doocs"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"AccessKey",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:zhangsan"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"SecretKey",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:asdasdasd"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"http://docs.minio.org.cn/docs/master/minio-client-complete-guide",target:"_blank"},{default:withCtx(()=>G[19]||(G[19]=[createTextVNode(" 如何使用 MinIO? ",-1)])),_:1,__:[19]})]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[20]||(G[20]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[20]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"mp"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(A),"initial-values":unref(j),onSubmit:ae},{default:withCtx(()=>[unref(k)?(openBlock(),createBlock(unref(Field),{key:0,name:"proxyOrigin"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"代理域名",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:unref(N)}),null,16,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["error"])]),_:1})):createCommentVNode("",!0),createVNode(unref(Field),{name:"appID"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"appID",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:wx6e1234567890efa3"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"appsecret"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"appsecret",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:d9f1abcdef01234567890abcdef82397"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$j,[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Getting_Started_Guide.html",target:"_blank"},{default:withCtx(()=>G[21]||(G[21]=[createTextVNode(" 如何开启公众号开发者模式并获取应用账号密钥? ",-1)])),_:1,__:[21]}),createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://md-pages.doocs.org/tutorial/",target:"_blank"},{default:withCtx(()=>G[22]||(G[22]=[createTextVNode(" 如何在浏览器插件中使用公众号图床? ",-1)])),_:1,__:[22]})])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[23]||(G[23]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[23]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"r2"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(J),"initial-values":unref(I),onSubmit:v},{default:withCtx(()=>[createVNode(unref(Field),{name:"accountId"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"AccountId",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如: 0030f123e55a57546f4c281c564e560",class:"min-w-[350px]"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"AccessKey",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如: 358090b3a12824a6b0787gae7ad0fc72"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"SecretKey",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,type:"password",placeholder:"如: c1c4dbcb0b6b785ac6633422a06dff3dac055fe74fe40xj1b5c5fcf1bf128010"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:md"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"domain"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"域名",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:https://oss.example.com"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"存储路径",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createBaseVNode("div",_hoisted_2$e,[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://developers.cloudflare.com/r2/api/s3/api/",target:"_blank"},{default:withCtx(()=>G[24]||(G[24]=[createTextVNode(" 如何使用 S3 API 操作 Cloudflare R2? ",-1)])),_:1,__:[24]}),createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://developers.cloudflare.com/r2/buckets/cors/",target:"_blank"},{default:withCtx(()=>G[25]||(G[25]=[createTextVNode(" 如何设置跨域(CORS)? ",-1)])),_:1,__:[25]})])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[26]||(G[26]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[26]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"upyun"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(H),"initial-values":unref(W),onSubmit:P},{default:withCtx(()=>[createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bucket",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如: md",class:"min-w-[350px]"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"operator"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"操作员",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如: operator"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"password"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"操作员密码",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,type:"password",placeholder:"如: c1c4dbcb0b6b785ac6633422a06dff3dac055fe74fe40xj1b5c5fcf1bf128010"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"domain"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"域名",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:http://xxx.test.upcdn.net"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"存储路径",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://help.upyun.com/",target:"_blank"},{default:withCtx(()=>G[27]||(G[27]=[createTextVNode(" 如何使用 又拍云? ",-1)])),_:1,__:[27]})]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[28]||(G[28]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[28]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"telegram"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(_),"initial-values":unref(b),onSubmit:M},{default:withCtx(()=>[createVNode(unref(Field),{name:"token"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Bot Token",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:123456789:ABCdefGHIjkl-MNOPqrSTUvwxYZ"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"chatId"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Chat ID",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:-1001234567890"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://github.com/doocs/md/blob/main/docs/telegram-usage.md",target:"_blank"},{default:withCtx(()=>G[29]||(G[29]=[createTextVNode(" 如何使用 Telegram? ",-1)])),_:1,__:[29]})]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[30]||(G[30]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[30]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"cloudinary"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(oe),"initial-values":unref(Q),onSubmit:le},{default:withCtx(()=>[createVNode(unref(Field),{name:"cloudName"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Cloud Name",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:demo"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"apiKey"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"API Key",required:"",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:1234567890"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"apiSecret"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"API Secret",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,type:"password",placeholder:"用于签名上传,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"uploadPreset"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Upload Preset",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"unsigned 时必填,signed 时可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"folder"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"Folder",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:blog/image,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"domain"},{default:withCtx(({field:m,errorMessage:y})=>[createVNode(V,{label:"自定义域名 / CDN",error:y},{default:withCtx(()=>[createVNode(Y,mergeProps(m,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,placeholder:"如:https://cdn.example.com,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{variant:"link",class:"p-0",as:"a",href:"https://cloudinary.com/documentation/upload_images",target:"_blank"},{default:withCtx(()=>G[31]||(G[31]=[createTextVNode(" Cloudinary 使用文档 ",-1)])),_:1,__:[31]})]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(ce,{type:"submit"},{default:withCtx(()=>G[32]||(G[32]=[createTextVNode(" 保存配置 ",-1)])),_:1,__:[32]})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(ue,{value:"formCustom"},{default:withCtx(()=>[createVNode(Ce)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["open"])}}}),_hoisted_1$i={class:"space-y-2"},_hoisted_2$d={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_3$d={class:"space-y-2"},_hoisted_4$b={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_5$9={class:"space-y-2"},_hoisted_6$8={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_7$4={class:"space-y-2"},_hoisted_8$3={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_9$2={class:"space-y-2"},_hoisted_10$1={class:"space-y-2"},_hoisted_11$1={class:"space-y-2"},_hoisted_12$1={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_13$1={class:"space-y-2"},_hoisted_14$1={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_15$1={class:"space-y-2"},_hoisted_16$1={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_17$1={class:"space-y-2"},_hoisted_18$1={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_19$1={class:"space-y-2"},_hoisted_20$1={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_21$1={class:"space-y-2"},_hoisted_22$1={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_23$1={class:"space-y-2"},_hoisted_24$1={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_25$1={class:"space-y-2"},_hoisted_26$1={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_27$1={class:"space-y-2"},_hoisted_28$1={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_29={class:"space-y-2"},_hoisted_30={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_31={class:"space-y-2"},_sfc_main$10=defineComponent({__name:"RightSlider",setup(t){const e=useStore(),o=useDisplayStore(),{isDark:a,primaryColor:n}=storeToRefs(e);function r(){o.toggleShowCssEditor(),setTimeout(()=>{e.cssEditor.refresh()},50)}const s=ref(!1),l=ref("");watch(s,()=>{s.value&&(l.value="")});const u=useTemplateRef("pickColorsContainer"),c=ref("rgb"),p=ref(["rgb","hex","hsl","hsv"]);return(w,i)=>{const C=_sfc_main$1E,$=_sfc_main$15,g=_sfc_main$16,f=_sfc_main$19,h=_sfc_main$14,x=_sfc_main$1b;return openBlock(),createElementBlock("div",{class:normalizeClass(["relative overflow-hidden border-l-2 border-gray/20 bg-white transition-width duration-300 dark:bg-[#191919]",[unref(e).isOpenRightSlider?"w-100":"w-0 border-l-0"]])},[createBaseVNode("div",{class:normalizeClass(["space-y-4 h-full overflow-auto p-4 transition-transform",{"translate-x-0":unref(e).isOpenRightSlider,"translate-x-full":!unref(e).isOpenRightSlider}])},[createBaseVNode("div",_hoisted_1$i,[i[18]||(i[18]=createBaseVNode("h2",null,"主题",-1)),createBaseVNode("div",_hoisted_2$d,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(themeOptions),({label:_,value:b})=>(openBlock(),createBlock(C,{key:b,class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).theme===b}]),variant:"outline",onClick:M=>unref(e).themeChanged(b)},{default:withCtx(()=>[createTextVNode(toDisplayString(_),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_3$d,[i[19]||(i[19]=createBaseVNode("h2",null,"字体",-1)),createBaseVNode("div",_hoisted_4$b,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(fontFamilyOptions),({label:_,value:b})=>(openBlock(),createBlock(C,{key:b,variant:"outline",class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).fontFamily===b}]),onClick:M=>unref(e).fontChanged(b)},{default:withCtx(()=>[createTextVNode(toDisplayString(_),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_5$9,[i[20]||(i[20]=createBaseVNode("h2",null,"字号",-1)),createBaseVNode("div",_hoisted_6$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(fontSizeOptions),({value:_,desc:b})=>(openBlock(),createBlock(C,{key:_,variant:"outline",class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).fontSize===_}]),onClick:M=>unref(e).sizeChanged(_)},{default:withCtx(()=>[createTextVNode(toDisplayString(b),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_7$4,[i[21]||(i[21]=createBaseVNode("h2",null,"主题色",-1)),createBaseVNode("div",_hoisted_8$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(colorOptions),({label:_,value:b})=>(openBlock(),createBlock(C,{key:b,class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).primaryColor===b}]),variant:"outline",onClick:M=>unref(e).colorChanged(b)},{default:withCtx(()=>[createBaseVNode("span",{class:"mr-2 inline-block h-4 w-4 rounded-full",style:normalizeStyle({background:b})},null,4),createTextVNode(" "+toDisplayString(_),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_9$2,[i[22]||(i[22]=createBaseVNode("h2",null,"自定义主题色",-1)),createBaseVNode("div",{ref_key:"pickColorsContainer",ref:u},[unref(u)?(openBlock(),createBlock(unref(Re),{key:0,value:unref(n),"onUpdate:value":i[0]||(i[0]=_=>isRef(n)?n.value=_:null),"show-alpha":"",format:unref(c),"format-options":unref(p),theme:unref(e).isDark?"dark":"light","popup-container":unref(u),onChange:unref(e).colorChanged},null,8,["value","format","format-options","theme","popup-container","onChange"])):createCommentVNode("",!0)],512)]),createBaseVNode("div",_hoisted_10$1,[i[23]||(i[23]=createBaseVNode("h2",null,"代码块主题",-1)),createBaseVNode("div",null,[createVNode(x,{modelValue:unref(e).codeBlockTheme,"onUpdate:modelValue":[i[1]||(i[1]=_=>unref(e).codeBlockTheme=_),unref(e).codeBlockThemeChanged]},{default:withCtx(()=>[createVNode(g,null,{default:withCtx(()=>[createVNode($,{placeholder:"Select a code block theme"})]),_:1}),createVNode(h,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(codeBlockThemeOptions),({label:_,value:b})=>(openBlock(),createBlock(f,{key:_,value:b},{default:withCtx(()=>[createTextVNode(toDisplayString(_),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])])]),createBaseVNode("div",_hoisted_11$1,[i[24]||(i[24]=createBaseVNode("h2",null,"图注格式",-1)),createBaseVNode("div",_hoisted_12$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(legendOptions),({label:_,value:b})=>(openBlock(),createBlock(C,{key:b,class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).legend===b}]),variant:"outline",onClick:M=>unref(e).legendChanged(b)},{default:withCtx(()=>[createTextVNode(toDisplayString(_),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_13$1,[i[27]||(i[27]=createBaseVNode("h2",null,"Mac 代码块",-1)),createBaseVNode("div",_hoisted_14$1,[createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).isMacCodeBlock}]),variant:"outline",onClick:i[2]||(i[2]=_=>!unref(e).isMacCodeBlock&&unref(e).macCodeBlockChanged())},{default:withCtx(()=>i[25]||(i[25]=[createTextVNode(" 开启 ",-1)])),_:1,__:[25]},8,["class"]),createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":!unref(e).isMacCodeBlock}]),variant:"outline",onClick:i[3]||(i[3]=_=>unref(e).isMacCodeBlock&&unref(e).macCodeBlockChanged())},{default:withCtx(()=>i[26]||(i[26]=[createTextVNode(" 关闭 ",-1)])),_:1,__:[26]},8,["class"])])]),createBaseVNode("div",_hoisted_15$1,[i[30]||(i[30]=createBaseVNode("h2",null,"AI 工具箱",-1)),createBaseVNode("div",_hoisted_16$1,[createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).showAIToolbox}]),variant:"outline",onClick:i[4]||(i[4]=_=>!unref(e).showAIToolbox&&unref(e).aiToolboxChanged())},{default:withCtx(()=>i[28]||(i[28]=[createTextVNode(" 开启 ",-1)])),_:1,__:[28]},8,["class"]),createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":!unref(e).showAIToolbox}]),variant:"outline",onClick:i[5]||(i[5]=_=>unref(e).showAIToolbox&&unref(e).aiToolboxChanged())},{default:withCtx(()=>i[29]||(i[29]=[createTextVNode(" 关闭 ",-1)])),_:1,__:[29]},8,["class"])])]),createBaseVNode("div",_hoisted_17$1,[i[33]||(i[33]=createBaseVNode("h2",null,"微信外链转底部引用",-1)),createBaseVNode("div",_hoisted_18$1,[createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).isCiteStatus}]),variant:"outline",onClick:i[6]||(i[6]=_=>!unref(e).isCiteStatus&&unref(e).citeStatusChanged())},{default:withCtx(()=>i[31]||(i[31]=[createTextVNode(" 开启 ",-1)])),_:1,__:[31]},8,["class"]),createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":!unref(e).isCiteStatus}]),variant:"outline",onClick:i[7]||(i[7]=_=>unref(e).isCiteStatus&&unref(e).citeStatusChanged())},{default:withCtx(()=>i[32]||(i[32]=[createTextVNode(" 关闭 ",-1)])),_:1,__:[32]},8,["class"])])]),createBaseVNode("div",_hoisted_19$1,[i[36]||(i[36]=createBaseVNode("h2",null,"段落首行缩进",-1)),createBaseVNode("div",_hoisted_20$1,[createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).isUseIndent}]),variant:"outline",onClick:i[8]||(i[8]=_=>!unref(e).isUseIndent&&unref(e).useIndentChanged())},{default:withCtx(()=>i[34]||(i[34]=[createTextVNode(" 开启 ",-1)])),_:1,__:[34]},8,["class"]),createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":!unref(e).isUseIndent}]),variant:"outline",onClick:i[9]||(i[9]=_=>unref(e).isUseIndent&&unref(e).useIndentChanged())},{default:withCtx(()=>i[35]||(i[35]=[createTextVNode(" 关闭 ",-1)])),_:1,__:[35]},8,["class"])])]),createBaseVNode("div",_hoisted_21$1,[i[39]||(i[39]=createBaseVNode("h2",null,"段落两端对齐",-1)),createBaseVNode("div",_hoisted_22$1,[createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).isUseJustify}]),variant:"outline",onClick:i[10]||(i[10]=_=>!unref(e).isUseJustify&&unref(e).useJustifyChanged())},{default:withCtx(()=>i[37]||(i[37]=[createTextVNode(" 开启 ",-1)])),_:1,__:[37]},8,["class"]),createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":!unref(e).isUseJustify}]),variant:"outline",onClick:i[11]||(i[11]=_=>unref(e).isUseJustify&&unref(e).useJustifyChanged())},{default:withCtx(()=>i[38]||(i[38]=[createTextVNode(" 关闭 ",-1)])),_:1,__:[38]},8,["class"])])]),createBaseVNode("div",_hoisted_23$1,[i[42]||(i[42]=createBaseVNode("h2",null,"自定义 CSS 面板",-1)),createBaseVNode("div",_hoisted_24$1,[createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(o).isShowCssEditor}]),variant:"outline",onClick:i[12]||(i[12]=_=>!unref(o).isShowCssEditor&&r())},{default:withCtx(()=>i[40]||(i[40]=[createTextVNode(" 开启 ",-1)])),_:1,__:[40]},8,["class"]),createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":!unref(o).isShowCssEditor}]),variant:"outline",onClick:i[13]||(i[13]=_=>unref(o).isShowCssEditor&&r())},{default:withCtx(()=>i[41]||(i[41]=[createTextVNode(" 关闭 ",-1)])),_:1,__:[41]},8,["class"])])]),createBaseVNode("div",_hoisted_25$1,[i[45]||(i[45]=createBaseVNode("h2",null,"编辑区位置",-1)),createBaseVNode("div",_hoisted_26$1,[createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).isEditOnLeft}]),variant:"outline",onClick:i[14]||(i[14]=_=>!unref(e).isEditOnLeft&&unref(e).toggleEditOnLeft())},{default:withCtx(()=>i[43]||(i[43]=[createTextVNode(" 左侧 ",-1)])),_:1,__:[43]},8,["class"]),createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":!unref(e).isEditOnLeft}]),variant:"outline",onClick:i[15]||(i[15]=_=>unref(e).isEditOnLeft&&unref(e).toggleEditOnLeft())},{default:withCtx(()=>i[44]||(i[44]=[createTextVNode(" 右侧 ",-1)])),_:1,__:[44]},8,["class"])])]),createBaseVNode("div",_hoisted_27$1,[i[46]||(i[46]=createBaseVNode("h2",null,"预览模式",-1)),createBaseVNode("div",_hoisted_28$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(widthOptions),({label:_,value:b})=>(openBlock(),createBlock(C,{key:b,class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(e).previewWidth===b}]),variant:"outline",onClick:M=>unref(e).previewWidthChanged(b)},{default:withCtx(()=>[createTextVNode(toDisplayString(_),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_29,[i[47]||(i[47]=createBaseVNode("h2",null,"模式",-1)),createBaseVNode("div",_hoisted_30,[createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":!unref(a)}]),variant:"outline",onClick:i[16]||(i[16]=_=>unref(e).toggleDark(!1))},{default:withCtx(()=>[createVNode(unref(Sun),{class:"h-4 w-4"})]),_:1},8,["class"]),createVNode(C,{class:normalizeClass(["w-full",{"border-black dark:border-white border-2":unref(a)}]),variant:"outline",onClick:i[17]||(i[17]=_=>unref(e).toggleDark(!0))},{default:withCtx(()=>[createVNode(unref(Moon),{class:"h-4 w-4"})]),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_31,[i[49]||(i[49]=createBaseVNode("h2",null,"样式配置",-1)),createVNode(C,{variant:"destructive",onClick:unref(e).resetStyleConfirm},{default:withCtx(()=>i[48]||(i[48]=[createTextVNode(" 重置 ",-1)])),_:1,__:[48]},8,["onClick"])])],2)],2)}}}),_sfc_main$$=defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(Iu),mergeProps(unref(a),{class:unref(cn)("text-sm text-muted-foreground",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$h={class:"cssEditor-wrapper h-full flex flex-col border-l-2 border-gray/50"},_sfc_main$_=defineComponent({__name:"CssEditor",setup(t){const e=useStore(),o=useDisplayStore(),a=ref(!1),n=ref(""),r=ref(["",e.cssContentConfig.active]);function s(h){n.value=h,a.value=!0}function l(){if(!n.value.trim()){toast.error("新建失败,方案名不可为空");return}if(!e.validatorTabName(n.value)){toast.error("不能与现有方案重名");return}e.renameTab(n.value),a.value=!1,toast.success("修改成功")}const u=ref(!1),c=ref("");function p(){if(!c.value.trim()){toast.error("新建失败,方案名不可为空");return}if(!e.validatorTabName(c.value)){toast.error("不能与现有方案重名");return}e.addCssContentTab(c.value),u.value=!1,e.cssContentConfig.active=c.value,r.value=[r.value[1],c.value],toast.success("新建成功")}const w=ref(!1),i=ref("");function C(h){i.value=h,w.value=!0}function $(){const h=e.cssContentConfig.tabs;if(h.length===1){toast.warning("至少保留一个方案");return}let x=e.cssContentConfig.active;x===i.value&&h.forEach((_,b)=>{if(_.name===i.value){const M=h[b+1]||h[b-1];M&&(x=M.name)}}),e.tabChanged(x),e.cssContentConfig.tabs=h.filter(_=>_.name!==i.value),toast.success("删除成功")}function g(){c.value=`方案${e.cssContentConfig.tabs.length+1}`,u.value=!0}function f(h){if(h==="add"){e.cssContentConfig.active=r.value[1],g();return}r.value=[r.value[1],h],e.tabChanged(h)}return(h,x)=>{const _=_sfc_main$12,b=_sfc_main$13,M=_sfc_main$1f,L=_sfc_main$1o,D=_sfc_main$$,k=_sfc_main$1p,N=_sfc_main$1t,A=_sfc_main$1E,j=_sfc_main$1m,ae=_sfc_main$1x,J=_sfc_main$1y,I=_sfc_main$1z,v=_sfc_main$1A,H=_sfc_main$1B,W=_sfc_main$1C,P=_sfc_main$1D,oe=_sfc_main$1F,Q=_sfc_main$1G,le=_sfc_main$1H;return openBlock(),createBlock(Transition,{"enter-active-class":"bounceInRight"},{default:withCtx(()=>[withDirectives(createBaseVNode("div",_hoisted_1$h,[createVNode(M,{modelValue:unref(e).cssContentConfig.active,"onUpdate:modelValue":[x[0]||(x[0]=R=>unref(e).cssContentConfig.active=R),f]},{default:withCtx(()=>[createVNode(b,{class:"w-full overflow-x-auto"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(e).cssContentConfig.tabs,R=>(openBlock(),createBlock(_,{key:R.name,value:R.name,class:"flex-1"},{default:withCtx(()=>[createTextVNode(toDisplayString(R.title)+" ",1),withDirectives(createVNode(unref(PenLine),{class:"inline size-4 rounded-full p-0.5 transition-color hover:bg-gray-200 dark:hover:bg-gray-600",onClick:K=>s(R.name)},null,8,["onClick"]),[[vShow,unref(e).cssContentConfig.active===R.name]]),withDirectives(createVNode(unref(X),{class:"inline size-4 rounded-full p-0.5 transition-color hover:bg-gray-200 dark:hover:bg-gray-600",onClick:withModifiers(K=>C(R.name),["self"])},null,8,["onClick"]),[[vShow,unref(e).cssContentConfig.active===R.name]])]),_:2},1032,["value"]))),128)),createVNode(_,{value:"add"},{default:withCtx(()=>[createVNode(unref(Plus),{class:"h-5 w-5"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),x[21]||(x[21]=createBaseVNode("textarea",{id:"cssEditor",type:"textarea",placeholder:"Your custom css here."},null,-1)),createVNode(J,{open:unref(u),"onUpdate:open":x[4]||(x[4]=R=>isRef(u)?u.value=R:null)},{default:withCtx(()=>[createVNode(ae,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(k,null,{default:withCtx(()=>[createVNode(L,null,{default:withCtx(()=>x[9]||(x[9]=[createTextVNode("新建自定义 CSS",-1)])),_:1,__:[9]}),createVNode(D,null,{default:withCtx(()=>x[10]||(x[10]=[createTextVNode(" 请输入方案名称 ",-1)])),_:1,__:[10]})]),_:1}),createVNode(N,{modelValue:unref(c),"onUpdate:modelValue":x[1]||(x[1]=R=>isRef(c)?c.value=R:null)},null,8,["modelValue"]),createVNode(j,null,{default:withCtx(()=>[createVNode(A,{variant:"outline",onClick:x[2]||(x[2]=R=>u.value=!1)},{default:withCtx(()=>x[11]||(x[11]=[createTextVNode(" 取消 ",-1)])),_:1,__:[11]}),createVNode(A,{onClick:x[3]||(x[3]=R=>p())},{default:withCtx(()=>x[12]||(x[12]=[createTextVNode(" 保存 ",-1)])),_:1,__:[12]})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(J,{open:unref(a),"onUpdate:open":x[7]||(x[7]=R=>isRef(a)?a.value=R:null)},{default:withCtx(()=>[createVNode(ae,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(k,null,{default:withCtx(()=>[createVNode(L,null,{default:withCtx(()=>x[13]||(x[13]=[createTextVNode("编辑方案名称",-1)])),_:1,__:[13]}),createVNode(D,null,{default:withCtx(()=>x[14]||(x[14]=[createTextVNode(" 请输入新的方案名称 ",-1)])),_:1,__:[14]})]),_:1}),createVNode(N,{modelValue:unref(n),"onUpdate:modelValue":x[5]||(x[5]=R=>isRef(n)?n.value=R:null)},null,8,["modelValue"]),createVNode(j,null,{default:withCtx(()=>[createVNode(A,{variant:"outline",onClick:x[6]||(x[6]=R=>a.value=!1)},{default:withCtx(()=>x[15]||(x[15]=[createTextVNode(" 取消 ",-1)])),_:1,__:[15]}),createVNode(A,{onClick:l},{default:withCtx(()=>x[16]||(x[16]=[createTextVNode(" 保存 ",-1)])),_:1,__:[16]})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(le,{open:unref(w),"onUpdate:open":x[8]||(x[8]=R=>isRef(w)?w.value=R:null)},{default:withCtx(()=>[createVNode(Q,null,{default:withCtx(()=>[createVNode(H,null,{default:withCtx(()=>[createVNode(I,null,{default:withCtx(()=>x[17]||(x[17]=[createTextVNode("提示",-1)])),_:1,__:[17]}),createVNode(v,null,{default:withCtx(()=>x[18]||(x[18]=[createTextVNode(" 此操作将删除该自定义方案,是否继续? ",-1)])),_:1,__:[18]})]),_:1}),createVNode(oe,null,{default:withCtx(()=>[createVNode(W,null,{default:withCtx(()=>x[19]||(x[19]=[createTextVNode("取消",-1)])),_:1,__:[19]}),createVNode(P,{onClick:$},{default:withCtx(()=>x[20]||(x[20]=[createTextVNode(" 确认 ",-1)])),_:1,__:[20]})]),_:1})]),_:1})]),_:1},8,["open"])],512),[[vShow,unref(o).isShowCssEditor]])]),_:1})}}}),__unplugin_components_6=_export_sfc(_sfc_main$_,[["__scopeId","data-v-27378d09"]]),_hoisted_1$g=["href"],_sfc_main$Z=defineComponent({__name:"FloatingToc",setup(t){const e=useStore(),o=ref(!1);return(a,n)=>(openBlock(),createElementBlock("div",{class:"bg-background absolute left-0 top-0 border rounded-br-lg rounded-tr-lg rounded-bl-lg p-2 text-sm shadow-sm",onMouseenter:n[0]||(n[0]=()=>o.value=!0),onMouseleave:n[1]||(n[1]=()=>o.value=!1)},[createVNode(unref(List),{class:"size-6"}),createBaseVNode("ul",{class:normalizeClass(["overflow-auto transition-all",{"max-h-0 w-0":!unref(o),"max-h-100 w-60 mt-2":unref(o)}])},[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(e).titleList,(r,s)=>(openBlock(),createElementBlock("li",{key:s,class:"line-clamp-1 py-1 leading-6 hover:bg-gray-300 dark:hover:bg-gray-600",style:normalizeStyle({paddingLeft:`${r.level-.5}em`})},[createBaseVNode("a",{href:r.url},toDisplayString(r.title),9,_hoisted_1$g)],4))),128))],2)],32))}}),_sfc_main$Y=defineComponent({__name:"BackTop",props:{left:{},top:{},right:{},bottom:{},visibilityHeight:{},target:{},onClick:{type:Function}},setup(t){const e=t,o=ref(e.visibilityHeight??400),a=ref(!1),n=ref(null);function r(l){var u,c;(u=n.value)==null||u.scrollTo({top:0,left:0,behavior:"smooth"}),(c=e.onClick)==null||c.call(e,l)}const s=throttle(l=>{l instanceof HTMLElement?a.value=l.scrollTop>o.value:a.value=window.scrollY>o.value},200,{edges:["leading","trailing"]});return onMounted(()=>{e.target?n.value=document.getElementById(e.target):n.value=window,n.value.addEventListener("scroll",()=>{s(n.value)})}),onUnmounted(()=>{n.value.removeEventListener("scroll",()=>{s(n.value)})}),(l,u)=>{const c=_sfc_main$1E;return unref(a)?(openBlock(),createBlock(c,{key:0,variant:"outline",size:"icon",class:"absolute z-50 rounded-full",style:normalizeStyle({left:`${l.left}px`,top:`${l.top}px`,right:`${l.right}px`,bottom:`${l.bottom}px`}),onClick:r},{default:withCtx(()=>[createVNode(unref(ArrowUpFromLine))]),_:1},8,["style"])):createCommentVNode("",!0)}}}),_sfc_main$X=defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(rm),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_sfc_main$W=defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(um),null,{default:withCtx(()=>[createVNode(unref(dm),mergeProps(unref(r),{class:unref(cn)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$V=defineComponent({__name:"ContextMenuShortcut",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn)("ml-auto text-xs tracking-widest text-muted-foreground",e.class))},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$U=defineComponent({__name:"ContextMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(vm),mergeProps(o.value,{class:unref(cn)("-mx-1 my-1 h-px bg-border",e.class)}),null,16,["class"]))}}),_sfc_main$T=defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(fm),mergeProps(unref(r),{class:unref(cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",s.inset&&"pl-8",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$S=defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const o=Ot(t);return(a,n)=>(openBlock(),createBlock(unref(im),normalizeProps(guardReactiveProps(unref(o))),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16))}});function useImportMarkdownContent(){const t=useStore(),{open:e,reset:o,onChange:a}=useFileDialog({accept:".md"});return a(n=>{if(n==null||n.length===0)return;const r=n[0],s=new FileReader;s.readAsText(r),s.onload=l=>{t.editor.setValue(""),requestAnimationFrame(()=>{t.editor.setValue(l.target.result)}),toast.success("文档导入成功")}}),()=>{o(),e()}}const _sfc_main$R=defineComponent({__name:"EditorContextMenu",setup(t){const{exportEditorContent2HTML:e,exportEditorContent2MD:o,formatContent:a,importDefaultContent:n,copyToClipboard:r,pasteFromClipboard:s,resetStyleConfirm:l,downloadAsCardImage:u,clearContent:c}=useStore(),{toggleShowInsertFormDialog:p,toggleShowInsertMpCardDialog:w,toggleShowUploadImgDialog:i}=useDisplayStore(),C=useImportMarkdownContent();return($,g)=>{const f=_sfc_main$S,h=_sfc_main$T,x=_sfc_main$U,_=_sfc_main$V,b=_sfc_main$W,M=_sfc_main$X;return openBlock(),createBlock(M,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[renderSlot($.$slots,"default")]),_:3}),createVNode(b,{class:"w-64"},{default:withCtx(()=>[createVNode(h,{inset:"",onClick:g[0]||(g[0]=L=>unref(i)())},{default:withCtx(()=>g[12]||(g[12]=[createTextVNode(" 上传图片 ",-1)])),_:1,__:[12]}),createVNode(h,{inset:"",onClick:g[1]||(g[1]=L=>unref(p)())},{default:withCtx(()=>g[13]||(g[13]=[createTextVNode(" 插入表格 ",-1)])),_:1,__:[13]}),createVNode(h,{inset:"",onClick:g[2]||(g[2]=L=>unref(w)())},{default:withCtx(()=>g[14]||(g[14]=[createTextVNode(" 插入公众号名片 ",-1)])),_:1,__:[14]}),createVNode(h,{inset:"",onClick:g[3]||(g[3]=L=>unref(l)())},{default:withCtx(()=>g[15]||(g[15]=[createTextVNode(" 重置样式 ",-1)])),_:1,__:[15]}),createVNode(h,{inset:"",onClick:g[4]||(g[4]=L=>unref(n)())},{default:withCtx(()=>g[16]||(g[16]=[createTextVNode(" 重置文档 ",-1)])),_:1,__:[16]}),createVNode(h,{inset:"",onClick:g[5]||(g[5]=L=>unref(c)())},{default:withCtx(()=>g[17]||(g[17]=[createTextVNode(" 清空内容 ",-1)])),_:1,__:[17]}),createVNode(x),createVNode(h,{inset:"",onClick:g[6]||(g[6]=L=>unref(C)())},{default:withCtx(()=>g[18]||(g[18]=[createTextVNode(" 导入 .md 文档 ",-1)])),_:1,__:[18]}),createVNode(h,{inset:"",onClick:g[7]||(g[7]=L=>unref(o)())},{default:withCtx(()=>g[19]||(g[19]=[createTextVNode(" 导出 .md 文档 ",-1)])),_:1,__:[19]}),createVNode(h,{inset:"",onClick:g[8]||(g[8]=L=>unref(e)())},{default:withCtx(()=>g[20]||(g[20]=[createTextVNode(" 导出 .html ",-1)])),_:1,__:[20]}),createVNode(h,{inset:"",onClick:g[9]||(g[9]=L=>unref(u)())},{default:withCtx(()=>g[21]||(g[21]=[createTextVNode(" 导出 .png ",-1)])),_:1,__:[21]}),createVNode(x),createVNode(h,{inset:"",onClick:g[10]||(g[10]=L=>unref(r)())},{default:withCtx(()=>[g[22]||(g[22]=createTextVNode(" 复制 ",-1)),createVNode(_,null,{default:withCtx(()=>[createTextVNode(toDisplayString(unref(ctrlSign))+" + C ",1)]),_:1})]),_:1,__:[22]}),createVNode(h,{inset:"",onClick:unref(s)},{default:withCtx(()=>[g[23]||(g[23]=createTextVNode(" 粘贴 ",-1)),createVNode(_,null,{default:withCtx(()=>[createTextVNode(toDisplayString(unref(ctrlSign))+" + V ",1)]),_:1})]),_:1,__:[23]},8,["onClick"]),createVNode(h,{inset:"",onClick:g[11]||(g[11]=L=>unref(a)())},{default:withCtx(()=>[g[24]||(g[24]=createTextVNode(" 格式化 ",-1)),createVNode(_,null,{default:withCtx(()=>[createTextVNode(toDisplayString(unref(altSign))+" + "+toDisplayString(unref(shiftSign))+" + F ",1)]),_:1})]),_:1,__:[24]})]),_:1})]),_:3})}}}),_sfc_main$Q=defineComponent({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(Hg),normalizeProps(guardReactiveProps(e)),{default:withCtx(()=>[renderSlot(o.$slots,"default")]),_:3},16))}}),_sfc_main$P=defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(Wg),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_sfc_main$O=defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(qg),null,{default:withCtx(()=>[createVNode(unref(Ug),mergeProps({...unref(r),...s.$attrs},{class:unref(cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$N=defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(jg),normalizeProps(guardReactiveProps(e)),{default:withCtx(()=>[renderSlot(o.$slots,"default")]),_:3},16))}}),useAIConfigStore=defineStore("AIConfig",()=>{const t=useStorage("openai_type",DEFAULT_SERVICE_TYPE),e=useStorage("openai_temperature",DEFAULT_SERVICE_TEMPERATURE),o=useStorage("openai_max_token",DEFAULT_SERVICE_MAX_TOKEN),a=ref(""),n=ref(""),r=customRef((l,u)=>({get(){return l(),localStorage.getItem(`openai_key_${t.value}`)||DEFAULT_SERVICE_KEY},set(c){t.value!==DEFAULT_SERVICE_TYPE&&localStorage.setItem(`openai_key_${t.value}`,c),u()}}));watch(t,l=>{const u=serviceOptions.find(p=>p.value===l)??serviceOptions[0];a.value=u.endpoint;const c=localStorage.getItem(`openai_model_${l}`)||"";n.value=u.models.includes(c)?c:u.models[0],localStorage.setItem(`openai_model_${l}`,n.value)},{immediate:!0}),watch(n,l=>{localStorage.setItem(`openai_model_${t.value}`,l)});function s(){t.value=DEFAULT_SERVICE_TYPE,e.value=DEFAULT_SERVICE_TEMPERATURE,o.value=DEFAULT_SERVICE_MAX_TOKEN,serviceOptions.forEach(({value:l})=>{localStorage.removeItem(`openai_key_${l}`),localStorage.removeItem(`openai_model_${l}`)})}return{type:t,endpoint:a,model:n,temperature:e,maxToken:o,apiKey:r,reset:s}}),_hoisted_1$f={class:"custom-scroll space-y-4 max-h-[calc(100dvh-10rem)] overflow-y-auto pr-1 text-xs sm:max-h-none sm:text-sm"},_hoisted_2$c={key:0},_hoisted_3$c={key:1},_hoisted_4$a={class:"mt-2 flex flex-col gap-2 sm:flex-row"},_hoisted_5$8={key:2,class:"mt-1 text-xs text-gray-500"},_sfc_main$M=defineComponent({__name:"AIConfig",emits:["saved"],setup(t,{emit:e}){const o=e,a=useAIConfigStore(),{type:n,endpoint:r,model:s,apiKey:l,temperature:u,maxToken:c}=storeToRefs(a),p=reactive({type:"",endpoint:"",apiKey:"",model:"",temperature:1,maxToken:1024}),w=ref(!1),i=ref(""),C=computed(()=>serviceOptions.find(x=>x.value===p.type)||serviceOptions[0]);function $(){p.type=n.value,p.endpoint=r.value,p.apiKey=l.value,p.model=s.value,p.temperature=u.value,p.maxToken=c.value}$(),watch(()=>p.type,()=>{p.endpoint=C.value.endpoint,C.value.models.includes(p.model)||(p.model=C.value.models[0]||""),i.value=""}),watch(()=>p.model,()=>i.value="");function g(x=!0){a.$patch({type:p.type,endpoint:p.endpoint,model:p.model,temperature:p.temperature,maxToken:p.maxToken}),l.value=p.apiKey,x&&(i.value="✅ 配置已保存",o("saved"))}function f(){a.reset(),$(),i.value="🗑️ 当前 AI 配置已清除"}async function h(){i.value="",w.value=!0;const x={"Content-Type":"application/json"};p.apiKey&&p.type!==DEFAULT_SERVICE_TYPE&&(x.Authorization=`Bearer ${p.apiKey}`);try{const _=new URL(p.endpoint);_.pathname.endsWith("/chat/completions")||(_.pathname=_.pathname.replace(/\/?$/,"/chat/completions"));const b={model:p.model,messages:[{role:"user",content:"ping"}],temperature:0,max_tokens:1,stream:!1},M=await window.fetch(_.toString(),{method:"POST",headers:x,body:JSON.stringify(b)});if(M.ok)i.value="✅ 测试成功,/chat/completions 可用",g(!1);else{const L=await M.text();try{const{error:D}=JSON.parse(L);if(M.status===404&&((D==null?void 0:D.code)==="ModelNotOpen"||/not activated|未开通/i.test(D==null?void 0:D.message))){i.value=`⚠️ 测试成功,但当前模型未开通:${p.model}`,g(!1);return}}catch{}i.value=`❌ 测试失败:${M.status} ${M.statusText},${L}`}}catch(_){i.value=`❌ 测试失败:${_.message}`}finally{w.value=!1}}return(x,_)=>{const b=_sfc_main$1v,M=_sfc_main$15,L=_sfc_main$16,D=_sfc_main$19,k=_sfc_main$14,N=_sfc_main$1b,A=_sfc_main$1t,j=_sfc_main$N,ae=_sfc_main$O,J=_sfc_main$P,I=_sfc_main$Q,v=_sfc_main$1E;return openBlock(),createElementBlock("div",_hoisted_1$f,[_[16]||(_[16]=createBaseVNode("div",{class:"font-medium"}," AI 配置 ",-1)),createBaseVNode("div",null,[createVNode(b,{class:"mb-1 block text-sm font-medium"},{default:withCtx(()=>_[7]||(_[7]=[createTextVNode("服务类型",-1)])),_:1,__:[7]}),createVNode(N,{modelValue:unref(p).type,"onUpdate:modelValue":_[0]||(_[0]=H=>unref(p).type=H)},{default:withCtx(()=>[createVNode(L,{class:"w-full"},{default:withCtx(()=>[createVNode(M,null,{default:withCtx(()=>[createTextVNode(toDisplayString(unref(C).label),1)]),_:1})]),_:1}),createVNode(k,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(serviceOptions),H=>(openBlock(),createBlock(D,{key:H.value,value:H.value},{default:withCtx(()=>[createTextVNode(toDisplayString(H.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"])]),unref(p).type!==unref(DEFAULT_SERVICE_TYPE)?(openBlock(),createElementBlock("div",_hoisted_2$c,[createVNode(b,{class:"mb-1 block text-sm font-medium"},{default:withCtx(()=>_[8]||(_[8]=[createTextVNode("API 端点",-1)])),_:1,__:[8]}),createVNode(A,{modelValue:unref(p).endpoint,"onUpdate:modelValue":_[1]||(_[1]=H=>unref(p).endpoint=H),placeholder:"输入 API 端点 URL",class:"focus:border-gray-400 focus:ring-1 focus:ring-gray-300"},null,8,["modelValue"])])):createCommentVNode("",!0),unref(p).type!==unref(DEFAULT_SERVICE_TYPE)?(openBlock(),createElementBlock("div",_hoisted_3$c,[createVNode(b,{class:"mb-1 block text-sm font-medium"},{default:withCtx(()=>_[9]||(_[9]=[createTextVNode("API 密钥",-1)])),_:1,__:[9]}),createVNode(A,{modelValue:unref(p).apiKey,"onUpdate:modelValue":_[2]||(_[2]=H=>unref(p).apiKey=H),type:"password",placeholder:"sk-...",class:"focus:border-gray-400 focus:ring-1 focus:ring-gray-300"},null,8,["modelValue"])])):createCommentVNode("",!0),createBaseVNode("div",null,[createVNode(b,{class:"mb-1 block text-sm font-medium"},{default:withCtx(()=>_[10]||(_[10]=[createTextVNode("模型名称",-1)])),_:1,__:[10]}),unref(C).models.length>0?(openBlock(),createBlock(N,{key:0,modelValue:unref(p).model,"onUpdate:modelValue":_[3]||(_[3]=H=>unref(p).model=H)},{default:withCtx(()=>[createVNode(L,{class:"w-full"},{default:withCtx(()=>[createVNode(M,null,{default:withCtx(()=>[createTextVNode(toDisplayString(unref(p).model||"请选择模型"),1)]),_:1})]),_:1}),createVNode(k,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(C).models,H=>(openBlock(),createBlock(D,{key:H,value:H},{default:withCtx(()=>[createTextVNode(toDisplayString(H),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"])):(openBlock(),createBlock(A,{key:1,modelValue:unref(p).model,"onUpdate:modelValue":_[4]||(_[4]=H=>unref(p).model=H),placeholder:"输入模型名称",class:"focus:border-gray-400 focus:ring-1 focus:ring-gray-300"},null,8,["modelValue"]))]),createBaseVNode("div",null,[createVNode(b,{class:"mb-1 flex items-center gap-1 text-sm font-medium"},{default:withCtx(()=>[_[12]||(_[12]=createTextVNode(" 温度 ",-1)),createVNode(I,null,{default:withCtx(()=>[createVNode(J,null,{default:withCtx(()=>[createVNode(j,{"as-child":""},{default:withCtx(()=>[createVNode(unref(Info),{class:"text-gray-500",size:16})]),_:1}),createVNode(ae,null,{default:withCtx(()=>_[11]||(_[11]=[createBaseVNode("div",null,"控制输出的随机性:较低的值使输出更确定,较高的值使其更随机。",-1)])),_:1,__:[11]})]),_:1})]),_:1})]),_:1,__:[12]}),createVNode(A,{modelValue:unref(p).temperature,"onUpdate:modelValue":_[5]||(_[5]=H=>unref(p).temperature=H),modelModifiers:{number:!0},type:"number",step:"0.1",min:"0",max:"2",placeholder:"0 ~ 2,默认 1",class:"focus:border-gray-400 focus:ring-1 focus:ring-gray-300"},null,8,["modelValue"])]),createBaseVNode("div",null,[createVNode(b,{class:"mb-1 block text-sm font-medium"},{default:withCtx(()=>_[13]||(_[13]=[createTextVNode("最大 Token 数",-1)])),_:1,__:[13]}),createVNode(A,{modelValue:unref(p).maxToken,"onUpdate:modelValue":_[6]||(_[6]=H=>unref(p).maxToken=H),modelModifiers:{number:!0},type:"number",min:"1",max:"32768",placeholder:"比如 1024",class:"focus:border-gray-400 focus:ring-1 focus:ring-gray-300"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_4$a,[createVNode(v,{size:"sm",onClick:g},{default:withCtx(()=>_[14]||(_[14]=[createTextVNode(" 保存 ",-1)])),_:1,__:[14]}),createVNode(v,{size:"sm",variant:"ghost",onClick:f},{default:withCtx(()=>_[15]||(_[15]=[createTextVNode(" 清空 ",-1)])),_:1,__:[15]}),createVNode(v,{size:"sm",variant:"outline",disabled:unref(w),onClick:h},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(w)?"测试中...":"测试连接"),1)]),_:1},8,["disabled"])]),unref(i)?(openBlock(),createElementBlock("div",_hoisted_5$8,toDisplayString(unref(i)),1)):createCommentVNode("",!0)])}}}),__unplugin_components_0$2=_export_sfc(_sfc_main$M,[["__scopeId","data-v-394baaa8"]]),_sfc_main$L=defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(ou),normalizeProps(guardReactiveProps(e)),{default:withCtx(()=>[renderSlot(o.$slots,"default")]),_:3},16))}}),STORAGE_KEY="quick_commands";function hydrate(t){return{...t,buildPrompt:(e="")=>t.template.replace(/\{\{\s*sel\s*\}\}/gi,e)}}const DEFAULT_COMMANDS=[{id:"polish",label:"润色",template:`请润色以下内容:
562
+
563
+ {{sel}}`},{id:"to-en",label:"翻译成英文",template:`请将以下内容翻译为英文:
564
+
565
+ {{sel}}`},{id:"to-zh",label:"翻译成中文",template:`Please translate the following content into Chinese:
566
+
567
+ {{sel}}`},{id:"summary",label:"总结",template:`请对以下内容进行总结:
568
+
569
+ {{sel}}`}],useQuickCommands=defineStore("quickCommands",()=>{const t=ref([]);function e(){const s=t.value.map(({id:l,label:u,template:c})=>({id:l,label:u,template:c}));localStorage.setItem(STORAGE_KEY,JSON.stringify(s))}function o(){const s=localStorage.getItem(STORAGE_KEY);if(s)try{const l=JSON.parse(s);t.value=l.map(hydrate)}catch(l){console.warn("解析快捷指令失败,已恢复默认值",l),t.value=DEFAULT_COMMANDS.map(hydrate),e()}else t.value=DEFAULT_COMMANDS.map(hydrate),e()}function a(s,l){const u=crypto.randomUUID();t.value.push(hydrate({id:u,label:s,template:l}))}function n(s,l,u){const c=t.value.findIndex(p=>p.id===s);c!==-1&&(t.value[c]=hydrate({id:s,label:l,template:u}))}function r(s){t.value=t.value.filter(l=>l.id!==s)}return o(),watch(t,e,{deep:!0}),{commands:t,add:a,update:n,remove:r}}),_hoisted_1$e={class:"space-y-4 flex-1 overflow-y-auto pr-1"},_hoisted_2$b={class:"flex justify-end gap-2"},_hoisted_3$b={key:1,class:"flex items-center justify-between"},_hoisted_4$9={class:"break-all text-sm"},_hoisted_5$7={class:"flex gap-1"},_hoisted_6$7={class:"space-y-2 mt-4 border rounded-md p-3"},_sfc_main$K=defineComponent({__name:"QuickCommandManager",props:{open:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=t,a=e,n=ref(o.open);watch(()=>o.open,g=>n.value=g),watch(n,g=>a("update:open",g));const r=useQuickCommands(),s=ref(""),l=ref("");function u(){!s.value.trim()||!l.value.trim()||(r.add(s.value.trim(),l.value.trim()),s.value="",l.value="")}const c=ref(null),p=ref(""),w=ref("");function i(g){c.value=g.id,p.value=g.label,w.value=g.template}function C(){c.value=null}function $(){!p.value.trim()||!w.value.trim()||(r.update(c.value,p.value.trim(),w.value.trim()),c.value=null)}return(g,f)=>(openBlock(),createBlock(unref(_sfc_main$1y),{open:n.value,"onUpdate:open":f[4]||(f[4]=h=>n.value=h)},{default:withCtx(()=>[createVNode(unref(_sfc_main$1x),{class:"max-h-[90vh] w-[92vw] flex flex-col sm:max-w-lg"},{default:withCtx(()=>[createVNode(unref(_sfc_main$1p),null,{default:withCtx(()=>[createVNode(unref(_sfc_main$1o),null,{default:withCtx(()=>f[5]||(f[5]=[createTextVNode("管理快捷指令",-1)])),_:1,__:[5]})]),_:1}),createBaseVNode("div",_hoisted_1$e,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(r).commands,h=>(openBlock(),createElementBlock("div",{key:h.id,class:"flex flex-col gap-2 border rounded-md p-3"},[c.value===h.id?(openBlock(),createElementBlock(Fragment,{key:0},[createVNode(unref(_sfc_main$1t),{modelValue:p.value,"onUpdate:modelValue":f[0]||(f[0]=x=>p.value=x),placeholder:"指令名称"},null,8,["modelValue"]),createVNode(unref(_sfc_main$1w),{modelValue:w.value,"onUpdate:modelValue":f[1]||(f[1]=x=>w.value=x),rows:"2",placeholder:"模板内容,支持 {{sel}} 占位"},null,8,["modelValue"]),createBaseVNode("div",_hoisted_2$b,[createVNode(unref(_sfc_main$1E),{size:"xs",onClick:$},{default:withCtx(()=>f[6]||(f[6]=[createTextVNode(" 保存 ",-1)])),_:1,__:[6]}),createVNode(unref(_sfc_main$1E),{variant:"ghost",size:"xs",onClick:C},{default:withCtx(()=>f[7]||(f[7]=[createTextVNode(" 取消 ",-1)])),_:1,__:[7]})])],64)):(openBlock(),createElementBlock("div",_hoisted_3$b,[createBaseVNode("span",_hoisted_4$9,toDisplayString(h.label),1),createBaseVNode("div",_hoisted_5$7,[createVNode(unref(_sfc_main$1E),{variant:"ghost",size:"xs",onClick:x=>i(h)},{default:withCtx(()=>f[8]||(f[8]=[createTextVNode(" 编辑 ",-1)])),_:2,__:[8]},1032,["onClick"]),createVNode(unref(_sfc_main$1E),{variant:"outline",size:"xs",onClick:x=>unref(r).remove(h.id)},{default:withCtx(()=>f[9]||(f[9]=[createTextVNode(" 删除 ",-1)])),_:2,__:[9]},1032,["onClick"])])]))]))),128))]),createBaseVNode("div",_hoisted_6$7,[createVNode(unref(_sfc_main$1t),{modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=h=>s.value=h),placeholder:"指令名称 (如:改写为 SEO 文案)"},null,8,["modelValue"]),createVNode(unref(_sfc_main$1w),{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=h=>l.value=h),rows:"2",placeholder:"模板,可用 {{sel}} 占位,例如:\\n请把以下文字改写为 SEO 友好的标题:\\n\\n{{sel}}"},null,8,["modelValue"]),createVNode(unref(_sfc_main$1E),{class:"w-full",onClick:u},{default:withCtx(()=>f[10]||(f[10]=[createTextVNode(" 添加 ",-1)])),_:1,__:[10]})])]),_:1})]),_:1},8,["open"]))}}),_hoisted_1$d={class:"space-x-1 flex items-center"},_hoisted_2$a={key:0,class:"mb-3 flex flex-wrap gap-2 overflow-x-auto pb-1"},_hoisted_3$a={key:1,class:"text-muted-foreground flex items-center gap-2 border rounded-md border-dashed px-3 py-1 text-xs"},_hoisted_4$8={key:2,class:"custom-scroll space-y-3 chat-container mb-4 flex-1 overflow-y-auto pr-2"},_hoisted_5$6={key:0,class:"text-muted-foreground mb-1 italic"},_hoisted_6$6={key:3,class:"relative mt-2"},_hoisted_7$3={class:"bg-background border-border flex flex-col items-baseline gap-2 border rounded-xl px-3 py-2 pr-12 shadow-inner"},memoryKey="ai_memory_context",_sfc_main$J=defineComponent({__name:"AIAssistantPanel",props:{open:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=t,a=e,n=useStore(),{editor:r}=storeToRefs(n),s=ref(o.open);watch(()=>o.open,R=>s.value=R),watch(s,R=>{a("update:open",R),R&&P(!0)});const l=ref(""),u=ref([]),c=ref(null),p=ref(!1),w=ref(!1),i=ref(null),C=ref(null),$=ref(!1),g=ref(!1),f=ref([]),h=useAIConfigStore(),{apiKey:x,endpoint:_,model:b,temperature:M,maxToken:L,type:D}=storeToRefs(h),k=useQuickCommands();function N(){try{const R=r.value;return R&&typeof R.getSelection=="function"&&R.getSelection()||""}catch(R){return console.warn("获取选中文本失败",R),""}}function A(R){const K=N();l.value=R.buildPrompt(K),c.value=null,nextTick(()=>{const te=document.querySelector('textarea[placeholder*="说些什么" ]');te==null||te.focus(),te&&te.setSelectionRange(te.value.length,te.value.length)})}onMounted(async()=>{const R=localStorage.getItem(memoryKey);f.value=R?JSON.parse(R):j(),await P(!0)});function j(){return[{role:"assistant",content:"你好,我是 AI 助手,有什么可以帮你的?"}]}function ae(){p.value=!1,P(!0)}function J(R){if(!(R.isComposing||R.keyCode===229)){if(R.key==="Enter"&&!R.shiftKey)R.preventDefault(),le();else if(R.key==="ArrowUp"){if(R.preventDefault(),u.value.length===0)return;c.value===null?c.value=u.value.length-1:c.value>0&&c.value--,l.value=u.value[c.value]||""}else if(R.key==="ArrowDown"){if(R.preventDefault(),c.value===null)return;c.value<u.value.length-1?(c.value++,l.value=u.value[c.value]||""):(c.value=null,l.value="")}}}async function I(R,K){copyPlain(R),C.value=K,setTimeout(()=>C.value=null,1500)}function v(R){l.value=R,c.value=null,nextTick(()=>{const K=document.querySelector('textarea[placeholder*="说些什么" ]');if(K==null||K.focus(),K){const te=K.value.length;K.setSelectionRange(te,te)}})}function H(){i.value&&(i.value.abort(),i.value=null),f.value=j(),localStorage.setItem(memoryKey,JSON.stringify(f.value)),P(!0)}function W(){i.value&&(i.value.abort(),i.value=null),w.value=!1;const R=f.value[f.value.length-1];(R==null?void 0:R.role)==="assistant"&&(R.done=!0),P(!0)}async function P(R=!1){await nextTick();const K=document.querySelector(".chat-container");if(K){const te=K.scrollTop+K.clientHeight>=K.scrollHeight-50;(R||te)&&(K.scrollTop=K.scrollHeight,await new Promise(F=>setTimeout(F,50)))}}function oe(){$.value=!$.value}async function Q(){const R=[...f.value].reverse().find(te=>te.role==="user");if(!R)return;const K=f.value.findIndex((te,F,E)=>F>0&&E[F-1]===R&&te.role==="assistant");K!==-1&&f.value.splice(K,1),l.value=R.content,await nextTick(),le()}async function le(){var U,G;if(!l.value.trim()||w.value)return;u.value.push(l.value.trim()),c.value=null,w.value=!0;const R=l.value.trim();f.value.push({role:"user",content:R}),l.value="";const K={role:"assistant",content:"",reasoning:"",done:!1};f.value.push(K);const te=f.value[f.value.length-1];await P(!0);const F=f.value.slice(-12).filter((re,de,fe)=>!(de===fe.length-1&&re.role==="assistant"&&!re.done)&&!(de===0&&re.role==="assistant"));let E;if($.value){const re=[];for(let de=F.length-1;de>=0&&re.length<2;de--){const fe=F[de];(re.length===0||fe.role==="user"||fe.role==="assistant")&&re.unshift(fe)}E=re}else E=F.slice(-10);const z=$.value?[{role:"system",content:`下面是一篇 Markdown 文章全文,请严格以此为主完成后续指令:
570
+
571
+ ${r.value.getValue()}`}]:[],q=[{role:"system",content:"你是一个专业的 Markdown 编辑器助手,请用简洁中文回答。"},...z,...E],ne={model:b.value,messages:q,temperature:M.value,max_tokens:L.value,stream:!0},ee={"Content-Type":"application/json"};x.value&&D.value!=="default"&&(ee.Authorization=`Bearer ${x.value}`),i.value=new AbortController;const ie=i.value.signal;try{const re=new URL(_.value);re.pathname.endsWith("/chat/completions")||(re.pathname=re.pathname.replace(/\/?$/,"/chat/completions"));const de=await window.fetch(re.toString(),{method:"POST",headers:ee,body:JSON.stringify(ne),signal:ie});if(!de.ok||!de.body)throw new Error(`响应错误:${de.status} ${de.statusText}`);const fe=de.body.getReader(),we=new TextDecoder("utf-8");let me="";for(;;){const{value:be,done:_e}=await fe.read();if(_e){const he=f.value[f.value.length-1];he.role==="assistant"&&(he.done=!0,await P(!0));break}me+=we.decode(be,{stream:!0});const ve=me.split(`
572
+ `);me=ve.pop()||"";for(const he of ve)if(!(!he.trim()||he.trim()==="data: [DONE]"))try{const ue=((G=(U=JSON.parse(he.replace(/^data: /,"")).choices)==null?void 0:U[0])==null?void 0:G.delta)||{},Y=f.value[f.value.length-1];if(Y!==te)return;ue.content?Y.content+=ue.content:ue.reasoning_content&&(Y.reasoning=(Y.reasoning||"")+ue.reasoning_content),await P()}catch(pe){console.error("解析失败:",pe)}}}catch(re){re.name==="AbortError"?console.log("请求中止"):(console.error("请求失败:",re),f.value[f.value.length-1].content=`❌ 请求失败: ${re.message}`),await P(!0)}finally{localStorage.setItem(memoryKey,JSON.stringify(f.value)),w.value=!1,i.value=null}}return(R,K)=>{const te=_sfc_main$K,F=__unplugin_components_0$2;return openBlock(),createBlock(unref(_sfc_main$1y),{open:unref(s),"onUpdate:open":K[5]||(K[5]=E=>isRef(s)?s.value=E:null)},{default:withCtx(()=>[createVNode(unref(_sfc_main$1x),{class:"bg-card text-card-foreground h-dvh max-h-dvh w-full flex flex-col rounded-none shadow-xl sm:max-h-[80vh] sm:max-w-2xl sm:rounded-xl"},{default:withCtx(()=>[createVNode(unref(_sfc_main$1p),{class:"space-y-1 flex flex-col items-start"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$d,[createVNode(unref(_sfc_main$1o),null,{default:withCtx(()=>K[6]||(K[6]=[createTextVNode("AI 对话",-1)])),_:1,__:[6]}),createVNode(unref(_sfc_main$1E),{title:"配置参数","aria-label":"配置参数",variant:"ghost",size:"icon",onClick:K[0]||(K[0]=E=>p.value=!unref(p))},{default:withCtx(()=>[createVNode(unref(Settings),{class:"h-4 w-4"})]),_:1}),createVNode(unref(_sfc_main$1E),{title:"清空对话内容","aria-label":"清空对话内容",variant:"ghost",size:"icon",onClick:H},{default:withCtx(()=>[createVNode(unref(Trash2),{class:"h-4 w-4"})]),_:1})]),K[7]||(K[7]=createBaseVNode("p",{class:"text-muted-foreground text-sm"}," 使用 AI 助手帮助您编写和优化内容 ",-1))]),_:1,__:[7]}),unref(p)?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_2$a,[unref(k).commands.length?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(unref(k).commands,E=>(openBlock(),createBlock(unref(_sfc_main$1E),{key:E.id,variant:"secondary",size:"sm",class:"text-xs",onClick:z=>A(E)},{default:withCtx(()=>[createTextVNode(toDisplayString(E.label),1)]),_:2},1032,["onClick"]))),128)):(openBlock(),createElementBlock("div",_hoisted_3$a," 还没有任何快捷指令,点击右侧添加 ")),createVNode(unref(_sfc_main$1E),{variant:"ghost",size:"icon",title:"管理指令",onClick:K[1]||(K[1]=E=>g.value=!0)},{default:withCtx(()=>[createVNode(unref(Plus),{class:"h-4 w-4"})]),_:1}),createVNode(te,{open:unref(g),"onUpdate:open":K[2]||(K[2]=E=>isRef(g)?g.value=E:null)},null,8,["open"])])),unref(p)?(openBlock(),createBlock(F,{key:1,class:"mb-4 w-full border rounded-md p-4",onSaved:ae})):createCommentVNode("",!0),unref(p)?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_4$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(f),(E,z)=>(openBlock(),createElementBlock("div",{key:z,class:normalizeClass(["relative flex",E.role==="user"?"justify-end":"justify-start"])},[createBaseVNode("div",{class:normalizeClass(["ring-border/20 max-w-[75%] rounded-2xl px-4 py-2 text-sm leading-relaxed shadow-xs ring-1",E.role==="user"?"bg-black text-white dark:bg-primary dark:text-primary-foreground":"bg-gray-100 text-gray-800 dark:bg-muted/60 dark:text-muted-foreground"])},[E.reasoning?(openBlock(),createElementBlock("div",_hoisted_5$6,toDisplayString(E.reasoning),1)):createCommentVNode("",!0),createBaseVNode("div",{class:normalizeClass(["whitespace-pre-wrap",E.content?"":"animate-pulse text-muted-foreground"])},toDisplayString(E.content||(E.role==="assistant"&&!E.done?"思考中…":"")),3),createBaseVNode("div",{class:normalizeClass(["mt-1 flex",E.role==="user"?"justify-end":"justify-start"])},[z>0&&!(E.role==="assistant"&&z===unref(f).length-1&&!E.done)?(openBlock(),createBlock(unref(_sfc_main$1E),{key:0,variant:"ghost",size:"icon",class:"ml-0 h-5 w-5 p-1","aria-label":"复制内容",onClick:q=>I(E.content,z)},{default:withCtx(()=>[unref(C)===z?(openBlock(),createBlock(unref(Check),{key:0,class:"h-3 w-3 text-green-600"})):(openBlock(),createBlock(unref(Copy),{key:1,class:"text-muted-foreground h-3 w-3"}))]),_:2},1032,["onClick"])):createCommentVNode("",!0),z>0&&!(E.role==="assistant"&&z===unref(f).length-1&&!E.done)?(openBlock(),createBlock(unref(_sfc_main$1E),{key:1,variant:"ghost",size:"icon",class:"ml-1 h-5 w-5 p-1","aria-label":"编辑内容",onClick:q=>v(E.content)},{default:withCtx(()=>[createVNode(unref(SquarePen),{class:"text-muted-foreground h-3 w-3"})]),_:2},1032,["onClick"])):createCommentVNode("",!0),E.role==="assistant"&&E.done&&z===unref(f).length-1?(openBlock(),createBlock(unref(_sfc_main$1E),{key:2,variant:"ghost",size:"icon",class:"ml-1 h-5 w-5 p-1","aria-label":"重新生成",onClick:Q},{default:withCtx(()=>[createVNode(unref(RefreshCcw),{class:"text-muted-foreground h-3 w-3"})]),_:1})):createCommentVNode("",!0)],2)],2)],2))),128))])),unref(p)?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_6$6,[createBaseVNode("div",_hoisted_7$3,[createVNode(unref(_sfc_main$1w),{modelValue:unref(l),"onUpdate:modelValue":K[3]||(K[3]=E=>isRef(l)?l.value=E:null),placeholder:"说些什么… (Enter 发送,Shift+Enter 换行)",rows:"2",class:"custom-scroll min-h-16 w-full resize-none border-none bg-transparent p-0 focus-visible:outline-hidden focus:outline-hidden focus-visible:ring-0 focus:ring-0 focus-visible:ring-offset-0 focus:ring-offset-0 focus-visible:ring-transparent focus:ring-transparent",onKeydown:J},null,8,["modelValue"]),createVNode(unref(_sfc_main$1E),{size:"sm",variant:"outline",class:normalizeClass(["h-8 flex items-center gap-1 rounded-md px-3 font-medium transition-colors duration-150",[unref($)?"bg-primary text-white border-primary dark:bg-white dark:text-black dark:border-white":"bg-background text-muted-foreground border-border hover:text-foreground hover:border-foreground dark:bg-muted dark:text-gray-400 dark:hover:text-white dark:hover:border-white/60"]]),"aria-label":"引用全文",onClick:oe},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref($)?unref(Check):unref(Copy)),{class:"h-4 w-4"})),K[8]||(K[8]=createBaseVNode("span",{class:"text-xs"},"引用全文",-1))]),_:1,__:[8]},8,["class"]),createVNode(unref(_sfc_main$1E),{disabled:!unref(l).trim()&&!unref(w),size:"icon",class:normalizeClass(["absolute bottom-3 right-3 rounded-full disabled:opacity-40","bg-primary hover:bg-primary/90 text-primary-foreground"]),"aria-label":unref(w)?"暂停":"发送",onClick:K[4]||(K[4]=E=>unref(w)?W():le())},{default:withCtx(()=>[unref(w)?(openBlock(),createBlock(unref(Pause),{key:0,class:"h-4 w-4"})):(openBlock(),createBlock(unref(Send),{key:1,class:"h-4 w-4"}))]),_:1},8,["disabled","aria-label"])])]))]),_:1})]),_:1},8,["open"])}}}),__unplugin_components_0$1=_export_sfc(_sfc_main$J,[["__scopeId","data-v-67d3e1b4"]]),_sfc_main$I=defineComponent({__name:"AIFixedBtn",props:{isMobile:{type:Boolean},showEditor:{type:Boolean}},setup(t){const e=useDisplayStore(),{aiDialogVisible:o}=storeToRefs(e),{toggleAIDialog:a}=e;return(n,r)=>{const s=__unplugin_components_0$1;return openBlock(),createElementBlock(Fragment,null,[!n.isMobile||n.isMobile&&n.showEditor?(openBlock(),createElementBlock("button",{key:0,class:normalizeClass(["bg-primary absolute top-4 z-49 flex items-center justify-center rounded-full p-3 text-white shadow-lg transition active:scale-95 hover:scale-105 dark:bg-gray-700 dark:text-white dark:ring-2 dark:ring-white/30",n.isMobile?"right-4":"right-6"]),"aria-label":"AI 助手",onClick:r[0]||(r[0]=()=>unref(a)(!0))},[createVNode(unref(Bot),{class:"h-5 w-5"})],2)):createCommentVNode("",!0),createVNode(s,{open:unref(o),"onUpdate:open":r[1]||(r[1]=l=>isRef(o)?o.value=l:null)},null,8,["open"])],64)}}}),_sfc_main$H=defineComponent({__name:"AlertDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(Rv),normalizeProps(guardReactiveProps(e)),{default:withCtx(()=>[renderSlot(o.$slots,"default")]),_:3},16))}}),_sfc_main$G=defineComponent({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{},label:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(ap),mergeProps(o.value,{class:unref(cn)("shrink-0 bg-border relative",e.orientation==="vertical"?"w-px h-full":"h-px w-full",e.class)}),{default:withCtx(()=>[e.label?(openBlock(),createElementBlock("span",{key:0,class:normalizeClass(unref(cn)("text-xs text-muted-foreground bg-background absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex justify-center items-center",e.orientation==="vertical"?"w-px px-1 py-2":"h-px py-1 px-2"))},toDisplayString(e.label),3)):createCommentVNode("",!0)]),_:1},16,["class"]))}}),_sfc_main$F=defineComponent({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(uh),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_sfc_main$E=defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(ch),null,{default:withCtx(()=>[createVNode(unref(fh),mergeProps(unref(r),{class:unref(cn)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$D=defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(vh),mergeProps(unref(a),{class:unref(cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",n.inset&&"pl-8",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$C=defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const o=Ot(t);return(a,n)=>(openBlock(),createBlock(unref(dh),mergeProps({class:"outline-hidden"},unref(o)),{default:withCtx(()=>[renderSlot(a.$slots,"default")]),_:3},16))}}),_hoisted_1$c=["onDragstart","onDrop","onDragover","onClick"],_hoisted_2$9={class:"line-clamp-1"},_hoisted_3$9={key:0,class:"space-y-1 ml-4 mt-1 border-l-2 border-gray-300 pl-1 dark:border-gray-700"},_sfc_main$B=defineComponent({__name:"PostItem",props:{parentId:{},sortedPosts:{},startRenamePost:{type:Function},openHistoryDialog:{type:Function},startDelPost:{type:Function},dropTargetId:{},setDropTargetId:{type:Function},dragSourceId:{},setDragSourceId:{type:Function},handleDrop:{type:Function},handleDragEnd:{type:Function},openAddPostDialog:{type:Function}},setup(t){const e=t,o=useStore(),a=ref(!1),n=ref("");watch(a,u=>{u&&(n.value="")});function r(u,c){var p;e.setDragSourceId(u),(p=c.dataTransfer)==null||p.setData("text/plain",u),c.dataTransfer.effectAllowed="move"}function s(u){const c=o.posts.find(p=>p.id===u);c&&(c.collapsed=!c.collapsed)}function l(u){return e.sortedPosts.some(c=>c.parentId===u)}return(u,c)=>{const p=_sfc_main$1E,w=_sfc_main$C,i=_sfc_main$D,C=_sfc_main$E,$=_sfc_main$F,g=resolveComponent("PostItem",!0);return openBlock(!0),createElementBlock(Fragment,null,renderList(e.sortedPosts.filter(f=>e.parentId==null&&f.parentId==null||f.parentId===e.parentId),f=>(openBlock(),createElementBlock("div",{key:f.id},[createBaseVNode("a",{class:normalizeClass(["w-full inline-flex cursor-pointer items-center gap-1 rounded p-2 text-sm transition-colors",["hover:text-primary-foreground hover:bg-primary",{"bg-primary text-primary-foreground shadow-sm":unref(o).currentPostId===f.id,"opacity-50":e.dragSourceId===f.id,"outline-2 outline-dashed outline-primary border-gray-200 bg-gray-400/50 dark:border-gray-200 dark:bg-gray-500/50":e.dropTargetId===f.id}]]),draggable:"true",onDragstart:h=>r(f.id,h),onDragend:c[0]||(c[0]=(...h)=>e.handleDragEnd&&e.handleDragEnd(...h)),onDrop:withModifiers(h=>e.handleDrop(f.id),["prevent"]),onDragover:withModifiers(h=>e.setDropTargetId(f.id),["stop","prevent"]),onDragleave:c[1]||(c[1]=withModifiers(h=>e.setDropTargetId(null),["prevent"])),onClick:h=>unref(o).currentPostId=f.id},[createVNode(p,{size:"xs",variant:"ghost",class:normalizeClass(["h-max p-0.5",l(f.id)?"opacity-100":"opacity-0"]),onClick:withModifiers(h=>l(f.id)&&s(f.id),["stop"])},{default:withCtx(()=>[createVNode(unref(ChevronRight),{class:normalizeClass(["size-4 transition-transform",{"rotate-90":!f.collapsed}])},null,8,["class"])]),_:2},1032,["class","onClick"]),createBaseVNode("span",_hoisted_2$9,toDisplayString(f.title),1),createVNode($,null,{default:withCtx(()=>[createVNode(w,{"as-child":""},{default:withCtx(()=>[createVNode(p,{size:"xs",variant:"ghost",class:"ml-auto h-max p-0.5"},{default:withCtx(()=>[createVNode(unref(Ellipsis),{class:"size-4"})]),_:1})]),_:1}),createVNode(C,null,{default:withCtx(()=>[createVNode(i,{onClick:withModifiers(h=>e.openAddPostDialog(f.id),["stop"])},{default:withCtx(()=>[createVNode(unref(SquarePlus),{class:"mr-2 size-4"}),c[2]||(c[2]=createTextVNode(" 新增内容 ",-1))]),_:2,__:[2]},1032,["onClick"]),createVNode(i,{onClick:withModifiers(h=>e.startRenamePost(f.id),["stop"])},{default:withCtx(()=>[createVNode(unref(PenLine),{class:"mr-2 size-4"}),c[3]||(c[3]=createTextVNode(" 重命名 ",-1))]),_:2,__:[3]},1032,["onClick"]),createVNode(i,{onClick:withModifiers(h=>e.openHistoryDialog(f.id),["stop"])},{default:withCtx(()=>[createVNode(unref(History),{class:"mr-2 size-4"}),c[4]||(c[4]=createTextVNode(" 历史记录 ",-1))]),_:2,__:[4]},1032,["onClick"]),unref(o).posts.length>1?(openBlock(),createBlock(i,{key:0,onClick:withModifiers(h=>e.startDelPost(f.id),["stop"])},{default:withCtx(()=>[createVNode(unref(Trash2),{class:"mr-2 size-4"}),c[5]||(c[5]=createTextVNode(" 删除 ",-1))]),_:2,__:[5]},1032,["onClick"])):createCommentVNode("",!0)]),_:2},1024)]),_:2},1024)],42,_hoisted_1$c),l(f.id)&&!f.collapsed?(openBlock(),createElementBlock("div",_hoisted_3$9,[createVNode(g,{"parent-id":f.id,"sorted-posts":e.sortedPosts,"start-rename-post":e.startRenamePost,"open-history-dialog":e.openHistoryDialog,"start-del-post":e.startDelPost,"drag-source-id":e.dragSourceId,"set-drag-source-id":e.setDragSourceId,"drop-target-id":e.dropTargetId,"set-drop-target-id":e.setDropTargetId,"handle-drag-end":e.handleDragEnd,"handle-drop":e.handleDrop,"open-add-post-dialog":e.openAddPostDialog},null,8,["parent-id","sorted-posts","start-rename-post","open-history-dialog","start-del-post","drag-source-id","set-drag-source-id","drop-target-id","set-drop-target-id","handle-drag-end","handle-drop","open-add-post-dialog"])])):createCommentVNode("",!0)]))),128)}}}),_sfc_main$A=defineComponent({__name:"DropdownMenuRadioGroup",props:{modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(Ch),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_sfc_main$z=defineComponent({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:a,...n}=e;return n});return(a,n)=>(openBlock(),createBlock(unref(hh),mergeProps(o.value,{class:unref(cn)("-mx-1 my-1 h-px bg-muted",e.class)}),null,16,["class"]))}}),_hoisted_1$b={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$y=defineComponent({__name:"DropdownMenuRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(wh),mergeProps(unref(r),{class:unref(cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",o.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$b,[createVNode(unref(gh),null,{default:withCtx(()=>[createVNode(unref(Circle),{class:"h-2 w-2 fill-current"})]),_:1})]),renderSlot(s.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$a={class:"space-x-4 mb-2 flex justify-center shrink-0 py-2"},_hoisted_2$8={class:"flex-1 overflow-y-auto space-y-1 px-1"},_hoisted_3$8={class:"h-[50vh] flex"},_hoisted_4$7={class:"space-y-2 w-[150px]"},_hoisted_5$5=["onClick"],_hoisted_6$5={class:"space-y-2 max-h-full w-[500px] overflow-y-auto"},_sfc_main$x=defineComponent({__name:"index",setup(t){const e=useStore(),o=ref(null),a=ref(!1),n=ref("");watch(a,I=>{I&&(n.value="",o.value=null)});function r(I){a.value=!0,nextTick(()=>{o.value=I})}function s(){if(!n.value.trim())return toast.error("内容标题不可为空");if(e.posts.some(I=>I.title===n.value.trim()))return toast.error("内容标题已存在");e.addPost(n.value.trim(),o.value),a.value=!1,toast.success("内容新增成功")}const l=ref(null),u=ref(!1),c=ref("");function p(I){l.value=I,c.value=e.getPostById(I).title,u.value=!0}function w(){var I;if(!c.value.trim())return toast.error("内容标题不可为空");if(e.posts.some(v=>v.title===c.value.trim()&&v.id!==l.value))return toast.error("内容标题已存在");if(c.value===((I=e.getPostById(l.value))==null?void 0:I.title)){u.value=!1;return}e.renamePost(l.value,c.value.trim()),toast.success("内容重命名成功"),u.value=!1}const i=ref(null),C=ref(!1),$=computed(()=>{var H;const I=((H=e.getPostById(i.value||""))==null?void 0:H.title)??"";return`此操作将删除「${I.length>20?`${I.slice(0,20)}…`:I}」,是否继续?`});function g(I){i.value=I,C.value=!0}function f(){e.delPost(i.value),C.value=!1,toast.success("内容删除成功")}const h=ref(!1),x=ref(null),_=ref(0);function b(I){x.value=I,_.value=0,h.value=!0}function M(){const I=e.getPostById(x.value);if(!I){h.value=!1;return}const v=I.history[_.value].content;I.content=v,toRaw(e.editor).setValue(v),toast.success("记录恢复成功"),h.value=!1}const L=useStorage(addPrefix("sort_mode"),"create-old-new"),D=computed(()=>[...e.posts].sort((I,v)=>{switch(L.value){case"A-Z":return I.title.localeCompare(v.title);case"Z-A":return v.title.localeCompare(I.title);case"update-new-old":return+new Date(v.updateDatetime)-+new Date(I.updateDatetime);case"update-old-new":return+new Date(I.updateDatetime)-+new Date(v.updateDatetime);case"create-new-old":return+new Date(v.createDatetime)-+new Date(I.createDatetime);default:return+new Date(I.createDatetime)-+new Date(v.createDatetime)}})),k=ref(!1),N=ref(null),A=ref(null);function j(I){const v=N.value;if(!v)return;const H=W=>{if(!W)return!1;const P=e.getPostById(W);return P?P.parentId===v?!0:H(P.parentId):!1};H(I)?toast.error("不能将内容拖拽到其子内容下面"):v!==I&&e.updatePostParentId(v,I||null),N.value=null}function ae(I){I.preventDefault()}function J(){N.value=null,A.value=null,k.value=!1}return(I,v)=>{const H=_sfc_main$1E,W=_sfc_main$N,P=_sfc_main$O,oe=_sfc_main$P,Q=_sfc_main$Q,le=_sfc_main$L,R=_sfc_main$1o,K=_sfc_main$$,te=_sfc_main$1p,F=_sfc_main$1t,E=_sfc_main$1m,z=_sfc_main$1x,q=_sfc_main$1y,ne=_sfc_main$C,ee=_sfc_main$y,ie=_sfc_main$z,U=_sfc_main$A,G=_sfc_main$E,re=_sfc_main$F,de=_sfc_main$B,fe=_sfc_main$1z,we=_sfc_main$1A,me=_sfc_main$1B,be=_sfc_main$1C,_e=_sfc_main$1D,ve=_sfc_main$1F,he=_sfc_main$1G,pe=_sfc_main$1H,ue=_sfc_main$G,Y=_sfc_main$H;return openBlock(),createElementBlock("div",{class:normalizeClass(["h-full w-full overflow-hidden border-2 border-[#0000] border-dashed bg-gray/20 transition-colors duration-300",{"border-gray-700 bg-gray-400/50 dark:border-gray-200 dark:bg-gray-500/50":unref(k)}]),onDragover:v[9]||(v[9]=withModifiers(V=>k.value=!0,["prevent"])),onDragleave:v[10]||(v[10]=withModifiers(V=>k.value=!1,["prevent"])),onDragend:J},[createBaseVNode("nav",{class:"h-full flex flex-col transition-transform overflow-hidden",onDragover:ae,onDrop:v[8]||(v[8]=withModifiers(V=>j(null),["prevent"]))},[createBaseVNode("div",_hoisted_1$a,[createVNode(q,{open:unref(a),"onUpdate:open":v[1]||(v[1]=V=>isRef(a)?a.value=V:null)},{default:withCtx(()=>[createVNode(le,null,{default:withCtx(()=>[createVNode(Q,{"delay-duration":200},{default:withCtx(()=>[createVNode(oe,null,{default:withCtx(()=>[createVNode(W,{"as-child":""},{default:withCtx(()=>[createVNode(H,{variant:"ghost",size:"xs",class:"h-max p-1"},{default:withCtx(()=>[createVNode(unref(SquarePlus),{class:"size-5"})]),_:1})]),_:1}),createVNode(P,{side:"bottom"},{default:withCtx(()=>v[11]||(v[11]=[createTextVNode(" 新增内容 ",-1)])),_:1,__:[11]})]),_:1})]),_:1})]),_:1}),createVNode(z,null,{default:withCtx(()=>[createVNode(te,null,{default:withCtx(()=>[createVNode(R,null,{default:withCtx(()=>v[12]||(v[12]=[createTextVNode("新增内容",-1)])),_:1,__:[12]}),createVNode(K,null,{default:withCtx(()=>v[13]||(v[13]=[createTextVNode("请输入内容名称",-1)])),_:1,__:[13]})]),_:1}),createVNode(F,{modelValue:unref(n),"onUpdate:modelValue":v[0]||(v[0]=V=>isRef(n)?n.value=V:null),onKeyup:withKeys(s,["enter"])},null,8,["modelValue"]),createVNode(E,null,{default:withCtx(()=>[createVNode(H,{onClick:s},{default:withCtx(()=>v[14]||(v[14]=[createTextVNode(" 确 定 ",-1)])),_:1,__:[14]})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(re,null,{default:withCtx(()=>[createVNode(ne,null,{default:withCtx(()=>[createVNode(Q,{"delay-duration":200},{default:withCtx(()=>[createVNode(oe,null,{default:withCtx(()=>[createVNode(W,{"as-child":""},{default:withCtx(()=>[createVNode(H,{variant:"ghost",size:"xs",class:"h-max p-1"},{default:withCtx(()=>[createVNode(unref(ArrowUpNarrowWide),{class:"size-5"})]),_:1})]),_:1}),createVNode(P,{side:"bottom"},{default:withCtx(()=>v[15]||(v[15]=[createTextVNode(" 排序模式 ",-1)])),_:1,__:[15]})]),_:1})]),_:1})]),_:1}),createVNode(G,null,{default:withCtx(()=>[createVNode(U,{modelValue:unref(L),"onUpdate:modelValue":v[2]||(v[2]=V=>isRef(L)?L.value=V:null)},{default:withCtx(()=>[createVNode(ee,{value:"A-Z"},{default:withCtx(()=>v[16]||(v[16]=[createTextVNode(" 文件名(A-Z) ",-1)])),_:1,__:[16]}),createVNode(ee,{value:"Z-A"},{default:withCtx(()=>v[17]||(v[17]=[createTextVNode(" 文件名(Z-A) ",-1)])),_:1,__:[17]}),createVNode(ie),createVNode(ee,{value:"update-new-old"},{default:withCtx(()=>v[18]||(v[18]=[createTextVNode(" 编辑时间(新→旧) ",-1)])),_:1,__:[18]}),createVNode(ee,{value:"update-old-new"},{default:withCtx(()=>v[19]||(v[19]=[createTextVNode(" 编辑时间(旧→新) ",-1)])),_:1,__:[19]}),createVNode(ie),createVNode(ee,{value:"create-new-old"},{default:withCtx(()=>v[20]||(v[20]=[createTextVNode(" 创建时间(新→旧) ",-1)])),_:1,__:[20]}),createVNode(ee,{value:"create-old-new"},{default:withCtx(()=>v[21]||(v[21]=[createTextVNode(" 创建时间(旧→新) ",-1)])),_:1,__:[21]})]),_:1},8,["modelValue"])]),_:1})]),_:1}),createVNode(Q,{"delay-duration":200},{default:withCtx(()=>[createVNode(oe,null,{default:withCtx(()=>[createVNode(W,{"as-child":""},{default:withCtx(()=>[createVNode(H,{variant:"ghost",size:"xs",class:"h-max p-1",onClick:unref(e).collapseAllPosts},{default:withCtx(()=>[createVNode(unref(ChevronsDownUp),{class:"size-5"})]),_:1},8,["onClick"])]),_:1}),createVNode(P,{side:"bottom"},{default:withCtx(()=>v[22]||(v[22]=[createTextVNode(" 全部收起 ",-1)])),_:1,__:[22]})]),_:1})]),_:1}),createVNode(Q,{"delay-duration":200},{default:withCtx(()=>[createVNode(oe,null,{default:withCtx(()=>[createVNode(W,{"as-child":""},{default:withCtx(()=>[createVNode(H,{variant:"ghost",size:"xs",class:"h-max p-1",onClick:unref(e).expandAllPosts},{default:withCtx(()=>[createVNode(unref(ChevronsUpDown),{class:"size-5"})]),_:1},8,["onClick"])]),_:1}),createVNode(P,{side:"bottom"},{default:withCtx(()=>v[23]||(v[23]=[createTextVNode(" 全部展开 ",-1)])),_:1,__:[23]})]),_:1})]),_:1})]),createBaseVNode("div",_hoisted_2$8,[createVNode(de,{"parent-id":null,"sorted-posts":unref(D),"start-rename-post":p,"open-history-dialog":b,"start-del-post":g,"drop-target-id":unref(A),"set-drop-target-id":V=>A.value=V,"drag-source-id":unref(N),"set-drag-source-id":V=>N.value=V,"handle-drop":j,"handle-drag-end":J,"open-add-post-dialog":r},null,8,["sorted-posts","drop-target-id","set-drop-target-id","drag-source-id","set-drag-source-id"])]),createVNode(q,{open:unref(u),"onUpdate:open":v[5]||(v[5]=V=>isRef(u)?u.value=V:null)},{default:withCtx(()=>[createVNode(z,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(te,null,{default:withCtx(()=>[createVNode(R,null,{default:withCtx(()=>v[24]||(v[24]=[createTextVNode("编辑内容名称",-1)])),_:1,__:[24]}),createVNode(K,null,{default:withCtx(()=>v[25]||(v[25]=[createTextVNode("请输入新的内容名称",-1)])),_:1,__:[25]})]),_:1}),createVNode(F,{modelValue:unref(c),"onUpdate:modelValue":v[3]||(v[3]=V=>isRef(c)?c.value=V:null),onKeyup:withKeys(w,["enter"])},null,8,["modelValue"]),createVNode(E,null,{default:withCtx(()=>[createVNode(H,{variant:"outline",onClick:v[4]||(v[4]=V=>u.value=!1)},{default:withCtx(()=>v[26]||(v[26]=[createTextVNode(" 取消 ",-1)])),_:1,__:[26]}),createVNode(H,{onClick:w},{default:withCtx(()=>v[27]||(v[27]=[createTextVNode(" 保存 ",-1)])),_:1,__:[27]})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(pe,{open:unref(C),"onUpdate:open":v[6]||(v[6]=V=>isRef(C)?C.value=V:null)},{default:withCtx(()=>[createVNode(he,null,{default:withCtx(()=>[createVNode(me,null,{default:withCtx(()=>[createVNode(fe,null,{default:withCtx(()=>v[28]||(v[28]=[createTextVNode("提示",-1)])),_:1,__:[28]}),createVNode(we,null,{default:withCtx(()=>[createTextVNode(toDisplayString(unref($)),1)]),_:1})]),_:1}),createVNode(ve,null,{default:withCtx(()=>[createVNode(be,null,{default:withCtx(()=>v[29]||(v[29]=[createTextVNode("取消",-1)])),_:1,__:[29]}),createVNode(_e,{onClick:f},{default:withCtx(()=>v[30]||(v[30]=[createTextVNode(" 确认 ",-1)])),_:1,__:[30]})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(q,{open:unref(h),"onUpdate:open":v[7]||(v[7]=V=>isRef(h)?h.value=V:null)},{default:withCtx(()=>[createVNode(z,{class:"max-w-max"},{default:withCtx(()=>{var V,ce;return[createVNode(te,null,{default:withCtx(()=>[createVNode(R,null,{default:withCtx(()=>v[31]||(v[31]=[createTextVNode("历史记录",-1)])),_:1,__:[31]}),createVNode(K,null,{default:withCtx(()=>v[32]||(v[32]=[createTextVNode("每隔 30 秒自动保存,最多保留 10 条",-1)])),_:1,__:[32]})]),_:1}),createBaseVNode("div",_hoisted_3$8,[createBaseVNode("ul",_hoisted_4$7,[(openBlock(!0),createElementBlock(Fragment,null,renderList((V=unref(e).getPostById(unref(x)))==null?void 0:V.history,(xe,Ce)=>(openBlock(),createElementBlock("li",{key:xe.datetime,class:normalizeClass(["h-8 w-full inline-flex cursor-pointer items-center gap-2 rounded px-2 text-sm transition-colors",["hover:bg-primary/90 hover:text-primary-foreground",{"bg-primary text-primary-foreground shadow-lg dark:border dark:border-primary":unref(_)===Ce,"dark:bg-gray/30 dark:text-primary-foreground-dark dark:border-primary-dark":unref(_)===Ce}]]),onClick:Ne=>_.value=Ce},toDisplayString(xe.datetime),11,_hoisted_5$5))),128))]),createVNode(ue,{orientation:"vertical",class:"mx-2"}),createBaseVNode("div",_hoisted_6$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList((((ce=unref(e).getPostById(unref(x)))==null?void 0:ce.history[unref(_)].content)??"").split(`
573
+ `),(xe,Ce)=>(openBlock(),createElementBlock("p",{key:Ce},toDisplayString(xe),1))),128))])]),createVNode(E,null,{default:withCtx(()=>[createVNode(pe,null,{default:withCtx(()=>[createVNode(Y,null,{default:withCtx(()=>[createVNode(H,null,{default:withCtx(()=>v[33]||(v[33]=[createTextVNode("恢 复",-1)])),_:1,__:[33]})]),_:1}),createVNode(he,null,{default:withCtx(()=>[createVNode(me,null,{default:withCtx(()=>[createVNode(fe,null,{default:withCtx(()=>v[34]||(v[34]=[createTextVNode("提示",-1)])),_:1,__:[34]}),createVNode(we,null,{default:withCtx(()=>v[35]||(v[35]=[createTextVNode(" 此操作将用该记录替换当前文章内容,是否继续? ",-1)])),_:1,__:[35]})]),_:1}),createVNode(ve,null,{default:withCtx(()=>[createVNode(be,null,{default:withCtx(()=>v[36]||(v[36]=[createTextVNode("取消",-1)])),_:1,__:[36]}),createVNode(_e,{onClick:M},{default:withCtx(()=>v[37]||(v[37]=[createTextVNode(" 恢 复 ",-1)])),_:1,__:[37]})]),_:1})]),_:1})]),_:1})]),_:1})]}),_:1})]),_:1},8,["open"])],32)],34)}}}),_hoisted_1$9={class:"mt-4"},_hoisted_2$7={key:0,class:"py-4 text-center"},_hoisted_3$7={key:1,class:"max-h-[400px] flex flex-col overflow-y-auto"},_hoisted_4$6={class:"mb-2 flex items-center gap-2"},_hoisted_5$4=["src"],_hoisted_6$4=["href"],_sfc_main$w=defineComponent({__name:"PostTaskDialog",props:{post:{},open:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=t,a=e,n=computed({get:()=>o.open,set:u=>a("update:open",u)}),r=ref(null),s=ref(!1);async function l(){var u;if(o.post)try{(u=window.$syncer)==null||u.addTask({post:{title:o.post.title,content:o.post.content,markdown:o.post.markdown,thumb:o.post.thumb,desc:o.post.desc},accounts:o.post.accounts.filter(c=>c.checked)},c=>{r.value=c},()=>{s.value=!1})}catch(c){console.error("发布失败:",c)}}return watch(()=>o.open,u=>{u&&l()}),(u,c)=>(openBlock(),createBlock(unref(_sfc_main$1y),{open:unref(n),"onUpdate:open":c[0]||(c[0]=p=>isRef(n)?n.value=p:null)},{default:withCtx(()=>[createVNode(unref(_sfc_main$1x),null,{default:withCtx(()=>{var p;return[createVNode(unref(_sfc_main$1p),null,{default:withCtx(()=>[createVNode(unref(_sfc_main$1o),null,{default:withCtx(()=>c[1]||(c[1]=[createTextVNode("提交发布任务",-1)])),_:1,__:[1]})]),_:1}),createBaseVNode("div",_hoisted_1$9,[unref(r)?(openBlock(),createElementBlock("div",_hoisted_3$7,[(openBlock(!0),createElementBlock(Fragment,null,renderList((p=unref(r))==null?void 0:p.accounts,w=>(openBlock(),createElementBlock("div",{key:w.uid+w.displayName,class:"border-b py-4 last:border-b-0"},[createBaseVNode("div",_hoisted_4$6,[w.icon?(openBlock(),createElementBlock("img",{key:0,src:w.icon,class:"object-cover h-5 w-5",alt:""},null,8,_hoisted_5$4)):createCommentVNode("",!0),createBaseVNode("span",null,toDisplayString(w.title)+" - "+toDisplayString(w.displayName||w.home),1)]),createBaseVNode("div",{class:normalizeClass(["w-full flex-1 gap-2 overflow-auto pl-7 text-sm",{"text-yellow-600":w.status==="uploading","text-red-600":w.status==="failed","text-green-600":w.status==="done"}])},[w.status==="uploading"?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(w.msg||"发布中"),1)],64)):createCommentVNode("",!0),w.status==="failed"?(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(" 同步失败, 错误内容:"+toDisplayString(w.error),1)],64)):createCommentVNode("",!0),w.status==="done"&&w.editResp?(openBlock(),createElementBlock(Fragment,{key:2},[c[2]||(c[2]=createTextVNode(" 同步成功 ",-1)),w.type!=="wordpress"&&w.editResp?(openBlock(),createElementBlock("a",{key:0,href:w.editResp.draftLink,class:"ml-2 text-blue-500 hover:underline",referrerPolicy:"no-referrer",target:"_blank"},"查看草稿",8,_hoisted_6$4)):createCommentVNode("",!0)],64)):createCommentVNode("",!0)],2)]))),128))])):(openBlock(),createElementBlock("div",_hoisted_2$7," 等待发布.. "))])]}),_:1})]),_:1},8,["open"]))}}),__unplugin_components_13=_export_sfc(_sfc_main$w,[["__scopeId","data-v-95b87059"]]),_hoisted_1$8={class:"w-full flex items-center gap-4"},_hoisted_2$6={class:"w-full flex items-center gap-4"},_hoisted_3$6={class:"w-full flex items-start gap-4"},_hoisted_4$5={class:"w-full flex items-start gap-4"},_hoisted_5$3={class:"flex flex-1 flex-col gap-2"},_hoisted_6$3={class:"flex flex-row items-center gap-4"},_hoisted_7$2={class:"flex items-center gap-2 text-sm"},_hoisted_8$2=["src"],_sfc_main$v=defineComponent({__name:"PostInfo",setup(t){const e=useStore(),{output:o,editor:a}=storeToRefs(e),n=ref(!1),r=ref(!1),s=ref([]),l=ref(!1),u=ref({title:"",desc:"",thumb:"",content:"",markdown:"",accounts:[]}),c=computed(()=>r.value&&u.value.accounts.some(g=>g.checked));async function p(){var h,x,_,b,M;r.value&&s.value.length===0&&await w();let g={thumb:"",title:"",desc:"",content:"",markdown:"",accounts:[]};const f=s.value.filter(L=>!["ipfs"].includes(L.type));try{g={thumb:((h=document.querySelector("#output img"))==null?void 0:h.src)??"",title:((x=[1,2,3,4,5,6].map(L=>document.querySelector(`#output h${L}`)).find(L=>L))==null?void 0:x.textContent)??"",desc:((b=(_=document.querySelector("#output p"))==null?void 0:_.textContent)==null?void 0:b.trim())??"",content:o.value,markdown:((M=a.value)==null?void 0:M.getValue())??"",accounts:f}}catch(L){console.log("error",L)}finally{u.value={...g}}}async function w(){return new Promise(g=>{var f;(f=window.$syncer)==null||f.getAccounts(h=>{s.value=h.map(x=>({...x,checked:!0})),g()})})}function i(){u.value.accounts=u.value.accounts.filter(g=>g.checked),l.value=!0,n.value=!1}function C(g){g||(n.value=!1)}function $(){if(window.$syncer!==void 0){r.value=!0;return}let g=0;const f=setInterval(async()=>{if(window.$syncer!==void 0){r.value=!0,await w(),clearInterval(f);return}g++,g>10&&clearInterval(f)},500)}return onBeforeMount(()=>{$()}),(g,f)=>{const h=_sfc_main$1E,x=_sfc_main$L,_=_sfc_main$1o,b=_sfc_main$1p,M=_sfc_main$1r,L=_sfc_main$1s,D=_sfc_main$1q,k=_sfc_main$1v,N=_sfc_main$1t,A=_sfc_main$1w,j=_sfc_main$1m,ae=_sfc_main$1x,J=_sfc_main$1y,I=__unplugin_components_13;return openBlock(),createElementBlock(Fragment,null,[createVNode(J,{open:unref(n),"onUpdate:open":[f[4]||(f[4]=v=>isRef(n)?n.value=v:null),C]},{default:withCtx(()=>[createVNode(x,null,{default:withCtx(()=>[unref(e).isMobile?createCommentVNode("",!0):(openBlock(),createBlock(h,{key:0,variant:"outline",onClick:p},{default:withCtx(()=>f[6]||(f[6]=[createTextVNode(" 发布 ",-1)])),_:1,__:[6]}))]),_:1}),createVNode(ae,null,{default:withCtx(()=>[createVNode(b,null,{default:withCtx(()=>[createVNode(_,null,{default:withCtx(()=>f[7]||(f[7]=[createTextVNode("发布",-1)])),_:1,__:[7]})]),_:1}),createVNode(D,null,{default:withCtx(()=>[createVNode(unref(Info),{class:"h-4 w-4"}),createVNode(M,null,{default:withCtx(()=>f[8]||(f[8]=[createTextVNode("提示",-1)])),_:1,__:[8]}),createVNode(L,null,{default:withCtx(()=>f[9]||(f[9]=[createTextVNode(" 此功能由第三方浏览器插件支持,本平台不保证安全性及同步准确度。 ",-1)])),_:1,__:[9]})]),_:1}),unref(r)?createCommentVNode("",!0):(openBlock(),createBlock(D,{key:0},{default:withCtx(()=>[createVNode(unref(Info),{class:"h-4 w-4"}),createVNode(M,null,{default:withCtx(()=>f[10]||(f[10]=[createTextVNode("未检测到插件",-1)])),_:1,__:[10]}),createVNode(L,null,{default:withCtx(()=>[f[12]||(f[12]=createTextVNode(" 请安装 ",-1)),createVNode(unref(O),{as:"a",class:"text-blue-500",href:"https://www.wechatsync.com/?utm_source=syncicon#install",target:"_blank"},{default:withCtx(()=>f[11]||(f[11]=[createTextVNode(" 文章同步助手 ",-1)])),_:1,__:[11]}),f[13]||(f[13]=createTextVNode(" 插件 ",-1))]),_:1,__:[12,13]})]),_:1})),createBaseVNode("div",_hoisted_1$8,[createVNode(k,{for:"thumb",class:"w-10 text-end"},{default:withCtx(()=>f[14]||(f[14]=[createTextVNode(" 封面 ",-1)])),_:1,__:[14]}),createVNode(N,{id:"thumb",modelValue:unref(u).thumb,"onUpdate:modelValue":f[0]||(f[0]=v=>unref(u).thumb=v),placeholder:"自动提取第一张图"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_2$6,[createVNode(k,{for:"title",class:"w-10 text-end"},{default:withCtx(()=>f[15]||(f[15]=[createTextVNode(" 标题 ",-1)])),_:1,__:[15]}),createVNode(N,{id:"title",modelValue:unref(u).title,"onUpdate:modelValue":f[1]||(f[1]=v=>unref(u).title=v),placeholder:"自动提取第一个标题"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_3$6,[createVNode(k,{for:"desc",class:"w-10 text-end"},{default:withCtx(()=>f[16]||(f[16]=[createTextVNode(" 描述 ",-1)])),_:1,__:[16]}),createVNode(A,{id:"desc",modelValue:unref(u).desc,"onUpdate:modelValue":f[2]||(f[2]=v=>unref(u).desc=v),placeholder:"自动提取第一个段落"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_4$5,[createVNode(k,{class:"w-10 text-end"},{default:withCtx(()=>f[17]||(f[17]=[createTextVNode(" 账号 ",-1)])),_:1,__:[17]}),createBaseVNode("div",_hoisted_5$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(u).accounts,v=>(openBlock(),createElementBlock("div",{key:v.uid+v.displayName,class:"flex items-center gap-2"},[createBaseVNode("label",_hoisted_6$3,[createVNode(unref(Wv),{checked:v.checked,"onUpdate:checked":H=>v.checked=H,class:"bg-background hover:bg-muted h-[25px] w-[25px] flex appearance-none items-center justify-center border border-gray-200 rounded-[4px] outline-hidden"},{default:withCtx(()=>[createVNode(unref(jv),null,{default:withCtx(()=>[v.checked?(openBlock(),createBlock(unref(Check),{key:0,class:"h-4 w-4"})):createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["checked","onUpdate:checked"]),createBaseVNode("span",_hoisted_7$2,[createBaseVNode("img",{src:v.icon,alt:"",class:"inline-block h-[20px] w-[20px]"},null,8,_hoisted_8$2),createTextVNode(" "+toDisplayString(v.title)+" - "+toDisplayString(v.displayName??v.home),1)])])]))),128))])]),createVNode(j,null,{default:withCtx(()=>[createVNode(h,{variant:"outline",onClick:f[3]||(f[3]=v=>n.value=!1)},{default:withCtx(()=>f[18]||(f[18]=[createTextVNode(" 取 消 ",-1)])),_:1,__:[18]}),createVNode(h,{disabled:!unref(c),onClick:i},{default:withCtx(()=>f[19]||(f[19]=[createTextVNode(" 确 定 ",-1)])),_:1,__:[19]},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(I,{open:unref(l),"onUpdate:open":f[5]||(f[5]=v=>isRef(l)?l.value=v:null),post:unref(u)},null,8,["open","post"])],64)}}}),_sfc_main$u=defineComponent({__name:"Menubar",props:{modelValue:{},defaultValue:{},dir:{},loop:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(Uh),mergeProps(unref(r),{class:unref(cn)("flex h-10 items-center gap-x-1 rounded-md border bg-background p-1",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$7={class:"text-center"},_hoisted_2$5={class:"grid grid-cols-2 my-5 gap-4"},_hoisted_3$5=["src","alt"],_sfc_main$t=defineComponent({__name:"FundDialog",props:{visible:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const o=t,a=e,n=[{name:"yanglbme",imageUrl:"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/support1.jpg",altText:"赞赏二维码 1"},{name:"yangfong",imageUrl:"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/support2.jpg",altText:"赞赏二维码 2"}];function r(s){s||a("close")}return(s,l)=>{const u=_sfc_main$1o,c=_sfc_main$1p,p=_sfc_main$1E,w=_sfc_main$1m,i=_sfc_main$1x,C=_sfc_main$1y;return openBlock(),createBlock(C,{open:o.visible,"onUpdate:open":r},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>l[1]||(l[1]=[createTextVNode("赞赏",-1)])),_:1,__:[1]})]),_:1}),createBaseVNode("div",_hoisted_1$7,[l[2]||(l[2]=createBaseVNode("p",null,"若觉得项目不错,可以通过以下方式支持我们~",-1)),createBaseVNode("div",_hoisted_2$5,[(openBlock(),createElementBlock(Fragment,null,renderList(n,$=>createBaseVNode("div",{key:$.name,class:"text-center"},[createBaseVNode("img",{src:$.imageUrl,alt:$.altText,class:"mx-auto",style:{width:"90%","max-width":"200px","border-radius":"10%"}},null,8,_hoisted_3$5)])),64))])]),createVNode(w,{class:"sm:justify-evenly"},{default:withCtx(()=>[createVNode(p,{onClick:l[0]||(l[0]=$=>a("close"))},{default:withCtx(()=>l[3]||(l[3]=[createTextVNode(" 关闭 ",-1)])),_:1,__:[3]})]),_:1})]),_:1})]),_:1},8,["open"])}}}),_sfc_main$s=defineComponent({__name:"AboutDialog",props:{visible:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const o=t,a=e;function n(l){l||a("close")}const r=[{label:"GitHub 仓库",url:"https://github.com/doocs/md"},{label:"Gitee 仓库",url:"https://gitee.com/doocs/md"},{label:"GitCode 仓库",url:"https://gitcode.com/doocs/md"}];function s(l){window.open(l,"_blank")}return(l,u)=>{const c=_sfc_main$1o,p=_sfc_main$1p,w=_sfc_main$1E,i=_sfc_main$1m,C=_sfc_main$1x,$=_sfc_main$1y;return openBlock(),createBlock($,{open:o.visible,"onUpdate:open":n},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(p,null,{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>u[0]||(u[0]=[createTextVNode("关于",-1)])),_:1,__:[0]})]),_:1}),u[1]||(u[1]=createBaseVNode("div",{class:"text-center"},[createBaseVNode("h3",null,"一款高度简洁的微信 Markdown 编辑器"),createBaseVNode("p",null,"扫码关注公众号 Doocs,原创技术内容第一时间推送!"),createBaseVNode("img",{class:"mx-auto my-5",src:"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png",alt:"Doocs Markdown 编辑器",style:{width:"40%"}})],-1)),createVNode(i,{class:"sm:justify-evenly"},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(r,g=>createVNode(w,{key:g.url,onClick:f=>s(g.url)},{default:withCtx(()=>[createTextVNode(toDisplayString(g.label),1)]),_:2},1032,["onClick"])),64))]),_:1})]),_:1,__:[1]})]),_:1},8,["open"])}}}),_sfc_main$r=defineComponent({__name:"MenubarMenu",props:{value:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(Gh),normalizeProps(guardReactiveProps(e)),{default:withCtx(()=>[renderSlot(o.$slots,"default")]),_:3},16))}}),_sfc_main$q=defineComponent({__name:"MenubarContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:8},align:{default:"start"},alignOffset:{default:-4},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(Yh),null,{default:withCtx(()=>[createVNode(unref(Xh),mergeProps(unref(a),{class:unref(cn)("z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_hoisted_1$6={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$p=defineComponent({__name:"MenubarCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select","update:checked"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(ty),mergeProps(unref(r),{class:unref(cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",o.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$6,[createVNode(unref(ay),null,{default:withCtx(()=>[createVNode(unref(Check),{class:"h-4 w-4"})]),_:1})]),renderSlot(s.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$o=defineComponent({__name:"MenubarTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(qh),mergeProps(unref(a),{class:unref(cn)("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-hidden hover:bg-accent focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$n=defineComponent({__name:"HelpDropdown",setup(t){const e=ref(!1),o=ref(!1);return(a,n)=>{const r=_sfc_main$o,s=_sfc_main$p,l=_sfc_main$q,u=_sfc_main$r,c=_sfc_main$s,p=_sfc_main$t;return openBlock(),createElementBlock(Fragment,null,[createVNode(u,null,{default:withCtx(()=>[createVNode(r,null,{default:withCtx(()=>n[4]||(n[4]=[createTextVNode("帮助",-1)])),_:1,__:[4]}),createVNode(l,{align:"start"},{default:withCtx(()=>[createVNode(s,{onClick:n[0]||(n[0]=w=>e.value=!0)},{default:withCtx(()=>n[5]||(n[5]=[createBaseVNode("span",null,"关于",-1)])),_:1,__:[5]}),createVNode(s,{onClick:n[1]||(n[1]=w=>o.value=!0)},{default:withCtx(()=>n[6]||(n[6]=[createBaseVNode("span",null,"赞赏",-1)])),_:1,__:[6]})]),_:1})]),_:1}),createVNode(c,{visible:unref(e),onClose:n[2]||(n[2]=w=>e.value=!1)},null,8,["visible"]),createVNode(p,{visible:unref(o),onClose:n[3]||(n[3]=w=>o.value=!1)},null,8,["visible"])],64)}}}),_sfc_main$m=defineComponent({__name:"HoverCard",props:{defaultOpen:{type:Boolean},open:{type:Boolean},openDelay:{},closeDelay:{}},emits:["update:open"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(Rh),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_sfc_main$l=defineComponent({__name:"HoverCardContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(Oh),null,{default:withCtx(()=>[createVNode(unref(kh),mergeProps(unref(a),{class:unref(cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$k=defineComponent({__name:"HoverCardTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createBlock(unref(Ah),normalizeProps(guardReactiveProps(e)),{default:withCtx(()=>[renderSlot(o.$slots,"default")]),_:3},16))}}),_sfc_main$j=defineComponent({__name:"MenubarSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(ey),mergeProps({class:unref(cn)("-mx-1 my-1 h-px bg-muted",e.class)},unref(a)),null,16,["class"]))}}),_sfc_main$i=defineComponent({__name:"MenubarSub",props:{defaultOpen:{type:Boolean},open:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const n=Se(t,e);return(r,s)=>(openBlock(),createBlock(unref(sy),normalizeProps(guardReactiveProps(unref(n))),{default:withCtx(()=>[renderSlot(r.$slots,"default")]),_:3},16))}}),_sfc_main$h=defineComponent({__name:"MenubarSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(Yh),null,{default:withCtx(()=>[createVNode(unref(ry),mergeProps(unref(r),{class:unref(cn)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$g=defineComponent({__name:"DropdownMenuShortcut",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn)("ml-auto text-xs tracking-widest opacity-60",e.class))},[renderSlot(o.$slots,"default")],2))}}),_sfc_main$f=defineComponent({__name:"MenubarSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(t){const e=t,o=computed(()=>{const{class:n,...r}=e;return r}),a=Ot(o);return(n,r)=>(openBlock(),createBlock(unref(iy),mergeProps(unref(a),{class:unref(cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",n.inset&&"pl-8",e.class)}),{default:withCtx(()=>[renderSlot(n.$slots,"default"),createVNode(unref(ChevronRight),{class:"ml-auto h-4 w-4"})]),_:3},16,["class"]))}}),_sfc_main$e=defineComponent({__name:"StyleOptionMenu",props:{title:{},options:{},current:{},change:{type:Function}},setup(t){const e=t;function o(a,n){switch(a){case"字体":return{fontFamily:n};case"字号":return{fontSize:n};case"主题色":return{color:n};default:return{}}}return(a,n)=>{const r=_sfc_main$f,s=_sfc_main$g,l=_sfc_main$p,u=_sfc_main$h,c=_sfc_main$i;return openBlock(),createBlock(c,null,{default:withCtx(()=>[createVNode(r,null,{default:withCtx(()=>[n[0]||(n[0]=createBaseVNode("span",{class:"mr-2 h-4 w-4"},null,-1)),createBaseVNode("span",null,toDisplayString(e.title),1)]),_:1,__:[0]}),createVNode(u,{class:"max-h-56 overflow-auto"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(a.options,({label:p,value:w,desc:i})=>(openBlock(),createBlock(l,{key:w,label:p,"model-value":w,class:"w-50",checked:a.current===w,onClick:C=>a.change(w)},{default:withCtx(()=>[createTextVNode(toDisplayString(p)+" ",1),createVNode(s,{style:normalizeStyle(o(a.title,w))},{default:withCtx(()=>[createTextVNode(toDisplayString(i),1)]),_:2},1032,["style"])]),_:2},1032,["label","model-value","checked","onClick"]))),128))]),_:1})]),_:1})}}}),_sfc_main$d=defineComponent({__name:"StyleDropdown",setup(t){const e=useStore(),{toggleShowCssEditor:o}=useDisplayStore(),{theme:a,fontFamily:n,fontSize:r,primaryColor:s,codeBlockTheme:l,legend:u,isMacCodeBlock:c,cssEditor:p}=storeToRefs(e),{resetStyleConfirm:w,themeChanged:i,fontChanged:C,sizeChanged:$,colorChanged:g,codeBlockThemeChanged:f,legendChanged:h,macCodeBlockChanged:x}=e,_=ref(null);function b(){var N;(N=_.value)==null||N.show()}function M(){o(),setTimeout(()=>{p.value.refresh()},50)}const L=useTemplateRef("pickColorsContainer"),D=ref("rgb"),k=ref(["rgb","hex","hsl","hsv"]);return(N,A)=>{const j=_sfc_main$o,ae=_sfc_main$e,J=_sfc_main$j,I=_sfc_main$k,v=_sfc_main$l,H=_sfc_main$m,W=_sfc_main$p,P=_sfc_main$q,oe=_sfc_main$r;return openBlock(),createBlock(oe,null,{default:withCtx(()=>[createVNode(j,null,{default:withCtx(()=>A[1]||(A[1]=[createTextVNode(" 样式 ",-1)])),_:1,__:[1]}),createVNode(P,{class:"w-56",align:"start"},{default:withCtx(()=>[createVNode(ae,{title:"主题",options:unref(themeOptions),current:unref(a),change:unref(i)},null,8,["options","current","change"]),createVNode(J),createVNode(ae,{title:"字体",options:unref(fontFamilyOptions),current:unref(n),change:unref(C)},null,8,["options","current","change"]),createVNode(ae,{title:"字号",options:unref(fontSizeOptions),current:unref(r),change:unref($)},null,8,["options","current","change"]),createVNode(ae,{title:"主题色",options:unref(colorOptions),current:unref(s),change:unref(g)},null,8,["options","current","change"]),createVNode(ae,{title:"代码块主题",options:unref(codeBlockThemeOptions),current:unref(l),change:unref(f)},null,8,["options","current","change"]),createVNode(ae,{title:"图注格式",options:unref(legendOptions),current:unref(u),change:unref(h)},null,8,["options","current","change"]),createVNode(J),createVNode(W,{onClick:withModifiers(b,["self","prevent"])},{default:withCtx(()=>[createVNode(H,{"open-delay":100},{default:withCtx(()=>[createVNode(I,{class:"w-full flex"},{default:withCtx(()=>A[2]||(A[2]=[createTextVNode(" 自定义主题色 ",-1)])),_:1,__:[2]}),createVNode(v,{side:"right",class:"w-min"},{default:withCtx(()=>[createBaseVNode("div",{ref_key:"pickColorsContainer",ref:L},[createVNode(unref(Re),{value:unref(s),"onUpdate:value":A[0]||(A[0]=Q=>isRef(s)?s.value=Q:null),"show-alpha":"",format:unref(D),"format-options":unref(k),theme:unref(e).isDark?"dark":"light","popup-container":unref(L),onChange:unref(e).colorChanged},null,8,["value","format","format-options","theme","popup-container","onChange"])],512)]),_:1})]),_:1})]),_:1}),createVNode(W,{onClick:M},{default:withCtx(()=>A[3]||(A[3]=[createTextVNode(" 自定义 CSS ",-1)])),_:1,__:[3]}),createVNode(J),createVNode(W,{checked:unref(c),onClick:unref(x)},{default:withCtx(()=>A[4]||(A[4]=[createTextVNode(" Mac 代码块 ",-1)])),_:1,__:[4]},8,["checked","onClick"]),createVNode(J),createVNode(W,{divided:"",onClick:unref(w)},{default:withCtx(()=>A[5]||(A[5]=[createTextVNode(" 重置 ",-1)])),_:1,__:[5]},8,["onClick"])]),_:1})]),_:1})}}}),_sfc_main$c=defineComponent({__name:"MenubarItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const o=t,a=e,n=computed(()=>{const{class:s,...l}=o;return l}),r=Se(n,a);return(s,l)=>(openBlock(),createBlock(unref(Jh),mergeProps(unref(r),{class:unref(cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",s.inset&&"pl-8",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$b=defineComponent({__name:"EditDropdown",setup(t){const{toggleShowInsertFormDialog:e,toggleShowUploadImgDialog:o,toggleShowInsertMpCardDialog:a}=useDisplayStore(),{copyToClipboard:n,pasteFromClipboard:r,undo:s,redo:l}=useStore();return(u,c)=>{const p=_sfc_main$o,w=_sfc_main$c,i=_sfc_main$j,C=_sfc_main$q,$=_sfc_main$r;return openBlock(),createBlock($,null,{default:withCtx(()=>[createVNode(p,null,{default:withCtx(()=>c[7]||(c[7]=[createTextVNode(" 编辑 ",-1)])),_:1,__:[7]}),createVNode(C,{align:"start"},{default:withCtx(()=>[createVNode(w,{onClick:c[0]||(c[0]=g=>unref(s)())},{default:withCtx(()=>[createVNode(unref(Undo2),{class:"mr-2 h-4 w-4"}),c[8]||(c[8]=createTextVNode(" 撤销 ",-1))]),_:1,__:[8]}),createVNode(w,{onClick:c[1]||(c[1]=g=>unref(l)())},{default:withCtx(()=>[createVNode(unref(Redo2),{class:"mr-2 h-4 w-4"}),c[9]||(c[9]=createTextVNode(" 重做 ",-1))]),_:1,__:[9]}),createVNode(i),createVNode(w,{onClick:c[2]||(c[2]=g=>unref(o)())},{default:withCtx(()=>[createVNode(unref(CloudUpload),{class:"mr-2 h-4 w-4"}),c[10]||(c[10]=createTextVNode(" 上传图片 ",-1))]),_:1,__:[10]}),createVNode(w,{onClick:c[3]||(c[3]=g=>unref(e)())},{default:withCtx(()=>[createVNode(unref(Table),{class:"mr-2 h-4 w-4"}),c[11]||(c[11]=createTextVNode(" 插入表格 ",-1))]),_:1,__:[11]}),createVNode(w,{onClick:c[4]||(c[4]=g=>unref(a)())},{default:withCtx(()=>[createVNode(unref(ContactRound),{class:"mr-2 h-4 w-4"}),c[12]||(c[12]=createTextVNode(" 插入公众号名片 ",-1))]),_:1,__:[12]}),createVNode(i),createVNode(w,{onClick:c[5]||(c[5]=g=>unref(n)())},{default:withCtx(()=>[createVNode(unref(Copy),{class:"mr-2 h-4 w-4"}),c[13]||(c[13]=createTextVNode(" 复制 ",-1))]),_:1,__:[13]}),createVNode(w,{onClick:c[6]||(c[6]=g=>unref(r)())},{default:withCtx(()=>[createVNode(unref(ClipboardPaste),{class:"mr-2 h-4 w-4"}),c[14]||(c[14]=createTextVNode(" 粘贴 ",-1))]),_:1,__:[14]})]),_:1})]),_:1})}}}),_sfc_main$a=defineComponent({__name:"MenubarShortcut",props:{class:{}},setup(t){const e=t;return(o,a)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn)("ml-auto text-xs tracking-widest text-muted-foreground",e.class))},[renderSlot(o.$slots,"default")],2))}}),_hoisted_1$5={class:"grid grid-cols-2 my-5 h-96 gap-4 text-center"},_hoisted_2$4={class:"flex flex-col overflow-hidden"},_hoisted_3$4={key:0,class:"space-y-2 overflow-auto"},_hoisted_4$4=["id","onUpdate:modelValue"],_hoisted_5$2=["for"],_hoisted_6$2={key:1},_hoisted_7$1={class:"flex flex-col overflow-hidden"},_hoisted_8$1={class:"relative bg-white p-2 dark:bg-gray-900"},_hoisted_9$1={class:"w-full overflow-auto border rounded-md bg-gray-50 p-2 dark:bg-gray-800"},_hoisted_10={class:"text-left text-sm text-gray-500 dark:text-gray-400"},_hoisted_11={class:"col-span-2 flex justify-end"},_hoisted_12={class:"grid grid-cols-2 my-5 h-96 gap-4 text-center"},_hoisted_13={class:"overflow-auto"},_hoisted_14={class:"sticky top-0 z-10 bg-white p-2 dark:bg-gray-900"},_hoisted_15={key:0,class:"m-4 flex flex-col items-center justify-center border-2 rounded-lg border-dashed"},_hoisted_16={for:"json-import-input",class:"h-64 w-full flex flex-col cursor-pointer items-center justify-center rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800"},_hoisted_17={key:1,class:"mt-4 border rounded-md bg-gray-50 p-2 dark:bg-gray-800"},_hoisted_18={class:"text-left text-sm text-gray-500 dark:text-gray-400"},_hoisted_19={class:"overflow-auto"},_hoisted_20={key:0},_hoisted_21={class:"space-y-2"},_hoisted_22=["id","onUpdate:modelValue"],_hoisted_23=["for"],_hoisted_24={key:1,class:"h-32 flex items-center justify-center text-gray-500 dark:text-gray-400"},_hoisted_25={class:"col-span-2 flex justify-end"},_hoisted_26={class:"max-h-[70vh] overflow-hidden"},_hoisted_27={class:"h-full overflow-auto border rounded-md bg-gray-50 p-4 dark:bg-gray-800"},_hoisted_28={class:"break-all text-left text-sm text-gray-500 dark:text-gray-400"},_sfc_main$9=defineComponent({__name:"EditorStateDialog",props:{visible:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const o=t,a=e;watch(()=>o.visible,D=>{D&&u()});function n(D){D||a("close")}const r=ref("import"),s=ref([{value:"import",label:"导入配置"},{value:"export",label:"导出配置"}]),l=ref({data:{},selected:{}});async function u(){try{const D=getAllStoreStates();l.value={data:D,selected:Object.keys(D).reduce((k,N)=>(k[N]=!0,k),{})}}catch{}}const c=computed(()=>l.value.data?Object.keys(l.value.data).reduce((D,k)=>(l.value.selected[k]&&(D[k]=l.value.data[k]),D),{}):{}),p=ref({data:{},selected:{}}),w=ref(null),i=computed(()=>p.value.data?Object.keys(p.value.data).reduce((D,k)=>(p.value.selected[k]&&(D[k]=p.value.data[k]),D),{}):{});function C(){const D=Object.keys(l.value.data).reduce((k,N)=>(l.value.selected[N]&&(k[N]=l.value.data[N]),k),{});downloadFile(JSON.stringify(D,null,2),"exported_config.json","application/json"),toast.success("配置文件导出成功"),a("close")}const $=ref(!1),g=computed(()=>r.value==="export"?c.value:r.value==="import"?i.value:{});function f(D){copyPlain(D),toast.success("复制成功")}const h=ref(null);function x(){var D;(D=h.value)==null||D.click()}function _(D){var j;const k=D.target;if(!((j=k.files)!=null&&j.length))return;const N=k.files[0],A=new FileReader;A.onload=ae=>{var J;try{const I=(J=ae.target)==null?void 0:J.result,v=JSON.parse(I);if(typeof v!="object"||Array.isArray(v)){toast.error("导入的文件格式不正确");return}const H=Object.keys(l.value.data).concat(Object.keys(p.value.data)),W=Object.keys(v).reduce((P,oe)=>(H.includes(oe)&&(P[oe]=v[oe]),P),{});if(Object.keys(W).length===0){toast.error("导入的文件无可应用项目配置");return}w.value=v,p.value={data:v,selected:Object.keys(v).reduce((P,oe)=>(P[oe]=!0,P),{})},toast.success("配置文件导入成功")}catch{toast.error("文件解析失败,请检查JSON格式")}},A.readAsText(N),k.value=""}const b=useStore(),M=useDisplayStore();function L(){i.value&&(Object.keys(p.value.selected).forEach(D=>{var k;p.value.selected[D]&&((k=p.value.data)==null?void 0:k[D])!==void 0&&(D in b?b[D]=p.value.data[D]:D in M&&(M[D]=p.value.data[D]))}),toast.success("配置应用成功,请刷新页面查看效果"),a("close"))}return(D,k)=>{const N=_sfc_main$1o,A=_sfc_main$$,j=_sfc_main$1p,ae=_sfc_main$12,J=_sfc_main$13,I=_sfc_main$1E,v=_sfc_main$1c,H=_sfc_main$1f,W=_sfc_main$1x,P=_sfc_main$1y,oe=_sfc_main$1m;return openBlock(),createElementBlock(Fragment,null,[createVNode(P,{open:o.visible,"onUpdate:open":n},{default:withCtx(()=>[createVNode(W,{class:"max-w-2/3"},{default:withCtx(()=>[createVNode(j,null,{default:withCtx(()=>[createVNode(N,null,{default:withCtx(()=>k[5]||(k[5]=[createTextVNode("导入/导出项目配置",-1)])),_:1,__:[5]}),createVNode(A,null,{default:withCtx(()=>k[6]||(k[6]=[createTextVNode(" 导入的配置将覆盖当前项目的配置,请谨慎操作。 ",-1)])),_:1,__:[6]})]),_:1}),createVNode(H,{modelValue:unref(r),"onUpdate:modelValue":k[2]||(k[2]=Q=>isRef(r)?r.value=Q:null),class:"w-full"},{default:withCtx(()=>[createVNode(J,null,{default:withCtx(()=>[createVNode(ae,{value:"import"},{default:withCtx(()=>k[7]||(k[7]=[createTextVNode(" 导入配置 ",-1)])),_:1,__:[7]}),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(s).filter(Q=>Q.value!=="import"),Q=>(openBlock(),createBlock(ae,{key:Q.value,value:Q.value},{default:withCtx(()=>[createTextVNode(toDisplayString(Q.label),1)]),_:2},1032,["value"]))),128))]),_:1}),createVNode(v,{value:"export"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$5,[createBaseVNode("div",_hoisted_2$4,[k[9]||(k[9]=createBaseVNode("p",{class:"bg-white p-2 dark:bg-gray-900"}," 请选择需要导出的配置 ",-1)),unref(l).data?(openBlock(),createElementBlock("ul",_hoisted_3$4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(l).data,(Q,le)=>(openBlock(),createElementBlock("li",{key:le,class:"space-x-2 flex items-center"},[withDirectives(createBaseVNode("input",{id:`export-${le}`,"onUpdate:modelValue":R=>unref(l).selected[le]=R,type:"checkbox",class:"h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"},null,8,_hoisted_4$4),[[vModelCheckbox,unref(l).selected[le]]]),createBaseVNode("label",{for:`export-${le}`,class:"text-sm text-gray-700 dark:text-gray-300"},toDisplayString(unref(storeLabels)[le]||le),9,_hoisted_5$2)]))),128))])):(openBlock(),createElementBlock("div",_hoisted_6$2,k[8]||(k[8]=[createBaseVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," 加载中... ",-1)])))]),createBaseVNode("div",_hoisted_7$1,[createBaseVNode("p",_hoisted_8$1,[k[10]||(k[10]=createBaseVNode("span",null,"当前 JSON 预览",-1)),createVNode(unref(Expand),{class:"absolute right-2 top-2 cursor-pointer p-1 text-gray-500 dark:text-gray-400",onClick:k[0]||(k[0]=Q=>$.value=!0)})]),createBaseVNode("div",_hoisted_9$1,[createBaseVNode("pre",_hoisted_10,toDisplayString(JSON.stringify(unref(c),null,2)),1)])]),createBaseVNode("div",_hoisted_11,[createVNode(I,{type:"primary",disabled:Object.values(unref(l).selected).every(Q=>!Q),onClick:C},{default:withCtx(()=>k[11]||(k[11]=[createTextVNode(" 导出选中配置 ",-1)])),_:1,__:[11]},8,["disabled"])])])]),_:1}),createVNode(v,{value:"import"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_12,[createBaseVNode("div",_hoisted_13,[createBaseVNode("p",_hoisted_14,[k[12]||(k[12]=createBaseVNode("span",null,"导入 JSON 配置文件",-1)),createVNode(unref(Expand),{class:"absolute right-2 top-2 cursor-pointer p-1 text-gray-500 dark:text-gray-400",onClick:k[1]||(k[1]=Q=>$.value=!0)})]),unref(w)?(openBlock(),createElementBlock("div",_hoisted_17,[createBaseVNode("pre",_hoisted_18,toDisplayString(JSON.stringify(unref(i),null,2)),1)])):(openBlock(),createElementBlock("div",_hoisted_15,[createBaseVNode("input",{id:"json-import-input",ref_key:"fileInputRef",ref:h,type:"file",accept:".json",class:"hidden",onChange:_},null,544),createBaseVNode("label",_hoisted_16,[createVNode(unref(CloudUpload),{class:"mb-2 size-16 text-gray-500 dark:text-gray-400"}),k[13]||(k[13]=createBaseVNode("span",{class:"text-sm text-gray-500 dark:text-gray-400"}," 点击或拖拽 JSON 文件到此处 ",-1)),k[14]||(k[14]=createBaseVNode("span",{class:"mt-1 text-xs text-gray-400 dark:text-gray-500"}," 支持格式: .json ",-1))])]))]),createBaseVNode("div",_hoisted_19,[k[15]||(k[15]=createBaseVNode("p",{class:"sticky top-0 z-10 bg-white p-2 dark:bg-gray-900"}," 选择要导入的配置项 ",-1)),unref(w)?(openBlock(),createElementBlock("div",_hoisted_20,[createBaseVNode("ul",_hoisted_21,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(p).data,(Q,le)=>(openBlock(),createElementBlock("li",{key:le,class:"space-x-2 flex items-center"},[withDirectives(createBaseVNode("input",{id:`import-${le}`,"onUpdate:modelValue":R=>unref(p).selected[le]=R,type:"checkbox",class:"h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"},null,8,_hoisted_22),[[vModelCheckbox,unref(p).selected[le]]]),createBaseVNode("label",{for:`import-${le}`,class:"text-sm text-gray-700 dark:text-gray-300"},toDisplayString(unref(storeLabels)[le]||le),9,_hoisted_23)]))),128))])])):(openBlock(),createElementBlock("div",_hoisted_24," 请先导入JSON文件 "))]),createBaseVNode("div",_hoisted_25,[createBaseVNode("input",{id:"json-import-input",ref_key:"fileInputRef",ref:h,type:"file",accept:".json",class:"hidden",onChange:_},null,544),createVNode(I,{variant:"ghost",class:"mr-2",onClick:x},{default:withCtx(()=>k[16]||(k[16]=[createTextVNode(" 重新导入 ",-1)])),_:1,__:[16]}),createVNode(I,{disabled:Object.values(unref(p).selected).every(Q=>!Q),onClick:L},{default:withCtx(()=>k[17]||(k[17]=[createTextVNode(" 应用选中配置 ",-1)])),_:1,__:[17]},8,["disabled"])])])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["open"]),createVNode(P,{open:unref($),"onUpdate:open":k[4]||(k[4]=Q=>$.value=Q)},{default:withCtx(()=>[createVNode(W,{class:"max-h-[90vh] max-w-[90vw] overflow-auto"},{default:withCtx(()=>[createVNode(j,null,{default:withCtx(()=>[createVNode(N,null,{default:withCtx(()=>k[18]||(k[18]=[createTextVNode("JSON 全屏预览",-1)])),_:1,__:[18]}),createVNode(A,null,{default:withCtx(()=>k[19]||(k[19]=[createTextVNode(" 当前配置的完整 JSON 数据 ",-1)])),_:1,__:[19]})]),_:1}),createBaseVNode("div",_hoisted_26,[createBaseVNode("div",_hoisted_27,[createBaseVNode("pre",_hoisted_28,toDisplayString(JSON.stringify(unref(g),null,2)),1)])]),createVNode(oe,null,{default:withCtx(()=>[createVNode(I,{variant:"outline",onClick:k[3]||(k[3]=Q=>f(JSON.stringify(unref(g),null,2)))},{default:withCtx(()=>k[20]||(k[20]=[createTextVNode(" 复制 JSON 到剪贴板 ",-1)])),_:1,__:[20]})]),_:1})]),_:1})]),_:1},8,["open"])],64)}}}),_sfc_main$8=defineComponent({__name:"FileDropdown",setup(t){const e=useStore(),{isDark:o,isEditOnLeft:a}=storeToRefs(e),{exportEditorContent2HTML:n,exportEditorContent2PureHTML:r,exportEditorContent2MD:s,downloadAsCardImage:l,exportEditorContent2PDF:u}=e,c=ref(!1),p=useImportMarkdownContent();return(w,i)=>{const C=_sfc_main$o,$=_sfc_main$c,g=_sfc_main$j,f=_sfc_main$p,h=_sfc_main$q,x=_sfc_main$r,_=_sfc_main$9;return openBlock(),createElementBlock(Fragment,null,[createVNode(x,null,{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>i[10]||(i[10]=[createTextVNode(" 文件 ",-1)])),_:1,__:[10]}),createVNode(h,{align:"start"},{default:withCtx(()=>[createVNode($,{onClick:i[0]||(i[0]=b=>unref(p)())},{default:withCtx(()=>[createVNode(unref(Upload),{class:"mr-2 size-4"}),i[11]||(i[11]=createTextVNode(" 导入 .md ",-1))]),_:1,__:[11]}),createVNode($,{onClick:i[1]||(i[1]=b=>unref(s)())},{default:withCtx(()=>[createVNode(unref(Download),{class:"mr-2 size-4"}),i[12]||(i[12]=createTextVNode(" 导出 .md ",-1))]),_:1,__:[12]}),createVNode($,{onClick:i[2]||(i[2]=b=>unref(n)())},{default:withCtx(()=>[createVNode(unref(FileCode),{class:"mr-2 size-4"}),i[13]||(i[13]=createTextVNode(" 导出 .html ",-1))]),_:1,__:[13]}),createVNode($,{onClick:i[3]||(i[3]=b=>unref(r)())},{default:withCtx(()=>[createVNode(unref(FileCode),{class:"mr-2 size-4"}),i[14]||(i[14]=createTextVNode(" 导出 .html(无样式) ",-1))]),_:1,__:[14]}),createVNode($,{onClick:i[4]||(i[4]=b=>unref(u)())},{default:withCtx(()=>[createVNode(unref(FileText),{class:"mr-2 size-4"}),i[15]||(i[15]=createTextVNode(" 导出 .pdf ",-1))]),_:1,__:[15]}),createVNode($,{onClick:i[5]||(i[5]=b=>unref(l)())},{default:withCtx(()=>[createVNode(unref(Download),{class:"mr-2 size-4"}),i[16]||(i[16]=createTextVNode(" 导出 .png ",-1))]),_:1,__:[16]}),createVNode(g),createVNode($,{onClick:i[6]||(i[6]=b=>c.value=!0)},{default:withCtx(()=>[createVNode(unref(FileCog),{class:"mr-2 size-4"}),i[17]||(i[17]=createTextVNode(" 导入/导出项目配置 ",-1))]),_:1,__:[17]}),createVNode(g),createVNode(f,{checked:unref(o),"onUpdate:checked":i[7]||(i[7]=b=>isRef(o)?o.value=b:null)},{default:withCtx(()=>i[18]||(i[18]=[createTextVNode(" 深色模式 ",-1)])),_:1,__:[18]},8,["checked"]),createVNode(g),createVNode(f,{checked:unref(a),"onUpdate:checked":i[8]||(i[8]=b=>isRef(a)?a.value=b:null)},{default:withCtx(()=>i[19]||(i[19]=[createTextVNode(" 左侧编辑 ",-1)])),_:1,__:[19]},8,["checked"])]),_:1})]),_:1}),createVNode(_,{visible:unref(c),onClose:i[9]||(i[9]=b=>c.value=!1)},null,8,["visible"])],64)}}}),_hoisted_1$4={class:"header-container h-15 flex flex-wrap items-center justify-between px-5"},_hoisted_2$3={class:"space-x-2 hidden sm:flex"},_hoisted_3$3={class:"space-x-2 flex flex-wrap"},_hoisted_4$3={class:"bg-background space-x-1 text-background-foreground mx-2 flex items-center border rounded-md"},_sfc_main$7=defineComponent({__name:"index",emits:["startCopy","endCopy"],setup(t,{emit:e}){const o=e,a=useStore(),{isCiteStatus:n,isCountStatus:r,output:s,primaryColor:l,isOpenPostSlider:u,editor:c}=storeToRefs(a),{editorRefresh:p,citeStatusChanged:w,countStatusChanged:i,formatContent:C}=a;function $(_){c.value.options.extraKeys[_](c.value)}const g=[{label:"加粗",kbd:[ctrlSign,"B"],cmd:`${ctrlKey}-B`},{label:"斜体",kbd:[ctrlSign,"I"],cmd:`${ctrlKey}-I`},{label:"删除线",kbd:[ctrlSign,"D"],cmd:`${ctrlKey}-D`},{label:"超链接",kbd:[ctrlSign,"K"],cmd:`${ctrlKey}-K`},{label:"行内代码",kbd:[ctrlSign,"E"],cmd:`${ctrlKey}-E`},{label:"标题",kbd:[ctrlSign,"H"],cmd:`${ctrlKey}-H`},{label:"无序列表",kbd:[ctrlSign,"U"],cmd:`${ctrlKey}-U`},{label:"有序列表",kbd:[ctrlSign,"O"],cmd:`${ctrlKey}-O`},{label:"格式化",kbd:[altSign,shiftSign,"F"],cmd:"formatContent"}],f=useStorage(addPrefix("copyMode"),"txt"),{copy:h}=useClipboard({legacy:!0});async function x(){var _;if(f.value==="md"){const b=((_=c.value)==null?void 0:_.getValue())||"";await h(b),toast.success("已复制 Markdown 源码到剪贴板。");return}o("startCopy"),setTimeout(()=>{nextTick(async()=>{await processClipboardContent(l.value);const b=document.getElementById("output");b.focus(),window.getSelection().removeAllRanges();const M=b.innerHTML;if(f.value==="txt")try{const L=b.textContent||"",D=new ClipboardItem({"text/html":new Blob([M],{type:"text/html"}),"text/plain":new Blob([L],{type:"text/plain"})});await navigator.clipboard.write([D])}catch(L){console.warn("Clipboard API 失败,回退到传统方式:",L),toast.error("复制失败,请联系开发者。")}b.innerHTML=s.value,f.value==="html"?await h(M):f.value==="html-and-style"&&await h(a.editorContent2HTML()),toast.success(f.value==="html"?"已复制 HTML 源码,请进行下一步操作。":"已复制渲染后的内容到剪贴板,可直接到公众号后台粘贴。"),window.dispatchEvent(new CustomEvent("copyToMp",{detail:{content:s.value}})),p(),o("endCopy")})},350)}return(_,b)=>{const M=_sfc_main$8,L=_sfc_main$o,D=_sfc_main$a,k=_sfc_main$p,N=_sfc_main$j,A=_sfc_main$q,j=_sfc_main$r,ae=_sfc_main$b,J=_sfc_main$d,I=_sfc_main$n,v=_sfc_main$u,H=_sfc_main$1E,W=_sfc_main$G,P=_sfc_main$C,oe=_sfc_main$y,Q=_sfc_main$A,le=_sfc_main$E,R=_sfc_main$F,K=_sfc_main$v;return openBlock(),createElementBlock("header",_hoisted_1$4,[createBaseVNode("div",_hoisted_2$3,[createVNode(v,{class:"menubar border-0"},{default:withCtx(()=>[createVNode(M),createVNode(j,null,{default:withCtx(()=>[createVNode(L,null,{default:withCtx(()=>b[6]||(b[6]=[createTextVNode(" 格式",-1)])),_:1,__:[6]}),createVNode(A,{class:"w-60",align:"start"},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(g,({label:te,kbd:F,cmd:E})=>createVNode(k,{key:te,onClick:z=>E==="formatContent"?unref(C)():$(E)},{default:withCtx(()=>[createTextVNode(toDisplayString(te)+" ",1),createVNode(D,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(F,z=>(openBlock(),createElementBlock("kbd",{key:z,class:"mx-1 bg-gray-2 dark:bg-stone-9"},toDisplayString(z),1))),128))]),_:2},1024)]),_:2},1032,["onClick"])),64)),createVNode(N),createVNode(k,{checked:unref(n),onClick:b[0]||(b[0]=te=>unref(w)())},{default:withCtx(()=>b[7]||(b[7]=[createTextVNode(" 微信外链转底部引用 ",-1)])),_:1,__:[7]},8,["checked"]),createVNode(N),createVNode(k,{checked:unref(r),onClick:b[1]||(b[1]=te=>unref(i)())},{default:withCtx(()=>b[8]||(b[8]=[createTextVNode(" 统计字数和阅读时间 ",-1)])),_:1,__:[8]},8,["checked"])]),_:1})]),_:1}),createVNode(ae),createVNode(J),createVNode(I)]),_:1})]),createBaseVNode("div",_hoisted_3$3,[createVNode(H,{variant:"outline",size:"icon",onClick:b[2]||(b[2]=te=>u.value=!unref(u))},{default:withCtx(()=>[withDirectives(createVNode(unref(PanelLeftOpen),{class:"size-4"},null,512),[[vShow,!unref(u)]]),withDirectives(createVNode(unref(PanelLeftClose),{class:"size-4"},null,512),[[vShow,unref(u)]])]),_:1}),createBaseVNode("div",_hoisted_4$3,[createVNode(H,{variant:"ghost",class:"shadow-none",onClick:x},{default:withCtx(()=>b[9]||(b[9]=[createTextVNode(" 复制 ",-1)])),_:1,__:[9]}),createVNode(W,{orientation:"vertical",class:"h-5"}),createVNode(R,{modelValue:unref(f),"onUpdate:modelValue":b[4]||(b[4]=te=>isRef(f)?f.value=te:null)},{default:withCtx(()=>[createVNode(P,{"as-child":""},{default:withCtx(()=>[createVNode(H,{variant:"ghost",class:"px-2 shadow-none"},{default:withCtx(()=>[createVNode(unref(ChevronDown),{class:"text-secondary-foreground h-4 w-4"})]),_:1})]),_:1}),createVNode(le,{align:"end","align-offset":-5,class:"w-[200px]"},{default:withCtx(()=>[createVNode(Q,{modelValue:unref(f),"onUpdate:modelValue":b[3]||(b[3]=te=>isRef(f)?f.value=te:null)},{default:withCtx(()=>[createVNode(oe,{value:"txt"},{default:withCtx(()=>b[10]||(b[10]=[createTextVNode(" 公众号格式 ",-1)])),_:1,__:[10]}),createVNode(oe,{value:"html"},{default:withCtx(()=>b[11]||(b[11]=[createTextVNode(" HTML 格式 ",-1)])),_:1,__:[11]}),createVNode(oe,{value:"html-and-style"},{default:withCtx(()=>b[12]||(b[12]=[createTextVNode(" HTML 格式(兼容样式) ",-1)])),_:1,__:[12]}),createVNode(oe,{value:"md"},{default:withCtx(()=>b[13]||(b[13]=[createTextVNode(" MD 格式 ",-1)])),_:1,__:[13]})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])]),createVNode(K,{class:"hidden sm:inline-flex"}),createVNode(H,{variant:"outline",size:"icon",onClick:b[5]||(b[5]=te=>unref(a).isOpenRightSlider=!unref(a).isOpenRightSlider)},{default:withCtx(()=>[createVNode(unref(Settings),{class:"size-4"})]),_:1})])])}}}),__unplugin_components_0=_export_sfc(_sfc_main$7,[["__scopeId","data-v-602c5327"]]),_sfc_main$6=defineComponent({__name:"AIPolishButton",props:{position:{}},emits:["click","close"],setup(t,{expose:e,emit:o}){const a=o,n=ref(!1);function r(){n.value=!0}function s(){n.value=!1}return e({visible:n,show:r,close:s}),(l,u)=>(openBlock(),createBlock(Transition,{name:"fade-scale"},{default:withCtx(()=>[withDirectives(createBaseVNode("button",{"aria-label":"AI 工具箱",class:"bg-primary absolute z-50 flex cursor-pointer items-center justify-center rounded-full p-2 text-white shadow-lg transition active:scale-95 hover:scale-105 dark:bg-gray-700 dark:text-white dark:ring-2 dark:ring-white/30",style:normalizeStyle({left:`${l.position.left}px`,top:`${l.position.top}px`}),onClick:u[0]||(u[0]=c=>a("click"))},[createVNode(unref(Bot),{class:"h-4 w-4"})],4),[[vShow,unref(n)]])]),_:1}))}}),AIPolishButton=_export_sfc(_sfc_main$6,[["__scopeId","data-v-7028d894"]]),_hoisted_1$3={class:"flex items-center gap-2"},_hoisted_2$2={key:1,class:"custom-scroll space-y-3 flex-1 overflow-y-auto px-4 pb-2 pt-3 sm:px-6"},_hoisted_3$2={class:"border-border custom-scroll bg-muted/20 text-muted-foreground max-h-32 overflow-y-auto whitespace-pre-line border rounded px-3 py-2 text-sm"},_hoisted_4$2={key:0},_hoisted_5$1={class:"custom-scroll border-border max-h-24 min-h-[40px] flex flex-wrap gap-2 overflow-y-auto border rounded px-2 py-1"},_hoisted_6$1=["onClick"],_hoisted_7={key:1,class:"min-h-[24px] flex items-center text-[12px] text-red-500"},_hoisted_8={key:2},_hoisted_9={class:"border-border flex justify-end gap-2 border-t px-6 pb-3 pt-2"},_sfc_main$5=defineComponent({__name:"AIPolishPopover",props:{position:{},selectedText:{},isDragging:{type:Boolean},isMobile:{type:Boolean}},emits:["closeBtn","recalcPos","startDrag"],setup(t,{expose:e,emit:o}){const a=t,n=o,r=ref(!1),s=ref(!1),l=ref(""),u=ref(!1),c=ref(null),p=ref([]),w=ref(!1),i=ref("optimize"),C=ref(""),$=ref(""),g=useStore(),f=ref(null),h=useAIConfigStore(),{apiKey:x,endpoint:_,model:b,temperature:M,maxToken:L,type:D}=storeToRefs(h),k=[{value:"optimize",label:"优化文本",defaultPrompt:"请优化文本,使其更通顺易读。"},{value:"summarize",label:"文章总结",defaultPrompt:"请对文本进行摘要,输出主要观点和结论。"},{value:"spellcheck",label:"错别字纠正",defaultPrompt:"请找出并纠正文本中的错别字、标点和语法错误。"},{value:"translate-zh",label:"翻译为中文",defaultPrompt:"请将文本翻译为地道的中文。"},{value:"translate-en",label:"翻译为英文",defaultPrompt:"请将文本翻译为自然流畅的英文。"},{value:"custom",label:"自定义",defaultPrompt:""}];watch(l,async()=>{var W;n("recalcPos"),await nextTick(),(W=f.value)==null||W.scrollTo({top:f.value.scrollHeight})}),watch(i,W=>{W!=="custom"&&(p.value=[])}),watch(()=>a.selectedText,W=>{s.value&&(C.value=W,j())});function N(W){const P=W.target,oe=P.value.trim();oe&&!p.value.includes(oe)&&p.value.push(oe),P.value="",n("recalcPos")}function A(W){p.value.splice(W,1)}function j(){var W;l.value="",u.value=!1,w.value=!1,$.value="",(W=c.value)==null||W.abort(),c.value=null}async function ae(){var F,E,z;const W=C.value.trim();if(!W||u.value)return;j(),u.value=!0,c.value=new AbortController;const P="你是一名专业的多语言文本助手,请根据用户的指令处理下列内容。在输出时,不要输出任何额外的信息,只输出处理后的文本。",oe=k.find(q=>q.value===i.value),Q=[];oe.defaultPrompt&&Q.push(oe.defaultPrompt),p.value.length&&Q.push(`请同时满足以下要求:${p.value.join("、")}。`),Q.length||Q.push("请根据最佳实践优化文本。");const le=Q.join(" "),R=[{role:"system",content:P},{role:"user",content:`${le}
574
+
575
+ 待处理文本:
576
+ ${W}`}],K={model:b.value,messages:R,temperature:M.value,max_tokens:L.value,stream:!0},te={"Content-Type":"application/json"};x.value&&D.value!=="default"&&(te.Authorization=`Bearer ${x.value}`);try{const q=new URL(_.value);q.pathname.endsWith("/chat/completions")||(q.pathname=q.pathname.replace(/\/?$/,"/chat/completions"));const ne=await window.fetch(q.toString(),{method:"POST",headers:te,body:JSON.stringify(K),signal:c.value.signal});if(!ne.ok||!ne.body)throw new Error(`响应错误:${ne.status}`);const ee=ne.body.getReader(),ie=new TextDecoder("utf-8");let U="";for(;;){const{value:G,done:re}=await ee.read();if(re)break;U+=ie.decode(G,{stream:!0});const de=U.split(`
577
+ `);U=de.pop()||"";for(const fe of de)if(!(!fe.trim()||fe.trim()==="data: [DONE]"))try{const me=(z=(E=(F=JSON.parse(fe.replace(/^data: /,"")).choices)==null?void 0:F[0])==null?void 0:E.delta)==null?void 0:z.content;me!=null&&me.trim()&&(l.value+=me,w.value=!0)}catch{}}}catch(q){q.name==="AbortError"?console.log("Request aborted by user."):(console.error("请求失败:",q),$.value=q.message||"请求失败")}finally{u.value=!1}}function J(){u.value&&c.value&&(c.value.abort(),u.value=!1)}function I(){const W=toRaw(g.editor),P=W.getCursor("start");W.replaceSelection(l.value);const oe=W.getCursor("end");W.setSelection(P,oe),W.focus(),C.value=l.value,j()}function v(){if(n("closeBtn"),!a.selectedText.trim()){toast.error("请选择需要处理的内容");return}s.value=!0,C.value=a.selectedText,n("recalcPos")}function H(){s.value=!1,p.value=[],i.value="optimize",j()}return e({visible:s,runAIAction:ae,replaceText:I,show:v,close:H,stopAI:J}),(W,P)=>{const oe=__unplugin_components_0$2;return openBlock(),createBlock(Transition,{name:"fade-scale"},{default:withCtx(()=>[unref(s)?(openBlock(),createElementBlock("div",{key:0,class:"bg-card border-border text-card-foreground fixed left-1/2 top-1/2 z-50 max-h-[90dvh] w-[90vw] flex flex-col overflow-hidden border rounded-xl shadow-2xl sm:w-[460px] -translate-x-1/2 -translate-y-1/2 sm:translate-x-0 sm:translate-y-0",style:normalizeStyle(a.isMobile?{}:{left:`${W.position.left}px`,top:`${W.position.top}px`,transformOrigin:"top left"})},[createBaseVNode("div",{class:"border-border popover-header flex select-none items-center justify-between border-b px-4 pb-2 pt-3 sm:cursor-move sm:px-6",onMousedown:P[1]||(P[1]=Q=>!a.isMobile&&n("startDrag",Q))},[createBaseVNode("div",_hoisted_1$3,[P[4]||(P[4]=createBaseVNode("span",{class:"text-lg font-bold"},"AI 工具箱",-1)),createVNode(unref(_sfc_main$1E),{variant:"ghost",size:"icon","aria-label":"配置",onClick:P[0]||(P[0]=Q=>r.value=!unref(r))},{default:withCtx(()=>[createVNode(unref(Settings),{class:"h-4 w-4"})]),_:1})]),createVNode(unref(_sfc_main$1E),{variant:"ghost",size:"icon","aria-label":"关闭",onClick:H},{default:withCtx(()=>[createVNode(unref(X),{class:"h-3 w-3"})]),_:1})],32),unref(r)?(openBlock(),createBlock(oe,{key:0,class:"border-border mb-4 w-full border rounded-md p-4",onSaved:P[2]||(P[2]=()=>r.value=!1)})):(openBlock(),createElementBlock("section",_hoisted_2$2,[createBaseVNode("div",null,[P[5]||(P[5]=createBaseVNode("div",{class:"mb-1 text-sm font-semibold"}," 选择操作 ",-1)),createVNode(unref(_sfc_main$1b),{modelValue:unref(i),"onUpdate:modelValue":P[3]||(P[3]=Q=>isRef(i)?i.value=Q:null)},{default:withCtx(()=>[createVNode(unref(_sfc_main$16),{class:"w-full"},{default:withCtx(()=>[createVNode(unref(_sfc_main$15),{placeholder:"请选择要执行的操作"})]),_:1}),createVNode(unref(_sfc_main$14),null,{default:withCtx(()=>[createVNode(unref(_sfc_main$1a),null,{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(k,Q=>createVNode(unref(_sfc_main$19),{key:Q.value,value:Q.value},{default:withCtx(()=>[createTextVNode(toDisplayString(Q.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),createBaseVNode("div",null,[P[6]||(P[6]=createBaseVNode("div",{class:"mb-1 text-sm font-semibold"}," 原文 ",-1)),createBaseVNode("div",_hoisted_3$2,toDisplayString(unref(C)),1)]),unref(i)==="custom"?(openBlock(),createElementBlock("div",_hoisted_4$2,[P[7]||(P[7]=createBaseVNode("div",{class:"mb-1 text-sm font-semibold"}," 自定义提示词(可选) ",-1)),createBaseVNode("div",_hoisted_5$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(p),(Q,le)=>(openBlock(),createElementBlock("div",{key:le,class:"text-muted-foreground bg-muted flex items-center gap-1 rounded-full px-2 py-1 text-sm"},[createBaseVNode("span",null,toDisplayString(Q),1),createBaseVNode("button",{class:"hover:bg-muted/60 h-4 w-4 flex items-center justify-center rounded-full",onClick:R=>A(le)},[createVNode(unref(X),{class:"h-3 w-3"})],8,_hoisted_6$1)]))),128)),createBaseVNode("input",{class:"min-w-[100px] flex-1 bg-transparent py-1 text-sm focus:outline-hidden",placeholder:"输入提示词后按回车",onKeydown:withKeys(N,["enter"])},null,32)])])):createCommentVNode("",!0),unref($)?(openBlock(),createElementBlock("div",_hoisted_7,toDisplayString(unref($)),1)):createCommentVNode("",!0),unref(l)?(openBlock(),createElementBlock("div",_hoisted_8,[P[8]||(P[8]=createBaseVNode("div",{class:"mb-1 text-sm font-semibold"}," 处理结果 ",-1)),createBaseVNode("div",{ref_key:"resultContainer",ref:f,class:"custom-scroll border-border bg-background max-h-40 min-h-[60px] overflow-y-auto whitespace-pre-line border rounded px-3 py-2 text-sm"},toDisplayString(unref(l)),513)])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_9,[unref(u)?(openBlock(),createBlock(unref(_sfc_main$1E),{key:0,variant:"secondary",onClick:J},{default:withCtx(()=>[createVNode(unref(Pause),{class:"mr-1 h-4 w-4"}),P[9]||(P[9]=createTextVNode(" 终止 ",-1))]),_:1,__:[9]})):createCommentVNode("",!0),unref(w)&&!unref(u)?(openBlock(),createBlock(unref(_sfc_main$1E),{key:1,variant:"default",onClick:I},{default:withCtx(()=>P[10]||(P[10]=[createTextVNode(" 接受 ",-1)])),_:1,__:[10]})):createCommentVNode("",!0),unref(u)?createCommentVNode("",!0):(openBlock(),createBlock(unref(_sfc_main$1E),{key:2,variant:"outline",disabled:!unref(w)&&!!unref(l),onClick:ae},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(w)?"重试":"AI 处理"),1)]),_:1},8,["disabled"]))])]))],4)):createCommentVNode("",!0)]),_:1})}}}),AIPolishPopover=_export_sfc(_sfc_main$5,[["__scopeId","data-v-4bd1f8c1"]]);function useAIPolish(){const t=ref(),e=ref(),o=ref(""),a=reactive({top:0,left:0}),n=ref(!1),r=reactive({x:0,y:0,left:0,top:0}),s=10;function l(){var g,f;(f=(g=t.value)==null?void 0:g.close)==null||f.call(g)}function u(){var g,f;l(),(f=(g=e.value)==null?void 0:g.close)==null||f.call(g)}async function c(g,f){var x,_;await nextTick();const h=(_=(x=e.value)==null?void 0:x.$el)==null?void 0:_.getBoundingClientRect();h&&(a.left=Math.min(Math.max(s,g),window.innerWidth-h.width-s),a.top=Math.min(Math.max(s,f),window.innerHeight-h.height-s))}function p(g){g.target.closest(".popover-header")&&(n.value=!0,r.x=g.clientX,r.y=g.clientY,r.left=a.left,r.top=a.top,document.addEventListener("mousemove",w),document.addEventListener("mouseup",i))}function w(g){n.value&&c(r.left+(g.clientX-r.x),r.top+(g.clientY-r.y))}function i(){n.value=!1,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",i)}function C(g){g.on("mousedown",()=>u()),g.getWrapperElement().addEventListener("mouseup",f=>{setTimeout(()=>{var x,_,b;const h=((x=g.getSelection())==null?void 0:x.trim())??"";o.value=h,h?(a.left=f.clientX,a.top=f.clientY,(b=(_=t.value)==null?void 0:_.show)==null||b.call(_)):u()},0)}),g.on("cursorActivity",()=>{var h,x;if(!((h=e.value)!=null&&h.visible))return;const f=((x=g.getSelection())==null?void 0:x.trim())??"";f&&(o.value=f,c(a.left,a.top))}),g.on("changes",()=>l()),g.on("keydown",(f,h)=>{(h.ctrlKey||h.metaKey)&&h.key.toLowerCase()==="a"?setTimeout(()=>{var M,L;const b=(g.getValue()??"").trim();if(b){o.value=b;const D=g.getWrapperElement().getBoundingClientRect();a.left=D.right-50,a.top=D.top+D.height/2,(L=(M=t.value)==null?void 0:M.show)==null||L.call(M)}else u()},0):l()})}watch(o,g=>{var f;g||((f=e.value)!=null&&f.visible?l():u())});function $(){c(a.left,a.top)}return{AIPolishBtnRef:t,AIPolishPopoverRef:e,selectedText:o,position:a,isDragging:n,initPolishEvent:C,startDrag:p,closeBtn:l,closeAll:u,recalcPos:$}}const _hoisted_1$2={key:0,class:"bg-border z-10 h-4 w-3 flex items-center justify-center border rounded-sm"},_sfc_main$4=defineComponent({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},nonce:{},asChild:{type:Boolean},as:{},class:{},withHandle:{type:Boolean}},emits:["dragging"],setup(t,{emit:e}){const o=t,a=e,n=reactiveOmit(o,"class"),r=useForwardPropsEmits(n,a);return(s,l)=>(openBlock(),createBlock(unref(SplitterResizeHandle_default),mergeProps(unref(r),{class:unref(cn)("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",o.class)}),{default:withCtx(()=>[o.withHandle?(openBlock(),createElementBlock("div",_hoisted_1$2,[createVNode(unref(GripVertical),{class:"h-2.5 w-2.5"})])):createCommentVNode("",!0)]),_:1},16,["class"]))}}),_sfc_main$3=defineComponent({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{},class:{}},emits:["layout"],setup(t,{emit:e}){const o=t,a=e,n=reactiveOmit(o,"class"),r=useForwardPropsEmits(n,a);return(s,l)=>(openBlock(),createBlock(unref(SplitterGroup_default),mergeProps(unref(r),{class:unref(cn)("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",o.class)}),{default:withCtx(()=>[renderSlot(s.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$1={class:"flex flex-col gap-0.5"},_hoisted_2$1={class:"flex items-center gap-1"},_hoisted_3$1={class:"w-10 select-none text-center text-xs"},_hoisted_4$1={key:0,class:"flex items-center gap-1"},_sfc_main$2=defineComponent({__name:"SearchTab",props:{editor:{}},setup(t,{expose:e}){const o=t,a=ref(!1),n=ref(""),r=ref(0),s=ref(!1),l=ref(""),u=ref([]),c=computed(()=>u.value.length),p=computed(()=>k()?u.value[r.value]:null);watch(n,()=>{useDebounceFn(()=>{u.value=[],n.value===""?w():(r.value=0,C())},300)()}),watch([r,u],()=>{i()}),watch(a,async()=>{a.value?i():w()});function w(){o.editor.getAllMarks().forEach(A=>A.clear())}function i(){var A;const N=o.editor;w(),u.value.forEach((j,ae)=>{N.markText(j[0],j[1],{className:ae===r.value?"current-match":"search-match"})}),(A=u.value[r.value])!=null&&A[0]&&N.scrollIntoView(u.value[r.value][0])}function C(){const N=o.editor;if(!n.value||!a.value)return;const A=N.getSearchCursor(n.value,void 0,!0);let j=0;const ae=[];for(;A.findNext();)ae.push([A.from(),A.to()]),j++;u.value=ae,j===r.value&&(r.value-=1)}function $(){k()&&(r.value=(r.value+1)%c.value)}function g(){k()&&(r.value=(r.value-1+c.value)%c.value)}function f(){s.value=!s.value}function h(){a.value=!1}function x(N){switch(N.key){case"Enter":$(),N.preventDefault()}}function _(N){switch(N.key){case"Enter":b(),N.preventDefault()}}function b(){if(!k())return;const N=o.editor;p.value&&(N.setSelection(p.value[0],p.value[1]),o.editor.replaceSelection(l.value),C())}function M(){if(!k())return;const N=o.editor;p.value&&(u.value.forEach(A=>{N.setSelection(A[0],A[1]),N.replaceSelection(l.value)}),C())}function L(){useDebounceFn(C,300)()}function D(N){n.value=N,a.value||(a.value=!0)}onMounted(()=>{o.editor.on("changes",L)}),onUnmounted(()=>{o.editor.off("changes",L)});function k(){return c.value>0}return e({showSearchTab:a,searchWord:n,setSearchWord:D,handleEditorChange:L}),(N,A)=>{const j=_sfc_main$1E,ae=_sfc_main$1t;return openBlock(),createBlock(Transition,{name:"slide-down"},{default:withCtx(()=>[unref(a)?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["bg-background absolute right-0 top-0 z-50 min-w-[300px] w-fit flex gap-1 border rounded-lg px-2 py-1 shadow-md transition-all",unref(s)?"items-start":"items-center"])},[createVNode(j,{variant:"ghost",title:"切换替换","aria-label":"切换替换",class:"h-7 w-5 flex items-center justify-center p-0",onClick:f},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(s)?unref(ChevronDown):unref(ChevronRight)),{class:"h-3.5 w-3.5"}))]),_:1}),createBaseVNode("div",_hoisted_1$1,[createBaseVNode("div",_hoisted_2$1,[createVNode(ae,{modelValue:unref(n),"onUpdate:modelValue":A[0]||(A[0]=J=>isRef(n)?n.value=J:null),placeholder:"查找",class:"h-7 w-40 text-sm",onKeydown:x},null,8,["modelValue"]),createBaseVNode("span",_hoisted_3$1,toDisplayString(unref(c)?unref(r)+1:0)+"/"+toDisplayString(unref(c)),1),createVNode(j,{variant:"ghost",size:"xs",title:"上一处","aria-label":"上一处",class:"h-6 w-6 p-0",onClick:g},{default:withCtx(()=>[createVNode(unref(ChevronUp),{class:"h-3 w-3"})]),_:1}),createVNode(j,{variant:"ghost",size:"xs",title:"下一处","aria-label":"下一处",class:"h-6 w-6 p-0",onClick:$},{default:withCtx(()=>[createVNode(unref(ChevronDown),{class:"h-3 w-3"})]),_:1}),createVNode(j,{variant:"ghost",size:"xs",title:"关闭","aria-label":"关闭",class:"h-6 w-6 p-0",onClick:h},{default:withCtx(()=>[createVNode(unref(X),{class:"h-3 w-3"})]),_:1})]),unref(s)?(openBlock(),createElementBlock("div",_hoisted_4$1,[createVNode(ae,{modelValue:unref(l),"onUpdate:modelValue":A[1]||(A[1]=J=>isRef(l)?l.value=J:null),placeholder:"替换",class:"h-7 w-40 text-sm",onKeydown:_},null,8,["modelValue"]),createVNode(j,{variant:"ghost",size:"xs",title:"替换","aria-label":"替换",class:"h-6 w-6 p-0",onClick:b},{default:withCtx(()=>[createVNode(unref(Replace),{class:"h-3 w-3"})]),_:1}),createVNode(j,{variant:"ghost",size:"xs",title:"全部替换","aria-label":"全部替换",class:"h-6 w-6 p-0",onClick:M},{default:withCtx(()=>[createVNode(unref(ReplaceAll),{class:"h-3 w-3"})]),_:1})])):createCommentVNode("",!0)])],2)):createCommentVNode("",!0)]),_:1})}}}),SearchTab=_export_sfc(_sfc_main$2,[["__scopeId","data-v-7e55589d"]]);function toggleFormat(t,{prefix:e,suffix:o,check:a,afterInsertCursorOffset:n=0}){const r=t.getSelection(),s=t.getCursor("from"),l=t.getCursor("to"),u=(a==null?void 0:a(r))??!1;let c,p={...s},w={...l};if(u)c=r.slice(e.length,r.length-o.length),t.replaceSelection(c),w.ch=p.ch+c.length,t.setSelection(p,w);else if(c=`${e}${r}${o}`,t.replaceSelection(c),p={...s},w={line:l.line,ch:l.ch+e.length+o.length},t.setSelection(p,w),n!==0){const{line:i,ch:C}=t.getCursor();t.setCursor({line:i,ch:C+n})}}function applyHeading(t,e){t.operation(()=>{t.listSelections().forEach(a=>{const n=a.from(),r=a.to();for(let s=n.line;s<=r.line;s++){const l=t.getLine(s),u=l.replace(/^#{1,6}\s+/,"").trimStart(),c=`${"#".repeat(e)} ${u}`;t.replaceRange(c,{line:s,ch:0},{line:s,ch:l.length})}})})}function createExtraKeys(t){return{[`${shiftKey}-${altKey}-F`]:function(o){const a=o.getValue();formatDoc(a).then(n=>{o.setValue(n)})},[`${ctrlKey}-Z`]:function(o){o.undo()},[`${ctrlKey}-Y`]:function(o){o.redo()},[`${ctrlKey}-B`]:function(o){toggleFormat(o,{prefix:"**",suffix:"**",check:a=>a.startsWith("**")&&a.endsWith("**")})},[`${ctrlKey}-I`]:function(o){toggleFormat(o,{prefix:"*",suffix:"*",check:a=>a.startsWith("*")&&a.endsWith("*")})},[`${ctrlKey}-D`]:function(o){toggleFormat(o,{prefix:"~~",suffix:"~~",check:a=>a.startsWith("~~")&&a.endsWith("~~")})},[`${ctrlKey}-K`]:function(o){toggleFormat(o,{prefix:"[",suffix:"]()",check:a=>a.startsWith("[")&&a.endsWith("]()"),afterInsertCursorOffset:-1})},[`${ctrlKey}-E`]:function(o){toggleFormat(o,{prefix:"`",suffix:"`",check:a=>a.startsWith("`")&&a.endsWith("`")})},[`${ctrlKey}-1`]:e=>applyHeading(e,1),[`${ctrlKey}-2`]:e=>applyHeading(e,2),[`${ctrlKey}-3`]:e=>applyHeading(e,3),[`${ctrlKey}-4`]:e=>applyHeading(e,4),[`${ctrlKey}-5`]:e=>applyHeading(e,5),[`${ctrlKey}-6`]:e=>applyHeading(e,6),[`${ctrlKey}-U`]:function(o){const n=o.getSelection().split(`
578
+ `),s=n.every(l=>l.trim().startsWith("- "))?n.map(l=>l.replace(/^- +/,"")).join(`
579
+ `):n.map(l=>`- ${l}`).join(`
580
+ `);o.replaceSelection(s)},[`${ctrlKey}-O`]:function(o){const n=o.getSelection().split(`
581
+ `),s=n.every(l=>/^\d+\.\s/.test(l.trim()))?n.map(l=>l.replace(/^\d+\.\s+/,"")).join(`
582
+ `):n.map((l,u)=>`${u+1}. ${l}`).join(`
583
+ `);o.replaceSelection(s)},[`${ctrlKey}-F`]:e=>{t(e)},[`${ctrlKey}-G`]:function(){}}}function getConfig(t,e){if(t){const n=e==="github"?githubConfig:giteeConfig,{username:r,repoList:s,branch:l,accessTokenList:u}=n,c=Math.floor(Math.random()*u.length),p=u[c].replace("doocsmd",""),w=Math.floor(Math.random()*s.length),i=s[w];return{username:r,repo:i,branch:l,accessToken:p}}const o=JSON.parse(localStorage.getItem(`${e}Config`)),a=o.repo.replace(`https://${e}.com/`,"").replace(`http://${e}.com/`,"").replace(`${e}.com/`,"").split("/");return{username:a[0],repo:a[1],branch:o.branch||"master",accessToken:o.accessToken}}function getDir(){const t=new Date,e=t.getFullYear(),o=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0");return`${e}/${o}/${a}`}function getDateFilename(t){const e=new Date().getTime(),o=t.split(".").pop();return`${e}-${v4()}.${o}`}async function ghFileUpload(t,e){var C;const o=localStorage.getItem("imgHost")==="default",{username:a,repo:n,branch:r,accessToken:s}=getConfig(o,"github"),l=getDir(),u=`https://api.github.com/repos/${a}/${n}/contents/${l}/`,c=getDateFilename(e),p=await service({url:u+c,method:"put",headers:{Authorization:`token ${s}`},data:{content:t,branch:r,message:`Upload by ${window.location.href}`}}),w=`raw.githubusercontent.com/${a}/${n}/${r}/`,i=`fastly.jsdelivr.net/gh/${a}/${n}@${r}/`;return p.content=((C=p.data)==null?void 0:C.content)||p.content,o?p.content.download_url.replace(w,i):p.content.download_url}async function giteeUpload(t,e){var w;const o=localStorage.getItem("imgHost")==="default",{username:a,repo:n,branch:r,accessToken:s}=getConfig(o,"gitee"),l=getDir(),u=getDateFilename(e),c=`https://gitee.com/api/v5/repos/${a}/${n}/contents/${l}/${u}`,p=await service({url:c,method:"POST",data:{content:t,branch:r,access_token:s,message:`Upload by ${window.location.href}`}});return p.content=((w=p.data)==null?void 0:w.content)||p.content,encodeURI(p.content.download_url)}function getQiniuToken(t,e,o){const a=JSON.stringify(o),n=base64encode(utf16to8(a)),s=CryptoJS.HmacSHA1(n,e).toString(CryptoJS.enc.Base64);return`${t}:${safe64(s)}:${n}`}async function qiniuUpload(t){const{accessKey:e,secretKey:o,bucket:a,region:n,path:r,domain:s}=JSON.parse(localStorage.getItem("qiniuConfig")),l=getQiniuToken(e,o,{scope:a,deadline:Math.trunc(new Date().getTime()/1e3)+3600}),c=(r?`${r}/`:"")+getDateFilename(t.name),p=upload(t,c,l,{},{region:n});return new Promise((w,i)=>{p.subscribe({next:C=>{console.log(C)},error:C=>{i(C.message)},complete:C=>{w(`${s}/${C.key}`)}})})}async function aliOSSFileUpload(t){const e=getDateFilename(t.name),{region:o,bucket:a,accessKeyId:n,accessKeySecret:r,useSSL:s,cdnHost:l,path:u}=JSON.parse(localStorage.getItem("aliOSSConfig")),c=u?`${u}/${e}`:e,p=s===void 0||s,w=p?"https":"http",i=new OSS({region:o,bucket:a,accessKeyId:n,accessKeySecret:r,secure:p});try{return await i.put(c,t),l?`${l}/${c}`:`${w}://${a}.${o}.aliyuncs.com/${c}`}catch(C){return Promise.reject(C)}}async function txCOSFileUpload(t){const e=getDateFilename(t.name),{secretId:o,secretKey:a,bucket:n,region:r,path:s,cdnHost:l}=JSON.parse(localStorage.getItem("txCOSConfig")),u=new COS({SecretId:o,SecretKey:a});return new Promise((c,p)=>{u.putObject({Bucket:n,Region:r,Key:`${s}/${e}`,Body:t},(w,i)=>{w?p(w):c(l?s===""?`${l}/${e}`:`${l}/${s}/${e}`:`https://${i.Location}`)})})}async function minioFileUpload(t){const e=getDateFilename(t.name),{endpoint:o,port:a,useSSL:n,bucket:r,accessKey:s,secretKey:l}=JSON.parse(localStorage.getItem("minioConfig")),u=new S3Client({endpoint:`${n?"https":"http"}://${o}${a?`:${a}`:""}`,credentials:{accessKeyId:s,secretAccessKey:l},region:"auto",forcePathStyle:!0}),c=new PutObjectCommand({Bucket:r,Key:e,ContentType:t.type}),p=await getSignedUrl(u,c,{expiresIn:300});return await service(p,{method:"PUT",headers:{"Content-Type":t.type},data:t}).catch(w=>{console.log(w)}),`${n?"https":"http"}://${o}${a?`:${a}`:""}/${r}/${e}`}async function getMpToken(t,e,o){const a=localStorage.getItem(`mpToken:${t}`);if(a){const l=JSON.parse(a);if(l.expire&&l.expire>new Date().getTime())return l.access_token}const n={method:"POST",data:{grant_type:"client_credential",appid:t,secret:e}};let r="https://api.weixin.qq.com/cgi-bin/stable_token";o&&(r=`${o}/cgi-bin/stable_token`);const s=await service(r,n);if(s.access_token){const l={...s,expire:new Date().getTime()+s.expires_in*1e3};return localStorage.setItem(`mpToken:${t}`,JSON.stringify(l)),s.access_token}return""}async function mpFileUpload(t){let{appID:e,appsecret:o,proxyOrigin:a}=JSON.parse(localStorage.getItem("mpConfig"));const n=await getMpToken(e,o,a);if(!n)throw new Error("获取 access_token 失败");const r=new FormData;r.append("media",t,t.name);const s={method:"POST",data:r};let l=`https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=${n}&type=image`;const u=t.size/(1024*1024),c=t.type.toLowerCase();u<1&&(c==="image/jpeg"||c==="image/png")&&(l=`https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token=${n}`),a&&(l=l.replace("https://api.weixin.qq.com",a));const p=await service(l,s);if(!p.url)throw new Error("上传失败,未获取到URL");let w=p.url;return a&&window.location.href.startsWith("http")&&(w=`https://wsrv.nl?url=${encodeURIComponent(w)}`),w}async function r2Upload(t){const{accountId:e,accessKey:o,secretKey:a,bucket:n,path:r,domain:s}=JSON.parse(localStorage.getItem("r2Config")),u=(r?`${r}/`:"")+getDateFilename(t.name),c=new S3Client({region:"auto",endpoint:`https://${e}.r2.cloudflarestorage.com`,credentials:{accessKeyId:o,secretAccessKey:a}}),p=await getSignedUrl(c,new PutObjectCommand({Bucket:n,Key:u,ContentType:t.type}),{expiresIn:300});return await service(p,{method:"PUT",headers:{"Content-Type":t.type},data:t}).catch(w=>{console.log(w)}),`${s}/${u}`}async function upyunUpload(t){const{bucket:e,operator:o,password:a,path:n,domain:r}=JSON.parse(localStorage.getItem("upyunConfig")),s=`${n}/${getDateFilename(t.name)}`,l=`/${e}/${s}`,u=await t.arrayBuffer(),c=new Date().toUTCString(),w=["PUT",l,c].join("&"),i=CryptoJS.MD5(a).toString(),C=CryptoJS.HmacSHA1(w,i).toString(CryptoJS.enc.Base64),$=`UPYUN ${o}:${C}`,g=`https://v0.api.upyun.com${l}`,f=await window.fetch(g,{method:"PUT",headers:{Authorization:$,"X-Date":c,"Content-Type":t.type},body:u});if(!f.ok)throw new Error(`上传失败: ${await f.text()}`);return`${r}/${s}`}async function telegramUpload(t){const{token:e,chatId:o}=JSON.parse(localStorage.getItem("telegramConfig")),a=new FormData;a.append("chat_id",o),a.append("photo",t,t.name);const n=await service({url:`https://api.telegram.org/bot${e}/sendPhoto`,method:"POST",data:a});if(!n.ok||!n.result.photo.length)throw new Error("Telegram sendPhoto 失败");const r=n.result.photo[n.result.photo.length-1].file_id,s=await service({url:`https://api.telegram.org/bot${e}/getFile?file_id=${r}`,method:"GET"});if(!s.ok)throw new Error("Telegram getFile 失败");const l=s.result.file_path;return`https://api.telegram.org/file/bot${e}/${l}`}async function cloudinaryUpload(t){const{cloudName:e,apiKey:o,apiSecret:a,uploadPreset:n,folder:r="",domain:s}=JSON.parse(localStorage.getItem("cloudinaryConfig"));if(!e||!o)throw new Error("Cloudinary 配置缺少 cloudName / apiKey");const l=Math.floor(Date.now()/1e3),u=new FormData;if(u.append("file",t),u.append("api_key",o),u.append("timestamp",`${l}`),a){const i=[];r&&i.push(`folder=${r}`),n&&i.push(`upload_preset=${n}`),i.push(`timestamp=${l}`);const C=i.sort().join("&"),$=CryptoJS.SHA1(C+a).toString();u.append("signature",$)}else if(n)u.append("upload_preset",n);else throw new Error("未配置 apiSecret 时必须提供 uploadPreset");r&&u.append("folder",r);const c=`https://api.cloudinary.com/v1_1/${e}/image/upload`,p=await service(c,{method:"POST",data:u}),w=p.secure_url||p.url;if(!w)throw new Error("Cloudinary 返回缺少 url 字段");if(s){const{pathname:i,search:C}=new URL(w);return`${s}${i}${C}`}return w}async function formCustomUpload(content,file){const str=`
584
+ async (CUSTOM_ARG) => {
585
+ ${localStorage.getItem("formCustomConfig")}
586
+ }
587
+ `;return new Promise((resolve,reject)=>{const exportObj={content,file,util:{axios:service,CryptoJS,OSS,COS,Buffer,uuidv4:v4,qiniu,tokenTools,getDir,getDateFilename},okCb:resolve,errCb:reject};eval(str)(exportObj).catch(t=>{console.error(t),reject(t)})})}function fileUpload(t,e){const o=localStorage.getItem("imgHost");switch(o||localStorage.setItem("imgHost","default"),o){case"aliOSS":return aliOSSFileUpload(e);case"minio":return minioFileUpload(e);case"txCOS":return txCOSFileUpload(e);case"qiniu":return qiniuUpload(e);case"gitee":return giteeUpload(t,e.name);case"github":return ghFileUpload(t,e.name);case"mp":return mpFileUpload(e);case"r2":return r2Upload(e);case"upyun":return upyunUpload(e);case"telegram":return telegramUpload(e);case"cloudinary":return cloudinaryUpload(e);case"formCustom":return formCustomUpload(t,e);default:return ghFileUpload(t,e.name)}}const _hoisted_1={class:"container flex flex-col"},_hoisted_2={class:"container-main flex flex-1 flex-col"},_hoisted_3={class:"container-main-section border-radius-10 relative flex flex-1 overflow-hidden border"},_hoisted_4=["innerHTML"],_hoisted_5={key:0,class:"loading-mask"},_hoisted_6={key:0,class:"fixed bottom-16 right-6 z-50 flex flex-col gap-2"},_sfc_main$1=defineComponent({__name:"CodemirrorEditor",setup(t){const e=useStore(),o=useDisplayStore(),{isDark:a,output:n,editor:r}=storeToRefs(e),{editorRefresh:s}=e,{toggleShowUploadImgDialog:l}=o,u=ref(!1),c=ref(!1);function p(){u.value=!0,c.value=!0}function w(){u.value=!1,setTimeout(()=>{c.value=!1},800)}const i=ref(!0);function C(){i.value=!i.value}const{AIPolishBtnRef:$,AIPolishPopoverRef:g,selectedText:f,position:h,isDragging:x,startDrag:_,initPolishEvent:b,recalcPos:M}=useAIPolish(),L=useTemplateRef("previewRef"),D=ref();function k(){const F=q=>{let ne,ee;clearTimeout(D.value),q==="preview"?(ne=L.value,ee=document.querySelector(".CodeMirror-scroll"),r.value.off("scroll",E),D.value=setTimeout(()=>{r.value.on("scroll",E)},300)):(ne=document.querySelector(".CodeMirror-scroll"),ee=L.value,ee.removeEventListener("scroll",z,!1),D.value=setTimeout(()=>{ee.addEventListener("scroll",z,!1)},300));const U=ne.scrollTop/(ne.scrollHeight-ne.offsetHeight)*(ee.scrollHeight-ee.offsetHeight);ee.scrollTo(0,U)};function E(){F("editor")}function z(){F("preview")}L.value&&L.value.addEventListener("scroll",z,!1),r.value&&r.value.on("scroll",E)}onMounted(()=>{setTimeout(()=>{k()},300)});const N=useTemplateRef("searchTabRef");function A(F){const E=F.getSelection().trim();N.value&&(E?N.value.setSearchWord(E):N.value.showSearchTab=!0)}function j(F){var E,z;F.key==="Escape"&&((E=N.value)!=null&&E.showSearchTab)&&(N.value.showSearchTab=!1,F.preventDefault(),(z=r.value)==null||z.focus())}onMounted(()=>{document.addEventListener("keydown",j)});function ae(F){const E=checkImage(F);if(!E.ok)return toast.error(E.msg),!1;const z=localStorage.getItem("imgHost")||"default";localStorage.setItem("imgHost",z);const q=localStorage.getItem(`${z}Config`);return z==="default"||q?!0:(toast.error(`请先配置 ${z} 图床参数`),!1)}function J(F){if(!F){toast.error("上传图片未知异常");return}l(!1);const E=r.value.getCursor(),z=`![](${F})`;toRaw(e.editor).replaceSelection(`
588
+ ${z}
589
+ `,E),toast.success("图片上传成功")}const I=ref(!1);async function v(F,E){try{I.value=!0;const z=await toBase64(F),q=await fileUpload(z,F);E?E(q):J(q)}catch(z){toast.error(z.message)}finally{I.value=!1}}async function H({list:F}){return new Promise(E=>{const{path:z,file:q}=F.find(ee=>ee.path.match(/\.md$/)),ne=new FileReader;ne.readAsText(q,"UTF-8"),ne.onload=ee=>{E({str:ee.target.result,file:q,path:z})}})}async function W(F){const E=[];let z="";try{const q=[F];for(const ne of q){z+=`${ne.name}/`;for await(const[,ee]of ne)ee.kind==="file"?E.push({path:z+ee.name,file:await ee.getFile()}):(E.push({path:`${z+ee.name}/`}),q.push(ee))}}catch(q){console.error(q)}return E}async function P({md:F,list:E}){const z=[...F.str.matchAll(/!\[(.*?)\]\((.*?)\)/g)||[]].filter(ee=>ee),q=F.path.match(/.+?\//)[0];(await Promise.all(z.map(ee=>new Promise(ie=>{let[,,U]=ee;U=U.replace(/^.\//,"");const{file:G}=E.find(re=>re.path===`${q}${U}`)||{};v(G,re=>ie({matchStr:U,url:re}))})))).forEach(ee=>{F.str=F.str.replace(`](./${ee.matchStr})`,`](${ee.url})`).replace(`](${ee.matchStr})`,`](${ee.url})`)}),r.value.setValue(F.str)}const oe=useTemplateRef("codeMirrorWrapper");function Q(){const F=oe.value;F.ondragover=E=>E.preventDefault(),F.ondrop=async E=>{if(E.preventDefault(),!(E.dataTransfer==null||!Array.isArray(E.dataTransfer.items)))for(const z of E.dataTransfer.items.filter(q=>q.kind==="file"))z.getAsFileSystemHandle().then(async q=>{if(q.kind==="directory"){const ne=await W(q),ee=await H({list:ne});P({md:ee,list:ne})}else{const ne=await q.getFile();console.log("file",ne),ae(ne)&&v(ne)}})}}const le=ref(),R=useTemplateRef("editorRef");function K(F){const E=codemirrorExports.fromTextArea(F,{mode:"text/x-markdown",theme:a.value?"darcula":"xq-light",lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,autoCloseBrackets:!0,extraKeys:createExtraKeys(A),undoDepth:200});return E.on("change",z=>{clearTimeout(le.value),le.value=setTimeout(()=>{s();const q=e.posts[e.currentPostIndex],ne=z.getValue();ne!==q.content&&(q.updateDatetime=new Date,q.content=ne)},300)}),E.on("paste",(z,q)=>{var ee;if(!((ee=q.clipboardData)!=null&&ee.items)||I.value)return;const ne=[...q.clipboardData.items].map(ie=>ie.getAsFile()).filter(ie=>ie!=null&&ae(ie));for(const ie of ne)v(ie),q.preventDefault()}),E}onMounted(()=>{const F=R.value;F!=null&&(F.value=e.posts[e.currentPostIndex].content,nextTick(()=>{r.value=K(F),b(r.value),s(),Q()}))}),watch(a,()=>{var E,z;const F=a.value?"darcula":"xq-light";(z=(E=toRaw(r.value))==null?void 0:E.setOption)==null||z.call(E,"theme",F)});const te=ref();return onMounted(()=>{te.value=setInterval(()=>{var z;const F=e.posts[e.currentPostIndex];((z=(F.history||[])[0])==null?void 0:z.content)!==F.content&&(F.history??(F.history=[]),F.history.unshift({content:F.content,datetime:new Date().toLocaleString("zh-CN")}),F.history.length=Math.min(F.history.length,10))},30*1e3)}),onUnmounted(()=>{clearTimeout(te.value),clearTimeout(D.value),clearTimeout(le.value),document.removeEventListener("keydown",j)}),(F,E)=>{var ce,xe;const z=__unplugin_components_0,q=_sfc_main$x,ne=_sfc_main$I,ee=_sfc_main$R,ie=_sfc_main$Y,U=_sfc_main$Z,G=__unplugin_components_6,re=_sfc_main$10,de=_sfc_main$11,fe=_sfc_main$1g,we=_sfc_main$1n,me=_sfc_main$1z,be=_sfc_main$1A,_e=_sfc_main$1B,ve=_sfc_main$1C,he=_sfc_main$1D,pe=_sfc_main$1F,ue=_sfc_main$1G,Y=_sfc_main$1H,V=_sfc_main$1I;return openBlock(),createElementBlock("div",_hoisted_1,[createVNode(z,{onStartCopy:p,onEndCopy:w}),createBaseVNode("main",_hoisted_2,[createBaseVNode("div",_hoisted_3,[createVNode(unref(_sfc_main$3),{direction:"horizontal"},{default:withCtx(()=>[createVNode(unref(SplitterPanel_default),{"default-size":15,"max-size":unref(e).isOpenPostSlider?30:0,"min-size":unref(e).isOpenPostSlider?10:0},{default:withCtx(()=>[createVNode(q)]),_:1},8,["max-size","min-size"]),createVNode(unref(_sfc_main$4)),createVNode(unref(SplitterPanel_default),{class:"flex"},{default:withCtx(()=>[withDirectives(createBaseVNode("div",{ref_key:"codeMirrorWrapper",ref:oe,class:normalizeClass(["codeMirror-wrapper relative flex-1",{"order-1 border-l":!unref(e).isEditOnLeft,"border-r":unref(e).isEditOnLeft}])},[unref(r)?(openBlock(),createBlock(unref(SearchTab),{key:0,ref_key:"searchTabRef",ref:N,editor:unref(r)},null,8,["editor"])):createCommentVNode("",!0),createVNode(ne,{"is-mobile":unref(e).isMobile,"show-editor":unref(i)},null,8,["is-mobile","show-editor"]),createVNode(ee,null,{default:withCtx(()=>[createBaseVNode("textarea",{id:"editor",ref_key:"editorRef",ref:R,type:"textarea",placeholder:"Your markdown text here."},null,512)]),_:1})],2),[[vShow,!unref(e).isMobile||unref(e).isMobile&&unref(i)]]),withDirectives(createBaseVNode("div",{class:normalizeClass(["relative flex-1 overflow-x-hidden transition-width",[unref(e).isOpenRightSlider?"w-0":"w-100"]])},[createBaseVNode("div",{id:"preview",ref_key:"previewRef",ref:L,class:"preview-wrapper w-full p-5"},[createBaseVNode("div",{id:"output-wrapper",class:normalizeClass(["w-full",{output_night:!unref(u)}])},[createBaseVNode("div",{class:normalizeClass(["preview border-x shadow-xl",[unref(e).previewWidth]])},[createBaseVNode("section",{id:"output",class:"w-full",innerHTML:unref(n)},null,8,_hoisted_4),unref(c)?(openBlock(),createElementBlock("div",_hoisted_5,E[2]||(E[2]=[createBaseVNode("div",{class:"loading-mask-box"},[createBaseVNode("div",{class:"loading__img"}),createBaseVNode("span",null,"正在生成")],-1)]))):createCommentVNode("",!0)],2)],2),createVNode(ie,{target:"preview",right:unref(e).isMobile?24:20,bottom:unref(e).isMobile?90:20},null,8,["right","bottom"])],512),createVNode(U)],2),[[vShow,!unref(e).isMobile||unref(e).isMobile&&!unref(i)]]),createVNode(G,{class:"order-2 flex-1"}),createVNode(re,{class:"order-2"})]),_:1})]),_:1})]),unref(e).isMobile?(openBlock(),createElementBlock("div",_hoisted_6,[createBaseVNode("button",{class:"bg-primary flex items-center justify-center rounded-full p-3 text-white shadow-lg transition active:scale-95 hover:scale-105 dark:bg-gray-700 dark:text-white dark:ring-2 dark:ring-white/30","aria-label":"切换编辑/预览",onClick:C},[(openBlock(),createBlock(resolveDynamicComponent(unref(i)?unref(Eye):unref(Pen)),{class:"h-5 w-5"}))])])):createCommentVNode("",!0),unref(e).showAIToolbox?(openBlock(),createBlock(unref(AIPolishButton),{key:1,ref_key:"AIPolishBtnRef",ref:$,position:unref(h),onClick:(ce=unref(g))==null?void 0:ce.show},null,8,["position","onClick"])):createCommentVNode("",!0),unref(e).showAIToolbox?(openBlock(),createBlock(unref(AIPolishPopover),{key:2,ref_key:"AIPolishPopoverRef",ref:g,position:unref(h),"selected-text":unref(f),"is-dragging":unref(x),"is-mobile":unref(e).isMobile,onCloseBtn:(xe=unref($))==null?void 0:xe.close,onRecalcPos:unref(M),onStartDrag:unref(_)},null,8,["position","selected-text","is-dragging","is-mobile","onCloseBtn","onRecalcPos","onStartDrag"])):createCommentVNode("",!0),createVNode(de,{onUploadImage:v}),createVNode(fe),createVNode(we),createVNode(Y,{open:unref(e).isOpenConfirmDialog,"onUpdate:open":E[1]||(E[1]=Ce=>unref(e).isOpenConfirmDialog=Ce)},{default:withCtx(()=>[createVNode(ue,null,{default:withCtx(()=>[createVNode(_e,null,{default:withCtx(()=>[createVNode(me,null,{default:withCtx(()=>E[3]||(E[3]=[createTextVNode("提示",-1)])),_:1,__:[3]}),createVNode(be,null,{default:withCtx(()=>E[4]||(E[4]=[createTextVNode(" 此操作将丢失本地自定义样式,是否继续? ",-1)])),_:1,__:[4]})]),_:1}),createVNode(pe,null,{default:withCtx(()=>[createVNode(ve,null,{default:withCtx(()=>E[5]||(E[5]=[createTextVNode("取消",-1)])),_:1,__:[5]}),createVNode(he,{onClick:E[0]||(E[0]=Ce=>unref(e).resetStyle())},{default:withCtx(()=>E[6]||(E[6]=[createTextVNode(" 确认 ",-1)])),_:1,__:[6]})]),_:1})]),_:1})]),_:1},8,["open"])]),createVNode(V)])}}}),CodemirrorEditor=_export_sfc(_sfc_main$1,[["__scopeId","data-v-fd23dd1f"]]),_sfc_main=defineComponent({__name:"App",setup(t){const e=useStore();return(o,a)=>{const n=__unplugin_components_0$3;return openBlock(),createElementBlock(Fragment,null,[createVNode(n),createVNode(CodemirrorEditor),createVNode(unref(_sfc_main$1J),{"rich-colors":"",position:"top-center",theme:unref(e).isDark?"dark":"light"},null,8,["theme"])],64)}}});class MpCommonProfile extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=this.dataset.nickname||"",o=this.dataset.headimg||"",a=this.dataset.signature||"",n=this.dataset.verify_status||"0";this.shadowRoot.innerHTML=`
590
+ <style>
591
+ :host {
592
+ all: initial;
593
+ -webkit-text-size-adjust: inherit;
594
+
595
+ }
596
+ </style>
597
+ <style>@media (prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BG-0:#111;--weui-BG-1:#1e1e1e;--weui-BG-2:#191919;--weui-BG-3:#202020;--weui-BG-4:#404040;--weui-BG-5:#2c2c2c;--weui-BLUE-100:#10aeff;--weui-BLUE-120:#0c8bcc;--weui-BLUE-170:#04344d;--weui-BLUE-80:#3fbeff;--weui-BLUE-90:#28b6ff;--weui-BLUE-BG-100:#48a6e2;--weui-BLUE-BG-110:#4095cb;--weui-BLUE-BG-130:#32749e;--weui-BLUE-BG-90:#5aafe4;--weui-BRAND-100:#07c160;--weui-BRAND-120:#059a4c;--weui-BRAND-170:#023a1c;--weui-BRAND-80:#38cd7f;--weui-BRAND-90:#20c770;--weui-BRAND-BG-100:#2aae67;--weui-BRAND-BG-110:#259c5c;--weui-BRAND-BG-130:#1d7a48;--weui-BRAND-BG-90:#3eb575;--weui-FG-0:hsla(0,0%,100%,0.8);--weui-FG-0_5:hsla(0,0%,100%,0.6);--weui-FG-1:hsla(0,0%,100%,0.5);--weui-FG-2:hsla(0,0%,100%,0.3);--weui-FG-3:hsla(0,0%,100%,0.1);--weui-FG-4:hsla(0,0%,100%,0.15);--weui-GLYPH-0:hsla(0,0%,100%,0.8);--weui-GLYPH-1:hsla(0,0%,100%,0.5);--weui-GLYPH-2:hsla(0,0%,100%,0.3);--weui-GLYPH-WHITE-0:hsla(0,0%,100%,0.8);--weui-GLYPH-WHITE-1:hsla(0,0%,100%,0.5);--weui-GLYPH-WHITE-2:hsla(0,0%,100%,0.3);--weui-GLYPH-WHITE-3:#fff;--weui-GREEN-100:#74a800;--weui-GREEN-120:#5c8600;--weui-GREEN-170:#233200;--weui-GREEN-80:#8fb933;--weui-GREEN-90:#82b01a;--weui-GREEN-BG-100:#789833;--weui-GREEN-BG-110:#6b882d;--weui-GREEN-BG-130:#65802b;--weui-GREEN-BG-90:#85a247;--weui-INDIGO-100:#1196ff;--weui-INDIGO-120:#0d78cc;--weui-INDIGO-170:#052d4d;--weui-INDIGO-80:#40abff;--weui-INDIGO-90:#28a0ff;--weui-INDIGO-BG-100:#0d78cc;--weui-INDIGO-BG-110:#0b6bb7;--weui-INDIGO-BG-130:#09548f;--weui-INDIGO-BG-90:#2585d1;--weui-LIGHTGREEN-100:#3eb575;--weui-LIGHTGREEN-120:#31905d;--weui-LIGHTGREEN-170:#123522;--weui-LIGHTGREEN-80:#64c390;--weui-LIGHTGREEN-90:#51bc83;--weui-LIGHTGREEN-BG-100:#31905d;--weui-LIGHTGREEN-BG-110:#2c8153;--weui-LIGHTGREEN-BG-130:#226541;--weui-LIGHTGREEN-BG-90:#31905d;--weui-LINK-100:#7d90a9;--weui-LINK-120:#647387;--weui-LINK-170:#252a32;--weui-LINK-80:#97a6ba;--weui-LINK-90:#899ab1;--weui-LINKFINDER-100:#dee9ff;--weui-MATERIAL-ATTACHMENTCOLUMN:rgba(32,32,32,0.93);--weui-MATERIAL-NAVIGATIONBAR:rgba(18,18,18,0.9);--weui-MATERIAL-REGULAR:rgba(37,37,37,0.6);--weui-MATERIAL-THICK:rgba(34,34,34,0.9);--weui-MATERIAL-THIN:rgba(95,95,95,0.4);--weui-MATERIAL-TOOLBAR:rgba(35,35,35,0.93);--weui-ORANGE-100:#c87d2f;--weui-ORANGE-120:#a06425;--weui-ORANGE-170:#3b250e;--weui-ORANGE-80:#d39758;--weui-ORANGE-90:#cd8943;--weui-ORANGE-BG-100:#bb6000;--weui-ORANGE-BG-110:#a85600;--weui-ORANGE-BG-130:#824300;--weui-ORANGE-BG-90:#c1701a;--weui-ORANGERED-100:#ff6146;--weui-OVERLAY:rgba(0,0,0,0.8);--weui-OVERLAY-WHITE:hsla(0,0%,94.9%,0.8);--weui-PURPLE-100:#8183ff;--weui-PURPLE-120:#6768cc;--weui-PURPLE-170:#26274c;--weui-PURPLE-80:#9a9bff;--weui-PURPLE-90:#8d8fff;--weui-PURPLE-BG-100:#6768cc;--weui-PURPLE-BG-110:#5c5db7;--weui-PURPLE-BG-130:#48498f;--weui-PURPLE-BG-90:#7677d1;--weui-RED-100:#fa5151;--weui-RED-120:#c84040;--weui-RED-170:#4b1818;--weui-RED-80:#fb7373;--weui-RED-90:#fa6262;--weui-RED-BG-100:#cf5148;--weui-RED-BG-110:#ba4940;--weui-RED-BG-130:#913832;--weui-RED-BG-90:#d3625a;--weui-SECONDARY-BG:hsla(0,0%,100%,0.1);--weui-SEPARATOR-0:hsla(0,0%,100%,0.05);--weui-SEPARATOR-1:hsla(0,0%,100%,0.15);--weui-STATELAYER-HOVERED:rgba(0,0,0,0.02);--weui-STATELAYER-PRESSED:hsla(0,0%,100%,0.1);--weui-STATELAYER-PRESSEDSTRENGTHENED:hsla(0,0%,100%,0.2);--weui-YELLOW-100:#cc9c00;--weui-YELLOW-120:#a37c00;--weui-YELLOW-170:#3d2f00;--weui-YELLOW-80:#d6af33;--weui-YELLOW-90:#d1a519;--weui-YELLOW-BG-100:#bf9100;--weui-YELLOW-BG-110:#ab8200;--weui-YELLOW-BG-130:#866500;--weui-YELLOW-BG-90:#c59c1a;--weui-FG-HALF:hsla(0,0%,100%,0.6);--weui-RED:#fa5151;--weui-ORANGERED:#ff6146;--weui-ORANGE:#c87d2f;--weui-YELLOW:#cc9c00;--weui-GREEN:#74a800;--weui-LIGHTGREEN:#3eb575;--weui-TEXTGREEN:#259c5c;--weui-BRAND:#07c160;--weui-BLUE:#10aeff;--weui-INDIGO:#1196ff;--weui-PURPLE:#8183ff;--weui-LINK:#7d90a9;--weui-REDORANGE:#ff6146;--weui-TAG-TEXT-BLACK:hsla(0,0%,100%,0.5);--weui-TAG-BACKGROUND-BLACK:hsla(0,0%,100%,0.05);--weui-WHITE:hsla(0,0%,100%,0.8);--weui-FG:#fff;--weui-BG:#000;--weui-FG-5:hsla(0,0%,100%,0.1);--weui-TAG-BACKGROUND-ORANGE:rgba(250,157,59,0.1);--weui-TAG-BACKGROUND-GREEN:rgba(6,174,86,0.1);--weui-TAG-TEXT-RED:rgba(250,81,81,0.6);--weui-TAG-BACKGROUND-RED:rgba(250,81,81,0.1);--weui-TAG-BACKGROUND-BLUE:rgba(16,174,255,0.1);--weui-TAG-TEXT-ORANGE:rgba(250,157,59,0.6);--weui-TAG-TEXT-GREEN:rgba(6,174,86,0.6);--weui-TAG-TEXT-BLUE:rgba(16,174,255,0.6)}}@media (prefers-color-scheme:dark){.wx-root[data-weui-mode=care]:not([data-weui-theme=light]),body[data-weui-mode=care]:not([data-weui-theme=light]){--weui-BG-0:#111;--weui-BG-1:#1e1e1e;--weui-BG-2:#191919;--weui-BG-3:#202020;--weui-BG-4:#404040;--weui-BG-5:#2c2c2c;--weui-BLUE-100:#10aeff;--weui-BLUE-120:#0c8bcc;--weui-BLUE-170:#04344d;--weui-BLUE-80:#3fbeff;--weui-BLUE-90:#28b6ff;--weui-BLUE-BG-100:#48a6e2;--weui-BLUE-BG-110:#4095cb;--weui-BLUE-BG-130:#32749e;--weui-BLUE-BG-90:#5aafe4;--weui-BRAND-100:#07c160;--weui-BRAND-120:#059a4c;--weui-BRAND-170:#023a1c;--weui-BRAND-80:#38cd7f;--weui-BRAND-90:#20c770;--weui-BRAND-BG-100:#2aae67;--weui-BRAND-BG-110:#259c5c;--weui-BRAND-BG-130:#1d7a48;--weui-BRAND-BG-90:#3eb575;--weui-FG-0:hsla(0,0%,100%,0.85);--weui-FG-0_5:hsla(0,0%,100%,0.65);--weui-FG-1:hsla(0,0%,100%,0.55);--weui-FG-2:hsla(0,0%,100%,0.35);--weui-FG-3:hsla(0,0%,100%,0.1);--weui-FG-4:hsla(0,0%,100%,0.15);--weui-GLYPH-0:hsla(0,0%,100%,0.85);--weui-GLYPH-1:hsla(0,0%,100%,0.55);--weui-GLYPH-2:hsla(0,0%,100%,0.35);--weui-GLYPH-WHITE-0:hsla(0,0%,100%,0.85);--weui-GLYPH-WHITE-1:hsla(0,0%,100%,0.55);--weui-GLYPH-WHITE-2:hsla(0,0%,100%,0.35);--weui-GLYPH-WHITE-3:#fff;--weui-GREEN-100:#74a800;--weui-GREEN-120:#5c8600;--weui-GREEN-170:#233200;--weui-GREEN-80:#8fb933;--weui-GREEN-90:#82b01a;--weui-GREEN-BG-100:#789833;--weui-GREEN-BG-110:#6b882d;--weui-GREEN-BG-130:#65802b;--weui-GREEN-BG-90:#85a247;--weui-INDIGO-100:#1196ff;--weui-INDIGO-120:#0d78cc;--weui-INDIGO-170:#052d4d;--weui-INDIGO-80:#40abff;--weui-INDIGO-90:#28a0ff;--weui-INDIGO-BG-100:#0d78cc;--weui-INDIGO-BG-110:#0b6bb7;--weui-INDIGO-BG-130:#09548f;--weui-INDIGO-BG-90:#2585d1;--weui-LIGHTGREEN-100:#3eb575;--weui-LIGHTGREEN-120:#31905d;--weui-LIGHTGREEN-170:#123522;--weui-LIGHTGREEN-80:#64c390;--weui-LIGHTGREEN-90:#51bc83;--weui-LIGHTGREEN-BG-100:#31905d;--weui-LIGHTGREEN-BG-110:#2c8153;--weui-LIGHTGREEN-BG-130:#226541;--weui-LIGHTGREEN-BG-90:#31905d;--weui-LINK-100:#7d90a9;--weui-LINK-120:#647387;--weui-LINK-170:#252a32;--weui-LINK-80:#97a6ba;--weui-LINK-90:#899ab1;--weui-LINKFINDER-100:#dee9ff;--weui-MATERIAL-ATTACHMENTCOLUMN:rgba(32,32,32,0.93);--weui-MATERIAL-NAVIGATIONBAR:rgba(18,18,18,0.9);--weui-MATERIAL-REGULAR:rgba(37,37,37,0.6);--weui-MATERIAL-THICK:rgba(34,34,34,0.9);--weui-MATERIAL-THIN:hsla(0,0%,96.1%,0.4);--weui-MATERIAL-TOOLBAR:rgba(35,35,35,0.93);--weui-ORANGE-100:#c87d2f;--weui-ORANGE-120:#a06425;--weui-ORANGE-170:#3b250e;--weui-ORANGE-80:#d39758;--weui-ORANGE-90:#cd8943;--weui-ORANGE-BG-100:#bb6000;--weui-ORANGE-BG-110:#a85600;--weui-ORANGE-BG-130:#824300;--weui-ORANGE-BG-90:#c1701a;--weui-ORANGERED-100:#ff6146;--weui-OVERLAY:rgba(0,0,0,0.8);--weui-OVERLAY-WHITE:hsla(0,0%,94.9%,0.8);--weui-PURPLE-100:#8183ff;--weui-PURPLE-120:#6768cc;--weui-PURPLE-170:#26274c;--weui-PURPLE-80:#9a9bff;--weui-PURPLE-90:#8d8fff;--weui-PURPLE-BG-100:#6768cc;--weui-PURPLE-BG-110:#5c5db7;--weui-PURPLE-BG-130:#48498f;--weui-PURPLE-BG-90:#7677d1;--weui-RED-100:#fa5151;--weui-RED-120:#c84040;--weui-RED-170:#4b1818;--weui-RED-80:#fb7373;--weui-RED-90:#fa6262;--weui-RED-BG-100:#cf5148;--weui-RED-BG-110:#ba4940;--weui-RED-BG-130:#913832;--weui-RED-BG-90:#d3625a;--weui-SECONDARY-BG:hsla(0,0%,100%,0.15);--weui-SEPARATOR-0:hsla(0,0%,100%,0.05);--weui-SEPARATOR-1:hsla(0,0%,100%,0.15);--weui-STATELAYER-HOVERED:rgba(0,0,0,0.02);--weui-STATELAYER-PRESSED:hsla(0,0%,100%,0.1);--weui-STATELAYER-PRESSEDSTRENGTHENED:hsla(0,0%,100%,0.2);--weui-YELLOW-100:#cc9c00;--weui-YELLOW-120:#a37c00;--weui-YELLOW-170:#3d2f00;--weui-YELLOW-80:#d6af33;--weui-YELLOW-90:#d1a519;--weui-YELLOW-BG-100:#bf9100;--weui-YELLOW-BG-110:#ab8200;--weui-YELLOW-BG-130:#866500;--weui-YELLOW-BG-90:#c59c1a;--weui-FG-HALF:hsla(0,0%,100%,0.65);--weui-RED:#fa5151;--weui-ORANGERED:#ff6146;--weui-ORANGE:#c87d2f;--weui-YELLOW:#cc9c00;--weui-GREEN:#74a800;--weui-LIGHTGREEN:#3eb575;--weui-TEXTGREEN:#259c5c;--weui-BRAND:#07c160;--weui-BLUE:#10aeff;--weui-INDIGO:#1196ff;--weui-PURPLE:#8183ff;--weui-LINK:#7d90a9;--weui-REDORANGE:#ff6146;--weui-TAG-BACKGROUND-BLACK:hsla(0,0%,100%,0.05);--weui-FG:#fff;--weui-WHITE:hsla(0,0%,100%,0.8);--weui-FG-5:hsla(0,0%,100%,0.1);--weui-TAG-BACKGROUND-ORANGE:rgba(250,157,59,0.1);--weui-TAG-BACKGROUND-GREEN:rgba(6,174,86,0.1);--weui-TAG-TEXT-RED:rgba(250,81,81,0.6);--weui-TAG-BACKGROUND-RED:rgba(250,81,81,0.1);--weui-TAG-BACKGROUND-BLUE:rgba(16,174,255,0.1);--weui-TAG-TEXT-ORANGE:rgba(250,157,59,0.6);--weui-BG:#000;--weui-TAG-TEXT-GREEN:rgba(6,174,86,0.6);--weui-TAG-TEXT-BLUE:rgba(16,174,255,0.6);--weui-TAG-TEXT-BLACK:hsla(0,0%,100%,0.5)}}.wx-root,body,page{--weui-BTN-HEIGHT:48;--weui-BTN-HEIGHT-MEDIUM:40;--weui-BTN-HEIGHT-SMALL:32}.wx-root,body{--weui-BTN-ACTIVE-MASK:rgba(0,0,0,0.1)}.wx-root[data-weui-theme=dark],body[data-weui-theme=dark]{--weui-BTN-ACTIVE-MASK:hsla(0,0%,100%,0.1)}@media (prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BTN-ACTIVE-MASK:hsla(0,0%,100%,0.1)}}.wx-root,body{--weui-BTN-DEFAULT-ACTIVE-BG:#e6e6e6}.wx-root[data-weui-theme=dark],body[data-weui-theme=dark]{--weui-BTN-DEFAULT-ACTIVE-BG:hsla(0,0%,100%,0.126)}@media (prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BTN-DEFAULT-ACTIVE-BG:hsla(0,0%,100%,0.126)}}.wx-root,body{--weui-DIALOG-LINE-COLOR:rgba(0,0,0,0.1)}.wx-root[data-weui-theme=dark],body[data-weui-theme=dark]{--weui-DIALOG-LINE-COLOR:hsla(0,0%,100%,0.1)}@media (prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-DIALOG-LINE-COLOR:hsla(0,0%,100%,0.1)}}.weui-flex{display:flex}.weui-flex__item{flex:1}.wx-root,body{--weui-BG-COLOR-ACTIVE:#ececec}.wx-root[data-weui-theme=dark],body[data-weui-theme=dark]{--weui-BG-COLOR-ACTIVE:#373737}@media (prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BG-COLOR-ACTIVE:#373737}}[class*=" weui-icon-"][class*=" weui-icon-"],[class*=" weui-icon-"][class^=weui-icon-],[class^=weui-icon-][class*=" weui-icon-"],[class^=weui-icon-][class^=weui-icon-]{display:inline-block;vertical-align:middle;font-size:10px;width:2.4em;height:2.4em;-webkit-mask-position:50% 50%;mask-position:50% 50%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%;background-color:currentColor}.weui-icon-circle{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='1000' height='1000' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M500 916.667C269.881 916.667 83.333 730.119 83.333 500 83.333 269.881 269.881 83.333 500 83.333c230.119 0 416.667 186.548 416.667 416.667 0 230.119-186.548 416.667-416.667 416.667zm0-50c202.504 0 366.667-164.163 366.667-366.667 0-202.504-164.163-366.667-366.667-366.667-202.504 0-366.667 164.163-366.667 366.667 0 202.504 164.163 366.667 366.667 366.667z' fill-rule='evenodd' fill-opacity='.9'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='1000' height='1000' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M500 916.667C269.881 916.667 83.333 730.119 83.333 500 83.333 269.881 269.881 83.333 500 83.333c230.119 0 416.667 186.548 416.667 416.667 0 230.119-186.548 416.667-416.667 416.667zm0-50c202.504 0 366.667-164.163 366.667-366.667 0-202.504-164.163-366.667-366.667-366.667-202.504 0-366.667 164.163-366.667 366.667 0 202.504 164.163 366.667 366.667 366.667z' fill-rule='evenodd' fill-opacity='.9'/%3E%3C/svg%3E")}.weui-icon-download{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.25 12.04l-1.72-1.72-1.06 1.06 2.828 2.83a1 1 0 001.414-.001l2.828-2.828-1.06-1.061-1.73 1.73V7h-1.5v5.04zm0-5.04V2h1.5v5h6.251c.55 0 .999.446.999.996v13.008a.998.998 0 01-.996.996H4.996A.998.998 0 014 21.004V7.996A1 1 0 014.999 7h6.251z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.25 12.04l-1.72-1.72-1.06 1.06 2.828 2.83a1 1 0 001.414-.001l2.828-2.828-1.06-1.061-1.73 1.73V7h-1.5v5.04zm0-5.04V2h1.5v5h6.251c.55 0 .999.446.999.996v13.008a.998.998 0 01-.996.996H4.996A.998.998 0 014 21.004V7.996A1 1 0 014.999 7h6.251z'/%3E%3C/svg%3E")}.weui-icon-info{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-.75-12v7h1.5v-7h-1.5zM12 9a1 1 0 100-2 1 1 0 000 2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-.75-12v7h1.5v-7h-1.5zM12 9a1 1 0 100-2 1 1 0 000 2z'/%3E%3C/svg%3E")}.weui-icon-safe-success{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpath d='M500.9 4.6C315.5 46.7 180.4 93.1 57.6 132c0 129.3.2 231.7.2 339.7 0 304.2 248.3 471.6 443.1 523.7C695.7 943.3 944 775.9 944 471.7c0-108 .2-210.4.2-339.7C821.4 93.1 686.3 46.7 500.9 4.6zm248.3 349.1l-299.7 295c-2.1 2-5.3 2-7.4-.1L304.4 506.1c-2-2.1-2.3-5.7-.6-8l18.3-24.9c1.7-2.3 5-2.8 7.2-1l112.2 86c2.3 1.8 6 1.7 8.1-.1l274.7-228.9c2.2-1.8 5.7-1.7 7.7.3l17 16.8c2.2 2.1 2.2 5.3.2 7.4z' fill-rule='evenodd' clip-rule='evenodd' fill='%23070202'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpath d='M500.9 4.6C315.5 46.7 180.4 93.1 57.6 132c0 129.3.2 231.7.2 339.7 0 304.2 248.3 471.6 443.1 523.7C695.7 943.3 944 775.9 944 471.7c0-108 .2-210.4.2-339.7C821.4 93.1 686.3 46.7 500.9 4.6zm248.3 349.1l-299.7 295c-2.1 2-5.3 2-7.4-.1L304.4 506.1c-2-2.1-2.3-5.7-.6-8l18.3-24.9c1.7-2.3 5-2.8 7.2-1l112.2 86c2.3 1.8 6 1.7 8.1-.1l274.7-228.9c2.2-1.8 5.7-1.7 7.7.3l17 16.8c2.2 2.1 2.2 5.3.2 7.4z' fill-rule='evenodd' clip-rule='evenodd' fill='%23070202'/%3E%3C/svg%3E")}.weui-icon-safe-warn{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpath d='M500.9 4.5c-185.4 42-320.4 88.4-443.2 127.3 0 129.3.2 231.7.2 339.6 0 304.1 248.2 471.4 443 523.6 194.7-52.2 443-219.5 443-523.6 0-107.9.2-210.3.2-339.6C821.3 92.9 686.2 46.5 500.9 4.5zm-26.1 271.1h52.1c5.8 0 10.3 4.7 10.1 10.4l-11.6 313.8c-.1 2.8-2.5 5.2-5.4 5.2h-38.2c-2.9 0-5.3-2.3-5.4-5.2L464.8 286c-.2-5.8 4.3-10.4 10-10.4zm26.1 448.3c-20.2 0-36.5-16.3-36.5-36.5s16.3-36.5 36.5-36.5 36.5 16.3 36.5 36.5-16.4 36.5-36.5 36.5z' fill-rule='evenodd' clip-rule='evenodd' fill='%23020202'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpath d='M500.9 4.5c-185.4 42-320.4 88.4-443.2 127.3 0 129.3.2 231.7.2 339.6 0 304.1 248.2 471.4 443 523.6 194.7-52.2 443-219.5 443-523.6 0-107.9.2-210.3.2-339.6C821.3 92.9 686.2 46.5 500.9 4.5zm-26.1 271.1h52.1c5.8 0 10.3 4.7 10.1 10.4l-11.6 313.8c-.1 2.8-2.5 5.2-5.4 5.2h-38.2c-2.9 0-5.3-2.3-5.4-5.2L464.8 286c-.2-5.8 4.3-10.4 10-10.4zm26.1 448.3c-20.2 0-36.5-16.3-36.5-36.5s16.3-36.5 36.5-36.5 36.5 16.3 36.5 36.5-16.4 36.5-36.5 36.5z' fill-rule='evenodd' clip-rule='evenodd' fill='%23020202'/%3E%3C/svg%3E")}.weui-icon-success{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1.177-7.86l-2.765-2.767L7 12.431l3.119 3.121a1 1 0 001.414 0l5.952-5.95-1.062-1.062-5.6 5.6z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1.177-7.86l-2.765-2.767L7 12.431l3.119 3.121a1 1 0 001.414 0l5.952-5.95-1.062-1.062-5.6 5.6z'/%3E%3C/svg%3E")}.weui-icon-success-circle{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6zm-1.172-6.242l5.809-5.808.848.849-5.95 5.95a1 1 0 01-1.414 0L7 12.426l.849-.849 2.98 2.98z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6zm-1.172-6.242l5.809-5.808.848.849-5.95 5.95a1 1 0 01-1.414 0L7 12.426l.849-.849 2.98 2.98z'/%3E%3C/svg%3E")}.weui-icon-success-no-circle{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.657 18.435L3 12.778l1.414-1.414 4.95 4.95L20.678 5l1.414 1.414-12.02 12.021a1 1 0 01-1.415 0z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.657 18.435L3 12.778l1.414-1.414 4.95 4.95L20.678 5l1.414 1.414-12.02 12.021a1 1 0 01-1.415 0z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-waiting{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.75 11.38V6h-1.5v6l4.243 4.243 1.06-1.06-3.803-3.804zM12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.75 11.38V6h-1.5v6l4.243 4.243 1.06-1.06-3.803-3.804zM12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-waiting-circle{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.6 11.503l3.891 3.891-.848.849L11.4 12V6h1.2v5.503zM12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.6 11.503l3.891 3.891-.848.849L11.4 12V6h1.2v5.503zM12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6z'/%3E%3C/svg%3E")}.weui-icon-warn{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-.763-15.864l.11 7.596h1.305l.11-7.596h-1.525zm.759 10.967c.512 0 .902-.383.902-.882 0-.5-.39-.882-.902-.882a.878.878 0 00-.896.882c0 .499.396.882.896.882z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-.763-15.864l.11 7.596h1.305l.11-7.596h-1.525zm.759 10.967c.512 0 .902-.383.902-.882 0-.5-.39-.882-.902-.882a.878.878 0 00-.896.882c0 .499.396.882.896.882z'/%3E%3C/svg%3E")}.weui-icon-outlined-warn{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm18.8 0a8.8 8.8 0 11-17.6 0 8.8 8.8 0 0117.6 0zm-8.14-5.569l-.089 7.06H11.43l-.088-7.06h1.318zm-1.495 9.807c0 .469.366.835.835.835a.82.82 0 00.835-.835.817.817 0 00-.835-.835.821.821 0 00-.835.835z' fill='%23000'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm18.8 0a8.8 8.8 0 11-17.6 0 8.8 8.8 0 0117.6 0zm-8.14-5.569l-.089 7.06H11.43l-.088-7.06h1.318zm-1.495 9.807c0 .469.366.835.835.835a.82.82 0 00.835-.835.817.817 0 00-.835-.835.821.821 0 00-.835.835z' fill='%23000'/%3E%3C/svg%3E")}.weui-icon-info-circle{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6zM11.4 10h1.2v7h-1.2v-7zm.6-1a1 1 0 110-2 1 1 0 010 2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6zM11.4 10h1.2v7h-1.2v-7zm.6-1a1 1 0 110-2 1 1 0 010 2z'/%3E%3C/svg%3E")}.weui-icon-cancel{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill-rule='evenodd'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6z' fill-rule='nonzero'/%3E%3Cpath d='M12.849 12l3.11 3.111-.848.849L12 12.849l-3.111 3.11-.849-.848L11.151 12l-3.11-3.111.848-.849L12 11.151l3.111-3.11.849.848L12.849 12z'/%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill-rule='evenodd'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6z' fill-rule='nonzero'/%3E%3Cpath d='M12.849 12l3.11 3.111-.848.849L12 12.849l-3.111 3.11-.849-.848L11.151 12l-3.11-3.111.848-.849L12 11.151l3.111-3.11.849.848L12.849 12z'/%3E%3C/g%3E%3C/svg%3E")}.weui-icon-search{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.31 15.561l4.114 4.115-.848.848-4.123-4.123a7 7 0 11.857-.84zM16.8 11a5.8 5.8 0 10-11.6 0 5.8 5.8 0 0011.6 0z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.31 15.561l4.114 4.115-.848.848-4.123-4.123a7 7 0 11.857-.84zM16.8 11a5.8 5.8 0 10-11.6 0 5.8 5.8 0 0011.6 0z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-clear{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.06 12l3.006-3.005-1.06-1.06L12 10.938 8.995 7.934l-1.06 1.06L10.938 12l-3.005 3.005 1.06 1.06L12 13.062l3.005 3.005 1.06-1.06L13.062 12zM12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.06 12l3.006-3.005-1.06-1.06L12 10.938 8.995 7.934l-1.06 1.06L10.938 12l-3.005 3.005 1.06 1.06L12 13.062l3.005 3.005 1.06-1.06L13.062 12zM12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10z'/%3E%3C/svg%3E")}.weui-icon-back{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm1.999-6.563L10.68 12 14 8.562 12.953 7.5 9.29 11.277a1.045 1.045 0 000 1.446l3.663 3.777L14 15.437z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm1.999-6.563L10.68 12 14 8.562 12.953 7.5 9.29 11.277a1.045 1.045 0 000 1.446l3.663 3.777L14 15.437z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-delete{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.774 6.4l.812 13.648a.8.8 0 00.798.752h7.232a.8.8 0 00.798-.752L17.226 6.4H6.774zm11.655 0l-.817 13.719A2 2 0 0115.616 22H8.384a2 2 0 01-1.996-1.881L5.571 6.4H3.5v-.7a.5.5 0 01.5-.5h16a.5.5 0 01.5.5v.7h-2.071zM14 3a.5.5 0 01.5.5v.7h-5v-.7A.5.5 0 0110 3h4zM9.5 9h1.2l.5 9H10l-.5-9zm3.8 0h1.2l-.5 9h-1.2l.5-9z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.774 6.4l.812 13.648a.8.8 0 00.798.752h7.232a.8.8 0 00.798-.752L17.226 6.4H6.774zm11.655 0l-.817 13.719A2 2 0 0115.616 22H8.384a2 2 0 01-1.996-1.881L5.571 6.4H3.5v-.7a.5.5 0 01.5-.5h16a.5.5 0 01.5.5v.7h-2.071zM14 3a.5.5 0 01.5.5v.7h-5v-.7A.5.5 0 0110 3h4zM9.5 9h1.2l.5 9H10l-.5-9zm3.8 0h1.2l-.5 9h-1.2l.5-9z'/%3E%3C/svg%3E")}.weui-icon-success-no-circle-thin{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.864 16.617l-5.303-5.303-1.061 1.06 5.657 5.657a1 1 0 001.414 0L21.238 6.364l-1.06-1.06L8.864 16.616z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.864 16.617l-5.303-5.303-1.061 1.06 5.657 5.657a1 1 0 001.414 0L21.238 6.364l-1.06-1.06L8.864 16.616z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-arrow{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.454 6.58l1.06-1.06 5.78 5.779a.996.996 0 010 1.413l-5.78 5.779-1.06-1.061 5.425-5.425-5.425-5.424z' fill='%23B2B2B2' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.454 6.58l1.06-1.06 5.78 5.779a.996.996 0 010 1.413l-5.78 5.779-1.06-1.061 5.425-5.425-5.425-5.424z' fill='%23B2B2B2' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-arrow-bold{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg height='24' width='12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.157 12.711L4.5 18.368l-1.414-1.414 4.95-4.95-4.95-4.95L4.5 5.64l5.657 5.657a1 1 0 010 1.414z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg height='24' width='12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.157 12.711L4.5 18.368l-1.414-1.414 4.95-4.95-4.95-4.95L4.5 5.64l5.657 5.657a1 1 0 010 1.414z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-back-arrow{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.343 12l7.071 7.071L9 20.485l-7.778-7.778a1 1 0 010-1.414L9 3.515l1.414 1.414L3.344 12z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.343 12l7.071 7.071L9 20.485l-7.778-7.778a1 1 0 010-1.414L9 3.515l1.414 1.414L3.344 12z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-back-arrow-thin{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 010-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 010-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-close{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.25 10.693L6.057 4.5 5 5.557l6.193 6.193L5 17.943 6.057 19l6.193-6.193L18.443 19l1.057-1.057-6.193-6.193L19.5 5.557 18.443 4.5l-6.193 6.193z' fill='%23000'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.25 10.693L6.057 4.5 5 5.557l6.193 6.193L5 17.943 6.057 19l6.193-6.193L18.443 19l1.057-1.057-6.193-6.193L19.5 5.557 18.443 4.5l-6.193 6.193z' fill='%23000'/%3E%3C/svg%3E")}.weui-icon-close-thin{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.25 10.693L6.057 4.5 5 5.557l6.193 6.193L5 17.943 6.057 19l6.193-6.193L18.443 19l1.057-1.057-6.193-6.193L19.5 5.557 18.443 4.5z' fill-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.25 10.693L6.057 4.5 5 5.557l6.193 6.193L5 17.943 6.057 19l6.193-6.193L18.443 19l1.057-1.057-6.193-6.193L19.5 5.557 18.443 4.5z' fill-rule='evenodd'/%3E%3C/svg%3E")}.weui-icon-back-circle{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6zm1.999-5.363L12.953 16.5 9.29 12.723a1.045 1.045 0 010-1.446L12.953 7.5 14 8.563 10.68 12 14 15.438z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.2a8.8 8.8 0 100-17.6 8.8 8.8 0 000 17.6zm1.999-5.363L12.953 16.5 9.29 12.723a1.045 1.045 0 010-1.446L12.953 7.5 14 8.563 10.68 12 14 15.438z'/%3E%3C/svg%3E")}.weui-icon-success{color:var(--weui-BRAND)}.weui-icon-waiting{color:var(--weui-BLUE)}.weui-icon-warn{color:var(--weui-RED)}.weui-icon-info{color:var(--weui-BLUE)}.weui-icon-success-circle,.weui-icon-success-no-circle,.weui-icon-success-no-circle-thin{color:var(--weui-BRAND)}.weui-icon-waiting-circle{color:var(--weui-BLUE)}.weui-icon-circle{color:var(--weui-FG-2)}.weui-icon-download{color:var(--weui-BRAND)}.weui-icon-info-circle{color:var(--weui-FG-2)}.weui-icon-safe-success{color:var(--weui-BRAND)}.weui-icon-safe-warn{color:var(--weui-YELLOW)}.weui-icon-cancel{color:var(--weui-RED)}.weui-icon-search{color:var(--weui-FG-1)}.weui-icon-clear{color:var(--weui-FG-2)}.weui-icon-clear:active{color:var(--weui-FG-1)}.weui-icon-delete.weui-icon_gallery-delete{color:var(--weui-WHITE)}.weui-icon-arrow-bold.weui-icon-arrow,.weui-icon-arrow-bold.weui-icon-arrow-bold,.weui-icon-arrow-bold.weui-icon-back-arrow,.weui-icon-arrow-bold.weui-icon-back-arrow-thin,.weui-icon-arrow.weui-icon-arrow,.weui-icon-arrow.weui-icon-arrow-bold,.weui-icon-arrow.weui-icon-back-arrow,.weui-icon-arrow.weui-icon-back-arrow-thin,.weui-icon-back-arrow-thin.weui-icon-arrow,.weui-icon-back-arrow-thin.weui-icon-arrow-bold,.weui-icon-back-arrow-thin.weui-icon-back-arrow,.weui-icon-back-arrow-thin.weui-icon-back-arrow-thin,.weui-icon-back-arrow.weui-icon-arrow,.weui-icon-back-arrow.weui-icon-arrow-bold,.weui-icon-back-arrow.weui-icon-back-arrow,.weui-icon-back-arrow.weui-icon-back-arrow-thin{width:1.2em}.weui-icon-arrow,.weui-icon-arrow-bold{color:var(--weui-FG-2)}.weui-icon-back,.weui-icon-back-arrow,.weui-icon-back-arrow-thin,.weui-icon-back-circle{color:var(--weui-FG-0)}.weui-icon_msg.weui-icon_msg{width:6.4em;height:6.4em}.weui-icon_msg.weui-icon_msg.weui-icon-warn{color:var(--weui-RED)}.weui-icon_msg.weui-icon_msg.weui-icon-info-circle{color:var(--weui-BLUE)}.weui-icon_msg-primary.weui-icon_msg-primary{width:6.4em;height:6.4em}.weui-icon_msg-primary.weui-icon_msg-primary.weui-icon-warn{color:var(--weui-YELLOW)}.wx-root,body{--weui-BG-0:#ededed;--weui-BG-1:#f7f7f7;--weui-BG-2:#fff;--weui-BG-3:#f7f7f7;--weui-BG-4:#4c4c4c;--weui-BG-5:#fff;--weui-BLUE-100:#10aeff;--weui-BLUE-120:#3fbeff;--weui-BLUE-170:#b7e6ff;--weui-BLUE-80:#0c8bcc;--weui-BLUE-90:#0e9ce6;--weui-BLUE-BG-100:#48a6e2;--weui-BLUE-BG-110:#5aafe4;--weui-BLUE-BG-130:#7fc0ea;--weui-BLUE-BG-90:#4095cb;--weui-BRAND-100:#07c160;--weui-BRAND-120:#38cd7f;--weui-BRAND-170:#b4ecce;--weui-BRAND-80:#059a4c;--weui-BRAND-90:#06ae56;--weui-BRAND-BG-100:#2aae67;--weui-BRAND-BG-110:#3eb575;--weui-BRAND-BG-130:#69c694;--weui-BRAND-BG-90:#259c5c;--weui-FG-0:rgba(0,0,0,0.9);--weui-FG-0_5:rgba(0,0,0,0.9);--weui-FG-1:rgba(0,0,0,0.55);--weui-FG-2:rgba(0,0,0,0.3);--weui-FG-3:rgba(0,0,0,0.1);--weui-FG-4:rgba(0,0,0,0.15);--weui-GLYPH-0:rgba(0,0,0,0.9);--weui-GLYPH-1:rgba(0,0,0,0.55);--weui-GLYPH-2:rgba(0,0,0,0.3);--weui-GLYPH-WHITE-0:hsla(0,0%,100%,0.8);--weui-GLYPH-WHITE-1:hsla(0,0%,100%,0.5);--weui-GLYPH-WHITE-2:hsla(0,0%,100%,0.3);--weui-GLYPH-WHITE-3:#fff;--weui-GREEN-100:#91d300;--weui-GREEN-120:#a7db33;--weui-GREEN-170:#def1b3;--weui-GREEN-80:#74a800;--weui-GREEN-90:#82bd00;--weui-GREEN-BG-100:#96be40;--weui-GREEN-BG-110:#a0c452;--weui-GREEN-BG-130:#b5d179;--weui-GREEN-BG-90:#86aa39;--weui-INDIGO-100:#1485ee;--weui-INDIGO-120:#439df1;--weui-INDIGO-170:#b8daf9;--weui-INDIGO-80:#106abe;--weui-INDIGO-90:#1277d6;--weui-INDIGO-BG-100:#2b77bf;--weui-INDIGO-BG-110:#3f84c5;--weui-INDIGO-BG-130:#6ba0d2;--weui-INDIGO-BG-90:#266aab;--weui-LIGHTGREEN-100:#95ec69;--weui-LIGHTGREEN-120:#aaef87;--weui-LIGHTGREEN-170:#def9d1;--weui-LIGHTGREEN-80:#77bc54;--weui-LIGHTGREEN-90:#85d35e;--weui-LIGHTGREEN-BG-100:#72cf60;--weui-LIGHTGREEN-BG-110:#80d370;--weui-LIGHTGREEN-BG-130:#9cdd90;--weui-LIGHTGREEN-BG-90:#66b956;--weui-LINK-100:#576b95;--weui-LINK-120:#7888aa;--weui-LINK-170:#ccd2de;--weui-LINK-80:#455577;--weui-LINK-90:#4e6085;--weui-LINKFINDER-100:#002666;--weui-MATERIAL-ATTACHMENTCOLUMN:hsla(0,0%,96.1%,0.95);--weui-MATERIAL-NAVIGATIONBAR:hsla(0,0%,92.9%,0.94);--weui-MATERIAL-REGULAR:hsla(0,0%,96.9%,0.3);--weui-MATERIAL-THICK:hsla(0,0%,96.9%,0.8);--weui-MATERIAL-THIN:hsla(0,0%,100%,0.2);--weui-MATERIAL-TOOLBAR:hsla(0,0%,96.5%,0.82);--weui-ORANGE-100:#fa9d3b;--weui-ORANGE-120:#fbb062;--weui-ORANGE-170:#fde1c3;--weui-ORANGE-80:#c87d2f;--weui-ORANGE-90:#e08c34;--weui-ORANGE-BG-100:#ea7800;--weui-ORANGE-BG-110:#ec8519;--weui-ORANGE-BG-130:#f0a04d;--weui-ORANGE-BG-90:#d26b00;--weui-ORANGERED-100:#ff6146;--weui-OVERLAY:rgba(0,0,0,0.5);--weui-OVERLAY-WHITE:hsla(0,0%,94.9%,0.8);--weui-PURPLE-100:#6467f0;--weui-PURPLE-120:#8385f3;--weui-PURPLE-170:#d0d1fa;--weui-PURPLE-80:#5052c0;--weui-PURPLE-90:#595cd7;--weui-PURPLE-BG-100:#6769ba;--weui-PURPLE-BG-110:#7678c1;--weui-PURPLE-BG-130:#9496ce;--weui-PURPLE-BG-90:#5c5ea7;--weui-RED-100:#fa5151;--weui-RED-120:#fb7373;--weui-RED-170:#fdcaca;--weui-RED-80:#c84040;--weui-RED-90:#e14949;--weui-RED-BG-100:#cf5148;--weui-RED-BG-110:#d3625a;--weui-RED-BG-130:#dd847e;--weui-RED-BG-90:#b94840;--weui-SECONDARY-BG:rgba(0,0,0,0.05);--weui-SEPARATOR-0:rgba(0,0,0,0.1);--weui-SEPARATOR-1:rgba(0,0,0,0.15);--weui-STATELAYER-HOVERED:rgba(0,0,0,0.02);--weui-STATELAYER-PRESSED:rgba(0,0,0,0.1);--weui-STATELAYER-PRESSEDSTRENGTHENED:rgba(0,0,0,0.2);--weui-YELLOW-100:#ffc300;--weui-YELLOW-120:#ffcf33;--weui-YELLOW-170:#ffecb2;--weui-YELLOW-80:#cc9c00;--weui-YELLOW-90:#e6af00;--weui-YELLOW-BG-100:#efb600;--weui-YELLOW-BG-110:#f0bd19;--weui-YELLOW-BG-130:#f3cc4d;--weui-YELLOW-BG-90:#d7a400;--weui-FG-HALF:rgba(0,0,0,0.9);--weui-RED:#fa5151;--weui-ORANGERED:#ff6146;--weui-ORANGE:#fa9d3b;--weui-YELLOW:#ffc300;--weui-GREEN:#91d300;--weui-LIGHTGREEN:#95ec69;--weui-TEXTGREEN:#06ae56;--weui-BRAND:#07c160;--weui-BLUE:#10aeff;--weui-INDIGO:#1485ee;--weui-PURPLE:#6467f0;--weui-LINK:#576b95;--weui-TAG-TEXT-ORANGE:#fa9d3b;--weui-TAG-TEXT-GREEN:#06ae56;--weui-TAG-TEXT-BLUE:#10aeff;--weui-REDORANGE:#ff6146;--weui-TAG-TEXT-BLACK:rgba(0,0,0,0.5);--weui-TAG-BACKGROUND-BLACK:rgba(0,0,0,0.05);--weui-WHITE:#fff;--weui-BG:#fff;--weui-FG:#000;--weui-FG-5:rgba(0,0,0,0.05);--weui-TAG-BACKGROUND-ORANGE:rgba(250,157,59,0.1);--weui-TAG-BACKGROUND-GREEN:rgba(6,174,86,0.1);--weui-TAG-TEXT-RED:rgba(250,81,81,0.6);--weui-TAG-BACKGROUND-RED:rgba(250,81,81,0.1);--weui-TAG-BACKGROUND-BLUE:rgba(16,174,255,0.1)}@media (prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BG-0:#111;--weui-BG-1:#1e1e1e;--weui-BG-2:#191919;--weui-BG-3:#202020;--weui-BG-4:#404040;--weui-BG-5:#2c2c2c;--weui-BLUE-100:#10aeff;--weui-BLUE-120:#0c8bcc;--weui-BLUE-170:#04344d;--weui-BLUE-80:#3fbeff;--weui-BLUE-90:#28b6ff;--weui-BLUE-BG-100:#48a6e2;--weui-BLUE-BG-110:#4095cb;--weui-BLUE-BG-130:#32749e;--weui-BLUE-BG-90:#5aafe4;--weui-BRAND-100:#07c160;--weui-BRAND-120:#059a4c;--weui-BRAND-170:#023a1c;--weui-BRAND-80:#38cd7f;--weui-BRAND-90:#20c770;--weui-BRAND-BG-100:#2aae67;--weui-BRAND-BG-110:#259c5c;--weui-BRAND-BG-130:#1d7a48;--weui-BRAND-BG-90:#3eb575;--weui-FG-0:hsla(0,0%,100%,0.8);--weui-FG-0_5:hsla(0,0%,100%,0.6);--weui-FG-1:hsla(0,0%,100%,0.5);--weui-FG-2:hsla(0,0%,100%,0.3);--weui-FG-3:hsla(0,0%,100%,0.1);--weui-FG-4:hsla(0,0%,100%,0.15);--weui-GLYPH-0:hsla(0,0%,100%,0.8);--weui-GLYPH-1:hsla(0,0%,100%,0.5);--weui-GLYPH-2:hsla(0,0%,100%,0.3);--weui-GLYPH-WHITE-0:hsla(0,0%,100%,0.8);--weui-GLYPH-WHITE-1:hsla(0,0%,100%,0.5);--weui-GLYPH-WHITE-2:hsla(0,0%,100%,0.3);--weui-GLYPH-WHITE-3:#fff;--weui-GREEN-100:#74a800;--weui-GREEN-120:#5c8600;--weui-GREEN-170:#233200;--weui-GREEN-80:#8fb933;--weui-GREEN-90:#82b01a;--weui-GREEN-BG-100:#789833;--weui-GREEN-BG-110:#6b882d;--weui-GREEN-BG-130:#65802b;--weui-GREEN-BG-90:#85a247;--weui-INDIGO-100:#1196ff;--weui-INDIGO-120:#0d78cc;--weui-INDIGO-170:#052d4d;--weui-INDIGO-80:#40abff;--weui-INDIGO-90:#28a0ff;--weui-INDIGO-BG-100:#0d78cc;--weui-INDIGO-BG-110:#0b6bb7;--weui-INDIGO-BG-130:#09548f;--weui-INDIGO-BG-90:#2585d1;--weui-LIGHTGREEN-100:#3eb575;--weui-LIGHTGREEN-120:#31905d;--weui-LIGHTGREEN-170:#123522;--weui-LIGHTGREEN-80:#64c390;--weui-LIGHTGREEN-90:#51bc83;--weui-LIGHTGREEN-BG-100:#31905d;--weui-LIGHTGREEN-BG-110:#2c8153;--weui-LIGHTGREEN-BG-130:#226541;--weui-LIGHTGREEN-BG-90:#31905d;--weui-LINK-100:#7d90a9;--weui-LINK-120:#647387;--weui-LINK-170:#252a32;--weui-LINK-80:#97a6ba;--weui-LINK-90:#899ab1;--weui-LINKFINDER-100:#dee9ff;--weui-MATERIAL-ATTACHMENTCOLUMN:rgba(32,32,32,0.93);--weui-MATERIAL-NAVIGATIONBAR:rgba(18,18,18,0.9);--weui-MATERIAL-REGULAR:rgba(37,37,37,0.6);--weui-MATERIAL-THICK:rgba(34,34,34,0.9);--weui-MATERIAL-THIN:rgba(95,95,95,0.4);--weui-MATERIAL-TOOLBAR:rgba(35,35,35,0.93);--weui-ORANGE-100:#c87d2f;--weui-ORANGE-120:#a06425;--weui-ORANGE-170:#3b250e;--weui-ORANGE-80:#d39758;--weui-ORANGE-90:#cd8943;--weui-ORANGE-BG-100:#bb6000;--weui-ORANGE-BG-110:#a85600;--weui-ORANGE-BG-130:#824300;--weui-ORANGE-BG-90:#c1701a;--weui-ORANGERED-100:#ff6146;--weui-OVERLAY:rgba(0,0,0,0.8);--weui-OVERLAY-WHITE:hsla(0,0%,94.9%,0.8);--weui-PURPLE-100:#8183ff;--weui-PURPLE-120:#6768cc;--weui-PURPLE-170:#26274c;--weui-PURPLE-80:#9a9bff;--weui-PURPLE-90:#8d8fff;--weui-PURPLE-BG-100:#6768cc;--weui-PURPLE-BG-110:#5c5db7;--weui-PURPLE-BG-130:#48498f;--weui-PURPLE-BG-90:#7677d1;--weui-RED-100:#fa5151;--weui-RED-120:#c84040;--weui-RED-170:#4b1818;--weui-RED-80:#fb7373;--weui-RED-90:#fa6262;--weui-RED-BG-100:#cf5148;--weui-RED-BG-110:#ba4940;--weui-RED-BG-130:#913832;--weui-RED-BG-90:#d3625a;--weui-SECONDARY-BG:hsla(0,0%,100%,0.1);--weui-SEPARATOR-0:hsla(0,0%,100%,0.05);--weui-SEPARATOR-1:hsla(0,0%,100%,0.15);--weui-STATELAYER-HOVERED:rgba(0,0,0,0.02);--weui-STATELAYER-PRESSED:hsla(0,0%,100%,0.1);--weui-STATELAYER-PRESSEDSTRENGTHENED:hsla(0,0%,100%,0.2);--weui-YELLOW-100:#cc9c00;--weui-YELLOW-120:#a37c00;--weui-YELLOW-170:#3d2f00;--weui-YELLOW-80:#d6af33;--weui-YELLOW-90:#d1a519;--weui-YELLOW-BG-100:#bf9100;--weui-YELLOW-BG-110:#ab8200;--weui-YELLOW-BG-130:#866500;--weui-YELLOW-BG-90:#c59c1a;--weui-FG-HALF:hsla(0,0%,100%,0.6);--weui-RED:#fa5151;--weui-ORANGERED:#ff6146;--weui-ORANGE:#c87d2f;--weui-YELLOW:#cc9c00;--weui-GREEN:#74a800;--weui-LIGHTGREEN:#3eb575;--weui-TEXTGREEN:#259c5c;--weui-BRAND:#07c160;--weui-BLUE:#10aeff;--weui-INDIGO:#1196ff;--weui-PURPLE:#8183ff;--weui-LINK:#7d90a9;--weui-REDORANGE:#ff6146;--weui-TAG-TEXT-BLACK:hsla(0,0%,100%,0.5);--weui-TAG-BACKGROUND-BLACK:hsla(0,0%,100%,0.05);--weui-WHITE:hsla(0,0%,100%,0.8);--weui-FG:#fff;--weui-BG:#000;--weui-FG-5:hsla(0,0%,100%,0.1);--weui-TAG-BACKGROUND-ORANGE:rgba(250,157,59,0.1);--weui-TAG-BACKGROUND-GREEN:rgba(6,174,86,0.1);--weui-TAG-TEXT-RED:rgba(250,81,81,0.6);--weui-TAG-BACKGROUND-RED:rgba(250,81,81,0.1);--weui-TAG-BACKGROUND-BLUE:rgba(16,174,255,0.1);--weui-TAG-TEXT-ORANGE:rgba(250,157,59,0.6);--weui-TAG-TEXT-GREEN:rgba(6,174,86,0.6);--weui-TAG-TEXT-BLUE:rgba(16,174,255,0.6)}}.wx-root[data-weui-theme=dark],body[data-weui-theme=dark]{--weui-BG-0:#111;--weui-BG-1:#1e1e1e;--weui-BG-2:#191919;--weui-BG-3:#202020;--weui-BG-4:#404040;--weui-BG-5:#2c2c2c;--weui-BLUE-100:#10aeff;--weui-BLUE-120:#0c8bcc;--weui-BLUE-170:#04344d;--weui-BLUE-80:#3fbeff;--weui-BLUE-90:#28b6ff;--weui-BLUE-BG-100:#48a6e2;--weui-BLUE-BG-110:#4095cb;--weui-BLUE-BG-130:#32749e;--weui-BLUE-BG-90:#5aafe4;--weui-BRAND-100:#07c160;--weui-BRAND-120:#059a4c;--weui-BRAND-170:#023a1c;--weui-BRAND-80:#38cd7f;--weui-BRAND-90:#20c770;--weui-BRAND-BG-100:#2aae67;--weui-BRAND-BG-110:#259c5c;--weui-BRAND-BG-130:#1d7a48;--weui-BRAND-BG-90:#3eb575;--weui-FG-0:hsla(0,0%,100%,0.8);--weui-FG-0_5:hsla(0,0%,100%,0.6);--weui-FG-1:hsla(0,0%,100%,0.5);--weui-FG-2:hsla(0,0%,100%,0.3);--weui-FG-3:hsla(0,0%,100%,0.1);--weui-FG-4:hsla(0,0%,100%,0.15);--weui-GLYPH-0:hsla(0,0%,100%,0.8);--weui-GLYPH-1:hsla(0,0%,100%,0.5);--weui-GLYPH-2:hsla(0,0%,100%,0.3);--weui-GLYPH-WHITE-0:hsla(0,0%,100%,0.8);--weui-GLYPH-WHITE-1:hsla(0,0%,100%,0.5);--weui-GLYPH-WHITE-2:hsla(0,0%,100%,0.3);--weui-GLYPH-WHITE-3:#fff;--weui-GREEN-100:#74a800;--weui-GREEN-120:#5c8600;--weui-GREEN-170:#233200;--weui-GREEN-80:#8fb933;--weui-GREEN-90:#82b01a;--weui-GREEN-BG-100:#789833;--weui-GREEN-BG-110:#6b882d;--weui-GREEN-BG-130:#65802b;--weui-GREEN-BG-90:#85a247;--weui-INDIGO-100:#1196ff;--weui-INDIGO-120:#0d78cc;--weui-INDIGO-170:#052d4d;--weui-INDIGO-80:#40abff;--weui-INDIGO-90:#28a0ff;--weui-INDIGO-BG-100:#0d78cc;--weui-INDIGO-BG-110:#0b6bb7;--weui-INDIGO-BG-130:#09548f;--weui-INDIGO-BG-90:#2585d1;--weui-LIGHTGREEN-100:#3eb575;--weui-LIGHTGREEN-120:#31905d;--weui-LIGHTGREEN-170:#123522;--weui-LIGHTGREEN-80:#64c390;--weui-LIGHTGREEN-90:#51bc83;--weui-LIGHTGREEN-BG-100:#31905d;--weui-LIGHTGREEN-BG-110:#2c8153;--weui-LIGHTGREEN-BG-130:#226541;--weui-LIGHTGREEN-BG-90:#31905d;--weui-LINK-100:#7d90a9;--weui-LINK-120:#647387;--weui-LINK-170:#252a32;--weui-LINK-80:#97a6ba;--weui-LINK-90:#899ab1;--weui-LINKFINDER-100:#dee9ff;--weui-MATERIAL-ATTACHMENTCOLUMN:rgba(32,32,32,0.93);--weui-MATERIAL-NAVIGATIONBAR:rgba(18,18,18,0.9);--weui-MATERIAL-REGULAR:rgba(37,37,37,0.6);--weui-MATERIAL-THICK:rgba(34,34,34,0.9);--weui-MATERIAL-THIN:rgba(95,95,95,0.4);--weui-MATERIAL-TOOLBAR:rgba(35,35,35,0.93);--weui-ORANGE-100:#c87d2f;--weui-ORANGE-120:#a06425;--weui-ORANGE-170:#3b250e;--weui-ORANGE-80:#d39758;--weui-ORANGE-90:#cd8943;--weui-ORANGE-BG-100:#bb6000;--weui-ORANGE-BG-110:#a85600;--weui-ORANGE-BG-130:#824300;--weui-ORANGE-BG-90:#c1701a;--weui-ORANGERED-100:#ff6146;--weui-OVERLAY:rgba(0,0,0,0.8);--weui-OVERLAY-WHITE:hsla(0,0%,94.9%,0.8);--weui-PURPLE-100:#8183ff;--weui-PURPLE-120:#6768cc;--weui-PURPLE-170:#26274c;--weui-PURPLE-80:#9a9bff;--weui-PURPLE-90:#8d8fff;--weui-PURPLE-BG-100:#6768cc;--weui-PURPLE-BG-110:#5c5db7;--weui-PURPLE-BG-130:#48498f;--weui-PURPLE-BG-90:#7677d1;--weui-RED-100:#fa5151;--weui-RED-120:#c84040;--weui-RED-170:#4b1818;--weui-RED-80:#fb7373;--weui-RED-90:#fa6262;--weui-RED-BG-100:#cf5148;--weui-RED-BG-110:#ba4940;--weui-RED-BG-130:#913832;--weui-RED-BG-90:#d3625a;--weui-SECONDARY-BG:hsla(0,0%,100%,0.1);--weui-SEPARATOR-0:hsla(0,0%,100%,0.05);--weui-SEPARATOR-1:hsla(0,0%,100%,0.15);--weui-STATELAYER-HOVERED:rgba(0,0,0,0.02);--weui-STATELAYER-PRESSED:hsla(0,0%,100%,0.1);--weui-STATELAYER-PRESSEDSTRENGTHENED:hsla(0,0%,100%,0.2);--weui-YELLOW-100:#cc9c00;--weui-YELLOW-120:#a37c00;--weui-YELLOW-170:#3d2f00;--weui-YELLOW-80:#d6af33;--weui-YELLOW-90:#d1a519;--weui-YELLOW-BG-100:#bf9100;--weui-YELLOW-BG-110:#ab8200;--weui-YELLOW-BG-130:#866500;--weui-YELLOW-BG-90:#c59c1a;--weui-FG-HALF:hsla(0,0%,100%,0.6);--weui-RED:#fa5151;--weui-ORANGERED:#ff6146;--weui-ORANGE:#c87d2f;--weui-YELLOW:#cc9c00;--weui-GREEN:#74a800;--weui-LIGHTGREEN:#3eb575;--weui-TEXTGREEN:#259c5c;--weui-BRAND:#07c160;--weui-BLUE:#10aeff;--weui-INDIGO:#1196ff;--weui-PURPLE:#8183ff;--weui-LINK:#7d90a9;--weui-REDORANGE:#ff6146;--weui-TAG-TEXT-BLACK:hsla(0,0%,100%,0.5);--weui-TAG-BACKGROUND-BLACK:hsla(0,0%,100%,0.05);--weui-WHITE:hsla(0,0%,100%,0.8);--weui-FG:#fff;--weui-BG:#000;--weui-FG-5:hsla(0,0%,100%,0.1);--weui-TAG-BACKGROUND-ORANGE:rgba(250,157,59,0.1);--weui-TAG-BACKGROUND-GREEN:rgba(6,174,86,0.1);--weui-TAG-TEXT-RED:rgba(250,81,81,0.6);--weui-TAG-BACKGROUND-RED:rgba(250,81,81,0.1);--weui-TAG-BACKGROUND-BLUE:rgba(16,174,255,0.1);--weui-TAG-TEXT-ORANGE:rgba(250,157,59,0.6);--weui-TAG-TEXT-GREEN:rgba(6,174,86,0.6);--weui-TAG-TEXT-BLUE:rgba(16,174,255,0.6)}.wx-root[data-weui-mode=care],body[data-weui-mode=care]{--weui-BG-0:#ededed;--weui-BG-1:#f7f7f7;--weui-BG-2:#fff;--weui-BG-3:#f7f7f7;--weui-BG-4:#4c4c4c;--weui-BG-5:#fff;--weui-BLUE-100:#007dbb;--weui-BLUE-120:#3fbeff;--weui-BLUE-170:#b7e6ff;--weui-BLUE-80:#0c8bcc;--weui-BLUE-90:#0e9ce6;--weui-BLUE-BG-100:#48a6e2;--weui-BLUE-BG-110:#5aafe4;--weui-BLUE-BG-130:#7fc0ea;--weui-BLUE-BG-90:#4095cb;--weui-BRAND-100:#018942;--weui-BRAND-120:#38cd7f;--weui-BRAND-170:#b4ecce;--weui-BRAND-80:#059a4c;--weui-BRAND-90:#06ae56;--weui-BRAND-BG-100:#2aae67;--weui-BRAND-BG-110:#3eb575;--weui-BRAND-BG-130:#69c694;--weui-BRAND-BG-90:#259c5c;--weui-FG-0:#000;--weui-FG-0_5:#000;--weui-FG-1:rgba(0,0,0,0.6);--weui-FG-2:rgba(0,0,0,0.42);--weui-FG-3:rgba(0,0,0,0.1);--weui-FG-4:rgba(0,0,0,0.15);--weui-GLYPH-0:#000;--weui-GLYPH-1:rgba(0,0,0,0.6);--weui-GLYPH-2:rgba(0,0,0,0.42);--weui-GLYPH-WHITE-0:hsla(0,0%,100%,0.85);--weui-GLYPH-WHITE-1:hsla(0,0%,100%,0.55);--weui-GLYPH-WHITE-2:hsla(0,0%,100%,0.35);--weui-GLYPH-WHITE-3:#fff;--weui-GREEN-100:#4f8400;--weui-GREEN-120:#a7db33;--weui-GREEN-170:#def1b3;--weui-GREEN-80:#74a800;--weui-GREEN-90:#82bd00;--weui-GREEN-BG-100:#96be40;--weui-GREEN-BG-110:#a0c452;--weui-GREEN-BG-130:#b5d179;--weui-GREEN-BG-90:#86aa39;--weui-INDIGO-100:#0075e2;--weui-INDIGO-120:#439df1;--weui-INDIGO-170:#b8daf9;--weui-INDIGO-80:#106abe;--weui-INDIGO-90:#1277d6;--weui-INDIGO-BG-100:#2b77bf;--weui-INDIGO-BG-110:#3f84c5;--weui-INDIGO-BG-130:#6ba0d2;--weui-INDIGO-BG-90:#266aab;--weui-LIGHTGREEN-100:#2e8800;--weui-LIGHTGREEN-120:#aaef87;--weui-LIGHTGREEN-170:#def9d1;--weui-LIGHTGREEN-80:#77bc54;--weui-LIGHTGREEN-90:#85d35e;--weui-LIGHTGREEN-BG-100:#72cf60;--weui-LIGHTGREEN-BG-110:#80d370;--weui-LIGHTGREEN-BG-130:#9cdd90;--weui-LIGHTGREEN-BG-90:#66b956;--weui-LINK-100:#576b95;--weui-LINK-120:#7888aa;--weui-LINK-170:#ccd2de;--weui-LINK-80:#455577;--weui-LINK-90:#4e6085;--weui-LINKFINDER-100:#002666;--weui-MATERIAL-ATTACHMENTCOLUMN:hsla(0,0%,96.1%,0.95);--weui-MATERIAL-NAVIGATIONBAR:hsla(0,0%,92.9%,0.94);--weui-MATERIAL-REGULAR:hsla(0,0%,96.9%,0.3);--weui-MATERIAL-THICK:hsla(0,0%,96.9%,0.8);--weui-MATERIAL-THIN:hsla(0,0%,100%,0.2);--weui-MATERIAL-TOOLBAR:hsla(0,0%,96.5%,0.82);--weui-ORANGE-100:#e17719;--weui-ORANGE-120:#fbb062;--weui-ORANGE-170:#fde1c3;--weui-ORANGE-80:#c87d2f;--weui-ORANGE-90:#e08c34;--weui-ORANGE-BG-100:#ea7800;--weui-ORANGE-BG-110:#ec8519;--weui-ORANGE-BG-130:#f0a04d;--weui-ORANGE-BG-90:#d26b00;--weui-ORANGERED-100:#d14730;--weui-OVERLAY:rgba(0,0,0,0.5);--weui-OVERLAY-WHITE:hsla(0,0%,94.9%,0.8);--weui-PURPLE-100:#6265f1;--weui-PURPLE-120:#8385f3;--weui-PURPLE-170:#d0d1fa;--weui-PURPLE-80:#5052c0;--weui-PURPLE-90:#595cd7;--weui-PURPLE-BG-100:#6769ba;--weui-PURPLE-BG-110:#7678c1;--weui-PURPLE-BG-130:#9496ce;--weui-PURPLE-BG-90:#5c5ea7;--weui-RED-100:#dc3636;--weui-RED-120:#fb7373;--weui-RED-170:#fdcaca;--weui-RED-80:#c84040;--weui-RED-90:#e14949;--weui-RED-BG-100:#cf5148;--weui-RED-BG-110:#d3625a;--weui-RED-BG-130:#dd847e;--weui-RED-BG-90:#b94840;--weui-SECONDARY-BG:rgba(0,0,0,0.1);--weui-SEPARATOR-0:rgba(0,0,0,0.1);--weui-SEPARATOR-1:rgba(0,0,0,0.15);--weui-STATELAYER-HOVERED:rgba(0,0,0,0.02);--weui-STATELAYER-PRESSED:rgba(0,0,0,0.1);--weui-STATELAYER-PRESSEDSTRENGTHENED:rgba(0,0,0,0.2);--weui-YELLOW-100:#bb8e00;--weui-YELLOW-120:#ffcf33;--weui-YELLOW-170:#ffecb2;--weui-YELLOW-80:#cc9c00;--weui-YELLOW-90:#e6af00;--weui-YELLOW-BG-100:#efb600;--weui-YELLOW-BG-110:#f0bd19;--weui-YELLOW-BG-130:#f3cc4d;--weui-YELLOW-BG-90:#d7a400;--weui-FG-HALF:#000;--weui-RED:#dc3636;--weui-ORANGERED:#d14730;--weui-ORANGE:#e17719;--weui-YELLOW:#bb8e00;--weui-GREEN:#4f8400;--weui-LIGHTGREEN:#2e8800;--weui-TEXTGREEN:#06ae56;--weui-BRAND:#018942;--weui-BLUE:#007dbb;--weui-INDIGO:#0075e2;--weui-PURPLE:#6265f1;--weui-LINK:#576b95;--weui-TAG-TEXT-ORANGE:#e17719;--weui-TAG-TEXT-GREEN:#06ae56;--weui-TAG-TEXT-BLUE:#007dbb;--weui-REDORANGE:#d14730;--weui-TAG-TEXT-BLACK:rgba(0,0,0,0.5);--weui-WHITE:#fff;--weui-BG:#fff;--weui-FG:#000;--weui-FG-5:rgba(0,0,0,0.05);--weui-TAG-BACKGROUND-ORANGE:rgba(225,119,25,0.1);--weui-TAG-BACKGROUND-GREEN:rgba(6,174,86,0.1);--weui-TAG-TEXT-RED:rgba(250,81,81,0.6);--weui-TAG-BACKGROUND-RED:rgba(250,81,81,0.1);--weui-TAG-BACKGROUND-BLUE:rgba(0,125,187,0.1);--weui-TAG-BACKGROUND-BLACK:rgba(0,0,0,0.05)}@media (prefers-color-scheme:dark){.wx-root[data-weui-mode=care]:not([data-weui-theme=light]),body[data-weui-mode=care]:not([data-weui-theme=light]){--weui-BG-0:#111;--weui-BG-1:#1e1e1e;--weui-BG-2:#191919;--weui-BG-3:#202020;--weui-BG-4:#404040;--weui-BG-5:#2c2c2c;--weui-BLUE-100:#10aeff;--weui-BLUE-120:#0c8bcc;--weui-BLUE-170:#04344d;--weui-BLUE-80:#3fbeff;--weui-BLUE-90:#28b6ff;--weui-BLUE-BG-100:#48a6e2;--weui-BLUE-BG-110:#4095cb;--weui-BLUE-BG-130:#32749e;--weui-BLUE-BG-90:#5aafe4;--weui-BRAND-100:#07c160;--weui-BRAND-120:#059a4c;--weui-BRAND-170:#023a1c;--weui-BRAND-80:#38cd7f;--weui-BRAND-90:#20c770;--weui-BRAND-BG-100:#2aae67;--weui-BRAND-BG-110:#259c5c;--weui-BRAND-BG-130:#1d7a48;--weui-BRAND-BG-90:#3eb575;--weui-FG-0:hsla(0,0%,100%,0.85);--weui-FG-0_5:hsla(0,0%,100%,0.65);--weui-FG-1:hsla(0,0%,100%,0.55);--weui-FG-2:hsla(0,0%,100%,0.35);--weui-FG-3:hsla(0,0%,100%,0.1);--weui-FG-4:hsla(0,0%,100%,0.15);--weui-GLYPH-0:hsla(0,0%,100%,0.85);--weui-GLYPH-1:hsla(0,0%,100%,0.55);--weui-GLYPH-2:hsla(0,0%,100%,0.35);--weui-GLYPH-WHITE-0:hsla(0,0%,100%,0.85);--weui-GLYPH-WHITE-1:hsla(0,0%,100%,0.55);--weui-GLYPH-WHITE-2:hsla(0,0%,100%,0.35);--weui-GLYPH-WHITE-3:#fff;--weui-GREEN-100:#74a800;--weui-GREEN-120:#5c8600;--weui-GREEN-170:#233200;--weui-GREEN-80:#8fb933;--weui-GREEN-90:#82b01a;--weui-GREEN-BG-100:#789833;--weui-GREEN-BG-110:#6b882d;--weui-GREEN-BG-130:#65802b;--weui-GREEN-BG-90:#85a247;--weui-INDIGO-100:#1196ff;--weui-INDIGO-120:#0d78cc;--weui-INDIGO-170:#052d4d;--weui-INDIGO-80:#40abff;--weui-INDIGO-90:#28a0ff;--weui-INDIGO-BG-100:#0d78cc;--weui-INDIGO-BG-110:#0b6bb7;--weui-INDIGO-BG-130:#09548f;--weui-INDIGO-BG-90:#2585d1;--weui-LIGHTGREEN-100:#3eb575;--weui-LIGHTGREEN-120:#31905d;--weui-LIGHTGREEN-170:#123522;--weui-LIGHTGREEN-80:#64c390;--weui-LIGHTGREEN-90:#51bc83;--weui-LIGHTGREEN-BG-100:#31905d;--weui-LIGHTGREEN-BG-110:#2c8153;--weui-LIGHTGREEN-BG-130:#226541;--weui-LIGHTGREEN-BG-90:#31905d;--weui-LINK-100:#7d90a9;--weui-LINK-120:#647387;--weui-LINK-170:#252a32;--weui-LINK-80:#97a6ba;--weui-LINK-90:#899ab1;--weui-LINKFINDER-100:#dee9ff;--weui-MATERIAL-ATTACHMENTCOLUMN:rgba(32,32,32,0.93);--weui-MATERIAL-NAVIGATIONBAR:rgba(18,18,18,0.9);--weui-MATERIAL-REGULAR:rgba(37,37,37,0.6);--weui-MATERIAL-THICK:rgba(34,34,34,0.9);--weui-MATERIAL-THIN:hsla(0,0%,96.1%,0.4);--weui-MATERIAL-TOOLBAR:rgba(35,35,35,0.93);--weui-ORANGE-100:#c87d2f;--weui-ORANGE-120:#a06425;--weui-ORANGE-170:#3b250e;--weui-ORANGE-80:#d39758;--weui-ORANGE-90:#cd8943;--weui-ORANGE-BG-100:#bb6000;--weui-ORANGE-BG-110:#a85600;--weui-ORANGE-BG-130:#824300;--weui-ORANGE-BG-90:#c1701a;--weui-ORANGERED-100:#ff6146;--weui-OVERLAY:rgba(0,0,0,0.8);--weui-OVERLAY-WHITE:hsla(0,0%,94.9%,0.8);--weui-PURPLE-100:#8183ff;--weui-PURPLE-120:#6768cc;--weui-PURPLE-170:#26274c;--weui-PURPLE-80:#9a9bff;--weui-PURPLE-90:#8d8fff;--weui-PURPLE-BG-100:#6768cc;--weui-PURPLE-BG-110:#5c5db7;--weui-PURPLE-BG-130:#48498f;--weui-PURPLE-BG-90:#7677d1;--weui-RED-100:#fa5151;--weui-RED-120:#c84040;--weui-RED-170:#4b1818;--weui-RED-80:#fb7373;--weui-RED-90:#fa6262;--weui-RED-BG-100:#cf5148;--weui-RED-BG-110:#ba4940;--weui-RED-BG-130:#913832;--weui-RED-BG-90:#d3625a;--weui-SECONDARY-BG:hsla(0,0%,100%,0.15);--weui-SEPARATOR-0:hsla(0,0%,100%,0.05);--weui-SEPARATOR-1:hsla(0,0%,100%,0.15);--weui-STATELAYER-HOVERED:rgba(0,0,0,0.02);--weui-STATELAYER-PRESSED:hsla(0,0%,100%,0.1);--weui-STATELAYER-PRESSEDSTRENGTHENED:hsla(0,0%,100%,0.2);--weui-YELLOW-100:#cc9c00;--weui-YELLOW-120:#a37c00;--weui-YELLOW-170:#3d2f00;--weui-YELLOW-80:#d6af33;--weui-YELLOW-90:#d1a519;--weui-YELLOW-BG-100:#bf9100;--weui-YELLOW-BG-110:#ab8200;--weui-YELLOW-BG-130:#866500;--weui-YELLOW-BG-90:#c59c1a;--weui-FG-HALF:hsla(0,0%,100%,0.65);--weui-RED:#fa5151;--weui-ORANGERED:#ff6146;--weui-ORANGE:#c87d2f;--weui-YELLOW:#cc9c00;--weui-GREEN:#74a800;--weui-LIGHTGREEN:#3eb575;--weui-TEXTGREEN:#259c5c;--weui-BRAND:#07c160;--weui-BLUE:#10aeff;--weui-INDIGO:#1196ff;--weui-PURPLE:#8183ff;--weui-LINK:#7d90a9;--weui-REDORANGE:#ff6146;--weui-TAG-BACKGROUND-BLACK:hsla(0,0%,100%,0.05);--weui-FG:#fff;--weui-WHITE:hsla(0,0%,100%,0.8);--weui-FG-5:hsla(0,0%,100%,0.1);--weui-TAG-BACKGROUND-ORANGE:rgba(250,157,59,0.1);--weui-TAG-BACKGROUND-GREEN:rgba(6,174,86,0.1);--weui-TAG-TEXT-RED:rgba(250,81,81,0.6);--weui-TAG-BACKGROUND-RED:rgba(250,81,81,0.1);--weui-TAG-BACKGROUND-BLUE:rgba(16,174,255,0.1);--weui-TAG-TEXT-ORANGE:rgba(250,157,59,0.6);--weui-BG:#000;--weui-TAG-TEXT-GREEN:rgba(6,174,86,0.6);--weui-TAG-TEXT-BLUE:rgba(16,174,255,0.6);--weui-TAG-TEXT-BLACK:hsla(0,0%,100%,0.5)}}.wx-root[data-weui-mode=care][data-weui-theme=dark],body[data-weui-mode=care][data-weui-theme=dark]{--weui-BG-0:#111;--weui-BG-1:#1e1e1e;--weui-BG-2:#191919;--weui-BG-3:#202020;--weui-BG-4:#404040;--weui-BG-5:#2c2c2c;--weui-BLUE-100:#10aeff;--weui-BLUE-120:#0c8bcc;--weui-BLUE-170:#04344d;--weui-BLUE-80:#3fbeff;--weui-BLUE-90:#28b6ff;--weui-BLUE-BG-100:#48a6e2;--weui-BLUE-BG-110:#4095cb;--weui-BLUE-BG-130:#32749e;--weui-BLUE-BG-90:#5aafe4;--weui-BRAND-100:#07c160;--weui-BRAND-120:#059a4c;--weui-BRAND-170:#023a1c;--weui-BRAND-80:#38cd7f;--weui-BRAND-90:#20c770;--weui-BRAND-BG-100:#2aae67;--weui-BRAND-BG-110:#259c5c;--weui-BRAND-BG-130:#1d7a48;--weui-BRAND-BG-90:#3eb575;--weui-FG-0:hsla(0,0%,100%,0.85);--weui-FG-0_5:hsla(0,0%,100%,0.65);--weui-FG-1:hsla(0,0%,100%,0.55);--weui-FG-2:hsla(0,0%,100%,0.35);--weui-FG-3:hsla(0,0%,100%,0.1);--weui-FG-4:hsla(0,0%,100%,0.15);--weui-GLYPH-0:hsla(0,0%,100%,0.85);--weui-GLYPH-1:hsla(0,0%,100%,0.55);--weui-GLYPH-2:hsla(0,0%,100%,0.35);--weui-GLYPH-WHITE-0:hsla(0,0%,100%,0.85);--weui-GLYPH-WHITE-1:hsla(0,0%,100%,0.55);--weui-GLYPH-WHITE-2:hsla(0,0%,100%,0.35);--weui-GLYPH-WHITE-3:#fff;--weui-GREEN-100:#74a800;--weui-GREEN-120:#5c8600;--weui-GREEN-170:#233200;--weui-GREEN-80:#8fb933;--weui-GREEN-90:#82b01a;--weui-GREEN-BG-100:#789833;--weui-GREEN-BG-110:#6b882d;--weui-GREEN-BG-130:#65802b;--weui-GREEN-BG-90:#85a247;--weui-INDIGO-100:#1196ff;--weui-INDIGO-120:#0d78cc;--weui-INDIGO-170:#052d4d;--weui-INDIGO-80:#40abff;--weui-INDIGO-90:#28a0ff;--weui-INDIGO-BG-100:#0d78cc;--weui-INDIGO-BG-110:#0b6bb7;--weui-INDIGO-BG-130:#09548f;--weui-INDIGO-BG-90:#2585d1;--weui-LIGHTGREEN-100:#3eb575;--weui-LIGHTGREEN-120:#31905d;--weui-LIGHTGREEN-170:#123522;--weui-LIGHTGREEN-80:#64c390;--weui-LIGHTGREEN-90:#51bc83;--weui-LIGHTGREEN-BG-100:#31905d;--weui-LIGHTGREEN-BG-110:#2c8153;--weui-LIGHTGREEN-BG-130:#226541;--weui-LIGHTGREEN-BG-90:#31905d;--weui-LINK-100:#7d90a9;--weui-LINK-120:#647387;--weui-LINK-170:#252a32;--weui-LINK-80:#97a6ba;--weui-LINK-90:#899ab1;--weui-LINKFINDER-100:#dee9ff;--weui-MATERIAL-ATTACHMENTCOLUMN:rgba(32,32,32,0.93);--weui-MATERIAL-NAVIGATIONBAR:rgba(18,18,18,0.9);--weui-MATERIAL-REGULAR:rgba(37,37,37,0.6);--weui-MATERIAL-THICK:rgba(34,34,34,0.9);--weui-MATERIAL-THIN:hsla(0,0%,96.1%,0.4);--weui-MATERIAL-TOOLBAR:rgba(35,35,35,0.93);--weui-ORANGE-100:#c87d2f;--weui-ORANGE-120:#a06425;--weui-ORANGE-170:#3b250e;--weui-ORANGE-80:#d39758;--weui-ORANGE-90:#cd8943;--weui-ORANGE-BG-100:#bb6000;--weui-ORANGE-BG-110:#a85600;--weui-ORANGE-BG-130:#824300;--weui-ORANGE-BG-90:#c1701a;--weui-ORANGERED-100:#ff6146;--weui-OVERLAY:rgba(0,0,0,0.8);--weui-OVERLAY-WHITE:hsla(0,0%,94.9%,0.8);--weui-PURPLE-100:#8183ff;--weui-PURPLE-120:#6768cc;--weui-PURPLE-170:#26274c;--weui-PURPLE-80:#9a9bff;--weui-PURPLE-90:#8d8fff;--weui-PURPLE-BG-100:#6768cc;--weui-PURPLE-BG-110:#5c5db7;--weui-PURPLE-BG-130:#48498f;--weui-PURPLE-BG-90:#7677d1;--weui-RED-100:#fa5151;--weui-RED-120:#c84040;--weui-RED-170:#4b1818;--weui-RED-80:#fb7373;--weui-RED-90:#fa6262;--weui-RED-BG-100:#cf5148;--weui-RED-BG-110:#ba4940;--weui-RED-BG-130:#913832;--weui-RED-BG-90:#d3625a;--weui-SECONDARY-BG:hsla(0,0%,100%,0.15);--weui-SEPARATOR-0:hsla(0,0%,100%,0.05);--weui-SEPARATOR-1:hsla(0,0%,100%,0.15);--weui-STATELAYER-HOVERED:rgba(0,0,0,0.02);--weui-STATELAYER-PRESSED:hsla(0,0%,100%,0.1);--weui-STATELAYER-PRESSEDSTRENGTHENED:hsla(0,0%,100%,0.2);--weui-YELLOW-100:#cc9c00;--weui-YELLOW-120:#a37c00;--weui-YELLOW-170:#3d2f00;--weui-YELLOW-80:#d6af33;--weui-YELLOW-90:#d1a519;--weui-YELLOW-BG-100:#bf9100;--weui-YELLOW-BG-110:#ab8200;--weui-YELLOW-BG-130:#866500;--weui-YELLOW-BG-90:#c59c1a;--weui-FG-HALF:hsla(0,0%,100%,0.65);--weui-RED:#fa5151;--weui-ORANGERED:#ff6146;--weui-ORANGE:#c87d2f;--weui-YELLOW:#cc9c00;--weui-GREEN:#74a800;--weui-LIGHTGREEN:#3eb575;--weui-TEXTGREEN:#259c5c;--weui-BRAND:#07c160;--weui-BLUE:#10aeff;--weui-INDIGO:#1196ff;--weui-PURPLE:#8183ff;--weui-LINK:#7d90a9;--weui-REDORANGE:#ff6146;--weui-TAG-BACKGROUND-BLACK:hsla(0,0%,100%,0.05);--weui-FG:#fff;--weui-WHITE:hsla(0,0%,100%,0.8);--weui-FG-5:hsla(0,0%,100%,0.1);--weui-TAG-BACKGROUND-ORANGE:rgba(250,157,59,0.1);--weui-TAG-BACKGROUND-GREEN:rgba(6,174,86,0.1);--weui-TAG-TEXT-RED:rgba(250,81,81,0.6);--weui-TAG-BACKGROUND-RED:rgba(250,81,81,0.1);--weui-TAG-BACKGROUND-BLUE:rgba(16,174,255,0.1);--weui-TAG-TEXT-ORANGE:rgba(250,157,59,0.6);--weui-BG:#000;--weui-TAG-TEXT-GREEN:rgba(6,174,86,0.6);--weui-TAG-TEXT-BLUE:rgba(16,174,255,0.6);--weui-TAG-TEXT-BLACK:hsla(0,0%,100%,0.5)}.wx-root{pointer-events:auto;font-family:system-ui,-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Hiragino Sans GB,Microsoft YaHei UI,Microsoft YaHei,Arial,sans-serif}.wx-root,.wx_card_root{position:relative}.wxw_hide{display:none!important}.wx_uninteractive{pointer-events:none}.wx-root,body{--APPMSGCARD-BG:#fafafa}.wx-root[data-weui-theme=dark],body[data-weui-theme=dark]{--APPMSGCARD-BG:#1e1e1e}@media (prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--APPMSGCARD-BG:#1e1e1e}}.wx-root,body{--APPMSGCARD-LINE-BG:rgba(0,0,0,0.07)}.wx-root[data-weui-theme=dark],body[data-weui-theme=dark]{--APPMSGCARD-LINE-BG:hsla(0,0%,100%,0.07)}@media (prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--APPMSGCARD-LINE-BG:hsla(0,0%,100%,0.07)}}.appmsg_card_context{position:relative;background-color:var(--APPMSGCARD-BG);border-radius:8px;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host(.wx_tap_highlight_active) .wx_tap_link{opacity:.5}:host(.wx_tap_highlight_active) .wx_tap_card{background-color:#f3f3f3}:host(.wx_tap_highlight_active) .wx_tap_cell{background-color:rgba(0,0,0,.05)}@media (prefers-color-scheme:dark){:host(.wx_tap_highlight_active) .wx_tap_card{background-color:#252525}:host(.wx_tap_highlight_active) .wx_tap_cell{background-color:hsla(0,0%,100%,.1)}}.wx_css_active :active{opacity:.5}.weui-flex__item{min-width:0}.weui-flex_align-center{align-items:center}[tabindex]{outline:0}.wx_hover_card:before{border-radius:8px;border:1px solid rgba(7,193,96,.3)}.wx_hover_card:before,.wx_selected_card:before{content:" ";position:absolute;top:0;left:0;right:0;bottom:0;box-sizing:border-box;pointer-events:none;z-index:9}.wx_selected_card:before{border-radius:8px;border:1.5px solid #07c160;background:rgba(7,193,96,.1)}img{pointer-events:none}.wx_profile_card{line-height:1.4;text-align:left;text-decoration:none;clear:both;position:relative}.wx_profile_card_ft{padding:8px 16px;align-items:center;position:relative;color:var(--weui-FG-2);font-size:14px}.wx_profile_card_ft:before{content:"";content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid var(--APPMSGCARD-LINE-BG);color:var(--APPMSGCARD-LINE-BG);transform-origin:0 0;transform:scaleY(.5);left:16px;right:16px}.wx_profile_msg{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:1;background:hsla(0,0%,100%,.5);font-size:14px;font-weight:400}.common-web{margin:0 auto;max-width:350px}.wx_card_disabled .wx_profile_card_bd{filter:blur(2px)}.wx_profile{padding:20px 16px}.wx_profile .weui-icon-arrow{width:1em;height:2em}.wx_profile_hd{display:flex;padding-right:10px}.wx_profile_hd .wx_profile_avatar{width:44px;height:44px!important;border-radius:100%}.wx_profile_ft{padding-left:10px}.wx_profile_bd{align-items:center}.wx_profile_bd>.weui-flex__item{padding-right:16px}.wx_profile_nickname{display:inline-block;flex-shrink:1;color:var(--weui-FG-0);font-weight:500}.wx_profile_desc{width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.wx_profile_desc,.wx_profile_tips{color:var(--weui-FG-1);font-size:14px;margin-top:4px}.wx_profile_tips{display:flex;min-height:1.4em}.wx_profile_tips:empty{display:none}.wx_profile_nickname_wrp{position:relative;display:flex;flex-direction:row;align-items:center;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;font-size:17px;line-height:1.2;font-weight:500}.wx_follow_verify{flex-shrink:0;height:14px;width:14px;margin-left:2px;background-size:cover;background-position:50%;background-repeat:no-repeat}.wx_follow_verify.show-verify-personal{display:block;background-image:url(https://res.wx.qq.com/op_res/nLnAiLrrETuU96Aym1ZDNuddJ2beY0iOs-D3h-7MPQeIIoXE5kLrgfPY_Vr_hrKamxAjISc12pBthrd7Ja4S4w)}.wx_follow_verify.show-verify-company{display:block;background-image:url(https://res.wx.qq.com/op_res/nLnAiLrrETuU96Aym1ZDNjhMga6Fe1hiYp332DlZsT_u4THJyu8XegVlG723G5FblhAwxLO31iFVMkzq62jS3w)}.wx_follow_verify.show-verify-media{display:block;background-image:url(https://res.wx.qq.com/op_res/n1-Xym4hWn0AbVImOFGmT9sRdHV1rjoe3lnMHwxRdfbguJjDQH16CE7AIfDZy1KVMHWCPJIoAC4jrMEFqmqR4A)}</style>
598
+ <div role="option" tabindex="0"
599
+ aria-labelledby="js_a11y_wx_profile_nickname js_a11y_comma js_a11y_wx_profile_desc js_a11y_comma0 js_a11y_wx_profile_tips js_a11y_comma1 js_a11y_wx_profile_logo"
600
+ class="appmsg_card_context wx_profile_card wx-root wx_tap_card wx_card_root common-web"
601
+ data-weui-theme="light">
602
+ <div class="wx_profile_card_inner">
603
+ <div class="wx_profile_card_bd" aria-hidden="true">
604
+ <div class="wx_profile weui-flex">
605
+ <div class="wx_profile_hd">
606
+ <img src="${o}" alt="" class="wx_profile_avatar">
607
+ </div>
608
+ <div class="wx_profile_bd weui-flex weui-flex__item">
609
+ <div class="weui-flex__item">
610
+ <div class="wx_profile_nickname_wrp">
611
+ <strong id="js_a11y_wx_profile_nickname" class="wx_profile_nickname">${e}</strong>
612
+ <span class="wx_follow_verify ${n==="1"?"show-verify-personal":""}"></span>
613
+ </div>
614
+ <div id="js_a11y_wx_profile_desc" class="wx_profile_desc">${a}</div>
615
+ </div>
616
+ <i class="weui-icon-arrow"></i>
617
+ </div>
618
+ </div>
619
+ </div>
620
+ <div id="js_a11y_wx_profile_logo" aria-hidden="true" class="wx_profile_card_ft">
621
+ 公众号
622
+ </div>
623
+ </div>
624
+ <span aria-hidden="true" id="js_a11y_comma" class="weui-a11y_ref" style="display: none;">,</span>
625
+ </div>
626
+ `}}function setupComponents(){customElements.define("mp-common-profile",MpCommonProfile)}setupComponents();const app=createApp(_sfc_main);app.use(createPinia());app.mount("#app");const isInExtension=typeof chrome<"u"&&chrome.runtime&&chrome.runtime.id;console.log("Running in extension context?",isInExtension);async function getCurrentTab(){const t={active:!0,lastFocusedWindow:!0};if(typeof browser<"u"&&browser.tabs&&browser.tabs.query){const[o]=await browser.tabs.query(t);return o}const[e]=await chrome.tabs.query(t);return e}window.addEventListener("copyToMp",t=>{const e=t;isInExtension&&getCurrentTab().then(o=>{chrome.tabs.sendMessage(o.id,{type:"copyToMp",content:e.detail.content})})});