{"version":3,"file":"FeatheryFormWSearchOptional.B6bUSbbI.mjs","names":["useRef","useState","useMemo","ReactDOM","parent","e"],"sources":["https:/framerusercontent.com/modules/TxsTW4tl01Fmoja7J806/o6MKBOQaab2fKhIPZzOV/FeatheryFormWSearchOptional.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import React,{useState,useEffect,useRef,useMemo}from\"react\";import ReactDOM from\"react-dom/client\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";// Error icon component (aria-hidden for decorative icon)\nconst ErrorIcon=()=>/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",height:\"24px\",viewBox:\"0 -960 960 960\",width:\"24px\",fill:\"#E3501B\",\"aria-hidden\":\"true\",focusable:\"false\",children:/*#__PURE__*/_jsx(\"path\",{d:\"m480-437.85 122.92 122.93q8.31 8.3 20.89 8.5 12.57.19 21.27-8.5 8.69-8.7 8.69-21.08 0-12.38-8.69-21.08L522.15-480l122.93-122.92q8.3-8.31 8.5-20.89.19-12.57-8.5-21.27-8.7-8.69-21.08-8.69-12.38 0-21.08 8.69L480-522.15 357.08-645.08q-8.31-8.3-20.89-8.5-12.57-.19-21.27 8.5-8.69 8.7-8.69 21.08 0 12.38 8.69 21.08L437.85-480 314.92-357.08q-8.3 8.31-8.5 20.89-.19 12.57 8.5 21.27 8.7 8.69 21.08 8.69 12.38 0 21.08-8.69L480-437.85Zm.07 337.85q-78.84 0-148.21-29.92t-120.68-81.21q-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.92t120.68 81.21q51.31 51.29 81.25 120.63Q860-558.9 860-480.07q0 78.84-29.92 148.21t-81.21 120.68q-51.29 51.31-120.63 81.25Q558.9-100 480.07-100Zm-.07-60q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z\"})});// Inline CompanySearch component\nconst CompanySearch=({fieldId,apiUrl,placeholder,label=\"C\\xe9gn\\xe9v\",minChars=4,debounceMs=300,maxResults=4,validationError,onClear})=>{const[query,setQuery]=useState(\"\");const[results,setResults]=useState([]);const[isOpen,setIsOpen]=useState(false);const[isLoading,setIsLoading]=useState(false);const[error,setError]=useState(null);const[isFocused,setIsFocused]=useState(false);const[highlightedIndex,setHighlightedIndex]=useState(-1);const dropdownRef=useRef(null);const inputRef=useRef(null);const debounceTimerRef=useRef();const isSelectingRef=useRef(false);// Debounced search effect\nuseEffect(()=>{if(isSelectingRef.current){isSelectingRef.current=false;return;}if(debounceTimerRef.current){clearTimeout(debounceTimerRef.current);}if(query.length<minChars){setResults([]);setError(null);setIsOpen(query.length>0);return;}setIsLoading(true);setError(null);setIsOpen(true);debounceTimerRef.current=setTimeout(()=>{searchCompanies(query);},debounceMs);return()=>{if(debounceTimerRef.current){clearTimeout(debounceTimerRef.current);}};},[query,minChars,debounceMs]);// Reset highlighted index when results change or dropdown closes\nuseEffect(()=>{setHighlightedIndex(-1);},[results,isOpen]);// Close dropdown on outside click\nuseEffect(()=>{const handleClickOutside=event=>{if(dropdownRef.current&&!dropdownRef.current.contains(event.target)&&!inputRef.current?.contains(event.target)){setIsOpen(false);}};document.addEventListener(\"mousedown\",handleClickOutside);return()=>document.removeEventListener(\"mousedown\",handleClickOutside);},[]);const searchCompanies=async searchQuery=>{try{const params=new URLSearchParams({name:searchQuery,businessType:\"all\",limit:maxResults.toString()});const response=await fetch(`${apiUrl}?${params}`);if(!response.ok){let errorMessage;switch(response.status){case 429:errorMessage=\"T\\xfal sok k\\xe9r\\xe9s, k\\xe9rj\\xfck v\\xe1rjon egy percet\";break;case 504:errorMessage=\"A keres\\xe9s időt\\xfall\\xe9p\\xe9st szenvedett, pr\\xf3b\\xe1lja \\xfajra\";break;case 502:errorMessage=\"A c\\xe9gadatb\\xe1zis jelenleg nem el\\xe9rhető\";break;default:errorMessage=`Hiba t\\xf6rt\\xe9nt (${response.status})`;}throw new Error(errorMessage);}const data=await response.json();if(!data.status||!data.response||!data.response.results){throw new Error(\"\\xc9rv\\xe9nytelen v\\xe1laszform\\xe1tum\");}setResults(data.response.results);setIsLoading(false);setError(null);}catch(err){console.error(\"Search error:\",err);setError(err instanceof Error?err.message:\"A keres\\xe9s sikertelen\");setResults([]);setIsLoading(false);}};const handleSelect=company=>{const name=company.shortName||company.fullName;isSelectingRef.current=true;setQuery(name);setIsOpen(false);const feathery=window.Feathery;if(feathery&&feathery.setFieldValues){feathery.setFieldValues({CompanyName:name,VatNumber:company.vatNumber||\"\"});}};const handleInputChange=e=>{setQuery(e.target.value);const feathery=window.Feathery;if(feathery&&feathery.setFieldValues){feathery.setFieldValues({CompanyName:\"\",VatNumber:\"\"});}if(onClear){onClear();}};const handleFocus=()=>{setIsFocused(true);if(query.length>=minChars&&results.length>0){setIsOpen(true);}};const handleBlur=()=>{setIsFocused(false);setTimeout(()=>{setIsOpen(false);},150);};const handleKeyDown=e=>{if(!isOpen||results.length===0)return;switch(e.key){case\"ArrowDown\":e.preventDefault();setHighlightedIndex(prev=>prev<0?0:Math.min(prev+1,Math.min(results.length,maxResults)-1));break;case\"ArrowUp\":e.preventDefault();setHighlightedIndex(prev=>Math.max(prev-1,0));break;case\"Enter\":e.preventDefault();if(highlightedIndex>=0&&highlightedIndex<results.length){handleSelect(results[highlightedIndex]);}break;case\"Escape\":setIsOpen(false);break;}};const listboxId=`${fieldId}-listbox`;const errorId=`${fieldId}-error`;const labelId=`${fieldId}-label`;const getStatusMessage=()=>{if(!isOpen)return null;if(isLoading)return\"Keres\\xe9s...\";if(error)return`Hiba: ${error}`;if(query.length>0&&query.length<minChars)return`\\xcdrjon be legal\\xe1bb ${minChars} karaktert`;if(query.length>=minChars&&results.length===0)return\"Nincs tal\\xe1lat\";if(results.length>0)return`${results.length} tal\\xe1lat`;return null;};return /*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:\"24px\"},role:\"search\",children:[/*#__PURE__*/_jsxs(\"label\",{id:labelId,htmlFor:fieldId,style:styles.label,children:[label,\"*\"]}),/*#__PURE__*/_jsxs(\"div\",{style:{...styles.container,...isFocused?styles.containerFocused:{},...validationError?styles.containerError:{}},children:[/*#__PURE__*/_jsx(\"input\",{ref:inputRef,id:fieldId,type:\"text\",value:query,onChange:handleInputChange,onFocus:handleFocus,onBlur:handleBlur,onKeyDown:handleKeyDown,placeholder:placeholder,style:styles.input,autoComplete:\"off\",role:\"combobox\",\"aria-labelledby\":labelId,\"aria-expanded\":isOpen,\"aria-controls\":listboxId,\"aria-autocomplete\":\"list\",\"aria-haspopup\":\"listbox\",\"aria-activedescendant\":highlightedIndex>=0?`${fieldId}-option-${highlightedIndex}`:undefined,\"aria-invalid\":!!validationError,\"aria-describedby\":validationError?errorId:undefined}),isOpen&&/*#__PURE__*/_jsxs(\"div\",{ref:dropdownRef,id:listboxId,role:\"listbox\",\"aria-label\":`${label} tal\\xe1latok`,style:styles.dropdown,children:[isLoading&&/*#__PURE__*/_jsx(\"div\",{style:styles.loading,role:\"status\",children:\"Keres\\xe9s...\"}),error&&/*#__PURE__*/_jsxs(\"div\",{style:styles.dropdownError,role:\"alert\",children:[/*#__PURE__*/_jsx(ErrorIcon,{}),/*#__PURE__*/_jsx(\"span\",{children:error})]}),!isLoading&&!error&&query.length>0&&query.length<minChars&&/*#__PURE__*/_jsxs(\"div\",{style:styles.loading,role:\"status\",children:[\"\\xcdrjon be legal\\xe1bb \",minChars,\" karaktert\"]}),!isLoading&&!error&&query.length>=minChars&&results.length===0&&/*#__PURE__*/_jsx(\"div\",{style:styles.loading,role:\"status\",children:\"Nincs tal\\xe1lat\"}),!isLoading&&!error&&results.length>0&&results.slice(0,maxResults).map((company,index)=>{const name=company.shortName||company.fullName;return /*#__PURE__*/_jsxs(\"div\",{id:`${fieldId}-option-${index}`,role:\"option\",\"aria-selected\":highlightedIndex===index,style:{...styles.dropdownItem,backgroundColor:highlightedIndex===index?\"#fff8f3\":\"transparent\"},onClick:()=>handleSelect(company),onMouseEnter:e=>{setHighlightedIndex(index);e.currentTarget.style.backgroundColor=\"#fff8f3\";},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=highlightedIndex===index?\"#fff8f3\":\"transparent\";},children:[/*#__PURE__*/_jsx(\"div\",{style:styles.companyName,children:name}),company.vatNumber&&/*#__PURE__*/_jsx(\"div\",{style:styles.companyDetail,children:company.vatNumber}),company.fullAddress&&/*#__PURE__*/_jsx(\"div\",{style:styles.companyDetail,children:company.fullAddress})]},index);})]})]}),/*#__PURE__*/_jsx(\"div\",{\"aria-live\":\"polite\",\"aria-atomic\":\"true\",style:styles.srOnly,children:getStatusMessage()}),validationError&&/*#__PURE__*/_jsxs(\"div\",{id:errorId,role:\"alert\",style:styles.validationError,children:[/*#__PURE__*/_jsx(ErrorIcon,{}),/*#__PURE__*/_jsx(\"span\",{children:validationError})]})]});};// Styles for CompanySearch\nconst styles={label:{display:\"block\",marginBottom:\"4px\",fontSize:\"14px\",fontFamily:\"Poppins, sans-serif\",fontWeight:400,color:\"#212529\"},container:{position:\"relative\",width:\"100%\",backgroundColor:\"#ffffff\",borderRadius:\"20px\",border:\"2px solid #E8E4E2\",transition:\"border 0.15s ease-in-out, box-shadow 0.15s ease-in-out\",height:\"64px\"},containerFocused:{border:\"2px solid #E88342\"},containerError:{border:\"2px solid #E3501B\"},input:{position:\"relative\",zIndex:1,height:\"100%\",width:\"100%\",border:\"none\",margin:0,backgroundColor:\"transparent\",padding:\"0.375rem 0.75rem\",paddingLeft:\"20px\",boxSizing:\"border-box\",transition:\"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out\",outline:\"none\",fontWeight:400,fontFamily:\"Poppins, sans-serif\",fontSize:\"16px\",lineHeight:\"normal\",letterSpacing:\"normal\",textTransform:\"none\",fontStyle:\"normal\",color:\"rgb(0, 0, 0)\",boxShadow:\"rgba(43, 54, 71, 0.1) 0px 0px 0px\",borderRadius:\"20px\"},dropdown:{position:\"absolute\",top:\"calc(100%)\",left:0,right:0,backgroundColor:\"#ffffff\",borderRadius:\"20px\",border:\"2px solid #E88342\",overflowY:\"auto\",zIndex:100,boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.08)\",fontFamily:\"Poppins, sans-serif\"},dropdownItem:{padding:\"12px 20px\",cursor:\"pointer\",borderBottom:\"1px solid rgba(232, 131, 66, 0.15)\",color:\"#212529\",fontSize:\"16px\",fontFamily:\"Poppins, sans-serif\",fontWeight:400,transition:\"background-color 0.15s ease-in-out\"},companyName:{fontSize:\"16px\",fontFamily:\"Poppins, sans-serif\",fontWeight:500,color:\"#212529\",marginBottom:\"4px\"},companyDetail:{fontSize:\"14px\",fontFamily:\"Poppins, sans-serif\",fontWeight:400,color:\"#212529\",lineHeight:\"1.4\"},loading:{padding:\"0.375rem 0.75rem\",paddingLeft:\"20px\",color:\"#212529\",fontStyle:\"italic\",fontSize:\"16px\",fontWeight:400,fontFamily:\"Poppins, sans-serif\"},dropdownError:{display:\"flex\",alignItems:\"center\",gap:\"4px\",padding:\"0.375rem 0.75rem\",paddingLeft:\"20px\",color:\"#E3501B\",fontSize:\"14px\",fontFamily:\"Poppins, sans-serif\",fontWeight:400},validationError:{display:\"flex\",alignItems:\"center\",gap:\"4px\",marginTop:\"4px\",color:\"#E3501B\",fontSize:\"14px\",fontFamily:\"Poppins, sans-serif\",fontWeight:400},srOnly:{position:\"absolute\",width:\"1px\",height:\"1px\",padding:0,margin:\"-1px\",overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",border:0}};// Custom styles for Feathery form elements\nconst getCustomStyles=containerId=>`\n  /* Input fields - padding left 20px (excludes checkbox) */\n  #${containerId} input:not([type=\"checkbox\"]),\n  #${containerId} textarea,\n  #${containerId} select {\n    padding-left: 20px !important;\n    font-size: 16px !important;\n  }\n\n  /* Placeholder text - left positioning for span elements near inputs */\n  #${containerId} input + span,\n  #${containerId} input ~ span,\n  #${containerId} div:has(> input) > span {\n    left: 20px !important;\n    font-size: 16px !important;\n  }\n\n  /* React Select dropdown placeholder - target spans that are siblings of the select container */\n  #${containerId} [class*=\"css-\"][class*=\"-container\"] ~ span {\n    left: 20px !important;\n  }\n\n  /* React Select control placeholder - target the  dropdown arrow icon */\n  #${containerId} [class*=\"css-\"][class*=\"-control\"] {\n    background-position: right 20px center !important;\n  }\n\n  /* Checkbox size fix - 20px x 20px */\n  #${containerId} input[type=\"checkbox\"] {\n    margin: 0 !important;\n  }\n\n  /* Checkbox size fix - 20px x 20px */\n  #${containerId} input[type=\"checkbox\"]::before,\n  #${containerId} input[type=\"checkbox\"]:hover::before {\n    width: 22px !important;\n    height: 22px !important;\n  }\n\n  /* Checkbox container flex direction */\n  #${containerId} [data-feathery-id=\"TermAndConditionsContainer\"],\n  #${containerId} [data-feathery-id=\"IndividualWTaxIDContainer\"] {\n    flex-direction: column !important;\n  }\n\n  /* Company search container - stack input and error vertically */\n  #${containerId} [data-feathery-id=\"CustomCompanySearch\"] {\n    flex-direction: column !important;\n  }\n\n  /* Label spacing */\n  #${containerId} label {\n    margin-bottom: 4px !important;\n  }\n\n  /* Hide phone country selector (flag) completely */\n  #${containerId} .PhoneInputCountry,\n  #${containerId} [class*=\"PhoneInputCountry\"],\n  #${containerId} [class*=\"country-select\"],\n  #${containerId} [class*=\"CountrySelect\"],\n  #${containerId} .iti__flag-container,\n  #${containerId} [class*=\"flag-dropdown\"],\n  #${containerId} [class*=\"PhoneInputCountryIcon\"],\n  #${containerId} [class*=\"phone-country\"],\n  #${containerId} button[class*=\"country\"],\n  #${containerId} [data-testid*=\"country\"],\n  #${containerId} [aria-label*=\"country\"],\n  #${containerId} [aria-label*=\"Country\"] {\n    display: none !important;\n    visibility: hidden !important;\n    width: 0 !important;\n    height: 0 !important;\n    padding: 0 !important;\n    margin: 0 !important;\n    opacity: 0 !important;\n  }\n\n  /* Name children alignment */\n  #${containerId} [data-feathery-id=\"NameContainer\"] .inner-container {\n    align-items: start;\n  }\n\n  /* Phone placeholder line-height */\n  #${containerId} input#PhoneNumber2 + span {\n    line-height: 16px !important;\n  }\n\n  /* Error styling for inputs with validation errors */\n  #${containerId} input.feathery-error:not([type=\"checkbox\"]),\n  #${containerId} textarea.feathery-error,\n  #${containerId} select.feathery-error {\n    border-color: #E3501B !important;\n  }\n\n  /* Error styling for checkboxes */\n  #${containerId} input[type=\"checkbox\"].feathery-error {\n    border-color: #E3501B !important;\n  }\n\n  /* Error styling for the wrapper div that contains the border (for most input fields) */\n  #${containerId} div:has(> input.feathery-error:not([type=\"checkbox\"])) {\n    border-color: #E3501B !important;\n  }\n\n  /* Error styling for sibling divs with border (common pattern in Feathery forms) */\n  #${containerId} input.feathery-error:not([type=\"checkbox\"]) + div[class*=\"css-\"],\n  #${containerId} input.feathery-error:not([type=\"checkbox\"]) ~ div[class*=\"css-\"] {\n    border-color: #E3501B !important;\n  }\n\n  /* Error styling for phone number border div */\n  /* Target the parent that contains the input, then select its first child */\n  #${containerId} div:has(> div > input#PhoneNumber2.feathery-error) > div:first-child {\n    border-color: #E3501B !important;\n  }\n\n  /* Error message container */\n  #${containerId} .feathery-field-error {\n    display: flex;\n    align-items: center;\n    gap: 4px;\n    margin-top: 4px;\n    color: #E3501B;\n    font-size: 14px;\n    font-family: Poppins, sans-serif;\n    font-weight: 400;\n  }\n\n  /* Error icon */\n  #${containerId} .feathery-field-error svg {\n    flex-shrink: 0;\n  }\n\n  /* Error message text */\n  #${containerId} .feathery-field-error span {\n    line-height: 0.6;\n  }\n\n  /* Hide Feathery's native error message spans */\n  #${containerId} .inner-container > span[class*=\"css-\"] {\n    display: none !important;\n  }\n`;/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function FeatheryFormWSearchOptional(props){const{sdkKey,formId,companyFieldId,checkboxFieldId,apiUrl,placeholder,maxResults}=props;const wrapperRef=useRef(null);const reactRootRef=useRef(null);const checkIntervalRef=useRef(null);const fieldErrorsRef=useRef({});const errorIconRootsRef=useRef(new Map);const companySearchMountRef=useRef(null);const companySearchMountingRef=useRef(false);const contextRef=useRef(null);const companyValidationErrorRef=useRef(\"\");const[companyValidationError,setCompanyValidationError]=useState(\"\");const containerId=useMemo(()=>`feathery-${formId}-${Math.random().toString(36).substring(2,11)}`,[formId]);const styleId=`${containerId}-styles`;// Tracks whether the \"individual\" checkbox is currently checked.\n// Using a ref so it's always current inside the imperative Feathery callbacks\n// that are defined once at initialization time.\nconst isIndividualRef=useRef(false);const updateCompanyValidationError=error=>{companyValidationErrorRef.current=error;setCompanyValidationError(error);};useEffect(()=>{companyValidationErrorRef.current=companyValidationError;},[companyValidationError]);useEffect(()=>{if(reactRootRef.current){if(!companySearchMountRef.current?.isConnected){reactRootRef.current.unmount();reactRootRef.current=null;companySearchMountRef.current=null;return;}reactRootRef.current.render(/*#__PURE__*/React.createElement(CompanySearch,{fieldId:companyFieldId,apiUrl:apiUrl,placeholder:placeholder,label:\"C\\xe9gn\\xe9v\",maxResults:maxResults,validationError:companyValidationError,onClear:()=>updateCompanyValidationError(\"\")}));}},[companyValidationError,companyFieldId,apiUrl,placeholder,maxResults]);useEffect(()=>{const plainDiv=document.createElement(\"div\");plainDiv.id=containerId;plainDiv.style.width=\"100%\";plainDiv.style.height=\"100%\";if(wrapperRef.current){wrapperRef.current.appendChild(plainDiv);}if(window.Feathery){initializeFeathery();}else{const script=document.createElement(\"script\");script.src=\"https://cdn.jsdelivr.net/npm/@feathery/react@latest/umd/index.js\";script.async=true;script.onload=initializeFeathery;document.body.appendChild(script);}return()=>{if(checkIntervalRef.current){clearInterval(checkIntervalRef.current);}if(reactRootRef.current){reactRootRef.current.unmount();reactRootRef.current=null;}companySearchMountRef.current=null;companySearchMountingRef.current=false;errorIconRootsRef.current.forEach(root=>{root.unmount();});errorIconRootsRef.current.clear();const container=document.getElementById(containerId);if(container&&wrapperRef.current){wrapperRef.current.removeChild(container);}const styleElement=document.getElementById(styleId);if(styleElement){styleElement.remove();}};function initializeFeathery(){requestAnimationFrame(()=>{const container=document.getElementById(containerId);if(!container?.isConnected){requestAnimationFrame(initializeFeathery);return;}if(!document.getElementById(styleId)){const styleElement=document.createElement(\"style\");styleElement.id=styleId;styleElement.textContent=getCustomStyles(containerId);document.head.appendChild(styleElement);}const feathery=window.Feathery;feathery.init(sdkKey,{language:\"hu\"});const parseCheckboxValue=rawValue=>{if(typeof rawValue===\"boolean\")return rawValue;if(typeof rawValue===\"string\"){const normalized=rawValue.trim().toLowerCase();if([\"true\",\"1\",\"yes\",\"on\"].includes(normalized))return true;if([\"false\",\"0\",\"no\",\"off\",\"\"].includes(normalized))return false;}return!!rawValue;};const getCustomCompanySearchContainer=()=>(container?.querySelector('[data-feathery-id=\"CustomCompanySearch\"]'))||null;const mountCompanySearchInto=targetContainer=>{if(reactRootRef.current&&companySearchMountRef.current!==targetContainer){reactRootRef.current.unmount();reactRootRef.current=null;companySearchMountRef.current=null;companySearchMountingRef.current=false;}if(!reactRootRef.current){reactRootRef.current=ReactDOM.createRoot(targetContainer);companySearchMountRef.current=targetContainer;}companySearchMountingRef.current=true;reactRootRef.current.render(/*#__PURE__*/React.createElement(CompanySearch,{fieldId:companyFieldId,apiUrl:apiUrl,placeholder:placeholder,label:\"C\\xe9gn\\xe9v\",maxResults:maxResults,validationError:companyValidationErrorRef.current,onClear:()=>updateCompanyValidationError(\"\")}));requestAnimationFrame(()=>{companySearchMountingRef.current=false;});};// Shows or hides the CustomCompanySearch container and manages\n// Feathery hidden field values accordingly.\nconst toggleCompanySearch=hide=>{const applyCompanySearchState=()=>{const customContainer=getCustomCompanySearchContainer();if(!customContainer)return false;if(hide){customContainer.style.display=\"none\";customContainer.style.visibility=\"\";customContainer.style.minHeight=\"\";// Clear the Feathery hidden fields so no stale company data is submitted\nif(feathery&&feathery.setFieldValues){feathery.setFieldValues({CompanyName:\"\",VatNumber:\"\"});}// Clear any pending validation error on the company field\nif(companyValidationErrorRef.current){updateCompanyValidationError(\"\");}}else{// Keep vertical space stable while rehydrating to avoid visible jump.\ncustomContainer.style.minHeight=\"89px\";customContainer.style.visibility=\"hidden\";customContainer.style.display=\"\";// Re-mount if Feathery replaced or emptied the custom container.\nif(companySearchMountRef.current!==customContainer||customContainer.children.length===0&&!companySearchMountingRef.current){mountCompanySearchInto(customContainer);}requestAnimationFrame(()=>{// Respect latest checkbox state if user toggles quickly.\nif(!isIndividualRef.current&&customContainer.isConnected){customContainer.style.visibility=\"\";customContainer.style.minHeight=\"\";}});}return true;};applyCompanySearchState();// Feathery can re-render the step asynchronously after checkbox changes.\n// Re-apply visible mode shortly after toggle so recreated containers are restored.\nif(!hide){requestAnimationFrame(()=>{applyCompanySearchState();[50,150,300].forEach(delay=>{setTimeout(()=>{applyCompanySearchState();},delay);});});}};const getErrorContainer=input=>{if(input.getAttribute(\"type\")===\"checkbox\"){let parent=input.parentElement;while(parent&&parent!==container){if(parent.hasAttribute(\"data-feathery-id\")){return parent;}parent=parent.parentElement;}}if(input.getAttribute(\"id\")===\"PhoneNumber2\"){let parent=input.parentElement;while(parent&&parent!==container){const className=parent.className||\"\";if(className.includes(\"css-\")&&parent.querySelector(\"label[for='PhoneNumber2']\")){return parent;}parent=parent.parentElement;}}let parent=input.parentElement;while(parent&&parent!==container){const className=parent.className||\"\";if(className.includes(\"css-\")){return parent;}parent=parent.parentElement;}return input.parentElement;};const showFieldError=(fieldId,message)=>{const input=container?.querySelector(`#${fieldId}`);if(!input){console.warn(`Could not find input with id: ${fieldId}`);return;}clearFieldError(fieldId);fieldErrorsRef.current[fieldId]=message;input.classList.add(\"feathery-error\");const errorContainer=getErrorContainer(input);if(!errorContainer){console.warn(`Could not find error container for field: ${fieldId}`);return;}const errorElement=document.createElement(\"div\");errorElement.className=\"feathery-field-error\";errorElement.setAttribute(\"data-error-for\",fieldId);const iconContainer=document.createElement(\"span\");const iconRoot=ReactDOM.createRoot(iconContainer);iconRoot.render(/*#__PURE__*/React.createElement(ErrorIcon));errorElement.appendChild(iconContainer);errorIconRootsRef.current.set(fieldId,iconRoot);const messageSpan=document.createElement(\"span\");messageSpan.textContent=message;errorElement.appendChild(messageSpan);if(input.getAttribute(\"type\")===\"checkbox\"){errorContainer.appendChild(errorElement);}else if(input.getAttribute(\"id\")===\"PhoneNumber2\"){errorContainer.appendChild(errorElement);}else{if(errorContainer.nextSibling){errorContainer.parentElement?.insertBefore(errorElement,errorContainer.nextSibling);}else{errorContainer.parentElement?.appendChild(errorElement);}}};const clearFieldError=fieldId=>{delete fieldErrorsRef.current[fieldId];const input=container?.querySelector(`#${fieldId}`);if(input){input.classList.remove(\"feathery-error\");}const iconRoot=errorIconRootsRef.current.get(fieldId);if(iconRoot){iconRoot.unmount();errorIconRootsRef.current.delete(fieldId);}const errorElement=container?.querySelector(`.feathery-field-error[data-error-for=\"${fieldId}\"]`);if(errorElement){errorElement.remove();}};const handleError=error=>{console.error(\"Feathery Form Error:\",error);// Only validate company field when the company search is active (not individual mode)\nif(!isIndividualRef.current&&contextRef.current?.fields?.[companyFieldId]){const companyField=contextRef.current.fields[companyFieldId];if(companyField.isEmpty()){updateCompanyValidationError(\"K\\xe9rj\\xfck, v\\xe1lasszon c\\xe9get a list\\xe1b\\xf3l\");}}if(error?.errorFieldId===companyFieldId){return;}if(error?.errorFieldId&&error?.errorMessage){showFieldError(error.errorFieldId,error.errorMessage);}if(error?.message){console.error(\"Error Message:\",error.message);}if(error?.fieldErrors){console.error(\"Field Errors:\",error.fieldErrors);}};const handleChange=context=>{// Clear error when any field value changes\nif(context?.trigger?.id&&fieldErrorsRef.current[context.trigger.id]){clearFieldError(context.trigger.id);}// Clear company validation error when CompanyName field changes\nif(context?.trigger?.id===companyFieldId&&companyValidationErrorRef.current){updateCompanyValidationError(\"\");}// Detect toggle of the individual/company checkbox\nif(context?.trigger?.id===checkboxFieldId){const isChecked=parseCheckboxValue(context?.fields?.[checkboxFieldId]?.value);isIndividualRef.current=isChecked;toggleCompanySearch(isChecked);}};const handleSubmit=context=>{// Only validate the company field when company search is visible (not individual mode)\nif(!isIndividualRef.current){if(contextRef.current?.fields?.[companyFieldId]){const companyField=contextRef.current.fields[companyFieldId];if(companyField.isEmpty()){updateCompanyValidationError(\"K\\xe9rj\\xfck, v\\xe1lasszon c\\xe9get a list\\xe1b\\xf3l\");throw new Error(\"A mező kit\\xf6lt\\xe9se k\\xf6telező\");}}}console.log(\"Form step submitted successfully\",context.submitFields);};feathery.renderAt(containerId,{formId,contextRef:contextRef,onError:handleError,onChange:handleChange,onSubmit:handleSubmit},false);const fixCheckboxAccessibility=()=>{const checkbox=document.querySelector(\"input#TermsConditions\");if(!checkbox)return false;const currentAriaLabel=checkbox.getAttribute(\"aria-label\");if(currentAriaLabel&&currentAriaLabel.length>10){return true;}const labelSpan=document.querySelector('[data-feathery-id=\"TermAndConditionsContainer\"] span[id^=\"span-\"]');if(labelSpan){const labelText=labelSpan.textContent?.trim()||\"\";if(labelText&&labelText.length>0){checkbox.setAttribute(\"aria-label\",labelText);return true;}}return false;};const injectCompanySearch=()=>{const customContainer=getCustomCompanySearchContainer();if(customContainer&&!reactRootRef.current){mountCompanySearchInto(customContainer);fixCheckboxAccessibility();return true;}return false;};// Reads initial checkbox state from Feathery context and applies\n// explicit show/hide for deterministic startup state.\nconst applyInitialCheckboxState=()=>{const fields=contextRef.current?.fields;if(!fields)return false;const checkboxField=fields[checkboxFieldId];if(checkboxField===undefined)return false;const isChecked=parseCheckboxValue(checkboxField.value);isIndividualRef.current=isChecked;toggleCompanySearch(isChecked);return true;};let checkboxFixed=false;let companySearchInjected=false;let initialStateApplied=false;checkIntervalRef.current=setInterval(()=>{if(!companySearchInjected&&injectCompanySearch()){companySearchInjected=true;}if(!checkboxFixed&&fixCheckboxAccessibility()){checkboxFixed=true;}// Apply initial checkbox state once context fields become available\nif(!initialStateApplied&&applyInitialCheckboxState()){initialStateApplied=true;}if(companySearchInjected&&checkboxFixed&&initialStateApplied){clearInterval(checkIntervalRef.current);checkIntervalRef.current=null;}},100);[500,1e3,2e3,3e3].forEach(delay=>{setTimeout(()=>{if(!checkboxFixed){checkboxFixed=fixCheckboxAccessibility();}if(!initialStateApplied){initialStateApplied=applyInitialCheckboxState();}},delay);});setTimeout(()=>{if(checkIntervalRef.current){clearInterval(checkIntervalRef.current);checkIntervalRef.current=null;}fixCheckboxAccessibility();applyInitialCheckboxState();},1e4);});}},[sdkKey,formId,containerId,styleId]);return /*#__PURE__*/_jsx(motion.div,{ref:wrapperRef,style:{width:\"100%\",height:\"100%\"}});}addPropertyControls(FeatheryFormWSearchOptional,{sdkKey:{title:\"SDK Key\",type:ControlType.String,defaultValue:\"<SDKKey>\"},formId:{title:\"Form ID\",type:ControlType.String,defaultValue:\"<formId>\"},companyFieldId:{title:\"Company Field ID\",type:ControlType.String,defaultValue:\"CompanyName\"},checkboxFieldId:{title:\"Checkbox Field ID\",type:ControlType.String,defaultValue:\"IndividualWTaxID\"},apiUrl:{title:\"API URL\",type:ControlType.String,defaultValue:\"https://feathery-cegedat.vercel.app/api/search\"},placeholder:{title:\"Placeholder\",type:ControlType.String,defaultValue:\"pl. XY Kft.\"},maxResults:{title:\"Max Results\",type:ControlType.Number,defaultValue:4,min:1,max:10,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FeatheryFormWSearchOptional\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FeatheryFormWSearchOptional.map"],"mappings":"0RAwJG,SAAwB,EAA4B,EAAM,CAAC,GAAK,CAAC,SAAO,SAAO,iBAAe,kBAAgB,SAAO,cAAY,cAAY,EAAY,EAAWA,EAAO,KAAK,CAAO,EAAaA,EAAO,KAAK,CAAO,EAAiBA,EAAO,KAAK,CAAO,EAAeA,EAAO,EAAE,CAAC,CAAO,EAAkBA,EAAO,IAAI,IAAI,CAAO,EAAsBA,EAAO,KAAK,CAAO,EA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