text: /**
   * Copyright 2016 Google Inc. All rights reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
  */
  
  // DO NOT EDIT THIS GENERATED OUTPUT DIRECTLY!
  // This file should be overwritten as part of your build process.
  // If you need to extend the behavior of the generated service worker, the best approach is to write
  // additional code and include it using the importScripts option:
  //   https://github.com/GoogleChrome/sw-precache#importscripts-arraystring
  //
  // Alternatively, it's possible to make changes to the underlying template file and then use that as the
  // new base for generating output, via the templateFilePath option:
  //   https://github.com/GoogleChrome/sw-precache#templatefilepath-string
  //
  // If you go that route, make sure that whenever you update your sw-precache dependency, you reconcile any
  // changes made to this original template file with your modified copy.
  
  // This generated service worker JavaScript will precache your site's resources.
  // The code needs to be saved in a .js file at the top-level of your site, and registered
  // from your pages in order to be used. See
  // https://github.com/googlechrome/sw-precache/blob/master/demo/app/js/service-worker-registration.js
  // for an example of how you can register this script and handle various service worker events.
  
  /* eslint-env worker, serviceworker */
  /* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */
  'use strict';
  
  var precacheConfig = [["674f50d287a8c48dc19ba404d20fe713.eot","674f50d287a8c48dc19ba404d20fe713"],["912ec66d7572ff821749319396470bde.svg","912ec66d7572ff821749319396470bde"],["af7ae505a9eed503f8b8e6982036873e.woff2","af7ae505a9eed503f8b8e6982036873e"],["assets/css/.gitkeep","0244ae8e5e85ccf498857a547b63b39e"],["assets/data.json","ba5508d05a7cef388d6ffa9db73b91a7"],["assets/humans.txt","ead1fb6f48cde7ca717a8a535eedcb1d"],["assets/icon/Godiva_Header.png","25be6cfd1fc7f862e6c27ebabda82194"],["assets/icon/android-icon-144x144.png","7a11cb68378262184377a4c77d202cda"],["assets/icon/android-icon-192x192.png","0f882d624ae536b5b004ecb7dcb719cb"],["assets/icon/android-icon-36x36.png","7226392317bdf678dc1483093c8cc895"],["assets/icon/android-icon-48x48.png","24c6dab69274a9276cf03f5ba1f4fb0a"],["assets/icon/android-icon-72x72.png","861b834deeefa3b3c4072567ccaa5fe8"],["assets/icon/android-icon-96x96.png","bc0ee5518ccca23d55024f212d2b7746"],["assets/icon/apple-icon-114x114.png","847154dd8bbdb2e90d516eab8db06123"],["assets/icon/apple-icon-120x120.png","c64b0b11ed6a49003e59a5d309b47824"],["assets/icon/apple-icon-144x144.png","7a11cb68378262184377a4c77d202cda"],["assets/icon/apple-icon-152x152.png","67ab8b40a30e5b29de0cfab7fd792ef8"],["assets/icon/apple-icon-180x180.png","11d3cacf48cc772a61fcf7eaa5ba0237"],["assets/icon/apple-icon-57x57.png","a55c0ebdeb40e21d14a239995aab6f3e"],["assets/icon/apple-icon-60x60.png","a52fffde474d89e2104a5871538ac53d"],["assets/icon/apple-icon-72x72.png","861b834deeefa3b3c4072567ccaa5fe8"],["assets/icon/apple-icon-76x76.png","e2b5310a67646c0922533c7d377a429c"],["assets/icon/apple-icon-precomposed.png","24820ac96dfac68ec90211c7b56e49c6"],["assets/icon/apple-icon.png","24820ac96dfac68ec90211c7b56e49c6"],["assets/icon/browserconfig.xml","97775b1fd3b6e6c13fc719c2c7dd0ffe"],["assets/icon/favicon-16x16.png","cd975b64fd102830af00a0b8d8755b9c"],["assets/icon/favicon-32x32.png","17fc1cd596e4ac4769de7a2d3d7e0065"],["assets/icon/favicon-96x96.png","bc0ee5518ccca23d55024f212d2b7746"],["assets/icon/favicon.ico","3ff657c99464aaedc4102447c07871e9"],["assets/icon/ms-icon-144x144.png","7a11cb68378262184377a4c77d202cda"],["assets/icon/ms-icon-150x150.png","552cf0c0c5d2daf6e6a7b7205c6534e1"],["assets/icon/ms-icon-310x310.png","856b129c3a9b7ba6daeaf188e66e8581"],["assets/icon/ms-icon-70x70.png","38611f8085977b0f188d40f55caa5c1d"],["assets/images/angular-logo.png","df87d88859a406e13d04c842f81a3d5d"],["assets/images/angularclass-avatar.png","a1f5dbf78383c2345288642a7afce0f1"],["assets/images/angularclass-logo.png","8b51737e720ac35936e349fbf76b735f"],["assets/images/calendar.png","9281f08b89420ed7a5c39e452e44d915"],["assets/images/comment.png","ecf0a567438647b961f8fe84ad039cb1"],["assets/images/customers.png","a826471ab073f8a521071b4035ceb8c1"],["assets/images/email-campaign.png","b0432595186214dcfd6e2dc2aa8e0508"],["assets/images/email-campaign2.png","fce503783d766f75ff171b8c45263e12"],["assets/images/female-default.png","cdc87808f6acd75d0f804ef405510e2f"],["assets/images/female.png","c3010d24340749edbc16b1786f8b0720"],["assets/images/flags.png","ae33acae404631e997ef8d91dae08ccd"],["assets/images/flags@2x.png","f2c77a6b7e26ff160fdb4193b383b1ea"],["assets/images/galaxy-s5.png","c7368c5ab62b563b5be02ba95e22f159"],["assets/images/iphone5S.png","b58e15298b5138f04e190efd1d039b73"],["assets/images/iphone6.png","0a0e67b058d73ada0db90e11e3930811"],["assets/images/male-default.png","342c5c1814f07fd896a48c78c180257d"],["assets/images/male.png","43424c740d27199b107b045b4626c1bb"],["assets/images/revenue.png","7174be0e5595c5fa6ccd15dfd771613e"],["assets/images/smartphone.png","3caaf9d8a8d98e96d604af11761d0705"],["assets/images/sms-campaign.jpg","cb92fd652932125b09b336b331dfc9e3"],["assets/images/soapp.png","e57fdab1174c3842a56ed2af695d80eb"],["assets/lang/countries.json","cd2ca2156f3e7c1b5ebbe8818bf2f83c"],["assets/lang/en.json","168d3dbba2f9bf5f84fb290b01e2a5d4"],["assets/lang/fr.json","625319d57c6597bea67cad9475fb5379"],["assets/lang/languages.json","04f191896d2c4170e8c41204735453f5"],["assets/manifest.json","67c2a2d48c4f20506708cff7bbbe3ed6"],["assets/robots.txt","7f6b06b8b0ea5858216e447fb96ea519"],["assets/service-worker.js","deb2e620290839bb4fec8fa803cf681d"],["b06871f281fee6b241d60582ae9369b9.ttf","b06871f281fee6b241d60582ae9369b9"],["customer/index.html","07f314912e57bb77c5331767e43647da"],["fee66e712a8a08eef5805a46892932ad.woff","fee66e712a8a08eef5805a46892932ad"],["humans.txt","ead1fb6f48cde7ca717a8a535eedcb1d"],["inline.d21101d30fdfb9221d2f.bundle.js","48bc48e7ebcbe18b9708b77d23f62aa1"],["main.aba7fc2e7a8c7af5cbe89718289dfa5b.css","aba7fc2e7a8c7af5cbe89718289dfa5b"],["polyfills.95c3b81dcbf8c1af4ea3.bundle.js","9579ff7a56c969f8645e900ec09ff9db"],["robots.txt","7f6b06b8b0ea5858216e447fb96ea519"]];
  var cacheName = 'sw-precache-v3-AppWardsBO-' + (self.registration ? self.registration.scope : '');
  
  
  var ignoreUrlParametersMatching = [/^utm_/];
  
  
  
  var addDirectoryIndex = function (originalUrl, index) {
      var url = new URL(originalUrl);
      if (url.pathname.slice(-1) === '/') {
        url.pathname += index;
      }
      return url.toString();
    };
  
  var cleanResponse = function (originalResponse) {
      // If this is not a redirected response, then we don't have to do anything.
      if (!originalResponse.redirected) {
        return Promise.resolve(originalResponse);
      }
  
      // Firefox 50 and below doesn't support the Response.body stream, so we may
      // need to read the entire body to memory as a Blob.
      var bodyPromise = 'body' in originalResponse ?
        Promise.resolve(originalResponse.body) :
        originalResponse.blob();
  
      return bodyPromise.then(function(body) {
        // new Response() is happy when passed either a stream or a Blob.
        return new Response(body, {
          headers: originalResponse.headers,
          status: originalResponse.status,
          statusText: originalResponse.statusText
        });
      });
    };
  
  var createCacheKey = function (originalUrl, paramName, paramValue,
                             dontCacheBustUrlsMatching) {
      // Create a new URL object to avoid modifying originalUrl.
      var url = new URL(originalUrl);
  
      // If dontCacheBustUrlsMatching is not set, or if we don't have a match,
      // then add in the extra cache-busting URL parameter.
      if (!dontCacheBustUrlsMatching ||
          !(url.pathname.match(dontCacheBustUrlsMatching))) {
        url.search += (url.search ? '&' : '') +
          encodeURIComponent(paramName) + '=' + encodeURIComponent(paramValue);
      }
  
      return url.toString();
    };
  
  var isPathWhitelisted = function (whitelist, absoluteUrlString) {
      // If the whitelist is empty, then consider all URLs to be whitelisted.
      if (whitelist.length === 0) {
        return true;
      }
  
      // Otherwise compare each path regex to the path of the URL passed in.
      var path = (new URL(absoluteUrlString)).pathname;
      return whitelist.some(function(whitelistedPathRegex) {
        return path.match(whitelistedPathRegex);
      });
    };
  
  var stripIgnoredUrlParameters = function (originalUrl,
      ignoreUrlParametersMatching) {
      var url = new URL(originalUrl);
      // Remove the hash; see https://github.com/GoogleChrome/sw-precache/issues/290
      url.hash = '';
  
      url.search = url.search.slice(1) // Exclude initial '?'
        .split('&') // Split into an array of 'key=value' strings
        .map(function(kv) {
          return kv.split('='); // Split each 'key=value' string into a [key, value] array
        })
        .filter(function(kv) {
          return ignoreUrlParametersMatching.every(function(ignoredRegex) {
            return !ignoredRegex.test(kv[0]); // Return true iff the key doesn't match any of the regexes.
          });
        })
        .map(function(kv) {
          return kv.join('='); // Join each [key, value] array into a 'key=value' string
        })
        .join('&'); // Join the array of 'key=value' strings into a string with '&' in between each
  
      return url.toString();
    };
  
  
  var hashParamName = '_sw-precache';
  var urlsToCacheKeys = new Map(
    precacheConfig.map(function(item) {
      var relativeUrl = item[0];
      var hash = item[1];
      var absoluteUrl = new URL(relativeUrl, self.location);
      var cacheKey = createCacheKey(absoluteUrl, hashParamName, hash, /\.\w{8}\./);
      return [absoluteUrl.toString(), cacheKey];
    })
  );
  
  function setOfCachedUrls(cache) {
    return cache.keys().then(function(requests) {
      return requests.map(function(request) {
        return request.url;
      });
    }).then(function(urls) {
      return new Set(urls);
    });
  }
  
  self.addEventListener('install', function(event) {
    event.waitUntil(
      caches.open(cacheName).then(function(cache) {
        return setOfCachedUrls(cache).then(function(cachedUrls) {
          return Promise.all(
            Array.from(urlsToCacheKeys.values()).map(function(cacheKey) {
              // If we don't have a key matching url in the cache already, add it.
              if (!cachedUrls.has(cacheKey)) {
                var request = new Request(cacheKey, {credentials: 'same-origin'});
                return fetch(request).then(function(response) {
                  // Bail out of installation unless we get back a 200 OK for
                  // every request.
                  if (!response.ok) {
                    throw new Error('Request for ' + cacheKey + ' returned a ' +
                      'response with status ' + response.status);
                  }
  
                  return cleanResponse(response).then(function(responseToCache) {
                    return cache.put(cacheKey, responseToCache);
                  });
                });
              }
            })
          );
        });
      }).then(function() {
        
        // Force the SW to transition from installing -> active state
        return self.skipWaiting();
        
      })
    );
  });
  
  self.addEventListener('activate', function(event) {
    var setOfExpectedUrls = new Set(urlsToCacheKeys.values());
  
    event.waitUntil(
      caches.open(cacheName).then(function(cache) {
        return cache.keys().then(function(existingRequests) {
          return Promise.all(
            existingRequests.map(function(existingRequest) {
              if (!setOfExpectedUrls.has(existingRequest.url)) {
                return cache.delete(existingRequest);
              }
            })
          );
        });
      }).then(function() {
        
        return self.clients.claim();
        
      })
    );
  });
  
  
  self.addEventListener('fetch', function(event) {
    if (event.request.method === 'GET') {
      // Should we call event.respondWith() inside this fetch event handler?
      // This needs to be determined synchronously, which will give other fetch
      // handlers a chance to handle the request if need be.
      var shouldRespond;
  
      // First, remove all the ignored parameters and hash fragment, and see if we
      // have that URL in our cache. If so, great! shouldRespond will be true.
      var url = stripIgnoredUrlParameters(event.request.url, ignoreUrlParametersMatching);
      shouldRespond = urlsToCacheKeys.has(url);
  
      // If shouldRespond is false, check again, this time with 'index.html'
      // (or whatever the directoryIndex option is set to) at the end.
      var directoryIndex = 'index.html';
      if (!shouldRespond && directoryIndex) {
        url = addDirectoryIndex(url, directoryIndex);
        shouldRespond = urlsToCacheKeys.has(url);
      }
  
      // If shouldRespond is still false, check to see if this is a navigation
      // request, and if so, whether the URL matches navigateFallbackWhitelist.
      var navigateFallback = '';
      if (!shouldRespond &&
          navigateFallback &&
          (event.request.mode === 'navigate') &&
          isPathWhitelisted(["^(?!\\/__).*"], event.request.url)) {
        url = new URL(navigateFallback, self.location).toString();
        shouldRespond = urlsToCacheKeys.has(url);
      }
  
      // If shouldRespond was set to true at any point, then call
      // event.respondWith(), using the appropriate cache key.
      if (shouldRespond) {
        event.respondWith(
          caches.open(cacheName).then(function(cache) {
            return cache.match(urlsToCacheKeys.get(url)).then(function(response) {
              if (response) {
                return response;
              }
              throw Error('The cached response that was expected is missing.');
            });
          }).catch(function(e) {
            // Fall back to just fetch()ing the request if some unexpected error
            // prevented the cached response from being valid.
            console.warn('Couldn\'t serve response for "%s" from cache: %O', event.request.url, e);
            return fetch(event.request);
          })
        );
      }
    }
  });