PageSourceSearch

https://cdn1.vsl.co.at/_nuxt/MiV-hyu2.js

js vsl.co.at collected 2026-10-02 02:58:21 UTC 6,382 bytes, 1 lines download raw bytes

1import{l as le,b as w,a0 as ae,ab as se,ac as ie,U as A}from"./D6I0fcnD.js";import{_ as re}from"./CqOmQ7xl.js";import{_ as ue}from"./DV_DIEf7.js";import{_ as de}from"./Bcmrredc.js";import{E as ve,b0 as ce,w as E,bi as me,cj as fe,aG as f,aH as p,C as t,aM as C,aI as b,aJ as R,aS as _,aN as pe,aL as L,br as be,i as ye,bL as y,bO as T,aP as O,bK as xe,aA as we,aK as ge,r as v}from"./CWLraHXg.js";import{d as he}from"./CpX-vqX0.js";import{d as Ce}from"./Cp2ysxOb.js";import{c as G}from"./udcM2Yy7.js";import"./oH1s0WRD.js";import"./BrNsXeDA.js";import"./CE2CN-Sz.js";const Ie=A(re),Ve=A(ue),Le=A(de),Te={class:"relative flex w-full flex-col items-start gap-1"},$e={key:0,class:"flex w-full items-end justify-between gap-4"},ke=["for"],Me=["title"],Ke={class:"relative h-[2.125rem] w-full"},Be=["data-ignore-autofocus","disabled","id","name","placeholder"],Se=["data-highlighted","tabindex","title","onMousedown"],He={class:"truncate"},Re=ve({__name:"SelectField",props:{modelValue:{},options:{},fieldKey:{},errors:{},disabled:{type:Boolean},ignoreAutofocus:{type:Boolean}},emits:["update:modelValue"],async setup(n,{emit:J}){let D,N;const i=n,X=J,g=v(!1),$=v([]),q=v(),c=v([]),r=v(!1),h=v(0),a=v(),z=G("select-field"),x=v(""),k=v(),M=v(!1),Q=i.options.name||G(i.fieldKey||"select-field"),W=he.InputError();let K,F="";[D,N]=ce(()=>le("cms-dashboard")),await D,N(),E(()=>i.modelValue,()=>H(),{immediate:!0}),E(()=>i.options.choices,()=>H()),E(h,()=>{g.value=!0,clearTimeout(K),K=setTimeout(()=>{g.value=!1,!h.value&&!r.value&&(c.value=[])},200)});function Y(){r.value=!0,x.value="",a.value=j(i.modelValue),S(),I()}function B(){r.value=!1,x.value=F,a.value=void 0,h.value=0}function S(){const l=ae(x.value);c.value=$.value.filter(({value:s,label:d})=>l.length?l.every(m=>typeof s=="string"&&s.toLowerCase().includes(m)||d.toLowerCase().includes(m)):!0),c.value.sort((s,d)=>{const m=l.map(o=>{const u=s.label.toLowerCase().indexOf(o.toLowerCase());return u>-1?u:typeof s.value=="string"?s.value.toLowerCase().indexOf(o.toLowerCase()):1/0}).sort()[0],V=l.map(o=>{const u=d.label.toLowerCase().indexOf(o.toLowerCase());return u>-1?u:typeof d.value=="string"?d.value.toLowerCase().indexOf(o.toLowerCase()):1/0}).sort()[0];return m-V}),a.value&&c.value.some(({value:s})=>s===a.value.value)||(a.value=c.value[0]),Z(),I()}function Z(){h.value=Math.min(i.options.visibleChoices??6,c.value.length)*9/4}function ee(){a.value=a!=null&&a.value?se({value:a.value.value,label:""},c.value,"value"):void 0,I()}function te(){a.value=a!=null&&a.value?ie({value:a.value.value,label:""},c.value,"value"):void 0,I()}const I=Ce(()=>oe(),50);function oe(){var l,e;(e=(l=q.value)==null?void 0:l.querySelector("button[data-highlighted]"))==null||e.scrollIntoView({block:"nearest"})}function U(l,e=!0){var d,m;const s=(l==null?void 0:l.value)??((d=a==null?void 0:a.value)==null?void 0:d.value)??i.modelValue;s!==i.modelValue&&(X("update:modelValue",s),setTimeout(()=>H())),e&&((m=k.value)==null||m.blur())}function H(){$.value=Object.entries(i.options.choices).map(([e,s])=>({value:e,label:w("cms-dashboard",s)}));const l=j(i.modelValue);F=(l==null?void 0:l.label)??"",r.value?S():B()}function ne(l){l.shiftKey||B()}function j(l){return $.value.find(e=>e.value===l)}return me(()=>{clearTimeout(K)}),(l,e)=>{const s=Ie,d=Ve,m=Le,V=fe("cms-tooltip");return f(),p("div",Te,[n.options.label||n.options.description?(f(),p("div",$e,[n.options.label?(f(),p("label",{key:0,for:t(z),onMouseenter:e[0]||(e[0]=o=>M.value=!0),onMouseleave:e[1]||(e[1]=o=>M.value=!1),class:"text-vs flex gap-1 whitespace-nowrap font-medium text-gray-900"},[n.options.required?(f(),p("span",{key:0,title:t(w)("cms-dashboard","Required"),
1class:"text-red-500"},"*",8,Me)):C("",!0),b("span",null,R(t(w)("cms-dashboard",n.options.label)),1)],40,ke)):C("",!0),n.options.description?_((f(),pe(s,{key:1,class:"mb-0.5 h-4 w-4 shrink-0 text-gray-400"},null,512)),[[V,t(w)("cms-dashboard",n.options.description)]]):C("",!0)])):C("",!0),b("div",{onKeydown:[e[10]||(e[10]=y(o=>te(),["down"])),e[11]||(e[11]=y(T(o=>U(),["prevent","stop"]),["enter"])),e[12]||(e[12]=y(o=>ee(),["up"]))],ref_key:"containerEl",ref:q,class:"relative h-9 w-full rounded-md text-sm"},[b("div",{class:L(["absolute inset-x-0 top-0 overflow-hidden rounded-md border bg-white transition",{"z-30":t(r),"z-20":!t(r)&&t(g),"border-primary-700":(t(M)||t(r))&&!n.disabled,ring:t(r),"hover:border-primary-700":!n.disabled}])},[b("div",Ke,[_(b("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>ye(x)?x.value=o:null),"data-ignore-autofocus":n.ignoreAutofocus?"":void 0,disabled:n.disabled,id:t(z),name:t(Q),placeholder:t(w)("cms-dashboard",i.options.placeholder),onBlur:e[3]||(e[3]=o=>B()),onFocus:e[4]||(e[4]=o=>Y()),onInput:e[5]||(e[5]=o=>S()),onKeydown:[e[6]||(e[6]=y(T(()=>{},["prevent"]),["down"])),e[7]||(e[7]=y(T(o=>{var u;return(u=t(k))==null?void 0:u.blur()},["prevent","stop"]),["escape"])),y(ne,["tab"]),e[8]||(e[8]=y(T(()=>{},["prevent"]),["up"]))],autocomplete:"off",ref_key:"inputTextEl",ref:k,spellcheck:"false",class:L(["h-full w-full cursor-default truncate rounded-md pl-2.5 pr-9 outline-none placeholder:text-gray-300 focus:cursor-text",{"!pr-14":n.options.clearable&&n.modelValue&&!n.disabled&&!t(r),"pointer-events-none text-gray-400":n.disabled}])},null,42,Be),[[be,t(x)]]),n.options.clearable&&n.modelValue&&!n.disabled&&!t(r)?_((f(),p("button",{key:0,onClick:e[9]||(e[9]=o=>l.$emit("update:modelValue",null)),"data-ignore-autofocus":"",type:"button",class:"hocus:text-primary-700 absolute right-8 top-1/2 -mt-2 h-4 w-4 text-gray-400 transition"},[O(d)])),[[V,{content:t(w)("cms-dashboard","Clear"),offset:[0,8]}]]):C("",!0),O(m,{class:"pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2"})]),b("div",{class:L(["scrollbar-thin mt-0 transition-all",{"overflow-hidden":t(g),"overflow-y-auto":!t(g)}]),style:xe({height:`${t(h)}rem`})},[(f(!0),p(we,null,ge(t(c),o=>{var u,P;return f(),p("button",{"data-highlighted":o.value===((u=t(a))==null?void 0:u.value)?"":void 0,tabindex:t(r)?0:-1,title:o.label,onMousedown:Ee=>U(o),type:"button",class:L(["hover:text-primary-700 flex h-9 w-full items-center px-2.5 outline-none transition",{"bg-primary-50":o.value===((P=t(a))==null?void 0:P.value)}])},[b("span",He,R(o.label),1)],42,Se)}),256))],6)],2)],544),O(t(W),{errors:n.errors,fieldKey:n.fieldKey},null,8,["errors","fieldKey"])])}}});export{Re as default};

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.