Handlebars helper which will render the window.analytics.page call.

By default just render the empty call, adding whatever arguments are
passed in explicitly.

@param {Object|Boolean} page options (name, category, properties)
@return {String}
12493
function renderPage(page) {
  if (!page) return '';

  var args = [];

  if (page.category) args.push(page.category);
  if (page.name) args.push(page.name);
  if (page.properties) args.push(page.properties);

  // eslint-disable-next-line no-restricted-globals
  var res = 'analytics.page(' + map(JSON.stringify, args).join(', ') + ');';

  return res;
}
126852
function parsePageFromString(page, content) {
    // Parse page YAML
    var parsed = fm(content);

    return page.merge({
        content:    parsed.body,
        attributes: Immutable.fromJS(parsed.attributes),
        dir:        direction(parsed.body)
    });
}
219407
function(args, connectionInfo, processPagedResults) {
  args.page = {value: 1};
  args.pageSize = {value: 200};
  // set a default function if none is provided
  if (!processPagedResults) {
    processPagedResults = defaultMethod_ForProcessingPagedResults_ForConsignmentProducts; // eslint-disable-line camelcase
  }
  return utils.processPagesRecursively(args, connectionInfo, fetchProductsByConsignment, processPagedResults);
}
1161625
function renderPage(page) {
    var template = pageTemplate(page);
    var html = renderTemplate(page, template);
    return '<div data-render-page="' + esc(template) + '">' + html + '</div>';
  }
561130
function manipulatePage(page) {
        if (DEBUG && !page.phantom) inspectArgs("manipulatePage: ", page);

        if (timer !== undefined) {
            clearTimeout(timer);
        }

        // Inject an external script file.
        if (option["javascript-file"]) {
            page.injectJs(option["javascript-file"]);
        }

        // Inject an in-line script from the command line.
        if (option["inject-script"]) {
            var injectScript = option["inject-script"];
            injectScript = (typeof injectScript === "function") ?
                injectScript.toString() : `function() { ${injectScript} }`;
            page.evaluateJavaScript(injectScript);
        }

        if (option.waitcapturedelay) {
            setTimeout(function () { return page }, +option.waitcapturedelay);
        } else {
            return page;
        }
    }
1227034
function pageToJqtree(page) {
        var info = {
          label: page.title,
          slug: page.slug,
          id: page._id,
          // For icons
          type: page.type,
          // Also nice for icons and browser-side decisions about what's draggable where
          trash: page.trash,
          published: page.published,
          publish: (page.path === '/trash') || self.apos.permissions.can(req, 'publish-apostrophe-page', page),
          edit: self.apos.permissions.can(req, 'edit-apostrophe-page', page)
        };
        if (page._children && page._children.length) {
          info.children = [];
          // First non-trash, then .trash true,
          // then the conventional trashcan itself
          // to avoid presenting a confusing UI
          _.each(page._children, function(child) {
            if (!child.trash) {
              info.children.push(pageToJqtree(child));
            }
          });
          _.each(page._children, function(child) {
            if (child.trash && (!(child.type === 'trash'))) {
              info.children.push(pageToJqtree(child));
            }
          });
          _.each(page._children, function(child) {
            if (child.trash && (child.type === 'trash')) {
              var forJqtree = pageToJqtree(child);
              if (self.apos.docs.trashInSchema) {
                forJqtree.label = self.apos.i18n.__('Legacy Trash');
              }
              info.children.push(forJqtree);
            }
          });
        }
        return info;
      }
416065
function (src, options) {

		    var pack = (config.pageConfig &&
		            config.pageConfig.project &&
		            config.pageConfig.project.source )?
		                config.pageConfig.project :
		                false;

		    if (src && pack){
		        return options.fn(this);
		    }else{
		        return options.inverse(this);
		    }
		}
472036
function renderPage(uri, req, res, hrStart) {
  const locals = res.locals,
    extension = getExtension(req),
    renderer = findRenderer(extension);

  // Add request route params, request query params
  // and the request extension to the locals object
  locals.params = req.params;
  locals.query = req.query;
  locals.extension = extension;

  // look up page alias' component instance
  return getDBObject(uri)
    .then(formDataFromLayout(locals, uri))
    .then(data => {
      logTime(hrStart, uri);
      return data;
    })
    .then(({ data, options }) => renderer.render(data, options, res))
    .catch(responses.handleError(res));
}
1083911
function renderDoc(page, renderOpts) {
    if (generator.renderOpts !== defaultRenderOpts) return log(new Error('Recursive call to renderDoc'));
    var rOpts = generator.renderOpts = function() { return u.assign({}, defaultRenderOpts(page), renderOpts); };
    var out = renderTemplate(page, docTemplate(page), rOpts()); // synchronous
    generator.renderOpts = defaultRenderOpts;
    return out;
  }
1040390
function onPage(output, page) {
    var options = output.getOptions();

    // Inline assets
    return Modifiers.modifyHTML(page, [
        Modifiers.inlineAssets(options.get('root'), page.getFile().getPath())
    ])

    // Write page using website generator
    .then(function(resultPage) {
        return WebsiteGenerator.onPage(output, resultPage);
    });
}
806027
def pager(parser, token):
    
    try:
        tag_name, page_obj = token.split_contents()
    except ValueError:
        raise template.TemplateSyntaxError('pager tag requires 1 argument (page_obj), %s given' % (len(token.split_contents()) - 1))
    return PagerNode(page_obj)
98553
def url_for_page(page)
      view.url_for(view.default_url_options.merge({page_param.to_sym => page}).merge(options[:params] || {}))
    end
313002
function encodePage(output, page) {
    var book = output.getBook();
    var summary = book.getSummary();
    var fs = book.getContentFS();
    var file = page.getFile();

    // JS Page is based on the JSON output
    var result = JSONUtils.encodePage(page, summary);

    result.type = file.getType();
    result.path = file.getPath();
    result.rawPath = fs.resolve(result.path);

    deprecate.field(output, 'page.progress', result, 'progress', function() {
        return encodeProgress(output, page);
    }, '"page.progress" property is deprecated');

    deprecate.field(output, 'page.sections', result, 'sections', [
        {
            content: result.content,
            type: 'normal'
        }
    ], '"sections" property is deprecated, use page.content instead');

    return result;
}
205471
function handlebarsEngine(taskOptions) {
  debug('Initializing new instance of hbs');
  const handlebars = hbs.create();

  /* istanbul ignore else */
  if (taskOptions.helpers) {
    for (const helper of Object.keys(taskOptions.helpers)) {
      debug('  Registering helper: %s', helper);
      handlebars.registerHelper(helper, taskOptions.helpers[helper]);
    }
  }

  return handlebars;
}
266517
function widgetsForPage( page ) {
         return Object.keys( page.areas ).reduce( ( widgets, areaName ) => {
            const areaWidgets = page.areas[ areaName ];
            return areaWidgets.reduce( ( widgets, widget ) => {
               widget.area = areaName;
               return [ ...widgets, widget ];
            }, widgets );
         }, [] );
      }
54130
def show_page_path_params(page, optional_params = {})
      raise ArgumentError, 'Page is nil' if page.nil?
      url_params = {urlname: page.urlname}.update(optional_params)
      prefix_locale? ? url_params.update(locale: page.language_code) : url_params
    end
570385
function render() {
  var content = $($.parseHTML(template));
  var compiler = Handlebars.compile(content.filter("#layout").html());

  Handlebars.registerPartial({
    leftPanel: content.filter("#left-panel").html(),
    rightPanel: content.filter("#right-panel").html(),
    transactionList: content.filter("#transaction-list").html(),
    transactionDetails: content.filter("#transaction-details").html(),
    transactionOther: content.filter("#transaction-other").html(),
  });

  // Adds selected class to selected transaction item.
  Handlebars.registerHelper('isSelected', function(options) {
    var resp =
      (this.business === dataView.selectedTransaction.business) ?
      "selected" : "";
    return options.fn(resp);
  });

  // Returns fake detail monthly total.
  Handlebars.registerHelper('monthlyTotal', function(options) {
    var total = toCurrency(parseFloat(this.selectedTransaction.amount) * 12);
    return options.fn(total);
  });

  // Returns fake detail yearly total.
  Handlebars.registerHelper('yearlyTotal', function(options) {
    var total = toCurrency(parseFloat(this.selectedTransaction.amount) * 40);
    return options.fn(total);
  });

  var html = compiler(dataView);
  $("#demo-app").html(html);

  addClickHandler();
}