1import{$t as e,C as t,Et as n,G as r,I as i,J as a,R as o,b as s,dt as c,f as l,h as u,ht as d,m as f,nn as p,ot as m,q as h,rn as g}from"./CB5-eA5X.js";import{c as _,d as v}from"./DIs47Bu1.js";import{t as y}from"#entry";var b={key:0,class:`textarea-custom__label`},x=[`rows`,`placeholder`,`maxlength`,`disabled`],S={key:1,class:`textarea-custom__counter`},C={key:0},w={class:`textarea-custom__bottom-block`},T={key:0,class:`textarea-custom__error`},E=Object.assign(y(t({__name:`UiTextarea`,props:i({label:{},placeholder:{},maxLength:{default:0},rows:{default:1},maxRows:{default:0},counter:{type:Boolean},clearable:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},required:{type:Boolean},messages:{},rightIcon:{},error:{},withoutPreloader:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:i([`click`,`click:right`,`blur`],[`update:modelValue`]),setup(t,{emit:i}){let y=m(t,`modelValue`),E=t,D=i,O=n(0),k=n(null);c(()=>y.value,()=>{A({target:{value:y.value??null}})}),h(()=>{A({target:{value:y.value??null}},!1),j(k.value)}),r(async()=>{await o(),setTimeout(()=>{A({target:{value:y.value??null}})},0)});async function A(e,t=!0){if(t){let t=e.target;y.value=t.value}await o(),k.value&&(k.value.style.height=`auto`,k.value.style.height=k.value.scrollHeight+`px`)}function j(e){E.counter&&e&&setTimeout(()=>{O.value=e.selectionEnd-e.selectionStart},0)}return(n,r)=>(a(),u(`div`,{class:e([`textarea-custom__wrapper`,{"error-item":t.error||typeof y.value==`string`&&y.value.length&&y.value.length===+t.maxLength}])},[t.label?(a(),u(`label`,b,g(t.label),1)):f(``,!0),l(`div`,{class:e([`textarea`,{"textarea--with-counter":t.counter,disabled:t.disabled}])},[d(l(`textarea`,{ref_key:`textarea`,ref:k,"onUpdate:modelValue":r[0]||=e=>y.value=e,rows:t.rows,placeholder:t.placeholder,maxlength:t.maxLength?+t.maxLength:void 0,disabled:t.disabled,style:p(`min-height: ${20*Number(t.rows)}px;`),onInput:r[1]||=v(e=>A(e),[`stop`]),onBlur:r[2]||=e=>D(`blur`,e),onSelect:r[3]||=e=>j(e.target),onClick:r[4]||=e=>(D(`click`),j(e.target))},null,44,x),[[_,y.value]]),y.value&&!t.disabled?(a(),u(`button`,{key:0,type:`button`,class:`textarea__clear`,onClick:r[5]||=v(e=>A({target:{value:``}}),[`prevent`])},[...r[6]||=[l(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},[l(`path`,{d:`M16 8L8 16`,stroke:`#958FB1`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),l(`path`,{d:`M8 8L16 16`,stroke:`#958FB1`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1)]])):f(``,!0),t.counter?(a(),u(`div`,S,[s(g(y.value&&typeof y.value==`string`?y.value.length:0)+` `,1),t.maxLength?(a(),u(`span`,C,`/ `+g(t.maxLength),1)):f(``,!0)])):f(``,!0)],2),l(`div`,w,[t.error?(a(),u(`div`,T,g(t.error),1)):f(``,!0)])],2))}}),[[`__scopeId`,`data-v-903350aa`]]),{__name:`UiTextarea`});export{E as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.