mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-24 01:48:18 +03:00
2 lines
No EOL
56 KiB
JavaScript
2 lines
No EOL
56 KiB
JavaScript
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/shlink-web-client/feature-recover-pwa/",r(r.s=7)}([function(e,t,r){e.exports=r(6)},function(e,t,r){"use strict";try{self["workbox:core:6.1.5"]&&_()}catch(n){}},function(e,t,r){"use strict";try{self["workbox:precaching:6.1.5"]&&_()}catch(n){}},function(e,t,r){"use strict";try{self["workbox:routing:6.1.5"]&&_()}catch(n){}},function(e,t,r){"use strict";try{self["workbox:strategies:6.1.5"]&&_()}catch(n){}},function(e,t,r){"use strict";try{self["workbox:expiration:6.1.5"]&&_()}catch(n){}},function(e,t,r){var n=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(P){u=function(e,t,r){return e[t]=r}}function o(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),s=new C(n||[]);return i._invoke=function(e,t,r){var n=f;return function(a,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===a)throw i;return T()}for(r.method=a,r.arg=i;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=h(e,t,r);if("normal"===u.type){if(n=r.done?v:l,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}(e,r,s),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=o;var f="suspendedStart",l="suspendedYield",p="executing",v="completed",d={};function y(){}function b(){}function x(){}var m={};m[i]=function(){return this};var g=Object.getPrototypeOf,w=g&&g(g(S([])));w&&w!==r&&n.call(w,i)&&(m=w);var k=x.prototype=y.prototype=Object.create(m);function _(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(a,i,s,c){var u=h(e[a],e,i);if("throw"!==u.type){var o=u.arg,f=o.value;return f&&"object"===typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(f).then((function(e){o.value=e,s(o)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var a;this._invoke=function(e,n){function i(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(i,i):i()}}function E(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var a=h(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,d;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function S(e){if(e){var r=e[i];if(r)return r.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var a=-1,s=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}return{next:T}}function T(){return{value:t,done:!0}}return b.prototype=k.constructor=x,x.constructor=b,b.displayName=u(x,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},_(R.prototype),R.prototype[s]=function(){return this},e.AsyncIterator=R,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var s=new R(o(t,r,n,a),i);return e.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},_(k),u(k,c,"Generator"),k[i]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=S,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return c.type="throw",c.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],c=s.completion;if("root"===s.tryLoc)return a("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),o=n.call(s,"finallyLoc");if(u&&o){if(this.prev<s.catchLoc)return a(s.catchLoc,!0);if(this.prev<s.finallyLoc)return a(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return a(s.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return a(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:S(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}(e.exports);try{regeneratorRuntime=n}catch(a){Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function i(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.r(t);r(1);var s=null;function c(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,c=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,s=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw s}}}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return(p="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){return!t||"object"!==p(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){var t=l();return function(){var r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return v(this,r)}}function y(e,t,r){return(y=l()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&o(a,r.prototype),a}).apply(null,arguments)}function b(e){var t="function"===typeof Map?new Map:void 0;return(b=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return y(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(n,e)})(e)}var x=function(e){for(var t=e,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.length>0&&(t+=" :: ".concat(JSON.stringify(n))),t},m=function(e){h(r,e);var t=d(r);function r(e,n){var a;u(this,r);var i=x(e,n);return(a=t.call(this,i)).name=e,a.details=n,a}return r}(b(Error)),g=new Set;function w(e){g.add(e)}var k,_={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},R=function(e){return[_.prefix,e,_.suffix].filter((function(e){return e&&e.length>0})).join("-")},E=function(e){return e||R(_.precache)},L=function(e){return e||R(_.runtime)},O=r(0),C=r.n(O);function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e,t,r,n,a,i,s){try{var c=e[i](s),u=c.value}catch(o){return void r(o)}c.done?t(u):Promise.resolve(u).then(n,a)}function q(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){U(i,n,a,s,c,"next",e)}function c(e){U(i,n,a,s,c,"throw",e)}s(void 0)}))}}function j(e,t){var r,n=new URL(e),a=c(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;n.searchParams.delete(i)}}catch(s){a.e(s)}finally{a.f()}return n.href}function N(e,t,r,n){return A.apply(this,arguments)}function A(){return(A=q(C.a.mark((function e(t,r,n,a){var i,s,u,o,h,f,l;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=j(r.url,n),r.url!==i){e.next=3;break}return e.abrupt("return",t.match(r,a));case 3:return s=P(P({},a),{},{ignoreSearch:!0}),e.next=6,t.keys(r,s);case 6:u=e.sent,o=c(u),e.prev=8,o.s();case 10:if((h=o.n()).done){e.next=17;break}if(f=h.value,l=j(f.url,n),i!==l){e.next=15;break}return e.abrupt("return",t.match(f,a));case 15:e.next=10;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:return e.abrupt("return");case 26:case"end":return e.stop()}}),e,null,[[8,19,22,25]])})))).apply(this,arguments)}function K(){if(void 0===k){var e=new Response("");if("body"in e)try{new Response(e.body),k=!0}catch(t){k=!1}k=!1}return k}function M(e){e.then((function(){}))}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){a=!0,i=u}finally{try{n||null==c.return||c.return()}finally{if(a)throw i}}return r}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function W(e,t,r){return t&&D(e.prototype,t),r&&D(e,r),e}var F=function(){function e(t,r){var n=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a.onupgradeneeded,s=a.onversionchange;u(this,e),this._db=null,this._name=t,this._version=r,this._onupgradeneeded=i,this._onversionchange=s||function(){return n.close()}}return W(e,[{key:"open",value:function(){var e=q(C.a.mark((function e(){var t=this;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._db){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,new Promise((function(e,r){var n=!1;setTimeout((function(){n=!0,r(new Error("The open request was blocked and timed out"))}),t.OPEN_TIMEOUT);var a=indexedDB.open(t._name,t._version);a.onerror=function(){return r(a.error)},a.onupgradeneeded=function(e){n?(a.transaction.abort(),a.result.close()):"function"===typeof t._onupgradeneeded&&t._onupgradeneeded(e)},a.onsuccess=function(){var r=a.result;n?r.close():(r.onversionchange=t._onversionchange.bind(t),e(r))}}));case 4:return this._db=e.sent,e.abrupt("return",this);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getKey",value:function(){var e=q(C.a.mark((function e(t,r){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAllKeys(t,r,1);case 2:return e.abrupt("return",e.sent[0]);case 3:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getAll",value:function(){var e=q(C.a.mark((function e(t,r,n){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAllMatching(t,{query:r,count:n});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getAllKeys",value:function(){var e=q(C.a.mark((function e(t,r,n){var a;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAllMatching(t,{query:r,count:n,includeKeys:!0});case 2:return a=e.sent,e.abrupt("return",a.map((function(e){return e.key})));case 4:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getAllMatching",value:function(){var e=q(C.a.mark((function e(t){var r,n,a,i,s,c,u,o,h,f=arguments;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.length>1&&void 0!==f[1]?f[1]:{},n=r.index,a=r.query,i=void 0===a?null:a,s=r.direction,c=void 0===s?"next":s,u=r.count,o=r.includeKeys,h=void 0!==o&&o,e.next=3,this.transaction([t],"readonly",(function(e,r){var a=e.objectStore(t),s=n?a.index(n):a,o=[],f=s.openCursor(i,c);f.onsuccess=function(){var e=f.result;e?(o.push(h?e:e.value),u&&o.length>=u?r(o):e.continue()):r(o)}}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"transaction",value:function(){var e=q(C.a.mark((function e(t,r,n){var a=this;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.open();case 2:return e.next=4,new Promise((function(e,i){var s=a._db.transaction(t,r);s.onabort=function(){return i(s.error)},s.oncomplete=function(){return e()},n(s,(function(t){return e(t)}))}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_call",value:function(){var e=q(C.a.mark((function e(t,r,n){var a,i,s,c,u=arguments;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a=u.length,i=new Array(a>3?a-3:0),s=3;s<a;s++)i[s-3]=u[s];return c=function(e,n){var a=e.objectStore(r),s=a[t].apply(a,i);s.onsuccess=function(){return n(s.result)}},e.next=4,this.transaction([r],n,c);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"close",value:function(){this._db&&(this._db.close(),this._db=null)}},{key:"db",get:function(){return this._db}}]),e}();F.prototype.OPEN_TIMEOUT=2e3;for(var H=function(){var e,t=I(G[B],2),r=t[0],n=c(t[1]);try{var a=function(){var t=e.value;t in IDBObjectStore.prototype&&(F.prototype[t]=function(){var e=q(C.a.mark((function e(n){var a,i,s,c=arguments;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a=c.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=c[s];return e.next=3,this._call.apply(this,[t,n,r].concat(i));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}())};for(n.s();!(e=n.n()).done;)a()}catch(i){n.e(i)}finally{n.f()}},B=0,G=Object.entries({readonly:["get","count","getKey","getAll","getAllKeys"],readwrite:["add","put","clear","delete"]});B<G.length;B++)H();var V=function e(){var t=this;u(this,e),this.promise=new Promise((function(e,r){t.resolve=e,t.reject=r}))},Y=function(){var e=q(C.a.mark((function e(t){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,r){var n=indexedDB.deleteDatabase(t);n.onerror=function(){r(n.error)},n.onblocked=function(){r(new Error("Delete blocked"))},n.onsuccess=function(){e()}}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function $(){return Q.apply(this,arguments)}function Q(){return(Q=q(C.a.mark((function e(){var t,r,n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,t=c(g),e.prev=2,t.s();case 4:if((r=t.n()).done){e.next=11;break}return n=r.value,e.next=8,n();case 8:0;case 9:e.next=4;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:0;case 20:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})))).apply(this,arguments)}var J=function(e){return new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"")};function z(e){return new Promise((function(t){return setTimeout(t,e)}))}function X(e,t){var r=t();return e.waitUntil(r),r}function Z(e,t){return ee.apply(this,arguments)}function ee(){return(ee=q(C.a.mark((function e(t,r){var n,a,i,s,c,u;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null,t.url&&(a=new URL(t.url),n=a.origin),n===self.location.origin){e.next=4;break}throw new m("cross-origin-copy-response",{origin:n});case 4:if(i=t.clone(),s={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},c=r?r(s):s,!K()){e.next=11;break}e.t0=i.body,e.next=14;break;case 11:return e.next=13,i.blob();case 13:e.t0=e.sent;case 14:return u=e.t0,e.abrupt("return",new Response(u,c));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}r(5);var te="cache-entries",re=function(e){var t=new URL(e,location.href);return t.hash="",t.href},ne=function(){function e(t){var r=this;u(this,e),this._cacheName=t,this._db=new F("workbox-expiration",1,{onupgradeneeded:function(e){return r._handleUpgrade(e)}})}return W(e,[{key:"_handleUpgrade",value:function(e){var t=e.target.result.createObjectStore(te,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1}),Y(this._cacheName)}},{key:"setTimestamp",value:function(){var e=q(C.a.mark((function e(t,r){var n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=re(t),n={url:t,timestamp:r,cacheName:this._cacheName,id:this._getId(t)},e.next=4,this._db.put(te,n);case 4:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getTimestamp",value:function(){var e=q(C.a.mark((function e(t){var r;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._db.get(te,this._getId(t));case 2:return r=e.sent,e.abrupt("return",r.timestamp);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"expireEntries",value:function(){var e=q(C.a.mark((function e(t,r){var n,a,i,s,u,o=this;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._db.transaction(te,"readwrite",(function(e,n){var a=e.objectStore(te).index("timestamp").openCursor(null,"prev"),i=[],s=0;a.onsuccess=function(){var e=a.result;if(e){var c=e.value;c.cacheName===o._cacheName&&(t&&c.timestamp<t||r&&s>=r?i.push(e.value):s++),e.continue()}else n(i)}}));case 2:n=e.sent,a=[],i=c(n),e.prev=5,i.s();case 7:if((s=i.n()).done){e.next=14;break}return u=s.value,e.next=11,this._db.delete(te,u.id);case 11:a.push(u.url);case 12:e.next=7;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),i.e(e.t0);case 19:return e.prev=19,i.f(),e.finish(19);case 22:return e.abrupt("return",a);case 23:case"end":return e.stop()}}),e,this,[[5,16,19,22]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_getId",value:function(e){return this._cacheName+"|"+re(e)}}]),e}(),ae=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=r.maxEntries,this._maxAgeSeconds=r.maxAgeSeconds,this._matchOptions=r.matchOptions,this._cacheName=t,this._timestampModel=new ne(t)}return W(e,[{key:"expireEntries",value:function(){var e=q(C.a.mark((function e(){var t,r,n,a,i,s;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isRunning){e.next=3;break}return this._rerunRequested=!0,e.abrupt("return");case 3:return this._isRunning=!0,t=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,e.next=7,this._timestampModel.expireEntries(t,this._maxEntries);case 7:return r=e.sent,e.next=10,self.caches.open(this._cacheName);case 10:n=e.sent,a=c(r),e.prev=12,a.s();case 14:if((i=a.n()).done){e.next=20;break}return s=i.value,e.next=18,n.delete(s,this._matchOptions);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),a.e(e.t0);case 25:return e.prev=25,a.f(),e.finish(25);case 28:0,this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,M(this.expireEntries()));case 31:case"end":return e.stop()}}),e,this,[[12,22,25,28]])})));return function(){return e.apply(this,arguments)}}()},{key:"updateTimestamp",value:function(){var e=q(C.a.mark((function e(t){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,this._timestampModel.setTimestamp(t,Date.now());case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"isURLExpired",value:function(){var e=q(C.a.mark((function e(t){var r,n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._maxAgeSeconds){e.next=6;break}e.next=3;break;case 3:return e.abrupt("return",!1);case 6:return e.next=8,this._timestampModel.getTimestamp(t);case 8:return r=e.sent,n=Date.now()-1e3*this._maxAgeSeconds,e.abrupt("return",r<n);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=q(C.a.mark((function e(){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._rerunRequested=!1,e.next=3,this._timestampModel.expireEntries(1/0);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),ie=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.cachedResponseWillBeUsed=function(){var e=q(C.a.mark((function e(r){var n,a,i,s,c,u,o;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.event,a=r.request,i=r.cacheName,s=r.cachedResponse){e.next=3;break}return e.abrupt("return",null);case 3:if(c=t._isResponseDateFresh(s),M((u=t._getCacheExpiration(i)).expireEntries()),o=u.updateTimestamp(a.url),n)try{n.waitUntil(o)}catch(h){0}return e.abrupt("return",c?s:null);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.cacheDidUpdate=function(){var e=q(C.a.mark((function e(r){var n,a,i;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.cacheName,a=r.request,i=t._getCacheExpiration(n),e.next=5,i.updateTimestamp(a.url);case 5:return e.next=7,i.expireEntries();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._config=r,this._maxAgeSeconds=r.maxAgeSeconds,this._cacheExpirations=new Map,r.purgeOnQuotaError&&w((function(){return t.deleteCacheAndMetadata()}))}return W(e,[{key:"_getCacheExpiration",value:function(e){if(e===L())throw new m("expire-custom-caches-only");var t=this._cacheExpirations.get(e);return t||(t=new ae(e,this._config),this._cacheExpirations.set(e,t)),t}},{key:"_isResponseDateFresh",value:function(e){if(!this._maxAgeSeconds)return!0;var t=this._getDateHeaderTimestamp(e);return null===t||t>=Date.now()-1e3*this._maxAgeSeconds}},{key:"_getDateHeaderTimestamp",value:function(e){if(!e.headers.has("date"))return null;var t=e.headers.get("date"),r=new Date(t).getTime();return isNaN(r)?null:r}},{key:"deleteCacheAndMetadata",value:function(){var e=q(C.a.mark((function e(){var t,r,n,a,i;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c(this._cacheExpirations),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=11;break}return n=I(r.value,2),a=n[0],i=n[1],e.next=7,self.caches.delete(a);case 7:return e.next=9,i.delete();case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:this._cacheExpirations=new Map;case 20:case"end":return e.stop()}}),e,this,[[1,13,16,19]])})));return function(){return e.apply(this,arguments)}}()}]),e}();r(2);function se(e){if(!e)throw new m("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){var t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}var r=e.revision,n=e.url;if(!n)throw new m("add-to-cache-list-unexpected-type",{entry:e});if(!r){var a=new URL(n,location.href);return{cacheKey:a.href,url:a.href}}var i=new URL(n,location.href),s=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",r),{cacheKey:i.href,url:s.href}}var ce=function e(){var t=this;u(this,e),this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=function(){var e=q(C.a.mark((function e(t){var r,n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.request,(n=t.state)&&(n.originalRequest=r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.cachedResponseWillBeUsed=function(){var e=q(C.a.mark((function e(r){var n,a,i,s;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.event,a=r.state,i=r.cachedResponse,"install"===n.type&&(s=a.originalRequest.url,i?t.notUpdatedURLs.push(s):t.updatedURLs.push(s)),e.abrupt("return",i);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},ue=function e(t){var r=this,n=t.precacheController;u(this,e),this.cacheKeyWillBeUsed=function(){var e=q(C.a.mark((function e(t){var n,a,i;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.request,a=t.params,i=a&&a.cacheKey||r._precacheController.getCacheKeyForURL(n.url),e.abrupt("return",i?new Request(i):n);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._precacheController=n};r(4);function oe(e){return"string"===typeof e?new Request(e):e}var he=function(){function e(t,r){u(this,e),this._cacheKeys={},Object.assign(this,r),this.event=r.event,this._strategy=t,this._handlerDeferred=new V,this._extendLifetimePromises=[],this._plugins=i(t.plugins),this._pluginStateMap=new Map;var n,a=c(this._plugins);try{for(a.s();!(n=a.n()).done;){var s=n.value;this._pluginStateMap.set(s,{})}}catch(o){a.e(o)}finally{a.f()}this.event.waitUntil(this._handlerDeferred.promise)}return W(e,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=q(C.a.mark((function e(t){var r,n,a,i,s,u,o,h,f,l,p,v;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.event,!("navigate"===(n=oe(t)).mode&&r instanceof FetchEvent&&r.preloadResponse)){e.next=9;break}return e.next=5,r.preloadResponse;case 5:if(!(a=e.sent)){e.next=9;break}return e.abrupt("return",a);case 9:i=this.hasCallback("fetchDidFail")?n.clone():null,e.prev=10,s=c(this.iterateCallbacks("requestWillFetch")),e.prev=12,s.s();case 14:if((u=s.n()).done){e.next=21;break}return o=u.value,e.next=18,o({request:n.clone(),event:r});case 18:n=e.sent;case 19:e.next=14;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(12),s.e(e.t0);case 26:return e.prev=26,s.f(),e.finish(26);case 29:e.next=34;break;case 31:throw e.prev=31,e.t1=e.catch(10),new m("plugin-error-request-will-fetch",{thrownError:e.t1});case 34:return h=n.clone(),e.prev=35,e.next=38,fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);case 38:f=e.sent,l=c(this.iterateCallbacks("fetchDidSucceed")),e.prev=41,l.s();case 43:if((p=l.n()).done){e.next=50;break}return v=p.value,e.next=47,v({event:r,request:h,response:f});case 47:f=e.sent;case 48:e.next=43;break;case 50:e.next=55;break;case 52:e.prev=52,e.t2=e.catch(41),l.e(e.t2);case 55:return e.prev=55,l.f(),e.finish(55);case 58:return e.abrupt("return",f);case 61:if(e.prev=61,e.t3=e.catch(35),!i){e.next=67;break}return e.next=67,this.runCallbacks("fetchDidFail",{error:e.t3,event:r,originalRequest:i.clone(),request:h.clone()});case 67:throw e.t3;case 68:case"end":return e.stop()}}),e,this,[[10,31],[12,23,26,29],[35,61],[41,52,55,58]])})));return function(t){return e.apply(this,arguments)}}())},{key:"fetchAndCachePut",value:function(){var e=q(C.a.mark((function e(t){var r,n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch(t);case 2:return r=e.sent,n=r.clone(),this.waitUntil(this.cachePut(t,n)),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"cacheMatch",value:function(){var e=q(C.a.mark((function e(t){var r,n,a,i,s,u,o,h,f,l;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=oe(t),a=this._strategy,i=a.cacheName,s=a.matchOptions,e.next=4,this.getCacheKey(r,"read");case 4:return u=e.sent,o=P(P({},s),{cacheName:i}),e.next=8,caches.match(u,o);case 8:n=e.sent,h=c(this.iterateCallbacks("cachedResponseWillBeUsed")),e.prev=11,h.s();case 13:if((f=h.n()).done){e.next=23;break}return l=f.value,e.next=17,l({cacheName:i,matchOptions:s,cachedResponse:n,request:u,event:this.event});case 17:if(e.t0=e.sent,e.t0){e.next=20;break}e.t0=void 0;case 20:n=e.t0;case 21:e.next=13;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(11),h.e(e.t1);case 28:return e.prev=28,h.f(),e.finish(28);case 31:return e.abrupt("return",n);case 32:case"end":return e.stop()}}),e,this,[[11,25,28,31]])})));return function(t){return e.apply(this,arguments)}}()},{key:"cachePut",value:function(){var e=q(C.a.mark((function e(t,r){var n,a,i,s,u,o,h,f,l,p,v,d;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=oe(t),e.next=3,z(0);case 3:return e.next=5,this.getCacheKey(n,"write");case 5:a=e.sent,e.next=9;break;case 9:if(r){e.next=12;break}throw new m("cache-put-with-no-response",{url:J(a.url)});case 12:return e.next=14,this._ensureResponseSafeToCache(r);case 14:if(i=e.sent){e.next=18;break}return e.abrupt("return",!1);case 18:return s=this._strategy,u=s.cacheName,o=s.matchOptions,e.next=21,self.caches.open(u);case 21:if(h=e.sent,!(f=this.hasCallback("cacheDidUpdate"))){e.next=29;break}return e.next=26,N(h,a.clone(),["__WB_REVISION__"],o);case 26:e.t0=e.sent,e.next=30;break;case 29:e.t0=null;case 30:return l=e.t0,e.prev=32,e.next=35,h.put(a,f?i.clone():i);case 35:e.next=43;break;case 37:if(e.prev=37,e.t1=e.catch(32),"QuotaExceededError"!==e.t1.name){e.next=42;break}return e.next=42,$();case 42:throw e.t1;case 43:p=c(this.iterateCallbacks("cacheDidUpdate")),e.prev=44,p.s();case 46:if((v=p.n()).done){e.next=52;break}return d=v.value,e.next=50,d({cacheName:u,oldResponse:l,newResponse:i.clone(),request:a,event:this.event});case 50:e.next=46;break;case 52:e.next=57;break;case 54:e.prev=54,e.t2=e.catch(44),p.e(e.t2);case 57:return e.prev=57,p.f(),e.finish(57);case 60:return e.abrupt("return",!0);case 61:case"end":return e.stop()}}),e,this,[[32,37],[44,54,57,60]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getCacheKey",value:function(){var e=q(C.a.mark((function e(t,r){var n,a,i,s;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cacheKeys[r]){e.next=23;break}n=t,a=c(this.iterateCallbacks("cacheKeyWillBeUsed")),e.prev=3,a.s();case 5:if((i=a.n()).done){e.next=14;break}return s=i.value,e.t0=oe,e.next=10,s({mode:r,request:n,event:this.event,params:this.params});case 10:e.t1=e.sent,n=(0,e.t0)(e.t1);case 12:e.next=5;break;case 14:e.next=19;break;case 16:e.prev=16,e.t2=e.catch(3),a.e(e.t2);case 19:return e.prev=19,a.f(),e.finish(19);case 22:this._cacheKeys[r]=n;case 23:return e.abrupt("return",this._cacheKeys[r]);case 24:case"end":return e.stop()}}),e,this,[[3,16,19,22]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"hasCallback",value:function(e){var t,r=c(this._strategy.plugins);try{for(r.s();!(t=r.n()).done;){if(e in t.value)return!0}}catch(n){r.e(n)}finally{r.f()}return!1}},{key:"runCallbacks",value:function(){var e=q(C.a.mark((function e(t,r){var n,a,i;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c(this.iterateCallbacks(t)),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=9;break}return i=a.value,e.next=7,i(r);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"iterateCallbacks",value:C.a.mark((function e(t){var r,n,a,i=this;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=c(this._strategy.plugins),e.prev=1,a=C.a.mark((function e(){var r,a,s;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof(r=n.value)[t]){e.next=6;break}return a=i._pluginStateMap.get(r),s=function(e){var n=P(P({},e),{},{state:a});return r[t](n)},e.next=6,s;case 6:case"end":return e.stop()}}),e)})),r.s();case 4:if((n=r.n()).done){e.next=8;break}return e.delegateYield(a(),"t0",6);case 6:e.next=4;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),r.e(e.t1);case 13:return e.prev=13,r.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[1,10,13,16]])}))},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=q(C.a.mark((function e(){var t;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this._extendLifetimePromises.shift())){e.next=5;break}return e.next=3,t;case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this._handlerDeferred.resolve()}},{key:"_ensureResponseSafeToCache",value:function(){var e=q(C.a.mark((function e(t){var r,n,a,i,s;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t,n=!1,a=c(this.iterateCallbacks("cacheWillUpdate")),e.prev=3,a.s();case 5:if((i=a.n()).done){e.next=18;break}return s=i.value,e.next=9,s({request:this.request,response:r,event:this.event});case 9:if(e.t0=e.sent,e.t0){e.next=12;break}e.t0=void 0;case 12:if(r=e.t0,n=!0,r){e.next=16;break}return e.abrupt("break",18);case 16:e.next=5;break;case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(3),a.e(e.t1);case 23:return e.prev=23,a.f(),e.finish(23);case 26:return n||r&&200!==r.status&&(r=void 0),e.abrupt("return",r);case 28:case"end":return e.stop()}}),e,this,[[3,20,23,26]])})));return function(t){return e.apply(this,arguments)}}()}]),e}(),fe=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.cacheName=L(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}return W(e,[{key:"handle",value:function(e){return I(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){e instanceof FetchEvent&&(e={event:e,request:e.request});var t=e.event,r="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new he(this,{event:t,request:r,params:n}),i=this._getResponse(a,r,t);return[i,this._awaitComplete(i,a,r,t)]}},{key:"_getResponse",value:function(){var e=q(C.a.mark((function e(t,r,n){var a,i,s,u,o,h,f;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.runCallbacks("handlerWillStart",{event:n,request:r});case 2:return a=void 0,e.prev=3,e.next=6,this._handle(r,t);case 6:if((a=e.sent)&&"error"!==a.type){e.next=9;break}throw new m("no-response",{url:r.url});case 9:e.next=38;break;case 11:e.prev=11,e.t0=e.catch(3),i=c(t.iterateCallbacks("handlerDidError")),e.prev=14,i.s();case 16:if((s=i.n()).done){e.next=25;break}return u=s.value,e.next=20,u({error:e.t0,event:n,request:r});case 20:if(!(a=e.sent)){e.next=23;break}return e.abrupt("break",25);case 23:e.next=16;break;case 25:e.next=30;break;case 27:e.prev=27,e.t1=e.catch(14),i.e(e.t1);case 30:return e.prev=30,i.f(),e.finish(30);case 33:if(a){e.next=37;break}throw e.t0;case 37:0;case 38:o=c(t.iterateCallbacks("handlerWillRespond")),e.prev=39,o.s();case 41:if((h=o.n()).done){e.next=48;break}return f=h.value,e.next=45,f({event:n,request:r,response:a});case 45:a=e.sent;case 46:e.next=41;break;case 48:e.next=53;break;case 50:e.prev=50,e.t2=e.catch(39),o.e(e.t2);case 53:return e.prev=53,o.f(),e.finish(53);case 56:return e.abrupt("return",a);case 57:case"end":return e.stop()}}),e,this,[[3,11],[14,27,30,33],[39,50,53,56]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_awaitComplete",value:function(){var e=q(C.a.mark((function e(t,r,n,a){var i,s;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:i=e.sent,e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:return e.prev=8,e.next=11,r.runCallbacks("handlerDidRespond",{event:a,request:n,response:i});case 11:return e.next=13,r.doneWaiting();case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(8),s=e.t1;case 18:return e.next=20,r.runCallbacks("handlerDidComplete",{event:a,request:n,response:i,error:s});case 20:if(r.destroy(),!s){e.next=23;break}throw s;case 23:case"end":return e.stop()}}),e,null,[[0,6],[8,15]])})));return function(t,r,n,a){return e.apply(this,arguments)}}()}]),e}(),le=function(e){h(r,e);var t=d(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(this,r),n.cacheName=E(n.cacheName),(e=t.call(this,n))._fallbackToNetwork=!1!==n.fallbackToNetwork,e.plugins.push(r.copyRedirectedCacheableResponsesPlugin),e}return W(r,[{key:"_handle",value:function(){var e=q(C.a.mark((function e(t,r){var n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.cacheMatch(t);case 2:if(n=e.sent){e.next=11;break}if(!r.event||"install"!==r.event.type){e.next=8;break}return e.next=7,this._handleInstall(t,r);case 7:return e.abrupt("return",e.sent);case 8:return e.next=10,this._handleFetch(t,r);case 10:return e.abrupt("return",e.sent);case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_handleFetch",value:function(){var e=q(C.a.mark((function e(t,r){var n,a;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._fallbackToNetwork){e.next=7;break}return e.next=4,r.fetch(t);case 4:n=e.sent,e.next=8;break;case 7:throw new m("missing-precache-entry",{cacheName:this.cacheName,url:t.url});case 8:e.next=24;break;case 13:e.t0=e.sent;case 14:a=e.t0,s.groupCollapsed("Precaching is responding to: "+J(t.url)),s.log("Serving the precached url: ".concat(J(a.url))),s.groupCollapsed("View request details here."),s.log(t),s.groupEnd(),s.groupCollapsed("View response details here."),s.log(n),s.groupEnd(),s.groupEnd();case 24:return e.abrupt("return",n);case 25:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_handleInstall",value:function(){var e=q(C.a.mark((function e(t,r){var n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._useDefaultCacheabilityPluginIfNeeded(),e.next=3,r.fetch(t);case 3:return n=e.sent,e.next=6,r.cachePut(t,n.clone());case 6:if(e.sent){e.next=9;break}throw new m("bad-precaching-response",{url:t.url,status:n.status});case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_useDefaultCacheabilityPluginIfNeeded",value:function(){var e,t=null,n=0,a=c(this.plugins.entries());try{for(a.s();!(e=a.n()).done;){var i=I(e.value,2),s=i[0],u=i[1];u!==r.copyRedirectedCacheableResponsesPlugin&&(u===r.defaultPrecacheCacheabilityPlugin&&(t=s),u.cacheWillUpdate&&n++)}}catch(o){a.e(o)}finally{a.f()}0===n?this.plugins.push(r.defaultPrecacheCacheabilityPlugin):n>1&&null!==t&&this.plugins.splice(t,1)}}]),r}(fe);le.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:function(e){return q(C.a.mark((function t(){var r;return C.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=e.response)&&!(r.status>=400)){t.next=3;break}return t.abrupt("return",null);case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})))()}},le.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:function(e){return q(C.a.mark((function t(){var r;return C.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.response).redirected){t.next=7;break}return t.next=4,Z(r);case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=r;case 8:return t.abrupt("return",t.t0);case 9:case"end":return t.stop()}}),t)})))()}};var pe,ve=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.cacheName,n=t.plugins,a=void 0===n?[]:n,s=t.fallbackToNetwork,c=void 0===s||s;u(this,e),this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new le({cacheName:E(r),plugins:[].concat(i(a),[new ue({precacheController:this})]),fallbackToNetwork:c}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}return W(e,[{key:"precache",value:function(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}},{key:"addToCacheList",value:function(e){var t,r=[],n=c(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;"string"===typeof a?r.push(a):a&&void 0===a.revision&&r.push(a.url);var i=se(a),s=i.cacheKey,u=i.url,o="string"!==typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(u)&&this._urlsToCacheKeys.get(u)!==s)throw new m("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(u),secondEntry:s});if("string"!==typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(s)&&this._cacheKeysToIntegrities.get(s)!==a.integrity)throw new m("add-to-cache-list-conflicting-integrities",{url:u});this._cacheKeysToIntegrities.set(s,a.integrity)}if(this._urlsToCacheKeys.set(u,s),this._urlsToCacheModes.set(u,o),r.length>0){var h="Workbox is precaching URLs without revision "+"info: ".concat(r.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(h)}}}catch(f){n.e(f)}finally{n.f()}}},{key:"install",value:function(e){var t=this;return X(e,q(C.a.mark((function r(){var n,a,i,s,u,o,h,f,l,p,v;return C.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=new ce,t.strategy.plugins.push(n),a=c(t._urlsToCacheKeys),r.prev=3,a.s();case 5:if((i=a.n()).done){r.next=14;break}return s=I(i.value,2),u=s[0],o=s[1],h=t._cacheKeysToIntegrities.get(o),f=t._urlsToCacheModes.get(u),l=new Request(u,{integrity:h,cache:f,credentials:"same-origin"}),r.next=12,Promise.all(t.strategy.handleAll({params:{cacheKey:o},request:l,event:e}));case 12:r.next=5;break;case 14:r.next=19;break;case 16:r.prev=16,r.t0=r.catch(3),a.e(r.t0);case 19:return r.prev=19,a.f(),r.finish(19);case 22:return p=n.updatedURLs,v=n.notUpdatedURLs,r.abrupt("return",{updatedURLs:p,notUpdatedURLs:v});case 25:case"end":return r.stop()}}),r,null,[[3,16,19,22]])}))))}},{key:"activate",value:function(e){var t=this;return X(e,q(C.a.mark((function e(){var r,n,a,i,s,u,o;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,self.caches.open(t.strategy.cacheName);case 2:return r=e.sent,e.next=5,r.keys();case 5:n=e.sent,a=new Set(t._urlsToCacheKeys.values()),i=[],s=c(n),e.prev=9,s.s();case 11:if((u=s.n()).done){e.next=19;break}if(o=u.value,a.has(o.url)){e.next=17;break}return e.next=16,r.delete(o);case 16:i.push(o.url);case 17:e.next=11;break;case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(9),s.e(e.t0);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",{deletedURLs:i});case 29:case"end":return e.stop()}}),e,null,[[9,21,24,27]])}))))}},{key:"getURLsToCacheKeys",value:function(){return this._urlsToCacheKeys}},{key:"getCachedURLs",value:function(){return i(this._urlsToCacheKeys.keys())}},{key:"getCacheKeyForURL",value:function(e){var t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}},{key:"matchPrecache",value:function(){var e=q(C.a.mark((function e(t){var r,n,a;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t instanceof Request?t.url:t,!(n=this.getCacheKeyForURL(r))){e.next=7;break}return e.next=5,self.caches.open(this.strategy.cacheName);case 5:return a=e.sent,e.abrupt("return",a.match(n));case 7:return e.abrupt("return",void 0);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createHandlerBoundToURL",value:function(e){var t=this,r=this.getCacheKeyForURL(e);if(!r)throw new m("non-precached-url",{url:e});return function(n){return n.request=new Request(e),n.params=P({cacheKey:r},n.params),t.strategy.handle(n)}}},{key:"strategy",get:function(){return this._strategy}}]),e}(),de=function(){return pe||(pe=new ve),pe};r(3);var ye,be="GET",xe=function(e){return e&&"object"===typeof e?e:{handle:e}},me=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be;u(this,e),this.handler=xe(r),this.match=t,this.method=n}return W(e,[{key:"setCatchHandler",value:function(e){this.catchHandler=xe(e)}}]),e}(),ge=function(e){h(r,e);var t=d(r);function r(e,n,a){u(this,r);return t.call(this,(function(t){var r=t.url,n=e.exec(r.href);if(n&&(r.origin===location.origin||0===n.index))return n.slice(1)}),n,a)}return r}(me),we=function(){function e(){u(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}return W(e,[{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var r=t.request,n=e.handleRequest({request:r,event:t});n&&t.respondWith(n)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var r=t.data.payload;0;var n=Promise.all(r.urlsToCache.map((function(r){"string"===typeof r&&(r=[r]);var n=y(Request,i(r));return e.handleRequest({request:n,event:t})})));t.waitUntil(n),t.ports&&t.ports[0]&&n.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=this,r=e.request,n=e.event;var a=new URL(r.url,location.href);if(a.protocol.startsWith("http")){var i=a.origin===location.origin,s=this.findMatchingRoute({event:n,request:r,sameOrigin:i,url:a}),c=s.params,u=s.route,o=u&&u.handler;0;var h=r.method;if(!o&&this._defaultHandlerMap.has(h)&&(o=this._defaultHandlerMap.get(h)),o){var f;0;try{f=o.handle({url:a,request:r,event:n,params:c})}catch(p){f=Promise.reject(p)}var l=u&&u.catchHandler;return f instanceof Promise&&(this._catchHandler||l)&&(f=f.catch(function(){var e=q(C.a.mark((function e(i){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l){e.next=11;break}return e.prev=2,e.next=5,l.handle({url:a,request:r,event:n,params:c});case 5:return e.abrupt("return",e.sent);case 8:e.prev=8,e.t0=e.catch(2),i=e.t0;case 11:if(!t._catchHandler){e.next=14;break}return e.abrupt("return",t._catchHandler.handle({url:a,request:r,event:n}));case 14:throw i;case 15:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}())),f}}}},{key:"findMatchingRoute",value:function(e){var t,r=e.url,n=e.sameOrigin,a=e.request,i=e.event,s=c(this._routes.get(a.method)||[]);try{for(s.s();!(t=s.n()).done;){var u=t.value,o=void 0,h=u.match({url:r,sameOrigin:n,request:a,event:i});if(h)return o=h,(Array.isArray(h)&&0===h.length||h.constructor===Object&&0===Object.keys(h).length||"boolean"===typeof h)&&(o=void 0),{route:u,params:o}}}catch(f){s.e(f)}finally{s.f()}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be;this._defaultHandlerMap.set(t,xe(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=xe(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new m("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new m("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}},{key:"routes",get:function(){return this._routes}}]),e}(),ke=function(){return ye||((ye=new we).addFetchListener(),ye.addCacheListener()),ye};function _e(e,t,r){var n;if("string"===typeof e){var a=new URL(e,location.href);n=new me((function(e){return e.url.href===a.href}),t,r)}else if(e instanceof RegExp)n=new ge(e,t,r);else if("function"===typeof e)n=new me(e,t,r);else{if(!(e instanceof me))throw new m("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return ke().registerRoute(n),n}function Re(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function(){var r=a[n];t.some((function(e){return e.test(r)}))&&e.searchParams.delete(r)},n=0,a=i(e.searchParams.keys());n<a.length;n++)r();return e}var Ee=C.a.mark(Le);function Le(e){var t,r,n,a,i,s,u,o,h,f,l,p,v,d,y,b,x=arguments;return C.a.wrap((function(m){for(;;)switch(m.prev=m.next){case 0:return t=x.length>1&&void 0!==x[1]?x[1]:{},r=t.ignoreURLParametersMatching,n=void 0===r?[/^utm_/,/^fbclid$/]:r,a=t.directoryIndex,i=void 0===a?"index.html":a,s=t.cleanURLs,u=void 0===s||s,o=t.urlManipulation,(h=new URL(e,location.href)).hash="",m.next=5,h.href;case 5:return f=Re(h,n),m.next=8,f.href;case 8:if(!i||!f.pathname.endsWith("/")){m.next=13;break}return(l=new URL(f.href)).pathname+=i,m.next=13,l.href;case 13:if(!u){m.next=18;break}return(p=new URL(f.href)).pathname+=".html",m.next=18,p.href;case 18:if(!o){m.next=37;break}v=o({url:h}),d=c(v),m.prev=21,d.s();case 23:if((y=d.n()).done){m.next=29;break}return b=y.value,m.next=27,b.href;case 27:m.next=23;break;case 29:m.next=34;break;case 31:m.prev=31,m.t0=m.catch(21),d.e(m.t0);case 34:return m.prev=34,d.f(),m.finish(34);case 37:case"end":return m.stop()}}),Ee,null,[[21,31,34,37]])}var Oe=function(e){h(r,e);var t=d(r);function r(e,n){u(this,r);return t.call(this,(function(t){var r,a=t.request,i=e.getURLsToCacheKeys(),s=c(Le(a.url,n));try{for(s.s();!(r=s.n()).done;){var u=r.value,o=i.get(u);if(o)return{cacheKey:o}}}catch(h){s.e(h)}finally{s.f()}}),e.strategy)}return r}(me);var Ce,Se={cacheWillUpdate:function(){var e=q(C.a.mark((function e(t){var r;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(200!==(r=t.response).status&&0!==r.status){e.next=3;break}return e.abrupt("return",r);case 3:return e.abrupt("return",null);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Te=function(e){h(r,e);var t=d(r);function r(e){var n;return u(this,r),(n=t.call(this,e)).plugins.some((function(e){return"cacheWillUpdate"in e}))||n.plugins.unshift(Se),n}return W(r,[{key:"_handle",value:function(){var e=q(C.a.mark((function e(t,r){var n,a,i;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return[],n=r.fetchAndCachePut(t).catch((function(){})),e.next=5,r.cacheMatch(t);case 5:if(!(a=e.sent)){e.next=10;break}0,e.next=20;break;case 10:return e.prev=11,e.next=14,n;case 14:a=e.sent,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(11),i=e.t0;case 20:if(a){e.next=23;break}throw new m("no-response",{url:t.url,error:i});case 23:return e.abrupt("return",a);case 24:case"end":return e.stop()}}),e,this,[[11,17]])})));return function(t,r){return e.apply(this,arguments)}}()}]),r}(fe);self.addEventListener("activate",(function(){return self.clients.claim()})),function(e){de().precache(e)}([{'revision':'2877adab21bb8bc47ad47689d10d930d','url':'/shlink-web-client/feature-recover-pwa/index.html'},{'revision':null,'url':'/shlink-web-client/feature-recover-pwa/static/css/2.bfc52f08.chunk.css'},{'revision':null,'url':'/shlink-web-client/feature-recover-pwa/static/css/main.23af3063.chunk.css'},{'revision':null,'url':'/shlink-web-client/feature-recover-pwa/static/js/2.4b94bdb8.chunk.js'},{'revision':null,'url':'/shlink-web-client/feature-recover-pwa/static/js/main.32ccb202.chunk.js'},{'revision':null,'url':'/shlink-web-client/feature-recover-pwa/static/js/runtime~main.dc785c04.js'}]),function(e){var t=de();_e(new Oe(t,e))}(Ce);var Pe,Ue=new RegExp("/[^/?]+\\.[^/]+$");_e((function(e){var t=e.request,r=e.url;return"navigate"===t.mode&&(!r.pathname.startsWith("/_")&&!r.pathname.match(Ue))}),(Pe="/shlink-web-client/feature-recover-pwa/index.html",de().createHandlerBoundToURL(Pe))),_e((function(e){var t=e.url;return t.origin===self.location.origin&&t.pathname.endsWith(".png")}),new Te({cacheName:"images",plugins:[new ie({maxEntries:50})]})),self.addEventListener("message",(function(e){e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}))}]);
|
|
//# sourceMappingURL=service-worker.js.map
|