<commit_before>{{!--

  Core JavaScript to power widget functionality.

  TODO: Eventually this should get merged in as part of the {{squatchHead}} core helper instead of being manually included in every template

  Eventually we can abstract this.

--}}

<script>
  window.squatch = window.squatch || {};

  window.squatch.user = {
    code     : '{{referredBy.referredByUser.referralCode}}',
    sharelink: '{{shareLinks.shareLink}}',
    email    : {
      share : {
        subject: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.EMAIL.emailShareSubject') space="%20"}}',
        body: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.EMAIL.emailShareBody') space="%20"}}',
        mailToLink: 'mailto:?subject={{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.EMAIL.emailShareSubject') space="%20"}}&body={{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.EMAIL.emailShareBody') space="%20"}}',
      },
      reminder: {
        subject: '{{urlencode (stringFormat "How do you like %s so far?" companyName) space="%20"}}',
        body: '{{urlencode (stringFormat "Hey,%n %nI saw that you signed up for %s. What do you think of it so far?%n %nBy the way, if you\'ve lost the link to %s, here it is again - %s" companyName companyName shareLinks.emailShareLink) space="%20"}}',
        mailToLink: 'mailto:?subject={{urlencode (stringFormat "How do you like %s so far?" companyName) space="%20"}}&body={{urlencode (stringFormat "Hey,%n %nI saw that you signed up for %s. What do you think of it so far?%n %nBy the way, if you\'ve lost the link to %s, here it is again - %s" companyName companyName shareLinks.emailShareLink) space="%20"}}',
      },
      type: 'UNKNOWN'
    },
    facebook: {
      title: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.FACEBOOK.facebookShareSubject')}}',
      summary: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.FACEBOOK.facebookShareBody')}}',
      link: '{{shareLinks.facebookShareLink}}',
{{#if variables.widget.REFERRER_WIDGET.content.sharingOptions.FACEBOOK.facebookShareImageURL}}
      shareImage: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.FACEBOOK.facebookShareImageURL')}}',
{{else}}
      shareImage: null,
{{/if}}
      appId: '157382547792399',
      redirectUrl: 'http://app.referralsaasquatch.com/widget/close'
    },
    twitter: {
      message: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.TWITTER.twitterShareBody')}}'
    },
    mobile: {
      sharelink : '{{shareLinks.shareLink}}',
      emailBody: '{{urlencode (stringFormat "Sign up for a %s account and we both get $%s free credit. Use this link %s" companyName (math programDetails.referredRewardDetails.credit ' / 100') shareLinks.mobileEmailShareLink)}}',
      facebookBody: '{{urlencode (stringFormat "Sign up for a %s account and we both get $%s free credit. Use this link %s" companyName (math programDetails.referredRewardDetails.credit ' / 100') shareLinks.mobileFacebookShareLink)}}',
      twitterBody: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.TWITTER.twitterShareBody') space="%20"}}',
      twitterShareLink : '{{shareLinks.mobileTwitterShareLink}}',
      facebookShareLink : '{{shareLinks.mobileFacebookShareLink}}',
      emailShareLink: '{{shareLinks.mobileEmailShareLink}}'
    },
    sms: {
      body: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.SMS.smsShareBody') space="%20"}}'
    },
    whatsapp: {
      body: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.SMS.smsShareBody') space="%20"}}'
    },
    fallbackImg: 'https://www.gravatar.com/avatar/0?d=blank'
  };<commit_msg>EM - back to correct WhatsApp message<commit_after>{{!--

  Core JavaScript to power widget functionality.

  TODO: Eventually this should get merged in as part of the {{squatchHead}} core helper instead of being manually included in every template

  Eventually we can abstract this.

--}}

<script>
  window.squatch = window.squatch || {};

  window.squatch.user = {
    code     : '{{referredBy.referredByUser.referralCode}}',
    sharelink: '{{shareLinks.shareLink}}',
    email    : {
      share : {
        subject: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.EMAIL.emailShareSubject') space="%20"}}',
        body: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.EMAIL.emailShareBody') space="%20"}}',
        mailToLink: 'mailto:?subject={{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.EMAIL.emailShareSubject') space="%20"}}&body={{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.EMAIL.emailShareBody') space="%20"}}',
      },
      reminder: {
        subject: '{{urlencode (stringFormat "How do you like %s so far?" companyName) space="%20"}}',
        body: '{{urlencode (stringFormat "Hey,%n %nI saw that you signed up for %s. What do you think of it so far?%n %nBy the way, if you\'ve lost the link to %s, here it is again - %s" companyName companyName shareLinks.emailShareLink) space="%20"}}',
        mailToLink: 'mailto:?subject={{urlencode (stringFormat "How do you like %s so far?" companyName) space="%20"}}&body={{urlencode (stringFormat "Hey,%n %nI saw that you signed up for %s. What do you think of it so far?%n %nBy the way, if you\'ve lost the link to %s, here it is again - %s" companyName companyName shareLinks.emailShareLink) space="%20"}}',
      },
      type: 'UNKNOWN'
    },
    facebook: {
      title: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.FACEBOOK.facebookShareSubject')}}',
      summary: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.FACEBOOK.facebookShareBody')}}',
      link: '{{shareLinks.facebookShareLink}}',
{{#if variables.widget.REFERRER_WIDGET.content.sharingOptions.FACEBOOK.facebookShareImageURL}}
      shareImage: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.FACEBOOK.facebookShareImageURL')}}',
{{else}}
      shareImage: null,
{{/if}}
      appId: '157382547792399',
      redirectUrl: 'http://app.referralsaasquatch.com/widget/close'
    },
    twitter: {
      message: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.TWITTER.twitterShareBody')}}'
    },
    mobile: {
      sharelink : '{{shareLinks.shareLink}}',
      emailBody: '{{urlencode (stringFormat "Sign up for a %s account and we both get $%s free credit. Use this link %s" companyName (math programDetails.referredRewardDetails.credit ' / 100') shareLinks.mobileEmailShareLink)}}',
      facebookBody: '{{urlencode (stringFormat "Sign up for a %s account and we both get $%s free credit. Use this link %s" companyName (math programDetails.referredRewardDetails.credit ' / 100') shareLinks.mobileFacebookShareLink)}}',
      twitterBody: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.TWITTER.twitterShareBody') space="%20"}}',
      twitterShareLink : '{{shareLinks.mobileTwitterShareLink}}',
      facebookShareLink : '{{shareLinks.mobileFacebookShareLink}}',
      emailShareLink: '{{shareLinks.mobileEmailShareLink}}'
    },
    sms: {
      body: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.SMS.smsShareBody') space="%20"}}'
    },
    whatsapp: {
      body: '{{urlencode (variables 'widget.REFERRER_WIDGET.content.sharingOptions.WHATSAPP.whatsAppShareBody') space="%20"}}'
    },
    fallbackImg: 'https://www.gravatar.com/avatar/0?d=blank'
  };
{'fraction_non_alphanumeric': 0.14325105042016806, 'fraction_numerical': 0.011554621848739496, 'mean_word_length': 4.551749271137027, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '665203', 'n_tokens_mistral': 2458, 'n_tokens_neox': 2357, 'n_words': 551}