/* Compiled from: rsx/app/frontend/contacts/edit/form/client_selector_input.jqhtml */ (function() { 'use strict'; const template_Client_Selector_Input = { _jqhtml_version: '2.2.185', name: 'Client_Selector_Input', tag: 'div', defaultAttributes: {"class": "Widget"}, extends: 'Ajax_Select_Input', render: function render(data, args, content, jqhtml) { let _output = []; const _cid = this._cid; const that = this; _output.push(" ");_output.push({tag: ["select", Object.assign({}, {"id": "input" + ":" + this._cid, "data-id": "input"}, ((this.args.disabled)) ? {"disabled": "true"} : {}), false]}); _output.push(" "); if (!this.data.select_values || this.data.select_values.length === 0) { _output.push(" ");_output.push({tag: ["option", {"value": ""}, false]}); (() => { const result = this.args.placeholder || 'Please wait...' ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push(""); _output.push(" "); } else { _output.push(" "); if (this.args.placeholder) { _output.push(" ");_output.push({tag: ["option", {"value": ""}, false]}); (() => { const result = this.args.placeholder ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push(""); _output.push(" "); } _output.push(" "); for (let opt of this.data.select_values) { _output.push(" "); if (typeof opt === 'object') { _output.push(" ");_output.push({tag: ["option", Object.assign({}, {"value": (opt.value)}, ((this.data.value == opt.value)) ? {"selected": "true"} : {}), false]}); (() => { const result = opt.label ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push(""); _output.push(" "); } else { _output.push(" ");_output.push({tag: ["option", Object.assign({}, {"value": (opt)}, ((this.data.value == opt)) ? {"selected": "true"} : {}), false]}); (() => { const result = opt ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push(""); _output.push(" "); } _output.push(" "); } _output.push(" "); } _output.push(" "); _output.push(""); return [_output, this]; }, dependencies: [] }; // Self-register with jqhtml runtime // Must use window.jqhtml since we're in bundle scope if (!window.jqhtml) { throw new Error('FATAL: window.jqhtml is not defined. The jqhtml runtime must be loaded before registering templates.'); } // Auto-register following standard jqhtml pattern window.jqhtml.register_template(template_Client_Selector_Input); })(); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsaWVudF9zZWxlY3Rvcl9pbnB1dC5qcWh0bWwiXSwic291cmNlc0NvbnRlbnQiOlsiPCEtLVxuQ2xpZW50X1NlbGVjdG9yX0lucHV0XG5cblNwZWNpYWxpemVkIHNlbGVjdCBmb3IgY2xpZW50IGRyb3Bkb3ducyB3aXRoIEFqYXggbG9hZGluZy5cbkV4dGVuZHMgQWpheF9TZWxlY3RfSW5wdXQgd2l0aCBjbGllbnQtc3BlY2lmaWMgYmVoYXZpb3IuXG5cbiRkYXRhIC0gQWpheCBlbmRwb2ludCBmb3IgY2xpZW50IGRhdGEgKG9wdGlvbmFsLCBkZWZhdWx0cyB0byBGcm9udGVuZF9Db250YWN0c19Db250cm9sbGVyLmdldF9jbGllbnRzKCkpXG4kcGxhY2Vob2xkZXIgLSBQbGFjZWhvbGRlciB0ZXh0IChkZWZhdWx0OiBcIlNlbGVjdCBDbGllbnQuLi5cIilcbiRkaXNhYmxlZCAtIEJvb2xlYW4gdG8gZGlzYWJsZSB0aGUgc2VsZWN0XG5cbkZlYXR1cmVzOlxuLSBMb2FkcyBjbGllbnQgbGlzdCB2aWEgQWpheCBhdXRvbWF0aWNhbGx5XG4tIEluaGVyaXRzIGFsbCBBamF4X1NlbGVjdF9JbnB1dCBiZWhhdmlvciAoVG9tIFNlbGVjdCwgc2VhcmNoLCBsb2FkaW5nIHN0YXRlcywgZXRjLilcbi0tPlxuPERlZmluZTpDbGllbnRfU2VsZWN0b3JfSW5wdXQgZXh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