!function(n,k,v){function F(a,c,b){caches.open(p).then(function(e){function d(d){d=new Response(d,{status:c.status,statusText:c.statusText,headers:f});e.put(a,d)}var f={};c.headers.forEach(function(a,e){f[e]=a});f["x-abtf-sw"]=l();b&&b.max_age&&(f["x-abtf-sw-expire"]=b.max_age);c.headers.get("content-type").match(/text/i)?c.text().then(d):c.blob().then(d)})}function D(a){a&&("string"==typeof a&&(a=new Request(a,{mode:"no-cors"})),r(a).then(function(c){return c||(console.info("Abtf.sw() \u27a4 preload", a.url),m(a))}))}function r(a){return caches.open(p).then(function(c){return c.match(a)})}function x(a){return a=new Request(a),r(a).then(function(c){return c?c.text().then(function(a){return new Response(a,{status:503,statusText:"Connection Offline",headers:c.headers})}):k(a)})}function G(a,c,b,e){var d=b.headers.get("etag"),f=b.headers.get("last-modified");d||f?(b=new Request(a.url,{method:"HEAD",headers:a.headers,mode:"no-cors"}),k(b).then(function(b){var g=!1,q=b.headers.get("etag");b=b.headers.get("last-modified"); return(q&&q!==d?g=!0:b&&b!==f&&(g=!0),g)?(console.info("Abtf.sw() \u27a4 HEAD \u27a4 update",a.url),g=m(a,c),e&&(g=g.then(e)),g):null})["catch"](function(){var d=m(a,c);return e&&(d=d.then(e)),d})):(console.warn("Abtf.sw() \u27a4 HEAD \u27a4 no etag or last-modified",a.url),b=m(a,c),e&&(b=b.then(e)))}function m(a,c,b){return k(a).then(function(e){if(e.ok&&400>e.status&&c){var d=!0;c.conditions&&(c.conditions.forEach(function(b){if(d)switch(b.type){case "url":b.regex?(g=w(b.pattern))?(f=g.test(a.url), b.not?f&&(d=!1):f||(d=!1)):d=!1:(f=-1!==a.url.indexOf(b.pattern),b.not?f&&(d=!1):f||(d=!1));break;case "header":var c=e.headers.get(b.name);if(c)if(b.regex){var g=w(b.pattern);g?(f=g.test(c),b.not?f&&(d=!1):f||(d=!1)):d=!1}else if("object"==typeof b.pattern)if(b.pattern.operator)if(c=parseFloat(c),g=parseFloat(b.pattern.value),isNaN(c)||isNaN(g))d=!1;else{switch(b.pattern.operator){case "<":f=c":f=c>g;break;case "=":var f=c===g;break;default:d=!1}d&&(b.not?f&&(d=!1):f||(d=!1))}else d= !1;else-1===c.indexOf(b.pattern)&&(d=!1);else d=!1}}),d?console.info("Abtf.sw() \u27a4 cache condition \u27a4 cache",a.url,c.conditions):console.info("Abtf.sw() \u27a4 cache condition \u27a4 no cache",a.url,c.conditions));d&&F(a,e.clone(),c)}return e})["catch"](function(e){return b?b(a,null,e):null})}function E(){y||(!z||zt&&(d.sort(function(a,b){return a.t>b.t?-1:a.ta.status)return a.json().then(function(a){if(console.info("Abtf.sw() \u27a4 policy "+ (h?"updated":"loaded"),a),h=a,u=l(),h&&h.length){var b=[];h.forEach(function(a){a.offline&&-1===b.indexOf(a.offline)&&b.push(a.offline)});b.forEach(function(a){D(a)})}});throw h=!1,Error("cache policy not found: ./abtf-pwa-policy.json");})["catch"](function(a){throw h=!1,a;})}function B(a){return new Promise(function(c,b){if(h&&c(h),!h||!u||a&&a>u){var e=!h;A().then(function(){e&&(h?c(h):b())})["catch"](function(){e&&b()})}else if(uu)&&A()})}})}var p,h=!1,u=!1,t=1E3;v.prototype.add||(v.prototype.add=function(a){return this.addAll([a])});v.prototype.addAll||(v.prototype.addAll=function(a){function c(a){this.name="NetworkError";this.code=19;this.message=a}var b=this;return c.prototype=Object.create(Error.prototype),Promise.resolve().then(function(){if(1>arguments.length)throw new TypeError;return a=a.map(function(a){return a instanceof Request?a: String(a)}),Promise.all(a.map(function(a){"string"==typeof a&&(a=new Request(a));var b=(new URL(a.url)).protocol;if("http:"!==b&&"https:"!==b)throw new c("Invalid scheme");return k(a.clone())}))}).then(function(e){return Promise.all(e.map(function(d,e){return b.put(a[e],d)}))}).then(function(){})});CacheStorage.prototype.match||(CacheStorage.prototype.match=function(a,c){var b=this;return this.keys().then(function(e){var d;return e.reduce(function(e,q){return e.then(function(){return d||b.open(q).then(function(b){return b.match(a, c)}).then(function(a){return d=a})})},Promise.resolve())})});n.addEventListener("install",function(a){a.waitUntil(A().then(function(){n.skipWaiting()})["catch"](function(){n.skipWaiting()}))});n.addEventListener("activate",function(a){a.waitUntil(n.clients.claim())});var C,H=/^\/(.*)\/([gimuy]+)?$/,z=!1,y=!1;n.addEventListener("fetch",function(a){if("GET"===a.request.method&&!(a.request.url.match(/wp-admin/)||a.request.url.match(/preview=true/)||a.request.url.match(/\/wp-login\./))){if(h&&p)return a.respondWith(B().then(function(c){if(!c|| 0===c.length)return k(a.request);if(C)try{clearTimeout(C)}catch(e){}C=setTimeout(E,500);var b=!1;if(c.forEach(function(e){if(!b&&e.match&&0!==e.match.length){var d=!0;e.match.forEach(function(b){if(d)switch(b.type){case "url":b.regex?(e=w(b.pattern))?(c=e.test(a.request.url),b.not?c&&(d=!1):c||(d=!1)):d=!1:(c=-1!==a.request.url.indexOf(b.pattern),b.not?c&&(d=!1):c||(d=!1));break;case "header":if(c=a.request.headers.get(b.name))if(b.regex){var e=w(b.pattern);e?(c=e.test(c),b.not?c&&(d=!1):c||(d=!1)): d=!1}else{var c=-1!==c.indexOf(b.pattern);b.not?c&&(d=!1):c||(d=!1)}else b.not||(d=!1)}});d&&(b=e)}}),!b)return console.info("Abtf.sw() \u27a4 policy \u27a4 no match",a.request.url),k(a.request);switch(console.info("Abtf.sw() \u27a4 policy \u27a4 match",a.request.url,b),b.strategy){case "cache":return r(a.request).then(function(c){if(c&&b.cache.max_age&&c.headers.get("x-abtf-sw")l()-e&&(d=!1)}return d&&function(a,c){setTimeout(function(){var d;if(b.cache.head_update&&(d=function(){clients.matchAll().then(function(b){b.forEach(function(b){b.postMessage([2,a.url])})})}),b.cache.head_update)console.info("Abtf.sw() \u27a4 HEAD \u27a4 verify",a.url),G(a,b.cache,c,d);else{console.info("Abtf.sw() \u27a4 update cache",a.url);var e=m(a,b.cache);d&&e.then(d)}},10)}(a.request.clone(),c.clone()),console.info("Abtf.sw() \u27a4 from cache", a.request.url),c}return m(a.request,b.cache,function(c,d,e){return b.offline?(console.warn("Abtf.sw() \u27a4 no cache \u27a4 network failed \u27a4 offline page",c.url),x(b.offline,c.clone())):(console.warn("Abtf.sw() \u27a4 no cache \u27a4 network failed \u27a4 empty 404 response",c.url,d,e),d||k(a.request.clone()))})});case "event":return r(a.request).then(function(c){return c&&b.cache.max_age&&c.headers.get("x-abtf-sw")