var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,e,a){c!=Array.prototype&&c!=Object.prototype&&(c[e]=a.value)};$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(c){return $jscomp.SYMBOL_PREFIX+(c||"")+$jscomp.symbolCounter_++}; $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var c=$jscomp.global.Symbol.iterator;c||(c=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[c]&&$jscomp.defineProperty(Array.prototype,c,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(c){var e=0;return $jscomp.iteratorPrototype(function(){return e":a?"<"+b+" "+d+">":""},render_tag:function(a,b,d){a=this.tag(a,b,d);this.add_html(a);return this},field_label:function(a){var b=this.get_option("label_tag");var d=void 0===a._attributes.label_position?this.get_option("label_position"):a._attributes.label_position;var c=this.get_option("label_attributes"),c=this.render_template_tags(c,a.attributes), c=this._array_to_html_attribute(c);a=this.tag(!0,b,c)+a._attributes.label+this.tag(!1,b);return{position:d,html:a}},field_help_text:function(a){var b=this.get_option("help_text_tag"),d=this.get_option("help_text_position"),c=this.get_option("help_text_attributes"),c=this.render_template_tags(c,a.attributes),c=this._array_to_html_attribute(c);a=this.tag(!0,b,c)+a._attributes.help_text+this.tag(!1,b);return{position:d,html:a}},field_wrap:function(a,b){void 0===b&&(b="wrap");var d=this.get_option(b+ "_attributes"),d=this.render_template_tags(d,a.attributes),d=this._array_to_html_attribute(d);return{tag:this.get_option(b+"_tag"),html:d}},form_start:function(a){void 0===a&&(a=this.CURRENT_PARAM);a=this.field_attributes("form",a);this.render_tag(!0,"form",a.attribute_html);return this},form_end:function(){this.render_tag(!1,"form","")},fieldset_start:function(a){void 0===a&&(a=this.CURRENT_PARAM);a=this.field_attributes("fieldset",a);this.render_tag(!0,"fieldset",a.attribute_html);void 0!==a._attributes.label&& (this.render_tag(!0,"legend",""),this.add_html(a._attributes.label),this.render_tag(!1,"legend"));return this},fieldset_end:function(){this.render_tag(!1,"fieldset","")},form_field:function(a,b,d){var c,f,e,g,h=JSON.parse(JSON.stringify(d));d=c=f=e=g="";var l=this.field_wrap(h),p=l.html,l=l.tag;if(void 0!==h._attributes.label){var k=this.field_label(h);"before"==k.position&&(g=k.html);"after"==k.position&&(e=k.html)}void 0!==h._attributes.help_text&&(k=this.field_help_text(h),"before"==k.position&& (f=k.html),"after"==k.position&&(c=k.html));1==a||"inline"==a?(this.add_html(this.tag(!0,l,p)),1==a?(d=g+f+this.tag(!0,b,h.attribute_html),void 0!==h._attributes.value&&(d+=h._attributes.value),d+=this.tag(!1,b,h.attribute_html)+c+e):"inline"==a&&(d=g+f+this.tag(!0,b,h.attribute_html)+c+e),this.add_html(d),this.add_html(this.tag(!1,l))):this.add_html(this.tag(a,l));return this},_option:function(a,b){return""},_options:function(a,b,d){var c="",f;for(f in a)if("string"== typeof a[f]){b.value=a[f];d==f?b.selected=!0:delete b.selected;var e=this.field_attributes("option",b);c+=this._option(e.attribute_html,a[f])}else if("object"==typeof a[f])if(void 0!==a[f].group_name){var g=a[f].options;e=' label="'+(void 0!==a[f].group_name?a[f].group_name:"")+'" ';void 0!==a[f].disabled&&a[f].disabled&&(e+=" disabled");c+=this.tag(!0,"optgroup",e)+this._options(g,b,d)+this.tag(!1,"optgroup")}else g="",void 0!==a[f].value&&(g=a[f].value),d==f?a[f].selected=!0:delete a[f].selected, e=JSON.parse(JSON.stringify(b)),e=this._merge_array(e,a[f]),e.value=f,e=this.field_attributes("option",e),c+=this._option(e.attribute_html,g);return c},check_radio:function(a,b){void 0===b&&(b=this.CURRENT_PARAM);var d=this.field_attributes("wrap",b),c=this.field_wrap(d,"parent_wrap"),d=c.html,c=c.tag,e="",n="";this.render_tag(!0,c,d);void 0!==b.label&&(d=this.field_label(this.field_attributes("label",b)),"before"==d.position?e=d.html:n=d.html);this.add_html(e);d=b.options;delete b.options;b.type= a;for(var g in d)b.value=g,b.label=d[g],void 0!==b.option_label_position&&(b.label_position=b.option_label_position),e=this.field_attributes(a,b),this.form_field("inline","input",e);this.add_html(n);this.render_tag(!1,c);return this},input_field:function(a,b){void 0===b&&(b=this.CURRENT_PARAM);b.type=a;a=this.field_attributes(a,b);this.form_field("inline","input",a);return this},textarea:function(a){void 0===a&&(a=this.CURRENT_PARAM);a=this.field_attributes("textarea",a);this.form_field(!0,"textarea", a);return this},text:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("text",a)},password:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("password",a)},search:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("search",a)},email:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("email",a)},url:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("url",a)},tel:function(a){void 0===a&&(a=this.CURRENT_PARAM); return this.input_field("tel",a)},number:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("number",a)},range:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("range",a)},date:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("date",a)},month:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("month",a)},week:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("week",a)},time:function(a){void 0=== a&&(a=this.CURRENT_PARAM);return this.input_field("time",a)},datetime:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("datetime",a)},datetime_local:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("datetime-local",a)},color:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("color",a)},file:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.input_field("file",a)},radio:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.check_radio("radio", a)},checkbox:function(a){void 0===a&&(a=this.CURRENT_PARAM);return this.check_radio("checkbox",a)},select:function(a){void 0===a&&(a=this.CURRENT_PARAM);var b=JSON.parse(JSON.stringify(a.options));delete a.options;var c=JSON.parse(JSON.stringify(a)),b=this._options(b,c,void 0!==a.selected?a.selected:"");a.value=b;a=this.field_attributes("select",a);this.form_field(!0,"select",a);return this}}})(window);