PageSourceSearch

https://new.pingi.co/service-worker.js

js pingi.co collected 2026-09-24 11:37:14 UTC 7,307 bytes, 1 lines download raw bytes

1try{self["workbox:core:5.1.4"]&&_()}catch(e){}const e=(e,...t)=>{let s=e;return t.length>0&&(s+=" :: "+JSON.stringify(t)),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:5.1.4"]&&_()}catch(e){}const s=e=>e&&"object"==typeof e?e:{handle:e};class n{constructor(e,t,n="GET"){this.handler=s(t),this.match=e,this.method=n}}class r extends n{constructor(e,t,s){super(({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)},t,s)}}const i=e=>new URL(String(e),location.href).href.replace(new RegExp("^"+location.origin),"");class o{constructor(){this.t=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const t=new Request(...e);return this.handleRequest({request:t})}));e.waitUntil(s),e.ports&&e.ports[0]&&s.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const{params:n,route:r}=this.findMatchingRoute({url:s,request:e,event:t});let i,o=r&&r.handler;if(!o&&this.s&&(o=this.s),o){try{i=o.handle({url:s,request:e,event:t,params:n})}catch(e){i=Promise.reject(e)}return i instanceof Promise&&this.i&&(i=i.catch(n=>this.i.handle({url:s,request:e,event:t}))),i}}findMatchingRoute({url:e,request:t,event:s}){const n=this.t.get(t.method)||[];for(const r of n){let n;const i=r.match({url:e,request:t,event:s});if(i)return n=i,(Array.isArray(i)&&0===i.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(n=void 0),{route:r,params:n}}return{}}setDefaultHandler(e){this.s=s(e)}setCatchHandler(e){this.i=s(e)}registerRoute(e){this.t.has(e.method)||this.t.set(e.method,[]),this.t.get(e.method).push(e)}unregisterRoute(e){if(!this.t.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this.t.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this.t.get(e.method).splice(s,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function u(e,s,i){let o;if("string"==typeof e){const t=new URL(e,location.href);o=new n(({url:e})=>e.href===t.href,s,i)}else if(e instanceof RegExp)o=new r(e,s,i);else if("function"==typeof e)o=new n(e,s,i);else{if(!(e instanceof n))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=e}return a().registerRoute(o),o}const h={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=e=>[h.prefix,e,h.suffix].filter(e=>e&&e.length>0).join("-"),f=e=>e||l(h.runtime),p=new Set;const w=(e,t)=>e.filter(e=>t in e),g=async({request:e,mode:t,plugins:s=[]})=>{const n=w(s,"cacheKeyWillBeUsed");let r=e;for(const e of n)r=await e.cacheKeyWillBeUsed.call(e,{mode:t,request:r}),"string"==typeof r&&(r=new Request(r));return r},m=async({cacheName:e,request:t,event:s,matchOptions:n,plugins:r=[]})=>{const i=await self.caches.open(e),o=await g({plugins:r,request:t,mode:"read"});let c=await i.match(o,n);for(const t of r)if("cachedResponseWillBeUsed"in t){const r=t.cachedResponseWillBeUsed;c=await r.call(t,{cacheName:e,event:s,matchOptions:n,cachedResponse:c,request:o})}return c},q=async({cacheName:e,request:s,response:n,event:r,plugins:o=[],matchOptions:c})=>{const a=await g({plugins:o,request:s,mode:"write"});if(!n)throw new t("cache-put-with-no-response",{url:i(a.url)});const u=await(async({request:e,response:t,event:s,plugins:n=[]})=>{let r=t,i=!1;for(const t of n)if("cacheWillUpdate"in t){i=!0;const n=t.cacheWillUpdate;if(r=await n.call(t,{request:e,response:r,event:s}),!r)break}return i||(r=r&&200===r.status?r:void 0),r||null})({event:r,plugins:o,response:n,request:a});if(!u)return;const h=await self.caches.open(e),l=w(o,"cacheDidUpdate"),f=l.length>0?await m({cacheName:e,matchOptions:c,request:a}):null;try{await h.put(a,u)}catch(e){throw"QuotaExceededError"===e.name&&await async function(){for(const e of p)await e()}(),e}
1for(const t of l)await t.cacheDidUpdate.call(t,{cacheName:e,event:r,oldResponse:f,newResponse:u,request:a})},d=m,v=async({request:e,fetchOptions:s,event:n,plugins:r=[]})=>{if("string"==typeof e&&(e=new Request(e)),n instanceof FetchEvent&&n.preloadResponse){const e=await n.preloadResponse;if(e)return e}const i=w(r,"fetchDidFail"),o=i.length>0?e.clone():null;try{for(const t of r)if("requestWillFetch"in t){const s=t.requestWillFetch,r=e.clone();e=await s.call(t,{request:r,event:n})}}catch(e){throw new t("plugin-error-request-will-fetch",{thrownError:e})}const c=e.clone();try{let t;t="navigate"===e.mode?await fetch(e):await fetch(e,s);for(const e of r)"fetchDidSucceed"in e&&(t=await e.fetchDidSucceed.call(e,{event:n,request:c,response:t}));return t}catch(e){for(const t of i)await t.fetchDidFail.call(t,{error:e,event:n,originalRequest:o.clone(),request:c.clone()});throw e}};try{self["workbox:strategies:5.1.4"]&&_()}catch(e){}const y={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class R{constructor(e={}){if(this.o=f(e.cacheName),e.plugins){const t=e.plugins.some(e=>!!e.cacheWillUpdate);this.u=t?e.plugins:[y,...e.plugins]}else this.u=[y];this.h=e.networkTimeoutSeconds||0,this.l=e.fetchOptions,this.p=e.matchOptions}async handle({event:e,request:s}){const n=[];"string"==typeof s&&(s=new Request(s));const r=[];let i;if(this.h){const{id:t,promise:o}=this.g({request:s,event:e,logs:n});i=t,r.push(o)}const o=this.m({timeoutId:i,request:s,event:e,logs:n});r.push(o);let c=await Promise.race(r);if(c||(c=await o),!c)throw new t("no-response",{url:s.url});return c}g({request:e,logs:t,event:s}){let n;return{promise:new Promise(t=>{n=setTimeout(async()=>{t(await this.q({request:e,event:s}))},1e3*this.h)}),id:n}}async m({timeoutId:e,request:t,logs:s,event:n}){let r,i;try{i=await v({request:t,event:n,fetchOptions:this.l,plugins:this.u})}catch(e){r=e}if(e&&clearTimeout(e),r||!i)i=await this.q({request:t,event:n});else{const e=i.clone(),s=q({cacheName:this.o,request:t,response:e,event:n,plugins:this.u});if(n)try{n.waitUntil(s)}catch(e){}}return i}q({event:e,request:t}){return d({cacheName:this.o,request:t,event:e,matchOptions:this.p,plugins:this.u})}}self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),u(/.png$/,new class{constructor(e={}){this.o=f(e.cacheName),this.u=e.plugins||[],this.l=e.fetchOptions,this.p=e.matchOptions}async handle({event:e,request:s}){"string"==typeof s&&(s=new Request(s));let n,r=await d({cacheName:this.o,request:s,event:e,matchOptions:this.p,plugins:this.u});if(!r)try{r=await this.v(s,e)}catch(e){n=e}if(!r)throw new t("no-response",{url:s.url,error:n});return r}async v(e,t){const s=await v({request:e,event:t,fetchOptions:this.l,plugins:this.u}),n=s.clone(),r=q({cacheName:this.o,request:e,response:n,event:t,plugins:this.u});if(t)try{t.waitUntil(r)}catch(e){}return s}},"GET"),u(/.svg$/,new R,"GET"),u(/\.json$/,new R,"GET");

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.