1import{aN as wt,a4 as St,a5 as Ce,aH as qe,af as It,a9 as V,aa as Ct,aO as _e,aD as Et,a7 as A,aL as Nt,aP as zt,aQ as Pt,aj as Mt}from"./Cq05Gqjl.js";import{U as ve,u as kt,a as Vt,I as Ee,C as je}from"./WjYDEHNG.js";import{aF as et,y as f,ao as Ft,aE as Ne,bg as Tt,aC as Ke,e as Lt,ag as Ot,bb as Rt,aJ as Ue,N as ze,f as ce,g as Bt,n as G,H as $t,b4 as At,o as d,c as z,i as m,F as Pe,m as v,j as a,ai as _,a as H,x,w as D,P as j,ah as We,z as de,aI as K,J as fe,t as me,r as U,am as Gt,ay as Ye,aP as Ht}from"./CsJ3pi86.js";import{u as Dt,a as jt,b as Kt,r as Ut,c as Xe}from"./BIT02HhW.js";import{u as Wt,a as Yt}from"./D6ZOdtSK.js";const Xt=["class","style"],Jt=/^on[A-Z]/,Qt=(e={})=>{const{excludeListeners:u=!1,excludeKeys:C}=e,t=f(()=>(C?.value||[]).concat(Xt)),l=Ft();return l?f(()=>wt(Object.entries(l.proxy?.$attrs).filter(([c])=>!t.value.includes(c)&&!(u&&Jt.test(c))))):(et("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),f(()=>({})))};function Zt(e){let u;function C(){if(e.value==null)return;const{selectionStart:l,selectionEnd:c,value:p}=e.value;l==null||c==null||(u={selectionStart:l,selectionEnd:c,value:p,beforeTxt:p.slice(0,Math.max(0,l)),afterTxt:p.slice(Math.max(0,c))})}function t(){if(e.value==null||u==null)return;const{value:l}=e.value,{beforeTxt:c,afterTxt:p,selectionStart:h}=u;if(c==null||p==null||h==null)return;let S=l.length;if(l.endsWith(p))S=l.length-p.length;else if(l.startsWith(c))S=c.length;else{const F=c[h-1],r=l.indexOf(F,h-1);r!==-1&&(S=r+1)}e.value.setSelectionRange(S,S)}return[C,t]}const qt=St({id:{type:String,default:void 0},size:It,disabled:{type:Boolean,default:void 0},modelValue:{type:V([String,Number,Object]),default:""},modelModifiers:{type:V(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:V(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:V([Boolean,Object]),default:!1},autocomplete:{type:V(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:Ce,default:qe},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:Ce},prefixIcon:{type:Ce},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:V([Object,Array,String,Boolean]),default:()=>Ct({})},countGraphemes:{type:V(Function)},autofocus:Boolean,rows:{type:Number,default:2},...Dt(["ariaLabel"]),inputmode:{type:V(String),default:void 0},name:String}),_t={[ve]:e=>Ne(e),input:e=>Ne(e),change:(e,u)=>Ne(e)&&(u instanceof Event||u===void 0),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:e=>e===void 0||e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent};Tt(qe);let w;const ea={height:"0",visibility:"hidden",overflow:_e()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},ta=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],Je=e=>{const u=Number.parseFloat(e);return Number.isNaN(u)?e:u};function aa(e){const u=window.getComputedStyle(e),C=u.getPropertyValue("box-sizing"),t=Number.parseFloat(u.getPropertyValue("padding-bottom"))+Number.parseFloat(u.getPropertyValue("padding-top")),l=Number.parseFloat(u.getPropertyValue("border-bottom-width"))+Number.parseFloat(u.getPropertyValue("border-top-width"));return{contextStyle:ta.map(c=>[c,u.getPropertyValue(c)]),paddingSize:t,borderSize:l,boxSizing:C}}function Qe(e,u=1,C){if(!w){w=document.createElement("textarea");let r=document.body;!_e()&&e.parentNode&&(r=e.parentNode),r.appendChild(w)}const{paddingSize:t,borderSize:l,boxSizing:c,contextStyle:p}=aa(e);p.forEach(([r,W])=>
1w?.style.setProperty(r,W)),Object.entries(ea).forEach(([r,W])=>w?.style.setProperty(r,W,"important")),w.value=e.value||e.placeholder||"";let h=w.scrollHeight;const S={};c==="border-box"?h=h+l:c==="content-box"&&(h=h-t),w.value="";const F=w.scrollHeight-t;if(Ke(u)){let r=F*u;c==="border-box"&&(r=r+t+l),h=Math.max(r,h),S.minHeight=`${r}px`}if(Ke(C)){let r=F*C;c==="border-box"&&(r=r+t+l),h=Math.min(r,h)}return S.height=`${h}px`,w.parentNode?.removeChild(w),w=void 0,S}const oa=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],na=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],Ze="ElInput";var sa=Lt({name:Ze,inheritAttrs:!1,__name:"input",props:qt,emits:_t,setup(e,{expose:u,emit:C}){const t=e,l=C,c=Ot(),p=Rt(),h=f(()=>[t.type==="textarea"?Y.b():s.b(),s.m(tt.value),s.is("disabled",T.value),s.is("exceed",st.value),{[s.b("group")]:p.prepend||p.append,[s.m("prefix")]:p.prefix||t.prefixIcon,[s.m("suffix")]:p.suffix||t.suffixIcon||t.clearable||t.showPassword,[s.bm("suffix","password-clear")]:ne.value&&ge.value,[s.b("hidden")]:t.type==="hidden"},c.class]),S=f(()=>[s.e("wrapper"),s.is("focus",he.value)]),F=Qt(),r=f(()=>t.maxlength?.toString()),{form:W,formItem:ee}=Wt(),{inputId:Me}=Yt(t,{formItemContext:ee}),tt=kt(),T=Vt(),s=Ue("input"),Y=Ue("textarea"),te=ze(),E=ze(),pe=U(!1),L=U(!1),ke=U(),Ve=U(),ae=ze(t.inputStyle),X=U(""),oe=U(),g=f(()=>te.value||E.value),{wrapperRef:at,isFocused:he,handleFocus:Fe,handleBlur:Te}=jt(g,{disabled:T,afterBlur(){t.validateEvent&&ee?.validate?.("blur").catch(K)}}),Le=f(()=>W?.statusIcon??!1),J=f(()=>ee?.validateState||""),Oe=f(()=>J.value&&Nt[J.value]),ot=f(()=>L.value?zt:Pt),nt=f(()=>[c.style]),Re=f(()=>[t.inputStyle,ae.value,{resize:t.resize},oe.value?{height:oe.value}:void 0]),P=f(()=>Ht(t.modelValue)?"":String(t.modelValue)),ye=f(()=>t.clearable&&!T.value&&!t.readonly),ne=f(()=>ye.value&&!!P.value&&(he.value||pe.value)),ge=f(()=>t.showPassword&&!T.value&&!!P.value),O=f(()=>t.showWordLimit&&!!r.value&&(t.type==="text"||t.type==="textarea")&&!T.value&&!t.readonly&&!t.showPassword),be=f(()=>t.countGraphemes&&t.showWordLimit?t.countGraphemes(P.value):P.value.length),st=f(()=>!!O.value&&be.value>Number(r.value)),it=f(()=>!!p.suffix||!!t.suffixIcon||t.clearable||t.showPassword||O.value||!!J.value&&Le.value),lt=f(()=>!!Object.keys(t.modelModifiers).length),[rt,ut]=Zt(te);let R;Et(E,o=>{if(ct(),!O.value&&!ye.value||t.resize!=="both"&&t.resize!=="horizontal")return;const{width:n}=o[0].target.getBoundingClientRect(),i=()=>{R=void 0,ke.value={right:`calc(100% - ${n-10}px)`},Ve.value={right:`calc(100% - ${n-11}px)`}};R&&Xe(R),R=Ut(i)});const Q=()=>{const{type:o,autosize:n}=t;if(!(!Gt||o!=="textarea"||!E.value))if(n){const i=Ye(n)?n.minRows:void 0,N=Ye(n)?n.maxRows:void 0,b=Qe(E.value,i,N);ae.value={overflowY:"hidden",...b},G(()=>{E.value.offsetHeight,ae.value=b})}else ae.value={minHeight:Qe(E.value).minHeight}},ct=(o=>{let n=!1;return()=>{if(n||!t.autosize){t.resize!=="none"&&setTimeout(()=>{oe.value=E.value?.style.height});return}E.value?.offsetParent!==null&&(setTimeout(o),n=!0)}})(Q),B=()=>{const o=g.value,n=t.formatter?t.formatter(P.value):P.value;!o||o.value===n||t.type==="file"||(o.value=n)},Be=o=>{const{trim:n,number:i}=t.modelModifiers;return n&&(o=o.trim()),i&&(o=`${Je(o)}`),t.formatter&&t.parser&&(o=t.parser(o)),o},xe=async o=>{if(Ae.value)return;const{lazy:n}=t.modelModifiers;let{value:i}=o.target,N=!1;if(n){l(Ee,i);return}if(i=Be(i),t.countGraphemes&&r.value!=null){const b=Number(r.value),re=t.countGraphemes(i),$=t.countGraphemes(X.value);if(re>b&&re>$)if($>b)i=X.value,N=!0;else{const M=X.value,I=i;let y=0;for(;y<M.length&&y<I.length&&M[y]===I[y];)y++;let k=M.length,Z=I.length;for(;k>y&&Z>y&&M[k-1]===I[Z-1];)k--,Z--;const yt=I.slice(0,y),gt=M.slice(y,k),He=I.slice(y,Z),bt=I.slice(Z),xt=$-t.countGraphemes(gt),Se=Math.max(0,b-xt);let q="";if(Se>0)if(typeof Intl<"u"&&"Segmenter"in Intl){const Ie=new Intl.Segmenter(void 0,{granularity:"grapheme"});for(const{segment:ue}of Ie.segment(He)){const De=q+ue;if(t.countGraphemes(De)>Se)break;q=De}}else for(const Ie of Array.from(He)){const ue=q+Ie;if(t.countGraphemes(ue)>Se)break;q=ue}i=yt+q+bt,N=!0}}if(String(i)===P.value){if(t.formatter||N){const b=o.target,re=b.value,$=b.selectionStart,M=b.selectionEnd;if(B(),N&&g.value&&$!=null&&M!=null){const I=g.value.value,y=re.slice(Math.max(0,M));let k=Math.min($,I.length);y&&I.endsWith(y)&&(k=I.length-y.length),g.value.setSelectionRange(k,k)}}return}X.value=i,rt(),l(ve,i),l(Ee,i),await G(),(t.formatter&&t.parser||!lt.value)&&B(),ut()},$e=async o=>{let{value:n}=o.target;n=Be(n),t.modelModifiers.lazy&&l(ve,n),l(je,n,o),await G(),B()},{isComposing:Ae,handleCompositionStart:se,handleCompositionUpdate:ie,handleCompositionEnd:le}=Kt({emit:l,afterComposition:xe}),dt=()=>{L.value=!L.value},ft=()=>g.value?.focus(),mt=()=>g.value?.blur(),vt=o=>{pe.value=!1,l("mouseleave",o)},pt=o=>{pe.value=!0,l("mouseenter",o)},Ge=o=>{l("keydown",o)},ht=()=>{g.value?.select()},we=o=>{l(ve,""),l(je,""),l("clear",o),l(Ee,"")};return ce(()=>t.modelValue,()=>{G(()=>{Q(),t.autosize&&(oe.value=void 0)}),t.validateEvent&&ee?.validate?.("change").catch(K)}),ce(()=>P.value,o=>{X.value=o},{immediate:!0}),ce(P,o=>{if(!g.value)return;const{trim:n,number:i}=t.modelModifiers,N=g.value.value,b=(i||t.type==="number")&&!/^0\d/.test(N)?`${Je(N)}`:N;b!==o&&(document.activeElement===g.value&&g.value.type!=="range"&&n&&b.trim()===o||B())}),ce(()=>t.type,async()=>{await G(),B(),Q()}),Bt(()=>{!t.formatter&&t.parser&&et(Ze,"If you set the parser, you also need to set the formatter."),B(),G(Q)}),$t(()=>{R&&Xe(R)}),u({input:te,textarea:E,ref:g,textareaStyle:Re,autosize:At(t,"autosize"),isComposing:Ae,passwordVisible:L,focus:ft,blur:mt,select:ht,clear:we,resizeTextarea:Q}),(o,n)=>(d(),z("div",{class:v([h.value,{[a(s).bm("group","append")]:o.$slots.append,[a(s).bm("group","prepe
1nd")]:o.$slots.prepend}]),style:fe(nt.value),onMouseenter:pt,onMouseleave:vt},[m(" input "),e.type!=="textarea"?(d(),z(Pe,{key:0},[m(" prepend slot "),o.$slots.prepend?(d(),z("div",{key:0,class:v(a(s).be("group","prepend"))},[_(o.$slots,"prepend")],2)):m("v-if",!0),H("div",{ref_key:"wrapperRef",ref:at,class:v(S.value)},[m(" prefix slot "),o.$slots.prefix||e.prefixIcon?(d(),z("span",{key:0,class:v(a(s).e("prefix"))},[H("span",{class:v(a(s).e("prefix-inner"))},[_(o.$slots,"prefix"),e.prefixIcon?(d(),x(a(A),{key:0,class:v(a(s).e("icon"))},{default:D(()=>[(d(),x(j(e.prefixIcon)))]),_:1},8,["class"])):m("v-if",!0)],2)],2)):m("v-if",!0),H("input",We({id:a(Me),ref_key:"input",ref:te,class:a(s).e("inner")},a(F),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:r.value,type:e.showPassword?L.value?"text":"password":e.type,disabled:a(T),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-label":e.ariaLabel,placeholder:e.placeholder,style:e.inputStyle,form:e.form,autofocus:e.autofocus,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:n[0]||(n[0]=(...i)=>a(se)&&a(se)(...i)),onCompositionupdate:n[1]||(n[1]=(...i)=>a(ie)&&a(ie)(...i)),onCompositionend:n[2]||(n[2]=(...i)=>a(le)&&a(le)(...i)),onInput:xe,onChange:$e,onKeydown:Ge}),null,16,oa),m(" suffix slot "),it.value?(d(),z("span",{key:1,class:v(a(s).e("suffix"))},[H("span",{class:v(a(s).e("suffix-inner"))},[ye.value?(d(),x(a(A),{key:0,class:v([a(s).e("icon"),a(s).e("clear")]),style:fe({visibility:ne.value?"visible":"hidden"}),onMousedown:de(a(K),["prevent"]),onClick:we},{default:D(()=>[(d(),x(j(e.clearIcon)))]),_:1},8,["class","style","onMousedown"])):m("v-if",!0),!ne.value||!ge.value||!O.value?(d(),z(Pe,{key:1},[_(o.$slots,"suffix"),e.suffixIcon?(d(),x(a(A),{key:0,class:v(a(s).e("icon"))},{default:D(()=>[(d(),x(j(e.suffixIcon)))]),_:1},8,["class"])):m("v-if",!0)],64)):m("v-if",!0),ge.value?(d(),x(a(A),{key:2,class:v([a(s).e("icon"),a(s).e("password")]),onClick:dt,onMousedown:de(a(K),["prevent"]),onMouseup:de(a(K),["prevent"])},{default:D(()=>[_(o.$slots,"password-icon",{visible:L.value},()=>[(d(),x(j(ot.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):m("v-if",!0),O.value?(d(),z("span",{key:3,class:v([a(s).e("count"),a(s).is("outside",e.wordLimitPosition==="outside")])},[H("span",{class:v(a(s).e("count-inner"))},me(be.value)+" / "+me(r.value),3)],2)):m("v-if",!0),J.value&&Oe.value&&Le.value?(d(),x(a(A),{key:4,class:v([a(s).e("icon"),a(s).e("validateIcon"),a(s).is("loading",J.value==="validating")])},{default:D(()=>[(d(),x(j(Oe.value)))]),_:1},8,["class"])):m("v-if",!0)],2)],2)):m("v-if",!0)],2),m(" append slot "),o.$slots.append?(d(),z("div",{key:1,class:v(a(s).be("group","append"))},[_(o.$slots,"append")],2)):m("v-if",!0)],64)):(d(),z(Pe,{key:1},[m(" textarea "),H("textarea",We({id:a(Me),ref_key:"textarea",ref:E,class:[a(Y).e("inner"),a(s).is("focus",a(he)),a(Y).is("clearable",e.clearable)]},a(F),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:r.value,tabindex:e.tabindex,disabled:a(T),readonly:e.readonly,autocomplete:e.autocomplete,style:Re.value,"aria-label":e.ariaLabel,placeholder:e.placeholder,form:e.form,autofocus:e.autofocus,rows:e.rows,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:n[3]||(n[3]=(...i)=>a(se)&&a(se)(...i)),onCompositionupdate:n[4]||(n[4]=(...i)=>a(ie)&&a(ie)(...i)),onCompositionend:n[5]||(n[5]=(...i)=>a(le)&&a(le)(...i)),onInput:xe,onFocus:n[6]||(n[6]=(...i)=>a(Fe)&&a(Fe)(...i)),onBlur:n[7]||(n[7]=(...i)=>a(Te)&&a(Te)(...i)),onChange:$e,onKeydown:Ge}),null,16,na),ne.value?(d(),x(a(A),{key:0,class:v([a(Y).e("icon"),a(Y).e("clear")]),style:fe(Ve.value),onMousedown:de(a(K),["prevent"]),onClick:we},{default:D(()=>[(d(),x(j(e.clearIcon)))]),_:1},8,["class","style","onMousedown"])):m("v-if",!0),O.value?(d(),z("span",{key:1,style:fe(ke.value),class:v([a(s).e("count"),a(s).is("outside",e.wordLimitPosition==="outside")])},me(be.value)+" / "+me(r.value),7)):m("v-if",!0)],64))],38))}}),ia=sa;const ma=Mt(ia);export{ma as E,Qt as u};
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.