51948469c2
- Stop ignoring web/app/index.html and web/app/assets/ - Bundle index-DBKIQT7H.js from current vite build (~101MB assets) Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
5.1 KiB
JavaScript
1 line
5.1 KiB
JavaScript
import{$n as e,$t as t,Cr as n,Kn as r,Mr as i,Qn as a,Rn as o,Sr as s,Tr as c,Xn as l,Xt as u,a as d,ar as f,cn as p,d as m,dr as h,f as g,fn as _,fr as v,g as y,gt as b,hn as ee,i as x,jr as S,mr as te,nn as ne,o as C,p as w,r as T,s as E,ur as D,v as O,vn as k,wn as re,yn as A,zr as j}from"./index-C7H1337X.js";var M=_({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,...x(),...o(E(),[`direction`]),...g()},`VTextarea`),N=p()({name:`VTextarea`,directives:{vIntersect:b},inheritAttrs:!1,props:M(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(o,{attrs:p,emit:g,slots:_}){let x=t(o,`modelValue`),{isFocused:E,focus:M,blur:N}=w(o),{onIntersect:P}=T(o),F=a(()=>typeof o.counterValue==`function`?o.counterValue(x.value):(x.value||``).toString().length),I=a(()=>{if(p.maxlength)return p.maxlength;if(!(!o.counter||typeof o.counter!=`number`&&typeof o.counter!=`string`))return o.counter}),L=S(),R=S(),z=i(``),B=S(),V=S(0),{platform:H}=u(),U=d(o),W=a(()=>o.persistentPlaceholder||E.value||o.active);function G(){U.isSuppressing.value&&U.update(),B.value!==document.activeElement&&B.value?.focus(),E.value||M()}function K(e){G(),g(`click:control`,e)}function q(e){g(`mousedown:control`,e)}function J(e){e.stopPropagation(),G(),h(()=>{x.value=``,ee(o[`onClick:clear`],e)})}function ie(e){let t=e.target;if(!o.modelModifiers?.trim){x.value=t.value;return}let n=t.value,r=t.selectionStart,i=t.selectionEnd;x.value=n,h(()=>{let e=0;n.trimStart().length===t.value.length&&(e=n.length-t.value.length),r!=null&&(t.selectionStart=r-e),i!=null&&(t.selectionEnd=i-e)})}let Y=S(),X=S(Number(o.rows)),Z=a(()=>[`plain`,`underlined`].includes(o.variant));n(()=>{o.autoGrow||(X.value=Number(o.rows))});function Q(){h(()=>{if(!B.value)return;if(H.value.firefox){V.value=12;return}let{offsetWidth:e,clientWidth:t}=B.value;V.value=Math.max(0,e-t)}),o.autoGrow&&h(()=>{if(!Y.value||!R.value)return;let e=getComputedStyle(Y.value),t=getComputedStyle(R.value.$el),n=parseFloat(e.getPropertyValue(`--v-field-padding-top`))+parseFloat(e.getPropertyValue(`--v-input-padding-top`))+parseFloat(e.getPropertyValue(`--v-field-padding-bottom`)),r=Y.value.scrollHeight,i=parseFloat(e.lineHeight),a=Math.max(parseFloat(o.rows)*i+n,parseFloat(t.getPropertyValue(`--v-input-control-height`))),s=o.maxHeight?parseFloat(o.maxHeight):parseFloat(o.maxRows)*i+n||1/0,c=k(r??0,a,s);X.value=Math.floor((c-n)/i),z.value=A(c)})}te(Q),s(x,Q),s(()=>o.rows,Q),s(()=>o.maxHeight,Q),s(()=>o.maxRows,Q),s(()=>o.density,Q),s(X,e=>{g(`update:rows`,e)});let $;return s(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),v(()=>{$?.disconnect()}),ne(()=>{let t=!!(_.counter||o.counter||o.counterValue),n=!!(t||_.details),[i,a]=re(p),{modelValue:s,...u}=C.filterProps(o),d={...m.filterProps(o),"onClick:clear":J};return f(C,D({ref:L,modelValue:x.value,"onUpdate:modelValue":e=>x.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":o.prefix,"v-textarea--suffixed":o.suffix,"v-text-field--prefixed":o.prefix,"v-text-field--suffixed":o.suffix,"v-textarea--auto-grow":o.autoGrow,"v-textarea--no-resize":o.noResize||o.autoGrow,"v-input--plain-underlined":Z.value},o.class],style:[{"--v-textarea-max-height":o.maxHeight?A(o.maxHeight):void 0,"--v-textarea-scroll-bar-width":A(V.value)},o.style]},i,u,{centerAffix:X.value===1&&!Z.value,focused:E.value,indentDetails:o.indentDetails??!Z.value}),{..._,default:({id:t,isDisabled:n,isDirty:i,isReadonly:s,isValid:u,hasDetails:p})=>f(m,D({ref:R,style:{"--v-textarea-control-height":z.value},onClick:K,onMousedown:q,"onClick:prependInner":o[`onClick:prependInner`],"onClick:appendInner":o[`onClick:appendInner`]},d,{id:t.value,active:W.value||i.value,labelId:`${t.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:i.value||o.dirty,disabled:n.value,focused:E.value,details:p.value,error:u.value===!1}),{..._,default:({props:{class:i,...u},controlRef:d})=>e(l,null,[o.prefix&&e(`span`,{class:`v-text-field__prefix`},[o.prefix]),c(e(`textarea`,D({ref:e=>B.value=d.value=e,class:i,value:x.value,onInput:ie,autofocus:o.autofocus,readonly:s.value,disabled:n.value,placeholder:o.placeholder,rows:o.rows,name:U.fieldName.value,autocomplete:U.fieldAutocomplete.value,onFocus:G,onBlur:N,"aria-labelledby":`${t.value}-label`},u,a),null),[[b,{handler:P},null,{once:!0}]]),o.autoGrow&&c(e(`textarea`,{class:j([i,`v-textarea__sizer`]),id:`${u.id}-sizer`,"onUpdate:modelValue":e=>x.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[r,x.value]]),o.suffix&&e(`span`,{class:`v-text-field__suffix`},[o.suffix])])}),details:n?n=>e(l,null,[_.details?.(n),t&&e(l,null,[e(`span`,null,null),f(y,{active:o.persistentCounter||E.value,value:F.value,max:I.value,disabled:o.disabled},_.counter)])]):void 0})}),O({},L,R,B)}});export{N as t}; |