var __runInitializers=this&&this.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i=0;i--){var context={};for(var p in contextIn)context[p]="access"===p?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])("accessor"===kind?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if("accessor"===kind){if(void 0===result)continue;if(null===result||"object"!=typeof result)throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&("field"===kind?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0};import{TcHmiControl}from"Beckhoff.TwinCAT.HMI.Framework/index.esm.js";import{ValueBuffer,InputProcessingPoint}from"../Helpers/TcHmiValueBuffer/ValueBuffer.js";export var DropDownStyle;!function(DropDownStyle){DropDownStyle[DropDownStyle.Classic=0]="Classic",DropDownStyle[DropDownStyle.Mobile=1]="Mobile"}(DropDownStyle||(DropDownStyle={}));export var ImagePosition;!function(ImagePosition){ImagePosition[ImagePosition.LeftOfText=0]="LeftOfText",ImagePosition[ImagePosition.RightOfText=1]="RightOfText"}(ImagePosition||(ImagePosition={}));let TcHmiCombobox=(()=>{var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o;let ___onMousedown_decorators,___onItemClick_decorators,___onMouseEnter_decorators,___onMouseLeave_decorators,___onTouchstart_decorators,___onKeydownTextbox_decorators,___onInputTextbox_decorators,___onPasteTextbox_decorators,___onCutTextbox_decorators,___onFocusInTextbox_decorators,___onFocusOutTextbox_decorators,___onIndirectInputFinished_decorators,___onIndirectInputCanceled_decorators,___onResolverForContentPaddingWatchCallback_decorators,___onResolverForDropDownHighlightColorWatchCallback_decorators,___onResolverForDropDownHighlightTextColorWatchCallback_decorators,___onResolverForDropDownToggleButtonBackgroundColorWatchCallback_decorators,___onResolverForDropDownToggleButtonArrowColorWatchCallback_decorators,___onResolverForTextColorWatchCallback_decorators,___onResolverForSrcDataWatchCallback_decorators,___onEnumDataSymbolWatch_decorators,___onDocumentClick_decorators,___resizeDropDownboxCb_decorators,___onResolverForDropDownTextColorWatchCallback_decorators,___onResolverForDropDownBackgroundColorWatchCallback_decorators,___onResolverForDropDownCategoryTextColorWatchCallback_decorators,___onResolverForDropDownCategoryBackgroundColorWatchCallback_decorators,_classSuper=TcHmiControl.Control,_instanceExtraInitializers=[];return class TcHmiCombobox extends _classSuper{static{const _metadata="function"==typeof Symbol&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;___onMousedown_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate"})],___onItemClick_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onMouseEnter_decorators=[TcHmi.EventHandler()],___onMouseLeave_decorators=[TcHmi.EventHandler()],___onTouchstart_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate"})],___onKeydownTextbox_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onInputTextbox_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onPasteTextbox_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onCutTextbox_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onFocusInTextbox_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate"})],___onFocusOutTextbox_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate"})],___onIndirectInputFinished_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onIndirectInputCanceled_decorators=[TcHmi.EventHandler()],___onResolverForContentPaddingWatchCallback_decorators=[(_a=TcHmi).CallbackMethod.bind(_a)],___onResolverForDropDownHighlightColorWatchCallback_decorators=[(_b=TcHmi).CallbackMethod.bind(_b)],___onResolverForDropDownHighlightTextColorWatchCallback_decorators=[(_c=TcHmi).CallbackMethod.bind(_c)],___onResolverForDropDownToggleButtonBackgroundColorWatchCallback_decorators=[(_d=TcHmi).CallbackMethod.bind(_d)],___onResolverForDropDownToggleButtonArrowColorWatchCallback_decorators=[(_e=TcHmi).CallbackMethod.bind(_e)],___onResolverForTextColorWatchCallback_decorators=[(_f=TcHmi).CallbackMethod.bind(_f)],___onResolverForSrcDataWatchCallback_decorators=[(_g=TcHmi).CallbackMethod.bind(_g)],___onEnumDataSymbolWatch_decorators=[(_h=TcHmi).CallbackMethod.bind(_h)],___onDocumentClick_decorators=[TcHmi.EventHandler()],___resizeDropDownboxCb_decorators=[(_j=TcHmi).CallbackMethod.bind(_j)],___onResolverForDropDownTextColorWatchCallback_decorators=[(_k=TcHmi).CallbackMethod.bind(_k)],___onResolverForDropDownBackgroundColorWatchCallback_decorators=[(_l=TcHmi).CallbackMethod.bind(_l)],___onResolverForDropDownCategoryTextColorWatchCallback_decorators=[(_m=TcHmi).CallbackMethod.bind(_m)],___onResolverForDropDownCategoryBackgroundColorWatchCallback_decorators=[(_o=TcHmi).CallbackMethod.bind(_o)],__esDecorate(this,null,___onMousedown_decorators,{kind:"method",name:"__onMousedown",static:!1,private:!1,access:{has:obj=>"__onMousedown"in obj,get:obj=>obj.__onMousedown},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onItemClick_decorators,{kind:"method",name:"__onItemClick",static:!1,private:!1,access:{has:obj=>"__onItemClick"in obj,get:obj=>obj.__onItemClick},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onMouseEnter_decorators,{kind:"method",name:"__onMouseEnter",static:!1,private:!1,access:{has:obj=>"__onMouseEnter"in obj,get:obj=>obj.__onMouseEnter},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onMouseLeave_decorators,{kind:"method",name:"__onMouseLeave",static:!1,private:!1,access:{has:obj=>"__onMouseLeave"in obj,get:obj=>obj.__onMouseLeave},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onTouchstart_decorators,{kind:"method",name:"__onTouchstart",static:!1,private:!1,access:{has:obj=>"__onTouchstart"in obj,get:obj=>obj.__onTouchstart},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onKeydownTextbox_decorators,{kind:"method",name:"__onKeydownTextbox",static:!1,private:!1,access:{has:obj=>"__onKeydownTextbox"in obj,get:obj=>obj.__onKeydownTextbox},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onInputTextbox_decorators,{kind:"method",name:"__onInputTextbox",static:!1,private:!1,access:{has:obj=>"__onInputTextbox"in obj,get:obj=>obj.__onInputTextbox},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onPasteTextbox_decorators,{kind:"method",name:"__onPasteTextbox",static:!1,private:!1,access:{has:obj=>"__onPasteTextbox"in obj,get:obj=>obj.__onPasteTextbox},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onCutTextbox_decorators,{kind:"method",name:"__onCutTextbox",static:!1,private:!1,access:{has:obj=>"__onCutTextbox"in obj,get:obj=>obj.__onCutTextbox},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onFocusInTextbox_decorators,{kind:"method",name:"__onFocusInTextbox",static:!1,private:!1,access:{has:obj=>"__onFocusInTextbox"in obj,get:obj=>obj.__onFocusInTextbox},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onFocusOutTextbox_decorators,{kind:"method",name:"__onFocusOutTextbox",static:!1,private:!1,access:{has:obj=>"__onFocusOutTextbox"in obj,get:obj=>obj.__onFocusOutTextbox},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onIndirectInputFinished_decorators,{kind:"method",name:"__onIndirectInputFinished",static:!1,private:!1,access:{has:obj=>"__onIndirectInputFinished"in obj,get:obj=>obj.__onIndirectInputFinished},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onIndirectInputCanceled_decorators,{kind:"method",name:"__onIndirectInputCanceled",static:!1,private:!1,access:{has:obj=>"__onIndirectInputCanceled"in obj,get:obj=>obj.__onIndirectInputCanceled},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForContentPaddingWatchCallback_decorators,{kind:"method",name:"__onResolverForContentPaddingWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForContentPaddingWatchCallback"in obj,get:obj=>obj.__onResolverForContentPaddingWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForDropDownHighlightColorWatchCallback_decorators,{kind:"method",name:"__onResolverForDropDownHighlightColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForDropDownHighlightColorWatchCallback"in obj,get:obj=>obj.__onResolverForDropDownHighlightColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForDropDownHighlightTextColorWatchCallback_decorators,{kind:"method",name:"__onResolverForDropDownHighlightTextColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForDropDownHighlightTextColorWatchCallback"in obj,get:obj=>obj.__onResolverForDropDownHighlightTextColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForDropDownToggleButtonBackgroundColorWatchCallback_decorators,{kind:"method",name:"__onResolverForDropDownToggleButtonBackgroundColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForDropDownToggleButtonBackgroundColorWatchCallback"in obj,get:obj=>obj.__onResolverForDropDownToggleButtonBackgroundColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForDropDownToggleButtonArrowColorWatchCallback_decorators,{kind:"method",name:"__onResolverForDropDownToggleButtonArrowColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForDropDownToggleButtonArrowColorWatchCallback"in obj,get:obj=>obj.__onResolverForDropDownToggleButtonArrowColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForTextColorWatchCallback_decorators,{kind:"method",name:"__onResolverForTextColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForTextColorWatchCallback"in obj,get:obj=>obj.__onResolverForTextColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForSrcDataWatchCallback_decorators,{kind:"method",name:"__onResolverForSrcDataWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForSrcDataWatchCallback"in obj,get:obj=>obj.__onResolverForSrcDataWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onEnumDataSymbolWatch_decorators,{kind:"method",name:"__onEnumDataSymbolWatch",static:!1,private:!1,access:{has:obj=>"__onEnumDataSymbolWatch"in obj,get:obj=>obj.__onEnumDataSymbolWatch},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onDocumentClick_decorators,{kind:"method",name:"__onDocumentClick",static:!1,private:!1,access:{has:obj=>"__onDocumentClick"in obj,get:obj=>obj.__onDocumentClick},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___resizeDropDownboxCb_decorators,{kind:"method",name:"__resizeDropDownboxCb",static:!1,private:!1,access:{has:obj=>"__resizeDropDownboxCb"in obj,get:obj=>obj.__resizeDropDownboxCb},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForDropDownTextColorWatchCallback_decorators,{kind:"method",name:"__onResolverForDropDownTextColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForDropDownTextColorWatchCallback"in obj,get:obj=>obj.__onResolverForDropDownTextColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForDropDownBackgroundColorWatchCallback_decorators,{kind:"method",name:"__onResolverForDropDownBackgroundColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForDropDownBackgroundColorWatchCallback"in obj,get:obj=>obj.__onResolverForDropDownBackgroundColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForDropDownCategoryTextColorWatchCallback_decorators,{kind:"method",name:"__onResolverForDropDownCategoryTextColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForDropDownCategoryTextColorWatchCallback"in obj,get:obj=>obj.__onResolverForDropDownCategoryTextColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForDropDownCategoryBackgroundColorWatchCallback_decorators,{kind:"method",name:"__onResolverForDropDownCategoryBackgroundColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForDropDownCategoryBackgroundColorWatchCallback"in obj,get:obj=>obj.__onResolverForDropDownCategoryBackgroundColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),_metadata&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}static#tchmiFQN="TcHmi.Controls.Beckhoff."+this.name;constructor(element,pcElement,attrs){super(element,pcElement,attrs)}__elementTemplateRoot=__runInitializers(this,_instanceExtraInitializers);__elementSelect;__elementText;__elementDropdown;__elementDropdownToggleButton;__elementFocusBorder;__systemKeyboardInputMode;__selectedIndex;__selectedId;__locked=!1;__textInputDestroyers=[];__srcData;__enumDataSymbol;__enumDataSymbolCurrentValue;__enumDataSymbolSchema;__enumDataSymbolWriteLock=!1;__enumDataSymbolExpressionResolved;__destroyEnumLocalizationWatch=null;__data=[];__dropDownboxOpen=!1;__comboboxText;__textHorizontalAlignment;__dropDownHorizontalAlignment;__dropDownVerticalAlignment;__textColor;__dropDownTextColor;__dropDownBackgroundColor;__textFontSize;__textFontSizeUnit;__textFontFamily;__textFontStyle;__textFontWeight;__autoFocusOut;__autoSelectText;__dropDownFontSize;__dropDownFontSizeUnit;__dropDownFontFamily;__dropDownFontStyle;__dropDownFontWeight;__dataHeight;__maxListHeight;__dropDownStyle;__imagePosition;__allowTextInput;__text;__valueBuffer;__ignoreEscapeSequences;__showSelectedImage;__dropDownHighlightColor;__dropDownHighlightTextColor;__dropDownToggleButtonBackgroundColor;__dropDownToggleButtonArrowColor;__dropDownCategoryBackgroundColor;__dropDownCategoryTextColor;__dropDownCategoryFontSize;__dropDownCategoryFontSizeUnit;__dropDownCategoryFontFamily;__dropDownCategoryFontStyle;__dropDownCategoryFontWeight;__dropDownCategoryHorizontalAlignment;__dropDownCategoryVerticalAlignment;__contentPadding;__isReadOnly;__resizedEventDestroyEvent=null;__movedEventDestroyEvent=null;__destroyEnumDataSymbolWatch=null;__destroyEnumDataSymbolWrite=null;__triggerUIFinishedOnBlur=!1;__touches=[];__oldText;__previnit(){if(this.__elementTemplateRoot=this.__element.find(".TcHmi_Controls_Beckhoff_TcHmiCombobox-template"),0===this.__elementTemplateRoot.length&&(this.__elementTemplateRoot=this.__element.find(".tchmi-combobox-template")),this.__elementSelect=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiCombobox-template-select"),0===this.__elementSelect.length&&(this.__elementSelect=this.__elementTemplateRoot.find(".tchmi-combobox-template-select")),this.__elementText=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiCombobox-template-select-content"),0===this.__elementText.length&&(this.__elementText=this.__elementTemplateRoot.find(".tchmi-combobox-template-select-content")),this.__elementDropdownToggleButton=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiCombobox-template-button"),0===this.__elementTemplateRoot.length&&(this.__elementTemplateRoot=this.__element.find(".tchmi-combobox-template-button")),this.__elementFocusBorder=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiCombobox-template-focus-border"),0===this.__elementFocusBorder.length&&(this.__elementFocusBorder=this.__elementTemplateRoot.find(".tchmi-combobox-template-focus-border")),this.__elementDropdown=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown"),0===this.__elementDropdown.length&&(this.__elementDropdown=this.__elementTemplateRoot.find(".tchmi-combobox-template-dropdown")),this.__elementDropdown[0].remove(),0===this.__elementTemplateRoot.length||0===this.__elementSelect.length||0===this.__elementText.length||0===this.__elementDropdownToggleButton.length||0===this.__elementFocusBorder.length||0===this.__elementDropdown.length)throw new Error("Invalid Template.html");super.__previnit()}__init(){super.__init();this.__elementSelect[0].addEventListener("mousedown",this.__onMousedown,{passive:!0,capture:!1}),this.__destroyOnDestroy.push(TcHmi.EventProvider.registerDomEvent(this.__elementDropdownToggleButton,"mousedown",this.__onMousedown))}__attach(){super.__attach(),this.__enumDataSymbol&&!this.__destroyEnumDataSymbolWatch&&(this.__destroyEnumDataSymbolWatch=this.__enumDataSymbol.watch(this.__onEnumDataSymbolWatch))}__detach(){super.__detach(),this.__destroyEnumDataSymbolWatch&&(this.__destroyEnumDataSymbolWatch(),this.__destroyEnumDataSymbolWatch=null)}destroy(){if(this.__keepAlive)return;this.__destroyEnumLocalizationWatch&&(this.__destroyEnumLocalizationWatch(),this.__destroyEnumLocalizationWatch=null),this.__destroyEnumDataSymbolWatch&&(this.__destroyEnumDataSymbolWatch(),this.__destroyEnumDataSymbolWatch=null),this.__enumDataSymbol&&(this.__enumDataSymbol.destroy(),this.__enumDataSymbol=null),this.__destroyEnumDataSymbolWrite?.(),this.__destroyEnumDataSymbolWrite=null;const passiveEventOptions={passive:!0,capture:!1};this.__elementSelect[0].removeEventListener("mousedown",this.__onMousedown,passiveEventOptions);for(const elem of this.__elementDropdown[0].children)elem.removeEventListener("click",this.__onItemClick,passiveEventOptions),elem.removeEventListener("mouseenter",this.__onMouseEnter,passiveEventOptions),elem.removeEventListener("mouseleave",this.__onMouseLeave,passiveEventOptions);for(const destroy of this.__textInputDestroyers)destroy();this.__textInputDestroyers=[],super.destroy()}__onMousedown(event){"mousedown"===event.type&&0!==event.button||this.__dropDownStyle===DropDownStyle.Mobile&&this.__allowTextInput&&event.target===this.__elementText[0]||this.__setDropDownboxOpen()}__onItemClick(event){const target=event.target.closest("[data-index]"),index=target?.dataset.index?parseInt(target.dataset.index,10):-1;this.__oldText=this.__text,this.__text="",this.__setSelectedIndex(index),this.__valueBuffer?.setValue(this.__text),TcHmi.EventProvider.raise(this.__id+".onUserInteractionFinished"),this.__setDropDownboxOpen(!1)}__onMouseEnter(event){this.__hoverComboboxItem(event.target,!0)}__onMouseLeave(event){this.__hoverComboboxItem(event.target,!1)}__onTouchstart(event){let changedTouches=Array.from(event.changedTouches).filter(touch=>touch.target===event.target);0!==changedTouches.length&&(this.__touches=this.__touches.concat(changedTouches.map(touch=>({id:touch.identifier,originalX:touch.clientX,originalY:touch.clientY,element:touch.target}))),changedTouches.forEach(touch=>this.__hoverComboboxItem(touch.target,!0)))}__hoverComboboxItem(element,hover){this.__isReadOnly||element.classList.contains("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-element")&&element.classList.contains("tchmi-combobox-template-dropdown-element")&&(hover?(element.classList.add("hover"),TcHmi.StyleProvider.processBackgroundColor(element,this.__dropDownHighlightColor),TcHmi.StyleProvider.processTextColor(element,this.__dropDownHighlightTextColor)):this.__touches.some(touch=>touch.element===element)||(element.classList.remove("hover"),TcHmi.StyleProvider.processBackgroundColor(element,this.__dropDownBackgroundColor),TcHmi.StyleProvider.processTextColor(element,this.__dropDownTextColor)))}__onKeydownTextbox(event){this.__allowTextInput&&(this.__triggerUIFinishedOnBlur=!0,"Escape"===event.key?(this.__setText(this.__oldText),this.__elementText.val(this.__oldText),this.__triggerUIFinishedOnBlur=!1,this.__autoFocusOut&&(this.__elementText[0].blur(),this.__dropDownboxOpen&&this.__setDropDownboxOpen(!1)),TcHmi.EventProvider.raise(this.__id+".onUserInteractionCanceled")):"Enter"===event.key&&(this.__triggerUIFinishedOnBlur=!1,this.__valueBuffer?.interactionFinished(),TcHmi.EventProvider.raise(this.__id+".onUserInteractionFinished"),this.__autoFocusOut&&(this.__elementText[0].blur(),this.__dropDownboxOpen&&this.__setDropDownboxOpen(!1)),event.preventDefault()))}__onInputTextbox(_event){if(this.__allowTextInput){this.__triggerUIFinishedOnBlur=!0;let text=this.__elementText[0].value;this.__ignoreEscapeSequences||(text=tchmi_encode_control_characters(text)),this.__valueBuffer?.setValue(text)}}__onPasteTextbox(_event){this.__allowTextInput&&(this.__triggerUIFinishedOnBlur=!0)}__onCutTextbox(_event){this.__allowTextInput&&(this.__triggerUIFinishedOnBlur=!0)}__onFocusInTextbox(event){if(!this.__allowTextInput)return;this.__triggerUIFinishedOnBlur=!0,this.__oldText=this.__text;this.__elementSelect[0].querySelectorAll("img.TcHmi_Controls_Beckhoff_TcHmiCombobox-dropdown-image").forEach(img=>img.remove()),""===this.__text&&this.__elementText.val(""),this.__elementFocusBorder[0].classList.add("tchmi-focus"),this.__autoSelectText&&(this.__elementText[0].setSelectionRange(0,0),this.__elementText[0].select()),TcHmi.EventProvider.raise(this.__id+".onFocusIn",event),this.__elementText[0]===document.activeElement&&this.__lock()}__onFocusOutTextbox(event){if(!this.__allowTextInput)return;if(this.__elementText[0].classList.contains("tchmi-keyboard-user-input"))return;let text=this.__elementText.val();this.__ignoreEscapeSequences||(text=tchmi_encode_control_characters(text));if(this.__elementSelect[0].querySelectorAll("img.TcHmi_Controls_Beckhoff_TcHmiCombobox-dropdown-image").forEach(img=>img.remove()),text===this.__oldText){let image;if(null!==this.__selectedIndex&&void 0!==this.__selectedIndex&&this.__selectedIndex>=0&&this.__selectedIndex=this.__data.length)&&(this.__elementText[0].textContent=comboboxText)}setTextHorizontalAlignment(valueNew){let convertedValue=TcHmi.ValueConverter.toHorizontalAlignment(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextHorizontalAlignment")),convertedValue!==this.__textHorizontalAlignment&&(this.__textHorizontalAlignment=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextHorizontalAlignment"}),this.__processTextHorizontalAlignment())}getTextHorizontalAlignment(){return this.__textHorizontalAlignment}__processTextHorizontalAlignment(){switch(this.__textHorizontalAlignment){case void 0:return;case"Left":this.__elementSelect[0].style.textAlign="left";break;case"Center":this.__elementSelect[0].style.textAlign="center";break;case"Right":this.__elementSelect[0].style.textAlign="right";break;default:this.__elementSelect[0].style.textAlign=""}}setContentPadding(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ContentPadding"));let resolverInfo=this.__objectResolvers.get("contentPadding");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("ContentPadding")?.type});this.__objectResolvers.set("contentPadding",{resolver,watchCallback:this.__onResolverForContentPaddingWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForContentPaddingWatchCallback)})}__onResolverForContentPaddingWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("contentPadding"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__contentPadding)||(this.__contentPadding=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ContentPadding"}),this.__processContentPadding()):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"ContentPadding"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getContentPadding(){return this.__contentPadding}__processContentPadding(){void 0!==this.__contentPadding&&TcHmi.StyleProvider.processContentPadding(this.__elementText,this.__contentPadding)}__processBackgroundColor(){void 0!==this.__background.color&&TcHmi.StyleProvider.processBackgroundColor(this.__elementSelect,this.__background.color)}setDropDownHighlightColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownHighlightColor"));let resolverInfo=this.__objectResolvers.get("dropDownHighlightColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("DropDownHighlightColor")?.type});this.__objectResolvers.set("dropDownHighlightColor",{resolver,watchCallback:this.__onResolverForDropDownHighlightColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForDropDownHighlightColorWatchCallback)})}__onResolverForDropDownHighlightColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("dropDownHighlightColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__dropDownHighlightColor)||(this.__dropDownHighlightColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownHighlightColor"}),this.__processDropDownHighlightColor()):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"DropDownHighlightColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getDropDownHighlightColor(){return this.__dropDownHighlightColor}__processDropDownHighlightColor(){}setDropDownHighlightTextColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownHighlightTextColor"));let resolverInfo=this.__objectResolvers.get("dropDownHighlightTextColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("DropDownHighlightTextColor")?.type});this.__objectResolvers.set("dropDownHighlightTextColor",{resolver,watchCallback:this.__onResolverForDropDownHighlightTextColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForDropDownHighlightTextColorWatchCallback)})}__onResolverForDropDownHighlightTextColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("dropDownHighlightTextColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__dropDownHighlightTextColor)||(this.__dropDownHighlightTextColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownHighlightTextColor"}),this.__processDropDownHighlightTextColor()):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"DropDownHighlightTextColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getDropDownHighlightTextColor(){return this.__dropDownHighlightTextColor}__processDropDownHighlightTextColor(){}setDropDownToggleButtonBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownToggleButtonBackgroundColor"));let resolverInfo=this.__objectResolvers.get("dropDownToggleButtonBackgroundColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("DropDownToggleButtonBackgroundColor")?.type});this.__objectResolvers.set("dropDownToggleButtonBackgroundColor",{resolver,watchCallback:this.__onResolverForDropDownToggleButtonBackgroundColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForDropDownToggleButtonBackgroundColorWatchCallback)})}__onResolverForDropDownToggleButtonBackgroundColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("dropDownToggleButtonBackgroundColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__dropDownToggleButtonBackgroundColor)||(this.__dropDownToggleButtonBackgroundColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownToggleButtonBackgroundColor"}),this.__processDropDownToggleButtonBackgroundColor()):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"DropDownToggleButtonBackgroundColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getDropDownToggleButtonBackgroundColor(){return this.__dropDownToggleButtonBackgroundColor}__processDropDownToggleButtonBackgroundColor(){TcHmi.StyleProvider.processBackgroundColor(this.__elementDropdownToggleButton,this.__dropDownToggleButtonBackgroundColor)}setDropDownToggleButtonArrowColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownToggleButtonArrowColor"));let resolverInfo=this.__objectResolvers.get("dropDownToggleButtonArrowColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("DropDownToggleButtonArrowColor")?.type});this.__objectResolvers.set("dropDownToggleButtonArrowColor",{resolver,watchCallback:this.__onResolverForDropDownToggleButtonArrowColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForDropDownToggleButtonArrowColorWatchCallback)})}__onResolverForDropDownToggleButtonArrowColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("dropDownToggleButtonArrowColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__dropDownToggleButtonArrowColor)||(this.__dropDownToggleButtonArrowColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownToggleButtonArrowColor"}),this.__processDropDownToggleButtonArrowColor()):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"DropDownToggleButtonArrowColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getDropDownToggleButtonArrowColor(){return this.__dropDownToggleButtonArrowColor}__processDropDownToggleButtonArrowColor(){TcHmi.StyleProvider.processStrokeColor(this.__elementTemplateRoot[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-button-arrow"),this.__dropDownToggleButtonArrowColor)}setTextColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextColor"));let resolverInfo=this.__objectResolvers.get("textColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("TextColor")?.type});this.__objectResolvers.set("textColor",{resolver,watchCallback:this.__onResolverForTextColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForTextColorWatchCallback)})}__onResolverForTextColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("textColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__textColor)||(this.__textColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextColor"}),this.__processTextColor()):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"TextColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTextColor(){return this.__textColor}__processTextColor(){void 0!==this.__textColor&&TcHmi.StyleProvider.processTextColor(this.__elementText,this.__textColor)}setTextFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontSize")),convertedValue!==this.__textFontSize&&(this.__textFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontSize"}),this.__processTextFontSize())}getTextFontSize(){return this.__textFontSize}__processTextFontSize(){void 0!==this.__textFontSize&&void 0!==this.__textFontSizeUnit&&TcHmi.StyleProvider.processFontSize(this.__elementSelect,this.__textFontSize,this.__textFontSizeUnit)}setTextFontSizeUnit(valueNew){let convertedValue=TcHmi.ValueConverter.toFontSizeUnit(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontSizeUnit")),convertedValue!==this.__textFontSizeUnit&&(this.__textFontSizeUnit=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontSizeUnit"}),this.__processTextFontSizeUnit())}getTextFontSizeUnit(){return this.__textFontSizeUnit}__processTextFontSizeUnit(){this.__processTextFontSize()}setTextFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontFamily")),convertedValue!==this.__textFontFamily&&(this.__textFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontFamily"}),this.__processTextFontFamily())}getTextFontFamily(){return this.__textFontFamily}__processTextFontFamily(){void 0!==this.__textFontFamily&&TcHmi.StyleProvider.processFontFamily(this.__elementSelect,this.__textFontFamily)}setTextFontStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toFontStyle(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontStyle")),convertedValue!==this.__textFontStyle&&(this.__textFontStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontStyle"}),this.__processTextFontStyle())}getTextFontStyle(){return this.__textFontStyle}__processTextFontStyle(){void 0!==this.__textFontStyle&&TcHmi.StyleProvider.processFontStyle(this.__elementSelect,this.__textFontStyle)}setTextFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontWeight")),convertedValue!==this.__textFontWeight&&(this.__textFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontWeight"}),this.__processTextFontWeight())}getTextFontWeight(){return this.__textFontWeight}__processTextFontWeight(){void 0!==this.__textFontWeight&&TcHmi.StyleProvider.processFontWeight(this.__elementSelect,this.__textFontWeight)}setAutoFocusOut(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("AutoFocusOut")),convertedValue!==this.__autoFocusOut&&(this.__autoFocusOut=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"AutoFocusOut"}))}getAutoFocusOut(){return this.__autoFocusOut}setAutoSelectText(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("AutoSelectText")),convertedValue!==this.__autoSelectText&&(this.__autoSelectText=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"AutoSelectText"}))}getAutoSelectText(){return this.__autoSelectText}setSrcData(valueNew){if(this.__enumDataSymbol)return void(void 0===this.__srcData&&(this.__srcData=null));let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SrcData"));let resolverInfo=this.__objectResolvers.get("srcData");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("SrcData")?.type});this.__objectResolvers.set("srcData",{resolver,watchCallback:this.__onResolverForSrcDataWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForSrcDataWatchCallback)})}__onResolverForSrcDataWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("srcData"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__srcData)||(this.__srcData=data.value||null,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SrcData"}),this.__processSrcData(!0)):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"SrcData"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getSrcData(){return this.__srcData}__processSrcData(forwardToEnumDataSymbol){if(this.__data=[],null===this.__srcData)return this.__processComboboxText(),void this.__fillDropdown();if(Array.isArray(this.__srcData)){let srcData=this.__srcData,ids=new Set;for(let i=0,ii=srcData.length;i=this.__data.length?this.__setSelectedIndex(null,forwardToEnumDataSymbol):this.__processSelectedIndex(forwardToEnumDataSymbol,!0);else if(null!==this.__selectedId&&void 0!==this.__selectedId){let index=this.__data.findIndex(item=>item.id===this.__selectedId);-1!==index&&this.__setSelectedIndex(index,forwardToEnumDataSymbol,!1)}this.__fillDropdown()}setEnumDataSymbol(valueNew){let newSymbol=valueNew;if(null===newSymbol){let symbolExpression=this.getAttributeDefaultValueInternal("EnumDataSymbol");symbolExpression&&(newSymbol=new TcHmi.Symbol(symbolExpression))}if(this.__enumDataSymbol!==newSymbol){if(this.__destroyEnumDataSymbolWatch&&(this.__destroyEnumDataSymbolWatch(),this.__destroyEnumDataSymbolWatch=null),this.__enumDataSymbol&&this.__enumDataSymbol.destroy(),newSymbol instanceof TcHmi.Symbol){this.__enumDataSymbol=newSymbol;let resolverInfo=this.__objectResolvers.get("srcData");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy(),this.__objectResolvers.delete("srcData")),this.__isAttached&&(this.__destroyEnumDataSymbolWatch=this.__enumDataSymbol.watch(this.__onEnumDataSymbolWatch))}else{let resetSrcData=!1;if(this.__enumDataSymbol&&this.__srcData&&(resetSrcData=!0),this.__enumDataSymbol=null,resetSrcData){let attrsSrcData=this.__attrs["data-tchmi-src-data"];attrsSrcData&&attrsSrcData.value?this.setSrcData(attrsSrcData.value):this.setSrcData(null)}}TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"EnumDataSymbol"}),this.__processEnumDataSymbol()}}getEnumDataSymbol(){return this.__enumDataSymbol}__processEnumDataSymbol(){this.__enumDataSymbol&&this.__enumDataSymbol.resolveSchema(data=>data.error!==TcHmi.Errors.NONE?(this.__enumDataSymbolSchema=null,void(data.details&&TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"EnumSymbol",Symbol:this.__enumDataSymbol?.getExpression().toString()},TcHmi.Log.buildMessage(data.details)))):(this.__enumDataSymbolExpressionResolved=data.expressionResolved,this.__enumDataSymbolSchema=data.schema,void this.__processEnumDataSymbolSchema(data.expression,data.expressionResolved)))}__processEnumDataSymbolSchema(expression,expressionResolved){if(!this.__enumDataSymbolSchema||!this.__enumDataSymbol)return;if(!this.__enumDataSymbolSchema.enum)return void TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"EnumSymbol",Symbol:expression.toString()},"Symbol is not a valid enumeration.");let schemaNamePrefixes=[],schemaBase=[];if(this.__enumDataSymbolSchema.id)schemaBase.push(this.__enumDataSymbolSchema.id);else if(this.__enumDataSymbolSchema.base)if(Array.isArray(this.__enumDataSymbolSchema.base))for(let baseName of this.__enumDataSymbolSchema.base)schemaBase.push(baseName);else schemaBase.push(this.__enumDataSymbolSchema.base);for(let id of schemaBase){let schemaSharpIndex=id.indexOf("#"),schemaSource=id.substr(6,schemaSharpIndex-6),schemaName=id.substr(schemaSharpIndex+14,id?.length-schemaSharpIndex+2);schemaNamePrefixes.push({simple:schemaName,full:schemaSource.toUpperCase()+"_"+schemaName})}let rawEnum=this.__enumDataSymbolSchema.enum,rawOptions=this.__enumDataSymbolSchema.options,prepEnum=[];for(let i=0,ii=rawEnum.length;i{let newSrcData=[];for(let i=0,ii=prepEnum.length;iviewportWidth&&this.__dropDownStyle===DropDownStyle.Mobile?viewportWidth:controlBCR.width;const style={top:controlBCR.top+controlBCR.height+"px",left:controlBCR.left+"px",right:null,"min-width":minWidth+"px","max-height":maxHeight+"px"};let dropdownHeight=dropdownBCR.height;void 0!==this.__maxListHeight&&null!==this.__maxListHeight&&this.__dropDownStyle===DropDownStyle.Classic&&this.__maxListHeightmaxHeight?(maxHeight=controlBCR.top,style.top=(controlBCR.top-dropdownHeight>0?controlBCR.top-dropdownHeight:0)+"px",void 0!==this.__maxListHeight&&null!==this.__maxListHeight&&this.__dropDownStyle===DropDownStyle.Classic&&this.__maxListHeight{this.__dropDownboxOpen=!1,this.__elementTemplateRoot[0].classList.remove("active"),this.__elementDropdown[0].classList.remove("active"),data.canceled&&TcHmi.EventProvider.raise(this.__id+".onUserInteractionCanceled"),null!==this.__resizedEventDestroyEvent&&(this.__resizedEventDestroyEvent(),this.__resizedEventDestroyEvent=null),null!==this.__movedEventDestroyEvent&&(this.__movedEventDestroyEvent(),this.__movedEventDestroyEvent=null);document.removeEventListener("click",this.__onDocumentClick,{passive:!0,capture:!0})}};if(this.__dropDownStyle===DropDownStyle.Classic){topMostLayerOptions.dimBackground=!1,topMostLayerOptions.modal=!1;const passiveEventOptions={passive:!0,capture:!0};document.addEventListener("click",this.__onDocumentClick,passiveEventOptions),this.__resizedEventDestroyEvent=TcHmi.EventProvider.register(this.__id+".onResized",this.__resizeDropDownboxCb),this.__movedEventDestroyEvent=TcHmi.EventProvider.register(this.__id+".onMoved",this.__resizeDropDownboxCb),TcHmi.TopMostLayer.add(this,this.__elementDropdown,topMostLayerOptions)}else this.__dropDownStyle===DropDownStyle.Mobile&&(topMostLayerOptions.centerHorizontal=!0,topMostLayerOptions.centerVertical=!0,TcHmi.TopMostLayer.add(this,this.__elementDropdown,topMostLayerOptions));this.__resizeDropDownboxCb()}else TcHmi.TopMostLayer.remove(this,this.__elementDropdown)}__fillDropdown(){if(void 0===this.__ignoreEscapeSequences||void 0===this.__srcData)return;let fragment=document.createDocumentFragment(),elementlist=[],categoryMap=new Map;for(const[i,dropdownEntry]of this.__data.entries()){let strText=dropdownEntry.text??"";this.__ignoreEscapeSequences||(strText=tchmi_decode_control_characters(strText));let element=document.createElement("div");element.classList.add("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-element","tchmi-box"),element.classList.add("tchmi-combobox-template-dropdown-element","tchmi-box"),i===this.__selectedIndex&&element.classList.add("selected"),element.setAttribute("data-index",i.toString());let elementText=document.createElement("span");if(elementText.setAttribute("class","TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-text tchmi-combobox-template-dropdown-text"),elementText.textContent=strText,dropdownEntry.image){const img=document.createElement("img");img.src=dropdownEntry.image,img.classList.add("TcHmi_Controls_Beckhoff_TcHmiCombobox-dropdown-image"),this.__imagePosition===ImagePosition.LeftOfText?(element.appendChild(img),element.appendChild(elementText)):(element.appendChild(elementText),element.appendChild(img))}else element.appendChild(elementText);elementlist.push(element);let category=categoryMap.get(dropdownEntry.category);category||(category=[],categoryMap.set(dropdownEntry.category,category)),category.push(element)}for(let[name,elements]of categoryMap.entries()){if(name){let category=document.createElement("div");category.classList.add("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),category.textContent=name,fragment.appendChild(category)}for(let element of elements)fragment.appendChild(element),name&&element.classList.add("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-element-in-category")}const passiveEventOptions={passive:!0,capture:!1};for(const elem of this.__elementDropdown[0].children)elem.removeEventListener("click",this.__onItemClick,passiveEventOptions),elem.removeEventListener("mouseenter",this.__onMouseEnter,passiveEventOptions),elem.removeEventListener("mouseleave",this.__onMouseLeave,passiveEventOptions);this.__elementDropdown.empty().append(fragment),this.__processDropDownTextColor(),this.__processDropDownBackgroundColor(),this.__processDropDownFontSize(),this.__processDropDownFontFamily(),this.__processDropDownFontWeight(),this.__processDropDownFontStyle(),this.__processDropDownHighlightColor(),this.__processDropDownHighlightTextColor(),this.__processDropDownHorizontalAlignment(),this.__processDropDownVerticalAlignment(),this.__processDataHeight(),this.__processDropDownCategoryTextColor(),this.__processDropDownCategoryBackgroundColor(),this.__processDropDownCategoryFontSize(),this.__processDropDownCategoryFontFamily(),this.__processDropDownCategoryFontWeight(),this.__processDropDownCategoryFontStyle(),this.__processDropDownCategoryHorizontalAlignment(),this.__processDropDownCategoryVerticalAlignment();for(const elm of elementlist)elm.addEventListener("click",this.__onItemClick,passiveEventOptions),elm.addEventListener("mouseenter",this.__onMouseEnter,passiveEventOptions),elm.addEventListener("mouseleave",this.__onMouseLeave,passiveEventOptions)}setDataHeight(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DataHeight")),convertedValue!==this.__dataHeight&&(this.__dataHeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DataHeight"}),this.__processDataHeight())}getDataHeight(){return this.__dataHeight}__processDataHeight(){this.__elementDropdown[0].style.setProperty("--tchmi-data-height",void 0===this.__dataHeight?"":this.__dataHeight+"px"),this.__elementSelect[0].style.setProperty("--tchmi-data-height",void 0===this.__dataHeight?"":this.__dataHeight+"px")}setDataHeightUnit(valueNew){}getDataHeightUnit(){return"px"}__processDataHeightUnit(){this.__processDataHeight()}setMaxListHeight(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("MaxListHeight")),convertedValue!==this.__maxListHeight&&(this.__maxListHeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MaxListHeight"}),this.__processMaxListHeight())}getMaxListHeight(){return this.__maxListHeight}__processMaxListHeight(){this.__resizeDropDownboxCb()}setMaxListHeightUnit(valueNew){}getMaxListHeightUnit(){return"px"}__processMaxListHeightUnit(){this.__processMaxListHeight()}setDropDownStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toEnum(valueNew,DropDownStyle)??TcHmi.ValueConverter.toEnum(this.getAttributeDefaultValueInternal("DropDownStyle"),DropDownStyle,DropDownStyle.Classic);convertedValue!==this.__dropDownStyle&&(this.__dropDownStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownStyle"}),this.__processDropDownStyle())}getDropDownStyle(){if(void 0!==this.__dropDownStyle)return DropDownStyle[this.__dropDownStyle]}__processDropDownStyle(){this.__dropDownStyle===DropDownStyle.Classic?this.__elementDropdown[0].classList.remove("drop-down-style-mobile"):this.__dropDownStyle===DropDownStyle.Mobile&&this.__elementDropdown[0].classList.add("drop-down-style-mobile"),this.__processMaxListHeight(),this.__dropDownboxOpen&&(this.__setDropDownboxOpen(!1),this.__setDropDownboxOpen(!0))}setImagePosition(valueNew){let convertedValue=TcHmi.ValueConverter.toEnum(valueNew,ImagePosition)??TcHmi.ValueConverter.toEnum(this.getAttributeDefaultValueInternal("ImagePosition"),ImagePosition,ImagePosition.LeftOfText);convertedValue!==this.__imagePosition&&(this.__imagePosition=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ImagePosition"}),this.__processImagePosition())}getImagePosition(){if(void 0!==this.__imagePosition)return ImagePosition[this.__imagePosition]}__processImagePosition(){this.__processSelectedIndex(!1,!1),this.__fillDropdown(),this.__processAllowTextInput()}getSelectedValue(){return null===this.__selectedIndex||void 0===this.__selectedIndex||this.__selectedIndex<0||this.__selectedIndex>=this.__data.length?null:tchmi_clone_object(this.__data[this.__selectedIndex].value)}getSelectedText(){return null===this.__selectedIndex||void 0===this.__selectedIndex||this.__selectedIndex<0||this.__selectedIndex>=this.__data.length?null:this.__data[this.__selectedIndex].text}getText(){return void 0===this.__text?void 0:this.__allowTextInput?this.__text:this.getSelectedText()}setSelectedIndex(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SelectedIndex")),null!==convertedValue&&convertedValue<0&&(convertedValue=null),this.__setSelectedIndex(convertedValue)}getSelectedIndex(){return this.__selectedIndex}__setSelectedIndex(valueNew,forwardToEnumDataSymbol=!0,forwardToSelectedId=!0){if(null===valueNew&&!this.__attributesInitialized&&null!==this.__selectedIndex&&void 0!==this.__selectedIndex)return;let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SelectedIndex")),null!==convertedValue&&convertedValue<0&&(convertedValue=null),convertedValue!==this.__selectedIndex&&(!this.__enumDataSymbol||this.__enumDataSymbol&&null!==convertedValue)&&(this.__selectedIndex=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedIndex"}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedValue"}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedText"}),this.__processSelectedIndex(forwardToEnumDataSymbol,forwardToSelectedId))}__processSelectedIndex(forwardToEnumDataSymbol,forwardToSelectedId){if(this.__elementDropdown.children().removeClass("selected"),null===this.__selectedIndex||void 0===this.__selectedIndex||this.__selectedIndex<0||this.__selectedIndex>=this.__data.length)!this.__enumDataSymbol||this.__enumDataSymbol&&(void 0===this.__enumDataSymbolCurrentValue||null===this.__enumDataSymbolCurrentValue)?(this.__processComboboxText(),forwardToSelectedId&&this.__setSelectedId(null,!1),TcHmi.EventProvider.raise(this.__id+".onSelectionChanged",{id:null,text:null,value:null})):this.__processEnumDataSymbolCurrentValue();else{forwardToSelectedId&&this.__setSelectedId(this.__data[this.__selectedIndex].id??null,!1);let selText=this.__data[this.__selectedIndex].text??"",image=this.__data[this.__selectedIndex].image;if(this.__allowTextInput){if(this.__locked&&!this.__isReadOnly)return;if(this.__oldText=selText,this.__text=selText,forwardToEnumDataSymbol&&this.__enumDataSymbol){this.__enumDataSymbolWriteLock=!0,this.__destroyEnumDataSymbolWrite?.(),this.__destroyEnumDataSymbolWrite=null;let syncCb=!1;const destroyWrite=this.__enumDataSymbol.write(this.__data[this.__selectedIndex].value,data=>{syncCb=!0,this.__enumDataSymbolWriteLock=!1,data.error===TcHmi.Errors.NONE||this.__isDestroyed||TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"EnumSymbol",Symbol:this.__enumDataSymbol?.getExpression().toString()},`Write failed with error: ${TcHmi.Log.buildMessage(data.details)}`)});!syncCb&&destroyWrite&&(this.__destroyEnumDataSymbolWrite=destroyWrite)}TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"Text"}),TcHmi.EventProvider.raise(this.__id+".onTextChanged",this.__text),this.__ignoreEscapeSequences||(selText=tchmi_decode_control_characters(selText)),this.__elementText.val(selText);const passiveEventOptions={passive:!0,capture:!1},activeEventOptions={passive:!1,capture:!1};this.__elementSelect[0].innerHTML="";const input=document.createElement("input");if(input.setAttribute("type","text"),input.setAttribute("class","TcHmi_Controls_Beckhoff_TcHmiCombobox-template-input tchmi-combobox-template-input"),input.setAttribute("spellcheck","false"),this.__comboboxText){let comboboxText=this.__comboboxText;this.__ignoreEscapeSequences||(comboboxText=tchmi_decode_control_characters(comboboxText,{newlineToSpace:!0})),input.setAttribute("placeholder",comboboxText)}input.value=selText,input.readOnly=this.__isReadOnly??!1;let imgElem=null;if(this.__showSelectedImage&&image){const img=document.createElement("img");img.src=image,img.classList.add("TcHmi_Controls_Beckhoff_TcHmiCombobox-dropdown-image"),imgElem=img}imgElem&&this.__imagePosition===ImagePosition.LeftOfText?(this.__elementSelect[0].appendChild(imgElem),this.__elementSelect[0].appendChild(input)):(this.__elementSelect[0].appendChild(input),imgElem&&this.__elementSelect[0].appendChild(imgElem)),this.__elementText=$(input),this.__elementSelect[0].removeEventListener("mousedown",this.__onMousedown,passiveEventOptions);for(const destroy of this.__textInputDestroyers)destroy();this.__textInputDestroyers=[],this.__textInputDestroyers.push(TcHmi.EventProvider.registerDomEvent(this.__elementTemplateRoot,"focusin",this.__onFocusInTextbox),TcHmi.EventProvider.registerDomEvent(this.__elementTemplateRoot,"focusout",this.__onFocusOutTextbox),TcHmi.EventProvider.registerDomEvent(this.__elementTemplateRoot,"indirectinputfinished",this.__onIndirectInputFinished),TcHmi.EventProvider.registerDomEvent(this.__elementTemplateRoot,"indirectinputcanceled",this.__onIndirectInputCanceled),TcHmi.EventProvider.registerDomEvent(input,"keydown",this.__onKeydownTextbox,activeEventOptions),TcHmi.EventProvider.registerDomEvent(input,"input",this.__onInputTextbox),TcHmi.EventProvider.registerDomEvent(input,"paste",this.__onPasteTextbox),TcHmi.EventProvider.registerDomEvent(input,"cut",this.__onCutTextbox)),this.__elementDropdown.children().eq(this.__selectedIndex).addClass("selected")}else{this.__ignoreEscapeSequences||(selText=tchmi_decode_control_characters(selText)),this.__elementSelect[0].innerHTML="";let elementSelectContent=document.createElement("span");elementSelectContent.setAttribute("class","TcHmi_Controls_Beckhoff_TcHmiCombobox-template-select-content tchmi-combobox-template-select-content"),elementSelectContent.textContent=selText;let imgElem=null;if(this.__showSelectedImage&&image){const img=document.createElement("img");img.src=image,img.classList.add("TcHmi_Controls_Beckhoff_TcHmiCombobox-dropdown-image"),imgElem=img}if(imgElem&&this.__imagePosition===ImagePosition.LeftOfText?(this.__elementSelect[0].appendChild(imgElem),this.__elementSelect[0].appendChild(elementSelectContent)):(this.__elementSelect[0].appendChild(elementSelectContent),imgElem&&this.__elementSelect[0].appendChild(imgElem)),this.__elementText=$(elementSelectContent),this.__elementDropdown.children().eq(this.__selectedIndex).addClass("selected"),forwardToEnumDataSymbol&&this.__enumDataSymbol){this.__enumDataSymbolWriteLock=!0,this.__destroyEnumDataSymbolWrite?.(),this.__destroyEnumDataSymbolWrite=null;let syncCb=!1;const destroyWrite=this.__enumDataSymbol.write(this.__data[this.__selectedIndex].value,data=>{syncCb=!0,this.__enumDataSymbolWriteLock=!1,data.error===TcHmi.Errors.NONE||this.__isDestroyed||TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"EnumSymbol",Symbol:this.__enumDataSymbol?.getExpression().toString()},`Write failed with error: ${TcHmi.Log.buildMessage(data.details)}`)});!syncCb&&destroyWrite&&(this.__destroyEnumDataSymbolWrite=destroyWrite)}this.__setText(selText)}this.__fillDropdown(),TcHmi.EventProvider.raise(this.__id+".onSelectionChanged",{id:this.__data[this.__selectedIndex].id,text:this.__data[this.__selectedIndex].text,value:tchmi_clone_object(this.__data[this.__selectedIndex].value)})}}setSelectedId(valueNew){this.__setSelectedId(valueNew)}__setSelectedId(valueNew,forwardToSelectedIndex=!0){if(null===valueNew&&!this.__attributesInitialized&&null!==this.__selectedId&&void 0!==this.__selectedId)return;let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SelectedId")),null!==convertedValue&&convertedValue<0&&(convertedValue=null),convertedValue!==this.__selectedId&&((!this.__enumDataSymbol||this.__enumDataSymbol&&null!==convertedValue)&&(this.__selectedId=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedId"})),this.__processSelectedId(forwardToSelectedIndex))}getSelectedId(){return this.__selectedId}__processSelectedId(forwardToSelectedIndex){if(null===this.__selectedId||void 0===this.__selectedId)forwardToSelectedIndex&&this.__setSelectedIndex(null,!0,!1);else{for(let i=0;i=0&&this.__selectedIndex=0&&this.__selectedIndex=0&&this.__selectedIndexthis.__setText(text)),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"InputProcessingPoint"}),this.__processInputProcessingPoint())}getInputProcessingPoint(){return this.__valueBuffer?.processingPoint}__processInputProcessingPoint(){}setSystemKeyboardInputMode(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SystemKeyboardInputMode")),convertedValue!==this.__systemKeyboardInputMode&&(this.__systemKeyboardInputMode=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SystemKeyboardInputMode"}),this.__processSystemKeyboardInputMode())}getSystemKeyboardInputMode(){return this.__systemKeyboardInputMode}__processSystemKeyboardInputMode(){this.__systemKeyboardInputMode&&this.__elementText[0].setAttribute("data-tchmi-input-mode",this.__systemKeyboardInputMode)}setIgnoreEscapeSequences(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("IgnoreEscapeSequences")),convertedValue!==this.__ignoreEscapeSequences&&(this.__ignoreEscapeSequences=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"IgnoreEscapeSequences"}),this.__processIgnoreEscapeSequences())}__processIgnoreEscapeSequences(){this.__fillDropdown(),this.__allowTextInput?this.__processText():null!==this.__selectedIndex&&void 0!==this.__selectedIndex&&this.__selectedIndex>=0&&this.__selectedIndex<=this.__data.length?this.__processSelectedIndex(!1,!1):this.__processComboboxText()}getIgnoreEscapeSequences(){return this.__ignoreEscapeSequences}setShowSelectedImage(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ShowSelectedImage")),convertedValue!==this.__showSelectedImage&&(this.__showSelectedImage=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowSelectedImage"}),this.__processShowSelectedImage())}getShowSelectedImage(){return this.__showSelectedImage}__processShowSelectedImage(){this.__processAllowTextInput()}__lock(){this.__locked=!0}__unlock(){this.__locked=!1}__processControlActivation(){if(this.__allowTextInput){const input=this.__elementText[0];TcHmi.Access.checkAccess(this,"operate")&&this.getIsEnabled()?input.disabled=!1:(this.__unlock(),input.blur(),input.disabled=!0)}}__processIsEnabled(){super.__processIsEnabled(),this.__allowTextInput&&this.__processControlActivation(),this.getIsEnabled()||this.__elementDropdown[0].parentElement&&TcHmi.TopMostLayer.remove(this,this.__elementDropdown)}__processAccessConfig(){super.__processAccessConfig(),this.__allowTextInput&&this.__processControlActivation()} /** * Sets the isReadOnly attribute and calls the associated process function (processIsReadOnly). * @preserve (Part of the public API) */setIsReadOnly(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("IsReadOnly")),convertedValue!==this.__isReadOnly&&(this.__isReadOnly=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"IsReadOnly"}),this.__processIsReadOnly())}getIsReadOnly(){return this.__isReadOnly}__processIsReadOnly(){this.__element[0].classList.toggle("read-only",this.__isReadOnly??!1);const input=this.__elementText[0];if(input instanceof HTMLInputElement&&(input.readOnly=this.__isReadOnly??!1,this.__isReadOnly&&this.__unlock()),this.__isReadOnly){const dropdownElements=this.__elementDropdown[0].querySelectorAll(".TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-element, .tchmi-combobox-template-dropdown-element");for(const dropdownElement of dropdownElements)dropdownElement.classList.remove("hover")}}setDropDownCategoryTextColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryTextColor"));let resolverInfo=this.__objectResolvers.get("dropDownCategoryTextColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("DropDownCategoryTextColor")?.type});this.__objectResolvers.set("dropDownCategoryTextColor",{resolver,watchCallback:this.__onResolverForDropDownCategoryTextColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForDropDownCategoryTextColorWatchCallback)})}__onResolverForDropDownCategoryTextColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("dropDownCategoryTextColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__dropDownCategoryTextColor)||(this.__dropDownCategoryTextColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryTextColor"}),this.__processDropDownCategoryTextColor()):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"DropDownCategoryTextColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getDropDownCategoryTextColor(){return this.__dropDownCategoryTextColor}__processDropDownCategoryTextColor(){void 0!==this.__dropDownCategoryTextColor&&TcHmi.StyleProvider.processTextColor(this.__elementDropdown[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),this.__dropDownCategoryTextColor)}setDropDownCategoryBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryBackgroundColor"));let resolverInfo=this.__objectResolvers.get("dropDownBackgroundColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("DropDownCategoryBackgroundColor")?.type});this.__objectResolvers.set("dropDownBackgroundColor",{resolver,watchCallback:this.__onResolverForDropDownCategoryBackgroundColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForDropDownCategoryBackgroundColorWatchCallback)})}__onResolverForDropDownCategoryBackgroundColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("dropDownCategoryBackgroundColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__dropDownCategoryBackgroundColor)||(this.__dropDownCategoryBackgroundColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryBackgroundColor"}),this.__processDropDownCategoryBackgroundColor()):TcHmi.Log.Controls.error(this,TcHmiCombobox.#tchmiFQN,{Attribute:"DropDownCategoryBackgroundColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getDropDownCategoryBackgroundColor(){return this.__dropDownCategoryBackgroundColor}__processDropDownCategoryBackgroundColor(){void 0!==this.__dropDownCategoryBackgroundColor&&TcHmi.StyleProvider.processBackgroundColor(this.__elementDropdown[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),this.__dropDownCategoryBackgroundColor)}setDropDownCategoryFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryFontSize")),convertedValue!==this.__dropDownCategoryFontSize&&(this.__dropDownCategoryFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryFontSize"}),this.__processDropDownCategoryFontSize())}getDropDownCategoryFontSize(){return this.__dropDownCategoryFontSize}__processDropDownCategoryFontSize(){void 0!==this.__dropDownCategoryFontSize&&void 0!==this.__dropDownCategoryFontSizeUnit&&TcHmi.StyleProvider.processFontSize(this.__elementDropdown[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),this.__dropDownCategoryFontSize,this.__dropDownCategoryFontSizeUnit)}setDropDownCategoryFontSizeUnit(valueNew){let convertedValue=TcHmi.ValueConverter.toFontSizeUnit(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryFontSizeUnit")),convertedValue!==this.__dropDownCategoryFontSizeUnit&&(this.__dropDownCategoryFontSizeUnit=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryFontSizeUnit"}),this.__processDropDownCategoryFontSizeUnit())}getDropDownCategoryFontSizeUnit(){return this.__dropDownCategoryFontSizeUnit}__processDropDownCategoryFontSizeUnit(){this.__processDropDownCategoryFontSize()}setDropDownCategoryFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryFontFamily")),convertedValue!==this.__dropDownCategoryFontFamily&&(this.__dropDownCategoryFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryFontFamily"}),this.__processDropDownCategoryFontFamily())}getDropDownCategoryFontFamily(){return this.__dropDownCategoryFontFamily}__processDropDownCategoryFontFamily(){void 0!==this.__dropDownCategoryFontFamily&&TcHmi.StyleProvider.processFontFamily(this.__elementDropdown[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),this.__dropDownCategoryFontFamily)}setDropDownCategoryFontStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toFontStyle(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryFontStyle")),convertedValue!==this.__dropDownCategoryFontStyle&&(this.__dropDownCategoryFontStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryFontStyle"}),this.__processDropDownCategoryFontStyle())}getDropDownCategoryFontStyle(){return this.__dropDownCategoryFontStyle}__processDropDownCategoryFontStyle(){void 0!==this.__dropDownCategoryFontStyle&&TcHmi.StyleProvider.processFontStyle(this.__elementDropdown[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),this.__dropDownCategoryFontStyle)}setDropDownCategoryFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryFontWeight")),convertedValue!==this.__dropDownCategoryFontWeight&&(this.__dropDownCategoryFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryFontWeight"}),this.__processDropDownCategoryFontWeight())}getDropDownCategoryFontWeight(){return this.__dropDownCategoryFontWeight}__processDropDownCategoryFontWeight(){void 0!==this.__dropDownCategoryFontWeight&&TcHmi.StyleProvider.processFontWeight(this.__elementDropdown[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),this.__dropDownCategoryFontWeight)}setDropDownCategoryHorizontalAlignment(valueNew){let convertedValue=TcHmi.ValueConverter.toHorizontalAlignment(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryHorizontalAlignment")),convertedValue!==this.__dropDownCategoryHorizontalAlignment&&(this.__dropDownCategoryHorizontalAlignment=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryHorizontalAlignment"}),this.__processDropDownCategoryHorizontalAlignment())}getDropDownCategoryHorizontalAlignment(){return this.__dropDownCategoryHorizontalAlignment}__processDropDownCategoryHorizontalAlignment(){void 0!==this.__dropDownCategoryHorizontalAlignment&&TcHmi.StyleProvider.processContentHorizontalAlignment(this.__elementDropdown[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),this.__dropDownCategoryHorizontalAlignment)}setDropDownCategoryVerticalAlignment(valueNew){let convertedValue=TcHmi.ValueConverter.toVerticalAlignment(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("DropDownCategoryVerticalAlignment")),convertedValue!==this.__dropDownCategoryVerticalAlignment&&(this.__dropDownCategoryVerticalAlignment=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"DropDownCategoryVerticalAlignment"}),this.__processDropDownCategoryVerticalAlignment())}getDropDownCategoryVerticalAlignment(){return this.__dropDownCategoryVerticalAlignment}__processDropDownCategoryVerticalAlignment(){void 0!==this.__dropDownCategoryVerticalAlignment&&TcHmi.StyleProvider.processContentVerticalAlignment(this.__elementDropdown[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiCombobox-template-dropdown-category"),this.__dropDownCategoryVerticalAlignment)}focus(){this.__allowTextInput&&this.__elementText[0].focus()}static DropDownStyle=DropDownStyle;static ImagePosition=ImagePosition}})();function isListItem(obj){return"object"==typeof obj&&null!==obj&&"text"in obj}TcHmi.Controls.registerEx("TcHmiCombobox","TcHmi.Controls.Beckhoff",TcHmiCombobox,{injectInGlobalObject:!0});export{TcHmiCombobox as Control};