Files
Nexus/web/app/assets/VTextarea-DMBqF2lG.js
T
Nexus Agent e3efbd4552 feat(timezone): operator schedules and filters use Beijing wall clock.
Cron matching, audit/alert date filters, and schedule UI align on Asia/Shanghai
while JWT/TOTP/heartbeat stay UTC; follow-ups add WS alert timestamps, fixed
install timezone copy, and 422 on invalid date filters.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 05:50:32 +08:00

1 line
5.1 KiB
JavaScript

import{$n as e,An as t,Dr as n,Gr as r,Hr as i,Nn as a,Nr as o,Or as s,Pn as c,Qr as l,Sr as u,T as d,Tn as f,Ur as p,Zr as m,ai as h,bn as g,cn as _,cr as v,dn as y,fr as b,gr as x,hr as S,jr as ee,mn as te,r as ne,zn as re}from"./index-mgwiCK5j.js";import{a as ie,c as C,i as w,l as T,m as E,o as D,r as O,s as k,u as A}from"./VTextField-C7hGBY30.js";var j=f({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...w(),...e(A(),[`direction`]),...k()},`VTextarea`),M=g()({name:`VTextarea`,directives:{vIntersect:d},inheritAttrs:!1,props:j(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(e,{attrs:f,emit:g,slots:w}){let k=y(e,`modelValue`),{isFocused:A,focus:j,blur:M}=E(e),{onIntersect:N}=O(e),P=S(()=>typeof e.counterValue==`function`?e.counterValue(k.value):(k.value||``).toString().length),F=S(()=>{if(f.maxlength)return f.maxlength;if(!(!e.counter||typeof e.counter!=`number`&&typeof e.counter!=`string`))return e.counter}),I=m(),L=m(),R=l(``),z=m(),B=m(0),{platform:V}=_(),H=ie(e),U=S(()=>e.persistentPlaceholder||A.value||e.active);function W(){H.isSuppressing.value&&H.update(),z.value!==document.activeElement&&z.value?.focus(),A.value||j()}function G(e){W(),g(`click:control`,e)}function K(e){g(`mousedown:control`,e)}function q(n){n.stopPropagation(),W(),s(()=>{k.value=``,t(e[`onClick:clear`],n)})}function J(t){let n=t.target;if(!e.modelModifiers?.trim){k.value=n.value;return}let r=n.value,i=n.selectionStart,a=n.selectionEnd;k.value=r,s(()=>{let e=0;r.trimStart().length===n.value.length&&(e=r.length-n.value.length),i!=null&&(n.selectionStart=i-e),a!=null&&(n.selectionEnd=a-e)})}let Y=m(),X=m(Number(e.rows)),Z=S(()=>[`plain`,`underlined`].includes(e.variant));p(()=>{e.autoGrow||(X.value=Number(e.rows))});function Q(){s(()=>{if(!z.value)return;if(V.value.firefox){B.value=12;return}let{offsetWidth:e,clientWidth:t}=z.value;B.value=Math.max(0,e-t)}),e.autoGrow&&s(()=>{if(!Y.value||!L.value)return;let t=getComputedStyle(Y.value),n=getComputedStyle(L.value.$el),r=parseFloat(t.getPropertyValue(`--v-field-padding-top`))+parseFloat(t.getPropertyValue(`--v-input-padding-top`))+parseFloat(t.getPropertyValue(`--v-field-padding-bottom`)),i=Y.value.scrollHeight,o=parseFloat(t.lineHeight),s=Math.max(parseFloat(e.rows)*o+r,parseFloat(n.getPropertyValue(`--v-input-control-height`))),l=e.maxHeight?parseFloat(e.maxHeight):parseFloat(e.maxRows)*o+r||1/0,u=a(i??0,s,l);X.value=Math.floor((u-r)/o),R.value=c(u)})}o(Q),i(k,Q),i(()=>e.rows,Q),i(()=>e.maxHeight,Q),i(()=>e.maxRows,Q),i(()=>e.density,Q),i(X,e=>{g(`update:rows`,e)});let $;return i(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),ee(()=>{$?.disconnect()}),te(()=>{let t=!!(w.counter||e.counter||e.counterValue),i=!!(t||w.details),[a,o]=re(f),{modelValue:s,...l}=T.filterProps(e),p={...D.filterProps(e),"onClick:clear":q};return u(T,n({ref:I,modelValue:k.value,"onUpdate:modelValue":e=>k.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":e.prefix,"v-textarea--suffixed":e.suffix,"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-textarea--auto-grow":e.autoGrow,"v-textarea--no-resize":e.noResize||e.autoGrow,"v-input--plain-underlined":Z.value},e.class],style:[{"--v-textarea-max-height":e.maxHeight?c(e.maxHeight):void 0,"--v-textarea-scroll-bar-width":c(B.value)},e.style]},a,l,{centerAffix:X.value===1&&!Z.value,focused:A.value,indentDetails:e.indentDetails??!Z.value}),{...w,default:({id:t,isDisabled:i,isDirty:a,isReadonly:s,isValid:c,hasDetails:l})=>u(D,n({ref:L,style:{"--v-textarea-control-height":R.value},onClick:G,onMousedown:K,"onClick:prependInner":e[`onClick:prependInner`],"onClick:appendInner":e[`onClick:appendInner`]},p,{id:t.value,active:U.value||a.value,labelId:`${t.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:a.value||e.dirty,disabled:i.value,focused:A.value,details:l.value,error:c.value===!1}),{...w,default:({props:{class:a,...c},controlRef:l})=>x(b,null,[e.prefix&&x(`span`,{class:`v-text-field__prefix`},[e.prefix]),r(x(`textarea`,n({ref:e=>z.value=l.value=e,class:a,value:k.value,onInput:J,autofocus:e.autofocus,readonly:s.value,disabled:i.value,placeholder:e.placeholder,rows:e.rows,name:H.fieldName.value,autocomplete:H.fieldAutocomplete.value,onFocus:W,onBlur:M,"aria-labelledby":`${t.value}-label`},c,o),null),[[d,{handler:N},null,{once:!0}]]),e.autoGrow&&r(x(`textarea`,{class:h([a,`v-textarea__sizer`]),id:`${c.id}-sizer`,"onUpdate:modelValue":e=>k.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[v,k.value]]),e.suffix&&x(`span`,{class:`v-text-field__suffix`},[e.suffix])])}),details:i?n=>x(b,null,[w.details?.(n),t&&x(b,null,[x(`span`,null,null),u(C,{active:e.persistentCounter||A.value,value:P.value,max:F.value,disabled:e.disabled},w.counter)])]):void 0})}),ne({},I,L,z)}});export{M as t};