Appends slider template to a DOM
974431
function () {
            var container_html = '<span class="irs irs--' + this.options.skin + ' js-irs-' + this.plugin_count + ' ' + this.options.extra_classes + '"></span>';
            this.$cache.input.before(container_html);
            this.$cache.input.prop("readonly", true);
            this.$cache.cont = this.$cache.input.prev();
            this.result.slider = this.$cache.cont;

            this.$cache.cont.html(base_html);
            this.$cache.rs = this.$cache.cont.find(".irs");
            this.$cache.min = this.$cache.cont.find(".irs-min");
            this.$cache.max = this.$cache.cont.find(".irs-max");
            this.$cache.from = this.$cache.cont.find(".irs-from");
            this.$cache.to = this.$cache.cont.find(".irs-to");
            this.$cache.single = this.$cache.cont.find(".irs-single");
            this.$cache.line = this.$cache.cont.find(".irs-line");
            this.$cache.grid = this.$cache.cont.find(".irs-grid");

            if (this.options.type === "single") {
                this.$cache.cont.append(single_html);
                this.$cache.bar = this.$cache.cont.find(".irs-bar");
                this.$cache.edge = this.$cache.cont.find(".irs-bar-edge");
                this.$cache.s_single = this.$cache.cont.find(".single");
                this.$cache.from[0].style.visibility = "hidden";
                this.$cache.to[0].style.visibility = "hidden";
                this.$cache.shad_single = this.$cache.cont.find(".shadow-single");
            } else {
                this.$cache.cont.append(double_html);
                this.$cache.bar = this.$cache.cont.find(".irs-bar");
                this.$cache.s_from = this.$cache.cont.find(".from");
                this.$cache.s_to = this.$cache.cont.find(".to");
                this.$cache.shad_from = this.$cache.cont.find(".shadow-from");
                this.$cache.shad_to = this.$cache.cont.find(".shadow-to");

                this.setTopHandler();
            }

            if (this.options.hide_from_to) {
                this.$cache.from[0].style.display = "none";
                this.$cache.to[0].style.display = "none";
                this.$cache.single[0].style.display = "none";
            }

            this.appendGrid();

            if (this.options.disable) {
                this.appendDisableMask();
                this.$cache.input[0].disabled = true;
            } else {
                this.$cache.input[0].disabled = false;
                this.removeDisableMask();
                this.bindEvents();
            }

            // block only if not disabled
            if (!this.options.disable) {
                if (this.options.block) {
                    this.appendDisableMask();
                } else {
                    this.removeDisableMask();
                }
            }

            if (this.options.drag_interval) {
                this.$cache.bar[0].style.cursor = "ew-resize";
            }
        }
1056681
function updateDOM(source,target,scope,actions,view=target,template=source) {
		Object.defineProperty(target,"view",{enumerable:false,configurable:true,writable:true,value:view});
		Object.assign(scope,{"$source":source,
												"$target":target,
												"$template":template.children ? (template.children.length> 1 ? template.children : template.children[0]) : template,
												"$view":view.children.length> 1 ? view.children : view.children[0]});
		// if source and target are text
		if(typeof(source)==="string") {
			const value = (resolve(source,scope,actions)+""),
					doc = new DOMParser().parseFromString(value, "text/html"),
		  		children = slice(doc.body.childNodes);
		  if(children.some(node => node.nodeType === 1)) {
		  	updateDOM(toVDOM(doc.body),doc.body,scope,actions,view,template);
		  	let parent;
		  	if(target.nodeType===3) {
			  	parent = target.parentElement;
			  	parent.removeChild(target);
		  	} else if(target.nodeType===1) {
		  		parent = target;
		  		while(parent.lastChild) parent.removeChild(parent.lastChild);
		  	}
		  	slice(doc.body.childNodes).forEach(child => parent.appendChild(child));
		  } else if(target.data!==value) {
		  	target.data = value;
		  }
		  return view;
		}
		target.view.template = target.view.innerHTML;
		// if tags aren't the same
		if(source.tagName!==target.tagName) {
			// replace the target with the source
			if(target.parentNode) {
				const el = document.createElement(source.tagName);
				target.parentNode.replaceChild(el,target);
				target = el;
			}
		}
		// loop through target attributes, remove where does not exist in source
			slice(target.attributes).forEach(attribute => source.attributes[attribute.name]!==null || target.removeAttribute(attribute.name));
			// loop through source attributes
			let directed;
			Object.keys(source.attributes).forEach(aname => {
				let value = source.attributes[aname],
				 type = typeof(value),
				 currentview = CURRENTVIEW;
				CURRENTVIEW = target;
				const dname = resolve(aname.split(":")[0],scope,actions),
					directive = directives[dname]||tlx.directives[dname];
				value = resolve(value,scope,actions);
				CURRENTVIEW = currentview;
				type = typeof(value);
				// replace different
				if(value==null) {
					target.removeAttribute(aname);
					delete target[aname];
				} else if(["boolean","number","string"].includes(type)) {
					if(value!==target.getAttribute(aname)) {
						try {
							target.setAttribute(aname,value);
							if(aname==="value") target.value = value;
						} catch(e) {
							; // just ignore, may be an attribute with an unresolved argument, e.g. t-bind:${aname}
						}
					}
				} else {
						const pname = toPropertyName(aname);
						if(value!==target[pname]) target[pname] = value;
				}
				if(directive) { 
					while(target.lastChild) target.removeChild(target.lastChild); 
					const render = (scope,actions) => {
						source.children.forEach(child => {
							if(typeof(child)==="string") target.appendChild(new Text(child));
							else target.appendChild(document.createElement(child.tagName));
							updateDOM(child,target.lastChild,scope,actions,view,template);
						});
						return target;
					};
					const result = directive(value,scope,actions,render,{element:target,raw:aname,resolved:aname.indexOf("${")>=0 ? resolve(aname,scope,actions) : aname}),
						rtype = typeof(result);
					if(result==null) {
						target.parentElement.removeChild(target);
					} else if(rtype==="string") {
							directed = true;
							target.innerHTML = result;
					} else if(rtype==="object" && result instanceof HTMLElement) {
						directed = true;
						if(result!==target) target.parentElement.replaceChild(result,target);
					}
				}
			});
			if(!directed) {
				// remove extra children
				let remove = target.childNodes.length-source.children.length;
				while(remove-->0) !target.lastChild || target.removeChild(target.lastChild);
				// handle the child nodes
				let targets = slice(target.childNodes,0,source.children.length);
				if(targets.length===0) {
					const shadow = target.shadowRoot;
					if(shadow) targets = slice(shadow.childNodes,0,source.children.length);
				}
				source.children.forEach((child,i) => {
					// update if in range
					if(i<targets.length) {
						updateDOM(child,targets[i],scope,actions,view,template);
						return;
					}
					if(typeof(child)==="string") target.appendChild(new Text());
					else target.appendChild(document.createElement(child.tagName));
					updateDOM(child,target.lastChild,scope,actions,view,template);
				});
			}
		
		return view;
	}
498815
function StepperView(vm, stepper) {
	function add(num) {
		stepper.value += num;
		vm.redraw();
	}

	function set(e) {
		stepper.value = +e.target.value;
	}

	// template renderer (called on each redraw)
	return function() {
		return el("#stepper", [
			el("button", {onclick: [add, -1]}, "-"),
			el("input[type=number]", {value: stepper.value, oninput: set}),
			el("button", {onclick: [add, +1]}, "+"),
		]);
	};
}
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(';'));
  }
246214
function insertTemplate( html ) {
			var dialog = CKEDITOR.dialog.getCurrent(),
				isReplace = dialog.getValueOf( 'selectTpl', 'chkInsertOpt' );

			if ( isReplace ) {
				editor.fire( 'saveSnapshot' );
				// Everything should happen after the document is loaded (#4073).
				editor.setData( html, function() {
					dialog.hide();

					// Place the cursor at the first editable place.
					var range = editor.createRange();
					range.moveToElementEditStart( editor.editable() );
					range.select();
					setTimeout( function() {
						editor.fire( 'saveSnapshot' );
					}, 0 );

				} );
			} else {
				editor.insertHtml( html );
				dialog.hide();
			}
		}
706264
function(element, options) {
    _.extend(this, Backbone.Events);

    var defaults = require('../utils/default-options')();
    // set to be an object in case
    // it's undefined
    options = options || {};

    // extend the defaults
    options = _.extend(defaults, options);

    this.options = options;

    this._currentColumns = [];

    this.container = element;

    this.innerContainer = document.createElement('div');
    this.innerContainer.classList.add('inner-container');
    this.innerContainer.classList.add('hide-overflow');

    this.el = document.createElement('table');
    this.el.classList.add('table');
    this.el.classList.add('table-striped');
    this.container.classList.add('table-sink-container');
    this.innerContainer.appendChild(this.el);
    this.container.appendChild(this.innerContainer);

    this.innerContainer.style.maxHeight = options.height + 'px';

    this.resize();

    // create some scaffolding
    this.table = d3.select(this.el);
    this.thead = this.table.append('thead');
    this.tbody = this.table.append('tbody');

    // set if we should append to the existing table data
    // and not reset on batch_end
    this._append = options._append;

    this._markdownFields = this.options.markdownFields || [];

    this._bindScrollBlocker();

    // We don't need a fully-fledged data target here,
    // so we just add functions as per feedback from @demmer
    var self = this;
    this.dataTarget = {
        _data: [],
        push: function(data) {
            // clear the table if we've done batch_end / stream_end before
            if (this._data.length === 0) {
                self.clearTable();
            }

            // limit the data to avoid crashing the browser. If limit
            // is zero, then it is ignored. If the limit has been reached,
            // we return early and don't display the new data

            // check that we aren't already over the limit
            if (this._data.length >= self.options.limit) {

                // display the message and don't do anything else
                self._sendRowLimitReachedMessage();
                return;

            // check that the new data won't make us go over the limit
            } else if ((this._data.length + data.length) > self.options.limit) {

                self._sendRowLimitReachedMessage();

                // just add from new data until we get to the limit
                var i = 0;
                while (this._data.length < self.options.limit) {
                    this._data.push(data[i++]);
                }
            }
            // we're fine.
            else {
                self._clearRowLimitReachedMessage();
                this._data = this._data.concat(data);
            }

            // if you got here, draw the table
            self.onData(this._data);

        },
        batch_end: function() {
            if (self.options.update === 'replace') {
                this._data = [];
            }
        },
        stream_end: function() {
        }
    };

}
1371846
function compileTemplates() {
  const mainHtml = fs.readFileSync(path.resolve(docsDir, 'src/template.html'), {
    encoding: 'utf8',
  });
  const mainTemplate = Handlebars.compile(mainHtml);

  function createPage(fileName, tab, content) {
    const html = mainTemplate({
      tabs: [{
        title: 'Get started',
        url: 'get-started.html',
        selected: tab === 'get-started',
      }, {
        title: 'Components',
        url: 'components.html',
        selected: tab === 'components',
      }],
      content,
      luiVersion: LUI_VERSION,
    });
    fileUtil.writeFile(path.resolve(docsDir, 'dist', fileName), html);
  }

  function createIndexPage() {
    const content = fs.readFileSync(path.resolve(docsDir, 'src/pages/index.html'), {
      encoding: 'utf8',
    });
    const template = Handlebars.compile(content);
    const html = template();
    return createPage('index.html', 'index', html);
  }

  function createGetStartedPage() {
    const content = fs.readFileSync(path.resolve(docsDir, 'src/pages/get-started.html'), {
      encoding: 'utf8',
    });
    const template = Handlebars.compile(content);
    const html = template({
      luiVersion: LUI_VERSION,
    });
    return createPage('get-started.html', 'get-started', html);
  }

  function createComponentPage(templateName, template, tab, content) {
    return createPage(templateName, tab, template({
      content,
      sections: sections.map(section => ({
        name: section.name,
        pages: section.pages.map(page => ({
          name: page.name,
          template: page.template,
          selected: page.template === templateName,
        })),
      })),
    }));
  }

  function createComponentPages() {
    const componentHtml = fs.readFileSync(path.resolve(docsDir, 'src/component-template.html'), {
      encoding: 'utf8',
    });
    const componentTemplate = Handlebars.compile(componentHtml);

    sections.forEach((section) => {
      section.pages.forEach((page) => {
        const file = `src/pages/${page.template}`;
        const fileContent = fs.readFileSync(path.resolve(docsDir, file), {
          encoding: 'utf8',
        });

        const template = Handlebars.compile(fileContent);
        const html = template();

        createComponentPage(page.template, componentTemplate, 'components', html);
      });
    });

    const file = 'src/pages/components.html';
    const fileContent = fs.readFileSync(path.resolve(docsDir, file), {
      encoding: 'utf8',
    });
    createComponentPage('components.html', componentTemplate, 'components', fileContent);
  }

  createIndexPage();
  createGetStartedPage();
  createComponentPages();
}
959813
function renderTemplate(templatePath, viewOpts, callback) {
  templateContent(templatePath, function(err, content) {
    if (err) {
      return callback(err, null);
    } else {
      return callback(null, Mustache.to_html(content, viewOpts));
    }
  });
}
406134
function() {

            // creating template
            // <div class="gina-popins">
            //     <div class="gina-popins-overlay gina-popin-is-active"></div>
            // </div>
            var $container = document.createElement('div');
            $container.id = instance.id;
            $container.setAttribute('id', instance.id);
            $container.setAttribute('class', 'gina-popins');

            var $overlay = document.createElement('div');
            $overlay.setAttribute('id', 'gina-popins-overlay');
            $overlay.setAttribute('class', 'gina-popins-overlay');


            $container.appendChild( $overlay );

            // adding to DOM
            document.body.appendChild($container);

            instance.target     = $container;
            instance.on         = on;

            gina.popinContainer  = instance.id;
            gina.hasPopinHandler = true;
        }
1230580
function(template, refNode) {
      if (template) {
        // TODO(sorvell): mark this element as an eventController so that
        // event listeners on bound nodes inside it will be called on it.
        // Note, the expectation here is that events on all descendants
        // should be handled by this element.
        this.eventController = this;
        // stamp template
        // which includes parsing and applying MDV bindings before being
        // inserted (to avoid {{}} in attribute values)
        // e.g. to prevent <img src="images/{{icon}}"> from generating a 404.
        var dom = this.instanceTemplate(template);
        // append to shadow dom
        if (refNode) {
          this.insertBefore(dom, refNode);
        } else {
          this.appendChild(dom);
        }
        // perform post-construction initialization tasks on ahem, light root
        this.shadowRootReady(this);
        // return the created shadow root
        return dom;
      }
    }
1021725
function(data, options, title_slide) {
		// DOM Elements
		this._el = {
			container: {},
			scroll_container: {},
			background: {},
			content_container: {},
			content: {}
		};

		// Components
		this._media 		= null;
		this._mediaclass	= {};
		this._text			= {};
		this._background_media = null;

		// State
		this._state = {
			loaded: 		false
		};

		this.has = {
			headline: 	false,
			text: 		false,
			media: 		false,
			title: 		false,
			background: {
				image: false,
				color: false,
				color_value :""
			}
		}

		this.has.title = title_slide;

		// Data
		this.data = {
			unique_id: 				null,
			background: 			null,
			start_date: 			null,
			end_date: 				null,
			location: 				null,
			text: 					null,
			media: 					null,
            autolink: true
		};

		// Options
		this.options = {
			// animation
			duration: 			1000,
			slide_padding_lr: 	40,
			ease: 				TL.Ease.easeInSpline,
			width: 				600,
			height: 			600,
			skinny_size: 		650,
			media_name: 		""
		};

		// Actively Displaying
		this.active = false;

		// Animation Object
		this.animator = {};

		// Merge Data and Options
		TL.Util.mergeData(this.options, options);
		TL.Util.mergeData(this.data, data);

		this._initLayout();
		this._initEvents();


	}
30907
function render(form, template) {
  const compiledRowTemplate = handlebars.compile(
    '<tr class="form-element">' +
      '<td class="key">{{key}}</td>' +
      '<td class="value">{{value}}</td>' +
    '</tr>');
  const compiledTable = handlebars.compile(
    '<table><tbody>{{{rows}}}</tbody></table>');
  const compiledTemplate = handlebars.compile(template);

  const formElements = form.map(({key, value}) => {
    if (key !== 'File') {
      return compiledRowTemplate({key, value: unescape(value)});
    }

    return null;
  });

  const formData = compiledTable({rows: formElements.join(' ')});

  return compiledTemplate({formData});
}
210448
function (res, args) {
            var tplcfg = this._tplcfg;
            if (!tplcfg) {
                // the template may be ready after the widget has been disposed
                // do nothing in this case
                // except disposing the module which has just been created
                if (args.autoDispose) {
                    res.moduleCtrlPrivate.$dispose();
                }
                return;
            }

            var tplDiv = this._subTplDiv; // may be null at this time

            tplcfg.tplDiv = tplDiv;

            tplcfg.data = this._cfg.data;

            // if a module controller was created, inject it in template initialization
            if (res.moduleCtrl) {
                tplcfg.moduleCtrl = res.moduleCtrl;
            } else {
                tplcfg.context = this._context;
            }
            if (args.autoDispose) {
                if (tplcfg.toDispose == null) {
                    tplcfg.toDispose = [res.moduleCtrlPrivate];
                } else {
                    tplcfg.toDispose.push(res.moduleCtrlPrivate);
                }
            }
            /*
             * var tplCtxt = new aria.templates.TemplateCtxt(); this.subTplCtxt = tplCtxt;
             */
            var tplCtxt = this.subTplCtxt;
            tplCtxt.parent = this._context;

            res = tplCtxt.initTemplate(tplcfg);
            this._initCtxDone = true;

            if (res) {
                tplCtxt.dataReady(); // data successfully loaded: signal to template through TemplateContext
                // check that tplCtxt was not disposed
                if (tplDiv && tplCtxt._cfg) {
                    // Load the CSS dependencies, the style should be added before the html
                    tplDiv.className = tplDiv.className + " " + tplCtxt.getCSSClassNames(true);
                    tplCtxt.$onOnce({
                        "Ready" : this.__innerTplReadyCb,
                        scope : this
                    });
                    tplCtxt.$refresh();
                }
                // don't clean this object, as the template context will do it. Just break reference
                this.tplcfg = null;

            } else {
                tplCtxt.$dispose();
                this.subTplCtxt = null;
            }

            tplDiv = null;
        }
856643
function () {
            var attr,
                carousel = this,
                numItems = carousel.get("numItems"),
                i,
                itemsTable = carousel._itemsTable,
                items = itemsTable.items,
                loading = itemsTable.loading,
                item,
                styles;

            for (i = 0; i < numItems; i++) {
                item = items[i] || loading[i];

                if (item && item.id) {
                    styles = getCarouselItemPosition.call(carousel, i);
                    item.styles = item.styles || {};
                    for (attr in styles) {
                        if (styles.hasOwnProperty(attr)) {
                            item.styles[attr] = styles[attr];
                        }
                    }
                    setStyles(Dom.get(item.id), styles);
                }
            }
        }
1333078
protected void appendAndPush(
          StylesheetHandler handler, ElemTemplateElement elem)
            throws SAXException
  {
    //System.out.println("ProcessorFunction appendAndPush()" + elem);
    super.appendAndPush(handler, elem);
    //System.out.println("originating node " + handler.getOriginatingNode());
    elem.setDOMBackPointer(handler.getOriginatingNode());
    handler.getStylesheet().setTemplate((ElemTemplate) elem);
  }
298542
function(options) {
        options = options || this.options;

        // Create template
        var template = $(options.templateFrom);

        if (!template.length) {
            template = this.render(options.template);
        }

        if (!template.length) {
            throw new Error('Failed to render template');
        }

        // Add a class name
        if (options.className) {
            template.addClass(options.className);
        }

        // Add animation class
        if (options.animation) {
            template.addClass(options.animation);
        }

        return template
            .attr('id', this.id())
            .conceal(true) // Add hide class
            .hide() // Set display to none
            .appendTo('body');
    }
1136483
function injectTemplate(template) {
  let js = [
    '',
    'var __vue__options__ = (module.exports.__esModule) ?',
    'module.exports.default : module.exports;',
    '__vue__options__.template = ' + JSON.stringify(template) + ';',
    '',
  ];

  return js.join(os.EOL);
}