Skip to content

The only tool you need to know what is happening and how to fix it.

1.8 KB
Raw Blame
import"./DsnmJJEf.js";import{u as v,g as l,l as B,ar as D,p as y,c as h,f as b,d as i,a as P,s as w,e as I,h as R,x as S,r as W}from"./BKFspo1J.js";import{c as j}from"./CWm9VMfX.js";import{p as g,r as L,s as q}from"./CARHnQ8P.js";import{c as z}from"./BXr1Q65P.js";import{i as C}from"./COK9M2N0.js";import{d as E}from"./DwMHXN8q.js";import{a as F,d as G,c as H,b as x,m as J}from"./BoImjCaE.js";const K=G({component:"label",parts:["root"]});class _{static create(e){return new _(e)}opts;attachment;constructor(e){this.opts=e,this.attachment=F(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=v(()=>({id:this.opts.id.current,[K.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return l(this.#e)}set props(e){B(this.#e,e)}}var M=I("<label><!></label>");function N(d,e){const a=D();y(e,!0);let c=g(e,"id",19,()=>H(a)),s=g(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const m=_.create({id:x(()=>c()),ref:x(()=>s(),t=>s(t))}),o=v(()=>J(f,m.props,{for:e.for}));var n=h(),p=b(n);{var A=t=>{var r=h(),u=b(r);w(u,()=>e.child,()=>({props:l(o)})),i(t,r)},k=t=>{var r=M();E(r,()=>({...l(o),for:e.for}));var u=R(r);w(u,()=>e.children??S),W(r),i(t,r)};C(p,t=>{e.child?t(A):t(k,!1)})}i(d,n),P()}function $(d,e){y(e,!0);let a=g(e,"ref",15,null),c=L(e,["$$slots","$$events","$$legacy","ref","class"]);var s=h(),f=b(s);{let m=v(()=>z("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class));j(f,()=>N,(o,n)=>{n(o,q({"data-slot":"label",get class(){return l(m)}},()=>c,{get ref(){return a()},set ref(p){a(p)}}))})}i(d,s),P()}export{$ as L};