aboutsummaryrefslogtreecommitdiff
path: root/dist/background.js
blob: bcfc4d55fbf9e914d91db1caa4dbbea30820d64e (plain) (blame)
1
!function(t){function e(e){for(var r,i,o=e[0],u=e[1],l=e[2],c=0,f=[];c<o.length;c++)i=o[c],s[i]&&f.push(s[i][0]),s[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);for(h&&h(e);f.length;)f.shift()();return a.push.apply(a,l||[]),n()}function n(){for(var t,e=0;e<a.length;e++){for(var n=a[e],r=!0,o=1;o<n.length;o++){var u=n[o];0!==s[u]&&(r=!1)}r&&(a.splice(e--,1),t=i(i.s=n[0]))}return t}var r={},s={2:0},a=[];function i(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var o=window.webpackJsonp=window.webpackJsonp||[],u=o.push.bind(o);o.push=e,o=o.slice();for(var l=0;l<o.length;l++)e(o[l]);var h=u;a.push([852,0]),n()}({246:function(t,e,n){"use strict";const r=n(308),s=Symbol("max"),a=Symbol("length"),i=Symbol("lengthCalculator"),o=Symbol("allowStale"),u=Symbol("maxAge"),l=Symbol("dispose"),h=Symbol("noDisposeOnSet"),c=Symbol("lruList"),f=Symbol("cache"),d=Symbol("updateAgeOnGet"),v=()=>1;const p=(t,e,n)=>{const r=t[f].get(e);if(r){const e=r.value;if(g(t,e)){if(m(t,r),!t[o])return}else n&&(t[d]&&(r.value.now=Date.now()),t[c].unshiftNode(r));return e.value}},g=(t,e)=>{if(!e||!e.maxAge&&!t[u])return!1;const n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[u]&&n>t[u]},y=t=>{if(t[a]>t[s])for(let e=t[c].tail;t[a]>t[s]&&null!==e;){const n=e.prev;m(t,e),e=n}},m=(t,e)=>{if(e){const n=e.value;t[l]&&t[l](n.key,n.value),t[a]-=n.length,t[f].delete(n.key),t[c].removeNode(e)}};class j{constructor(t,e,n,r,s){this.key=t,this.value=e,this.length=n,this.now=r,this.maxAge=s||0}}const b=(t,e,n,r)=>{let s=n.value;g(t,s)&&(m(t,n),t[o]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};t.exports=class{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[s]=t.max||1/0;const e=t.length||v;if(this[i]="function"!=typeof e?v:e,this[o]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[u]=t.maxAge||0,this[l]=t.dispose,this[h]=t.noDisposeOnSet||!1,this[d]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[s]=t||1/0,y(this)}get max(){return this[s]}set allowStale(t){this[o]=!!t}get allowStale(){return this[o]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[u]=t,y(this)}get maxAge(){return this[u]}set lengthCalculator(t){"function"!=typeof t&&(t=v),t!==this[i]&&(this[i]=t,this[a]=0,this[c].forEach(t=>{t.length=this[i](t.value,t.key),this[a]+=t.length})),y(this)}get lengthCalculator(){return this[i]}get length(){return this[a]}get itemCount(){return this[c].length}rforEach(t,e){e=e||this;for(let n=this[c].tail;null!==n;){const r=n.prev;b(this,t,n,e),n=r}}forEach(t,e){e=e||this;for(let n=this[c].head;null!==n;){const r=n.next;b(this,t,n,e),n=r}}keys(){return this[c].toArray().map(t=>t.key)}values(){return this[c].toArray().map(t=>t.value)}reset(){this[l]&&this[c]&&this[c].length&&this[c].forEach(t=>this[l](t.key,t.value)),this[f]=new Map,this[c]=new r,this[a]=0}dump(){return this[c].map(t=>!g(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[c]}set(t,e,n){if((n=n||this[u])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,o=this[i](e,t);if(this[f].has(t)){if(o>this[s])return m(this,this[f].get(t)),!1;const i=this[f].get(t).value;return this[l]&&(this[h]||this[l](t,i.value)),i.now=r,i.maxAge=n,i.value=e,this[a]+=o-i.length,i.length=o,this.get(t),y(this),!0}const d=new j(t,e,o,r,n);return d.length>this[s]?(this[l]&&this[l](t,e),!1):(this[a]+=d.length,this[c].unshift(d),this[f].set(t,this[c].head),y(this),!0)}has(t){if(!this[f].has(t))return!1;const e=this[f].get(t).value;return!g(this,e)}get(t){return p(this,t,!0)}peek(t){return p(this,t,!1)}pop(){const t=this[c].tail;return t?(m(this,t),t.value):null}del(t){m(this,this[f].get(t))}load(t){this.reset();const e=Date.now();for(let n=t.length-1;n>=0;n--){const r=t[n],s=r.e||0;if(0===s)this.set(r.k,r.v);else{const t=s-e;t>0&&this.set(r.k,r.v,t)}}}prune(){this[f].forEach((t,e)=>p(this</