PageSourceSearch

https://www.moss.co.uk/sw.js

js moss.co.uk collected 2026-10-03 22:10:50 UTC 30,508 bytes, 3 lines download raw bytes

1!function(){"use strict";var e={86836:function(){try{self["workbox:broadcast-update:7.2.0"]&&_()}catch(e){}},40136:function(){try{self["workbox:core:7.2.0"]&&_()}catch(e){}},35859:function(){try{self["workbox:navigation-preload:7.2.0"]&&_()}catch(e){}},14447:function(){try{self["workbox:precaching:7.2.0"]&&_()}catch(e){}},51331:function(){try{self["workbox:range-requests:7.2.0"]&&_()}catch(e){}},81227:function(){try{self["workbox:routing:7.2.0"]&&_()}catch(e){}},97390:function(){try{self["workbox:strategies:7.2.0"]&&_()}catch(e){}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.rv=function(){return"1.5.8"},n.ruid="[email protected]",function(){let e,t,r;try{self["workbox:window:7.2.0"]&&_()}catch(e){}function a(e,t){return new Promise(function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])})}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r.key),r)}}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}try{self["workbox:core:7.2.0"]&&_()}catch(e){}var c,l,h,u,f=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function d(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var p=function(e,t){this.type=e,Object.assign(this,t)};function w(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function g(){}var y={type:"SKIP_WAITING"};function m(e,t){if(!t)return e&&e.then?e.then(g):Promise.resolve()}!function(e){function t(t,n){var r,a;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new f,r.en=new f,r.on=new f,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!d(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,a=n.state,i=n===r.vn,s={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(s.isUpdate=!0),r.dispatchEvent(new p(a,s)),"installed"===a?r.wn=self.setTimeout(function(){"installed"===a&&t.waiting===n&&r.dispatchEvent(new p("waiting",s))},200):"activating"===a&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.yn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new p("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},a=function(e){var t=e.data,n=e.ports,a=e.source;return w(r.getSW(),function(){r.an.has(a)&&r.dispatchEvent(new p("message",{data:t,originalEvent:e,ports:n,sw:a}))})},r.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(a.apply(this,e))}catch(e){return Promise.reject(e)}},r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,s(t,e);var n,r=t.prototype;r.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r,a,i,s=this;return w((r=function(){if(!n&&"complete"!==document.readyState)return m(new Promise(function(e){return window.addEventListener("load",e)}))},a=function(){return s.mn=!!navigator.serviceWorker.controller,s.dn=s.pn(),w(s.bn(),function(e){s.fn=e,s.dn&&(s.hn=s.dn,s.en.resolve(s.dn),s.on.resolve(s.dn),s.dn.addEventListener("statechange",s.ln,{once:!0}));var t=s.fn.waiting;return t&&d(t.scriptURL,s.sn.toString())&&(s.hn=t,Promise.resolve().then(function(){s.dispatchEvent(new p("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),s.hn&&(s.rn.resolve(s.hn),s.an.add(s.hn)),s.fn.addEventListener("updatefound",s.cn),navigator.serviceWorker.addEventListener("controllerchange",s.yn),s.fn})},(i=r())&&i.then?i.then(a):a(i)))}catch(e){return Promise.reject(e)}},r.update=function(){try{return this.fn?w(m(this.fn.update())):w()}catch(e){return Promise.reject(e)}},r.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},r.messageSW=function(e){try{return w(this.getSW(),function(t){return a(t,e)})}catch(e){return Promise.reject(e)}},r.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&a(this.fn.waiting,y)},r.pn=function(){var e=navigator.serviceWorker.controller;return e&&d(e.scriptURL,this.sn.toString())?e:void 0},r.bn=function(){try{var e=this;return w(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(function(){return w(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e}))}catch(e){return Promise.reject(e)}},i(t.prototype,[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}]),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1})}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.jn(e).add(t)},t.removeEventListener=function(e,t){this.jn(e).delete(t)}
1,t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,void 0):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.jn(e.type));!(t=n()).done;)(0,t.value)(e)},t.jn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),n(40136);class v extends Error{constructor(e,t){super(((e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n})(e,t)),this.name=e,this.details=t}}n(81227);let b=e=>e&&"object"==typeof e?e:{handle:e};class R{constructor(e,t,n="GET"){this.handler=b(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=b(e)}}class C extends R{constructor(e,t,n){super(({url:t})=>{let n=e.exec(t.href);if(n)return t.origin!==location.origin&&0!==n.index?void 0:n.slice(1)},t,n)}}class k{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{let{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&"CACHE_URLS"===e.data.type){let{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(t=>{"string"==typeof t&&(t=[t]);let n=new Request(...t);return this.handleRequest({request:n,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){let n,r=new URL(e.url,location.href);if(!r.protocol.startsWith("http"))return;let a=r.origin===location.origin,{params:i,route:s}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:r}),o=s&&s.handler,c=e.method;if(!o&&this._defaultHandlerMap.has(c)&&(o=this._defaultHandlerMap.get(c)),!o)return;try{n=o.handle({url:r,request:e,event:t,params:i})}catch(e){n=Promise.reject(e)}let l=s&&s.catchHandler;return n instanceof Promise&&(this._catchHandler||l)&&(n=n.catch(async n=>{if(l)try{return await l.handle({url:r,request:e,event:t,params:i})}catch(e){e instanceof Error&&(n=e)}if(this._catchHandler)return this._catchHandler.handle({url:r,request:e,event:t});throw n})),n}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){for(let a of this._routes.get(n.method)||[]){let i,s=a.match({url:e,sameOrigin:t,request:n,event:r});if(s)return Array.isArray(i=s)&&0===i.length||s.constructor===Object&&0===Object.keys(s).length?i=void 0:"boolean"==typeof s&&(i=void 0),{route:a,params:i}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,b(e))}setCatchHandler(e){this._catchHandler=b(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new v("unregister-route-but-not-found-with-method",{method:e.method});let t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new v("unregister-route-route-not-registered")}}let P=()=>(e||((e=new k).addFetchListener(),e.addCacheListener()),e);function L(e,t,n){let r;if("string"==typeof e){let a=new URL(e,location.href);r=new R(({url:e})=>e.href===a.href,t,n)}else if(e instanceof RegExp)r=new C(e,t,n);else if("function"==typeof e)r=new R(e,t,n);else if(e instanceof R)r=e;else throw new v("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return P().registerRoute(r),r}let U={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},E=e=>[U.prefix,e,U.suffix].filter(e=>e&&e.length>0).join("-"),T=e=>e||E(U.precache);function x(e,t){let n=new URL(e);for(let e of t)n.searchParams.delete(e);return n.href}async function S(e,t,n,r){let a=x(t.url,n);if(t.url===a)return e.match(t,r);let i=Object.assign(Object.assign({},r),{ignoreSearch:!0});for(let s of(await e.keys(t,i)))if(a===x(s.url,n))return e.match(s,r)}class j{constructor(){this.promise=new Promise((e,t)=>
1{this.resolve=e,this.reject=t})}}let K=new Set;async function W(){for(let e of K)await e()}function O(e){return new Promise(t=>setTimeout(t,e))}function M(e){return"string"==typeof e?new Request(e):e}n(97390);class q{constructor(e,t){for(const n of(this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new j,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map,this._plugins))this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){let{event:t}=this,n=M(e);if("navigate"===n.mode&&t instanceof FetchEvent&&t.preloadResponse){let e=await t.preloadResponse;if(e)return e}let r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(let e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:t})}catch(e){if(e instanceof Error)throw new v("plugin-error-request-will-fetch",{thrownErrorMessage:e.message})}let a=n.clone();try{let e;for(let r of(e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions),this.iterateCallbacks("fetchDidSucceed")))e=await r({event:t,request:a,response:e});return e}catch(e){throw r&&await this.runCallbacks("fetchDidFail",{error:e,event:t,originalRequest:r.clone(),request:a.clone()}),e}}async fetchAndCachePut(e){let t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){let t,n=M(e),{cacheName:r,matchOptions:a}=this._strategy,i=await this.getCacheKey(n,"read"),s=Object.assign(Object.assign({},a),{cacheName:r});for(let e of(t=await caches.match(i,s),this.iterateCallbacks("cachedResponseWillBeUsed")))t=await e({cacheName:r,matchOptions:a,cachedResponse:t,request:i,event:this.event})||void 0;return t}async cachePut(e,t){let n=M(e);await O(0);let r=await this.getCacheKey(n,"write");if(!t)throw new v("cache-put-with-no-response",{url:new URL(String(r.url),location.href).href.replace(RegExp(`^${location.origin}`),"")});let a=await this._ensureResponseSafeToCache(t);if(!a)return!1;let{cacheName:i,matchOptions:s}=this._strategy,o=await self.caches.open(i),c=this.hasCallback("cacheDidUpdate"),l=c?await S(o,r.clone(),["__WB_REVISION__"],s):null;try{await o.put(r,c?a.clone():a)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await W(),e}for(let e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:i,oldResponse:l,newResponse:a.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){let n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(let e of this.iterateCallbacks("cacheKeyWillBeUsed"))r=M(await e({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(let t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(let n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(let t of this._strategy.plugins)if("function"==typeof t[e]){let n=this._pluginStateMap.get(t),r=r=>{let a=Object.assign(Object.assign({},r),{state:n});return t[e](a)};yield r}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(let e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return!n&&t&&200!==t.status&&(t=void 0),t}}class A{constructor(e={}){this.cacheName=e.cacheName||E(U.runtime),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){let[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});let t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r=new q(this,{event:t,request:n,params:"params"in e?e.params:void 0}),a=this._getResponse(r,n,t),i=this._awaitComplete(a,r,n,t);return[a,i]}async _getResponse(e,t,n){let r;await e.runCallbacks("handlerWillStart",{event:n,request:t});try{if(!(r=await this._handle(t,e))||"error"===r.type)throw new v("no-response",{url:t.url})}catch(a){if(a instanceof Error){for(let i of e.iterateCallbacks("handlerDidError"))if(r=await i({error:a,event:n,request:t}))break}if(r);else throw a}for(let a of e.iterateCallbacks("handlerWillRespond"))r=await a({event:n,request:t,response:r});return r}async _awaitComplete(e,t,n,r){let a,i;try{a=await e}catch(e){}try{await t.runCallbacks("handlerDidRespond",{event:r,request:n,response:a}),await t.doneWaiting()}catch(e){e instanceof Error&&(i=e)}if(await t.runCallbacks("handlerDidComplete",{event:r,request:n,response:a,error:i}),t.destroy(),i)throw i}}
1class N extends A{async _handle(e,t){let n,r=await t.cacheMatch(e);if(!r)try{r=await t.fetchAndCachePut(e)}catch(e){e instanceof Error&&(n=e)}if(!r)throw new v("no-response",{url:e.url,error:n});return r}}class I extends A{async _handle(e,t){let n=await t.cacheMatch(e);if(!n)throw new v("no-response",{url:e.url});return n}}let F={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class H extends A{constructor(e={}){super(e),this.plugins.some(e=>"cacheWillUpdate"in e)||this.plugins.unshift(F),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){let n,r=[],a=[];if(this._networkTimeoutSeconds){let{id:i,promise:s}=this._getTimeoutPromise({request:e,logs:r,handler:t});n=i,a.push(s)}let i=this._getNetworkPromise({timeoutId:n,request:e,logs:r,handler:t});a.push(i);let s=await t.waitUntil((async()=>await t.waitUntil(Promise.race(a))||await i)());if(!s)throw new v("no-response",{url:e.url});return s}_getTimeoutPromise({request:e,logs:t,handler:n}){let r;return{promise:new Promise(t=>{r=setTimeout(async()=>{t(await n.cacheMatch(e))},1e3*this._networkTimeoutSeconds)}),id:r}}async _getNetworkPromise({timeoutId:e,request:t,logs:n,handler:r}){let a,i;try{i=await r.fetchAndCachePut(t)}catch(e){e instanceof Error&&(a=e)}return e&&clearTimeout(e),(a||!i)&&(i=await r.cacheMatch(t)),i}}class D extends A{constructor(e={}){super(e),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){let n,r;try{let r=[t.fetch(e)];if(this._networkTimeoutSeconds){let e=O(1e3*this._networkTimeoutSeconds);r.push(e)}if(!(n=await Promise.race(r)))throw Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`)}catch(e){e instanceof Error&&(r=e)}if(!n)throw new v("no-response",{url:e.url,error:r});return n}}class $ extends A{constructor(e={}){super(e),this.plugins.some(e=>"cacheWillUpdate"in e)||this.plugins.unshift(F)}async _handle(e,t){let n,r=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(r);let a=await t.cacheMatch(e);if(a);else try{a=await r}catch(e){e instanceof Error&&(n=e)}if(!a)throw new v("no-response",{url:e.url,error:n});return a}}function B(e,t){let n=t();return e.waitUntil(n),n}n(35859),n(14447);class G{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){let e=t.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}}class z{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{let n=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return n?new Request(n,{headers:e.headers}):e},this._precacheController=e}}async function J(e,n){let r=null;if(e.url&&(r=new URL(e.url).origin),r!==self.location.origin)throw new v("cross-origin-copy-response",{origin:r});let a=e.clone(),i={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},s=n?n(i):i,o=!function(){if(void 0===t){let e=new Response("");if("body"in e)try{new Response(e.body),t=!0}catch(e){t=!1}t=!1}return t}()?await a.blob():a.body;return new Response(o,s)}class V extends A{constructor(e={}){e.cacheName=T(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(V.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){let n=await t.cacheMatch(e);return n||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n,r=t.params||{};if(this._fallbackToNetwork){let a=r.integrity,i=e.integrity,s=!i||i===a;n=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?i||a:void 0})),a&&s&&"no-cors"!==e.mode&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new v("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();let n=await t.fetch(e);
1if(!await t.cachePut(e,n.clone()))throw new v("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(let[n,r]of this.plugins.entries())r!==V.copyRedirectedCacheableResponsesPlugin&&(r===V.defaultPrecacheCacheabilityPlugin&&(e=n),r.cacheWillUpdate&&t++);0===t?this.plugins.push(V.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}V.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},V.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await J(e):e};class Q{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new V({cacheName:T(e),plugins:[...t,new z({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){let t=[];for(let n of e){"string"==typeof n?t.push(n):n&&void 0===n.revision&&t.push(n.url);let{cacheKey:e,url:r}=function(e){if(!e)throw new v("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){let t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}let{revision:t,url:n}=e;if(!n)throw new v("add-to-cache-list-unexpected-type",{entry:e});if(!t){let e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}let r=new URL(n,location.href),a=new URL(n,location.href);return r.searchParams.set("__WB_REVISION__",t),{cacheKey:r.href,url:a.href}}(n),a="string"!=typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(r)&&this._urlsToCacheKeys.get(r)!==e)throw new v("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(r),secondEntry:e});if("string"!=typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new v("add-to-cache-list-conflicting-integrities",{url:r});this._cacheKeysToIntegrities.set(e,n.integrity)}this._urlsToCacheKeys.set(r,e),this._urlsToCacheModes.set(r,a),t.length>0&&console.warn(`Workbox is precaching URLs without revision info: ${t.join(", ")}
2This is generally NOT safe. Learn more at https://bit.ly/wb-precache`)}}install(e){return B(e,async()=>{let t=new G;for(let[n,r]of(this.strategy.plugins.push(t),this._urlsToCacheKeys)){let t=this._cacheKeysToIntegrities.get(r),a=this._urlsToCacheModes.get(n),i=new Request(n,{integrity:t,cache:a,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:i,event:e}))}let{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return B(e,async()=>{let e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),n=new Set(this._urlsToCacheKeys.values()),r=[];for(let a of t)n.has(a.url)||(await e.delete(a),r.push(a.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){let t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){let t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){let t=this.getCacheKeyForURL(e);if(!t)throw new v("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let X=()=>(r||(r=new Q),r);function Y(e){return X().matchPrecache(e)}async function Z(e){let t;if(!e)return;let n=await self.clients.matchAll({type:"window"}),r=new Set(n.map(e=>e.id)),a=performance.now();for(;performance.now()-a<2e3&&!(t=(n=await self.clients.matchAll({type:"window"})).find(t=>e?t.id===e:!r.has(t.id)));)await O(100);return t}n(86836);let ee=["content-length","etag","last-modified"],et=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function en(e){return{cacheName:e.cacheName,updatedURL:e.request.url}}class er{constructor({generatePayload:e,headersToCheck:t,notifyAllClients:n}={}){this._headersToCheck=t||ee,this._generatePayload=e||en,this._notifyAllClients=null==n||n}async notifyIfUpdated(e){if(e.oldResponse){var t,n,r;if(t=e.oldResponse,n=e.newResponse,!(!(r=this._headersToCheck).some(e=>t.headers.has(e)&&n.headers.has(e))||r.every(e=>{let r=t.headers.has(e)===n.headers.has(e),a=t.headers.get(e)===n.headers.get(e);return r&&a}))){let t={type:"CACHE_UPDATED",meta:"workbox-broadcast-update",payload:this._generatePayload(e)};if("navigate"===e.request.mode){let t;e.event instanceof FetchEvent&&(t=e.event.resultingClientId),(!await Z(t)||et)&&await O(3500)}if(this._notifyAllClients)for(let e of(await self.clients.matchAll({type:"window"})))e.postMessage(t);else if(e.event instanceof FetchEvent){let n=await self.clients.get(e.event.clientId);null==n||n.postMessage(t)}}}}}async function ea(e,t){try{if(206===t.status)return t;let n=e.headers.get("range");if(!n)throw new v("no-range-header");let r=function(e){let t=e.trim().toLowerCase();if(!t.startsWith("bytes="))throw new v("unit-must-be-bytes",{normalizedRangeHeader:t});if(t.includes(","))throw new v("single-range-only",{normalizedRangeHeader:t});let n=/(\d*)-(\d*)/.exec(t);if(!n||!(n[1]||n[2]))throw new v("invalid-range-values",{normalizedRangeHeader:t});return{start:""===n[1]?void 0:Number(n[1]),end:""===n[2]?void 0:Number(n[2])}}(n),a=await t.blob(),i=function(e,t,n){let r,a,i=e.size;if(n&&n>i||t&&t<0)throw new v("range-not-satisfiable",{size:i,end:n,start:t});return void 0!==t&&void 0!==n?(r=t,a=n+1):void 0!==t&&void 0===n?(r=t,a=i):void 0!==n&&void 0===t&&(r=i-n,a=i),{start:r,end:a}}(a,r.start,r.end),s=a.slice(i.start,i.end),o=s.size,c=new Response(s,{status:206,statusText:"Partial Content",headers:t.headers});return c.headers.set("Content-Length",String(o)),c.headers.set("Content-Range",`bytes ${i.start}-${i.end-1}
2/${a.size}`),c}catch(e){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}n(51331);var ei=function(){return(ei=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},es=function(e,t){var n,r,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(o){return function(c){var l=[o,c];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(s=0)),s;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,r=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){s.label=l[1];break}if(6===l[0]&&s.label<a[1]){s.label=a[1],a=l;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(l);break}a[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},eo=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},ec=function(e,t,n){if(n||2==arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))},el=new class{constructor(e){this.cacheDidUpdate=async e=>{this._broadcastUpdate.notifyIfUpdated(e).then(()=>{})},this._broadcastUpdate=new er(e)}},eh={cacheKey:"v1",precache:[],fallbackURLs:{HTML:"/static/pwa/offline",IMAGE:"/content/misc/offline-image.jpg",PLP:"/static/pwa/offlinePLP",JSON:"/static/pwa/offlinejson"},rules:{NetworkOnly:[/\/api\/?(\?.*)?/,"/static/pwa/clientconfig",/\/checkout\/?(\?.*)?/,"/id.aspx","/debug.aspx","/service/healthcheck","/caching/*","/content/misc/site.webmanifest"],NetworkFirst:[/\/basket\/?(\?.*)?/,"/cms",/\/account\/?(\?.*)?/,"/saved-items"],CacheFirst:[],CacheOnly:[],StaleWhileRevalidate:[]}};importScripts("/static/pwa/clientconfig"),importScripts("https://uk1-api.eng.bloomreach.com/js/service-worker.min.js"),c={cacheKey:self.cacheKey},h=(l=ei(ei({},eh),ei(ei({},c),{rules:ei(ei({},eh.rules),c.rules)}))).cacheKey,u=ec(ec([],eo(Object.values(l.fallbackURLs).map(function(e){return{url:e,revision:h}})),!1),eo(l.precache.map(function(e){return{url:e,revision:h}})),!1),self.registration&&self.registration.navigationPreload&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{}))}),X().precache(u),L(new class e extends R{constructor(e,t){super(({request:n})=>{let r=e.getURLsToCacheKeys();for(let a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:n="index.html",cleanURLs:r=!0,urlManipulation:a}={}){let i=new URL(e,location.href);i.hash="",yield i.href;let s=function(e,t=[]){for(let n of[...e.searchParams.keys()])t.some(e=>e.test(n))&&e.searchParams.delete(n);return e}(i,t);if(yield s.href,n&&s.pathname.endsWith("/")){let e=new URL(s.href);e.pathname+=n,yield e.href}if(r){let e=new URL(s.href);e.pathname+=".html",yield e.href}if(a)for(let e of a({url:i}))yield e.href}(n.url,t)){let t=r.get(a);if(t){let n=e.getIntegrityForCacheKey(t);return{cacheKey:t,integrity:n}}}},e.strategy)}}(X(),void 0)),L(function(e){return e.url.pathname.endsWith(".mp4")},new N({plugins:[new class e{constructor(){this.cachedResponseWillBeUsed=async({request:e,cachedResponse:t})=>t&&e.headers.has("range")?await ea(e,t):t}}]})),l.rules.NetworkOnly.forEach(function(e){return L(e,new D)}),l.rules.NetworkFirst.forEach(function(e){return L(e,new H)}),l.rules.CacheFirst.forEach(function(e){return L(e,new N)}
2),l.rules.CacheOnly.forEach(function(e){return L(e,new I)}),l.rules.StaleWhileRevalidate.forEach(function(e){return L(e,new $({plugins:[el]}))}),P().setCatchHandler(function(e){e.event;var t,n,r,a,i=e.request;return t=void 0,n=void 0,r=void 0,a=function(){return es(this,function(e){switch(e.label){case 0:if(!("GET"===i.method&&(i.headers.get("accept")||"").includes("application/json")))return[3,2];return[4,Y(l.fallbackURLs.JSON)];case 1:case 3:case 5:case 8:case 10:return[2,e.sent()];case 2:if(!("GET"===i.method&&i.url.includes("page=")))return[3,4];return[4,Y(l.fallbackURLs.PLP)];case 4:if("POST"!==i.method)return[3,6];return[4,Y(l.fallbackURLs.HTML)];case 6:switch(i.destination){case"document":return[3,7];case"image":return[3,9]}return[3,11];case 7:return[4,Y(l.fallbackURLs.HTML)];case 9:return[4,Y(l.fallbackURLs.IMAGE)];case 11:return[2,Response.error()]}})},new(r||(r=Promise))(function(e,i){function s(e){try{c(a.next(e))}catch(e){i(e)}}function o(e){try{c(a.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}c((a=a.apply(t,n||[])).next())})}),self.addEventListener("install",function(e){self.skipWaiting()})}()}();
3//# sourceMappingURL=sw.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.