var TcHmi;!function(TcHmi){!function(Controls){!function(System){class TcHmiHtmlHost extends TcHmi.Controls.System.TcHmiControl{constructor(element,pcElement,attrs){super(element,pcElement,attrs)}__previnit(){if(this.__elementTemplateRoot=this.__element.find(".TcHmi_Controls_System_TcHmiHtmlHost-template"),0===this.__elementTemplateRoot.length&&(this.__elementTemplateRoot=this.__element.find(".tchmi-html-host-template")),0===this.__elementTemplateRoot.length)throw new Error("Invalid Template.html");let pcElementClone=this.__pcElement.clone();pcElementClone.children("[data-tchmi-target-attribute]").remove();let markup=pcElementClone[0].innerHTML;if(TCHMI_DESIGNER){let rootUc=null,temp=this.getParent();for(;temp;){if(temp instanceof System.TcHmiUserControlHost){rootUc=temp;break}temp=temp.getParent()}if(rootUc){let purl=tchmi_path(rootUc.getElement()[0].getAttribute("data-tchmi-partial-url"));if(purl&&purl===tchmi_path(TCHMI_TARGET_PARTIAL)){let exprsPartialParam=new TcHmi.System.SymbolExpressionParser(markup).resolveExpressionsBySymbolType(TcHmi.SymbolType.PartialParam);if(exprsPartialParam)for(let i=0,ii=exprsPartialParam.length;i<ii;i++){let expr=exprsPartialParam[i];const content=expr.getContent();content&&(markup=markup.replace(new RegExp(tchmi_escape_regex(`${expr.toString()}`),"g"),`%pp%TCHMI_TARGET_DESIGNER_PARTIALPARAM::${content}%/pp%`))}}}}this.__elementTemplateRoot[0].appendChild(document.createRange().createContextualFragment(markup)),super.__previnit()}__init(){super.__init()}__attach(){super.__attach()}__detach(){super.__detach()}destroy(){this.__keepAlive||super.destroy()}setContent(value){this.__elementTemplateRoot.empty(),null!==value&&(this.__elementTemplateRoot[0].innerHTML=value)}getContent(){return this.__elementTemplateRoot[0].innerHTML}__getContentWidth(){if(!this.__elementTemplateRoot)return null;const baseContentWidth=super.__getContentWidth();if(null!==baseContentWidth)return baseContentWidth;const offsetWidth=this.__elementTemplateRoot[0].offsetWidth;return 0===offsetWidth?null:offsetWidth}__getContentHeight(){if(!this.__elementTemplateRoot)return null;const baseContentHeight=super.__getContentHeight();if(null!==baseContentHeight)return baseContentHeight;const offsetHeight=this.__elementTemplateRoot[0].offsetHeight;return 0===offsetHeight?null:offsetHeight}}System.TcHmiHtmlHost=TcHmiHtmlHost}(Controls.System||(Controls.System={}))}(TcHmi.Controls||(TcHmi.Controls={}))}(TcHmi||(TcHmi={})),TcHmi.Controls.registerEx("TcHmiHtmlHost","TcHmi.Controls.System",TcHmi.Controls.System.TcHmiHtmlHost);