2 lines
13 KiB
JavaScript
Executable File
2 lines
13 KiB
JavaScript
Executable File
(()=>{"use strict";var e={3018:(e,t,r)=>{const n=r(5986),i=Symbol("max"),s=Symbol("length"),l=Symbol("lengthCalculator"),a=Symbol("allowStale"),o=Symbol("maxAge"),h=Symbol("dispose"),u=Symbol("noDisposeOnSet"),c=Symbol("lruList"),p=Symbol("cache"),d=Symbol("updateAgeOnGet"),naiveLength=()=>1;const get=(e,t,r)=>{const n=e[p].get(t);if(n){const t=n.value;if(isStale(e,t)){if(del(e,n),!e[a])return}else r&&(e[d]&&(n.value.now=Date.now()),e[c].unshiftNode(n));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[o])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[o]&&r>e[o]},trim=e=>{if(e[s]>e[i])for(let t=e[c].tail;e[s]>e[i]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[h]&&e[h](r.key,r.value),e[s]-=r.length,e[p].delete(r.key),e[c].removeNode(t)}};class f{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const forEachStep=(e,t,r,n)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[a]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||naiveLength;if(this[l]="function"!=typeof t?naiveLength:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[o]=e.maxAge||0,this[h]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,trim(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[o]=e,trim(this)}get maxAge(){return this[o]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[l]&&(this[l]=e,this[s]=0,this[c].forEach((e=>{e.length=this[l](e.value,e.key),this[s]+=e.length}))),trim(this)}get lengthCalculator(){return this[l]}get length(){return this[s]}get itemCount(){return this[c].length}rforEach(e,t){t=t||this;for(let r=this[c].tail;null!==r;){const n=r.prev;forEachStep(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[c].head;null!==r;){const n=r.next;forEachStep(this,e,r,t),r=n}}keys(){return this[c].toArray().map((e=>e.key))}values(){return this[c].toArray().map((e=>e.value))}reset(){this[h]&&this[c]&&this[c].length&&this[c].forEach((e=>this[h](e.key,e.value))),this[p]=new Map,this[c]=new n,this[s]=0}dump(){return this[c].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[c]}set(e,t,r){if((r=r||this[o])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[l](t,e);if(this[p].has(e)){if(a>this[i])return del(this,this[p].get(e)),!1;const l=this[p].get(e).value;return this[h]&&(this[u]||this[h](e,l.value)),l.now=n,l.maxAge=r,l.value=t,this[s]+=a-l.length,l.length=a,this.get(e),trim(this),!0}const d=new f(e,t,a,n,r);return d.length>this[i]?(this[h]&&this[h](e,t),!1):(this[s]+=d.length,this[c].unshift(d),this[p].set(e,this[c].head),trim(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[c].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[p].forEach(((e,t)=>get(this,t,!1)))}}},7533:e=>{e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},5986:(e,t,r)=>{function Yallist(e){var t=this;if(t instanceof Yallist||(t=new Yallist),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)t.push(arguments[r]);return t}function insert(e,t,r){var n=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,n){if(!(this instanceof Node))return new Node(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=Yallist,Yallist.Node=Node,Yallist.create=Yallist,Yallist.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},Yallist.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist.prototype.map=function(e,t){t=t||this;for(var r=new Yallist,n=this.head;null!==n;)r.push(e.call(t,n.value,this)),n=n.next;return r},Yallist.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist,n=this.tail;null!==n;)r.push(e.call(t,n.value,this)),n=n.prev;return r},Yallist.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},Yallist.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},Yallist.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;for(;null!==i&&n<t;n++,i=i.next)r.push(i.value);return r},Yallist.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=this.length,i=this.tail;null!==i&&n>t;n--)i=i.prev;for(;null!==i&&n>e;n--,i=i.prev)r.push(i.value);return r},Yallist.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var s=[];for(n=0;i&&n<t;n++)s.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(n=0;n<r.length;n++)i=insert(this,i,r[n]);return s},Yallist.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(7533)(Yallist)}catch(e){}}},t={};function __webpack_require__(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,__webpack_require__),i.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const esm_compareVersions=(e,t)=>{const r=validateAndParse(e),n=validateAndParse(t),i=r.pop(),s=n.pop(),l=compareSegments(r,n);return 0!==l?l:i&&s?compareSegments(i.split("."),s.split(".")):i||s?i?-1:1:0},e=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,validateAndParse=t=>{if("string"!=typeof t)throw new TypeError("Invalid argument expected string");const r=t.match(e);if(!r)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return r.shift(),r},isWildcard=e=>"*"===e||"x"===e||"X"===e,tryParse=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},compareStrings=(e,t)=>{if(isWildcard(e)||isWildcard(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(tryParse(e),tryParse(t));return r>n?1:r<n?-1:0},compareSegments=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=compareStrings(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};Object.keys(t);var r=__webpack_require__(3018),n=__webpack_require__.n(r);Symbol.for("react.element"),Symbol.for("react.transitional.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.consumer"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode"),Symbol.for("react.offscreen"),Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker"),Symbol.for("react.memo_cache_sentinel"),Symbol.for("react.postpone"),Symbol.iterator;Symbol.asyncIterator,Array.isArray,Object.prototype.hasOwnProperty,new WeakMap,new(n())({max:1e3});Symbol("inspectable"),Symbol("inspected"),Symbol("name"),Symbol("preview_long"),Symbol("preview_short"),Symbol("readonly"),Symbol("size"),Symbol("type"),Symbol("unserializable");Array.isArray;const i="999.9.9";function hasAssignedBackend(e){return null!=e&&""!==e&&function(e="",t=""){return esm_compareVersions(e,t)>-1}(e,i)}const s="compact";let l=!1;window.addEventListener("message",(function welcome(e){e.source===window&&"react-devtools-content-script"===e.data.source&&(l?console.warn('React DevTools detected duplicate welcome "message" events from the content script.'):(l=!0,window.removeEventListener("message",welcome),function(e){if(null==e)return;e.renderers.forEach((t=>{registerRenderer(t,e)})),e.backends.forEach(((t,r)=>{a.delete(r),activateBackend(r,e)})),updateRequiredBackends(),e.sub("renderer",(({renderer:t})=>{registerRenderer(t,e),updateRequiredBackends()})),e.sub("devtools-backend-installed",(t=>{activateBackend(t,e),updateRequiredBackends()}))}(window.__REACT_DEVTOOLS_GLOBAL_HOOK__)))}));const a=new Set;function registerRenderer(e,t){let r=e.reconcilerVersion||e.version;hasAssignedBackend(r)||(r=s),t.backends.has(r)||a.add(r)}function activateBackend(e,t){const r=t.backends.get(e);if(!r)throw new Error(`Could not find backend for version "${e}"`);const{Agent:n,Bridge:i,initBackend:s,setupNativeStyleEditor:l}=r,o=new i({listen(e){const listener=t=>{t.source===window&&t.data&&"react-devtools-content-script"===t.data.source&&t.data.payload&&e(t.data.payload)};return window.addEventListener("message",listener),()=>{window.removeEventListener("message",listener)}},send(e,t,r){window.postMessage({source:"react-devtools-bridge",payload:{event:e,payload:t}},"*",r)}}),h=new n(o);h.addListener("shutdown",(()=>{t.emit("shutdown")})),s(t,h,window),"function"==typeof l&&t.resolveRNStyle&&l(o,h,t.resolveRNStyle,t.nativeStyleEditorValidAttributes),o.send("extensionBackendInitialized"),a.delete(e)}function updateRequiredBackends(){0!==a.size&&window.postMessage({source:"react-devtools-backend-manager",payload:{type:"require-backends",versions:Array.from(a)}},"*")}})()})();
|
|
//# sourceMappingURL=backendManager.js.map
|