<commit_before><div class="pro-hero">
  <div class="container">
    {{#if currentUser.isPro}}
      <h2>You're <span class="big-badge">PRO</span> and we love you for it.</h2>
      <span class="pro-period">
        {{#if currentUser.proMembershipPlan.recurring}}
          You are subscribed to PRO. <a {{action "cancelPro"}}>Cancel?</a>
        {{else}}
          You have {{daysRemaining}} days of PRO remaining.
        {{/if}}
      </span>
    {{else}}
      <h2>You should be <span class="big-badge">PRO</span></h2>
    {{/if}}
  </div>
</div>

<div class="container">
  <div class="pro-right">
    <div class="purchase-block panel">
      <div class="btn-group" role="group">
        <button type="button" {{bind-attr class=":btn :btn-default showSubscriptions:active"}} {{action "selectSubscriptions"}}>Subscription</button>
        <button type="button" {{bind-attr class=":btn :btn-default showOneTime:active"}} {{action "selectOneTime"}}>One-time / Gift</button>
      </div>

      <div class="payment-wrapper">
        {{#if isLoading}}
          <div class="loading-state">
            <div class="state-content">
              <i class="fa fa-refresh fa-spin"></i>
              <div>Processing...</div>
            </div>
          </div>
        {{/if}}

        {{#if isComplete}}
          <div class="success-state">
            <div class="state-content">
              <i class="fa fa-check-circle"></i>
              <div>Congrats, you are PRO!</div>
            </div>
          </div>
        {{/if}}

        {{#if isGifted}}
          <div class="gifted-state">
            <div class="state-content">
              <i class="fa fa-gift"></i>
              <div>Your gift is on its way!</div>
            </div>
          </div>
        {{/if}}

        {{#if isError}}
          <div class="error-state">
            <div class="state-content">
              <i class="fa fa-warning"></i>
              <div>{{errorMessage}}.</div>
              <small>Please try again later.</small>
            </div>
          </div>
        {{/if}}

        {{#if showSubscriptions}}
          {{#if currentUser.proMembershipPlan.recurring}}
            <p>You are currently on the <strong>{{currentUser.proMembershipPlan.name}}</strong> plan. Do you want to switch to a different plan?</p>
          {{else}}
            <p>What type of subscription would you like?</p>
          {{/if}}

          <ul>
            {{#each plan in arrangedContent}}
              <li>
                {{radio-button name="plan"
                               class="nomargin"
                               id=plan.id
                               value=plan.id
                               checked=selectedPlanId}}
                <label {{bind-attr for=id}}>{{plan.name}}</label>
              </li>
            {{/each}}
          </ul>

          {{#if currentUser.proMembershipPlan.recurring}}
            <small style="opacity:0.5">* You will only be charged when your subscription runs out in {{daysRemaining}} days.</small>
          {{/if}}
        {{/if}}

        {{#if showOneTime}}
          {{view "select" content=arrangedContent
                          value=selectedPlanId
                          optionValuePath="content.id"
                          optionLabelPath="content.name"}}
          <ul>
            <li>
              {{radio-button id="notgift" value="notgift" checked=giftValue}}
              <label for="notgift">purchase for myself</label>
            </li>
            <li>
              {{radio-button id="gift" value="gift" checked=giftValue}}
              <label for="gift">purchase as a gift</label>

              {{#if isGift}}
                <div class="gift-details">
                  {{input type="text" class="gift-input inline" placeholder="Enter a username..." size="13" maxlength="20" value=giftTo}}
                  <ul class="indent">
                    <li>
                      <textarea rows="2" placeholder="Go ahead, say something clever..." class="giftmessage gift-input" {{bind-attr value=giftMessage}}></textarea>
                    </li>
                  </ul>
                </div>
              {{/if}}
            </li>
          </ul>
        {{/if}}

        {{#if currentUser.isSignedIn}}
          <button class="pro-button" type="button" {{bind-attr disabled=disablePurchase}} {{action "purchasePro"}}>Purchase PRO</button>
        {{else}}
          <div style="margin: 30px 0">
            {{#link-to 'sign-in' class="pro-button"}}<commit_msg>Invert labels on pro page radio buttons<commit_after><div class="pro-hero">
  <div class="container">
    {{#if currentUser.isPro}}
      <h2>You're <span class="big-badge">PRO</span> and we love you for it.</h2>
      <span class="pro-period">
        {{#if currentUser.proMembershipPlan.recurring}}
          You are subscribed to PRO. <a {{action "cancelPro"}}>Cancel?</a>
        {{else}}
          You have {{daysRemaining}} days of PRO remaining.
        {{/if}}
      </span>
    {{else}}
      <h2>You should be <span class="big-badge">PRO</span></h2>
    {{/if}}
  </div>
</div>

<div class="container">
  <div class="pro-right">
    <div class="purchase-block panel">
      <div class="btn-group" role="group">
        <button type="button" {{bind-attr class=":btn :btn-default showSubscriptions:active"}} {{action "selectSubscriptions"}}>Subscription</button>
        <button type="button" {{bind-attr class=":btn :btn-default showOneTime:active"}} {{action "selectOneTime"}}>One-time / Gift</button>
      </div>

      <div class="payment-wrapper">
        {{#if isLoading}}
          <div class="loading-state">
            <div class="state-content">
              <i class="fa fa-refresh fa-spin"></i>
              <div>Processing...</div>
            </div>
          </div>
        {{/if}}

        {{#if isComplete}}
          <div class="success-state">
            <div class="state-content">
              <i class="fa fa-check-circle"></i>
              <div>Congrats, you are PRO!</div>
            </div>
          </div>
        {{/if}}

        {{#if isGifted}}
          <div class="gifted-state">
            <div class="state-content">
              <i class="fa fa-gift"></i>
              <div>Your gift is on its way!</div>
            </div>
          </div>
        {{/if}}

        {{#if isError}}
          <div class="error-state">
            <div class="state-content">
              <i class="fa fa-warning"></i>
              <div>{{errorMessage}}.</div>
              <small>Please try again later.</small>
            </div>
          </div>
        {{/if}}

        {{#if showSubscriptions}}
          {{#if currentUser.proMembershipPlan.recurring}}
            <p>You are currently on the <strong>{{currentUser.proMembershipPlan.name}}</strong> plan. Do you want to switch to a different plan?</p>
          {{else}}
            <p>What type of subscription would you like?</p>
          {{/if}}

          <ul>
            {{#each plan in arrangedContent}}
              <li>
                <label>
                  {{radio-button name="plan"
                                 class="nomargin"
                                 id=plan.id
                                 value=plan.id
                                 checked=selectedPlanId}}
                  {{plan.name}}
                </label>
              </li>
            {{/each}}
          </ul>

          {{#if currentUser.proMembershipPlan.recurring}}
            <small style="opacity:0.5">* You will only be charged when your subscription runs out in {{daysRemaining}} days.</small>
          {{/if}}
        {{/if}}

        {{#if showOneTime}}
          {{view "select" content=arrangedContent
                          value=selectedPlanId
                          optionValuePath="content.id"
                          optionLabelPath="content.name"}}
          <ul>
            <li>
              <label>
                {{radio-button id="notgift" value="notgift" checked=giftValue}}
                purchase for myself
              </label>
            </li>
            <li>
              <label>
                {{radio-button id="gift" value="gift" checked=giftValue}}
                purchase as a gift
              </label>

              {{#if isGift}}
                <div class="gift-details">
                  {{input type="text" class="gift-input inline" placeholder="Enter a username..." size="13" maxlength="20" value=giftTo}}
                  <ul class="indent">
                    <li>
                      <textarea rows="2" placeholder="Go ahead, say something clever..." class="giftmessage gift-input" {{bind-attr value=giftMessage}}></textarea>
                    </li>
                  </ul>
                </div>
              {{/if}}
            </li>
          </ul>
        {{/if}}

        {{#if currentUser.isSignedIn}}
          <button class="pro-button" type="button" {{bind-attr disabled=disablePurchase}} {{action "purchasePro"}}>Purchase PRO</button>
        {{else}}
          <div style="margin: 30px 0">
            {{#link-to 'sign-in' class="pro-button"}}
{'fraction_non_alphanumeric': 0.1579637317019882, 'fraction_numerical': 0.00305877212147695, 'mean_word_length': 1.6008522727272727, 'pattern_counts': {'":': 4, '<': 193, '<?xml version=': 0, '>': 193, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6181622', 'n_tokens_mistral': 2625, 'n_tokens_neox': 2556, 'n_words': 585}