1import{q as e}from"./Typeguards-JhSgGbDE.js";import{$ as t,B as n,D as r,E as i,G as a,Ht as o,I as s,K as c,P as l,Q as u,Rt as d,Vt as f,W as p,b as m,d as h,f as g,l as _,lt as v,p as y,vt as b,y as x}from"./runtime-core.esm-bundler-CBMs-3jN.js";import{f as S,l as C,o as w}from"./runtime-dom.esm-bundler-CfnBFmx3.js";import{L as T}from"./colorConverter-BrqE3KQz.js";import{a as E}from"./fsVpCompat-vcvHIkIJ.js";import{t as D}from"./_plugin-vue_export-helper-CUnnW8H4.js";import{t as O}from"./WrapComp-CjGdMh9k.js";var k=[`placeholder`,`type`],A=[`placeholder`,`rows`,`cols`],j={key:3,class:`bi bi-search right`},M=D(m({inheritAttrs:!1,__name:`FsInput`,props:i({label:{default:void 0},tag:{default:`div`},labelClass:{default:`fs-input-label`},inputClass:{default:`w-100`},rows:{default:1},cols:{default:50},placeholder:{default:void 0},dynRows:{type:Boolean,default:!1},noWrap:{type:Boolean},focusOnMount:{type:Boolean,default:!1},class:{},type:{},order:{default:void 0},debounce:{default:500},maxWait:{default:1e5},icon:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:i([`debouncedChange`,`blur`,`keydown`,`keyup`],[`update:modelValue`]),setup(i,{expose:m,emit:D}){let M=c(i,`modelValue`),N=D;e(M,e=>{N(`debouncedChange`,e)},{debounce:()=>P.debounce,maxWait:()=>P.maxWait});let P=i,F=v(),I=v(),L=E(),R=T(P,`class`,`fs-input`),z=_(()=>{let{type:e}=P;switch(e){case`password`:return B.value?e:`text`}return e}),B=v(!0),V=_(()=>{let{cols:e,rows:t,dynRows:n}=P,r=`${M.value}`,i=r.length;if(n){let n=F.value,a=1,o=0,s=0;if(n){for(let t=0;t<i;t++){let n=r[t],i=n===` `;n===` 2`?(a++,o=0,s=0):(s=i?0:s+1,o>=e-1?s>=e-1?(o=0,a++,s=0):(o=s,a++):(o++,s=i?0:s+1))}return Math.min(t,a)}return Math.min(t,Math.ceil(i/e))}return t}),H=[`class`,`modelValue`],U=a(),W=_(()=>{let e={};for(let t in U)H.includes(t)||(e[t]=U[t]);return e}),G=()=>{F.value?.focus(),I.value?.focus()};return l(()=>{P.focusOnMount&&G()}),m({focus:G}),(e,a)=>(s(),h(O,{tag:i.noWrap?void 0:i.tag,class:d(b(R)),style:f({order:i.order})},{default:u(()=>[i.label?(s(),y(`div`,{key:0,class:d(i.labelClass)},o(i.label),3)):g(``,!0),x(O,{tag:i.noWrap?void 0:i.tag,class:`d-flex`},{default:u(()=>[P.rows<=1||typeof M.value==`boolean`?t((s(),y(`input`,r({key:0,ref_key:`inputElem`,ref:I,"onUpdate:modelValue":a[0]||=e=>M.value=e},W.value,{class:i.inputClass,placeholder:i.placeholder,type:z.value},p(b(L),!0),{onKeydown:a[1]||=S(e=>N(`keydown`,e),[`stop`]),onKeyup:a[2]||=S(e=>N(`keyup`,e),[`stop`]),onBlur:a[3]||=e=>N(`blur`,e)}),null,16,k)),[[w,M.value]]):t((s(),y(`textarea`,r({key:1,ref_key:`textarea`,ref:F,"onUpdate:modelValue":a[4]||=e=>M.value=e,class:i.inputClass,placeholder:i.placeholder,rows:V.value,cols:i.cols},p(b(L),!0),{onKeydown:a[5]||=S(e=>N(`keydown`,e),[`stop`]),onKeyup:a[6]||=S(e=>N(`keyup`,e),[`stop`]),onBlur:a[7]||=e=>N(`blur`,e)}),null,16,A)),[[C,M.value]]),i.type===`password`?(s(),y(`i`,{key:2,class:d([`bi right`,B.value?`bi-eye-slash`:`bi-eye`]),onClick:a[8]||=e=>B.value=!B.value},null,2)):g(``,!0),z.value===`search`?(s(),y(`i`,j)):g(``,!0),n(e.$slots,`default`,{},void 0,!0)]),_:3},8,[`tag`])]),_:3},8,[`tag`,`class`,`style`]))}}),[[`__scopeId`,`data-v-f2b0276f`]]);export{M 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.