1import{d as N,x as m,aK as S,aU as D,v as E,e as b,a2 as T,n as W,o,g as r,B as V,J as v,j as d,h as s,y as p,P as f,Q as F,H as B,W as L,aV as P,aW as R,i as U,D as j,ax as z,ay as G,E as H}from"./BruO-1QP.js";const J=u=>(z("data-v-9381d891"),u=u(),G(),u),K=["id"],O={key:0},Q=["required","checked"],X=["role","aria-labelledby","id"],Y={class:"check-wrapper"},Z=["for"],ee=["id","name","value","disabled"],ae=J(()=>p("span",{class:"checkbox"},null,-1)),se=["id","aria-live"],oe=N({__name:"BaseCheckGroup",props:{modelValue:{type:[Array,Boolean]},title:{},prefix:{},options:{},required:{type:[Boolean,Number]},twoColumns:{type:Boolean},markdown:{type:Boolean}},emits:["update:modelValue"],setup(u,{emit:$}){const y=m(0),w=S("$LNWkBaspOT"),i=u,n=m(null),C=$,{formInvalid:_,errorMessage:q,showErrorMessage:I,handleInvalid:h}=D(n);E(()=>{g()});function x(){var e;y.value===i.options.length&&((e=n.value)==null||e.reportValidity())}const c=b(()=>typeof i.required=="number"?i.required:1),M=b(()=>i.required&&Array.isArray(t.value)&&t.value.length<c.value);function g(){n.value&&(M.value?n.value.setCustomValidity(`Please select at least ${c.value} option`):n.value.setCustomValidity(""))}const t=m(i.modelValue);return T(()=>t.value,async e=>{g(),await W(()=>C("update:modelValue",e))}),(e,l)=>{const A=j;return o(),r("div",{class:B(["check-group",{visited:s(_),twoColumns:i.twoColumns}])},[e.title?(o(),r("h3",{key:0,class:"check-title",id:`${e.prefix}_check`},[V(v(e.title)+" ",1),e.required?(o(),r("span",O," * ")):d("",!0)],8,K)):d("",!0),e.required?(o(),r("input",{key:1,"aria-hidden":"true",ref_key:"hiddenInput",ref:n,class:"hidden-input",required:!!i.required,type:"checkbox",onInvalid:l[0]||(l[0]=(...a)=>s(h)&&s(h)(...a)),checked:Array.isArray(s(t))?s(t).length>=s(c):s(t)},null,40,Q)):d("",!0),p("div",{class:"check-list",role:e.options.length>1?"group":void 0,"aria-labelledby":e.title?"prefix_check":void 0,id:`${e.prefix}_check-group`},[p("div",Y,[(o(!0),r(f,null,F(e.options,(a,te)=>(o(),r(f,null,[a.slug&&a.name?(o(),r("label",{class:B(["check-item",{disabled:a.disabled}]),for:`${e.prefix}_${a.slug}`,key:a.name+a.slug},[L(p("input",{type:"checkbox",id:`${e.prefix}_${a.slug}`,name:`${e.prefix}_check_${a.slug}`,value:a.slug,disabled:a.disabled,"onUpdate:modelValue":l[1]||(l[1]=k=>R(t)?t.value=k:null),onFocus:l[2]||(l[2]=k=>y.value++),onBlur:x},null,40,ee),[[P,s(t)]]),ae,i.markdown&&a.name?(o(),U(A,{key:0,source:a.name},null,8,["source"])):(o(),r(f,{key:1},[V(v(a.name),1)],64))],10,Z)):d("",!0)],64))),256))])],8,X),s(I)?(o(),r("p",{key:2,class:"error-message",id:`error-${s(w)}`,"aria-live":s(_)?"off":"assertive"},v(s(q)()),9,se)):d("",!0)],2)}}}),ie=H(oe,[["__scopeId","data-v-9381d891"]]);export{ie 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.