Internal function to render the content of the dropdown div
@param {aria.templates.MarkupWriter} out Markup writer which should receive the content of the popup.
@protected
173663
function (out) {
            var cfg = this._cfg;

            var dm = this.controller.getDataModel();

            var calendarConf = {
                block : true,
                startDate : dm.jsDate,
                tabIndex : -1,
                label : cfg.calendarLabel,
                defaultTemplate : cfg.calendarTemplate,
                waiAria: cfg.waiAria,
                waiAriaDateFormat: cfg.waiAriaDateFormat,
                waiAriaLabel: cfg.waiAriaCalendarLabel,
                minValue : cfg.minValue,
                maxValue : cfg.maxValue,
                onclick : {
                    fn : this._clickOnDate,
                    scope : this
                },
                onkeydown : {
                    fn: this._calendar_onkeydown,
                    scope : this
                },
                onmousedown : {
                    fn: this._calendar_onmousedown,
                    scope: this
                },
                onfocus : {
                    fn: this._calendar_onfocus,
                    scope: this
                },
                onblur : {
                    fn: this._calendar_onblur,
                    scope: this
                },
                bind : {
                    "value" : {
                        to : "calendarValue",
                        inside : dm
                    }
                }
            };

            // maps property from datepicker configuration
            var propMapped = ['displayUnit', 'numberOfUnits', 'firstDayOfWeek', 'monthLabelFormat',
                    'dayOfWeekLabelFormat', 'dateLabelFormat', 'completeDateLabelFormat', 'showWeekNumbers',
                    'showShortcuts', 'restrainedNavigation', 'sclass'];
            for (var i = 0, property; property = propMapped[i]; i++) {
                this._applyCalendarCfg(property, calendarConf);
            }

            var calendar = new ariaWidgetsCalendarCalendar(calendarConf, this._context, this._lineNumber);
            calendar.$on({
                'widgetContentReady' : this._refreshPopup,
                scope : this
            });
            this.controller.setCalendar(calendar);
            out.registerBehavior(calendar);
            calendar.writeMarkup(out);
        }
1068643
function render(event) {
    var tooltip = document.createElement('div')
      , element = $(event.element)
      , pos = element.get('data-placement')
      , offset = this.offset(event.element)
      , placement;

    //
    // Create the tooltip with the proper content and insert.
    //
    tooltip.id = "tooltip";
    tooltip.innerHTML = element.get('data-content');
    tooltip.className = ['animated', 'tooltip', 'fadeIn', pos].concat(
      element.get('data-color')
    ).filter(Boolean).join(' ');

    document.body.appendChild(tooltip);

    //
    // Update the position of the tooltip.
    //
    placement = this.placement(pos, tooltip, event.element);
    tooltip.setAttribute('style', [
      'left:' + (offset.left + placement.left) + 'px',
      'top:' + (offset.top + placement.top) + 'px'
    ].join(';'));
  }
769874
function render(element, opts) {
    opts = opts || {};

    var prepend = opts.prepend;
    var model = opts.model || {};
    var indentLevel = opts.indentLevel || 0;
    var isPretty = opts.isPretty;
    var jtPrintIndent = isPretty ? '\t' : '';
    var jtPrintNewline = isPretty ? '\n' : '';
    var indent = '', i, len, prop;
    var p = [];  // p is going to be our concatenator for the HTML string

    // if no element, then no HTML so return empty string
    if (!element) { return ''; }

    // if already a string, just return it
    if (utils.isString(element)) { return element; }

    // if an array, wrap it
    if (utils.isArray(element)) { element = naked(element, null); }

    // set the indentation level to the current indent
    if (isPretty && indentLevel) {
        for (i = 0; i < indentLevel; i++) {
            indent += jtPrintIndent;
        }
    }

    // if we are prepending some string, add it first
    if (prepend) {
        p.push(indent, prepend, jtPrintNewline);
    }

    // starting tag open
    if (element.tag) {
        p.push(indent, '<', element.tag);
    }

    // all tag attributes
    if (element.attributes) {
        for (prop in element.attributes) {
            if (element.attributes.hasOwnProperty(prop)) {

                if (element.attributes[prop] === null) {
                    p.push(' ', prop);
                }
                else {
                    p.push(' ', prop, '="', element.attributes[prop], '"');
                }
            }
        }
    }

    // if no children or text, then close the tag
    if (element.tag && !element.children && (element.text === undefined || element.text === null)) {

        // for self closing we just close it, else we add the end tag
        if (selfClosing.indexOf(element.tag) > -1) {
            p.push('/>', jtPrintNewline);
        }
        else {
            p.push('></', element.tag, '>', jtPrintNewline);
        }
    }
    // else we need to add children or the inner text
    else {

        // if a tag (i.e. not just a string literal) put end bracket
        if (element.tag) { p.push('>'); }

        // if children, we will need to recurse
        if (element.children) {
            if (element.tag) { p.push(jtPrintNewline); }

            // recurse down for each child
            for (i = 0, len = element.children.length; i < len; ++i) {
                p.push(render(element.children[i], {
                    indentLevel:    element.tag ? indentLevel + 1 : indentLevel,
                    isPretty:       isPretty,
                    model:          model
                }));
            }

            if (element.tag) { p.push(indent); }
        }

        // if text, simply add it
        if (element.text !== null && element.text !== undefined) { p.push(element.text); }

        // finally if a tag, add close tag
        if (element.tag) {
            p.push('</', element.tag, '>', jtPrintNewline);
        }
    }

    return p.join('');
}
1178804
function (out) {
            var waiAria = this._cfg.waiAria;
            if (waiAria) {
                var content = ['<span tabindex="', this._calculateTabIndex(), '" class="xTabPanelZone"'];
                var labelId = this._getLabelId();
                if (labelId) {
                    content.push(' aria-labelledby="', ariaUtilsString.escapeForHTML(labelId), '"');
                }
                content.push('></span>');
                out.write(content.join(""));
            }
            this._frame.writeMarkupBegin(out);
            out.beginSection({
                id : this._getSectionId(),
                macro : this._cfg.macro
            });
            out.endSection();
            this._frame.writeMarkupEnd(out);
        }
96183
function (out) {

                var cfg = this._cfg, cssPrefix = this._cssPrefix;

                var sizeInfo = {
                    style : '',
                    className : 'xFrameContent ' + cssPrefix + 'c ' + cfg.cssClass
                };

                this._appendInnerSizeInfo(sizeInfo);

                out.write(['<span class="xFixedHeightFrame_w ', cssPrefix, 'w">'].join(''));
                var hasBorder = this._hasBorder(this._cfg.stateObject.skipLeftBorder, this._cfg.iconsLeft);
                out.write(['<span  ', hasBorder ? '' : 'style="display:none;"', ' class="xFixedHeightFrame_bme ',
                        cssPrefix, 'b ', cssPrefix, 'bkgA"></span>'].join(''));
                this._writeExtraMarkupBegin(out);
                out.write(['<span class="xFixedHeightFrame_bme ', cssPrefix, 'm ', cssPrefix, 'bkgB" >',
                        '<span style="', sizeInfo.style, '" class="', sizeInfo.className, '">'].join(''));
            }
702001
function (out) {
            var cfg = this._cfg, cssPrefix = this._cssPrefix; // sclass = cfg.sclass
            out.write(['</span></td>', '<td class="', cssPrefix, 'rs ', cssPrefix, 'bkgC"></td>', '</tr>', '<tr>',
                    '<td class="', cssPrefix, 'blc ', cssPrefix, 'bkgA"></td>', '<td class="', cssPrefix, 'bs ',
                    cssPrefix, 'bkgB">', this.__addFrameIcon(cfg, cssPrefix, 'bottom'), '</td>', '<td class="',
                    cssPrefix, 'brc ', cssPrefix, 'bkgA"></td>', '</tr>', '</tbody></table>'].join(''));

        }
64454
function (out) {
            var tplParam = out.templateParam;
            out.writeln("module.exports = Aria.classDefinition({");
            out.increaseIndent();
            out.writeln("$classpath: ", out.stringify(tplParam.$classpath), ",");
            if (out.parentClasspath) {
                out.writeln("$extends: require(", out.stringify(Aria.getLogicalPath(out.parentClasspath, Aria.ACCEPTED_TYPES[out.parentClassType])), "),");
            }
        }
1026738
function () {
            this.$TextInput._reactToChange.apply(this, arguments);
            var cfg = this._cfg;
            var dropDownIcon = this._getDropdownIcon();
            if (cfg.waiAria && dropDownIcon) {
                if (cfg.disabled) {
                    dropDownIcon.setAttribute("aria-hidden", "true");
                    dropDownIcon.removeAttribute("tabindex");
                } else {
                    dropDownIcon.removeAttribute("aria-hidden");
                    var tabIndex = cfg.tabIndex != null ? this._calculateTabIndex() : "0";
                    dropDownIcon.setAttribute("tabindex", tabIndex);
                }
            }
        }
268126
function (out) {
            var skinObj = this._skinObj, cfg = this._cfg;
            out.write(['<div class="x', this._skinnableClass, '_', cfg.sclass, '" style="float:left;position:relative',
                    skinObj.border ? ';border:' + skinObj.border : '',
                    skinObj.borderPadding ? ';padding:' + skinObj.borderPadding + 'px' : '', ';height:',
                    skinObj.sprHeight, 'px;width:', cfg.gaugeWidth, 'px;">'].join(""));
        }
146442
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WPopup popup = (WPopup) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int width = popup.getWidth();
		int height = popup.getHeight();
		String targetWindow = popup.getTargetWindow();

		xml.appendTagOpen("ui:popup");
		xml.appendUrlAttribute("url", popup.getUrl());
		xml.appendOptionalAttribute("width", width > 0, width);
		xml.appendOptionalAttribute("height", height > 0, height);
		xml.appendOptionalAttribute("resizable", popup.isResizable(), "true");
		xml.appendOptionalAttribute("showScrollbars", popup.isScrollable(), "true");
		xml.appendOptionalAttribute("targetWindow", !Util.empty(targetWindow), targetWindow);
		xml.appendClose();
		xml.appendEndTag("ui:popup");
	}
1070251
function output(string) {
    var element = document.createElement("div")
    element.innerHTML = string
    outputElement.appendChild(element)
}
35819
function() {
        var select = this.element,
            options = this.options,
            buildOption = this._buildOption.bind(this),
            renderTemplate = this.render.bind(this),
            dropdown = renderTemplate(options.optionsTemplate).attr('role', 'listbox').aria('multiselectable', this.multiple),
            list = $('<ul/>'),
            index = 0,
            self = this;

        // Must be set for `_buildOption()`
        this.dropdown = dropdown;

        select.children().each(function() {
            var optgroup = $(this);

            if (optgroup.prop('tagName').toLowerCase() === 'optgroup') {
                if (index === 0) {
                    options.hideFirst = false;
                }

                list.append(
                    renderTemplate(options.headingTemplate).text(optgroup.attr('label'))
                );

                optgroup.children().each(function() {
                    var option = $(this);

                    if (optgroup.prop('disabled')) {
                        option.prop('disabled', true);
                    }

                    if (option.prop('selected')) {
                        self.index = index;
                    }

                    list.append( buildOption(option, index) );
                    index++;
                });
            } else {
                if (optgroup.prop('selected')) {
                    self.index = index;
                }

                list.append( buildOption(optgroup, index) );
                index++;
            }
        });

        if (options.hideSelected && !options.multiple) {
            dropdown.addClass('hide-selected');
        }

        if (options.hideFirst) {
            dropdown.addClass('hide-first');
        }

        if (this.multiple) {
            dropdown.addClass('is-multiple');
        }

        this.wrapper.append(dropdown.append(list));

        return dropdown;
    }
403090
function render(code, data) {
  var js = '```js' + code + '```'
  return `<div class="vomit-snippet"><div class="column">${marked(js)}</div><div class="column"><script>
(function() {${code}document.currentScript.parentElement.appendChild(component(${JSON.stringify(data.data)}))
})()</script></div></div>`
}
54317
function (out) {
            var tplParam = out.templateParam;
            var res = tplParam.$res;
            if (res) {
                out.writeln("$resources: {");
                out.increaseIndent();
                var first = true;
                for (var key in res) {
                    if (res.hasOwnProperty(key)) {
                        out.writeln(first ? "" : ",", out.stringify(key), ": ", this._getResourceDependency(out, res[key]));
                        first = false;
                    }
                }
                out.decreaseIndent();
                out.writeln("},");
            }
            var css = tplParam.$css;
            if (css && css.length) {
                out.writeln("$css: [");
                out.increaseIndent();
                for (var i = 0, l = css.length; i < l; i++) {
                    out.writeln("require(", out.stringify(Aria.getLogicalPath(css[i], ".tpl.css")), (i == l - 1
                            ? ")"
                            : "),"));
                }
                out.decreaseIndent();
                out.writeln("],");
            }
            var texts = tplParam.$texts;
            if (texts) {
                out.writeln("$texts: {");
                out.increaseIndent();
                var first = true;
                for (var key in texts) {
                    if (texts.hasOwnProperty(key)) {
                        out.writeln(first ? "" : ",", out.stringify(key), ": require(", out.stringify(Aria.getLogicalPath(texts[key], ".tpl.txt"))
                                + ")");
                        first = false;
                    }
                }
                out.decreaseIndent();
                out.writeln("},");
            }
        }
175996
function (out) {
            out.write("<div class=\"" + this.CSS_CLASS + "\">");

            if (this._cfg.contentMacro) {
                out.callMacro(this._cfg.contentMacro);
            }

            out.write("</div>");
        }
984503
function (out) {
            var cfg = this._cfg, hts = this._helpTextSet, htc = this._skinObj.helpText, color = this._getTextFieldColor();
            var stringUtils = ariaUtilsString;

            // check value to set appropriate state and text
            var text = this._getText();
            var className = "xTextInputInput x" + this._skinnableClass + "_" + cfg.sclass + "_input";
            if (hts) {
                // FIXME : re-activate helpText in password field in IE
                if (this._isIE7OrLess && this._isPassword) {
                    this._helpTextSet = hts = false;
                    cfg.helptext = null;
                } else {
                    color = htc.color;
                }
                className += " x" + this._skinnableClass + "_" + cfg.sclass + "_helpText";
            }
            var type = this._isPassword && !hts ? "password" : "text";

            var inputWidth = this._computeInputWidth();
            if (inputWidth < 0) {
                inputWidth = 0;
            }
            var spellCheck = "";
            if (cfg.spellCheck != null) {
                // if spellCheck is specified in the config, include the
                // corresponding attribute in the HTML
                spellCheck = ' spellcheck="' + (cfg.spellCheck ? "true" : "false") + '"';
            }
            var autocomplete = "";
            if (cfg.autocomplete) {
                autocomplete = ' autocomplete="' + stringUtils.escapeHTML(cfg.autocomplete) + '"';
            }
            var name = "";
            if (cfg.name) {
                name = ' name="' + stringUtils.escapeHTML(cfg.name) + '"';
            }

            var ariaRequired = (cfg.waiAria && cfg.mandatory) ? ' aria-required="true"' : '';

            if (this._isTextarea) {
                out.write(['<textarea class="', className, '"', Aria.testMode ? ' id="' + this._domId + '_textarea"' : '',
                        cfg.disabled ? ' disabled="disabled"' : this.isTextInputReadOnly() ? ' readonly="readonly"' : '',
                        ariaRequired, ' type="', type, '" style="color:', color,
                        ';overflow:auto;resize:none;height: ' + this._frame.innerHeight + 'px; width:', inputWidth,
                        'px;"', 'value=""', (cfg.maxlength > -1 ? 'maxlength="' + cfg.maxlength + '" ' : ' '),
                        (cfg.tabIndex != null ? 'tabindex="' + this._calculateTabIndex() + '" ' : ' '), spellCheck,
                        autocomplete, name, this._getAriaLabelMarkup(), this._extraInputAttributes, '>',
                        stringUtils.escapeHTML(((this._helpTextSet) ? cfg.helptext : text) || ""), '</textarea>'

                ].join(''));
            } else {
                out.write(['<input class="', className, '"', Aria.testMode ? ' id="' + this._domId + '_input"' : '',
                        cfg.disabled ? ' disabled="disabled"' : this.isTextInputReadOnly() ? ' readonly="readonly"' : '',
                        ariaRequired, ' type="', type, '" style="color:', color, ';width:',
                        inputWidth, 'px;"', 'value="',
                        stringUtils.encodeForQuotedHTMLAttribute((this._helpTextSet) ? cfg.helptext : text), '" ',
                        (cfg.maxlength > -1 ? 'maxlength="' + cfg.maxlength + '" ' : ' '),
                        (cfg.tabIndex != null ? 'tabindex="' + this._calculateTabIndex() + '" ' : ' '), spellCheck,
                        autocomplete, name, this._getAriaLabelMarkup(), this._extraInputAttributes, ' _ariaInput="1"/>'
                // the _ariaInput attribute is present so that pressing
                // ENTER on this widget raises the onSubmit event of
                // the fieldset:
                ].join(''));
            }

        }
558429
function (out) {
            var cfg = this._cfg, cssPrefix = this._cssPrefix; // , state = cfg.stateObject;
            var frameContainerClass = (cfg.block !== true) ? ' ' : 'class="xBlock"';
            var sizeInfo = {
                style : '',
                /*
                 * TODO: the CSS class cssClass should not define any padding, margin or border for the frame to be
                 * correctly displayed
                 */
                className : 'xFrameContent ' + cssPrefix + 'c ' + cfg.cssClass
            };
            this._appendInnerSizeInfo(sizeInfo);
            var displayInline = "";

            if (this._inlineBlock) {
                displayInline = "vertical-align: middle;display: inline";
                displayInline += (ariaCoreBrowser.isIE7) ? ";zoom:1" : "-block;";
            }

            out.write(['<table cellspacing="0" cellpadding="0" style="position: relative;' + displayInline + '"',
                    frameContainerClass, '><tbody isFrame="1">', '<tr>', '<td class="', cssPrefix, 'tlc ', cssPrefix,
                    'bkgA"></td>', '<td class="', cssPrefix, 'ts ', cssPrefix,
                    'bkgB">' + this.__addFrameIcon(cfg, cssPrefix, 'top') + '</td>', '<td class="', cssPrefix, 'trc ',
                    cssPrefix, 'bkgA"></td>', '</tr>', '<tr>', '<td class="', cssPrefix, 'ls ', cssPrefix,
                    'bkgC"></td>', '<td class="', cssPrefix, 'm">', '<span ',
                    Aria.testMode && this._baseId ? ' id="' + this._baseId + '"' : '',
                    (sizeInfo.style ? 'style="' + sizeInfo.style + '"' : ''), ' class="', sizeInfo.className, '">'].join(''));
        }