Files
prod/frontend/dist/assets/es-CyMNxZbU.js
T
2026-10-12 14:59:47 +07:00

80 lines
16 KiB
JavaScript

import{Bt as e,H as t,K as n,Mt as r,Pt as i,U as a,X as o,Y as s,Yt as c,at as l,bt as u,d,dt as f,g as p,hn as m,it as h,kt as g,nt as _,ot as v,p as y,qt as b,st as x,tt as S,vn as C}from"./client-Bz0sY7Lm.js";import{c as w,l as T,o as E}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{B as D,N as O,_ as k}from"./index-hcoRWULb.js";function A(e){return typeof e==`string`?e.endsWith(`px`)?Number(e.slice(0,e.length-2)):Number(e):e}function j(e){if(e!=null)return typeof e==`number`?`${e}px`:e.endsWith(`px`)?e:`${e}px`}function M(e,t){let n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw Error(`[seemly/getMargin]:`+e+` is not a valid value.`)}return t===void 0?r:r[t]}function ee(e,t){let[n,r]=e.split(` `);return t?t===`row`?n:r:{row:n,col:r||n}}function N(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:s,warningColor:c,errorColor:l,baseColor:u,borderColor:d,opacityDisabled:f,tagColor:p,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,borderRadiusSmall:_,fontSizeMini:v,fontSizeTiny:y,fontSizeSmall:b,fontSizeMedium:x,heightMini:S,heightTiny:C,heightSmall:w,heightMedium:T,closeColorHover:E,closeColorPressed:D,buttonColor2Hover:k,buttonColor2Pressed:A,fontWeightStrong:j}=e;return Object.assign(Object.assign({},O),{closeBorderRadius:_,heightTiny:S,heightSmall:C,heightMedium:w,heightLarge:T,borderRadius:_,opacityDisabled:f,fontSizeTiny:v,fontSizeSmall:y,fontSizeMedium:b,fontSizeLarge:x,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:`#0000`,colorHoverCheckable:k,colorPressedCheckable:A,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:t,color:p,colorBordered:`rgb(250, 250, 252)`,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,closeColorHover:E,closeColorPressed:D,borderPrimary:`1px solid ${o(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:o(i,{alpha:.12}),colorBorderedPrimary:o(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:o(i,{alpha:.12}),closeColorPressedPrimary:o(i,{alpha:.18}),borderInfo:`1px solid ${o(a,{alpha:.3})}`,textColorInfo:a,colorInfo:o(a,{alpha:.12}),colorBorderedInfo:o(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:o(a,{alpha:.12}),closeColorPressedInfo:o(a,{alpha:.18}),borderSuccess:`1px solid ${o(s,{alpha:.3})}`,textColorSuccess:s,colorSuccess:o(s,{alpha:.12}),colorBorderedSuccess:o(s,{alpha:.1}),closeIconColorSuccess:s,closeIconColorHoverSuccess:s,closeIconColorPressedSuccess:s,closeColorHoverSuccess:o(s,{alpha:.12}),closeColorPressedSuccess:o(s,{alpha:.18}),borderWarning:`1px solid ${o(c,{alpha:.35})}`,textColorWarning:c,colorWarning:o(c,{alpha:.15}),colorBorderedWarning:o(c,{alpha:.12}),closeIconColorWarning:c,closeIconColorHoverWarning:c,closeIconColorPressedWarning:c,closeColorHoverWarning:o(c,{alpha:.12}),closeColorPressedWarning:o(c,{alpha:.18}),borderError:`1px solid ${o(l,{alpha:.23})}`,textColorError:l,colorError:o(l,{alpha:.1}),colorBorderedError:o(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:o(l,{alpha:.12}),closeColorPressedError:o(l,{alpha:.18})})}var P={name:`Tag`,common:d,self:N},F={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},I=_(`tag`,`
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
white-space: nowrap;
position: relative;
box-sizing: border-box;
cursor: default;
display: inline-flex;
align-items: center;
flex-wrap: nowrap;
padding: var(--n-padding);
border-radius: var(--n-border-radius);
color: var(--n-text-color);
background-color: var(--n-color);
transition:
border-color .3s var(--n-bezier),
background-color .3s var(--n-bezier),
color .3s var(--n-bezier),
box-shadow .3s var(--n-bezier),
opacity .3s var(--n-bezier);
line-height: 1;
height: var(--n-height);
font-size: var(--n-font-size);
`,[l(`strong`,`
font-weight: var(--n-font-weight-strong);
`),h(`border`,`
pointer-events: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
border-radius: inherit;
border: var(--n-border);
transition: border-color .3s var(--n-bezier);
`),h(`icon`,`
display: flex;
margin: 0 4px 0 0;
color: var(--n-text-color);
transition: color .3s var(--n-bezier);
font-size: var(--n-avatar-size-override);
`),h(`avatar`,`
display: flex;
margin: 0 6px 0 0;
`),h(`close`,`
margin: var(--n-close-margin);
transition:
background-color .3s var(--n-bezier),
color .3s var(--n-bezier);
`),l(`round`,`
padding: 0 calc(var(--n-height) / 3);
border-radius: calc(var(--n-height) / 2);
`,[h(`icon`,`
margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
`),h(`avatar`,`
margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
`),l(`closable`,`
padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
`)]),l(`icon, avatar`,[l(`round`,`
padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
`)]),l(`disabled`,`
cursor: not-allowed !important;
opacity: var(--n-opacity-disabled);
`),l(`checkable`,`
cursor: pointer;
box-shadow: none;
color: var(--n-text-color-checkable);
background-color: var(--n-color-checkable);
`,[v(`disabled`,[S(`&:hover`,`background-color: var(--n-color-hover-checkable);`,[v(`checked`,`color: var(--n-text-color-hover-checkable);`)]),S(`&:active`,`background-color: var(--n-color-pressed-checkable);`,[v(`checked`,`color: var(--n-text-color-pressed-checkable);`)])]),l(`checked`,`
color: var(--n-text-color-checked);
background-color: var(--n-color-checked);
`,[v(`disabled`,[S(`&:hover`,`background-color: var(--n-color-checked-hover);`),S(`&:active`,`background-color: var(--n-color-checked-pressed);`)])])])]),L=Object.assign(Object.assign(Object.assign({},y.props),F),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),R=s(`n-tag`),z=g({name:`Tag`,props:L,slots:Object,setup(e){let n=m(null),{mergedBorderedRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:o,mergedRtlRef:s,mergedComponentPropsRef:c}=a(e),l=u(()=>e.size||c?.value?.Tag?.size||`medium`),d=y(`Tag`,`-tag`,I,P,e,i);b(R,{roundRef:C(e,`round`)});function f(){if(!e.disabled&&e.checkable){let{checked:t,onCheckedChange:n,onUpdateChecked:r,"onUpdate:checked":i}=e;r&&r(!t),i&&i(!t),n&&n(!t)}}function h(t){if(e.triggerClickOnClose||t.stopPropagation(),!e.disabled){let{onClose:n}=e;n&&w(n,t)}}let g={setTextContent(e){let{value:t}=n;t&&(t.textContent=e)}},_=p(`Tag`,s,i),v=u(()=>{let{type:t,color:{color:n,textColor:i}={}}=e,a=l.value,{common:{cubicBezierEaseInOut:o},self:{padding:s,closeMargin:c,borderRadius:u,opacityDisabled:f,textColorCheckable:p,textColorHoverCheckable:m,textColorPressedCheckable:h,textColorChecked:g,colorCheckable:_,colorHoverCheckable:v,colorPressedCheckable:y,colorChecked:b,colorCheckedHover:S,colorCheckedPressed:C,closeBorderRadius:w,fontWeightStrong:T,[x(`colorBordered`,t)]:E,[x(`closeSize`,a)]:D,[x(`closeIconSize`,a)]:O,[x(`fontSize`,a)]:k,[x(`height`,a)]:A,[x(`color`,t)]:j,[x(`textColor`,t)]:ee,[x(`border`,t)]:N,[x(`closeIconColor`,t)]:P,[x(`closeIconColorHover`,t)]:F,[x(`closeIconColorPressed`,t)]:I,[x(`closeColorHover`,t)]:L,[x(`closeColorPressed`,t)]:R}}=d.value,z=M(c);return{"--n-font-weight-strong":T,"--n-avatar-size-override":`calc(${A} - 8px)`,"--n-bezier":o,"--n-border-radius":u,"--n-border":N,"--n-close-icon-size":O,"--n-close-color-pressed":R,"--n-close-color-hover":L,"--n-close-border-radius":w,"--n-close-icon-color":P,"--n-close-icon-color-hover":F,"--n-close-icon-color-pressed":I,"--n-close-icon-color-disabled":P,"--n-close-margin-top":z.top,"--n-close-margin-right":z.right,"--n-close-margin-bottom":z.bottom,"--n-close-margin-left":z.left,"--n-close-size":D,"--n-color":n||(r.value?E:j),"--n-color-checkable":_,"--n-color-checked":b,"--n-color-checked-hover":S,"--n-color-checked-pressed":C,"--n-color-hover-checkable":v,"--n-color-pressed-checkable":y,"--n-font-size":k,"--n-height":A,"--n-opacity-disabled":f,"--n-padding":s,"--n-text-color":i||ee,"--n-text-color-checkable":p,"--n-text-color-checked":g,"--n-text-color-hover-checkable":m,"--n-text-color-pressed-checkable":h}}),S=o?t(`tag`,u(()=>{let t=``,{type:n,color:{color:i,textColor:a}={}}=e;return t+=n[0],t+=l.value[0],i&&(t+=`a${T(i)}`),a&&(t+=`b${T(a)}`),r.value&&(t+=`c`),t}),v,e):void 0;return Object.assign(Object.assign({},g),{rtlEnabled:_,mergedClsPrefix:i,contentRef:n,mergedBordered:r,handleClick:f,handleCloseClick:h,cssVars:o?void 0:v,themeClass:S?.themeClass,onRender:S?.onRender})},render(){var e;let{mergedClsPrefix:t,rtlEnabled:n,closable:i,color:{borderColor:a}={},round:o,onRender:s,$slots:c}=this;s?.();let l=E(c.avatar,e=>e&&r(`div`,{class:`${t}-tag__avatar`},e)),u=E(c.icon,e=>e&&r(`div`,{class:`${t}-tag__icon`},e));return r(`div`,{class:[`${t}-tag`,this.themeClass,{[`${t}-tag--rtl`]:n,[`${t}-tag--strong`]:this.strong,[`${t}-tag--disabled`]:this.disabled,[`${t}-tag--checkable`]:this.checkable,[`${t}-tag--checked`]:this.checkable&&this.checked,[`${t}-tag--round`]:o,[`${t}-tag--avatar`]:l,[`${t}-tag--icon`]:u,[`${t}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},u||l,r(`span`,{class:`${t}-tag__content`,ref:`contentRef`},(e=this.$slots).default?.call(e)),!this.checkable&&i?r(D,{clsPrefix:t,class:`${t}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:o,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?r(`div`,{class:`${t}-tag__border`,style:{borderColor:a}}):null)}});function te(){let e=i(k,null);return e===null&&n(`use-message`,"No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}function ne(e){let t=0;for(let n=0;n<e.length;++n)e[n]===`&`&&++t;return t}var B=/\s*,(?![^(]*\))\s*/g,re=/\s+/g;function ie(e,t){let n=[];return t.split(B).forEach(t=>{let r=ne(t);if(!r){e.forEach(e=>{n.push((e&&e+` `)+t)});return}else if(r===1){e.forEach(e=>{n.push(t.replace(`&`,e))});return}let i=[t];for(;r--;){let t=[];i.forEach(n=>{e.forEach(e=>{t.push(n.replace(`&`,e))})}),i=t}i.forEach(e=>n.push(e))}),n}function ae(e,t){let n=[];return t.split(B).forEach(t=>{e.forEach(e=>{n.push((e&&e+` `)+t)})}),n}function oe(e){let t=[``];return e.forEach(e=>{e&&=e.trim(),e&&(t=e.includes(`&`)?ie(t,e):ae(t,e))}),t.join(`, `).replace(re,` `)}var se=/[A-Z]/g;function V(e){return e.replace(se,e=>`-`+e.toLowerCase())}function ce(e,t=` `){return typeof e==`object`&&e?` {
`+Object.entries(e).map(e=>t+` ${V(e[0])}: ${e[1]};`).join(`
`)+`
`+t+`}`:`: ${e};`}function le(e,t,n){return typeof e==`function`?e({context:t.context,props:n}):e}function H(e,t,n,r){if(!t)return``;let i=le(t,n,r);if(!i)return``;if(typeof i==`string`)return`${e} {\n${i}\n}`;let a=Object.keys(i);if(a.length===0)return n.config.keepEmptyBlock?e+` {
}`:``;let o=e?[e+` {`]:[];return a.forEach(e=>{let t=i[e];if(e===`raw`){o.push(`
`+t+`
`);return}e=V(e),t!=null&&o.push(` ${e}${ce(t)}`)}),e&&o.push(`}`),o.join(`
`)}function U(e,t,n){e&&e.forEach(e=>{if(Array.isArray(e))U(e,t,n);else if(typeof e==`function`){let r=e(t);Array.isArray(r)?U(r,t,n):r&&n(r)}else e&&n(e)})}function W(e,t,n,r,i,a){let o=e.$;!o||typeof o==`string`?t.push(o):typeof o==`function`?t.push(o({context:r.context,props:i})):(o.before&&o.before(r.context),!o.$||typeof o.$==`string`?t.push(o.$):o.$&&t.push(o.$({context:r.context,props:i})));let s=oe(t),c=H(s,e.props,r,i);a&&c&&a.insertRule(c),!a&&c.length&&n.push(c),e.children&&U(e.children,{context:r.context,props:i},e=>{if(typeof e==`string`){let t=H(s,{raw:e},r,i);a?a.insertRule(t):n.push(t)}else W(e,t,n,r,i,a)}),t.pop(),o&&o.after&&o.after(r.context)}function G(e,t,n,r=!1){let i=[];return W(e,[],i,t,n,r?e.instance.__styleSheet:void 0),r?``:i.join(`
`)}function K(e){if(!e)return;let t=e.parentElement;t&&t.removeChild(e)}function q(e){return document.querySelector(`style[cssr-id="${e}"]`)}function ue(e){let t=document.createElement(`style`);return t.setAttribute(`cssr-id`,e),t}window&&(window.__cssrContext={});function J(e){let t=e.getAttribute(`mount-count`);return t===null?null:Number(t)}function Y(e,t){e.setAttribute(`mount-count`,String(t))}function X(e,t,n,r){let{els:i}=t;if(n===void 0)i.forEach(K),t.els=[];else{let e=q(n);if(e&&i.includes(e)){let a=J(e);r?a===null?console.error(`[css-render/unmount]: The style with target='${n}' is mounted in count mode.`):a<=1?(K(e),t.els=i.filter(t=>t!==e)):Y(e,a-1):a===null?(K(e),t.els=i.filter(t=>t!==e)):console.error(`[css-render/unmount]: The style with target='${n}' is mounted in no-count mode.`)}}}function de(e,t){e.push(t)}function fe(e,t,n,r,i,a,o,s,c){if(o&&!c){if(n===void 0){console.error("[css-render/mount]: `id` is required in `boost` mode.");return}let i=window.__cssrContext;i[n]||(i[n]=!0,G(t,e,r,o));return}let l,{els:u}=t,d;if(n===void 0&&(d=t.render(r),n=f(d)),c){c(n,d??t.render(r));return}let p=q(n);if(s||p===null){if(l=p===null?ue(n):p,d===void 0&&(d=t.render(r)),l.textContent=d,p!==null)return;if(i){let e=document.head.getElementsByTagName(`style`)[0]||null;document.head.insertBefore(l,e)}else document.head.appendChild(l);a&&Y(l,1),de(u,l)}else{let e=J(p);a?e===null?console.error(`[css-render/mount]: The style with id='${n}' has been mounted in no-count mode.`):Y(p,e+1):e!==null&&console.error(`[css-render/mount]: The style with id='${n}' has been mounted in count mode.`)}return p??l}function pe(e){return G(this,this.instance,e)}function me(e={}){let{target:t,id:n,ssr:r,props:i,count:a=!1,head:o=!1,boost:s=!1,force:c=!1}=e;return fe(this.instance,this,n??t,i,o,a,s,c,r)}function he(e={}){let{id:t,target:n,delay:r=0,count:i=!1}=e;r===0?X(this.instance,this,t??n,i):setTimeout(()=>X(this.instance,this,t??n,i),r)}var Z=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:pe,mount:me,unmount:he}},ge=function(e,t,n,r){return Array.isArray(t)?Z(e,{$:null},null,t):Array.isArray(n)?Z(e,t,null,n):Array.isArray(r)?Z(e,t,n,r):Z(e,t,n,null)};function _e(e={}){let t=null,n={c:((...e)=>ge(n,...e)),use:(e,...t)=>e.install(n,...t),find:q,context:{},config:e,get __styleSheet(){if(!t){let e=document.createElement(`style`);return document.head.appendChild(e),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return n}var{c:Q}=_e(),ve=Q(`.xicon`,{width:`1em`,height:`1em`,display:`inline-flex`},[Q(`svg`,{width:`1em`,height:`1em`}),Q(`svg:not([fill])`,{fill:`currentColor`})]),ye=()=>{ve.mount({id:`xicons-icon`})},be={size:[String,Number],color:String,tag:String},$=Symbol(`IconConfigInjection`);g({name:`IconConfigProvider`,props:be,setup(e,{slots:t}){return b($,e),()=>c(t,`default`)}});var xe=`span`,Se=g({name:`Icon`,props:be,setup(t,{slots:n}){let a=i($,null),o=u(()=>{let e=t.size??a?.size;if(e!==void 0)return typeof e==`number`||/^\d+$/.test(e)?`${e}px`:e}),s=u(()=>{let{color:e}=t;return e===void 0?a?a.color:void 0:e}),l=u(()=>{let{tag:e}=t;return e===void 0?a?.tag??xe:e});return e(()=>{ye()}),()=>r(l.value,{class:`xicon`,style:{color:s.value,fontSize:o.value}},[c(n,`default`)])}});export{ee as a,A as i,te as n,M as o,z as r,j as s,Se as t};