<commit_before><% title @product.name %>
<% activate_nav! :product %>

<div class="clearfix mxn2">
  <div class="sm-col sm-col-8 px2">

    <% if signed_in? %>
      <% product_membership = current_user.team_memberships.find_by(product: @product) %>

      <% if product_membership.nil? || product_membership.bio.nil? %>

        <div class="bg-white p3 rounded shadow mb3">
          <div class="clearfix">
            <h6 class="mt0 mb2">G'day <%= current_user.username %>!</h6>
            <div class="right"></div>
          </div>
          <p>Ready to pitch in on <%= @product.name %>? Introduce yourself.</p>

          <form role="form" method="post" action="<%= product_person_path(@product, current_user) %>">
            <input name="authenticity_token" value="<%= form_authenticity_token %>" type="hidden">
            <input name="_method" value="patch" type="hidden">

            <textarea class="form-control mb2" name="membership[bio]" rows="2" placeholder="What do you like to do? What is your favorite sandwich?"></textarea>

            <button type="submit" class="btn btn-primary btn-block">Introduce yourself!</button>
          </form>
        </div>
      <% end %>
    <% end %>

    <%= react_component 'NewsFeedList', items: ActiveModel::ArraySerializer.new(
      @product.news_feed_items.order(updated_at: :desc)
    ).as_json %>
  </div>

  <div class="sm-col sm-col-4">

    <div class="bg-gray-5 p2 rounded mb2">
      <% if @product.lead.present? %>
        <h6 class="gray-2 mt0 mb0 py1">The Big Idea</h6>
        <%= react_component 'Markdown', content: @product.lead, normalized: true %>
        <a class="block mb3" href="<%= product_plan_path(@product) %>">Read more</a>
      <% end %>

      <div class="stat-group mb0">
        <div class="stat">
          <a class="block" href="<%= product_people_path(@product) %>">
            <div class="h4 mt0 mb0"><%= @product.partners.count %></div>
            <div class="gray-2">Partners</div>
          </a>
        </div>
        <div class="stat">
          <a class="block" href="<%= product_repos_path(@product) %>">
            <div class="h4 mt0 mb0"><%= @product.repos.count %></div>
            <div class="gray-2">Repos</div>
          </a>
        </div>
        <div class="stat">
          <a class="block" href="<%= product_financials_path(@product) %>">
            <div class="h4 mt0 mb0"><%= short_currency(@product.profit_reports.map(&:profit).reduce(:+)) %></div>
            <div class="gray-2">Royalties</div>
          </a>
        </div>
      </div>
    </div>

    <% if @product.team_building? %>
      <div class="bg-gray-5 p2 mb2"><commit_msg>Only show royalties for products that have profit reports.<commit_after><% title @product.name %>
<% activate_nav! :product %>

<div class="clearfix mxn2">
  <div class="sm-col sm-col-8 px2">

    <% if signed_in? %>
      <% product_membership = current_user.team_memberships.find_by(product: @product) %>

      <% if product_membership.nil? || product_membership.bio.nil? %>

        <div class="bg-white p3 rounded shadow mb3">
          <div class="clearfix">
            <h6 class="mt0 mb2">G'day <%= current_user.username %>!</h6>
            <div class="right"></div>
          </div>
          <p>Ready to pitch in on <%= @product.name %>? Introduce yourself.</p>

          <form role="form" method="post" action="<%= product_person_path(@product, current_user) %>">
            <input name="authenticity_token" value="<%= form_authenticity_token %>" type="hidden">
            <input name="_method" value="patch" type="hidden">

            <textarea class="form-control mb2" name="membership[bio]" rows="2" placeholder="What do you like to do? What is your favorite sandwich?"></textarea>

            <button type="submit" class="btn btn-primary btn-block">Introduce yourself!</button>
          </form>
        </div>
      <% end %>
    <% end %>

    <%= react_component 'NewsFeedList', items: ActiveModel::ArraySerializer.new(
      @product.news_feed_items.order(updated_at: :desc)
    ).as_json %>
  </div>

  <div class="sm-col sm-col-4">

    <div class="bg-gray-5 p2 rounded mb2">
      <% if @product.lead.present? %>
        <h6 class="gray-2 mt0 mb0 py1">The Big Idea</h6>
        <%= react_component 'Markdown', content: @product.lead, normalized: true %>
        <a class="block mb3" href="<%= product_plan_path(@product) %>">Read more</a>
      <% end %>

      <div class="stat-group mb0">
        <div class="stat">
          <a class="block" href="<%= product_people_path(@product) %>">
            <div class="h4 mt0 mb0"><%= @product.partners.count %></div>
            <div class="gray-2">Partners</div>
          </a>
        </div>
        <div class="stat">
          <a class="block" href="<%= product_repos_path(@product) %>">
            <div class="h4 mt0 mb0"><%= @product.repos.count %></div>
            <div class="gray-2">Repos</div>
          </a>
        </div>
        <% if @product.profit_reports.any? %>
          <div class="stat">
            <a class="block" href="<%= product_financials_path(@product) %>">
              <div class="h4 mt0 mb0"><%= short_currency(@product.profit_reports.map(&:profit).reduce(:+)) %></div>
              <div class="gray-2">Royalties</div>
            </a>
          </div>
        <% end %>
      </div>
    </div>

    <% if @product.team_building? %>
      <div class="bg-gray-5 p2 mb2">
{'fraction_non_alphanumeric': 0.18263748390656612, 'fraction_numerical': 0.013978296854883207, 'mean_word_length': 2.6325985303941217, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 161, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3814005', 'n_tokens_mistral': 1854, 'n_tokens_neox': 1719, 'n_words': 376}