hermes-web-ui 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -6
- package/bin/hermes-web-ui.mjs +34 -4
- package/dist/assets/{Button-CpNld4Mc.js → Button-sJ2BpaPl.js} +14 -14
- package/dist/assets/{ChannelsView-BWEvTQwM.css → ChannelsView-C2h4_vNn.css} +1 -1
- package/dist/assets/ChannelsView-CD_79lUP.js +1 -0
- package/dist/assets/ChatView-CLIjlJ1x.js +142 -0
- package/dist/assets/ChatView-CX_ZYhvz.css +1 -0
- package/dist/assets/Close-2w73mIOt.js +45 -0
- package/dist/assets/FormItem-XpOdWzQ0.js +110 -0
- package/dist/assets/Input-BzhYBEbH.js +234 -0
- package/dist/assets/InputNumber-8txyKuLX.js +13 -0
- package/dist/assets/JobsView-C-1FgnDL.js +2 -0
- package/dist/assets/{JobsView-DkwaDky6.css → JobsView-OYrxaGgM.css} +1 -1
- package/dist/assets/LoginView-BD15AZNF.js +1 -0
- package/dist/assets/LoginView-BHThbj0n.css +1 -0
- package/dist/assets/LogsView-DmQ4ttpe.js +1 -0
- package/dist/assets/LogsView-DzYGlYxF.css +1 -0
- package/dist/assets/{MarkdownRenderer-C2pkccH2.js → MarkdownRenderer-DJm5zGZj.js} +2 -2
- package/dist/assets/MemoryView-DBtvO2X2.js +5 -0
- package/dist/assets/MemoryView-WR7DvkW0.css +1 -0
- package/dist/assets/Modal-D421R1s7.js +232 -0
- package/dist/assets/{ModelsView-CLdtVeiJ.css → ModelsView-Dm1vBT2p.css} +1 -1
- package/dist/assets/ModelsView-Dt3deKCr.js +1 -0
- package/dist/assets/Popover-pOQtxFC1.js +117 -0
- package/dist/assets/Select-rOqAn7Lj.js +340 -0
- package/dist/assets/SettingRow-CndAlF8Z.js +1 -0
- package/dist/assets/SettingsView-CIcrKeJw.css +1 -0
- package/dist/assets/SettingsView-CxEQl8Fh.js +352 -0
- package/dist/assets/SkillsView-4FLTf1XD.css +1 -0
- package/dist/assets/SkillsView-BopVAaC6.js +1 -0
- package/dist/assets/Spin-CaLC5eru.js +43 -0
- package/dist/assets/Suffix-C1X_jn5E.js +101 -0
- package/dist/assets/Switch-BeZgnVyD.js +102 -0
- package/dist/assets/Tag-DFrN7AVl.js +71 -0
- package/dist/assets/Tooltip-ClSL1Ac2.js +1 -0
- package/dist/assets/{UsageView-CXSijPwc.css → UsageView-Bdck_cnA.css} +1 -1
- package/dist/assets/UsageView-BvGRIGlC.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-DQGaK6t5.js +3 -0
- package/dist/assets/app-DHhjDueA.js +1 -0
- package/dist/assets/app-DqRfMAIZ.js +1 -0
- package/dist/assets/browser-Bf2Q3p4g.js +47 -0
- package/dist/assets/chat-B0V07VGa.js +6 -0
- package/dist/assets/context-Bm7UPqDk.js +1 -0
- package/dist/assets/index-BR3ulF5g.css +1 -0
- package/dist/assets/index-Bdq3IZmO.js +306 -0
- package/dist/assets/jobs-QM3wEm9o.js +1 -0
- package/dist/assets/logo-CiQBpLPw.js +1 -0
- package/dist/assets/pinia-bZ6_VpBU.js +1 -0
- package/dist/assets/router-Ddepf70Q.js +4 -0
- package/dist/assets/{sessions-DYkP_X2v.js → sessions-r2FX4lYx.js} +1 -1
- package/dist/assets/{skills-C6QBmS9j.js → skills-DtNdlEJd.js} +1 -1
- package/dist/assets/use-message-DAtcV1hg.js +1 -0
- package/dist/index.html +18 -18
- package/dist/server/index.js +104 -61
- package/dist/server/routes/filesystem.js +38 -0
- package/dist/server/services/auth.d.ts +9 -0
- package/dist/server/services/auth.js +67 -0
- package/dist/server/services/hermes-cli.js +13 -1
- package/package.json +2 -2
- package/dist/assets/ChannelsView-BGXB46ZU.js +0 -1
- package/dist/assets/ChatView-BVHQ6KhU.css +0 -1
- package/dist/assets/ChatView-CaO-j1NR.js +0 -142
- package/dist/assets/Close-BAvirVyH.js +0 -45
- package/dist/assets/FormItem-DUC1YCrh.js +0 -110
- package/dist/assets/Input-CCmp4iGM.js +0 -234
- package/dist/assets/InputNumber-DpIdrMEW.js +0 -13
- package/dist/assets/JobsView-t5o1pB0r.js +0 -2
- package/dist/assets/LogsView-B2TeFIUX.css +0 -1
- package/dist/assets/LogsView-QqOV3ZEf.js +0 -1
- package/dist/assets/MemoryView-CHeaa1-C.css +0 -1
- package/dist/assets/MemoryView-oeAn8ZfB.js +0 -5
- package/dist/assets/Modal-BljFqAJF.js +0 -232
- package/dist/assets/ModelsView-DvK44HBy.js +0 -1
- package/dist/assets/Popover-BQMR8Xxo.js +0 -117
- package/dist/assets/Select-D33SMWcz.js +0 -340
- package/dist/assets/SettingRow-BxCsRfGG.js +0 -102
- package/dist/assets/SettingsView-CK9ArFcg.js +0 -352
- package/dist/assets/SettingsView-Cl1ts-YY.css +0 -1
- package/dist/assets/SkillsView-BvNhRbMq.css +0 -1
- package/dist/assets/SkillsView-_z2SQ9kJ.js +0 -1
- package/dist/assets/Spin-CwbBDHwW.js +0 -43
- package/dist/assets/Suffix-CKUJBJSi.js +0 -101
- package/dist/assets/Tag-87KswiOb.js +0 -71
- package/dist/assets/Tooltip-CuLVJgy8.js +0 -1
- package/dist/assets/UsageView-COiUupLe.js +0 -1
- package/dist/assets/_plugin-vue_export-helper-C7dadZ10.js +0 -49
- package/dist/assets/app-DX-WvBe8.js +0 -1
- package/dist/assets/app-DwI_Lyfm.js +0 -1
- package/dist/assets/chat-De2jGIM6.js +0 -6
- package/dist/assets/client-D-w1KhaU.js +0 -1
- package/dist/assets/context-vjXbZCu8.js +0 -1
- package/dist/assets/index-D3MGnlpF.js +0 -307
- package/dist/assets/index-DCNlSGk-.css +0 -1
- package/dist/assets/jobs-B2WdYQNb.js +0 -1
- package/dist/assets/pinia-B4dETPKk.js +0 -1
- package/dist/assets/preload-helper-D4M6sveU.js +0 -1
- package/dist/assets/use-message-BeTKmVAO.js +0 -1
- package/dist/assets/vue.runtime.esm-bundler-BoqZ7fRe.js +0 -3
- /package/dist/{assets/logo-BAarh-tH.png → logo.png} +0 -0
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import{$ as e,C as t,E as n,H as r,L as i,P as a,S as o,V as s,k as c,m as l,rt as u,u as d,w as f}from"./vue.runtime.esm-bundler-BoqZ7fRe.js";import{$ as p,B as m,G as h,J as g,K as _,V as v,c as y,dt as b,f as x,ft as S,l as C,lt as w,n as T,nt as E,ot as D,q as O,r as k,st as A,tt as j,u as ee,ut as M,z as te}from"./_plugin-vue_export-helper-C7dadZ10.js";import{_ as ne,b as re,c as N,g as ie,i as P,l as ae,m as F,n as I,o as L,t as R,v as z}from"./Suffix-CKUJBJSi.js";var B=o({name:`Eye`,render(){return f(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},f(`path`,{d:`M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`}),f(`circle`,{cx:`256`,cy:`256`,r:`80`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`}))}}),V=o({name:`EyeOff`,render(){return f(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},f(`path`,{d:`M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z`,fill:`currentColor`}),f(`path`,{d:`M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z`,fill:`currentColor`}),f(`path`,{d:`M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z`,fill:`currentColor`}),f(`path`,{d:`M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z`,fill:`currentColor`}),f(`path`,{d:`M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z`,fill:`currentColor`}))}}),H={paddingTiny:`0 8px`,paddingSmall:`0 10px`,paddingMedium:`0 12px`,paddingLarge:`0 14px`,clearSize:`16px`};function U(e){let{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:o,inputColorDisabled:s,borderColor:c,warningColor:l,warningColorHover:u,errorColor:d,errorColorHover:f,borderRadius:p,lineHeight:m,fontSizeTiny:h,fontSizeSmall:g,fontSizeMedium:_,fontSizeLarge:v,heightTiny:y,heightSmall:b,heightMedium:x,heightLarge:S,actionColor:C,clearColor:w,clearColorHover:T,clearColorPressed:D,placeholderColor:O,placeholderColorDisabled:k,iconColor:A,iconColorDisabled:j,iconColorHover:ee,iconColorPressed:M,fontWeight:te}=e;return Object.assign(Object.assign({},H),{fontWeight:te,countTextColorDisabled:r,countTextColor:n,heightTiny:y,heightSmall:b,heightMedium:x,heightLarge:S,fontSizeTiny:h,fontSizeSmall:g,fontSizeMedium:_,fontSizeLarge:v,lineHeight:m,lineHeightTextarea:m,borderRadius:p,iconSize:`16px`,groupLabelColor:C,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:O,placeholderColorDisabled:k,color:o,colorDisabled:s,colorFocus:o,groupLabelBorder:`1px solid ${c}`,border:`1px solid ${c}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${c}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${E(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:l,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:o,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${E(l,{alpha:.2})}`,caretColorWarning:l,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${f}`,colorFocusError:o,borderFocusError:`1px solid ${f}`,boxShadowFocusError:`0 0 0 2px ${E(d,{alpha:.2})}`,caretColorError:d,clearColor:w,clearColorHover:T,clearColorPressed:D,iconColor:A,iconColorDisabled:j,iconColorHover:ee,iconColorPressed:M,suffixTextColor:t})}var W=y({name:`Input`,common:k,peers:{Scrollbar:P},self:U}),oe=p(`n-input`),se=A(`input`,`
|
|
2
|
-
max-width: 100%;
|
|
3
|
-
cursor: text;
|
|
4
|
-
line-height: 1.5;
|
|
5
|
-
z-index: auto;
|
|
6
|
-
outline: none;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
position: relative;
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
border-radius: var(--n-border-radius);
|
|
11
|
-
background-color: var(--n-color);
|
|
12
|
-
transition: background-color .3s var(--n-bezier);
|
|
13
|
-
font-size: var(--n-font-size);
|
|
14
|
-
font-weight: var(--n-font-weight);
|
|
15
|
-
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
|
|
16
|
-
`,[w(`input, textarea`,`
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
flex-grow: 1;
|
|
19
|
-
position: relative;
|
|
20
|
-
`),w(`input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder`,`
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
font-size: inherit;
|
|
23
|
-
line-height: 1.5;
|
|
24
|
-
font-family: inherit;
|
|
25
|
-
border: none;
|
|
26
|
-
outline: none;
|
|
27
|
-
background-color: #0000;
|
|
28
|
-
text-align: inherit;
|
|
29
|
-
transition:
|
|
30
|
-
-webkit-text-fill-color .3s var(--n-bezier),
|
|
31
|
-
caret-color .3s var(--n-bezier),
|
|
32
|
-
color .3s var(--n-bezier),
|
|
33
|
-
text-decoration-color .3s var(--n-bezier);
|
|
34
|
-
`),w(`input-el, textarea-el`,`
|
|
35
|
-
-webkit-appearance: none;
|
|
36
|
-
scrollbar-width: none;
|
|
37
|
-
width: 100%;
|
|
38
|
-
min-width: 0;
|
|
39
|
-
text-decoration-color: var(--n-text-decoration-color);
|
|
40
|
-
color: var(--n-text-color);
|
|
41
|
-
caret-color: var(--n-caret-color);
|
|
42
|
-
background-color: transparent;
|
|
43
|
-
`,[D(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
44
|
-
width: 0;
|
|
45
|
-
height: 0;
|
|
46
|
-
display: none;
|
|
47
|
-
`),D(`&::placeholder`,`
|
|
48
|
-
color: #0000;
|
|
49
|
-
-webkit-text-fill-color: transparent !important;
|
|
50
|
-
`),D(`&:-webkit-autofill ~`,[w(`placeholder`,`display: none;`)])]),M(`round`,[b(`textarea`,`border-radius: calc(var(--n-height) / 2);`)]),w(`placeholder`,`
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
position: absolute;
|
|
53
|
-
left: 0;
|
|
54
|
-
right: 0;
|
|
55
|
-
top: 0;
|
|
56
|
-
bottom: 0;
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
color: var(--n-placeholder-color);
|
|
59
|
-
`,[D(`span`,`
|
|
60
|
-
width: 100%;
|
|
61
|
-
display: inline-block;
|
|
62
|
-
`)]),M(`textarea`,[w(`placeholder`,`overflow: visible;`)]),b(`autosize`,`width: 100%;`),M(`autosize`,[w(`textarea-el, input-el`,`
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: 0;
|
|
65
|
-
left: 0;
|
|
66
|
-
height: 100%;
|
|
67
|
-
`)]),A(`input-wrapper`,`
|
|
68
|
-
overflow: hidden;
|
|
69
|
-
display: inline-flex;
|
|
70
|
-
flex-grow: 1;
|
|
71
|
-
position: relative;
|
|
72
|
-
padding-left: var(--n-padding-left);
|
|
73
|
-
padding-right: var(--n-padding-right);
|
|
74
|
-
`),w(`input-mirror`,`
|
|
75
|
-
padding: 0;
|
|
76
|
-
height: var(--n-height);
|
|
77
|
-
line-height: var(--n-height);
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
visibility: hidden;
|
|
80
|
-
position: static;
|
|
81
|
-
white-space: pre;
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
`),w(`input-el`,`
|
|
84
|
-
padding: 0;
|
|
85
|
-
height: var(--n-height);
|
|
86
|
-
line-height: var(--n-height);
|
|
87
|
-
`,[D(`&[type=password]::-ms-reveal`,`display: none;`),D(`+`,[w(`placeholder`,`
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: center;
|
|
90
|
-
`)])]),b(`textarea`,[w(`placeholder`,`white-space: nowrap;`)]),w(`eye`,`
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: center;
|
|
94
|
-
transition: color .3s var(--n-bezier);
|
|
95
|
-
`),M(`textarea`,`width: 100%;`,[A(`input-word-count`,`
|
|
96
|
-
position: absolute;
|
|
97
|
-
right: var(--n-padding-right);
|
|
98
|
-
bottom: var(--n-padding-vertical);
|
|
99
|
-
`),M(`resizable`,[A(`input-wrapper`,`
|
|
100
|
-
resize: vertical;
|
|
101
|
-
min-height: var(--n-height);
|
|
102
|
-
`)]),w(`textarea-el, textarea-mirror, placeholder`,`
|
|
103
|
-
height: 100%;
|
|
104
|
-
padding-left: 0;
|
|
105
|
-
padding-right: 0;
|
|
106
|
-
padding-top: var(--n-padding-vertical);
|
|
107
|
-
padding-bottom: var(--n-padding-vertical);
|
|
108
|
-
word-break: break-word;
|
|
109
|
-
display: inline-block;
|
|
110
|
-
vertical-align: bottom;
|
|
111
|
-
box-sizing: border-box;
|
|
112
|
-
line-height: var(--n-line-height-textarea);
|
|
113
|
-
margin: 0;
|
|
114
|
-
resize: none;
|
|
115
|
-
white-space: pre-wrap;
|
|
116
|
-
scroll-padding-block-end: var(--n-padding-vertical);
|
|
117
|
-
`),w(`textarea-mirror`,`
|
|
118
|
-
width: 100%;
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
overflow: hidden;
|
|
121
|
-
visibility: hidden;
|
|
122
|
-
position: static;
|
|
123
|
-
white-space: pre-wrap;
|
|
124
|
-
overflow-wrap: break-word;
|
|
125
|
-
`)]),M(`pair`,[w(`input-el, placeholder`,`text-align: center;`),w(`separator`,`
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
transition: color .3s var(--n-bezier);
|
|
129
|
-
color: var(--n-text-color);
|
|
130
|
-
white-space: nowrap;
|
|
131
|
-
`,[A(`icon`,`
|
|
132
|
-
color: var(--n-icon-color);
|
|
133
|
-
`),A(`base-icon`,`
|
|
134
|
-
color: var(--n-icon-color);
|
|
135
|
-
`)])]),M(`disabled`,`
|
|
136
|
-
cursor: not-allowed;
|
|
137
|
-
background-color: var(--n-color-disabled);
|
|
138
|
-
`,[w(`border`,`border: var(--n-border-disabled);`),w(`input-el, textarea-el`,`
|
|
139
|
-
cursor: not-allowed;
|
|
140
|
-
color: var(--n-text-color-disabled);
|
|
141
|
-
text-decoration-color: var(--n-text-color-disabled);
|
|
142
|
-
`),w(`placeholder`,`color: var(--n-placeholder-color-disabled);`),w(`separator`,`color: var(--n-text-color-disabled);`,[A(`icon`,`
|
|
143
|
-
color: var(--n-icon-color-disabled);
|
|
144
|
-
`),A(`base-icon`,`
|
|
145
|
-
color: var(--n-icon-color-disabled);
|
|
146
|
-
`)]),A(`input-word-count`,`
|
|
147
|
-
color: var(--n-count-text-color-disabled);
|
|
148
|
-
`),w(`suffix, prefix`,`color: var(--n-text-color-disabled);`,[A(`icon`,`
|
|
149
|
-
color: var(--n-icon-color-disabled);
|
|
150
|
-
`),A(`internal-icon`,`
|
|
151
|
-
color: var(--n-icon-color-disabled);
|
|
152
|
-
`)])]),b(`disabled`,[w(`eye`,`
|
|
153
|
-
color: var(--n-icon-color);
|
|
154
|
-
cursor: pointer;
|
|
155
|
-
`,[D(`&:hover`,`
|
|
156
|
-
color: var(--n-icon-color-hover);
|
|
157
|
-
`),D(`&:active`,`
|
|
158
|
-
color: var(--n-icon-color-pressed);
|
|
159
|
-
`)]),D(`&:hover`,[w(`state-border`,`border: var(--n-border-hover);`)]),M(`focus`,`background-color: var(--n-color-focus);`,[w(`state-border`,`
|
|
160
|
-
border: var(--n-border-focus);
|
|
161
|
-
box-shadow: var(--n-box-shadow-focus);
|
|
162
|
-
`)])]),w(`border, state-border`,`
|
|
163
|
-
box-sizing: border-box;
|
|
164
|
-
position: absolute;
|
|
165
|
-
left: 0;
|
|
166
|
-
right: 0;
|
|
167
|
-
top: 0;
|
|
168
|
-
bottom: 0;
|
|
169
|
-
pointer-events: none;
|
|
170
|
-
border-radius: inherit;
|
|
171
|
-
border: var(--n-border);
|
|
172
|
-
transition:
|
|
173
|
-
box-shadow .3s var(--n-bezier),
|
|
174
|
-
border-color .3s var(--n-bezier);
|
|
175
|
-
`),w(`state-border`,`
|
|
176
|
-
border-color: #0000;
|
|
177
|
-
z-index: 1;
|
|
178
|
-
`),w(`prefix`,`margin-right: 4px;`),w(`suffix`,`
|
|
179
|
-
margin-left: 4px;
|
|
180
|
-
`),w(`suffix, prefix`,`
|
|
181
|
-
transition: color .3s var(--n-bezier);
|
|
182
|
-
flex-wrap: nowrap;
|
|
183
|
-
flex-shrink: 0;
|
|
184
|
-
line-height: var(--n-height);
|
|
185
|
-
white-space: nowrap;
|
|
186
|
-
display: inline-flex;
|
|
187
|
-
align-items: center;
|
|
188
|
-
justify-content: center;
|
|
189
|
-
color: var(--n-suffix-text-color);
|
|
190
|
-
`,[A(`base-loading`,`
|
|
191
|
-
font-size: var(--n-icon-size);
|
|
192
|
-
margin: 0 2px;
|
|
193
|
-
color: var(--n-loading-color);
|
|
194
|
-
`),A(`base-clear`,`
|
|
195
|
-
font-size: var(--n-icon-size);
|
|
196
|
-
`,[w(`placeholder`,[A(`base-icon`,`
|
|
197
|
-
transition: color .3s var(--n-bezier);
|
|
198
|
-
color: var(--n-icon-color);
|
|
199
|
-
font-size: var(--n-icon-size);
|
|
200
|
-
`)])]),D(`>`,[A(`icon`,`
|
|
201
|
-
transition: color .3s var(--n-bezier);
|
|
202
|
-
color: var(--n-icon-color);
|
|
203
|
-
font-size: var(--n-icon-size);
|
|
204
|
-
`)]),A(`base-icon`,`
|
|
205
|
-
font-size: var(--n-icon-size);
|
|
206
|
-
`)]),A(`input-word-count`,`
|
|
207
|
-
pointer-events: none;
|
|
208
|
-
line-height: 1.5;
|
|
209
|
-
font-size: .85em;
|
|
210
|
-
color: var(--n-count-text-color);
|
|
211
|
-
transition: color .3s var(--n-bezier);
|
|
212
|
-
margin-left: 4px;
|
|
213
|
-
font-variant: tabular-nums;
|
|
214
|
-
`),[`warning`,`error`].map(e=>M(`${e}-status`,[b(`disabled`,[A(`base-loading`,`
|
|
215
|
-
color: var(--n-loading-color-${e})
|
|
216
|
-
`),w(`input-el, textarea-el`,`
|
|
217
|
-
caret-color: var(--n-caret-color-${e});
|
|
218
|
-
`),w(`state-border`,`
|
|
219
|
-
border: var(--n-border-${e});
|
|
220
|
-
`),D(`&:hover`,[w(`state-border`,`
|
|
221
|
-
border: var(--n-border-hover-${e});
|
|
222
|
-
`)]),D(`&:focus`,`
|
|
223
|
-
background-color: var(--n-color-focus-${e});
|
|
224
|
-
`,[w(`state-border`,`
|
|
225
|
-
box-shadow: var(--n-box-shadow-focus-${e});
|
|
226
|
-
border: var(--n-border-focus-${e});
|
|
227
|
-
`)]),M(`focus`,`
|
|
228
|
-
background-color: var(--n-color-focus-${e});
|
|
229
|
-
`,[w(`state-border`,`
|
|
230
|
-
box-shadow: var(--n-box-shadow-focus-${e});
|
|
231
|
-
border: var(--n-border-focus-${e});
|
|
232
|
-
`)])])]))]),ce=A(`input`,[M(`disabled`,[w(`input-el, textarea-el`,`
|
|
233
|
-
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
234
|
-
`)])]);function G(e){let t=0;for(let n of e)t++;return t}function K(e){return e===``||e==null}function le(t){let n=e(null);function r(){let{value:e}=t;if(!e?.focus){a();return}let{selectionStart:r,selectionEnd:i,value:o}=e;if(r==null||i==null){a();return}n.value={start:r,end:i,beforeText:o.slice(0,r),afterText:o.slice(i)}}function i(){var e;let{value:r}=n,{value:i}=t;if(!r||!i)return;let{value:a}=i,{start:o,beforeText:s,afterText:c}=r,l=a.length;if(a.endsWith(c))l=a.length-c.length;else if(a.startsWith(s))l=s.length;else{let e=s[o-1],t=a.indexOf(e,o-1);t!==-1&&(l=t+1)}(e=i.setSelectionRange)==null||e.call(i,l,l)}function a(){n.value=null}return s(t,a),{recordCursor:r,restoreCursor:i}}var q=o({name:`InputWordCount`,setup(e,{slots:t}){let{mergedValueRef:r,maxlengthRef:i,mergedClsPrefixRef:a,countGraphemesRef:o}=n(oe),s=l(()=>{let{value:e}=r;return e===null||Array.isArray(e)?0:(o.value||G)(e)});return()=>{let{value:e}=i,{value:n}=r;return f(`span`,{class:`${a.value}-input-word-count`},_(t.default,{value:n===null||Array.isArray(n)?``:n},()=>[e===void 0?s.value:`${s.value} / ${e}`]))}}}),J=o({name:`Input`,props:Object.assign(Object.assign({},C.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:`text`},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),slots:Object,setup(n){let{mergedClsPrefixRef:o,mergedBorderedRef:d,inlineThemeDisabled:f,mergedRtlRef:p,mergedComponentPropsRef:h}=v(n),_=C(`Input`,`-input`,se,W,n,o);T&&ee(`-input-safari`,ce,o);let y=e(null),b=e(null),w=e(null),E=e(null),D=e(null),O=e(null),k=e(null),A=le(k),M=e(null),{localeRef:N}=ae(`Input`),P=e(n.defaultValue),F=ie(u(n,`value`),P),I=te(n,{mergedSize:e=>{let{size:t}=n;if(t)return t;let{mergedSize:r}=e||{};return r?.value?r.value:h?.value?.Input?.size||`medium`}}),{mergedSizeRef:L,mergedDisabledRef:R,mergedStatusRef:B}=I,V=e(!1),H=e(!1),U=e(!1),G=e(!1),q=null,J=l(()=>{let{placeholder:e,pair:t}=n;return t?Array.isArray(e)?e:e===void 0?[``,``]:[e,e]:e===void 0?[N.value.placeholder]:[e]}),ue=l(()=>{let{value:e}=U,{value:t}=F,{value:n}=J;return!e&&(K(t)||Array.isArray(t)&&K(t[0]))&&n[0]}),de=l(()=>{let{value:e}=U,{value:t}=F,{value:n}=J;return!e&&n[1]&&(K(t)||Array.isArray(t)&&K(t[1]))}),fe=j(()=>n.internalForceFocus||V.value),pe=j(()=>{if(R.value||n.readonly||!n.clearable||!fe.value&&!H.value)return!1;let{value:e}=F,{value:t}=fe;return n.pair?!!(Array.isArray(e)&&(e[0]||e[1]))&&(H.value||t):!!e&&(H.value||t)}),me=l(()=>{let{showPasswordOn:e}=n;if(e)return e;if(n.showPasswordToggle)return`click`}),Y=e(!1),he=l(()=>{let{textDecoration:e}=n;return e?Array.isArray(e)?e.map(e=>({textDecoration:e})):[{textDecoration:e}]:[``,``]}),ge=e(void 0),_e=()=>{if(n.type===`textarea`){let{autosize:e}=n;if(e&&(ge.value=M.value?.$el?.offsetWidth),!b.value||typeof e==`boolean`)return;let{paddingTop:t,paddingBottom:r,lineHeight:i}=window.getComputedStyle(b.value),a=Number(t.slice(0,-2)),o=Number(r.slice(0,-2)),s=Number(i.slice(0,-2)),{value:c}=w;if(!c)return;if(e.minRows){let t=Math.max(e.minRows,1),n=`${a+o+s*t}px`;c.style.minHeight=n}if(e.maxRows){let t=`${a+o+s*e.maxRows}px`;c.style.maxHeight=t}}},ve=l(()=>{let{maxlength:e}=n;return e===void 0?void 0:Number(e)});a(()=>{let{value:e}=F;Array.isArray(e)||nt(e)});let ye=t().proxy;function X(e,t){let{onUpdateValue:r,"onUpdate:value":i,onInput:a}=n,{nTriggerFormInput:o}=I;r&&g(r,e,t),i&&g(i,e,t),a&&g(a,e,t),P.value=e,o()}function Z(e,t){let{onChange:r}=n,{nTriggerFormChange:i}=I;r&&g(r,e,t),P.value=e,i()}function be(e){let{onBlur:t}=n,{nTriggerFormBlur:r}=I;t&&g(t,e),r()}function xe(e){let{onFocus:t}=n,{nTriggerFormFocus:r}=I;t&&g(t,e),r()}function Se(e){let{onClear:t}=n;t&&g(t,e)}function Ce(e){let{onInputBlur:t}=n;t&&g(t,e)}function we(e){let{onInputFocus:t}=n;t&&g(t,e)}function Te(){let{onDeactivate:e}=n;e&&g(e)}function Ee(){let{onActivate:e}=n;e&&g(e)}function De(e){let{onClick:t}=n;t&&g(t,e)}function Oe(e){let{onWrapperFocus:t}=n;t&&g(t,e)}function ke(e){let{onWrapperBlur:t}=n;t&&g(t,e)}function Ae(){U.value=!0}function je(e){U.value=!1,e.target===O.value?Q(e,1):Q(e,0)}function Q(e,t=0,r=`input`){let i=e.target.value;if(nt(i),e instanceof InputEvent&&!e.isComposing&&(U.value=!1),n.type===`textarea`){let{value:e}=M;e&&e.syncUnifiedContainer()}if(q=i,U.value)return;A.recordCursor();let a=Me(i);if(a)if(!n.pair)r===`input`?X(i,{source:t}):Z(i,{source:t});else{let{value:e}=F;e=Array.isArray(e)?[e[0],e[1]]:[``,``],e[t]=i,r===`input`?X(e,{source:t}):Z(e,{source:t})}ye.$forceUpdate(),a||c(A.restoreCursor)}function Me(e){let{countGraphemes:t,maxlength:r,minlength:i}=n;if(t){let n;if(r!==void 0&&(n===void 0&&(n=t(e)),n>Number(r))||i!==void 0&&(n===void 0&&(n=t(e)),n<Number(r)))return!1}let{allowInput:a}=n;return typeof a==`function`?a(e):!0}function Ne(e){Ce(e),e.relatedTarget===y.value&&Te(),e.relatedTarget!==null&&(e.relatedTarget===D.value||e.relatedTarget===O.value||e.relatedTarget===b.value)||(G.value=!1),$(e,`blur`),k.value=null}function Pe(e,t){we(e),V.value=!0,G.value=!0,Ee(),$(e,`focus`),t===0?k.value=D.value:t===1?k.value=O.value:t===2&&(k.value=b.value)}function Fe(e){n.passivelyActivated&&(ke(e),$(e,`blur`))}function Ie(e){n.passivelyActivated&&(V.value=!0,Oe(e),$(e,`focus`))}function $(e,t){e.relatedTarget!==null&&(e.relatedTarget===D.value||e.relatedTarget===O.value||e.relatedTarget===b.value||e.relatedTarget===y.value)||(t===`focus`?(xe(e),V.value=!0):t===`blur`&&(be(e),V.value=!1))}function Le(e,t){Q(e,t,`change`)}function Re(e){De(e)}function ze(e){Se(e),Be()}function Be(){n.pair?(X([``,``],{source:`clear`}),Z([``,``],{source:`clear`})):(X(``,{source:`clear`}),Z(``,{source:`clear`}))}function Ve(e){let{onMousedown:t}=n;t&&t(e);let{tagName:r}=e.target;if(r!==`INPUT`&&r!==`TEXTAREA`){if(n.resizable){let{value:t}=y;if(t){let{left:n,top:r,width:i,height:a}=t.getBoundingClientRect();if(n+i-14<e.clientX&&e.clientX<n+i&&r+a-14<e.clientY&&e.clientY<r+a)return}}e.preventDefault(),V.value||Xe()}}function He(){var e;H.value=!0,n.type===`textarea`&&((e=M.value)==null||e.handleMouseEnterWrapper())}function Ue(){var e;H.value=!1,n.type===`textarea`&&((e=M.value)==null||e.handleMouseLeaveWrapper())}function We(){R.value||me.value===`click`&&(Y.value=!Y.value)}function Ge(e){if(R.value)return;e.preventDefault();let t=e=>{e.preventDefault(),ne(`mouseup`,document,t)};if(z(`mouseup`,document,t),me.value!==`mousedown`)return;Y.value=!0;let n=()=>{Y.value=!1,ne(`mouseup`,document,n)};z(`mouseup`,document,n)}function Ke(e){n.onKeyup&&g(n.onKeyup,e)}function qe(e){switch(n.onKeydown&&g(n.onKeydown,e),e.key){case`Escape`:Ye();break;case`Enter`:Je(e);break}}function Je(e){var t,r;if(n.passivelyActivated){let{value:i}=G;if(i){n.internalDeactivateOnEnter&&Ye();return}e.preventDefault(),n.type===`textarea`?(t=b.value)==null||t.focus():(r=D.value)==null||r.focus()}}function Ye(){n.passivelyActivated&&(G.value=!1,c(()=>{var e;(e=y.value)==null||e.focus()}))}function Xe(){var e,t,r;R.value||(n.passivelyActivated?(e=y.value)==null||e.focus():((t=b.value)==null||t.focus(),(r=D.value)==null||r.focus()))}function Ze(){y.value?.contains(document.activeElement)&&document.activeElement.blur()}function Qe(){var e,t;(e=b.value)==null||e.select(),(t=D.value)==null||t.select()}function $e(){R.value||(b.value?b.value.focus():D.value&&D.value.focus())}function et(){let{value:e}=y;e?.contains(document.activeElement)&&e!==document.activeElement&&Ye()}function tt(e){if(n.type===`textarea`){let{value:t}=b;t?.scrollTo(e)}else{let{value:t}=D;t?.scrollTo(e)}}function nt(e){let{type:t,pair:r,autosize:i}=n;if(!r&&i)if(t===`textarea`){let{value:t}=w;t&&(t.textContent=`${e??``}\r\n`)}else{let{value:t}=E;t&&(e?t.textContent=e:t.innerHTML=` `)}}function rt(){_e()}let it=e({top:`0`});function at(e){var t;let{scrollTop:n}=e.target;it.value.top=`${-n}px`,(t=M.value)==null||t.syncUnifiedContainer()}let ot=null;r(()=>{let{autosize:e,type:t}=n;e&&t===`textarea`?ot=s(F,e=>{!Array.isArray(e)&&e!==q&&nt(e)}):ot?.()});let st=null;r(()=>{n.type===`textarea`?st=s(F,e=>{var t;!Array.isArray(e)&&e!==q&&((t=M.value)==null||t.syncUnifiedContainer())}):st?.()}),i(oe,{mergedValueRef:F,maxlengthRef:ve,mergedClsPrefixRef:o,countGraphemesRef:u(n,`countGraphemes`)});let ct={wrapperElRef:y,inputElRef:D,textareaElRef:b,isCompositing:U,clear:Be,focus:Xe,blur:Ze,select:Qe,deactivate:et,activate:$e,scrollTo:tt},lt=x(`Input`,p,o),ut=l(()=>{let{value:e}=L,{common:{cubicBezierEaseInOut:t},self:{color:n,borderRadius:r,textColor:i,caretColor:a,caretColorError:o,caretColorWarning:s,textDecorationColor:c,border:l,borderDisabled:u,borderHover:d,borderFocus:f,placeholderColor:p,placeholderColorDisabled:m,lineHeightTextarea:h,colorDisabled:g,colorFocus:v,textColorDisabled:y,boxShadowFocus:b,iconSize:x,colorFocusWarning:C,boxShadowFocusWarning:w,borderWarning:T,borderFocusWarning:E,borderHoverWarning:D,colorFocusError:O,boxShadowFocusError:k,borderError:A,borderFocusError:j,borderHoverError:ee,clearSize:M,clearColor:te,clearColorHover:ne,clearColorPressed:N,iconColor:ie,iconColorDisabled:P,suffixTextColor:ae,countTextColor:F,countTextColorDisabled:I,iconColorHover:R,iconColorPressed:z,loadingColor:B,loadingColorError:V,loadingColorWarning:H,fontWeight:U,[S(`padding`,e)]:W,[S(`fontSize`,e)]:oe,[S(`height`,e)]:se}}=_.value,{left:ce,right:G}=re(W);return{"--n-bezier":t,"--n-count-text-color":F,"--n-count-text-color-disabled":I,"--n-color":n,"--n-font-size":oe,"--n-font-weight":U,"--n-border-radius":r,"--n-height":se,"--n-padding-left":ce,"--n-padding-right":G,"--n-text-color":i,"--n-caret-color":a,"--n-text-decoration-color":c,"--n-border":l,"--n-border-disabled":u,"--n-border-hover":d,"--n-border-focus":f,"--n-placeholder-color":p,"--n-placeholder-color-disabled":m,"--n-icon-size":x,"--n-line-height-textarea":h,"--n-color-disabled":g,"--n-color-focus":v,"--n-text-color-disabled":y,"--n-box-shadow-focus":b,"--n-loading-color":B,"--n-caret-color-warning":s,"--n-color-focus-warning":C,"--n-box-shadow-focus-warning":w,"--n-border-warning":T,"--n-border-focus-warning":E,"--n-border-hover-warning":D,"--n-loading-color-warning":H,"--n-caret-color-error":o,"--n-color-focus-error":O,"--n-box-shadow-focus-error":k,"--n-border-error":A,"--n-border-focus-error":j,"--n-border-hover-error":ee,"--n-loading-color-error":V,"--n-clear-color":te,"--n-clear-size":M,"--n-clear-color-hover":ne,"--n-clear-color-pressed":N,"--n-icon-color":ie,"--n-icon-color-hover":R,"--n-icon-color-pressed":z,"--n-icon-color-disabled":P,"--n-suffix-text-color":ae}}),dt=f?m(`input`,l(()=>{let{value:e}=L;return e[0]}),ut,n):void 0;return Object.assign(Object.assign({},ct),{wrapperElRef:y,inputElRef:D,inputMirrorElRef:E,inputEl2Ref:O,textareaElRef:b,textareaMirrorElRef:w,textareaScrollbarInstRef:M,rtlEnabled:lt,uncontrolledValue:P,mergedValue:F,passwordVisible:Y,mergedPlaceholder:J,showPlaceholder1:ue,showPlaceholder2:de,mergedFocus:fe,isComposing:U,activated:G,showClearButton:pe,mergedSize:L,mergedDisabled:R,textDecorationStyle:he,mergedClsPrefix:o,mergedBordered:d,mergedShowPasswordOn:me,placeholderStyle:it,mergedStatus:B,textAreaScrollContainerWidth:ge,handleTextAreaScroll:at,handleCompositionStart:Ae,handleCompositionEnd:je,handleInput:Q,handleInputBlur:Ne,handleInputFocus:Pe,handleWrapperBlur:Fe,handleWrapperFocus:Ie,handleMouseEnter:He,handleMouseLeave:Ue,handleMouseDown:Ve,handleChange:Le,handleClick:Re,handleClear:ze,handlePasswordToggleClick:We,handlePasswordToggleMousedown:Ge,handleWrapperKeydown:qe,handleWrapperKeyup:Ke,handleTextAreaMirrorResize:rt,getTextareaScrollContainer:()=>b.value,mergedTheme:_,cssVars:f?void 0:ut,themeClass:dt?.themeClass,onRender:dt?.onRender})},render(){let{mergedClsPrefix:e,mergedStatus:t,themeClass:n,type:r,countGraphemes:i,onRender:a}=this,o=this.$slots;return a?.(),f(`div`,{ref:`wrapperElRef`,class:[`${e}-input`,`${e}-input--${this.mergedSize}-size`,n,t&&`${e}-input--${t}-status`,{[`${e}-input--rtl`]:this.rtlEnabled,[`${e}-input--disabled`]:this.mergedDisabled,[`${e}-input--textarea`]:r===`textarea`,[`${e}-input--resizable`]:this.resizable&&!this.autosize,[`${e}-input--autosize`]:this.autosize,[`${e}-input--round`]:this.round&&r!==`textarea`,[`${e}-input--pair`]:this.pair,[`${e}-input--focus`]:this.mergedFocus,[`${e}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},f(`div`,{class:`${e}-input-wrapper`},O(o.prefix,t=>t&&f(`div`,{class:`${e}-input__prefix`},t)),r===`textarea`?f(I,{ref:`textareaScrollbarInstRef`,class:`${e}-input__textarea`,container:this.getTextareaScrollContainer,theme:this.theme?.peers?.Scrollbar,themeOverrides:this.themeOverrides?.peers?.Scrollbar,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{let{textAreaScrollContainerWidth:t}=this,n={width:this.autosize&&t&&`${t}px`};return f(d,null,f(`textarea`,Object.assign({},this.inputProps,{ref:`textareaElRef`,class:[`${e}-input__textarea-el`,this.inputProps?.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:i?void 0:this.maxlength,minlength:i?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],this.inputProps?.style,n],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?f(`div`,{class:`${e}-input__placeholder`,style:[this.placeholderStyle,n],key:`placeholder`},this.mergedPlaceholder[0]):null,this.autosize?f(F,{onResize:this.handleTextAreaMirrorResize},{default:()=>f(`div`,{ref:`textareaMirrorElRef`,class:`${e}-input__textarea-mirror`,key:`mirror`})}):null)}}):f(`div`,{class:`${e}-input__input`},f(`input`,Object.assign({type:r===`password`&&this.mergedShowPasswordOn&&this.passwordVisible?`text`:r},this.inputProps,{ref:`inputElRef`,class:[`${e}-input__input-el`,this.inputProps?.class],style:[this.textDecorationStyle[0],this.inputProps?.style],tabindex:this.passivelyActivated&&!this.activated?-1:this.inputProps?.tabindex,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:i?void 0:this.maxlength,minlength:i?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,0)},onInput:e=>{this.handleInput(e,0)},onChange:e=>{this.handleChange(e,0)}})),this.showPlaceholder1?f(`div`,{class:`${e}-input__placeholder`},f(`span`,null,this.mergedPlaceholder[0])):null,this.autosize?f(`div`,{class:`${e}-input__input-mirror`,key:`mirror`,ref:`inputMirrorElRef`},`\xA0`):null),!this.pair&&O(o.suffix,t=>t||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?f(`div`,{class:`${e}-input__suffix`},[O(o[`clear-icon-placeholder`],t=>(this.clearable||t)&&f(L,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>t,icon:()=>{var e;return(e=this.$slots)[`clear-icon`]?.call(e)}})),this.internalLoadingBeforeSuffix?null:t,this.loading===void 0?null:f(R,{clsPrefix:e,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}),this.internalLoadingBeforeSuffix?t:null,this.showCount&&this.type!==`textarea`?f(q,null,{default:e=>{let{renderCount:t}=this;return t?t(e):o.count?.call(o,e)}}):null,this.mergedShowPasswordOn&&this.type===`password`?f(`div`,{class:`${e}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?h(o[`password-visible-icon`],()=>[f(N,{clsPrefix:e},{default:()=>f(B,null)})]):h(o[`password-invisible-icon`],()=>[f(N,{clsPrefix:e},{default:()=>f(V,null)})])):null]):null)),this.pair?f(`span`,{class:`${e}-input__separator`},h(o.separator,()=>[this.separator])):null,this.pair?f(`div`,{class:`${e}-input-wrapper`},f(`div`,{class:`${e}-input__input`},f(`input`,{ref:`inputEl2Ref`,type:this.type,class:`${e}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:i?void 0:this.maxlength,minlength:i?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,1)},onInput:e=>{this.handleInput(e,1)},onChange:e=>{this.handleChange(e,1)}}),this.showPlaceholder2?f(`div`,{class:`${e}-input__placeholder`},f(`span`,null,this.mergedPlaceholder[1])):null),O(o.suffix,t=>(this.clearable||t)&&f(`div`,{class:`${e}-input__suffix`},[this.clearable&&f(L,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{icon:()=>o[`clear-icon`]?.call(o),placeholder:()=>o[`clear-icon-placeholder`]?.call(o)}),t]))):null,this.mergedBordered?f(`div`,{class:`${e}-input__border`}):null,this.mergedBordered?f(`div`,{class:`${e}-input__state-border`}):null,this.showCount&&r===`textarea`?f(q,null,{default:e=>{let{renderCount:t}=this;return t?t(e):o.count?.call(o,e)}}):null)}});export{W as n,J as t};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{$ as e,S as t,V as n,k as r,m as i,rt as a,w as o}from"./vue.runtime.esm-bundler-BoqZ7fRe.js";import{G as s,J as c,V as ee,c as l,f as te,it as ne,l as u,ot as d,q as f,r as p,st as m,tt as h,z as re}from"./_plugin-vue_export-helper-C7dadZ10.js";import{c as g,g as ie,l as ae,v as _}from"./Suffix-CKUJBJSi.js";import{n as v,r as y}from"./Button-CpNld4Mc.js";import{n as b,t as x}from"./Input-CCmp4iGM.js";var S=t({name:`Add`,render(){return o(`svg`,{width:`512`,height:`512`,viewBox:`0 0 512 512`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},o(`path`,{d:`M256 112V400M400 256H112`,stroke:`currentColor`,"stroke-width":`32`,"stroke-linecap":`round`,"stroke-linejoin":`round`}))}}),C=t({name:`Remove`,render(){return o(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},o(`line`,{x1:`400`,y1:`256`,x2:`112`,y2:`256`,style:`
|
|
2
|
-
fill: none;
|
|
3
|
-
stroke: currentColor;
|
|
4
|
-
stroke-linecap: round;
|
|
5
|
-
stroke-linejoin: round;
|
|
6
|
-
stroke-width: 32px;
|
|
7
|
-
`}))}});function w(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}var T=l({name:`InputNumber`,common:p,peers:{Button:y,Input:b},self:w}),E=d([m(`input-number-suffix`,`
|
|
8
|
-
display: inline-block;
|
|
9
|
-
margin-right: 10px;
|
|
10
|
-
`),m(`input-number-prefix`,`
|
|
11
|
-
display: inline-block;
|
|
12
|
-
margin-left: 10px;
|
|
13
|
-
`)]);function oe(e){return e==null||typeof e==`string`&&e.trim()===``?null:Number(e)}function se(e){return e.includes(`.`)&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e===`-`||e===`-0`}function D(e){return e==null?!0:!Number.isNaN(e)}function O(e,t){return typeof e==`number`?t===void 0?String(e):e.toFixed(t):``}function k(e){if(e===null)return null;if(typeof e==`number`)return e;{let t=Number(e);return Number.isNaN(t)?null:t}}var A=800,j=100,M=t({name:`InputNumber`,props:Object.assign(Object.assign({},u.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:`right`},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),slots:Object,setup(t){let{mergedBorderedRef:o,mergedClsPrefixRef:s,mergedRtlRef:l,mergedComponentPropsRef:d}=ee(t),f=u(`InputNumber`,`-input-number`,E,T,t,s),{localeRef:p}=ae(`InputNumber`),m=re(t,{mergedSize:e=>{let{size:n}=t;if(n)return n;let{mergedSize:r}=e||{};return r?.value?r.value:d?.value?.InputNumber?.size||`medium`}}),{mergedSizeRef:g,mergedDisabledRef:v,mergedStatusRef:y}=m,b=e(null),x=e(null),S=e(null),C=e(t.defaultValue),w=ie(a(t,`value`),C),M=e(``),N=e=>{let t=String(e).split(`.`)[1];return t?t.length:0},ce=e=>{let n=[t.min,t.max,t.step,e].map(e=>e===void 0?0:N(e));return Math.max(...n)},le=h(()=>{let{placeholder:e}=t;return e===void 0?p.value.placeholder:e}),P=h(()=>{let e=k(t.step);return e===null||e===0?1:Math.abs(e)}),F=h(()=>{let e=k(t.min);return e===null?null:e}),I=h(()=>{let e=k(t.max);return e===null?null:e}),L=()=>{let{value:e}=w;if(D(e)){let{format:n,precision:r}=t;n?M.value=n(e):e===null||r===void 0||N(e)>r?M.value=O(e,void 0):M.value=O(e,r)}else M.value=String(e)};L();let R=e=>{let{value:n}=w;if(e===n){L();return}let{"onUpdate:value":r,onUpdateValue:i,onChange:a}=t,{nTriggerFormInput:o,nTriggerFormChange:s}=m;a&&c(a,e),i&&c(i,e),r&&c(r,e),C.value=e,o(),s()},z=({offset:e,doUpdateIfValid:n,fixPrecision:r,isInputing:i})=>{let{value:a}=M;if(i&&se(a))return!1;let o=(t.parse||oe)(a);if(o===null)return n&&R(null),null;if(D(o)){let a=N(o),{precision:s}=t;if(s!==void 0&&s<a&&!r)return!1;let c=Number.parseFloat((o+e).toFixed(s??ce(o)));if(D(c)){let{value:e}=I,{value:r}=F;if(e!==null&&c>e){if(!n||i)return!1;c=e}if(r!==null&&c<r){if(!n||i)return!1;c=r}return t.validator&&!t.validator(c)?!1:(n&&R(c),c)}}return!1},B=h(()=>z({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),V=h(()=>{let{value:e}=w;if(t.validator&&e===null)return!1;let{value:n}=P;return z({offset:-n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),H=h(()=>{let{value:e}=w;if(t.validator&&e===null)return!1;let{value:n}=P;return z({offset:+n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function U(e){let{onFocus:n}=t,{nTriggerFormFocus:r}=m;n&&c(n,e),r()}function ue(e){if(e.target===b.value?.wrapperElRef)return;let n=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(n!==!1){let e=b.value?.inputElRef;e&&(e.value=String(n||``)),w.value===n&&L()}else L();let{onBlur:i}=t,{nTriggerFormBlur:a}=m;i&&c(i,e),a(),r(()=>{L()})}function de(e){let{onClear:n}=t;n&&c(n,e)}function W(){let{value:e}=H;if(!e){Q();return}let{value:n}=w;if(n===null)t.validator||R(K());else{let{value:e}=P;z({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function G(){let{value:e}=V;if(!e){X();return}let{value:n}=w;if(n===null)t.validator||R(K());else{let{value:e}=P;z({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}let fe=U,pe=ue;function K(){if(t.validator)return null;let{value:e}=F,{value:n}=I;return e===null?n===null?0:Math.min(0,n):Math.max(0,e)}function me(e){de(e),R(null)}function he(e){var t;S.value?.$el.contains(e.target)&&e.preventDefault(),x.value?.$el.contains(e.target)&&e.preventDefault(),(t=b.value)==null||t.activate()}let q=null,J=null,Y=null;function X(){Y&&=(window.clearTimeout(Y),null),q&&=(window.clearInterval(q),null)}let Z=null;function Q(){Z&&=(window.clearTimeout(Z),null),J&&=(window.clearInterval(J),null)}function ge(){X(),Y=window.setTimeout(()=>{q=window.setInterval(()=>{G()},j)},A),_(`mouseup`,document,X,{once:!0})}function _e(){Q(),Z=window.setTimeout(()=>{J=window.setInterval(()=>{W()},j)},A),_(`mouseup`,document,Q,{once:!0})}let ve=()=>{J||W()},$=()=>{q||G()};function ye(e){var n;if(e.key===`Enter`){if(e.target===b.value?.wrapperElRef)return;z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((n=b.value)==null||n.deactivate())}else if(e.key===`ArrowUp`){if(!H.value||t.keyboard.ArrowUp===!1)return;e.preventDefault(),z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&W()}else if(e.key===`ArrowDown`){if(!V.value||t.keyboard.ArrowDown===!1)return;e.preventDefault(),z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&G()}}function be(e){M.value=e,t.updateValueOnInput&&!t.format&&!t.parse&&t.precision===void 0&&z({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}n(w,()=>{L()});let xe={focus:()=>b.value?.focus(),blur:()=>b.value?.blur(),select:()=>b.value?.select()},Se=te(`InputNumber`,l,s);return Object.assign(Object.assign({},xe),{rtlEnabled:Se,inputInstRef:b,minusButtonInstRef:x,addButtonInstRef:S,mergedClsPrefix:s,mergedBordered:o,uncontrolledValue:C,mergedValue:w,mergedPlaceholder:le,displayedValueInvalid:B,mergedSize:g,mergedDisabled:v,displayedValue:M,addable:H,minusable:V,mergedStatus:y,handleFocus:fe,handleBlur:pe,handleClear:me,handleMouseDown:he,handleAddClick:ve,handleMinusClick:$,handleAddMousedown:_e,handleMinusMousedown:ge,handleKeyDown:ye,handleUpdateDisplayedValue:be,mergedTheme:f,inputThemeOverrides:{paddingSmall:`0 8px 0 10px`,paddingMedium:`0 8px 0 12px`,paddingLarge:`0 8px 0 14px`},buttonThemeOverrides:i(()=>{let{self:{iconColorDisabled:e}}=f.value,[t,n,r,i]=ne(e);return{textColorTextDisabled:`rgb(${t}, ${n}, ${r})`,opacityDisabled:`${i}`}})})},render(){let{mergedClsPrefix:e,$slots:t}=this,n=()=>o(v,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:`minusButtonInstRef`},{icon:()=>s(t[`minus-icon`],()=>[o(g,{clsPrefix:e},{default:()=>o(C,null)})])}),r=()=>o(v,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:`addButtonInstRef`},{icon:()=>s(t[`add-icon`],()=>[o(g,{clsPrefix:e},{default:()=>o(S,null)})])});return o(`div`,{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},o(x,{ref:`inputInstRef`,autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?`line-through`:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>this.showButton&&this.buttonPlacement===`both`?[n(),f(t.prefix,t=>t?o(`span`,{class:`${e}-input-number-prefix`},t):null)]:t.prefix?.call(t),suffix:()=>this.showButton?[f(t.suffix,t=>t?o(`span`,{class:`${e}-input-number-suffix`},t):null),this.buttonPlacement===`right`?n():null,r()]:t.suffix?.call(t)}))}});export{S as n,M as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jobs-B2WdYQNb.js","assets/vue.runtime.esm-bundler-BoqZ7fRe.js","assets/client-D-w1KhaU.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$ as e,I as t,P as n,R as r,S as i,U as a,_ as o,at as s,b as c,ct as l,g as u,h as d,m as f,ot as p,u as m,v as h,x as g,y as _}from"./vue.runtime.esm-bundler-BoqZ7fRe.js";import{n as v}from"./pinia-B4dETPKk.js";import{t as y}from"./preload-helper-D4M6sveU.js";import{t as b,vt as x}from"./_plugin-vue_export-helper-C7dadZ10.js";import{t as S}from"./Modal-BljFqAJF.js";import{n as C,t as w}from"./FormItem-DUC1YCrh.js";import{t as T}from"./Select-D33SMWcz.js";import{t as E}from"./Button-CpNld4Mc.js";import{t as D}from"./InputNumber-DpIdrMEW.js";import{t as O}from"./Input-CCmp4iGM.js";import{t as k}from"./Tooltip-CuLVJgy8.js";import{t as A}from"./use-message-BeTKmVAO.js";import{t as j}from"./Spin-CwbBDHwW.js";import{a as M,c as N,i as P,n as F,o as I,s as ee,t as L}from"./jobs-B2WdYQNb.js";function R(e,t){return e.job_id===t||e.id===t}var z=v(`jobs`,()=>{let t=e([]),n=e(!1);async function r(){n.value=!0;try{t.value=await P()}catch(e){console.error(`Failed to fetch jobs:`,e)}finally{n.value=!1}}async function i(e){let n=await L(e);return t.value.unshift(n),n}async function a(e,n){let r=await N(e,n),i=t.value.findIndex(t=>R(t,e));return i!==-1&&(t.value[i]=r),r}async function o(e){await F(e),t.value=t.value.filter(t=>!R(t,e))}async function s(e){let n=await M(e),r=t.value.findIndex(t=>R(t,e));r!==-1&&(t.value[r]=n)}async function c(e){let n=await I(e),r=t.value.findIndex(t=>R(t,e));r!==-1&&(t.value[r]=n)}async function l(e){let n=await ee(e),r=t.value.findIndex(t=>R(t,e));r!==-1&&(t.value[r]=n)}return{jobs:t,loading:n,fetchJobs:r,createJob:i,updateJob:a,deleteJob:o,pauseJob:s,resumeJob:c,runJob:l}}),B={class:`job-card`},V={class:`card-header`},H={class:`job-name`},U={class:`card-body`},W={class:`info-row`},G={class:`info-label`},K={class:`info-value mono`},q={class:`info-row`},J={class:`info-label`},Y={class:`info-value`},X={class:`info-row`},Z={class:`info-label`},Q={class:`info-value`},te={class:`info-row`},ne={class:`info-label`},re={class:`info-value`},ie={key:0,class:`info-row`},ae={class:`info-label`},oe={class:`info-value`},se={class:`card-actions`},ce=b(i({__name:`JobCard`,props:{job:{}},emits:[`edit`],setup(e,{emit:n}){let r=e,i=n,{t:_}=x(),v=z(),y=A(),b=f(()=>r.job.job_id||r.job.id),S=f(()=>r.job.state===`running`?_(`jobs.status.running`):r.job.state===`paused`?_(`jobs.status.paused`):r.job.enabled?_(`jobs.status.scheduled`):_(`jobs.status.disabled`)),C=f(()=>r.job.state===`running`?`info`:r.job.state===`paused`?`warning`:r.job.enabled?`success`:`error`),w=f(()=>{let e=r.job.schedule;return typeof e==`string`?e:e?.expr||r.job.schedule_display||`—`}),T=e=>e?new Date(e).toLocaleString():`—`;async function D(){try{await v.pauseJob(b.value),y.success(_(`jobs.jobPaused`))}catch(e){y.error(e.message)}}async function O(){try{await v.resumeJob(b.value),y.success(_(`jobs.jobResumed`))}catch(e){y.error(e.message)}}async function j(){try{await v.runJob(b.value),y.info(_(`jobs.jobTriggered`))}catch(e){y.error(e.message)}}async function M(){try{await v.deleteJob(b.value),y.success(_(`jobs.jobDeleted`))}catch(e){y.error(e.message)}}return(n,r)=>(t(),h(`div`,B,[d(`div`,V,[d(`h3`,H,l(e.job.name),1),d(`span`,{class:p([`status-badge`,C.value])},l(S.value),3)]),d(`div`,U,[d(`div`,W,[d(`span`,G,l(s(_)(`jobs.info.schedule`)),1),d(`code`,K,l(w.value),1)]),d(`div`,q,[d(`span`,J,l(s(_)(`jobs.info.lastRun`)),1),d(`span`,Y,[c(l(T(e.job.last_run_at))+` `,1),e.job.last_status?(t(),h(`span`,{key:0,class:p([`run-status`,{ok:e.job.last_status===`ok`,err:e.job.last_status!==`ok`}])},l(e.job.last_status===`ok`?`OK`:e.job.last_status),3)):o(``,!0)])]),d(`div`,X,[d(`span`,Z,l(s(_)(`jobs.info.nextRun`)),1),d(`span`,Q,l(T(e.job.next_run_at)),1)]),d(`div`,te,[d(`span`,ne,l(s(_)(`jobs.info.deliver`)),1),d(`span`,re,[c(l(e.job.deliver),1),e.job.origin?(t(),h(m,{key:0},[c(` (`+l(e.job.origin.platform)+`)`,1)],64)):o(``,!0)])]),e.job.repeat?(t(),h(`div`,ie,[d(`span`,ae,l(s(_)(`jobs.info.repeat`)),1),d(`span`,oe,[typeof e.job.repeat==`string`?(t(),h(m,{key:0},[c(l(e.job.repeat),1)],64)):(t(),h(m,{key:1},[c(l(e.job.repeat.completed)+` / `+l(e.job.repeat.times??`∞`),1)],64))])])):o(``,!0)]),d(`div`,se,[e.job.state!==`paused`&&e.job.enabled?(t(),u(s(k),{key:0},{trigger:a(()=>[g(s(E),{size:`tiny`,quaternary:``,onClick:D},{default:a(()=>[c(l(s(_)(`jobs.action.pause`)),1)]),_:1})]),default:a(()=>[c(` `+l(s(_)(`jobs.action.pauseJob`)),1)]),_:1})):e.job.state===`paused`?(t(),u(s(k),{key:1},{trigger:a(()=>[g(s(E),{size:`tiny`,quaternary:``,onClick:O},{default:a(()=>[c(l(s(_)(`jobs.action.resume`)),1)]),_:1})]),default:a(()=>[c(` `+l(s(_)(`jobs.action.resumeJob`)),1)]),_:1})):o(``,!0),g(s(k),null,{trigger:a(()=>[g(s(E),{size:`tiny`,quaternary:``,onClick:j},{default:a(()=>[c(l(s(_)(`jobs.action.runNow`)),1)]),_:1})]),default:a(()=>[c(` `+l(s(_)(`jobs.action.triggerImmediately`)),1)]),_:1}),g(s(E),{size:`tiny`,quaternary:``,onClick:r[0]||=e=>i(`edit`,b.value)},{default:a(()=>[c(l(s(_)(`common.edit`)),1)]),_:1}),g(s(E),{size:`tiny`,quaternary:``,type:`error`,onClick:M},{default:a(()=>[c(l(s(_)(`common.delete`)),1)]),_:1})])]))}}),[[`__scopeId`,`data-v-95911aa6`]]),le={key:0,class:`empty-state`},ue={key:1,class:`jobs-grid`},de=b(i({__name:`JobsPanel`,emits:[`edit`],setup(e,{emit:n}){let{t:i}=x(),a=n,o=z();return(e,n)=>s(o).jobs.length===0?(t(),h(`div`,le,[n[0]||=_(`<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" class="empty-icon" data-v-5eaccb69><rect x="3" y="4" width="18" height="18" rx="2" ry="2" data-v-5eaccb69></rect><line x1="16" y1="2" x2="16" y2="6" data-v-5eaccb69></line><line x1="8" y1="2" x2="8" y2="6" data-v-5eaccb69></line><line x1="3" y1="10" x2="21" y2="10" data-v-5eaccb69></line></svg>`,1),d(`p`,null,l(s(i)(`jobs.noJobs`)),1)])):(t(),h(`div`,ue,[(t(!0),h(m,null,r(s(o).jobs,e=>(t(),u(ce,{key:e.id,job:e,onEdit:t=>a(`edit`,e.id)},null,8,[`job`,`onEdit`]))),128))]))}}),[[`__scopeId`,`data-v-5eaccb69`]]),fe={class:`modal-footer`},pe=b(i({__name:`JobFormModal`,props:{jobId:{}},emits:[`close`,`saved`],setup(r,{emit:i}){let{t:o}=x(),p=r,m=i,h=z(),_=A(),v=e(!0),b=e(!1),k=e({name:``,schedule:``,prompt:``,deliver:`origin`,repeat_times:null}),j=e(null),M=f(()=>!!p.jobId),N=f(()=>[{label:o(`jobs.presetEveryMinute`),value:`* * * * *`},{label:o(`jobs.presetEvery5Min`),value:`*/5 * * * *`},{label:o(`jobs.presetEveryHour`),value:`0 * * * *`},{label:o(`jobs.presetEveryDay`),value:`0 0 * * *`},{label:o(`jobs.presetEveryDay9`),value:`0 9 * * *`},{label:o(`jobs.presetEveryMonday`),value:`0 9 * * 1`},{label:o(`jobs.presetEveryMonth`),value:`0 9 1 * *`}]),P=f(()=>[{label:o(`jobs.origin`),value:`origin`},{label:o(`jobs.local`),value:`local`}]);n(async()=>{if(p.jobId)try{let{getJob:e}=await y(async()=>{let{getJob:e}=await import(`./jobs-B2WdYQNb.js`).then(e=>e.r);return{getJob:e}},__vite__mapDeps([0,1,2])),t=await e(p.jobId);k.value={name:t.name,schedule:typeof t.schedule==`string`?t.schedule:t.schedule?.expr||t.schedule_display||``,prompt:t.prompt,deliver:t.deliver||`origin`,repeat_times:typeof t.repeat==`number`?t.repeat:typeof t.repeat==`object`?t.repeat.times:null}}catch(e){_.error(o(`jobs.loadFailed`)+`: `+e.message)}});async function F(){if(!k.value.name.trim()){_.warning(o(`jobs.nameRequired`));return}if(!k.value.schedule.trim()){_.warning(o(`jobs.scheduleRequired`));return}b.value=!0;try{let e={name:k.value.name,schedule:k.value.schedule,prompt:k.value.prompt,deliver:k.value.deliver,repeat:k.value.repeat_times??void 0};M.value?(await h.updateJob(p.jobId,e),_.success(o(`jobs.jobUpdated`))):(await h.createJob(e),_.success(o(`jobs.jobCreated`))),m(`saved`)}catch(e){_.error(e.message)}finally{b.value=!1}}function I(){v.value=!1,setTimeout(()=>m(`close`),200)}return(e,n)=>(t(),u(s(S),{show:v.value,"onUpdate:show":n[7]||=e=>v.value=e,preset:`card`,title:M.value?s(o)(`jobs.editJob`):s(o)(`jobs.createJob`),style:{width:`520px`},"mask-closable":!b.value,onAfterLeave:n[8]||=e=>m(`close`)},{footer:a(()=>[d(`div`,fe,[g(s(E),{onClick:I},{default:a(()=>[c(l(s(o)(`common.cancel`)),1)]),_:1}),g(s(E),{type:`primary`,loading:b.value,onClick:F},{default:a(()=>[c(l(M.value?s(o)(`common.update`):s(o)(`common.create`)),1)]),_:1},8,[`loading`])])]),default:a(()=>[g(s(C),{"label-placement":`top`},{default:a(()=>[g(s(w),{label:s(o)(`jobs.name`),required:``},{default:a(()=>[g(s(O),{value:k.value.name,"onUpdate:value":n[0]||=e=>k.value.name=e,placeholder:s(o)(`jobs.namePlaceholder`),maxlength:`200`,"show-count":``},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),g(s(w),{label:s(o)(`jobs.schedule`),required:``},{default:a(()=>[g(s(O),{value:k.value.schedule,"onUpdate:value":n[1]||=e=>k.value.schedule=e,placeholder:s(o)(`jobs.schedulePlaceholder`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),g(s(w),{label:s(o)(`jobs.quickPresets`)},{default:a(()=>[g(s(T),{value:j.value,"onUpdate:value":[n[2]||=e=>j.value=e,n[3]||=e=>k.value.schedule=e],options:N.value,placeholder:s(o)(`jobs.selectPreset`)},null,8,[`value`,`options`,`placeholder`])]),_:1},8,[`label`]),g(s(w),{label:s(o)(`jobs.prompt`),required:``},{default:a(()=>[g(s(O),{value:k.value.prompt,"onUpdate:value":n[4]||=e=>k.value.prompt=e,type:`textarea`,placeholder:s(o)(`jobs.promptPlaceholder`),rows:4,maxlength:`5000`,"show-count":``},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),g(s(w),{label:s(o)(`jobs.deliverTarget`)},{default:a(()=>[g(s(T),{value:k.value.deliver,"onUpdate:value":n[5]||=e=>k.value.deliver=e,options:P.value},null,8,[`value`,`options`])]),_:1},8,[`label`]),g(s(w),{label:s(o)(`jobs.repeatCount`)},{default:a(()=>[g(s(D),{value:k.value.repeat_times,"onUpdate:value":n[6]||=e=>k.value.repeat_times=e,min:1,placeholder:s(o)(`jobs.repeatPlaceholder`),clearable:``,style:{width:`100%`}},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-c4dfc5fe`]]),$={class:`jobs-view`},me={class:`jobs-header`},he={class:`header-title`},ge={class:`jobs-content`},_e=b(i({__name:`JobsView`,setup(r){let{t:i}=x(),f=z(),p=e(!1),m=e(null);n(()=>{f.fetchJobs()});function _(){m.value=null,p.value=!0}function v(e){m.value=e,p.value=!0}function y(){p.value=!1,m.value=null}async function b(){await f.fetchJobs(),y()}return(e,n)=>(t(),h(`div`,$,[d(`header`,me,[d(`h2`,he,l(s(i)(`jobs.title`)),1),g(s(E),{type:`primary`,onClick:_},{icon:a(()=>[...n[0]||=[d(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[d(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),d(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),default:a(()=>[c(` `+l(s(i)(`jobs.createJob`)),1)]),_:1})]),d(`div`,ge,[g(s(j),{show:s(f).loading&&s(f).jobs.length===0},{default:a(()=>[g(de,{onEdit:v})]),_:1},8,[`show`])]),p.value?(t(),u(pe,{key:0,"job-id":m.value,onClose:y,onSaved:b},null,8,[`job-id`])):o(``,!0)]))}}),[[`__scopeId`,`data-v-cf31def7`]]);export{_e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.logs-view[data-v-b5078141]{flex-direction:column;height:100vh;display:flex}.logs-header[data-v-b5078141]{border-bottom:1px solid #e0e0e0;flex-wrap:wrap;flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;padding:12px 20px;display:flex}.logs-header .header-title[data-v-b5078141]{color:#1a1a1a;white-space:nowrap;font-size:16px;font-weight:600}.logs-header .header-actions[data-v-b5078141]{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.search-input[data-v-b5078141]{color:#1a1a1a;background:#fff;border:1px solid #e0e0e0;border-radius:6px;outline:none;width:160px;padding:4px 10px;font-size:13px;transition:border-color .15s}.search-input[data-v-b5078141]:focus{border-color:#333}.search-input[data-v-b5078141]::placeholder{color:#999}.logs-body[data-v-b5078141]{flex:1;min-height:0;overflow-y:auto}.logs-empty[data-v-b5078141]{color:#999;justify-content:center;align-items:center;height:100%;font-size:13px;display:flex}.log-list[data-v-b5078141]{padding:4px 0}.log-entry[data-v-b5078141]{border-left:2px solid #0000;align-items:center;gap:8px;padding:3px 20px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:12px;line-height:1.6;display:flex}.log-entry[data-v-b5078141]:hover{background-color:#33333308}.log-entry.level-error[data-v-b5078141]{border-left-color:#c62828}.log-entry.level-error .log-message[data-v-b5078141]{color:#c62828}.log-entry.level-warning[data-v-b5078141]{border-left-color:#f57f17}.log-entry.level-warning .log-message[data-v-b5078141]{color:#d9720f}.log-time[data-v-b5078141]{color:#999;font-variant-numeric:tabular-nums;flex-shrink:0}.log-level[data-v-b5078141]{text-align:center;border-radius:2px;flex-shrink:0;min-width:42px;padding:0 4px;font-size:10px;font-weight:600}.log-level.level-error[data-v-b5078141]{color:#c62828;background:#c628281f}.log-level.level-warning[data-v-b5078141]{color:#d9720f;background:#f57f171f}.log-level.level-debug[data-v-b5078141],.log-level.level-info[data-v-b5078141]{color:#999;background:#3333330f}.log-logger[data-v-b5078141]{color:#999;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0;max-width:160px;overflow:hidden}.log-message[data-v-b5078141]{color:#666;text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.access-method[data-v-b5078141]{color:#1a1a1a;flex-shrink:0;font-weight:600}.access-path[data-v-b5078141]{color:#333;text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.access-status[data-v-b5078141]{flex-shrink:0;font-size:11px;font-weight:600}.access-status.status-2[data-v-b5078141]{color:#2e7d32}.access-status.status-3[data-v-b5078141]{color:#f57f17}.access-status.status-4[data-v-b5078141],.access-status.status-5[data-v-b5078141]{color:#c62828}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,I as t,P as n,R as r,S as i,U as a,W as o,_ as s,a as c,at as l,b as u,ct as d,h as f,m as p,ot as m,u as h,v as g,x as _}from"./vue.runtime.esm-bundler-BoqZ7fRe.js";import{t as v,vt as y}from"./_plugin-vue_export-helper-C7dadZ10.js";import{t as b}from"./Select-D33SMWcz.js";import{t as x}from"./Button-CpNld4Mc.js";import{t as S}from"./use-message-BeTKmVAO.js";import{t as C}from"./Spin-CwbBDHwW.js";import{n as w}from"./client-D-w1KhaU.js";async function T(){return(await w(`/api/logs`)).files}async function E(e,t){let n=new URLSearchParams;t?.lines&&n.set(`lines`,String(t.lines)),t?.level&&n.set(`level`,t.level),t?.session&&n.set(`session`,t.session),t?.since&&n.set(`since`,t.since);let r=n.toString();return(await w(`/api/logs/${e}${r?`?${r}`:``}`)).entries.filter(e=>e!==null)}var ee={class:`logs-view`},D={class:`logs-header`},O={class:`header-title`},k={class:`header-actions`},A=[`placeholder`],j={class:`logs-body`},M={key:0,class:`logs-empty`},N={class:`log-list`},P={class:`log-time`},F={class:`log-logger`},I={class:`access-method`},L={class:`access-path`},R={key:1,class:`log-message`},z=v(i({__name:`LogsView`,setup(i){let{t:v}=y(),w=S(),z=e([]),B=e(`agent`),V=e([]),H=e(!1),U=e(100),W=e(``),G=e(``),K=p(()=>z.value.map(e=>({label:`${e.name} (${e.size})`,value:e.name}))),q=p(()=>[{label:v(`logs.all`),value:``},{label:`ERROR`,value:`ERROR`},{label:`WARNING`,value:`WARNING`},{label:`INFO`,value:`INFO`},{label:`DEBUG`,value:`DEBUG`}]),J=[{label:`50`,value:50},{label:`100`,value:100},{label:`200`,value:200},{label:`500`,value:500}],Y=p(()=>{if(!G.value)return V.value;let e=G.value.toLowerCase();return V.value.filter(t=>t.message.toLowerCase().includes(e)||t.logger.toLowerCase().includes(e)||t.raw.toLowerCase().includes(e))});function X(e){switch(e){case`ERROR`:return`level-error`;case`WARNING`:return`level-warning`;case`DEBUG`:return`level-debug`;default:return`level-info`}}function Z(e){let t=e.match(/\d{2}:\d{2}:\d{2}/);return t?t[0]:e}function Q(e){let t=e.match(/"(\w+)\s+(\S+)\s+HTTP\/[^"]+"\s+(\d+)/);return t?{method:t[1],path:t[2],status:t[3]}:null}async function $(){H.value=!0;try{V.value=(await E(B.value,{lines:U.value,level:W.value||void 0})).filter(e=>e!==null)}catch(e){w.error(e.message)}finally{H.value=!1}}return n(async()=>{z.value=await T(),await $()}),(e,n)=>(t(),g(`div`,ee,[f(`header`,D,[f(`h2`,O,d(l(v)(`logs.title`)),1),f(`div`,k,[_(l(b),{value:B.value,"onUpdate:value":[n[0]||=e=>B.value=e,$],options:K.value,size:`small`,style:{width:`200px`}},null,8,[`value`,`options`]),_(l(b),{value:W.value,options:q.value,size:`small`,style:{width:`110px`},"onUpdate:value":n[1]||=e=>{W.value=e,$()}},null,8,[`value`,`options`]),_(l(b),{value:U.value,options:J,size:`small`,style:{width:`80px`},"onUpdate:value":n[2]||=e=>{U.value=e,$()}},null,8,[`value`]),o(f(`input`,{"onUpdate:modelValue":n[3]||=e=>G.value=e,class:`search-input`,placeholder:l(v)(`logs.searchPlaceholder`)},null,8,A),[[c,G.value]]),_(l(x),{size:`small`,loading:H.value,onClick:$},{default:a(()=>[u(d(l(v)(`logs.refresh`)),1)]),_:1},8,[`loading`])])]),f(`div`,j,[_(l(C),{show:H.value},{default:a(()=>[Y.value.length===0&&!H.value?(t(),g(`div`,M,d(l(v)(`logs.noEntries`)),1)):s(``,!0),f(`div`,N,[(t(!0),g(h,null,r(Y.value,(e,n)=>(t(),g(`div`,{key:n,class:m([`log-entry`,X(e.level)])},[f(`span`,P,d(Z(e.timestamp)),1),f(`span`,{class:m([`log-level`,X(e.level)])},d(e.level),3),f(`span`,F,d(e.logger),1),Q(e.message)?(t(),g(h,{key:0},[f(`span`,I,d(Q(e.message).method),1),f(`span`,L,d(Q(e.message).path),1),f(`span`,{class:m([`access-status`,`status-`+(Q(e.message).status?.[0]||`x`)])},d(Q(e.message).status),3)],64)):(t(),g(`span`,R,d(e.message),1))],2))),128))])]),_:1},8,[`show`])])]))}}),[[`__scopeId`,`data-v-b5078141`]]);export{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.memory-view[data-v-898387b7]{flex-direction:column;height:100vh;display:flex}.memory-header[data-v-898387b7]{border-bottom:1px solid #e0e0e0;flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 20px;display:flex}.header-title[data-v-898387b7]{color:#1a1a1a;font-size:16px;font-weight:600}.memory-content[data-v-898387b7]{flex-direction:column;flex:1;padding:20px;display:flex;overflow:hidden}.memory-loading[data-v-898387b7]{color:#999;flex:1;justify-content:center;align-items:center;font-size:13px;display:flex}.memory-sections[data-v-898387b7]{flex:1;gap:16px;min-height:0;display:flex}.memory-section[data-v-898387b7]{border:1px solid #e0e0e0;border-radius:10px;flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.section-header[data-v-898387b7]{background:#f0f0f0;border-bottom:1px solid #e0e0e0;flex-shrink:0;justify-content:space-between;align-items:center;padding:10px 16px;display:flex}.section-title-row[data-v-898387b7]{align-items:center;gap:8px;display:flex}.section-icon[data-v-898387b7]{color:#666;display:flex}.section-title[data-v-898387b7]{color:#1a1a1a;font-size:14px;font-weight:600}.section-mtime[data-v-898387b7]{color:#999;font-size:11px}.section-body[data-v-898387b7]{flex:1;min-height:0;padding:16px;overflow-y:auto}.empty-text[data-v-898387b7]{color:#999;font-size:13px;font-style:italic}.section-edit[data-v-898387b7]{flex-direction:column;flex:1;min-height:0;padding:12px 16px;display:flex}.edit-textarea[data-v-898387b7]{color:#1a1a1a;resize:none;background:#fff;border:1px solid #e0e0e0;border-radius:6px;outline:none;flex:1;width:100%;min-height:0;padding:12px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:13px;line-height:1.6}.edit-textarea[data-v-898387b7]:focus{border-color:#333}.edit-actions[data-v-898387b7]{justify-content:flex-end;gap:8px;margin-top:10px;display:flex}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{$ as e,I as t,P as n,S as r,U as i,W as a,_ as o,a as s,at as c,b as l,ct as u,g as d,h as f,m as p,v as m,x as h,y as g}from"./vue.runtime.esm-bundler-BoqZ7fRe.js";import{t as _,vt as v}from"./_plugin-vue_export-helper-C7dadZ10.js";import{t as y}from"./Button-CpNld4Mc.js";import{t as ee}from"./use-message-BeTKmVAO.js";import{t as b}from"./MarkdownRenderer-C2pkccH2.js";import{a as te,t as x}from"./skills-C6QBmS9j.js";var S={class:`memory-view`},C={class:`memory-header`},w={class:`header-title`},ne={class:`memory-content`},re={key:0,class:`memory-loading`},ie={key:1,class:`memory-sections`},ae={class:`memory-section`},T={class:`section-header`},E={class:`section-title-row`},D={class:`section-title`},O={key:0,class:`section-mtime`},k={key:0,class:`section-body`},A={key:1,class:`empty-text`},j={key:1,class:`section-edit`},M=[`placeholder`],N={class:`edit-actions`},P={class:`memory-section`},F={class:`section-header`},I={class:`section-title-row`},L={class:`section-title`},R={key:0,class:`section-mtime`},z={key:0,class:`section-body`},oe={key:1,class:`empty-text`},B={key:1,class:`section-edit`},V=[`placeholder`],H={class:`edit-actions`},U=_(r({__name:`MemoryView`,setup(r){let{t:_}=v(),U=ee(),W=e(!1),G=e(null),K=e(null),q=e(``),J=e(!1);n(Y);async function Y(){W.value=!0;try{G.value=await x()}catch(e){console.error(`Failed to load memory:`,e),U.error(_(`memory.loadFailed`))}finally{W.value=!1}}function X(e){K.value=e,q.value=G.value?.[e]||``}function Z(){K.value=null,q.value=``}async function Q(){if(K.value){J.value=!0;try{await te(K.value,q.value),await Y(),K.value=null,q.value=``,U.success(_(`common.saved`))}catch(e){U.error(`${_(`common.saveFailed`)}: ${e.message}`)}finally{J.value=!1}}}function $(e){return e?new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):``}let se=p(()=>!G.value?.memory?.trim()),ce=p(()=>!G.value?.user?.trim()),le=p(()=>(G.value?.memory||``).replace(/§/g,`
|
|
2
|
-
|
|
3
|
-
`)),ue=p(()=>(G.value?.user||``).replace(/§/g,`
|
|
4
|
-
|
|
5
|
-
`));return(e,n)=>(t(),m(`div`,S,[f(`header`,C,[f(`h2`,w,u(c(_)(`memory.title`)),1),h(c(y),{size:`small`,quaternary:``,onClick:Y},{icon:i(()=>[...n[4]||=[f(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[f(`polyline`,{points:`23 4 23 10 17 10`}),f(`path`,{d:`M20.49 15a9 9 0 1 1-2.12-9.36L23 10`})],-1)]]),default:i(()=>[l(` `+u(c(_)(`memory.refresh`)),1)]),_:1})]),f(`div`,ne,[W.value&&!G.value?(t(),m(`div`,re,u(c(_)(`common.loading`)),1)):(t(),m(`div`,ie,[f(`div`,ae,[f(`div`,T,[f(`div`,E,[n[5]||=g(`<span class="section-icon" data-v-898387b7><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-v-898387b7><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-898387b7></path><polyline points="14 2 14 8 20 8" data-v-898387b7></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-898387b7></line><line x1="16" y1="17" x2="8" y2="17" data-v-898387b7></line></svg></span>`,1),f(`span`,D,u(c(_)(`memory.myNotes`)),1),G.value?.memory_mtime?(t(),m(`span`,O,u($(G.value.memory_mtime)),1)):o(``,!0)]),K.value===`memory`?o(``,!0):(t(),d(c(y),{key:0,size:`tiny`,quaternary:``,onClick:n[0]||=e=>X(`memory`)},{icon:i(()=>[...n[6]||=[f(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[f(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),f(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`})],-1)]]),default:i(()=>[l(` `+u(c(_)(`common.edit`)),1)]),_:1}))]),K.value===`memory`?(t(),m(`div`,j,[a(f(`textarea`,{"onUpdate:modelValue":n[1]||=e=>q.value=e,class:`edit-textarea`,placeholder:c(_)(`memory.notesPlaceholder`),spellcheck:`false`},null,8,M),[[s,q.value]]),f(`div`,N,[h(c(y),{size:`small`,onClick:Z},{default:i(()=>[l(u(c(_)(`common.cancel`)),1)]),_:1}),h(c(y),{size:`small`,type:`primary`,loading:J.value,onClick:Q},{default:i(()=>[l(u(c(_)(`common.save`)),1)]),_:1},8,[`loading`])])])):(t(),m(`div`,k,[se.value?(t(),m(`p`,A,u(c(_)(`memory.noNotes`)),1)):(t(),d(b,{key:0,content:le.value},null,8,[`content`]))]))]),f(`div`,P,[f(`div`,F,[f(`div`,I,[n[7]||=f(`span`,{class:`section-icon`},[f(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[f(`path`,{d:`M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2`}),f(`circle`,{cx:`12`,cy:`7`,r:`4`})])],-1),f(`span`,L,u(c(_)(`memory.userProfile`)),1),G.value?.user_mtime?(t(),m(`span`,R,u($(G.value.user_mtime)),1)):o(``,!0)]),K.value===`user`?o(``,!0):(t(),d(c(y),{key:0,size:`tiny`,quaternary:``,onClick:n[2]||=e=>X(`user`)},{icon:i(()=>[...n[8]||=[f(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[f(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),f(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`})],-1)]]),default:i(()=>[l(` `+u(c(_)(`common.edit`)),1)]),_:1}))]),K.value===`user`?(t(),m(`div`,B,[a(f(`textarea`,{"onUpdate:modelValue":n[3]||=e=>q.value=e,class:`edit-textarea`,placeholder:c(_)(`memory.profilePlaceholder`),spellcheck:`false`},null,8,V),[[s,q.value]]),f(`div`,H,[h(c(y),{size:`small`,onClick:Z},{default:i(()=>[l(u(c(_)(`common.cancel`)),1)]),_:1}),h(c(y),{size:`small`,type:`primary`,loading:J.value,onClick:Q},{default:i(()=>[l(u(c(_)(`common.save`)),1)]),_:1},8,[`loading`])])])):(t(),m(`div`,z,[ce.value?(t(),m(`p`,oe,u(c(_)(`memory.noProfile`)),1)):(t(),d(b,{key:0,content:ue.value},null,8,[`content`]))]))])]))])]))}}),[[`__scopeId`,`data-v-898387b7`]]);export{U as default};
|