Get `_content`. Create, if needed
@returns {Lava.system.Template}
546097
function() {

		if (this._content == null) {

			var argument_value = this._argument.getValue();
			if (Lava.schema.DEBUG && argument_value && !Array.isArray(argument_value)) Lava.t("Include view expects to receive a template from it's argument");

			this._content = new Lava.system.Template(
				this._argument.getValue() || this._config.template || [],
				this._widget,
				this
			)

		}

		return this._content;

	}
668111
function createSection (section, content, options) {
  options = options[section] || {}
  var c = content[section] || {}
  var o = options.contents
  var paginationOffset = Math.floor(options.paginationOffset) || 0

  if (typeof o !== 'object') o = {default: o}

  return {
    height: options.height,
    contents: phantom.callback(function (pageNum, numPages) {
      var html = o[pageNum] || c[pageNum]

      var pageNumFinal = pageNum + paginationOffset
      var numPagesFinal = numPages + paginationOffset

      if (pageNumFinal === 1 && !html) html = o.first || c.first
      if (numPagesFinal === numPages && !html) html = o.last || c.last
      return (html || o.default || c.default || '')
        .replace(/{{page}}/g, pageNumFinal)
        .replace(/{{pages}}/g, numPagesFinal) + content.styles
    })
  }
}
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();
}
587632
function(string) {
  if (!string) {
    var fragment = document.createDocumentFragment();
    fragment.appendChild(document.createTextNode(''));
    return fragment;
  }
  var templateElement;
  templateElement = document.createElement('template');
  templateElement.innerHTML = string;
  return templateElement.content;
}
401825
function createTemplateWithInnerHTML(innerHTML) {
  const template = document.createElement('template');
  // REVIEW: Is there an easier way to do this?
  // We'd like to just set innerHTML on the template content, but since it's
  // a DocumentFragment, that doesn't work.
  const div = document.createElement('div');
  div.innerHTML = innerHTML;
  while (div.childNodes.length > 0) {
    template.content.appendChild(div.childNodes[0]);
  }
  return template;
}
1344000
function createDocument(args) {
  const { browser } = args;

  const features = {
    FetchExternalResources:   [],
    ProcessExternalResources: [],
    MutationEvents:           '2.0'
  };

  const window  = new Window({
    parsingMode:  'html',
    contentType:  'text/html',
    url:          args.url,
    referrer:     args.referrer
  });

  const { document } = window;
  const documentImpl = idlUtils.implForWrapper(document)

  if (args.browser.hasFeature('scripts', true)) {
    features.FetchExternalResources.push('script');
    features.ProcessExternalResources.push('script');
    window._runScripts = 'dangerously';
  }
  if (args.browser.hasFeature('css', false)) {
    features.FetchExternalResources.push('css');
    features.FetchExternalResources.push('link');
  }
  if (args.browser.hasFeature('img', false))
    features.FetchExternalResources.push('img');
  if (args.browser.hasFeature('iframe', true))
    features.FetchExternalResources.push('iframe');


  browserFeatures.applyDocumentFeatures(documentImpl, features);
  setupWindow(window, args);

  // Give event handler chance to register listeners.
  args.browser.emit('loading', document);
  return document;
}
1178877
function() {		
		// Create Dom element
		this._el.content_item	= TL.Dom.create("div", "tl-media-item tl-media-blockquote", this._el.content);
		this._el.content_container.className = "tl-media-content-container tl-media-content-container-text";
		
		// Get Media ID
		this.media_id = this.data.url;
		
		// API Call
		this._el.content_item.innerHTML = this.media_id;
		
		// After Loaded
		this.onLoaded();
	}
120418
function getContent() {
      var h = pageInformation.response.headers || {};
      if (/json/.test(h['content-type'])) {
        try {
          return JSON.parse(page.plainText);
        }
        catch (e) {
          return page.content;
        }
      }
      else {
        return page.content;
      }
    }
1650
function createDomElementFromTemplate(html) {
    //match container markers like <@element/>
    let containerTags = html.match(rContainerGlobal) || [];

    for (let containerTag of containerTags) {
        let [, containerName, attrs = ''] = rContainer.exec(containerTag);
        let template = `<script type="x" ${ATTR}="${containerName}">${attrs.trim()}</script>`;

        html = html.split(containerTag).join(template);
    }

    //match attribute markers like <span @element></span>
    let allTags = html.match(rTags) || [];

    for (let tag of allTags) {
        let result = rAttr.exec(tag);

        if (result) {
            let elName = result[1];
            html = html.split(tag).join(tag.replace(`@${elName}`, `${ATTR}="${elName}"`));
        }
    }

    return $.create(html.trim());
}
337947
function (item, pageConfig) {
            var templateCfg = {
                classpath : item.template
            };
            var args = item.args || [];
            var extraArg = {};
            if (item.contentId) {
                extraArg.contents = this._getPlaceholderContents(pageConfig, item.contentId);
            }
            args.push(extraArg);

            templateCfg.args = args;
            if (item.module) {
                var module = this._rootModule.getPageModule(this.currentPageId, item.module);
                templateCfg.moduleCtrl = module;
                this._modulesInPage.push(module);
            }
            if (item.data) {
                templateCfg.data = item.data;
            }
            return templateCfg;
        }
1052770
async function getTemplate({template, preset}) {
	if (typeof template === 'string') {
		return template;
	}

	if (typeof preset === 'string') {
		try {
			return (
				await read(
					resolve(
						__dirname,
						'templates',
						[preset.toLowerCase(), 'html'].join('.'),
					)
				)
			).toString();
		} catch (error) {
			throw new Error(`Preset ${preset} not found`);
		}
	}

	return DEFAULT_TEMPLATE;
}
789679
function insertContent(node, content) {
	let inserted = insertContentIntoPlaceholder(node, content);
	node.walk(child => inserted |= insertContentIntoPlaceholder(child, content));

	if (!inserted) {
		// no placeholders were found in node, insert content into deepest child
		setNodeContent(findDeepestNode(node), content);
	}

	return node;
}
510973
function create() {
    var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'div';

    return document.createElement(tag);
}
284304
function getOrCreateTemplateContentsOwner(template) {
    var doc = template.ownerDocument
    if (!doc.defaultView)
      return doc;
    var d = doc.templateContentsOwner_;
    if (!d) {
      // TODO(arv): This should either be a Document or HTMLDocument depending
      // on doc.
      d = doc.implementation.createHTMLDocument('');
      while (d.lastChild) {
        d.removeChild(d.lastChild);
      }
      doc.templateContentsOwner_ = d;
    }
    return d;
  }
358300
function loadTemplate() {
  generateData();

  return new Promise(function(resolve, reject) {

    // Load handlebars page template.
    $.get('src/demo-template.html', function(response) {
      template = response;
      render();
      resolve();
    }).fail(function() {
      reject();
    });
  });
}
840682
async function _renderContent(uriPath) {
  const pathAnalyzer = new services.UriPathAnalyzer(uriPath, this.paths.www);
  const [file, pathSection, pathRecordId] = pathAnalyzer.perform();
  const content = {};

  if (!file) {
    throw Boom.notFound('Template not found');
  }

  const partials = glob.sync(resolve(this.paths.www, '**/_*.html'));
  const template = Template.fromFile(file, this.paths.www, partials, { parseConditionals: true });
  const tree = template.parse();

  /* eslint-disable no-restricted-syntax */
  for (const [token, args] of Object.entries(tree)) {
    const recordId = pathSection === args.name ? pathRecordId : null;
    /* eslint-disable-next-line no-await-in-loop */
    let recordContent = await Section.contentFor(args, recordId);

    if (this.config.placeholders) {
      recordContent = _addPlaceholders(recordContent, args);
    }

    content[token] = recordContent;
  }
  /* eslint-enable no-restricted-syntax */

  return template.render(content);
}
742653
function (content) {
  checkRenderContent(content);

  if (content instanceof Blaze.Template) {
    return content.constructView();
  } else if (content instanceof Blaze.View) {
    return content;
  } else {
    var func = content;
    if (typeof func !== 'function') {
      func = function () {
        return content;
      };
    }
    return Blaze.View('render', func);
  }
}