1import{B as e,F as t}from"./chunk-4N6VE7H7-CobKpxLD.js";import{t as n}from"./jsx-runtime-CYCb-Tk8.js";import{n as r}from"./createLucideIcon-DK88A0ge.js";import{A as i,T as a,a as o,d as s,f as c,i as l,l as u,p as d,t as f}from"./useRenderElement-jcY1OPpR.js";import{t as p}from"./utils-DXalBF5w.js";import{f as m,m as h,p as g,s as _,t as v}from"./createBaseUIEventDetails-B0ga2Z58.js";async function y(e,t){let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`Landing form request failed with status ${n.status}`);return n.json()}var b=e(t(),1),x=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),S={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},C={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},w={disabled:!1,...C},T={valid(e){return e===null?null:e?{[x.valid]:``}:{[x.invalid]:``}}},E={invalid:void 0,name:void 0,validityData:{state:S,errors:[],error:``,value:``,initialValue:null},setValidityData:o,disabled:void 0,touched:C.touched,setTouched:o,dirty:C.dirty,setDirty:o,filled:C.filled,setFilled:o,focused:C.focused,setFocused:o,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:w,markedDirtyRef:{current:!1},registerFieldControl:o,validation:{getValidationProps:(e,t=l)=>t,inputRef:{current:null},registerInput:o,commit:async()=>{},change:o}},D=b.createContext(E);function O(e=!0){let t=b.useContext(D);if(t.setValidityData===o&&!e)throw Error(u(28));return t}var k=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:o,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function A(){return b.useContext(k)}var j=b.createContext({controlId:void 0,registerControlId:o,labelId:void 0,setLabelId:o,messageIds:[],setMessageIds:o,getDescriptionProps:e=>e});function M(){return b.useContext(j)}function N(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function P(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&i(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function F(e){return`composedPath`in e?e.composedPath()[0]:e.target}function I(e,t,n,r,i=!0,a){let{registerFieldControl:o}=O(),c=b.useRef(null);c.current||=Symbol(),s(()=>{let s=c.current;if(!(!s||!i))return o(s,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{o(s,void 0)}},[e,i,r,t,a,o,n])}function L(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:l}=M(),u=h(t),f=n?i:void 0,p=d(()=>Symbol(`labelable-control`)),m=b.useRef(!1),g=b.useRef(t!=null),_=c(()=>{!m.current||l===o||(m.current=!1,l(p.current,void 0))});return s(()=>{if(l===o)return;let e;if(n){let n=r?.current;e=a(n)&&n.closest(`label`)!=null?t??null:f??u}else if(t!=null)g.current=!0,e=t;else if(g.current)e=u;else{_();return}if(e===void 0){_();return}m.current=!0,l(p.current,e)},[t,r,f,l,n,u,p,_]),b.useEffect(()=>_,[_]),i??u}var R=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:l=!1,onValueChange:u,defaultValue:d,autoFocus:p=!1,style:h,...y}=e,{state:x,name:S,disabled:C,setTouched:w,setDirty:E,validityData:D,setFocused:k,setFilled:j,validationMode:P,validation:F}=O(),{clearErrors:R}=A(),z=C||l,B=S??a,V={...x,disabled:z},{labelId:H}=M(),U=L({id:i});s(()=>{let e=o!=null;F.inputRef.current?.value||e&&o!==``?j(!0):e&&o===``&&j(!1)},[F.inputRef,j,o]);let W=b.useRef(null);s(()=>{p&&W.current===N(g(W.current))&&k(!0)},[p,k]);let[G]=m({controlled:o,default:d,name:`FieldControl`,state:`value`}),K=o!==void 0,q=K?G:void 0,J=c(()=>F.inputRef.current?.value);return I(F.inputRef,U,q,J,!z,a),f(`input`,e,{ref:[t,W],state:V,props:[{id:U,disabled:z,name:B,ref:F.inputRef,"aria-labelledby":H,autoFocus:p,...K?{value:q}:{defaultValue:d},onChange(e){let t=e.currentTarget.value;u?.(t,v(_,e.nativeEvent)),E(t!==D.initialValue),j(t!==``),e.nativeEvent.defaultPrevented||(R(B),F.change(t))},onFocus(){k(!0)},onBlur(e){w(!0),k(!1),P===`onBlur`&&F.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(w(!0),F.commit(e.currentTarget.value))}},y,e=>F.getValidationProps(z,e)],stateAttributesMapping:T})}),z=n(),B=b.forwardRef(function(e,t){return(0,z.jsx)(R,{ref:t,...e})}),V=r();function H(e){let t=(0,V.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=p(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,z.jsx)(B,{type:i,"data-slot":`input`,className:a,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}function U(e){let t=(0,V.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=p(`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`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`label`,{"data-slot":`label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{N as a,M as c,T as d,y as f,I as i,A as l,H as n,P as o,L as r,F as s,U as t,O 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.