@robot-admin/naive-ui-components 0.20.0 → 0.21.1
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.
- package/CHANGELOG.md +22 -0
- package/README.md +5 -5
- package/README_EN.md +5 -5
- package/SECURITY.md +39 -0
- package/dist/C_AntV.css +31 -31
- package/dist/C_AntV2.cjs +1 -1
- package/dist/C_AntV2.js +1 -1
- package/dist/C_Chat.css +90 -90
- package/dist/C_Chat2.cjs +1 -1
- package/dist/C_Chat2.js +1 -1
- package/dist/C_CollapsePanel2.cjs +1 -1
- package/dist/C_CollapsePanel2.js +1 -1
- package/dist/C_Draggable.css +53 -53
- package/dist/C_Draggable2.cjs +1 -1
- package/dist/C_Draggable2.js +1 -1
- package/dist/C_FilePreview.css +98 -98
- package/dist/C_FilePreview.d.cts +2 -2
- package/dist/C_FilePreview.d.ts +2 -2
- package/dist/C_FilePreview2.cjs +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_Form.base.css +9 -9
- package/dist/C_Form.css +9 -9
- package/dist/C_FormSearch.css +52 -52
- package/dist/C_FormSearch2.cjs +1 -1
- package/dist/C_FormSearch2.js +1 -1
- package/dist/C_Language.css +2 -2
- package/dist/C_Language2.cjs +1 -1
- package/dist/C_Language2.js +1 -1
- package/dist/C_Login.css +79 -79
- package/dist/C_Login2.cjs +1 -1
- package/dist/C_Login2.js +1 -1
- package/dist/C_Markdown.css +1 -2
- package/dist/C_Menu.css +1 -1
- package/dist/C_Menu.d.cts +2 -2
- package/dist/C_Menu.d.ts +2 -2
- package/dist/C_Menu2.cjs +1 -1
- package/dist/C_Menu2.js +1 -1
- package/dist/C_NotificationCenter.css +124 -124
- package/dist/C_NotificationCenter.d.cts +2 -2
- package/dist/C_NotificationCenter.d.ts +2 -2
- package/dist/C_NotificationCenter2.cjs +1 -1
- package/dist/C_NotificationCenter2.js +1 -1
- package/dist/C_Skeleton.css +2 -2
- package/dist/C_Skeleton2.cjs +1 -1
- package/dist/C_Skeleton2.js +1 -1
- package/dist/C_SplitPane.css +66 -66
- package/dist/C_SplitPane2.cjs +1 -1
- package/dist/C_SplitPane2.js +1 -1
- package/dist/C_Table.base.css +9 -9
- package/dist/C_Table.css +9 -9
- package/dist/C_Table.d.ts +1 -0
- package/dist/C_Theme2.cjs +1 -1
- package/dist/C_Theme2.js +1 -1
- package/dist/C_Timeline.css +46 -46
- package/dist/C_Timeline2.cjs +1 -1
- package/dist/C_Timeline2.js +1 -1
- package/dist/C_Transfer.css +26 -26
- package/dist/C_Transfer2.cjs +1 -1
- package/dist/C_Transfer2.js +1 -1
- package/dist/C_Tree.css +23 -23
- package/dist/C_Tree.d.ts +1 -0
- package/dist/C_Tree2.cjs +1 -1
- package/dist/C_Tree2.js +1 -1
- package/dist/C_Upload2.cjs +1 -1
- package/dist/C_Upload2.js +1 -1
- package/dist/C_VideoPlayer.d.cts +2 -2
- package/dist/C_VideoPlayer.d.ts +2 -2
- package/dist/C_VideoPlayer2.cjs +2 -2
- package/dist/C_VideoPlayer2.js +2 -2
- package/dist/C_WaterFall.css +31 -29
- package/dist/C_WaterFall2.cjs +1 -1
- package/dist/C_WaterFall2.js +1 -1
- package/dist/C_WorkFlow.css +112 -111
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/config.cjs +1 -0
- package/dist/config.d.cts +8 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.js +1 -0
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants2.d.cts +1 -1
- package/dist/constants2.d.ts +1 -1
- package/dist/constants3.d.cts +32 -9
- package/dist/constants3.d.ts +32 -9
- package/dist/constants4.d.cts +16 -5
- package/dist/constants4.d.ts +16 -5
- package/dist/constants5.d.cts +22 -18
- package/dist/constants5.d.ts +22 -18
- package/dist/data.d.cts +6 -6
- package/dist/data.d.ts +6 -6
- package/dist/dateRange.d.cts +2 -0
- package/dist/dateRange.d.ts +2 -0
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +1 -1
- package/dist/helpers.cjs +1 -1
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +5 -5
- package/dist/index.vue.d.ts +5 -5
- package/dist/index10.vue.d.cts +3 -3
- package/dist/index10.vue.d.ts +2 -2
- package/dist/index11.vue.d.cts +2 -2
- package/dist/index11.vue.d.ts +2 -2
- package/dist/index12.vue.d.cts +2 -2
- package/dist/index12.vue.d.ts +3 -3
- package/dist/index13.vue.d.cts +3 -3
- package/dist/index13.vue.d.ts +8 -8
- package/dist/index14.vue.d.cts +8 -8
- package/dist/index14.vue.d.ts +0 -1
- package/dist/index15.vue.d.cts +0 -1
- package/dist/index15.vue.d.ts +1 -1
- package/dist/index16.vue.d.cts +1 -1
- package/dist/index16.vue.d.ts +1 -1
- package/dist/index17.vue.d.cts +1 -1
- package/dist/index17.vue.d.ts +2 -2
- package/dist/index18.vue.d.cts +2 -2
- package/dist/index18.vue.d.ts +44 -40
- package/dist/index19.vue.d.cts +3 -3
- package/dist/index19.vue.d.ts +3 -3
- package/dist/index20.vue.d.cts +3 -3
- package/dist/index20.vue.d.ts +3 -3
- package/dist/index21.vue.d.cts +2 -2
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index25.vue.d.cts +0 -1
- package/dist/index25.vue.d.ts +0 -1
- package/dist/index26.vue.d.cts +3 -3
- package/dist/index26.vue.d.ts +3 -3
- package/dist/index3.vue.d.cts +3 -3
- package/dist/index3.vue.d.ts +3 -3
- package/dist/index4.vue.d.cts +44 -40
- package/dist/index6.vue.d.ts +0 -2
- package/dist/index7.vue.d.cts +0 -2
- package/dist/index8.vue.d.ts +3 -3
- package/dist/index9.vue.d.cts +3 -3
- package/dist/index9.vue.d.ts +3 -3
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/style.css +848 -846
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +3 -3
- package/dist/useCollapsePanel.d.ts +3 -3
- package/dist/useComponentLocale.cjs +1 -1
- package/dist/useComponentLocale.js +1 -1
- package/dist/useCropperCore.d.cts +8 -8
- package/dist/useCropperCore.d.ts +8 -8
- package/dist/useDraggableLayout.d.cts +1 -0
- package/dist/useDraggableLayout.d.ts +1 -0
- package/dist/useEdgeInteraction.d.cts +3 -3
- package/dist/useEdgeInteraction.d.ts +3 -3
- package/dist/useFullscreen.d.cts +41 -23
- package/dist/useFullscreen.d.ts +41 -23
- package/dist/useInfiniteScroll.d.cts +7 -5
- package/dist/useInfiniteScroll.d.ts +7 -5
- package/dist/useQRCode.d.cts +4 -4
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSignatureHistory.d.cts +4 -4
- package/dist/useSignatureHistory.d.ts +4 -4
- package/dist/useSplitResize.d.cts +3 -4
- package/dist/useSplitResize.d.ts +3 -4
- package/dist/useTableQuery.cjs +1 -1
- package/dist/useTableQuery.d.cts +8 -12
- package/dist/useTableQuery.d.ts +8 -12
- package/dist/useTableQuery.js +1 -1
- package/dist/useWorkflowValidation.d.cts +105 -97
- package/dist/useWorkflowValidation.d.ts +105 -97
- package/dist/verification.d.cts +6 -6
- package/dist/verification.d.ts +6 -6
- package/docs/architecture.en.md +3 -1
- package/docs/architecture.md +3 -1
- package/docs/guides/usage.en.md +16 -0
- package/docs/guides/usage.md +56 -0
- package/package.json +27 -10
- package/dist/context.cjs +0 -1
- package/dist/context.js +0 -1
package/dist/C_Login2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`),n=require(`./C_Captcha2.cjs`),r=require(`./useActionTask.cjs`),i=require(`./storage.cjs`),a=require(`./C_QRCode2.cjs`);let o=require(`vue`),s=require(`naive-ui`);const c=[{key:`github`,label:`GitHub`,icon:`mdi:github`},{key:`wechat`,label:`微信`,icon:`mdi:wechat`},{key:`qq`,label:`QQ`,icon:`mdi:qqchat`}],l={passwordLogin:!0,captchaLogin:!0,qrcodeLogin:!0,socialLogin:!0,register:!0,captchaVerify:!0,rememberMe:!0,forgotPassword:!0},ee={class:`c-login-panel`},te={class:`c-login__header`},ne={key:0,class:`c-login__logo`},re={class:`c-login__title`},ie={key:0,class:`c-login__subtitle`},ae={key:1,class:`c-login__subtitle c-login__subtitle--register`},oe={key:0,class:`c-login__aux-row`},se={class:`c-login__code-row`},u={key:0,class:`c-login__captcha-wrap`},d={key:3,class:`c-login__qr-panel`},ce={class:`c-login__qr-frame`},le={key:1,class:`c-login__qr-placeholder`},f={key:2,class:`c-login__qr-scan-line`},p={class:`c-login__qr-hint`},ue={class:`c-login__code-row`},m={key:7,class:`c-login__mode-switch`},de={class:`c-login__social-row`},fe={key:9,class:`c-login__register-row`},h=(0,o.defineComponent)({__name:`index`,props:{title:{default:`欢迎回来`},subtitle:{},logoIcon:{},features:{},socialProviders:{},qrcodeUrl:{},storageKey:{default:`c_login_remember`},loading:{type:Boolean,default:!1},submitDisabled:{type:Boolean},defaultUsername:{default:``},defaultPassword:{default:``},captchaVerifier:{},captchaProvider:{default:`puzzle-captcha`},captchaChallengeUrl:{},requireCaptchaServerVerification:{type:Boolean,default:!1},captchaVerificationTimeout:{default:1e4}},emits:[`submit`,`captcha-submit`,`send-code`,`social-login`,`forgot-password`,`qrcode-refresh`,`register-submit`,`register-send-code`,`captcha-visible-change`,`username-change`],setup(t,{expose:h,emit:g}){let _=(e,t)=>{let n=globalThis.$t;return n?.(e,t,`robot_admin`)??t},v=(e,t,n)=>[{required:!0,message:`${e}不能为空`,trigger:`blur`},{validator:(e,n)=>!n||typeof n==`string`&&t.test(n),message:n,trigger:`blur`}],y=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,b=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{6,20}$/,x=t,S=g,C=(0,o.computed)(()=>({...x,features:{...l,...x.features},socialProviders:x.socialProviders??c})),w=(0,o.computed)(()=>C.value.features),T=(0,o.computed)(()=>C.value.socialProviders),E=(0,o.ref)(`password`),D=r.t(),O=(0,o.computed)(()=>D.isRunning(E.value)),k=!1,A=0;(0,o.watch)(E,()=>A++,{flush:`sync`});let j=e=>!k&&E.value===e&&!x.loading&&!x.submitDisabled&&(e===`register`||!w.value.captchaVerify||H.value);async function M(e,t,n,r){await D.run(e,async()=>{let i=t.value;if(!i)return;let a=A,o={...n};try{await i.validate()}catch{return}!j(e)||a!==A||i!==t.value||!Object.keys(o).every(e=>o[e]===n[e])||r(o)},()=>j(e))}let N=(0,o.ref)(null),P=(0,o.reactive)({username:x.defaultUsername??``,password:x.defaultPassword??``}),pe={username:[{required:!0,message:_(`cl_username_rule`,`请输入用户名`),trigger:`blur`}],password:[{required:!0,message:_(`cl_password_rule`,`请输入密码`),trigger:`blur`}]};(0,o.watch)(()=>P.username,e=>S(`username-change`,e),{immediate:!0,flush:`sync`});let F=(0,o.ref)(!1);(0,o.watch)([F,()=>P.username],([e])=>{e?i.i(x.storageKey,{username:P.username}):i.r(x.storageKey)}),(0,o.onMounted)(()=>{let e=i.t(x.storageKey);typeof e?.username==`string`&&(P.username=e.username,F.value=!0)});let I=()=>M(`password`,N,P,e=>{S(`submit`,{...e,...H.value?{captchaToken:U.value,captchaTimestamp:W.value,captchaType:G.value,captchaVerifiedBy:K.value}:{}})}),L=(0,o.ref)(null),R=(0,o.reactive)({account:``,code:``}),z=(0,o.ref)(0),B=null,me={account:v(`手机号`,y,`手机号格式错误`),code:[{required:!0,message:_(`cl_code_rule`,`请输入验证码`),trigger:`blur`}]},V=(0,o.ref)(),H=(0,o.ref)(!1),U=(0,o.ref)(``),W=(0,o.ref)(0),G=(0,o.ref)(`puzzle-captcha`),K=(0,o.ref)(),he=e=>{H.value=!0,U.value=e.token,W.value=e.timestamp,G.value=e.type,K.value=e.verifiedBy},ge=()=>{H.value=!1},_e=e=>{H.value=e,e||(U.value=``,W.value=0,G.value=`puzzle-captcha`,K.value=void 0)},ve=()=>{H.value=!1,U.value=``,W.value=0,G.value=`puzzle-captcha`,K.value=void 0,V.value?.reset()},q=()=>M(`captcha`,L,R,e=>S(`captcha-submit`,e)),ye=()=>{let e=R.account.trim();z.value>0||!y.test(e)||(S(`send-code`,e),B&&=(clearInterval(B),null),z.value=60,B=setInterval(()=>{z.value--,z.value<=0&&(clearInterval(B),B=null)},1e3))},J=(0,o.computed)(()=>x.qrcodeUrl?.trim()??``),be=()=>{S(`qrcode-refresh`)},Y=(0,o.ref)(null),X=(0,o.reactive)({phone:``,code:``,password:``,confirmPassword:``}),Z=(0,o.ref)(0),Q=null,xe={phone:v(`手机号`,y,`手机号格式错误`),code:[{required:!0,message:_(`cl_code_rule`,`请输入验证码`),trigger:`blur`}],password:v(`密码`,b,`密码必须包含大小写字母和数字,长度6-20位`),confirmPassword:[{required:!0,message:_(`cl_confirm_pw_rule`,`请再次输入密码`),trigger:`blur`},{validator:(e,t)=>t===X.password?!0:Error(_(`cl_pw_mismatch`,`两次密码输入不一致`)),trigger:`blur`}]},Se=()=>{let e=X.phone.trim();Z.value>0||!y.test(e)||(S(`register-send-code`,e),Q&&=(clearInterval(Q),null),Z.value=60,Q=setInterval(()=>{Z.value--,Z.value<=0&&(clearInterval(Q),Q=null)},1e3))},$=()=>M(`register`,Y,X,e=>S(`register-submit`,e));return(0,o.onUnmounted)(()=>{k=!0,B&&=(clearInterval(B),null),Q&&=(clearInterval(Q),null)}),h({resetCaptcha:ve}),(t,r)=>{let i=s.NInput,c=s.NFormItem,l=s.NCheckbox,h=s.NText,g=s.NForm,v=s.NButton,y=s.NDivider,b=s.NTooltip;return(0,o.openBlock)(),(0,o.createElementBlock)(`div`,ee,[(0,o.createCommentVNode)(` ===== Logo / 标题区 ===== `),(0,o.createElementVNode)(`div`,te,[(0,o.renderSlot)(t.$slots,`logo`,{},()=>[C.value.logoIcon?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,ne,[(0,o.createVNode)(e.t,{name:C.value.logoIcon,size:36,class:`c-login__logo-icon`},null,8,[`name`])])):(0,o.createCommentVNode)(`v-if`,!0)],!0),(0,o.createElementVNode)(`h2`,re,(0,o.toDisplayString)(C.value.title),1),C.value.subtitle&&E.value!==`register`?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,ie,(0,o.toDisplayString)(C.value.subtitle),1)):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` 注册视图的副标题 `),E.value===`register`?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,ae,(0,o.toDisplayString)(_(`cl_register`,`注册账号`)),1)):(0,o.createCommentVNode)(`v-if`,!0)]),(0,o.createCommentVNode)(` ===== 密码登录表单(默认视图) ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`passwordFormRef`,ref:N,model:P,rules:pe,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`username`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:P.username,"onUpdate:value":r[0]||=e=>P.username=e,disabled:x.loading,placeholder:_(`cl_username_ph`,`请输入用户名`),clearable:``},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:account-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`password`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:P.password,"onUpdate:value":r[1]||=e=>P.password=e,disabled:x.loading,type:`password`,"show-password-on":`click`,placeholder:_(`cl_password_ph`,`请输入密码`),clearable:``,onKeyup:(0,o.withKeys)(I,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),(0,o.createCommentVNode)(` 宿主扩展字段只获得账号与忙碌状态,不暴露密码。 `),(0,o.renderSlot)(t.$slots,`password-fields`,{username:P.username,loading:x.loading||O.value},void 0,!0),(0,o.createCommentVNode)(` 记住我 + 忘记密码 `),w.value.rememberMe||w.value.forgotPassword?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,oe,[w.value.rememberMe?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,checked:F.value,"onUpdate:checked":r[2]||=e=>F.value=e,class:`c-login__remember`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_remember`,`记住我`)),1)]),_:1},8,[`checked`])):(0,o.createCommentVNode)(`v-if`,!0),w.value.forgotPassword?((0,o.openBlock)(),(0,o.createBlock)(h,{key:1,class:`c-login__forgot`,onClick:r[3]||=e=>S(`forgot-password`)},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_forgot`,`忘记密码?`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0)])):(0,o.createCommentVNode)(`v-if`,!0)]),_:3},8,[`model`]),[[o.vShow,E.value===`password`]]),(0,o.createCommentVNode)(` ===== 验证码登录表单 ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`captchaFormRef`,ref:L,model:R,rules:me,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`account`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:R.account,"onUpdate:value":r[4]||=e=>R.account=e,placeholder:_(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`code`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,se,[(0,o.createVNode)(i,{value:R.code,"onUpdate:value":r[5]||=e=>R.code=e,placeholder:_(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`,onKeyup:(0,o.withKeys)(q,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),(0,o.createVNode)(v,{disabled:z.value>0||!R.account,class:`c-login__send-code-btn`,onClick:ye},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(z.value>0?`${z.value}s ${_(`cl_resend`,`后重发`)}`:_(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1})]),_:1},8,[`model`]),[[o.vShow,E.value===`captcha`]]),(0,o.createCommentVNode)(` ===== 人机验证拼图(仅密码登录模式) ===== `),w.value.captchaVerify&&E.value===`password`?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,u,[(0,o.createVNode)(n.t,{ref_key:`captchaRef`,ref:V,theme:`dark`,provider:x.captchaProvider,"challenge-url":x.captchaChallengeUrl,verifier:x.captchaVerifier,"require-server-verification":x.requireCaptchaServerVerification,"verification-timeout":x.captchaVerificationTimeout,onSuccess:he,onFail:ge,onChange:_e,onVisibleChange:r[6]||=e=>S(`captcha-visible-change`,e)},null,8,[`provider`,`challenge-url`,`verifier`,`require-server-verification`,`verification-timeout`])])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 登录按钮(密码和验证码模式) ===== `),E.value===`password`||E.value===`captcha`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:1,type:`primary`,block:``,loading:x.loading||O.value,disabled:x.loading||O.value||x.submitDisabled||E.value===`password`&&w.value.captchaVerify&&!H.value,class:`c-login__submit-btn`,onClick:r[7]||=e=>E.value===`password`?I():q()},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(E.value===`password`&&w.value.captchaVerify&&!H.value?_(`cl_verify_first`,`请先完成人机验证`):_(`cl_login_btn`,`登 录`)),1)]),_:1},8,[`loading`,`disabled`])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 返回按钮(验证码子视图) ===== `),E.value===`captcha`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:2,block:``,class:`c-login__back-btn`,onClick:r[8]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 扫码登录面板 ===== `),E.value===`qrcode`?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,d,[(0,o.createElementVNode)(`div`,ce,[J.value?((0,o.openBlock)(),(0,o.createBlock)(a.t,{key:0,value:J.value,size:148,margin:1,"show-border":!1,color:`#ffffff`,"bg-color":`#000000`,"error-correction-level":`M`},null,8,[`value`])):((0,o.openBlock)(),(0,o.createElementBlock)(`div`,le,(0,o.toDisplayString)(_(`cl_qr_missing`,`请配置二维码地址`)),1)),J.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,f)):(0,o.createCommentVNode)(`v-if`,!0),r[18]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--tl`},null,-1),r[19]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--tr`},null,-1),r[20]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--bl`},null,-1),r[21]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--br`},null,-1)]),(0,o.createElementVNode)(`p`,p,[(0,o.createVNode)(e.t,{name:`mdi:cellphone-check`,size:13}),(0,o.createTextVNode)(` `+(0,o.toDisplayString)(_(`cl_qr_hint`,`打开手机扫码后点击「确认」即可登录`)),1)]),(0,o.createVNode)(v,{text:``,size:`tiny`,class:`c-login__qr-refresh`,onClick:be},{icon:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:refresh`,size:12})]),default:(0,o.withCtx)(()=>[(0,o.createTextVNode)(` `+(0,o.toDisplayString)(_(`cl_qr_refresh`,`二维码已失效?点击刷新`)),1)]),_:1})])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 返回按钮(扫码子视图,在二维码下方) ===== `),E.value===`qrcode`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:4,block:``,class:`c-login__back-btn`,onClick:r[9]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册表单 ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`registerFormRef`,ref:Y,model:X,rules:xe,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`phone`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.phone,"onUpdate:value":r[10]||=e=>X.phone=e,placeholder:_(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`code`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,ue,[(0,o.createVNode)(i,{value:X.code,"onUpdate:value":r[11]||=e=>X.code=e,placeholder:_(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),(0,o.createVNode)(v,{disabled:Z.value>0||!X.phone,class:`c-login__send-code-btn`,onClick:Se},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(Z.value>0?`${Z.value}s ${_(`cl_resend`,`后重发`)}`:_(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1}),(0,o.createVNode)(c,{path:`password`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.password,"onUpdate:value":r[12]||=e=>X.password=e,type:`password`,"show-password-on":`click`,placeholder:_(`cl_password_ph`,`请输入密码`)},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`confirmPassword`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.confirmPassword,"onUpdate:value":r[13]||=e=>X.confirmPassword=e,type:`password`,"show-password-on":`click`,placeholder:_(`cl_confirm_pw_ph`,`请再次输入密码`),onKeyup:(0,o.withKeys)($,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-check-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1})]),_:1},8,[`model`]),[[o.vShow,E.value===`register`]]),(0,o.createCommentVNode)(` ===== 注册确认按钮 ===== `),E.value===`register`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:5,type:`primary`,block:``,loading:x.loading||O.value,disabled:x.loading||x.submitDisabled||O.value,class:`c-login__submit-btn`,onClick:$},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_confirm`,`确认`)),1)]),_:1},8,[`loading`,`disabled`])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册视图返回按钮 ===== `),E.value===`register`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:6,block:``,class:`c-login__back-btn`,onClick:r[14]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 登录方式切换(仅密码登录默认视图显示) ===== `),E.value===`password`&&(w.value.captchaLogin||w.value.qrcodeLogin)?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,m,[w.value.captchaLogin?((0,o.openBlock)(),(0,o.createBlock)(v,{key:0,class:`c-login__mode-btn`,size:`small`,onClick:r[15]||=e=>E.value=`captcha`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_captcha_login`,`验证码登录`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),w.value.qrcodeLogin?((0,o.openBlock)(),(0,o.createBlock)(v,{key:1,class:`c-login__mode-btn`,size:`small`,onClick:r[16]||=e=>E.value=`qrcode`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_qr_login`,`扫码登录`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0)])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 其他登录方式(仅密码登录默认视图显示) ===== `),E.value===`password`&&w.value.socialLogin&&T.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:8},[(0,o.createVNode)(y,{class:`c-login__divider`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_social_login`,`其他账号登录`)),1)]),_:1}),(0,o.createElementVNode)(`div`,de,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(T.value,t=>((0,o.openBlock)(),(0,o.createBlock)(b,{key:t.key,trigger:`hover`,placement:`top`},{trigger:(0,o.withCtx)(()=>[(0,o.createVNode)(v,{circle:``,class:`c-login__social-btn`,onClick:e=>S(`social-login`,t.key)},{icon:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:t.icon,size:16},null,8,[`name`])]),_:2},1032,[`onClick`])]),default:(0,o.withCtx)(()=>[(0,o.createTextVNode)(` `+(0,o.toDisplayString)(t.label),1)]),_:2},1024))),128))])],64)):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册入口(仅密码登录默认视图显示) ===== `),E.value===`password`&&w.value.register?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,fe,[(0,o.createVNode)(h,{class:`c-login__register-hint`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_no_account`,`还没有账号?`)),1)]),_:1}),(0,o.createVNode)(h,{class:`c-login__register-link`,onClick:r[17]||=e=>E.value=`register`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_register`,`注册账号`)),1)]),_:1})])):(0,o.createCommentVNode)(`v-if`,!0)])}}});var g=t.t(h,[[`__scopeId`,`data-v-00fdce30`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}});
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`),n=require(`./C_Captcha2.cjs`),r=require(`./useActionTask.cjs`),i=require(`./storage.cjs`),a=require(`./C_QRCode2.cjs`);let o=require(`vue`),s=require(`naive-ui`);const c=[{key:`github`,label:`GitHub`,icon:`mdi:github`},{key:`wechat`,label:`微信`,icon:`mdi:wechat`},{key:`qq`,label:`QQ`,icon:`mdi:qqchat`}],l={passwordLogin:!0,captchaLogin:!0,qrcodeLogin:!0,socialLogin:!0,register:!0,captchaVerify:!0,rememberMe:!0,forgotPassword:!0},ee={class:`c-login-panel`},te={class:`c-login__header`},ne={key:0,class:`c-login__logo`},re={class:`c-login__title`},ie={key:0,class:`c-login__subtitle`},ae={key:1,class:`c-login__subtitle c-login__subtitle--register`},oe={key:0,class:`c-login__aux-row`},se={class:`c-login__code-row`},u={key:0,class:`c-login__captcha-wrap`},d={key:3,class:`c-login__qr-panel`},ce={class:`c-login__qr-frame`},le={key:1,class:`c-login__qr-placeholder`},f={key:2,class:`c-login__qr-scan-line`},p={class:`c-login__qr-hint`},ue={class:`c-login__code-row`},m={key:7,class:`c-login__mode-switch`},de={class:`c-login__social-row`},fe={key:9,class:`c-login__register-row`},h=(0,o.defineComponent)({__name:`index`,props:{title:{default:`欢迎回来`},subtitle:{},logoIcon:{},features:{},socialProviders:{},qrcodeUrl:{},storageKey:{default:`c_login_remember`},loading:{type:Boolean,default:!1},submitDisabled:{type:Boolean},defaultUsername:{default:``},defaultPassword:{default:``},captchaVerifier:{},captchaProvider:{default:`puzzle-captcha`},captchaChallengeUrl:{},requireCaptchaServerVerification:{type:Boolean,default:!1},captchaVerificationTimeout:{default:1e4}},emits:[`submit`,`captcha-submit`,`send-code`,`social-login`,`forgot-password`,`qrcode-refresh`,`register-submit`,`register-send-code`,`captcha-visible-change`,`username-change`],setup(t,{expose:h,emit:g}){let _=(e,t)=>{let n=globalThis.$t;return n?.(e,t,`robot_admin`)??t},v=(e,t,n)=>[{required:!0,message:`${e}不能为空`,trigger:`blur`},{validator:(e,n)=>!n||typeof n==`string`&&t.test(n),message:n,trigger:`blur`}],y=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,b=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{6,20}$/,x=t,S=g,C=(0,o.computed)(()=>({...x,features:{...l,...x.features},socialProviders:x.socialProviders??c})),w=(0,o.computed)(()=>C.value.features),T=(0,o.computed)(()=>C.value.socialProviders),E=(0,o.ref)(`password`),D=r.t(),O=(0,o.computed)(()=>D.isRunning(E.value)),k=!1,A=0;(0,o.watch)(E,()=>A++,{flush:`sync`});let j=e=>!k&&E.value===e&&!x.loading&&!x.submitDisabled&&(e!==`password`||!w.value.captchaVerify||H.value);async function M(e,t,n,r){await D.run(e,async()=>{let i=t.value;if(!i)return;let a=A,o={...n};try{await i.validate()}catch{return}!j(e)||a!==A||i!==t.value||!Object.keys(o).every(e=>o[e]===n[e])||r(o)},()=>j(e))}let N=(0,o.ref)(null),P=(0,o.reactive)({username:x.defaultUsername??``,password:x.defaultPassword??``}),pe={username:[{required:!0,message:_(`cl_username_rule`,`请输入用户名`),trigger:`blur`}],password:[{required:!0,message:_(`cl_password_rule`,`请输入密码`),trigger:`blur`}]};(0,o.watch)(()=>P.username,e=>S(`username-change`,e),{immediate:!0,flush:`sync`});let F=(0,o.ref)(!1);(0,o.watch)([F,()=>P.username],([e])=>{e?i.i(x.storageKey,{username:P.username}):i.r(x.storageKey)}),(0,o.onMounted)(()=>{let e=i.t(x.storageKey);typeof e?.username==`string`&&(P.username=e.username,F.value=!0)});let I=()=>M(`password`,N,P,e=>{S(`submit`,{...e,...H.value?{captchaToken:U.value,captchaTimestamp:W.value,captchaType:G.value,captchaVerifiedBy:K.value}:{}})}),L=(0,o.ref)(null),R=(0,o.reactive)({account:``,code:``}),z=(0,o.ref)(0),B=null,me={account:v(`手机号`,y,`手机号格式错误`),code:[{required:!0,message:_(`cl_code_rule`,`请输入验证码`),trigger:`blur`}]},V=(0,o.ref)(),H=(0,o.ref)(!1),U=(0,o.ref)(``),W=(0,o.ref)(0),G=(0,o.ref)(`puzzle-captcha`),K=(0,o.ref)(),he=e=>{H.value=!0,U.value=e.token,W.value=e.timestamp,G.value=e.type,K.value=e.verifiedBy},ge=()=>{H.value=!1},_e=e=>{H.value=e,e||(U.value=``,W.value=0,G.value=`puzzle-captcha`,K.value=void 0)},ve=()=>{H.value=!1,U.value=``,W.value=0,G.value=`puzzle-captcha`,K.value=void 0,V.value?.reset()},q=()=>M(`captcha`,L,R,e=>S(`captcha-submit`,e)),ye=()=>{let e=R.account.trim();z.value>0||!y.test(e)||(S(`send-code`,e),B&&=(clearInterval(B),null),z.value=60,B=setInterval(()=>{z.value--,z.value<=0&&(clearInterval(B),B=null)},1e3))},J=(0,o.computed)(()=>x.qrcodeUrl?.trim()??``),be=()=>{S(`qrcode-refresh`)},Y=(0,o.ref)(null),X=(0,o.reactive)({phone:``,code:``,password:``,confirmPassword:``}),Z=(0,o.ref)(0),Q=null,xe={phone:v(`手机号`,y,`手机号格式错误`),code:[{required:!0,message:_(`cl_code_rule`,`请输入验证码`),trigger:`blur`}],password:v(`密码`,b,`密码必须包含大小写字母和数字,长度6-20位`),confirmPassword:[{required:!0,message:_(`cl_confirm_pw_rule`,`请再次输入密码`),trigger:`blur`},{validator:(e,t)=>t===X.password?!0:Error(_(`cl_pw_mismatch`,`两次密码输入不一致`)),trigger:`blur`}]},Se=()=>{let e=X.phone.trim();Z.value>0||!y.test(e)||(S(`register-send-code`,e),Q&&=(clearInterval(Q),null),Z.value=60,Q=setInterval(()=>{Z.value--,Z.value<=0&&(clearInterval(Q),Q=null)},1e3))},$=()=>M(`register`,Y,X,e=>S(`register-submit`,e));return(0,o.onUnmounted)(()=>{k=!0,B&&=(clearInterval(B),null),Q&&=(clearInterval(Q),null)}),h({resetCaptcha:ve}),(t,r)=>{let i=s.NInput,c=s.NFormItem,l=s.NCheckbox,h=s.NText,g=s.NForm,v=s.NButton,y=s.NDivider,b=s.NTooltip;return(0,o.openBlock)(),(0,o.createElementBlock)(`div`,ee,[(0,o.createCommentVNode)(` ===== Logo / 标题区 ===== `),(0,o.createElementVNode)(`div`,te,[(0,o.renderSlot)(t.$slots,`logo`,{},()=>[C.value.logoIcon?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,ne,[(0,o.createVNode)(e.t,{name:C.value.logoIcon,size:36,class:`c-login__logo-icon`},null,8,[`name`])])):(0,o.createCommentVNode)(`v-if`,!0)],!0),(0,o.createElementVNode)(`h2`,re,(0,o.toDisplayString)(C.value.title),1),C.value.subtitle&&E.value!==`register`?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,ie,(0,o.toDisplayString)(C.value.subtitle),1)):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` 注册视图的副标题 `),E.value===`register`?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,ae,(0,o.toDisplayString)(_(`cl_register`,`注册账号`)),1)):(0,o.createCommentVNode)(`v-if`,!0)]),(0,o.createCommentVNode)(` ===== 密码登录表单(默认视图) ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`passwordFormRef`,ref:N,model:P,rules:pe,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`username`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:P.username,"onUpdate:value":r[0]||=e=>P.username=e,disabled:x.loading,placeholder:_(`cl_username_ph`,`请输入用户名`),clearable:``},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:account-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`password`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:P.password,"onUpdate:value":r[1]||=e=>P.password=e,disabled:x.loading,type:`password`,"show-password-on":`click`,placeholder:_(`cl_password_ph`,`请输入密码`),clearable:``,onKeyup:(0,o.withKeys)(I,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),(0,o.createCommentVNode)(` 宿主扩展字段只获得账号与忙碌状态,不暴露密码。 `),(0,o.renderSlot)(t.$slots,`password-fields`,{username:P.username,loading:x.loading||O.value},void 0,!0),(0,o.createCommentVNode)(` 记住我 + 忘记密码 `),w.value.rememberMe||w.value.forgotPassword?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,oe,[w.value.rememberMe?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,checked:F.value,"onUpdate:checked":r[2]||=e=>F.value=e,class:`c-login__remember`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_remember`,`记住我`)),1)]),_:1},8,[`checked`])):(0,o.createCommentVNode)(`v-if`,!0),w.value.forgotPassword?((0,o.openBlock)(),(0,o.createBlock)(h,{key:1,class:`c-login__forgot`,onClick:r[3]||=e=>S(`forgot-password`)},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_forgot`,`忘记密码?`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0)])):(0,o.createCommentVNode)(`v-if`,!0)]),_:3},8,[`model`]),[[o.vShow,E.value===`password`]]),(0,o.createCommentVNode)(` ===== 验证码登录表单 ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`captchaFormRef`,ref:L,model:R,rules:me,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`account`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:R.account,"onUpdate:value":r[4]||=e=>R.account=e,placeholder:_(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`code`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,se,[(0,o.createVNode)(i,{value:R.code,"onUpdate:value":r[5]||=e=>R.code=e,placeholder:_(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`,onKeyup:(0,o.withKeys)(q,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),(0,o.createVNode)(v,{disabled:z.value>0||!R.account,class:`c-login__send-code-btn`,onClick:ye},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(z.value>0?`${z.value}s ${_(`cl_resend`,`后重发`)}`:_(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1})]),_:1},8,[`model`]),[[o.vShow,E.value===`captcha`]]),(0,o.createCommentVNode)(` ===== 人机验证拼图(仅密码登录模式) ===== `),w.value.captchaVerify&&E.value===`password`?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,u,[(0,o.createVNode)(n.t,{ref_key:`captchaRef`,ref:V,theme:`dark`,provider:x.captchaProvider,"challenge-url":x.captchaChallengeUrl,verifier:x.captchaVerifier,"require-server-verification":x.requireCaptchaServerVerification,"verification-timeout":x.captchaVerificationTimeout,onSuccess:he,onFail:ge,onChange:_e,onVisibleChange:r[6]||=e=>S(`captcha-visible-change`,e)},null,8,[`provider`,`challenge-url`,`verifier`,`require-server-verification`,`verification-timeout`])])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 登录按钮(密码和验证码模式) ===== `),E.value===`password`||E.value===`captcha`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:1,type:`primary`,block:``,loading:x.loading||O.value,disabled:x.loading||O.value||x.submitDisabled||E.value===`password`&&w.value.captchaVerify&&!H.value,class:`c-login__submit-btn`,onClick:r[7]||=e=>E.value===`password`?I():q()},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(E.value===`password`&&w.value.captchaVerify&&!H.value?_(`cl_verify_first`,`请先完成人机验证`):_(`cl_login_btn`,`登 录`)),1)]),_:1},8,[`loading`,`disabled`])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 返回按钮(验证码子视图) ===== `),E.value===`captcha`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:2,block:``,class:`c-login__back-btn`,onClick:r[8]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 扫码登录面板 ===== `),E.value===`qrcode`?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,d,[(0,o.createElementVNode)(`div`,ce,[J.value?((0,o.openBlock)(),(0,o.createBlock)(a.t,{key:0,value:J.value,size:148,margin:1,"show-border":!1,color:`#ffffff`,"bg-color":`#000000`,"error-correction-level":`M`},null,8,[`value`])):((0,o.openBlock)(),(0,o.createElementBlock)(`div`,le,(0,o.toDisplayString)(_(`cl_qr_missing`,`请配置二维码地址`)),1)),J.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,f)):(0,o.createCommentVNode)(`v-if`,!0),r[18]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--tl`},null,-1),r[19]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--tr`},null,-1),r[20]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--bl`},null,-1),r[21]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--br`},null,-1)]),(0,o.createElementVNode)(`p`,p,[(0,o.createVNode)(e.t,{name:`mdi:cellphone-check`,size:13}),(0,o.createTextVNode)(` `+(0,o.toDisplayString)(_(`cl_qr_hint`,`打开手机扫码后点击「确认」即可登录`)),1)]),(0,o.createVNode)(v,{text:``,size:`tiny`,class:`c-login__qr-refresh`,onClick:be},{icon:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:refresh`,size:12})]),default:(0,o.withCtx)(()=>[(0,o.createTextVNode)(` `+(0,o.toDisplayString)(_(`cl_qr_refresh`,`二维码已失效?点击刷新`)),1)]),_:1})])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 返回按钮(扫码子视图,在二维码下方) ===== `),E.value===`qrcode`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:4,block:``,class:`c-login__back-btn`,onClick:r[9]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册表单 ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`registerFormRef`,ref:Y,model:X,rules:xe,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`phone`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.phone,"onUpdate:value":r[10]||=e=>X.phone=e,placeholder:_(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`code`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,ue,[(0,o.createVNode)(i,{value:X.code,"onUpdate:value":r[11]||=e=>X.code=e,placeholder:_(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),(0,o.createVNode)(v,{disabled:Z.value>0||!X.phone,class:`c-login__send-code-btn`,onClick:Se},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(Z.value>0?`${Z.value}s ${_(`cl_resend`,`后重发`)}`:_(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1}),(0,o.createVNode)(c,{path:`password`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.password,"onUpdate:value":r[12]||=e=>X.password=e,type:`password`,"show-password-on":`click`,placeholder:_(`cl_password_ph`,`请输入密码`)},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`confirmPassword`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.confirmPassword,"onUpdate:value":r[13]||=e=>X.confirmPassword=e,type:`password`,"show-password-on":`click`,placeholder:_(`cl_confirm_pw_ph`,`请再次输入密码`),onKeyup:(0,o.withKeys)($,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-check-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1})]),_:1},8,[`model`]),[[o.vShow,E.value===`register`]]),(0,o.createCommentVNode)(` ===== 注册确认按钮 ===== `),E.value===`register`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:5,type:`primary`,block:``,loading:x.loading||O.value,disabled:x.loading||x.submitDisabled||O.value,class:`c-login__submit-btn`,onClick:$},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_confirm`,`确认`)),1)]),_:1},8,[`loading`,`disabled`])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册视图返回按钮 ===== `),E.value===`register`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:6,block:``,class:`c-login__back-btn`,onClick:r[14]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 登录方式切换(仅密码登录默认视图显示) ===== `),E.value===`password`&&(w.value.captchaLogin||w.value.qrcodeLogin)?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,m,[w.value.captchaLogin?((0,o.openBlock)(),(0,o.createBlock)(v,{key:0,class:`c-login__mode-btn`,size:`small`,onClick:r[15]||=e=>E.value=`captcha`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_captcha_login`,`验证码登录`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),w.value.qrcodeLogin?((0,o.openBlock)(),(0,o.createBlock)(v,{key:1,class:`c-login__mode-btn`,size:`small`,onClick:r[16]||=e=>E.value=`qrcode`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_qr_login`,`扫码登录`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0)])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 其他登录方式(仅密码登录默认视图显示) ===== `),E.value===`password`&&w.value.socialLogin&&T.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:8},[(0,o.createVNode)(y,{class:`c-login__divider`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_social_login`,`其他账号登录`)),1)]),_:1}),(0,o.createElementVNode)(`div`,de,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(T.value,t=>((0,o.openBlock)(),(0,o.createBlock)(b,{key:t.key,trigger:`hover`,placement:`top`},{trigger:(0,o.withCtx)(()=>[(0,o.createVNode)(v,{circle:``,class:`c-login__social-btn`,onClick:e=>S(`social-login`,t.key)},{icon:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:t.icon,size:16},null,8,[`name`])]),_:2},1032,[`onClick`])]),default:(0,o.withCtx)(()=>[(0,o.createTextVNode)(` `+(0,o.toDisplayString)(t.label),1)]),_:2},1024))),128))])],64)):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册入口(仅密码登录默认视图显示) ===== `),E.value===`password`&&w.value.register?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,fe,[(0,o.createVNode)(h,{class:`c-login__register-hint`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_no_account`,`还没有账号?`)),1)]),_:1}),(0,o.createVNode)(h,{class:`c-login__register-link`,onClick:r[17]||=e=>E.value=`register`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_register`,`注册账号`)),1)]),_:1})])):(0,o.createCommentVNode)(`v-if`,!0)])}}});var g=t.t(h,[[`__scopeId`,`data-v-f404fc8e`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}});
|
package/dist/C_Login2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{t as n}from"./C_Captcha2.js";import{t as r}from"./useActionTask.js";import{i,r as a,t as o}from"./storage.js";import{t as ee}from"./C_QRCode2.js";import{Fragment as te,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createTextVNode as f,createVNode as p,defineComponent as m,onMounted as h,onUnmounted as g,openBlock as _,reactive as v,ref as y,renderList as ne,renderSlot as re,resolveComponent as ie,toDisplayString as b,vShow as x,watch as S,withCtx as C,withDirectives as w,withKeys as T}from"vue";import{NButton as ae,NCheckbox as oe,NDivider as se,NForm as ce,NFormItem as le,NInput as ue,NText as de,NTooltip as fe}from"naive-ui";const pe=[{key:`github`,label:`GitHub`,icon:`mdi:github`},{key:`wechat`,label:`微信`,icon:`mdi:wechat`},{key:`qq`,label:`QQ`,icon:`mdi:qqchat`}],me={passwordLogin:!0,captchaLogin:!0,qrcodeLogin:!0,socialLogin:!0,register:!0,captchaVerify:!0,rememberMe:!0,forgotPassword:!0},he={class:`c-login-panel`},ge={class:`c-login__header`},_e={key:0,class:`c-login__logo`},ve={class:`c-login__title`},ye={key:0,class:`c-login__subtitle`},be={key:1,class:`c-login__subtitle c-login__subtitle--register`},xe={key:0,class:`c-login__aux-row`},Se={class:`c-login__code-row`},Ce={key:0,class:`c-login__captcha-wrap`},we={key:3,class:`c-login__qr-panel`},Te={class:`c-login__qr-frame`},Ee={key:1,class:`c-login__qr-placeholder`},De={key:2,class:`c-login__qr-scan-line`},Oe={class:`c-login__qr-hint`},ke={class:`c-login__code-row`},Ae={key:7,class:`c-login__mode-switch`},je={class:`c-login__social-row`},Me={key:9,class:`c-login__register-row`};var E=t(m({__name:`index`,props:{title:{default:`欢迎回来`},subtitle:{},logoIcon:{},features:{},socialProviders:{},qrcodeUrl:{},storageKey:{default:`c_login_remember`},loading:{type:Boolean,default:!1},submitDisabled:{type:Boolean},defaultUsername:{default:``},defaultPassword:{default:``},captchaVerifier:{},captchaProvider:{default:`puzzle-captcha`},captchaChallengeUrl:{},requireCaptchaServerVerification:{type:Boolean,default:!1},captchaVerificationTimeout:{default:1e4}},emits:[`submit`,`captcha-submit`,`send-code`,`social-login`,`forgot-password`,`qrcode-refresh`,`register-submit`,`register-send-code`,`captcha-visible-change`,`username-change`],setup(t,{expose:m,emit:ie}){let E=(e,t)=>{let n=globalThis.$t;return n?.(e,t,`robot_admin`)??t},D=(e,t,n)=>[{required:!0,message:`${e}不能为空`,trigger:`blur`},{validator:(e,n)=>!n||typeof n==`string`&&t.test(n),message:n,trigger:`blur`}],O=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,Ne=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{6,20}$/,k=t,A=ie,j=s(()=>({...k,features:{...me,...k.features},socialProviders:k.socialProviders??pe})),M=s(()=>j.value.features),Pe=s(()=>j.value.socialProviders),N=y(`password`),Fe=r(),P=s(()=>Fe.isRunning(N.value)),Ie=!1,F=0;S(N,()=>F++,{flush:`sync`});let I=e=>!Ie&&N.value===e&&!k.loading&&!k.submitDisabled&&(e===`register`||!M.value.captchaVerify||G.value);async function L(e,t,n,r){await Fe.run(e,async()=>{let i=t.value;if(!i)return;let a=F,o={...n};try{await i.validate()}catch{return}!I(e)||a!==F||i!==t.value||!Object.keys(o).every(e=>o[e]===n[e])||r(o)},()=>I(e))}let R=y(null),z=v({username:k.defaultUsername??``,password:k.defaultPassword??``}),Le={username:[{required:!0,message:E(`cl_username_rule`,`请输入用户名`),trigger:`blur`}],password:[{required:!0,message:E(`cl_password_rule`,`请输入密码`),trigger:`blur`}]};S(()=>z.username,e=>A(`username-change`,e),{immediate:!0,flush:`sync`});let B=y(!1);S([B,()=>z.username],([e])=>{e?i(k.storageKey,{username:z.username}):a(k.storageKey)}),h(()=>{let e=o(k.storageKey);typeof e?.username==`string`&&(z.username=e.username,B.value=!0)});let Re=()=>L(`password`,R,z,e=>{A(`submit`,{...e,...G.value?{captchaToken:K.value,captchaTimestamp:q.value,captchaType:J.value,captchaVerifiedBy:Y.value}:{}})}),ze=y(null),V=v({account:``,code:``}),H=y(0),U=null,Be={account:D(`手机号`,O,`手机号格式错误`),code:[{required:!0,message:E(`cl_code_rule`,`请输入验证码`),trigger:`blur`}]},W=y(),G=y(!1),K=y(``),q=y(0),J=y(`puzzle-captcha`),Y=y(),Ve=e=>{G.value=!0,K.value=e.token,q.value=e.timestamp,J.value=e.type,Y.value=e.verifiedBy},He=()=>{G.value=!1},Ue=e=>{G.value=e,e||(K.value=``,q.value=0,J.value=`puzzle-captcha`,Y.value=void 0)},We=()=>{G.value=!1,K.value=``,q.value=0,J.value=`puzzle-captcha`,Y.value=void 0,W.value?.reset()},Ge=()=>L(`captcha`,ze,V,e=>A(`captcha-submit`,e)),Ke=()=>{let e=V.account.trim();H.value>0||!O.test(e)||(A(`send-code`,e),U&&=(clearInterval(U),null),H.value=60,U=setInterval(()=>{H.value--,H.value<=0&&(clearInterval(U),U=null)},1e3))},X=s(()=>k.qrcodeUrl?.trim()??``),qe=()=>{A(`qrcode-refresh`)},Je=y(null),Z=v({phone:``,code:``,password:``,confirmPassword:``}),Q=y(0),$=null,Ye={phone:D(`手机号`,O,`手机号格式错误`),code:[{required:!0,message:E(`cl_code_rule`,`请输入验证码`),trigger:`blur`}],password:D(`密码`,Ne,`密码必须包含大小写字母和数字,长度6-20位`),confirmPassword:[{required:!0,message:E(`cl_confirm_pw_rule`,`请再次输入密码`),trigger:`blur`},{validator:(e,t)=>t===Z.password?!0:Error(E(`cl_pw_mismatch`,`两次密码输入不一致`)),trigger:`blur`}]},Xe=()=>{let e=Z.phone.trim();Q.value>0||!O.test(e)||(A(`register-send-code`,e),$&&=(clearInterval($),null),Q.value=60,$=setInterval(()=>{Q.value--,Q.value<=0&&(clearInterval($),$=null)},1e3))},Ze=()=>L(`register`,Je,Z,e=>A(`register-submit`,e));return g(()=>{Ie=!0,U&&=(clearInterval(U),null),$&&=(clearInterval($),null)}),m({resetCaptcha:We}),(t,r)=>{let i=ue,a=le,o=oe,s=de,m=ce,h=ae,g=se,v=fe;return _(),u(`div`,he,[l(` ===== Logo / 标题区 ===== `),d(`div`,ge,[re(t.$slots,`logo`,{},()=>[j.value.logoIcon?(_(),u(`div`,_e,[p(e,{name:j.value.logoIcon,size:36,class:`c-login__logo-icon`},null,8,[`name`])])):l(`v-if`,!0)],!0),d(`h2`,ve,b(j.value.title),1),j.value.subtitle&&N.value!==`register`?(_(),u(`p`,ye,b(j.value.subtitle),1)):l(`v-if`,!0),l(` 注册视图的副标题 `),N.value===`register`?(_(),u(`p`,be,b(E(`cl_register`,`注册账号`)),1)):l(`v-if`,!0)]),l(` ===== 密码登录表单(默认视图) ===== `),w(p(m,{ref_key:`passwordFormRef`,ref:R,model:z,rules:Le,class:`c-login__form`},{default:C(()=>[p(a,{path:`username`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:z.username,"onUpdate:value":r[0]||=e=>z.username=e,disabled:k.loading,placeholder:E(`cl_username_ph`,`请输入用户名`),clearable:``},{prefix:C(()=>[p(e,{name:`mdi:account-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),p(a,{path:`password`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:z.password,"onUpdate:value":r[1]||=e=>z.password=e,disabled:k.loading,type:`password`,"show-password-on":`click`,placeholder:E(`cl_password_ph`,`请输入密码`),clearable:``,onKeyup:T(Re,[`enter`])},{prefix:C(()=>[p(e,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),l(` 宿主扩展字段只获得账号与忙碌状态,不暴露密码。 `),re(t.$slots,`password-fields`,{username:z.username,loading:k.loading||P.value},void 0,!0),l(` 记住我 + 忘记密码 `),M.value.rememberMe||M.value.forgotPassword?(_(),u(`div`,xe,[M.value.rememberMe?(_(),c(o,{key:0,checked:B.value,"onUpdate:checked":r[2]||=e=>B.value=e,class:`c-login__remember`},{default:C(()=>[f(b(E(`cl_remember`,`记住我`)),1)]),_:1},8,[`checked`])):l(`v-if`,!0),M.value.forgotPassword?(_(),c(s,{key:1,class:`c-login__forgot`,onClick:r[3]||=e=>A(`forgot-password`)},{default:C(()=>[f(b(E(`cl_forgot`,`忘记密码?`)),1)]),_:1})):l(`v-if`,!0)])):l(`v-if`,!0)]),_:3},8,[`model`]),[[x,N.value===`password`]]),l(` ===== 验证码登录表单 ===== `),w(p(m,{ref_key:`captchaFormRef`,ref:ze,model:V,rules:Be,class:`c-login__form`},{default:C(()=>[p(a,{path:`account`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:V.account,"onUpdate:value":r[4]||=e=>V.account=e,placeholder:E(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:C(()=>[p(e,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),p(a,{path:`code`,class:`c-login__form-item`},{default:C(()=>[d(`div`,Se,[p(i,{value:V.code,"onUpdate:value":r[5]||=e=>V.code=e,placeholder:E(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`,onKeyup:T(Ge,[`enter`])},{prefix:C(()=>[p(e,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),p(h,{disabled:H.value>0||!V.account,class:`c-login__send-code-btn`,onClick:Ke},{default:C(()=>[f(b(H.value>0?`${H.value}s ${E(`cl_resend`,`后重发`)}`:E(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1})]),_:1},8,[`model`]),[[x,N.value===`captcha`]]),l(` ===== 人机验证拼图(仅密码登录模式) ===== `),M.value.captchaVerify&&N.value===`password`?(_(),u(`div`,Ce,[p(n,{ref_key:`captchaRef`,ref:W,theme:`dark`,provider:k.captchaProvider,"challenge-url":k.captchaChallengeUrl,verifier:k.captchaVerifier,"require-server-verification":k.requireCaptchaServerVerification,"verification-timeout":k.captchaVerificationTimeout,onSuccess:Ve,onFail:He,onChange:Ue,onVisibleChange:r[6]||=e=>A(`captcha-visible-change`,e)},null,8,[`provider`,`challenge-url`,`verifier`,`require-server-verification`,`verification-timeout`])])):l(`v-if`,!0),l(` ===== 登录按钮(密码和验证码模式) ===== `),N.value===`password`||N.value===`captcha`?(_(),c(h,{key:1,type:`primary`,block:``,loading:k.loading||P.value,disabled:k.loading||P.value||k.submitDisabled||N.value===`password`&&M.value.captchaVerify&&!G.value,class:`c-login__submit-btn`,onClick:r[7]||=e=>N.value===`password`?Re():Ge()},{default:C(()=>[f(b(N.value===`password`&&M.value.captchaVerify&&!G.value?E(`cl_verify_first`,`请先完成人机验证`):E(`cl_login_btn`,`登 录`)),1)]),_:1},8,[`loading`,`disabled`])):l(`v-if`,!0),l(` ===== 返回按钮(验证码子视图) ===== `),N.value===`captcha`?(_(),c(h,{key:2,block:``,class:`c-login__back-btn`,onClick:r[8]||=e=>N.value=`password`},{default:C(()=>[f(b(E(`cl_back`,`返回`)),1)]),_:1})):l(`v-if`,!0),l(` ===== 扫码登录面板 ===== `),N.value===`qrcode`?(_(),u(`div`,we,[d(`div`,Te,[X.value?(_(),c(ee,{key:0,value:X.value,size:148,margin:1,"show-border":!1,color:`#ffffff`,"bg-color":`#000000`,"error-correction-level":`M`},null,8,[`value`])):(_(),u(`div`,Ee,b(E(`cl_qr_missing`,`请配置二维码地址`)),1)),X.value?(_(),u(`div`,De)):l(`v-if`,!0),r[18]||=d(`div`,{class:`c-login__qr-corner c-login__qr-corner--tl`},null,-1),r[19]||=d(`div`,{class:`c-login__qr-corner c-login__qr-corner--tr`},null,-1),r[20]||=d(`div`,{class:`c-login__qr-corner c-login__qr-corner--bl`},null,-1),r[21]||=d(`div`,{class:`c-login__qr-corner c-login__qr-corner--br`},null,-1)]),d(`p`,Oe,[p(e,{name:`mdi:cellphone-check`,size:13}),f(` `+b(E(`cl_qr_hint`,`打开手机扫码后点击「确认」即可登录`)),1)]),p(h,{text:``,size:`tiny`,class:`c-login__qr-refresh`,onClick:qe},{icon:C(()=>[p(e,{name:`mdi:refresh`,size:12})]),default:C(()=>[f(` `+b(E(`cl_qr_refresh`,`二维码已失效?点击刷新`)),1)]),_:1})])):l(`v-if`,!0),l(` ===== 返回按钮(扫码子视图,在二维码下方) ===== `),N.value===`qrcode`?(_(),c(h,{key:4,block:``,class:`c-login__back-btn`,onClick:r[9]||=e=>N.value=`password`},{default:C(()=>[f(b(E(`cl_back`,`返回`)),1)]),_:1})):l(`v-if`,!0),l(` ===== 注册表单 ===== `),w(p(m,{ref_key:`registerFormRef`,ref:Je,model:Z,rules:Ye,class:`c-login__form`},{default:C(()=>[p(a,{path:`phone`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:Z.phone,"onUpdate:value":r[10]||=e=>Z.phone=e,placeholder:E(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:C(()=>[p(e,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),p(a,{path:`code`,class:`c-login__form-item`},{default:C(()=>[d(`div`,ke,[p(i,{value:Z.code,"onUpdate:value":r[11]||=e=>Z.code=e,placeholder:E(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`},{prefix:C(()=>[p(e,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),p(h,{disabled:Q.value>0||!Z.phone,class:`c-login__send-code-btn`,onClick:Xe},{default:C(()=>[f(b(Q.value>0?`${Q.value}s ${E(`cl_resend`,`后重发`)}`:E(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1}),p(a,{path:`password`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:Z.password,"onUpdate:value":r[12]||=e=>Z.password=e,type:`password`,"show-password-on":`click`,placeholder:E(`cl_password_ph`,`请输入密码`)},{prefix:C(()=>[p(e,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),p(a,{path:`confirmPassword`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:Z.confirmPassword,"onUpdate:value":r[13]||=e=>Z.confirmPassword=e,type:`password`,"show-password-on":`click`,placeholder:E(`cl_confirm_pw_ph`,`请再次输入密码`),onKeyup:T(Ze,[`enter`])},{prefix:C(()=>[p(e,{name:`mdi:lock-check-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1})]),_:1},8,[`model`]),[[x,N.value===`register`]]),l(` ===== 注册确认按钮 ===== `),N.value===`register`?(_(),c(h,{key:5,type:`primary`,block:``,loading:k.loading||P.value,disabled:k.loading||k.submitDisabled||P.value,class:`c-login__submit-btn`,onClick:Ze},{default:C(()=>[f(b(E(`cl_confirm`,`确认`)),1)]),_:1},8,[`loading`,`disabled`])):l(`v-if`,!0),l(` ===== 注册视图返回按钮 ===== `),N.value===`register`?(_(),c(h,{key:6,block:``,class:`c-login__back-btn`,onClick:r[14]||=e=>N.value=`password`},{default:C(()=>[f(b(E(`cl_back`,`返回`)),1)]),_:1})):l(`v-if`,!0),l(` ===== 登录方式切换(仅密码登录默认视图显示) ===== `),N.value===`password`&&(M.value.captchaLogin||M.value.qrcodeLogin)?(_(),u(`div`,Ae,[M.value.captchaLogin?(_(),c(h,{key:0,class:`c-login__mode-btn`,size:`small`,onClick:r[15]||=e=>N.value=`captcha`},{default:C(()=>[f(b(E(`cl_captcha_login`,`验证码登录`)),1)]),_:1})):l(`v-if`,!0),M.value.qrcodeLogin?(_(),c(h,{key:1,class:`c-login__mode-btn`,size:`small`,onClick:r[16]||=e=>N.value=`qrcode`},{default:C(()=>[f(b(E(`cl_qr_login`,`扫码登录`)),1)]),_:1})):l(`v-if`,!0)])):l(`v-if`,!0),l(` ===== 其他登录方式(仅密码登录默认视图显示) ===== `),N.value===`password`&&M.value.socialLogin&&Pe.value.length?(_(),u(te,{key:8},[p(g,{class:`c-login__divider`},{default:C(()=>[f(b(E(`cl_social_login`,`其他账号登录`)),1)]),_:1}),d(`div`,je,[(_(!0),u(te,null,ne(Pe.value,t=>(_(),c(v,{key:t.key,trigger:`hover`,placement:`top`},{trigger:C(()=>[p(h,{circle:``,class:`c-login__social-btn`,onClick:e=>A(`social-login`,t.key)},{icon:C(()=>[p(e,{name:t.icon,size:16},null,8,[`name`])]),_:2},1032,[`onClick`])]),default:C(()=>[f(` `+b(t.label),1)]),_:2},1024))),128))])],64)):l(`v-if`,!0),l(` ===== 注册入口(仅密码登录默认视图显示) ===== `),N.value===`password`&&M.value.register?(_(),u(`div`,Me,[p(s,{class:`c-login__register-hint`},{default:C(()=>[f(b(E(`cl_no_account`,`还没有账号?`)),1)]),_:1}),p(s,{class:`c-login__register-link`,onClick:r[17]||=e=>N.value=`register`},{default:C(()=>[f(b(E(`cl_register`,`注册账号`)),1)]),_:1})])):l(`v-if`,!0)])}}}),[[`__scopeId`,`data-v-00fdce30`]]);export{me as n,pe as r,E as t};
|
|
1
|
+
import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{t as n}from"./C_Captcha2.js";import{t as r}from"./useActionTask.js";import{i,r as a,t as o}from"./storage.js";import{t as ee}from"./C_QRCode2.js";import{Fragment as te,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createTextVNode as f,createVNode as p,defineComponent as m,onMounted as h,onUnmounted as g,openBlock as _,reactive as v,ref as y,renderList as ne,renderSlot as re,resolveComponent as ie,toDisplayString as b,vShow as x,watch as S,withCtx as C,withDirectives as w,withKeys as T}from"vue";import{NButton as ae,NCheckbox as oe,NDivider as se,NForm as ce,NFormItem as le,NInput as ue,NText as de,NTooltip as fe}from"naive-ui";const pe=[{key:`github`,label:`GitHub`,icon:`mdi:github`},{key:`wechat`,label:`微信`,icon:`mdi:wechat`},{key:`qq`,label:`QQ`,icon:`mdi:qqchat`}],me={passwordLogin:!0,captchaLogin:!0,qrcodeLogin:!0,socialLogin:!0,register:!0,captchaVerify:!0,rememberMe:!0,forgotPassword:!0},he={class:`c-login-panel`},ge={class:`c-login__header`},_e={key:0,class:`c-login__logo`},ve={class:`c-login__title`},ye={key:0,class:`c-login__subtitle`},be={key:1,class:`c-login__subtitle c-login__subtitle--register`},xe={key:0,class:`c-login__aux-row`},Se={class:`c-login__code-row`},Ce={key:0,class:`c-login__captcha-wrap`},we={key:3,class:`c-login__qr-panel`},Te={class:`c-login__qr-frame`},Ee={key:1,class:`c-login__qr-placeholder`},De={key:2,class:`c-login__qr-scan-line`},Oe={class:`c-login__qr-hint`},ke={class:`c-login__code-row`},Ae={key:7,class:`c-login__mode-switch`},je={class:`c-login__social-row`},Me={key:9,class:`c-login__register-row`};var E=t(m({__name:`index`,props:{title:{default:`欢迎回来`},subtitle:{},logoIcon:{},features:{},socialProviders:{},qrcodeUrl:{},storageKey:{default:`c_login_remember`},loading:{type:Boolean,default:!1},submitDisabled:{type:Boolean},defaultUsername:{default:``},defaultPassword:{default:``},captchaVerifier:{},captchaProvider:{default:`puzzle-captcha`},captchaChallengeUrl:{},requireCaptchaServerVerification:{type:Boolean,default:!1},captchaVerificationTimeout:{default:1e4}},emits:[`submit`,`captcha-submit`,`send-code`,`social-login`,`forgot-password`,`qrcode-refresh`,`register-submit`,`register-send-code`,`captcha-visible-change`,`username-change`],setup(t,{expose:m,emit:ie}){let E=(e,t)=>{let n=globalThis.$t;return n?.(e,t,`robot_admin`)??t},D=(e,t,n)=>[{required:!0,message:`${e}不能为空`,trigger:`blur`},{validator:(e,n)=>!n||typeof n==`string`&&t.test(n),message:n,trigger:`blur`}],O=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,Ne=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{6,20}$/,k=t,A=ie,j=s(()=>({...k,features:{...me,...k.features},socialProviders:k.socialProviders??pe})),M=s(()=>j.value.features),Pe=s(()=>j.value.socialProviders),N=y(`password`),Fe=r(),P=s(()=>Fe.isRunning(N.value)),Ie=!1,F=0;S(N,()=>F++,{flush:`sync`});let I=e=>!Ie&&N.value===e&&!k.loading&&!k.submitDisabled&&(e!==`password`||!M.value.captchaVerify||G.value);async function L(e,t,n,r){await Fe.run(e,async()=>{let i=t.value;if(!i)return;let a=F,o={...n};try{await i.validate()}catch{return}!I(e)||a!==F||i!==t.value||!Object.keys(o).every(e=>o[e]===n[e])||r(o)},()=>I(e))}let R=y(null),z=v({username:k.defaultUsername??``,password:k.defaultPassword??``}),Le={username:[{required:!0,message:E(`cl_username_rule`,`请输入用户名`),trigger:`blur`}],password:[{required:!0,message:E(`cl_password_rule`,`请输入密码`),trigger:`blur`}]};S(()=>z.username,e=>A(`username-change`,e),{immediate:!0,flush:`sync`});let B=y(!1);S([B,()=>z.username],([e])=>{e?i(k.storageKey,{username:z.username}):a(k.storageKey)}),h(()=>{let e=o(k.storageKey);typeof e?.username==`string`&&(z.username=e.username,B.value=!0)});let Re=()=>L(`password`,R,z,e=>{A(`submit`,{...e,...G.value?{captchaToken:K.value,captchaTimestamp:q.value,captchaType:J.value,captchaVerifiedBy:Y.value}:{}})}),ze=y(null),V=v({account:``,code:``}),H=y(0),U=null,Be={account:D(`手机号`,O,`手机号格式错误`),code:[{required:!0,message:E(`cl_code_rule`,`请输入验证码`),trigger:`blur`}]},W=y(),G=y(!1),K=y(``),q=y(0),J=y(`puzzle-captcha`),Y=y(),Ve=e=>{G.value=!0,K.value=e.token,q.value=e.timestamp,J.value=e.type,Y.value=e.verifiedBy},He=()=>{G.value=!1},Ue=e=>{G.value=e,e||(K.value=``,q.value=0,J.value=`puzzle-captcha`,Y.value=void 0)},We=()=>{G.value=!1,K.value=``,q.value=0,J.value=`puzzle-captcha`,Y.value=void 0,W.value?.reset()},Ge=()=>L(`captcha`,ze,V,e=>A(`captcha-submit`,e)),Ke=()=>{let e=V.account.trim();H.value>0||!O.test(e)||(A(`send-code`,e),U&&=(clearInterval(U),null),H.value=60,U=setInterval(()=>{H.value--,H.value<=0&&(clearInterval(U),U=null)},1e3))},X=s(()=>k.qrcodeUrl?.trim()??``),qe=()=>{A(`qrcode-refresh`)},Je=y(null),Z=v({phone:``,code:``,password:``,confirmPassword:``}),Q=y(0),$=null,Ye={phone:D(`手机号`,O,`手机号格式错误`),code:[{required:!0,message:E(`cl_code_rule`,`请输入验证码`),trigger:`blur`}],password:D(`密码`,Ne,`密码必须包含大小写字母和数字,长度6-20位`),confirmPassword:[{required:!0,message:E(`cl_confirm_pw_rule`,`请再次输入密码`),trigger:`blur`},{validator:(e,t)=>t===Z.password?!0:Error(E(`cl_pw_mismatch`,`两次密码输入不一致`)),trigger:`blur`}]},Xe=()=>{let e=Z.phone.trim();Q.value>0||!O.test(e)||(A(`register-send-code`,e),$&&=(clearInterval($),null),Q.value=60,$=setInterval(()=>{Q.value--,Q.value<=0&&(clearInterval($),$=null)},1e3))},Ze=()=>L(`register`,Je,Z,e=>A(`register-submit`,e));return g(()=>{Ie=!0,U&&=(clearInterval(U),null),$&&=(clearInterval($),null)}),m({resetCaptcha:We}),(t,r)=>{let i=ue,a=le,o=oe,s=de,m=ce,h=ae,g=se,v=fe;return _(),u(`div`,he,[l(` ===== Logo / 标题区 ===== `),d(`div`,ge,[re(t.$slots,`logo`,{},()=>[j.value.logoIcon?(_(),u(`div`,_e,[p(e,{name:j.value.logoIcon,size:36,class:`c-login__logo-icon`},null,8,[`name`])])):l(`v-if`,!0)],!0),d(`h2`,ve,b(j.value.title),1),j.value.subtitle&&N.value!==`register`?(_(),u(`p`,ye,b(j.value.subtitle),1)):l(`v-if`,!0),l(` 注册视图的副标题 `),N.value===`register`?(_(),u(`p`,be,b(E(`cl_register`,`注册账号`)),1)):l(`v-if`,!0)]),l(` ===== 密码登录表单(默认视图) ===== `),w(p(m,{ref_key:`passwordFormRef`,ref:R,model:z,rules:Le,class:`c-login__form`},{default:C(()=>[p(a,{path:`username`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:z.username,"onUpdate:value":r[0]||=e=>z.username=e,disabled:k.loading,placeholder:E(`cl_username_ph`,`请输入用户名`),clearable:``},{prefix:C(()=>[p(e,{name:`mdi:account-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),p(a,{path:`password`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:z.password,"onUpdate:value":r[1]||=e=>z.password=e,disabled:k.loading,type:`password`,"show-password-on":`click`,placeholder:E(`cl_password_ph`,`请输入密码`),clearable:``,onKeyup:T(Re,[`enter`])},{prefix:C(()=>[p(e,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),l(` 宿主扩展字段只获得账号与忙碌状态,不暴露密码。 `),re(t.$slots,`password-fields`,{username:z.username,loading:k.loading||P.value},void 0,!0),l(` 记住我 + 忘记密码 `),M.value.rememberMe||M.value.forgotPassword?(_(),u(`div`,xe,[M.value.rememberMe?(_(),c(o,{key:0,checked:B.value,"onUpdate:checked":r[2]||=e=>B.value=e,class:`c-login__remember`},{default:C(()=>[f(b(E(`cl_remember`,`记住我`)),1)]),_:1},8,[`checked`])):l(`v-if`,!0),M.value.forgotPassword?(_(),c(s,{key:1,class:`c-login__forgot`,onClick:r[3]||=e=>A(`forgot-password`)},{default:C(()=>[f(b(E(`cl_forgot`,`忘记密码?`)),1)]),_:1})):l(`v-if`,!0)])):l(`v-if`,!0)]),_:3},8,[`model`]),[[x,N.value===`password`]]),l(` ===== 验证码登录表单 ===== `),w(p(m,{ref_key:`captchaFormRef`,ref:ze,model:V,rules:Be,class:`c-login__form`},{default:C(()=>[p(a,{path:`account`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:V.account,"onUpdate:value":r[4]||=e=>V.account=e,placeholder:E(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:C(()=>[p(e,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),p(a,{path:`code`,class:`c-login__form-item`},{default:C(()=>[d(`div`,Se,[p(i,{value:V.code,"onUpdate:value":r[5]||=e=>V.code=e,placeholder:E(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`,onKeyup:T(Ge,[`enter`])},{prefix:C(()=>[p(e,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),p(h,{disabled:H.value>0||!V.account,class:`c-login__send-code-btn`,onClick:Ke},{default:C(()=>[f(b(H.value>0?`${H.value}s ${E(`cl_resend`,`后重发`)}`:E(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1})]),_:1},8,[`model`]),[[x,N.value===`captcha`]]),l(` ===== 人机验证拼图(仅密码登录模式) ===== `),M.value.captchaVerify&&N.value===`password`?(_(),u(`div`,Ce,[p(n,{ref_key:`captchaRef`,ref:W,theme:`dark`,provider:k.captchaProvider,"challenge-url":k.captchaChallengeUrl,verifier:k.captchaVerifier,"require-server-verification":k.requireCaptchaServerVerification,"verification-timeout":k.captchaVerificationTimeout,onSuccess:Ve,onFail:He,onChange:Ue,onVisibleChange:r[6]||=e=>A(`captcha-visible-change`,e)},null,8,[`provider`,`challenge-url`,`verifier`,`require-server-verification`,`verification-timeout`])])):l(`v-if`,!0),l(` ===== 登录按钮(密码和验证码模式) ===== `),N.value===`password`||N.value===`captcha`?(_(),c(h,{key:1,type:`primary`,block:``,loading:k.loading||P.value,disabled:k.loading||P.value||k.submitDisabled||N.value===`password`&&M.value.captchaVerify&&!G.value,class:`c-login__submit-btn`,onClick:r[7]||=e=>N.value===`password`?Re():Ge()},{default:C(()=>[f(b(N.value===`password`&&M.value.captchaVerify&&!G.value?E(`cl_verify_first`,`请先完成人机验证`):E(`cl_login_btn`,`登 录`)),1)]),_:1},8,[`loading`,`disabled`])):l(`v-if`,!0),l(` ===== 返回按钮(验证码子视图) ===== `),N.value===`captcha`?(_(),c(h,{key:2,block:``,class:`c-login__back-btn`,onClick:r[8]||=e=>N.value=`password`},{default:C(()=>[f(b(E(`cl_back`,`返回`)),1)]),_:1})):l(`v-if`,!0),l(` ===== 扫码登录面板 ===== `),N.value===`qrcode`?(_(),u(`div`,we,[d(`div`,Te,[X.value?(_(),c(ee,{key:0,value:X.value,size:148,margin:1,"show-border":!1,color:`#ffffff`,"bg-color":`#000000`,"error-correction-level":`M`},null,8,[`value`])):(_(),u(`div`,Ee,b(E(`cl_qr_missing`,`请配置二维码地址`)),1)),X.value?(_(),u(`div`,De)):l(`v-if`,!0),r[18]||=d(`div`,{class:`c-login__qr-corner c-login__qr-corner--tl`},null,-1),r[19]||=d(`div`,{class:`c-login__qr-corner c-login__qr-corner--tr`},null,-1),r[20]||=d(`div`,{class:`c-login__qr-corner c-login__qr-corner--bl`},null,-1),r[21]||=d(`div`,{class:`c-login__qr-corner c-login__qr-corner--br`},null,-1)]),d(`p`,Oe,[p(e,{name:`mdi:cellphone-check`,size:13}),f(` `+b(E(`cl_qr_hint`,`打开手机扫码后点击「确认」即可登录`)),1)]),p(h,{text:``,size:`tiny`,class:`c-login__qr-refresh`,onClick:qe},{icon:C(()=>[p(e,{name:`mdi:refresh`,size:12})]),default:C(()=>[f(` `+b(E(`cl_qr_refresh`,`二维码已失效?点击刷新`)),1)]),_:1})])):l(`v-if`,!0),l(` ===== 返回按钮(扫码子视图,在二维码下方) ===== `),N.value===`qrcode`?(_(),c(h,{key:4,block:``,class:`c-login__back-btn`,onClick:r[9]||=e=>N.value=`password`},{default:C(()=>[f(b(E(`cl_back`,`返回`)),1)]),_:1})):l(`v-if`,!0),l(` ===== 注册表单 ===== `),w(p(m,{ref_key:`registerFormRef`,ref:Je,model:Z,rules:Ye,class:`c-login__form`},{default:C(()=>[p(a,{path:`phone`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:Z.phone,"onUpdate:value":r[10]||=e=>Z.phone=e,placeholder:E(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:C(()=>[p(e,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),p(a,{path:`code`,class:`c-login__form-item`},{default:C(()=>[d(`div`,ke,[p(i,{value:Z.code,"onUpdate:value":r[11]||=e=>Z.code=e,placeholder:E(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`},{prefix:C(()=>[p(e,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),p(h,{disabled:Q.value>0||!Z.phone,class:`c-login__send-code-btn`,onClick:Xe},{default:C(()=>[f(b(Q.value>0?`${Q.value}s ${E(`cl_resend`,`后重发`)}`:E(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1}),p(a,{path:`password`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:Z.password,"onUpdate:value":r[12]||=e=>Z.password=e,type:`password`,"show-password-on":`click`,placeholder:E(`cl_password_ph`,`请输入密码`)},{prefix:C(()=>[p(e,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),p(a,{path:`confirmPassword`,class:`c-login__form-item`},{default:C(()=>[p(i,{value:Z.confirmPassword,"onUpdate:value":r[13]||=e=>Z.confirmPassword=e,type:`password`,"show-password-on":`click`,placeholder:E(`cl_confirm_pw_ph`,`请再次输入密码`),onKeyup:T(Ze,[`enter`])},{prefix:C(()=>[p(e,{name:`mdi:lock-check-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1})]),_:1},8,[`model`]),[[x,N.value===`register`]]),l(` ===== 注册确认按钮 ===== `),N.value===`register`?(_(),c(h,{key:5,type:`primary`,block:``,loading:k.loading||P.value,disabled:k.loading||k.submitDisabled||P.value,class:`c-login__submit-btn`,onClick:Ze},{default:C(()=>[f(b(E(`cl_confirm`,`确认`)),1)]),_:1},8,[`loading`,`disabled`])):l(`v-if`,!0),l(` ===== 注册视图返回按钮 ===== `),N.value===`register`?(_(),c(h,{key:6,block:``,class:`c-login__back-btn`,onClick:r[14]||=e=>N.value=`password`},{default:C(()=>[f(b(E(`cl_back`,`返回`)),1)]),_:1})):l(`v-if`,!0),l(` ===== 登录方式切换(仅密码登录默认视图显示) ===== `),N.value===`password`&&(M.value.captchaLogin||M.value.qrcodeLogin)?(_(),u(`div`,Ae,[M.value.captchaLogin?(_(),c(h,{key:0,class:`c-login__mode-btn`,size:`small`,onClick:r[15]||=e=>N.value=`captcha`},{default:C(()=>[f(b(E(`cl_captcha_login`,`验证码登录`)),1)]),_:1})):l(`v-if`,!0),M.value.qrcodeLogin?(_(),c(h,{key:1,class:`c-login__mode-btn`,size:`small`,onClick:r[16]||=e=>N.value=`qrcode`},{default:C(()=>[f(b(E(`cl_qr_login`,`扫码登录`)),1)]),_:1})):l(`v-if`,!0)])):l(`v-if`,!0),l(` ===== 其他登录方式(仅密码登录默认视图显示) ===== `),N.value===`password`&&M.value.socialLogin&&Pe.value.length?(_(),u(te,{key:8},[p(g,{class:`c-login__divider`},{default:C(()=>[f(b(E(`cl_social_login`,`其他账号登录`)),1)]),_:1}),d(`div`,je,[(_(!0),u(te,null,ne(Pe.value,t=>(_(),c(v,{key:t.key,trigger:`hover`,placement:`top`},{trigger:C(()=>[p(h,{circle:``,class:`c-login__social-btn`,onClick:e=>A(`social-login`,t.key)},{icon:C(()=>[p(e,{name:t.icon,size:16},null,8,[`name`])]),_:2},1032,[`onClick`])]),default:C(()=>[f(` `+b(t.label),1)]),_:2},1024))),128))])],64)):l(`v-if`,!0),l(` ===== 注册入口(仅密码登录默认视图显示) ===== `),N.value===`password`&&M.value.register?(_(),u(`div`,Me,[p(s,{class:`c-login__register-hint`},{default:C(()=>[f(b(E(`cl_no_account`,`还没有账号?`)),1)]),_:1}),p(s,{class:`c-login__register-link`,onClick:r[17]||=e=>N.value=`register`},{default:C(()=>[f(b(E(`cl_register`,`注册账号`)),1)]),_:1})])):l(`v-if`,!0)])}}}),[[`__scopeId`,`data-v-f404fc8e`]]);export{me as n,pe as r,E as t};
|
package/dist/C_Markdown.css
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
:root{--c-primary: var(--primary-color, #2080f0);--c-primary-hover: var(--primary-color-hover, #4098fc);--c-primary-pressed: var(--primary-color-pressed, #1060c9);--c-success: var(--success-color, #18a058);--c-warning: var(--warning-color, #f0a020);--c-error: var(--error-color, #d03050);--c-info: var(--info-color, #2080f0);--c-bg-body: var(--body-color, #ffffff);--c-bg-card: var(--card-color, #ffffff);--c-bg-surface: var(--popover-color, #ffffff);--c-text-1: var(--text-color-1, #262626);--c-text-2: var(--text-color-2, #525252);--c-text-3: var(--text-color-3, #a3a3a3);--c-text-4: var(--text-color-4, #c0c0c0);--c-border: var(--border-color, #e5e7eb);--c-radius-sm: var(--border-radius-small, 4px);--c-radius: var(--border-radius, 6px);--c-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);--c-transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);--c-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);--c-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);--c-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1)}
|
|
2
2
|
|
|
3
|
-
@charset "UTF-8";
|
|
4
|
-
@import '@vavt/markdown-theme/css/all.css';
|
|
3
|
+
.md-editor .md-editor-preview{--md-theme-color: var(--md-color);--md-theme-color-reverse: #eee;--md-theme-color-hover: #eee;--md-theme-color-hover-inset: #ddd;--md-theme-link-color: #2d8cf0;--md-theme-link-hover-color: #73d13d;--md-theme-border-color: #e6e6e6;--md-theme-border-color-reverse: #bebebe;--md-theme-border-color-inset: #d6d6d6;--md-theme-bg-color: #fff;--md-theme-bg-color-inset: #ececec;--md-theme-code-copy-tips-color: inherit;--md-theme-code-copy-tips-bg-color: #fff;--md-theme-code-active-color: #61aeee;--md-theme-radius-s: 2px;--md-theme-radius-m: 5px}.md-editor-dark .md-editor-preview{--md-theme-color: var(--md-color);--md-theme-color-reverse: #222;--md-theme-color-hover: #191919;--md-theme-color-hover-inset: #444;--md-theme-link-color: #2d8cf0;--md-theme-link-hover-color: #73d13d;--md-theme-border-color: #2d2d2d;--md-theme-border-color-reverse: #e6e6e6;--md-theme-border-color-inset: #5a5a5a;--md-theme-bg-color: #000;--md-theme-bg-color-inset: #111;--md-theme-code-copy-tips-color: inherit;--md-theme-code-copy-tips-bg-color: #3a3a3a;--md-theme-code-active-color: #e6c07b;--md-theme-radius-s: 2px;--md-theme-radius-m: 5px}.md-editor .md-editor-admonition-note{--md-admonition-color: #212121;--md-admonition-bg-color: #FFFFFF;--md-admonition-border-color: rgb(166.2, 166.2, 166.2)}.md-editor .md-editor-admonition-tip{--md-admonition-color: #616161;--md-admonition-bg-color: #F5F5F5;--md-admonition-border-color: rgb(185.8, 185.8, 185.8)}.md-editor .md-editor-admonition-info{--md-admonition-color: #424242;--md-admonition-bg-color: #F0F0F0;--md-admonition-border-color: rgb(170.4, 170.4, 170.4)}.md-editor .md-editor-admonition-quote{--md-admonition-color: #455a64;--md-admonition-bg-color: #eceff1;--md-admonition-border-color: rgb(169.2, 179.4, 184.6)}.md-editor .md-editor-admonition-abstract{--md-admonition-color: #0288d1;--md-admonition-bg-color: #e1f5fe;--md-admonition-border-color: rgb(135.8, 201.4, 236)}.md-editor .md-editor-admonition-attention{--md-admonition-color: #1e88e5;--md-admonition-bg-color: #e3f2fd;--md-admonition-border-color: rgb(148.2, 199.6, 243.4)}.md-editor .md-editor-admonition-example{--md-admonition-color: #5e35b1;--md-admonition-bg-color: #ede7f6;--md-admonition-border-color: rgb(179.8, 159.8, 218.4)}.md-editor .md-editor-admonition-hint{--md-admonition-color: #00897B;--md-admonition-bg-color: #E0F2F1;--md-admonition-border-color: rgb(134.4, 200, 193.8)}.md-editor .md-editor-admonition-success{--md-admonition-color: #388e3c;--md-admonition-bg-color: #e8f5e9;--md-admonition-border-color: rgb(161.6, 203.8, 163.8)}.md-editor .md-editor-admonition-question{--md-admonition-color: #f9a825;--md-admonition-bg-color: #fffde7;--md-admonition-border-color: rgb(252.6, 219, 153.4)}.md-editor .md-editor-admonition-caution{--md-admonition-color: #fb8c00;--md-admonition-bg-color: #fff8e1;--md-admonition-border-color: rgb(253.4, 204.8, 135)}.md-editor .md-editor-admonition-warning{--md-admonition-color: #f57c00;--md-admonition-bg-color: #fff3e0;--md-admonition-border-color: rgb(251, 195.4, 134.4)}.md-editor .md-editor-admonition-danger{--md-admonition-color: #d84315;--md-admonition-bg-color: #ffebee;--md-admonition-border-color: rgb(239.4, 167.8, 151.2)}.md-editor .md-editor-admonition-failure{--md-admonition-color: #d32f2f;--md-admonition-bg-color: #fee2e6;--md-admonition-border-color: rgb(236.8, 154.4, 156.8)}.md-editor .md-editor-admonition-bug{--md-admonition-color: #c31a1a;--md-admonition-bg-color: #fddadd;--md-admonition-border-color: rgb(229.8, 141.2, 143)}.md-editor .md-editor-admonition-error{--md-admonition-color: #b71c1c;--md-admonition-bg-color: #fdd2d6;--md-admonition-border-color: rgb(225, 137.2, 139.6)}.md-editor-dark .md-editor-admonition-note{--md-admonition-color: #E0E0E0;--md-admonition-bg-color: #1E1E1E;--md-admonition-border-color: rgb(107.6, 107.6, 107.6)}.md-editor-dark .md-editor-admonition-tip{--md-admonition-color: #B0B0B0;--md-admonition-bg-color: #262626;--md-admonition-border-color: rgb(93.2, 93.2, 93.2)}.md-editor-dark .md-editor-admonition-info{--md-admonition-color: #B3B3B3;--md-admonition-bg-color: #2B2B2B;--md-admonition-border-color: rgb(97.4, 97.4, 97.4)}.md-editor-dark .md-editor-admonition-quote{--md-admonition-color: #b0bec5;--md-admonition-bg-color: #263238;--md-admonition-border-color: rgb(93.2, 106, 112.4)}.md-editor-dark .md-editor-admonition-abstract{--md-admonition-color: #81d4fa;--md-admonition-bg-color: #012f45;--md-admonition-border-color: rgb(52.2, 113, 141.4)}.md-editor-dark .md-editor-admonition-attention{--md-admonition-color: #64b5f6;--md-admonition-bg-color: #102a4c;--md-admonition-border-color: rgb(49.6, 97.6, 144)}.md-editor-dark .md-editor-admonition-example{--md-admonition-color: #9575cd;--md-admonition-bg-color: #271b52;--md-admonition-border-color: rgb(83, 63, 131.2)}.md-editor-dark .md-editor-admonition-hint{--md-admonition-color: #4DB6AC;--md-admonition-bg-color: #003D3A;--md-admonition-border-color: rgb(30.8, 109.4, 103.6)}.md-editor-dark .md-editor-admonition-success{--md-admonition-color: #81c784;--md-admonition-bg-color: #1b5e20;--md-admonition-border-color: rgb(67.8, 136, 72)}.md-editor-dark .md-editor-admonition-question{--md-admonition-color: #ffd54f;--md-admonition-bg-color: #3e2f00;--md-admonition-border-color: rgb(139.2, 113.4, 31.6)}.md-editor-dark .md-editor-admonition-caution{--md-admonition-color: #ffcc80;--md-admonition-bg-color: #3e2600;--md-admonition-border-color: rgb(139.2, 104.4, 51.2)}.md-editor-dark .md-editor-admonition-warning{--md-admonition-color: #ffb74d;--md-admonition-bg-color: #3d2600;--md-admonition-border-color: rgb(138.6, 96, 30.8)}.md-editor-dark .md-editor-admonition-danger{--md-admonition-color: #ef9a9a;--md-admonition-bg-color: #3c0000;--md-admonition-border-color: rgb(131.6, 61.6, 61.6)}.md-editor-dark .md-editor-admonition-failure{--md-admonition-color: #ef9a9a;--md-admonition-bg-color: #3c0900;--md-admonition-border-color: rgb(131.6, 67, 61.6)}.md-editor-dark .md-editor-admonition-bug{--md-admonition-color: #e68381;--md-admonition-bg-color: #300000;--md-admonition-border-color: rgb(120.8, 52.4, 51.6)}.md-editor-dark .md-editor-admonition-error{--md-admonition-color: #ef5350;--md-admonition-bg-color: #300000;--md-admonition-border-color: rgb(124.4, 33.2, 32)}.md-editor-preview .md-editor-admonition{background-color:var(--md-admonition-bg-color);border:1px solid var(--md-admonition-border-color);border-radius:var(--md-theme-radius-m);color:var(--md-admonition-color);display:flow-root;font-size:14px;font-weight:400;margin:1rem 0;padding:1em 1em .5em;page-break-inside:avoid}.md-editor-preview .md-editor-admonition-title{margin:0;padding:0;position:relative;font-weight:700}.md-editor-preview .md-editor-admonition p{margin:.5em 0;padding:0}.md-editor-preview .md-editor-admonition p:first-of-type{margin-block-start:0}.md-editor-preview .md-editor-admonition+p:empty,.md-editor-preview .md-editor-admonition+p:empty+p:empty{display:none}.md-editor-preview .md-editor-mermaid{overflow:hidden;line-height:normal}.md-editor-preview .md-editor-mermaid p{line-height:normal}.md-editor-preview .md-editor-mermaid:not([data-processed]){white-space:pre}.md-editor-preview [class=md-editor-mermaid][data-grab]{cursor:grab}.md-editor-preview [class=md-editor-mermaid][data-grab]:active{cursor:grabbing}.md-editor-preview [class=md-editor-mermaid][data-processed]{position:relative;display:flex;justify-content:center;align-items:center}.md-editor-preview [class=md-editor-mermaid][data-processed] svg{transform-origin:top left}.md-editor-preview [class=md-editor-mermaid][data-processed] .md-editor-mermaid-action{position:absolute;inset-block-start:10px;inset-inline-end:10px;z-index:1;opacity:0;transition:opacity .3s;cursor:pointer;display:flex;gap:8px}.md-editor-preview [class=md-editor-mermaid][data-processed] .md-editor-mermaid-action svg{padding:6px;border-radius:4px;background-color:var(--md-bk-color-outstand)}.md-editor-preview [class=md-editor-mermaid][data-processed]:hover .md-editor-mermaid-action{opacity:1}.md-editor-katex-block{text-align:center;margin:20px}.md-editor-katex-inline,.md-editor-katex-block{display:none;direction:ltr}.md-editor-katex-inline[data-processed]{display:initial}.md-editor-katex-block[data-processed]{display:block}.md-editor .md-editor-preview{--md-theme-code-inline-color: #3594f7;--md-theme-code-inline-bg-color: rgba(59, 170, 250, 0.1);--md-theme-code-inline-radius: var(--md-theme-radius-s);--md-theme-code-block-color: #a9b7c6;--md-theme-code-block-bg-color: #282c34;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color);--md-theme-code-block-radius: var(--md-theme-radius-m)}.md-editor-dark .md-editor-preview{--md-theme-code-inline-color: #3594f7;--md-theme-code-inline-bg-color: rgba(59, 170, 250, 0.1);--md-theme-code-inline-radius: var(--md-theme-radius-s);--md-theme-code-block-color: #a9b7c6;--md-theme-code-block-bg-color: #1a1a1a;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color);--md-theme-code-block-radius: var(--md-theme-radius-m)}.md-editor-preview code{direction:ltr;color:var(--md-theme-code-inline-color);background-color:var(--md-theme-code-inline-bg-color);border-radius:var(--md-theme-code-inline-radius);padding:2px 4px;line-height:22px}.md-editor-preview .md-editor-code{color:var(--md-theme-code-block-color);font-size:12px;line-height:1;margin:20px 0;position:relative}.md-editor-preview .md-editor-code input[type=radio],.md-editor-preview .md-editor-code input[type=radio]+pre,.md-editor-preview .md-editor-code input[type=radio]+span.md-editor-code-lang{display:none}.md-editor-preview .md-editor-code input:checked+pre,.md-editor-preview .md-editor-code input:checked+span.md-editor-code-lang{display:block}.md-editor-preview .md-editor-code input:checked+label{border-block-end:1px solid;color:var(--md-theme-code-active-color)}.md-editor-preview .md-editor-code .md-editor-code-head{display:grid;grid-template:"1fr 1fr";justify-content:space-between;height:32px;width:100%;font-size:12px;background-color:var(--md-theme-code-before-bg-color);margin-block-end:0;border-start-start-radius:var(--md-theme-code-block-radius);border-start-end-radius:var(--md-theme-code-block-radius);-webkit-tap-highlight-color:rgba(0,0,0,0);list-style:none;position:sticky;top:0;z-index:10000}.md-editor-preview .md-editor-code .md-editor-code-head::-webkit-details-marker{display:none}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag{margin-inline-start:12px}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag span{display:inline-block;width:10px;height:10px;border-radius:50%;margin-block-start:11px}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag span:nth-of-type(1){background-color:#ec6a5e}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag span:nth-of-type(2){background-color:#f4bf4f}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag span:nth-of-type(3){background-color:#61c554}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag span+span{margin-inline-start:4px}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag ul.md-editor-codetab-label{box-sizing:border-box;white-space:nowrap;user-select:none;background-color:var(--md-theme-code-block-bg-color);margin-block-start:8px;padding:0}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag ul.md-editor-codetab-label li{line-height:1;list-style:none;display:inline-block;position:relative;vertical-align:super;margin:0}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag ul.md-editor-codetab-label li label{cursor:pointer;user-select:none;display:inline-block;font-size:14px}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-flag ul.md-editor-codetab-label li+li{margin-inline-start:12px}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-action{display:flex;align-items:center}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-action>*{margin-inline-end:10px}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-code-lang{line-height:32px}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button:not(data-is-icon){cursor:pointer;line-height:32px;position:initial}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button:not(data-is-icon) .md-editor-icon{width:15px;height:15px;display:inline-block;vertical-align:sub}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon]{cursor:pointer;line-height:1;position:relative}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon] .md-editor-icon{width:15px;height:15px;display:inline-block;vertical-align:sub}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon]::before{content:attr(data-tips);color:var(--md-theme-code-copy-tips-color);background-color:var(--md-theme-code-copy-tips-bg-color);position:absolute;font-size:12px;font-family:sans-serif;width:max-content;text-align:center;padding:4px;border-radius:var(--md-theme-radius-s);box-shadow:0 0 2px rgba(0,0,0,.2);inset-inline-start:-10px;inset-block-start:50%;transform:translate(-100%, -50%)}[dir=rtl] .md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon]::before{transform:translate(100%, -50%)}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon]::after{content:"";color:var(--md-theme-code-copy-tips-bg-color);position:absolute;width:0;height:0;border:5px solid rgba(0,0,0,0);border-inline-end-width:0;border-inline-start-color:currentColor;inset-inline-start:-10px;inset-block-start:50%;transform:translate(0, -50%);filter:drop-shadow(4px 0 2px rgba(0, 0, 0, 0.2))}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon]::before,.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon]::after{visibility:hidden;transition:.3s}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon]:hover::before,.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-copy-button[data-is-icon]:hover::after{visibility:visible}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-collapse-tips{margin-inline-end:12px}.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-collapse-tips .md-editor-icon,.md-editor-preview .md-editor-code .md-editor-code-head .md-editor-collapse-tips .md-editor-iconfont{width:16px;height:16px;font-size:16px;display:inline-block;vertical-align:sub;transition:transform .1s;transform:rotate(0)}[dir=rtl] .md-editor-preview .md-editor-code .md-editor-code-head .md-editor-collapse-tips .md-editor-icon,[dir=rtl] .md-editor-preview .md-editor-code .md-editor-code-head .md-editor-collapse-tips .md-editor-iconfont{transform:rotate(180deg)}.md-editor-preview .md-editor-code pre{position:relative;margin:0}.md-editor-preview .md-editor-code pre code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace;font-size:14px;color:var(--md-theme-code-block-color);background-color:var(--md-theme-code-before-bg-color);display:block;line-height:1.6;overflow:auto;padding:1em;position:relative;border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--md-theme-code-block-radius);border-end-end-radius:var(--md-theme-code-block-radius)}.md-editor-preview .md-editor-code pre code .md-editor-code-block{display:inline-block;width:100%;overflow:auto;vertical-align:bottom;color:var(--md-theme-code-block-color)}.md-editor-preview details.md-editor-code .md-editor-code-head{cursor:pointer}.md-editor-preview details.md-editor-code:not(open) .md-editor-code-head{border-end-start-radius:var(--md-theme-code-block-radius);border-end-end-radius:var(--md-theme-code-block-radius)}.md-editor-preview details.md-editor-code[open] .md-editor-code-head{border-end-start-radius:0;border-end-end-radius:0}.md-editor-preview details.md-editor-code[open] .md-editor-code-head .md-editor-collapse-tips .md-editor-icon,.md-editor-preview details.md-editor-code[open] .md-editor-code-head .md-editor-collapse-tips .md-editor-iconfont{transform:rotate(-90deg)}[dir=rtl] .md-editor-preview details.md-editor-code[open] .md-editor-code-head .md-editor-collapse-tips .md-editor-icon,[dir=rtl] .md-editor-preview details.md-editor-code[open] .md-editor-code-head .md-editor-collapse-tips .md-editor-iconfont{transform:rotate(270deg)}.md-editor-scrn span[rn-wrapper]{position:absolute;pointer-events:none;font-size:100%;inset-block-start:1em;inset-inline-start:0;width:3em;letter-spacing:-1px;user-select:none;counter-reset:linenumber}.md-editor-scrn span[rn-wrapper]>span{display:block;pointer-events:none;counter-increment:linenumber}.md-editor-scrn span[rn-wrapper]>span::before{color:#999;display:block;padding-inline-end:.5em;text-align:right;content:counter(linenumber)}.md-editor-scrn pre code{padding-inline-start:3.5em !important}.md-editor-preview figure{margin:0 0 1em 0;display:inline-flex;flex-direction:column;text-align:center}.md-editor-preview figure figcaption{color:var(--md-theme-color);font-size:.875em;margin-block-start:5px}.md-editor .md-editor-preview{--md-theme-heading-color: var(--md-theme-color);--md-theme-heading-border: none;--md-theme-heading-1-color: var(--md-theme-heading-color);--md-theme-heading-1-border: var(--md-theme-heading-border);--md-theme-heading-2-color: var(--md-theme-heading-color);--md-theme-heading-2-border: var(--md-theme-heading-border);--md-theme-heading-3-color: var(--md-theme-heading-color);--md-theme-heading-3-border: var(--md-theme-heading-border);--md-theme-heading-4-color: var(--md-theme-heading-color);--md-theme-heading-4-border: var(--md-theme-heading-border);--md-theme-heading-5-color: var(--md-theme-heading-color);--md-theme-heading-5-border: var(--md-theme-heading-border);--md-theme-heading-6-color: var(--md-theme-heading-color);--md-theme-heading-6-border: var(--md-theme-heading-border)}.md-editor-preview h1,.md-editor-preview h2,.md-editor-preview h3,.md-editor-preview h4,.md-editor-preview h5,.md-editor-preview h6{position:relative;word-break:break-all;margin:1.4em 0 .8em 0;font-weight:bold}.md-editor-preview h1 a,.md-editor-preview h2 a,.md-editor-preview h3 a,.md-editor-preview h4 a,.md-editor-preview h5 a,.md-editor-preview h6 a{color:inherit}.md-editor-preview h1 a:hover,.md-editor-preview h2 a:hover,.md-editor-preview h3 a:hover,.md-editor-preview h4 a:hover,.md-editor-preview h5 a:hover,.md-editor-preview h6 a:hover{color:inherit}.md-editor-preview h1{color:var(--md-theme-heading-1-color);border-block-end:var(--md-theme-heading-1-border)}.md-editor-preview h2{color:var(--md-theme-heading-2-color);border-block-end:var(--md-theme-heading-2-border)}.md-editor-preview h3{color:var(--md-theme-heading-3-color);border-block-end:var(--md-theme-heading-3-border)}.md-editor-preview h4{color:var(--md-theme-heading-4-color);border-block-end:var(--md-theme-heading-4-border)}.md-editor-preview h5{color:var(--md-theme-heading-5-color);border-block-end:var(--md-theme-heading-5-border)}.md-editor-preview h6{color:var(--md-theme-heading-6-color);border-block-end:var(--md-theme-heading-6-border)}.md-editor-preview h1{font-size:2em}.md-editor-preview h2{font-size:1.5em}.md-editor-preview h3{font-size:1.25em}.md-editor-preview h4{font-size:1em}.md-editor-preview h5{font-size:.875em}.md-editor-preview h6{font-size:.85em}.md-editor-preview hr{height:1px;margin:10px 0;border:none;border-block-start:1px solid var(--md-theme-border-color)}.md-editor-preview a{color:var(--md-theme-link-color);text-decoration:none;transition:color .1s}.md-editor-preview a:hover{color:var(--md-theme-link-hover-color)}.md-editor-preview a:empty::before{content:attr(href)}.md-editor-preview ol,.md-editor-preview ul{padding-inline-start:2em}.md-editor-preview ol .task-list-item,.md-editor-preview ul .task-list-item{list-style-type:none}.md-editor-preview ol .task-list-item input,.md-editor-preview ul .task-list-item input{margin-inline-start:-1.5em;margin-inline-end:.1em}.md-editor-preview img{max-width:100%}.md-editor-preview p:empty{display:none}.md-editor .md-editor-preview{--md-theme-quote-color: var(--md-theme-color);--md-theme-quote-border: none;--md-theme-quote-bg-color: inherit}.md-editor-preview blockquote{padding:0 1em;color:var(--md-theme-quote-color);border-inline-start:var(--md-theme-quote-border);background-color:var(--md-theme-quote-bg-color)}.md-editor .md-editor-preview{--md-theme-table-stripe-color: #fafafa;--md-theme-table-tr-bg-color: inherit;--md-theme-table-td-border-color: var(--md-theme-border-color)}.md-editor-dark .md-editor-preview{--md-theme-table-stripe-color: #0c0c0c;--md-theme-table-tr-bg-color: inherit;--md-theme-table-td-border-color: var(--md-theme-border-color)}.md-editor-preview table tr{background-color:var(--md-theme-table-tr-bg-color)}.md-editor-preview table tr th,.md-editor-preview table tr td{border:1px solid var(--md-theme-table-td-border-color)}.md-editor-preview table tr:nth-child(2n){background-color:var(--md-theme-table-stripe-color)}.md-editor-preview{color:var(--md-theme-color)}.md-editor-preview ::-webkit-scrollbar{width:6px;height:6px}.md-editor-preview ::-webkit-scrollbar-button:vertical{display:none}.md-editor-preview ::-webkit-scrollbar-corner,.md-editor-preview ::-webkit-scrollbar-track,.md-editor-preview ::-webkit-scrollbar-thumb{border-radius:2px}.md-editor .md-editor-preview ::-webkit-scrollbar-corner,.md-editor .md-editor-preview ::-webkit-scrollbar-track{background-color:#e2e2e2}.md-editor .md-editor-preview ::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3019607843)}.md-editor .md-editor-preview ::-webkit-scrollbar-thumb:vertical:hover{background-color:rgba(0,0,0,.3490196078)}.md-editor .md-editor-preview ::-webkit-scrollbar-thumb:vertical:active{background-color:rgba(0,0,0,.3803921569)}.md-editor-dark .md-editor-preview ::-webkit-scrollbar-corner,.md-editor-dark .md-editor-preview ::-webkit-scrollbar-track{background-color:#0f0f0f}.md-editor-dark .md-editor-preview ::-webkit-scrollbar-thumb{background-color:#2d2d2d}.md-editor-dark .md-editor-preview ::-webkit-scrollbar-thumb:vertical:hover{background-color:#3a3a3a}.md-editor-dark .md-editor-preview ::-webkit-scrollbar-thumb:vertical:active{background-color:#3a3a3a}.md-editor div.default-theme{--md-theme-code-copy-tips-color: #141414}.md-editor-dark div.default-theme{--md-theme-code-copy-tips-color: inherit}.md-editor div.default-theme img{margin:0 auto;box-sizing:border-box}.md-editor div.default-theme a{display:inline-flex;line-height:1;border-block-end:none}.md-editor div.default-theme a:hover{border-block-end:1px solid}.md-editor div.default-theme a[target=_blank]{align-items:center}.md-editor div.default-theme a[target=_blank]::after{content:"";display:inline-block;width:16px;height:16px;margin-inline-start:2px;background-color:currentColor;mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-arrow-out-up-right"><path d="M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6"/><path d="m21 3-9 9"/><path d="M15 3h6v6"/></svg>');mask-size:contain;mask-repeat:no-repeat}.md-editor div.default-theme ol,.md-editor div.default-theme ul{margin:.6em 0}.md-editor div.default-theme ol li,.md-editor div.default-theme ul li{line-height:1.6;margin:.5em 0}.md-editor div.default-theme p{line-height:1.6;margin:.5rem 0}.md-editor div.default-theme{--md-theme-quote-border: 5px solid #35b378;--md-theme-quote-bg-color: var(--md-theme-bg-color-inset)}.md-editor div.default-theme blockquote{margin:20px 0;padding:0 1.2em;line-height:2em;display:flow-root}.md-editor default-theme{--md-theme-table-stripe-color: #fafafa}.md-editor-dark default-theme{--md-theme-table-stripe-color: #0c0c0c}.md-editor div.default-theme table{overflow:auto;border-spacing:0;border-collapse:collapse;margin-block-end:1em;margin-block-start:1em}.md-editor div.default-theme table tr th,.md-editor div.default-theme table tr td{word-wrap:break-word;padding:8px 14px}.md-editor div.default-theme table tbody tr:hover{background-color:var(--md-theme-color-hover)}.md-editor div.default-theme blockquote table{line-height:initial}.md-editor div.default-theme blockquote table tr th,.md-editor div.default-theme blockquote table tr td{border-color:var(--md-theme-border-color-inset)}.md-editor div.default-theme blockquote table tbody tr:nth-child(n){background-color:inherit}.md-editor div.default-theme blockquote table tbody tr:hover{background-color:var(--md-theme-color-hover-inset)}.md-editor div.vuepress-theme{--md-theme-code-inline-color: #d63200;--md-theme-code-inline-bg-color: #f8f8f8;--md-theme-code-block-color: #747384;--md-theme-code-block-bg-color: #f8f8f8;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color);--md-theme-code-block-radius: 2px}.md-editor-dark div.vuepress-theme{--md-theme-code-inline-color: #e06c75;--md-theme-code-inline-bg-color: #1a1a1a;--md-theme-code-block-color: #999;--md-theme-code-block-bg-color: #1a1a1a;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color);--md-theme-code-block-radius: 2px}.md-editor div.vuepress-theme code{padding:3px 5px;margin:0 2px}.md-editor div.vuepress-theme .md-editor-code pre{font-size:.875em;margin:0 0 1em}.md-editor div.vuepress-theme .md-editor-code pre code{white-space:pre;padding:22px 1em;margin:0}.md-editor div.vuepress-theme .md-editor-code pre code span[rn-wrapper]{top:22px}.md-editor div.vuepress-theme{--md-theme-heading-color: #273849;--md-theme-heading-2-border: 1px solid var(--md-theme-border-color)}.md-editor-dark div.vuepress-theme{--md-theme-heading-color: #999;--md-theme-heading-2-border: 1px solid var(--md-theme-border-color)}.md-editor div.vuepress-theme h1,.md-editor div.vuepress-theme h2,.md-editor div.vuepress-theme h3,.md-editor div.vuepress-theme h4,.md-editor div.vuepress-theme h5,.md-editor div.vuepress-theme h6{font-weight:600;line-height:1.45;position:relative;margin-block-start:1em}.md-editor div.vuepress-theme h1{font-size:2.2em;margin:1em 0}.md-editor div.vuepress-theme h2{font-size:1.65em;padding-block-end:.3em}.md-editor div.vuepress-theme h3{line-height:1.35em}.md-editor div.vuepress-theme{--md-theme-link-color: #42b983}.md-editor div.vuepress-theme a{font-weight:600}.md-editor div.vuepress-theme ul,.md-editor div.vuepress-theme ol{position:relative;line-height:1.4em;margin:1.2em 0;z-index:1}.md-editor div.vuepress-theme ul li,.md-editor div.vuepress-theme ol li{margin:1.2em 0}.md-editor div.vuepress-theme p{word-spacing:.05em;line-height:1.6em;margin:1.2em 0;position:relative}.md-editor div.vuepress-theme{--md-theme-quote-border: 4px solid #42b983}.md-editor div.vuepress-theme blockquote{margin:2em 0;padding-inline-start:20px}.md-editor div.vuepress-theme blockquote p{margin-inline-start:0;margin-block-start:1.2em;margin-block-end:0;padding:0}.md-editor div.vuepress-theme{--md-theme-table-td-border-color: #dfe2e5;--md-theme-table-stripe-color: #f6f8fa}.md-editor-dark div.vuepress-theme{--md-theme-table-td-border-color: #2d2d2d;--md-theme-table-stripe-color: #0c0c0c}.md-editor div.vuepress-theme table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}.md-editor div.vuepress-theme table tr th,.md-editor div.vuepress-theme table tr td{padding:.6em 1em}.md-editor div.vuepress-theme{--md-theme-color: #304455}.md-editor-dark div.vuepress-theme{--md-theme-color: #999}.md-editor div.vuepress-theme{font-size:16px;color:var(--md-theme-color)}.md-editor div.vuepress-theme em{color:#4f5959;padding:0 6px 0 4px}.md-editor div.github-theme{--md-theme-code-inline-color: inherit;--md-theme-code-inline-bg-color: #eff1f2;--md-theme-code-inline-radius: 6px;--md-theme-code-block-color: inherit;--md-theme-code-block-bg-color: #f6f8fa;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color);--md-theme-code-block-radius: 6px}.md-editor-dark div.github-theme{--md-theme-code-inline-color: #c9d1d9;--md-theme-code-inline-bg-color: #2d3339;--md-theme-code-inline-radius: 6px;--md-theme-code-block-color: #a9b7c6;--md-theme-code-block-bg-color: #161b22;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color);--md-theme-code-block-radius: 6px}.md-editor div.github-theme code{padding:.2em .4em;margin:0}.md-editor div.github-theme pre code{padding:22px 1em;margin-block-end:0;word-break:normal;letter-spacing:1px}.md-editor div.github-theme{--md-theme-heading-color: inherit;--md-theme-heading-6-color: #2d3339;--md-theme-heading-1-border: 1px solid #d9dee4;--md-theme-heading-2-border: 1px solid #d9dee4}.md-editor-dark div.github-theme{--md-theme-heading-color: #c9d1d9;--md-theme-heading-6-color: #768390;--md-theme-heading-1-border: 1px solid #373e47;--md-theme-heading-2-border: 1px solid #373e47}.md-editor div.github-theme h1,.md-editor div.github-theme h2,.md-editor div.github-theme h3,.md-editor div.github-theme h4,.md-editor div.github-theme h5,.md-editor div.github-theme h6{margin-block-start:24px;margin-block-end:16px;font-weight:600;line-height:1.25}.md-editor div.github-theme h1{padding-block-end:.3em;font-size:2em}.md-editor div.github-theme h2{padding-block-end:.3em;font-size:1.5em}.md-editor div.github-theme h3{font-size:1.25em}.md-editor div.github-theme h4{font-size:1em}.md-editor div.github-theme h5{font-size:.875em}.md-editor div.github-theme h6{font-size:.85em}.md-editor div.github-theme{--md-theme-heading-bg-color: #fff}.md-editor-dark div.github-theme{--md-theme-heading-bg-color: #22272e}.md-editor div.github-theme img{background-color:var(--md-theme-heading-bg-color)}.md-editor div.github-theme{--md-theme-link-color: #539bf5;--md-theme-link-hover-color: #539bf5}.md-editor div.github-theme a:hover{text-decoration:underline}.md-editor div.github-theme ol li+li,.md-editor div.github-theme ul li+li{margin-block-start:.25em}.md-editor div.github-theme{--md-theme-quote-color: #57606a;--md-theme-quote-border: 0.25em solid #d0d7de}.md-editor-dark div.github-theme{--md-theme-quote-color: #8b949e;--md-theme-quote-border: 0.25em solid #444c56}.md-editor div.github-theme blockquote{margin:0;padding:0 1em}.md-editor div.github-theme{--md-theme-table-stripe-color: #f7f8fa;--md-theme-table-tr-bg-color: #fff;--md-theme-table-td-border-color: #d0d7de}.md-editor-dark div.github-theme{--md-theme-table-stripe-color: #161b22;--md-theme-table-tr-bg-color: transparent;--md-theme-table-td-border-color: #30363d}.md-editor div.github-theme table{display:block;max-width:100%;overflow:auto;border-spacing:0;border-collapse:collapse}.md-editor div.github-theme table tr th,.md-editor div.github-theme table tr td{padding:6px 13px}.md-editor div.github-theme{--md-theme-color: #222}.md-editor-dark div.github-theme{--md-theme-color: #c9d1d9}.md-editor div.github-theme{line-height:1.5;color:var(--md-theme-color)}.md-editor div.github-theme p,.md-editor div.github-theme blockquote,.md-editor div.github-theme ul,.md-editor div.github-theme ol,.md-editor div.github-theme dl,.md-editor div.github-theme table,.md-editor div.github-theme pre,.md-editor div.github-theme details{margin-block-start:0;margin-block-end:16px}.md-editor div.cyanosis-theme{--md-theme-code-inline-color: var(--md-theme-code-color);--md-theme-code-inline-bg-color: var(--md-theme-code-bg-color);--md-theme-code-block-color: var(--md-theme-base-color);--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color)}.md-editor-dark div.cyanosis-theme{--md-theme-code-inline-color: var(--md-theme-code-color);--md-theme-code-inline-bg-color: var(--md-theme-code-bg-color);--md-theme-code-block-color: var(--md-theme-base-color);--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color)}.md-editor div.cyanosis-theme code{padding:.065em .4em;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;overflow-x:auto}.md-editor div.cyanosis-theme code::selection{background-color:var(--md-theme-slct-codebg-color)}.md-editor div.cyanosis-theme .md-editor-code pre{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.md-editor div.cyanosis-theme .md-editor-code pre code{padding:11px 12px 22px;margin:0;word-break:normal;line-height:1.75}.md-editor div.cyanosis-theme .md-editor-code pre code span[rn-wrapper]{top:11px}.md-editor div.cyanosis-theme{--md-theme-heading-color: var(--md-theme-title-color)}.md-editor div.cyanosis-theme h1{padding-block-end:4px;margin-block-start:36px;margin-block-end:10px;font-size:30px;line-height:1.5;transition:color .35s}.md-editor div.cyanosis-theme h2{position:relative;padding-inline-start:10px;padding-inline-end:10px;padding-block-end:10px;margin-block-start:36px;margin-block-end:10px;font-size:24px;line-height:1.5;border-block-end:1px solid var(--md-theme-border-color-2);transition:color .35s}.md-editor div.cyanosis-theme h2::before{content:"「";position:absolute;inset-block-start:-6px;inset-inline-start:-14px}.md-editor div.cyanosis-theme h2::after{content:"」";position:relative;inset-block-start:6px;inset-inline-end:auto}.md-editor div.cyanosis-theme h3{position:relative;padding-block-end:0;margin-block-start:30px;margin-block-end:10px;font-size:20px;line-height:1.5;padding-inline-start:6px;transition:color .35s}.md-editor div.cyanosis-theme h3::before{content:"»";padding-inline-end:6px;color:var(--md-theme-strong-color)}.md-editor div.cyanosis-theme h4{padding-block-end:0;margin-block-start:24px;margin-block-end:10px;font-size:16px;line-height:1.5;padding-inline-start:6px;transition:color .35s}.md-editor div.cyanosis-theme h5{padding-block-end:0;margin-block-start:18px;margin-block-end:10px;font-size:14px;line-height:1.5;padding-inline-start:6px;transition:color .35s}.md-editor div.cyanosis-theme h6{padding-block-end:0;margin-block-start:12px;margin-block-end:10px;font-size:12px;line-height:1.5;padding-inline-start:6px;transition:color .35s}.md-editor div.cyanosis-theme h1::selection,.md-editor div.cyanosis-theme h2::selection,.md-editor div.cyanosis-theme h3::selection,.md-editor div.cyanosis-theme h4::selection,.md-editor div.cyanosis-theme h5::selection,.md-editor div.cyanosis-theme h6::selection{color:var(--md-theme-slct-title-color);background-color:var(--md-theme-slct-titlebg-color)}@media(max-width: 720px){.md-editor div.cyanosis-theme h1{font-size:24px}.md-editor div.cyanosis-theme h2{font-size:20px}.md-editor div.cyanosis-theme h3{font-size:18px}}.md-editor div.cyanosis-theme{--md-theme-link-color: var(--md-theme-link-color);--md-theme-link-hover-color: var(--md-theme-linkh-color)}.md-editor div.cyanosis-theme a{position:relative;display:inline-block;text-decoration:none;border-block-end:1px solid var(--md-theme-border-color)}.md-editor div.cyanosis-theme a:hover{border-block-end-color:var(--md-theme-linkh-color)}.md-editor div.cyanosis-theme a:active{color:var(--md-theme-linkh-color)}.md-editor div.cyanosis-theme a::after{position:absolute;content:"";inset-block-start:100%;inset-inline-start:0;width:100%;opacity:0;border-block-end:1px solid var(--md-theme-border-color);transition:top .3s,opacity .3s;transform:translate3d(0, 0, 0)}.md-editor div.cyanosis-theme a:hover::after{top:0;opacity:1;border-block-end-color:var(--md-theme-linkh-color)}.md-editor div.cyanosis-theme ol,.md-editor div.cyanosis-theme ul{margin:0}.md-editor div.cyanosis-theme ol li,.md-editor div.cyanosis-theme ul li{margin-block-end:0;list-style:inherit}.md-editor div.cyanosis-theme ol li .task-list-item,.md-editor div.cyanosis-theme ul li .task-list-item{list-style:none}.md-editor div.cyanosis-theme ol li .task-list-item ul,.md-editor div.cyanosis-theme ol li .task-list-item ol,.md-editor div.cyanosis-theme ul li .task-list-item ul,.md-editor div.cyanosis-theme ul li .task-list-item ol{margin-block-start:0}.md-editor div.cyanosis-theme ol ul,.md-editor div.cyanosis-theme ol ol,.md-editor div.cyanosis-theme ul ul,.md-editor div.cyanosis-theme ul ol{margin-block-start:4px}.md-editor div.cyanosis-theme ol li{padding-inline-start:6px}.md-editor div.cyanosis-theme ol li::selection,.md-editor div.cyanosis-theme ul li::selection{color:var(--md-theme-slct-text-color);background-color:var(--md-theme-slct-bg-color)}.md-editor div.cyanosis-theme .task-list-item-checkbox{position:relative}.md-editor div.cyanosis-theme .contains-task-list input[type=checkbox]::before{content:"";position:absolute;inset-block-start:0;inset-inline-start:0;inset-inline-end:0;inset-block-end:0;width:inherit;height:inherit;background:#f0f8ff;border:1px solid #add6ff;border-radius:var(--md-theme-radius-s);box-sizing:border-box;z-index:1}.md-editor div.cyanosis-theme .contains-task-list input[type=checkbox][checked]::after{content:"✓";position:absolute;inset-block-start:-12px;inset-inline-start:0;inset-inline-end:0;inset-block-end:0;width:0;height:0;color:#f55;font-size:20px;font-weight:700;z-index:2}.md-editor div.cyanosis-theme p{line-height:inherit;margin-block-start:16px;margin-block-end:16px}.md-editor div.cyanosis-theme p::selection{color:var(--md-theme-slct-text-color);background-color:var(--md-theme-slct-bg-color)}.md-editor div.cyanosis-theme{--md-theme-quote-color: var(--md-theme-blockquote-color);--md-theme-quote-border: 4px solid var(--md-theme-strong-color);--md-theme-quote-bg-color: var(--md-theme-blockquote-bg-color)}.md-editor div.cyanosis-theme blockquote{padding:1px 20px;margin:22px 0;transition:color .35s}.md-editor div.cyanosis-theme blockquote::after{display:block;content:""}.md-editor div.cyanosis-theme blockquote>p{margin:10px 0}.md-editor div.cyanosis-theme blockquote>b,.md-editor div.cyanosis-theme blockquote>strong{color:var(--md-theme-strong-color)}.md-editor div.cyanosis-theme table{display:inline-block !important;width:auto;max-width:100%;overflow:auto;border:1px solid var(--md-theme-table-border-color);border-spacing:0;border-collapse:collapse}.md-editor div.cyanosis-theme table thead{color:#000;text-align:left;background:#f6f6f6}.md-editor div.cyanosis-theme table tr:nth-child(2n){background-color:var(--md-theme-table-tr-nc-color)}.md-editor div.cyanosis-theme table tr:hover{background-color:var(--md-theme-table-trh-color)}.md-editor div.cyanosis-theme table th,.md-editor div.cyanosis-theme table td{padding:12px 8px;line-height:24px;border:1px solid var(--md-theme-table-border-color)}.md-editor div.cyanosis-theme table th{color:var(--md-theme-table-tht-color);background-color:var(--md-theme-table-th-color)}.md-editor div.cyanosis-theme table td{min-width:120px}.md-editor div.cyanosis-theme table thead th::selection{background-color:rgba(0,0,0,0)}.md-editor div.cyanosis-theme table tbody td::selection{background-color:var(--md-theme-slct-bg-color)}.md-editor div.cyanosis-theme{--md-theme-base-color:#353535;--md-theme-title-color:#005bb7;--md-theme-strong-color:#2196f3;--md-theme-em-color:#4fc3f7;--md-theme-del-color:#ccc;--md-theme-link-color:#3da8f5;--md-theme-linkh-color:#007fff;--md-theme-border-color:#bedcff;--md-theme-border-color-2:#ececec;--md-theme-bg-color:#fff;--md-theme-blockquote-color:#8c8c8c;--md-theme-blockquote-bg-color:#f0fdff;--md-theme-code-color:#c2185b;--md-theme-code-bg-color:#fff4f4;--md-theme-code-block-bg-color:#f8f8f8;--md-theme-table-border-color:#c3e0fd;--md-theme-table-th-color:#dff0ff;--md-theme-table-tht-color:#005bb7;--md-theme-table-tr-nc-color:#f7fbff;--md-theme-table-trh-color:#e0edf7;--md-theme-slct-title-color:#005bb7;--md-theme-slct-titlebg-color:rgba(175,207,247,.25);--md-theme-slct-text-color:#c80000;--md-theme-slct-bg-color:rgba(175,207,247,.25);--md-theme-slct-del-color:#999;--md-theme-slct-elbg-color:#e8ebec;--md-theme-slct-codebg-color:#ffeaeb;--md-theme-slct-prebg-color:rgba(160,200,255,.25)}.md-editor-dark div.cyanosis-theme{--md-theme-base-color:#cacaca;--md-theme-title-color:#ddd;--md-theme-strong-color:#fe9900;--md-theme-em-color:#ffd28e;--md-theme-del-color:#ccc;--md-theme-link-color:#ffb648;--md-theme-linkh-color:#fe9900;--md-theme-border-color:#ffe3ba;--md-theme-border-color-2:#ffcb7b;--md-theme-bg-color:#2f2f2f;--md-theme-blockquote-color:#c7c7c7;--md-theme-blockquote-bg-color:rgba(255,199,116,.1);--md-theme-code-color:#000;--md-theme-code-bg-color:#ffcb7b;--md-theme-code-block-bg-color:rgba(30,25,18,.5);--md-theme-table-border-color:#fe9900;--md-theme-table-th-color:#ffb648;--md-theme-table-tht-color:#000;--md-theme-table-tr-nc-color:#6d5736;--md-theme-table-trh-color:#947443;--md-theme-slct-title-color:#000;--md-theme-slct-titlebg-color:#fe9900;--md-theme-slct-text-color:#00c888;--md-theme-slct-bg-color:rgba(175,207,247,.25);--md-theme-slct-del-color:#999;--md-theme-slct-elbg-color:#000;--md-theme-slct-codebg-color:#ffcb7b;--md-theme-slct-prebg-color:rgba(160,200,255,.25)}.md-editor div.cyanosis-theme{word-break:break-word;line-height:1.75;font-weight:400;overflow-x:hidden;color:var(--md-theme-base-color);transition:color .35s}.md-editor div.cyanosis-theme hr{position:relative;width:98%;height:1px;margin-block-start:32px;margin-block-end:32px;background-image:linear-gradient(90deg, var(--md-theme-link-color), rgba(255, 0, 0, 0.3), rgba(37, 163, 65, 0.3), rgba(255, 0, 0, 0.3), var(--md-theme-link-color));border-width:0;overflow:visible}.md-editor div.cyanosis-theme b,.md-editor div.cyanosis-theme strong{color:var(--md-theme-strong-color)}.md-editor div.cyanosis-theme i,.md-editor div.cyanosis-theme em{color:var(--md-theme-em-color)}.md-editor div.cyanosis-theme del{color:var(--md-theme-del-color)}.md-editor div.cyanosis-theme details>summary{outline:none;color:var(--md-theme-title-color);font-size:20px;font-weight:bolder;border-block-end:1px solid var(--md-theme-border-color);cursor:pointer}.md-editor div.cyanosis-theme details>p{padding:10px 20px;margin:10px 0 0;color:#666;background-color:var(--md-theme-blockquote-bg-color);border:2px dashed var(--md-theme-strong-color)}.md-editor div.cyanosis-theme a::selection,.md-editor div.cyanosis-theme b::selection,.md-editor div.cyanosis-theme strong::selection,.md-editor div.cyanosis-theme i::selection,.md-editor div.cyanosis-theme em::selection{background-color:var(--md-theme-slct-elbg-color)}.md-editor div.cyanosis-theme del::selection{color:var(--md-theme-slct-del-color);background-color:var(--md-theme-slct-elbg-color)}.md-editor div.mk-cute-theme{--md-theme-code-inline-color: #4ec9b0;--md-theme-code-inline-bg-color: #282c34;--md-theme-code-block-color: #4ec9b0;--md-theme-code-block-bg-color: #282c34;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color);--md-theme-code-block-radius: 10px}.md-editor-dark div.mk-cute-theme{--md-theme-code-inline-color: #4ec9b0;--md-theme-code-inline-bg-color: #282c34;--md-theme-code-block-color: #4ec9b0;--md-theme-code-block-bg-color: #282c34;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color);--md-theme-code-block-radius: 10px}.md-editor div.mk-cute-theme code{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;overflow-x:auto;padding:.14em .46em;margin:0 4px}.md-editor div.mk-cute-theme .md-editor-code pre code{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;padding:22px;margin:0;word-break:normal;line-height:1.75}.md-editor div.mk-cute-theme .md-editor-code pre code span[rn-wrapper]{top:22px}.md-editor div.mk-cute-theme{--md-theme-heading-color: #36ace1}.md-editor div.mk-cute-theme h1::before,.md-editor div.mk-cute-theme h2::before,.md-editor div.mk-cute-theme h3::before,.md-editor div.mk-cute-theme h4::before,.md-editor div.mk-cute-theme h5::before,.md-editor div.mk-cute-theme h6::before{content:"";display:block;position:absolute;inset-inline-start:0;inset-block-start:0;inset-block-end:0;margin:auto;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAF8UlEQVRIS71Wa2wUVRT+7r0zu9t2t/RBaSioPCpYbIUfaEIQUogSAwZDAlUSGwgg/CBATExMCJH1D2hIfOEjFEUEhViCgBgIUCH44OkjPAMGBVqhpUCfW3Zn5z7MuQOE0hYxMdxJdmd25s53vnO+851leMCLPWA8/CfA2TsvL8n7q+nTFfNLG+4VqInHOeJLDQMzdz/3r4DGGDb9lxu+aPcE7U61JHDMDePcuv0O21ShugOefqDdtBie3Dk6K/O+Ab+qOjJiz7Ahv6c8hbDDwRiQlgYGDOcaWyEcjg8On+j71IpJndjGt9XO+jM7+pkywNvbazIfercieSdoJ4bE5sWjyZqMpDdeaQNXMNC34ME3LV8B56+1w3AOgk+EXe/Ub6uiLB6XdH/G/mYjeBCcFwnt3zQqWt4t4NjjnhzQ1CGkBhwOCMFAB71U0qsYgRlwBtQ1tiEJAy44OBdQUmFK3aWS06NLT+ukZAQoKCCjsfbDmk6p78RwX3ncWffmIj8U4kh6GpEwh+9rGy23LDU4GBrrm9DsuDYIGMAYIC/EUNQ7Cq1hn+WM2TI8f+jEyCmvjfn1FssuojHx6tDkyZOaCzr8TNpASzDAk8amlRIrEylcSGsYrcGIstIYWhgDDIM2BiGH3ywFkGAC1U9n38bpVqWGdk6r4HMWrZZaG1D5KLn0qYyBEAKnG1otAxLR8L7Z9nfP13CJHQ/ST4vK8sVHe8JsU0U6uO5hlexo8PI7vNDQomwoBRAwpSmtgJAAztS3QLsOsmBQlBtFJMQhlbbPUBBUR7o2hqHVddLbRsfCPQJ+u3TPw8uGl1yklAlHIJZKo3//XEhlLCtifPFyM7xwCI/lZ8IKTTBbS7pPLIggZZsSQ+zXbT4UYSsnet3UMM5HPT5LGbrDGYQroClyT2Jwnyj9aN949e8mDCwuRFoqKxRHUJ21BSDRELuQYGhvbMVV32Dp2RuxcfHSRBfAYTsbU9nJdFj5EiLkglHkRInC1xoxKbH9hQJIaTDvxxTCUddWl4wg0dCCtqSPDmoVx4Eitpxh64ZtsT6b5ie6pPRkfF90TllxOzEwmipMKRRgHODGgCuJkqIcvDdC2BZ5Y+tlHHMzkAKghbAxcQqQDiKrFBxhqg5MHTivS1tQ+sdsvaQl5Yd6yfdRXNQLsQwXnq/AQFLXEIIjzBSuNaaR0SuEtkQKl9IKjAsbJaWfzo1USDsM6zceDJfeVGgnhhN2N7YOyo5kJz1pa2AbgfrO1gRwXW6vSRQNtddR+EhvKGmseskgTtY2Q7kucYWWgToPHzyUyXry0iXfnBtfl5f/PaWPvPNW/zkOAQegJHltFE5dSaCskHqPVEnqpMAMEgkPtR1pKxyh/N0/vTToubtH1G3RmLjhM8ubKXfWB2mRa9ySOaWS2uT8lTZ0cI6I52Ngv7zAbW9mQVm1cpytu441P38XeXTlQu+e46nyh+bjLkMZRU0MCYTCJWZSG1y7cBWNURpxBlxqFBfEwGnGGhaYPSNwhpSv4DK+/vPynBk9MqRIiOWs8a2WJTm9a+cgh6SaMIMz9W1WjYHHMtv0wSmZdWB9gdsya/rcYVg7JoffCdqlD6ceTpiY59tM0PhJp5WNvra+BQkejCMyBarr8KKYDcZi8sDaCDKYFIGRk+FnSVXzyTO9JxBwF8DLc1dlLn65ooNEYN0fBsu21fTvL6PXnhxXlnLIqqhYYBian4lQ2Lk9ogiALsimiLC1QYfhlV1Hnxh7JfcMqxrpd7U2GFa5t9nOd7Kr+kg4uWvnCpromlJeXlq3Os3ZLOlrZBmNQf1ybVqpxhbA7mRIOCy1+esDOWhIyDv/+3Q7LRbsqH+rKRJ+nba+/+WW7II1s9vvVBuNr7KNF1WUM1bSt5f1Vq01jUVkKfnx8uoti3Or5rbd9782M61azJz/rFywYU/OyKqK1p5G2MS1Z18tGFDwTkvIxcK9RwaMP3a9/tbc62lPj/Nw5B9ey9Ehy/MY4oEqelgNleuyCgdXJlmc3fO5Ll56r5f+n/f+AWFf9jvBgaHpAAAAAElFTkSuQmCC);animation:spin 2s linear 0s infinite}.md-editor div.mk-cute-theme h1{position:relative;font-size:30px;padding:12px 38px;margin:30px 0}.md-editor div.mk-cute-theme h1::before{width:30px;height:30px;background-size:30px 30px}.md-editor div.mk-cute-theme h2{position:relative;font-size:24px;padding:12px 36px;margin:28px 0}.md-editor div.mk-cute-theme h2::before{width:28px;height:28px;background-size:28px 28px}.md-editor div.mk-cute-theme h3{position:relative;font-size:18px;padding:4px 32px;margin:26px 0}.md-editor div.mk-cute-theme h3::before{width:24px;height:24px;background-size:24px 24px}.md-editor div.mk-cute-theme h4{position:relative;padding:4px 28px;font-size:16px;margin:22px 0}.md-editor div.mk-cute-theme h4::before{width:20px;height:20px;background-size:20px 20px}.md-editor div.mk-cute-theme h5{position:relative;padding:4px 26px;font-size:15px;margin:20px 0}.md-editor div.mk-cute-theme h5::before{width:18px;height:18px;background-size:18px 18px}.md-editor div.mk-cute-theme h6{position:relative;padding:4px 22px;font-size:14px;margin:16px 0}.md-editor div.mk-cute-theme h6::before{width:16px;height:16px;background-size:16px 16px}@media(max-width: 720px){.md-editor div.mk-cute-theme h1{font-size:24px}.md-editor div.mk-cute-theme h2{font-size:20px}.md-editor div.mk-cute-theme h3{font-size:18px}}.md-editor div.mk-cute-theme{--md-theme-link-color: #409eff;--md-theme-link-hover-color: #007bff}.md-editor div.mk-cute-theme a{display:inline-block;border-block-end:1px solid #409eff}.md-editor div.mk-cute-theme a:hover,.md-editor div.mk-cute-theme a:active{border-block-end:1px solid #007bff}.md-editor div.mk-cute-theme ol li,.md-editor div.mk-cute-theme ul li{margin-block-end:0;list-style:inherit}.md-editor div.mk-cute-theme ol li .task-list-item,.md-editor div.mk-cute-theme ul li .task-list-item{list-style:none}.md-editor div.mk-cute-theme ol li .task-list-item ul,.md-editor div.mk-cute-theme ol li .task-list-item ol,.md-editor div.mk-cute-theme ul li .task-list-item ul,.md-editor div.mk-cute-theme ul li .task-list-item ol{margin-block-start:0}.md-editor div.mk-cute-theme ol ul,.md-editor div.mk-cute-theme ol ol,.md-editor div.mk-cute-theme ul ul,.md-editor div.mk-cute-theme ul ol{margin-block-start:3px}.md-editor div.mk-cute-theme ol li{padding-inline-start:6px}.md-editor div.mk-cute-theme p{line-height:inherit;margin-block-start:22px;margin-block-end:22px}.md-editor div.mk-cute-theme{--md-theme-quote-color: #fff;--md-theme-quote-border: 4px solid #409eff;--md-theme-quote-bg-color: rgba(54, 172, 225, 0.75)}.md-editor-dark div.mk-cute-theme{--md-theme-quote-color: inherit;--md-theme-quote-border: 4px solid #265d97;--md-theme-quote-bg-color: rgba(18, 80, 108, 0.75)}.md-editor div.mk-cute-theme blockquote{position:relative;padding:8px 26px;margin:16px 0;border-radius:var(--md-theme-radius-m)}.md-editor div.mk-cute-theme blockquote::before{content:"❝";inset-block-start:10px;inset-inline-start:8px;color:#409eff;font-size:20px;line-height:1;font-weight:700;position:absolute;opacity:.7}.md-editor div.mk-cute-theme blockquote::after{content:"❞";font-size:20px;position:absolute;inset-inline-end:8px;inset-block-end:0;color:#409eff;opacity:.7}.md-editor div.mk-cute-theme blockquote>p,.md-editor div.mk-cute-theme blockquote ul li,.md-editor div.mk-cute-theme blockquote ol li{color:var(--md-theme-quote-color)}.md-editor div.mk-cute-theme{--md-theme-table-color: #000;--md-theme-table-border-color: #f6f6f6;--md-theme-table-thead-bg-color: #f6f6f6;--md-theme-table-stripe-color: #fcfcfc}.md-editor-dark div.mk-cute-theme{--md-theme-table-color: inherit;--md-theme-table-border-color: #1c1c1c;--md-theme-table-thead-bg-color: rgba(28, 28, 28, 0.631372549);--md-theme-table-stripe-color: rgba(28, 28, 28, 0.631372549)}.md-editor div.mk-cute-theme table{display:inline-block;width:auto;max-width:100%;overflow:auto;border:solid 1px var(--md-theme-table-border-color)}.md-editor div.mk-cute-theme table thead{background-color:var(--md-theme-table-thead-bg-color);color:var(--md-theme-table-color);text-align:left}.md-editor div.mk-cute-theme table tr th,.md-editor div.mk-cute-theme table tr td{padding:12px 7px;line-height:24px;border:none}.md-editor div.mk-cute-theme table tr td{min-width:120px}.md-editor div.mk-cute-theme blockquote table tbody{color:var(--md-theme-color)}.md-editor div.mk-cute-theme blockquote table tr{background-color:var(--md-theme-table-stripe-color)}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.md-editor div.mk-cute-theme{--md-theme-color: #36ace1;background-image:linear-gradient(90deg, rgba(50, 58, 66, 0.25) 3%, rgba(0, 0, 0, 0) 3%),linear-gradient(360deg, rgba(50, 58, 66, 0.25) 3%, rgba(0, 0, 0, 0) 3%)}.md-editor-dark div.mk-cute-theme{background-image:linear-gradient(90deg, rgba(217, 234, 251, 0.25) 3%, rgba(0, 0, 0, 0) 3%),linear-gradient(360deg, rgba(217, 234, 251, 0.25) 3%, rgba(0, 0, 0, 0) 3%);--md-theme-bg-color-scrollbar-thumb: #4d4d4d}.md-editor div.mk-cute-theme{word-break:break-word;line-height:1.75;font-weight:400;overflow-x:hidden;background-size:20px 20px;background-position:center center}.md-editor div.mk-cute-theme hr{position:relative;width:98%;height:1px;border:none;margin-block-start:32px;margin-block-end:32px;background-image:linear-gradient(to right, #36ace1, #dff0fe, #36ace1);overflow:visible}.md-editor div.mk-cute-theme del{color:#36ace1}.md-editor div.smart-blue-theme{--md-theme-code-inline-color: #d63200;--md-theme-code-inline-bg-color: #fff5f5;--md-theme-code-block-color: #333;--md-theme-code-block-bg-color: #f8f8f8;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color)}.md-editor-dark div.smart-blue-theme{--md-theme-code-inline-color: #e06c75;--md-theme-code-inline-bg-color: #1a1a1a;--md-theme-code-block-color: #999;--md-theme-code-block-bg-color: #1a1a1a;--md-theme-code-before-bg-color: var(--md-theme-code-block-bg-color)}.md-editor div.smart-blue-theme code{overflow-x:auto;padding:.065em .4em}.md-editor div.smart-blue-theme .md-editor-code pre{font-family:Menlo,Monaco,Consolas,Courier New,monospace}.md-editor div.smart-blue-theme .md-editor-code pre code{padding:22px 12px;margin:0;word-break:normal}.md-editor div.smart-blue-theme .md-editor-code pre code span[rn-wrapper]{top:22px}.md-editor div.smart-blue-theme{--md-theme-heading-color: #135ce0}.md-editor div.smart-blue-theme h1,.md-editor div.smart-blue-theme h2,.md-editor div.smart-blue-theme h3,.md-editor div.smart-blue-theme h4,.md-editor div.smart-blue-theme h5,.md-editor div.smart-blue-theme h6{padding:30px 0;margin:0}.md-editor div.smart-blue-theme h1 a,.md-editor div.smart-blue-theme h2 a,.md-editor div.smart-blue-theme h3 a,.md-editor div.smart-blue-theme h4 a,.md-editor div.smart-blue-theme h5 a,.md-editor div.smart-blue-theme h6 a{border:none}.md-editor div.smart-blue-theme h1{position:relative;text-align:center;font-size:22px;margin:50px 0}.md-editor div.smart-blue-theme h2{position:relative;font-size:20px;border-inline-start:4px solid;padding:0 0 0 10px;margin:30px 0}.md-editor div.smart-blue-theme h3{font-size:16px}.md-editor div.smart-blue-theme img{margin:0 auto}.md-editor div.smart-blue-theme{--md-theme-link-color: #036aca}.md-editor-dark div.smart-blue-theme{--md-theme-link-color: #2d7dc7}.md-editor div.smart-blue-theme a{font-weight:400}.md-editor div.smart-blue-theme ul,.md-editor div.smart-blue-theme ol{margin-block-start:1em}.md-editor div.smart-blue-theme li{line-height:2;margin-block-end:0;list-style:inherit}.md-editor div.smart-blue-theme p{line-height:2;font-weight:400}.md-editor div.smart-blue-theme *+p{margin-block-start:16px}.md-editor div.smart-blue-theme{--md-theme-quote-color: #666;--md-theme-quote-bg-color: #fff9f9;--md-theme-quote-border-color: #b2aec5}.md-editor-dark div.smart-blue-theme{--md-theme-quote-color: #999;--md-theme-quote-bg-color: #2a2a2a;--md-theme-quote-border-color: #0063bb}.md-editor div.smart-blue-theme blockquote{background-color:var(--md-theme-quote-bg-color);margin:2em 0;padding:2px 20px;border-inline-start:4px solid var(--md-theme-quote-border-color)}.md-editor div.smart-blue-theme blockquote p{color:var(--md-theme-quote-color);line-height:2}.md-editor div.smart-blue-theme{--md-theme-table-td-border-color: #dfe2e5;--md-theme-table-stripe-color: #f6f8fa}.md-editor-dark div.smart-blue-theme{--md-theme-table-td-border-color: #2d2d2d;--md-theme-table-stripe-color: #0c0c0c}.md-editor div.smart-blue-theme table{border-collapse:collapse;margin:1rem 0;overflow-x:auto}.md-editor div.smart-blue-theme table tr th,.md-editor div.smart-blue-theme table tr td{padding:.6em 1em}.md-editor div.smart-blue-theme blockquote table{line-height:initial}.md-editor div.smart-blue-theme blockquote table tr th,.md-editor div.smart-blue-theme blockquote table tr td{border-color:var(--md-theme-border-color-inset)}.md-editor div.smart-blue-theme blockquote table tbody tr:nth-child(n){background-color:inherit}.md-editor div.smart-blue-theme{--md-theme-color: #595959}.md-editor div.smart-blue-theme{background-image:linear-gradient(90deg, rgba(60, 10, 30, 0.04) 3%, rgba(0, 0, 0, 0) 3%),linear-gradient(360deg, rgba(60, 10, 30, 0.04) 3%, rgba(0, 0, 0, 0) 3%)}.md-editor-dark div.smart-blue-theme{--md-theme-color: #999}.md-editor-dark div.smart-blue-theme{background-image:linear-gradient(90deg, rgba(207, 207, 207, 0.04) 3%, rgba(255, 255, 255, 0) 3%),linear-gradient(360deg, rgba(207, 207, 207, 0.04) 3%, rgba(255, 255, 255, 0) 3%)}.md-editor div.smart-blue-theme{color:var(--md-theme-color);font-family:-apple-system,system-ui,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Arial,sans-serif;background-size:20px 20px;background-position:center center}.md-editor div.smart-blue-theme strong{color:#036aca}.md-editor div.smart-blue-theme em strong{color:#036aca}.md-editor div.smart-blue-theme hr{border-block-start:1px solid #135ce0}
|
|
5
4
|
.md-editor-checkbox {
|
|
6
5
|
cursor: pointer;
|
|
7
6
|
width: 12px;
|
package/dist/C_Menu.css
CHANGED
package/dist/C_Menu.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as RouteItem, r as RouteMeta } from "./types.cjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export { _default as C_Menu, type MenuAdapterConfig, type MenuEmits, type MenuExpose, type MenuProps, type MenuValue, type RouteItem, type RouteMeta, createMenuOptions, flattenRoutes };
|
|
2
|
+
import { a as MenuProps, c as createMenuOptions, i as MenuKey, l as flattenRoutes, n as MenuEmits, o as MenuValue, r as MenuExpose, s as MenuAdapterConfig, t as _default } from "./index4.vue.cjs";
|
|
3
|
+
export { _default as C_Menu, type MenuAdapterConfig, type MenuEmits, type MenuExpose, type MenuKey, type MenuProps, type MenuValue, type RouteItem, type RouteMeta, createMenuOptions, flattenRoutes };
|
package/dist/C_Menu.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as RouteItem, n as createMenuOptions, o as RouteMeta, r as flattenRoutes, t as MenuAdapterConfig } from "./public.js";
|
|
2
|
-
import { a as
|
|
3
|
-
export { _default as C_Menu, type MenuAdapterConfig, type MenuEmits, type MenuExpose, type MenuProps, type MenuValue, type RouteItem, type RouteMeta, createMenuOptions, flattenRoutes };
|
|
2
|
+
import { a as MenuProps, i as MenuKey, n as MenuEmits, o as MenuValue, r as MenuExpose, t as _default } from "./index18.vue.js";
|
|
3
|
+
export { _default as C_Menu, type MenuAdapterConfig, type MenuEmits, type MenuExpose, type MenuKey, type MenuProps, type MenuValue, type RouteItem, type RouteMeta, createMenuOptions, flattenRoutes };
|
package/dist/C_Menu2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./export-helper.cjs`);let t=require(`vue`),n=require(`naive-ui`),r=require(`@iconify/vue`);const i=e=>e.startsWith(`/`)?e:`/${e}`,a=e=>e.path?i(e.path):``,o=e=>e.meta?.title||e.name||``,s=e=>!e.meta?.hidden,c=e=>{if(e){if(typeof e==`string`)return()=>(0,t.h)(`span`,{class:`n-icon`,style:`display: inline-flex; align-items: center;`},[(0,t.h)(r.Icon,{icon:e})]);if(typeof e==`function`)return e}};function l(e,t={}){let{labelFormatter:n=e=>e,getKey:r=a,getLabel:i=o,filter:l=s,renderIcon:u=c,recursive:d=!0}=t,f=e=>e.filter(l).map(e=>{let t=e.meta?.icon||e.icon,a=d&&e.children?.length?f(e.children):void 0;return{key:r(e),label:n(i(e)),disabled:e.disabled||!1,icon:u(t),...e.type&&{type:e.type},...a?.length&&{children:a}}});return f(e)}function u(e,t=s){let n=[],r=e=>{for(let i of e)t(i)&&n.push(i),i.children?.length&&r(i.children)};return r(e),n}const d=(0,t.defineComponent)({name:`C_Menu`,__name:`index`,props:{options:{},routes:{},adapterConfig:{},labelFormatter:{},value:{},modelValue:{},expandedKeys:{},defaultExpandedKeys:{default:()=>[]},mode:{default:`vertical`},collapsed:{type:Boolean,default:!1},collapsedWidth:{default:64},collapsedIconSize:{default:22},inverted:{type:Boolean,default:!1},themeOverrides:{},indent:{default:24},rootIndent:{default:16},dropdownProps:{default:()=>({placement:`right-start`,trigger:`hover`,arrowStyle:{color:`var(--n-color)`}})}},emits:[`select`,`intent`,`update:modelValue`,`update:value`,`update:expandedKeys`],setup(e,{expose:r,emit:i}){let a=e,o=i,s=(0,t.ref)(null),c=(0,t.ref)([...a.defaultExpandedKeys]),u=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),d=(0,t.computed)({get:()=>a.expandedKeys??c.value,set:e=>{u(d.value,e)||(c.value=e,o(`update:expandedKeys`,e))}}),f=(0,t.computed)(()=>a.modelValue===void 0?a.value??null:a.modelValue),p=(0,t.computed)(()=>{if(a.options)return a.options;if(a.routes){let e={...a.adapterConfig,...a.labelFormatter&&{labelFormatter:a.labelFormatter}};return l(a.routes,e)}return[]}),m=(e,t,n=[])=>{for(let r of e){let e=r.children;if(e?.length){let i=typeof r.key==`string`?[...n,r.key]:n;if(e.some(e=>e.key===t))return i;let a=m(e,t,i);if(a.length>0)return a}}return[]},h=e=>{let t=e.split(`/`).filter(Boolean),n=new Set,r=``;return t.forEach(e=>{r+=`/${e}`,n.add(r)}),m(p.value,e).forEach(e=>n.add(e)),n},g=e=>{e&&(e!==f.value&&(o(`update:modelValue`,e),o(`update:value`,e)),o(`select`,e))},_=e=>{let t=()=>{typeof e.key==`string
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./export-helper.cjs`);let t=require(`vue`),n=require(`naive-ui`),r=require(`@iconify/vue`);const i=e=>e.startsWith(`/`)?e:`/${e}`,a=e=>e.path?i(e.path):``,o=e=>e.meta?.title||e.name||``,s=e=>!e.meta?.hidden,c=e=>{if(e){if(typeof e==`string`)return()=>(0,t.h)(`span`,{class:`n-icon`,style:`display: inline-flex; align-items: center;`},[(0,t.h)(r.Icon,{icon:e})]);if(typeof e==`function`)return e}};function l(e,t={}){let{labelFormatter:n=e=>e,getKey:r=a,getLabel:i=o,filter:l=s,renderIcon:u=c,recursive:d=!0}=t,f=e=>e.filter(l).map(e=>{let t=e.meta?.icon||e.icon,a=d&&e.children?.length?f(e.children):void 0;return{key:r(e),label:n(i(e)),disabled:e.disabled||!1,icon:u(t),...e.type&&{type:e.type},...a?.length&&{children:a}}});return f(e)}function u(e,t=s){let n=[],r=e=>{for(let i of e)t(i)&&n.push(i),i.children?.length&&r(i.children)};return r(e),n}const d=(0,t.defineComponent)({name:`C_Menu`,__name:`index`,props:{options:{},routes:{},adapterConfig:{},labelFormatter:{},value:{},modelValue:{},expandedKeys:{},defaultExpandedKeys:{default:()=>[]},mode:{default:`vertical`},collapsed:{type:Boolean,default:!1},collapsedWidth:{default:64},collapsedIconSize:{default:22},inverted:{type:Boolean,default:!1},themeOverrides:{},indent:{default:24},rootIndent:{default:16},dropdownProps:{default:()=>({placement:`right-start`,trigger:`hover`,arrowStyle:{color:`var(--n-color)`}})}},emits:[`select`,`intent`,`update:modelValue`,`update:value`,`update:expandedKeys`],setup(e,{expose:r,emit:i}){let a=e,o=i,s=(0,t.ref)(null),c=(0,t.ref)([...a.defaultExpandedKeys]),u=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),d=(0,t.computed)({get:()=>a.expandedKeys??c.value,set:e=>{u(d.value,e)||(c.value=e,o(`update:expandedKeys`,e))}}),f=(0,t.computed)(()=>a.modelValue===void 0?a.value??null:a.modelValue),p=(0,t.computed)(()=>{if(a.options)return a.options;if(a.routes){let e={...a.adapterConfig,...a.labelFormatter&&{labelFormatter:a.labelFormatter}};return l(a.routes,e)}return[]}),m=(e,t,n=[])=>{for(let r of e){let e=r.children;if(e?.length){let i=typeof r.key==`string`||typeof r.key==`number`?[...n,r.key]:n;if(e.some(e=>e.key===t))return i;let a=m(e,t,i);if(a.length>0)return a}}return[]},h=e=>{let t=typeof e==`string`?e.split(`/`).filter(Boolean):[],n=new Set,r=``;return t.forEach(e=>{r+=`/${e}`,n.add(r)}),m(p.value,e).forEach(e=>n.add(e)),n},g=e=>{e!=null&&(e!==f.value&&(o(`update:modelValue`,e),o(`update:value`,e)),o(`select`,e))},_=e=>{let t=()=>{(typeof e.key==`string`||typeof e.key==`number`)&&!e.children?.length&&o(`intent`,e.key)};return{onPointerenter:t,onFocusin:t}},v=e=>{d.value=e};return r({showOption:e=>s.value?.showOption(e),menuRef:s}),(0,t.watch)([f,p],([e])=>{if(e==null)return;let n=h(e);d.value=Array.from(new Set([...d.value,...n])),(0,t.nextTick)(()=>s.value?.showOption(e))},{immediate:!0}),(r,i)=>{let a=n.NMenu;return(0,t.openBlock)(),(0,t.createBlock)(a,{ref_key:`menuRef`,ref:s,options:p.value,"expanded-keys":d.value,value:f.value,mode:e.mode,collapsed:e.collapsed,"collapsed-width":e.collapsedWidth,"collapsed-icon-size":e.collapsedIconSize,inverted:e.inverted,"theme-overrides":e.themeOverrides,"dropdown-props":e.dropdownProps,indent:e.indent,"root-indent":e.rootIndent,"node-props":_,"onUpdate:value":g,"onUpdate:expandedKeys":v},null,8,[`options`,`expanded-keys`,`value`,`mode`,`collapsed`,`collapsed-width`,`collapsed-icon-size`,`inverted`,`theme-overrides`,`dropdown-props`,`indent`,`root-indent`])}}});var f=e.t(d,[[`__scopeId`,`data-v-285ba5c6`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
package/dist/C_Menu2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./export-helper.js";import{computed as t,createBlock as n,defineComponent as r,h as i,nextTick as a,openBlock as o,ref as s,resolveComponent as c,watch as l}from"vue";import{NMenu as u}from"naive-ui";import{Icon as d}from"@iconify/vue";const f=e=>e.startsWith(`/`)?e:`/${e}`,p=e=>e.path?f(e.path):``,m=e=>e.meta?.title||e.name||``,h=e=>!e.meta?.hidden,g=e=>{if(e){if(typeof e==`string`)return()=>i(`span`,{class:`n-icon`,style:`display: inline-flex; align-items: center;`},[i(d,{icon:e})]);if(typeof e==`function`)return e}};function _(e,t={}){let{labelFormatter:n=e=>e,getKey:r=p,getLabel:i=m,filter:a=h,renderIcon:o=g,recursive:s=!0}=t,c=e=>e.filter(a).map(e=>{let t=e.meta?.icon||e.icon,a=s&&e.children?.length?c(e.children):void 0;return{key:r(e),label:n(i(e)),disabled:e.disabled||!1,icon:o(t),...e.type&&{type:e.type},...a?.length&&{children:a}}});return c(e)}function v(e,t=h){let n=[],r=e=>{for(let i of e)t(i)&&n.push(i),i.children?.length&&r(i.children)};return r(e),n}var y=e(r({name:`C_Menu`,__name:`index`,props:{options:{},routes:{},adapterConfig:{},labelFormatter:{},value:{},modelValue:{},expandedKeys:{},defaultExpandedKeys:{default:()=>[]},mode:{default:`vertical`},collapsed:{type:Boolean,default:!1},collapsedWidth:{default:64},collapsedIconSize:{default:22},inverted:{type:Boolean,default:!1},themeOverrides:{},indent:{default:24},rootIndent:{default:16},dropdownProps:{default:()=>({placement:`right-start`,trigger:`hover`,arrowStyle:{color:`var(--n-color)`}})}},emits:[`select`,`intent`,`update:modelValue`,`update:value`,`update:expandedKeys`],setup(e,{expose:r,emit:i}){let c=e,d=i,f=s(null),p=s([...c.defaultExpandedKeys]),m=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),h=t({get:()=>c.expandedKeys??p.value,set:e=>{m(h.value,e)||(p.value=e,d(`update:expandedKeys`,e))}}),g=t(()=>c.modelValue===void 0?c.value??null:c.modelValue),v=t(()=>{if(c.options)return c.options;if(c.routes){let e={...c.adapterConfig,...c.labelFormatter&&{labelFormatter:c.labelFormatter}};return _(c.routes,e)}return[]}),y=(e,t,n=[])=>{for(let r of e){let e=r.children;if(e?.length){let i=typeof r.key==`string`?[...n,r.key]:n;if(e.some(e=>e.key===t))return i;let a=y(e,t,i);if(a.length>0)return a}}return[]},b=e=>{let t=e.split(`/`).filter(Boolean),n=new Set,r=``;return t.forEach(e=>{r+=`/${e}`,n.add(r)}),y(v.value,e).forEach(e=>n.add(e)),n},x=e=>{e&&(e!==g.value&&(d(`update:modelValue`,e),d(`update:value`,e)),d(`select`,e))},S=e=>{let t=()=>{typeof e.key==`string
|
|
1
|
+
import{t as e}from"./export-helper.js";import{computed as t,createBlock as n,defineComponent as r,h as i,nextTick as a,openBlock as o,ref as s,resolveComponent as c,watch as l}from"vue";import{NMenu as u}from"naive-ui";import{Icon as d}from"@iconify/vue";const f=e=>e.startsWith(`/`)?e:`/${e}`,p=e=>e.path?f(e.path):``,m=e=>e.meta?.title||e.name||``,h=e=>!e.meta?.hidden,g=e=>{if(e){if(typeof e==`string`)return()=>i(`span`,{class:`n-icon`,style:`display: inline-flex; align-items: center;`},[i(d,{icon:e})]);if(typeof e==`function`)return e}};function _(e,t={}){let{labelFormatter:n=e=>e,getKey:r=p,getLabel:i=m,filter:a=h,renderIcon:o=g,recursive:s=!0}=t,c=e=>e.filter(a).map(e=>{let t=e.meta?.icon||e.icon,a=s&&e.children?.length?c(e.children):void 0;return{key:r(e),label:n(i(e)),disabled:e.disabled||!1,icon:o(t),...e.type&&{type:e.type},...a?.length&&{children:a}}});return c(e)}function v(e,t=h){let n=[],r=e=>{for(let i of e)t(i)&&n.push(i),i.children?.length&&r(i.children)};return r(e),n}var y=e(r({name:`C_Menu`,__name:`index`,props:{options:{},routes:{},adapterConfig:{},labelFormatter:{},value:{},modelValue:{},expandedKeys:{},defaultExpandedKeys:{default:()=>[]},mode:{default:`vertical`},collapsed:{type:Boolean,default:!1},collapsedWidth:{default:64},collapsedIconSize:{default:22},inverted:{type:Boolean,default:!1},themeOverrides:{},indent:{default:24},rootIndent:{default:16},dropdownProps:{default:()=>({placement:`right-start`,trigger:`hover`,arrowStyle:{color:`var(--n-color)`}})}},emits:[`select`,`intent`,`update:modelValue`,`update:value`,`update:expandedKeys`],setup(e,{expose:r,emit:i}){let c=e,d=i,f=s(null),p=s([...c.defaultExpandedKeys]),m=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),h=t({get:()=>c.expandedKeys??p.value,set:e=>{m(h.value,e)||(p.value=e,d(`update:expandedKeys`,e))}}),g=t(()=>c.modelValue===void 0?c.value??null:c.modelValue),v=t(()=>{if(c.options)return c.options;if(c.routes){let e={...c.adapterConfig,...c.labelFormatter&&{labelFormatter:c.labelFormatter}};return _(c.routes,e)}return[]}),y=(e,t,n=[])=>{for(let r of e){let e=r.children;if(e?.length){let i=typeof r.key==`string`||typeof r.key==`number`?[...n,r.key]:n;if(e.some(e=>e.key===t))return i;let a=y(e,t,i);if(a.length>0)return a}}return[]},b=e=>{let t=typeof e==`string`?e.split(`/`).filter(Boolean):[],n=new Set,r=``;return t.forEach(e=>{r+=`/${e}`,n.add(r)}),y(v.value,e).forEach(e=>n.add(e)),n},x=e=>{e!=null&&(e!==g.value&&(d(`update:modelValue`,e),d(`update:value`,e)),d(`select`,e))},S=e=>{let t=()=>{(typeof e.key==`string`||typeof e.key==`number`)&&!e.children?.length&&d(`intent`,e.key)};return{onPointerenter:t,onFocusin:t}},C=e=>{h.value=e};return r({showOption:e=>f.value?.showOption(e),menuRef:f}),l([g,v],([e])=>{if(e==null)return;let t=b(e);h.value=Array.from(new Set([...h.value,...t])),a(()=>f.value?.showOption(e))},{immediate:!0}),(t,r)=>{let i=u;return o(),n(i,{ref_key:`menuRef`,ref:f,options:v.value,"expanded-keys":h.value,value:g.value,mode:e.mode,collapsed:e.collapsed,"collapsed-width":e.collapsedWidth,"collapsed-icon-size":e.collapsedIconSize,inverted:e.inverted,"theme-overrides":e.themeOverrides,"dropdown-props":e.dropdownProps,indent:e.indent,"root-indent":e.rootIndent,"node-props":S,"onUpdate:value":x,"onUpdate:expandedKeys":C},null,8,[`options`,`expanded-keys`,`value`,`mode`,`collapsed`,`collapsed-width`,`collapsed-icon-size`,`inverted`,`theme-overrides`,`dropdown-props`,`indent`,`root-indent`])}}}),[[`__scopeId`,`data-v-285ba5c6`]]);export{_ as n,v as r,y as t};
|