electron-devtools-vendor
Version:
<div align="center"> <h2>electron-devtools-vendor</h2> <img alt="MIT" src="https://img.shields.io/github/license/BlackHole1/electron-devtools-vendor?color=9cf&style=flat-square"> <img alt="GitHub repo size" src="https://img.shields.io/github/r
1 lines • 6.93 kB
JavaScript
(()=>{"use strict";var e={60616:(e,t)=>{function o(e,t=!1){const n="6.0";let r={};function s(e){if(!e.__vdevtools__injected)try{e.__vdevtools__injected=!0;const t=()=>{try{e.contentWindow.__VUE_DEVTOOLS_IFRAME__=e;const t=e.contentDocument.createElement("script");t.textContent=`;(${o.toString()})(window, true)`,e.contentDocument.documentElement.appendChild(t),t.parentNode.removeChild(t)}catch(t){}};t(),e.addEventListener("load",(()=>t()))}catch(t){}}let i=0;function l(){if("undefined"===typeof window)return;const e=document.querySelectorAll("iframe:not([data-vue-devtools-ignore])");for(const t of e)s(t)}l();const f=setInterval((()=>{l(),i++,i>=5&&clearInterval(f)}),1e3);if(Object.prototype.hasOwnProperty.call(e,"__VUE_DEVTOOLS_GLOBAL_HOOK__"))return void(e.__VUE_DEVTOOLS_GLOBAL_HOOK__.devtoolsVersion!==n&&console.error("Another version of Vue Devtools seems to be installed. Please enable only one version at a time."));let a;if(t){const e=e=>{try{const t=window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(t)return e(t);console.warn("[Vue Devtools] No hook in parent window")}catch(t){console.warn("[Vue Devtools] Failed to send message to parent window",t)}};a={devtoolsVersion:n,set Vue(t){e((e=>{e.Vue=t}))},set enabled(t){e((e=>{e.enabled=t}))},on(t,o){e((e=>e.on(t,o)))},once(t,o){e((e=>e.once(t,o)))},off(t,o){e((e=>e.off(t,o)))},emit(t,...o){e((e=>e.emit(t,...o)))},cleanupBuffer(t){var o;return null!==(o=e((e=>e.cleanupBuffer(t))))&&void 0!==o&&o}}}else a={devtoolsVersion:n,Vue:null,enabled:void 0,_buffer:[],_bufferMap:new Map,_bufferToRemove:new Map,store:null,initialState:null,storeModules:null,flushStoreModules:null,apps:[],_replayBuffer(e){const t=this._buffer;this._buffer=[],this._bufferMap.clear(),this._bufferToRemove.clear();for(let o=0,n=t.length;o<n;o++){const n=t[o].slice(1);n[0]===e?this.emit.apply(this,n):this._buffer.push(t[o])}},on(e,t){const o=`$${e}`;r[o]?r[o].push(t):(r[o]=[t],this._replayBuffer(e))},once(e,t){const o=(...n)=>(this.off(e,o),t.apply(this,n));this.on(e,o)},off(e,t){if(e=`$${e}`,arguments.length){const o=r[e];if(o)if(t)for(let e=0,n=o.length;e<n;e++){const n=o[e];if(n===t||n.fn===t){o.splice(e,1);break}}else r[e]=null}else r={}},emit(e,...t){const o=`$${e}`;let n=r[o];if(n){n=n.slice();for(let o=0,r=n.length;o<r;o++)try{const r=n[o].apply(this,t);"function"===typeof(null===r||void 0===r?void 0:r.catch)&&r.catch((o=>{console.error(`[Hook] Error in async event handler for ${e} with args:`,t),console.error(o)}))}catch(s){console.error(`[Hook] Error in event handler for ${e} with args:`,t),console.error(s)}}else{const o=[Date.now(),e,...t];this._buffer.push(o);for(let e=2;e<t.length;e++)if("object"===typeof t[e]&&t[e]){this._bufferMap.set(t[e],o);break}}},cleanupBuffer(e){const t=this._bufferMap.has(e);return t&&this._bufferToRemove.set(this._bufferMap.get(e),!0),t},_cleanupBuffer(){const e=Date.now();this._buffer=this._buffer.filter((t=>!this._bufferToRemove.has(t)&&e-t[0]<1e4)),this._bufferToRemove.clear(),this._bufferMap.clear()}},setInterval((()=>{a._cleanupBuffer()}),1e4),a.once("init",(t=>{a.Vue=t,t&&(t.prototype.$inspect=function(){const t=e.__VUE_DEVTOOLS_INSPECT__;t&&t(this)})})),a.on("app:init",((e,t,o)=>{const n={app:e,version:t,types:o};a.apps.push(n),a.emit("app:add",n)})),a.once("vuex:init",(e=>{a.store=e,a.initialState=L(e.state);const t=e.replaceState.bind(e);let o,n;e.replaceState=e=>{a.initialState=L(e),t(e)},e.registerModule&&(a.storeModules=[],o=e.registerModule.bind(e),e.registerModule=(e,t,n)=>{"string"===typeof e&&(e=[e]),a.storeModules.push({path:e,module:t,options:n}),o(e,t,n)},n=e.unregisterModule.bind(e),e.unregisterModule=e=>{"string"===typeof e&&(e=[e]);const t=e.join("/"),o=a.storeModules.findIndex((e=>e.path.join("/")===t));-1!==o&&a.storeModules.splice(o,1),n(e)}),a.flushStoreModules=()=>(e.replaceState=t,e.registerModule&&(e.registerModule=o,e.unregisterModule=n),a.storeModules||[])}));if(Object.defineProperty(e,"__VUE_DEVTOOLS_GLOBAL_HOOK__",{get(){return a}}),e.__VUE_DEVTOOLS_HOOK_REPLAY__)try{e.__VUE_DEVTOOLS_HOOK_REPLAY__.forEach((e=>e(a))),e.__VUE_DEVTOOLS_HOOK_REPLAY__=[]}catch(T){console.error("[vue-devtools] Error during hook replay",T)}const{toString:c}=Function.prototype,{create:u,defineProperty:d,getOwnPropertyDescriptor:_,getOwnPropertyNames:p,getOwnPropertySymbols:h,getPrototypeOf:O}=Object,{hasOwnProperty:y,propertyIsEnumerable:v}=Object.prototype,E={SYMBOL_PROPERTIES:"function"===typeof h,WEAKSET:"function"===typeof WeakSet},b=()=>{if(E.WEAKSET)return new WeakSet;const e=u({add:t=>e._values.push(t),has:t=>!!~e._values.indexOf(t)});return e._values=[],e},g=(e,t)=>{if(!e.constructor)return u(null);const o=e.__proto__||O(e);if(e.constructor===t.Object)return o===t.Object.prototype?{}:u(o);if(~c.call(e.constructor).indexOf("[native code]"))try{return new e.constructor}catch(T){}return u(o)},w=(e,t,o,n)=>{const r=g(e,t);for(const s in e)y.call(e,s)&&(r[s]=o(e[s],n));if(E.SYMBOL_PROPERTIES){const t=h(e);if(t.length)for(let s,i=0;i<t.length;i++)s=t[i],v.call(e,s)&&(r[s]=o(e[s],n))}return r},S=(e,t,o,n)=>{const r=g(e,t),s=E.SYMBOL_PROPERTIES?[].concat(p(e),h(e)):p(e);if(s.length)for(let i,l,f=0;f<s.length;f++)i=s[f],"callee"!==i&&"caller"!==i&&(l=_(e,i),l.value=o(e[i],n),d(r,i,l));return r},M=e=>{let t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},{isArray:m}=Array,V=(()=>"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof globalThis?globalThis:void(console&&console.error&&console.error('Unable to locate global object, returning "this".')))();function L(e,t=null){const o=!(!t||!t.isStrict),n=t&&t.realm||V,r=o?S:w,s=(e,t)=>{if(!e||"object"!==typeof e||t.has(e))return e;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return e.cloneNode(!1);const i=e.constructor;if(i===n.Object)return t.add(e),r(e,n,s,t);let l;if(m(e)){if(t.add(e),o)return S(e,n,s,t);l=new i;for(let o=0;o<e.length;o++)l[o]=s(e[o],t);return l}if(e instanceof n.Date)return new i(e.getTime());if(e instanceof n.RegExp)return l=new i(e.source,e.flags||M(e)),l.lastIndex=e.lastIndex,l;if(n.Map&&e instanceof n.Map)return t.add(e),l=new i,e.forEach(((e,o)=>{l.set(o,s(e,t))})),l;if(n.Set&&e instanceof n.Set)return t.add(e),l=new i,e.forEach((e=>{l.add(s(e,t))})),l;if(n.Buffer&&n.Buffer.isBuffer(e))return l=n.Buffer.allocUnsafe?n.Buffer.allocUnsafe(e.length):new i(e.length),e.copy(l),l;if(n.ArrayBuffer){if(n.ArrayBuffer.isView(e))return new i(e.buffer.slice(0));if(e instanceof n.ArrayBuffer)return e.slice(0)}return y.call(e,"then")&&"function"===typeof e.then||e instanceof Error||n.WeakMap&&e instanceof n.WeakMap||n.WeakSet&&e instanceof n.WeakSet?e:(t.add(e),r(e,n,s,t))};return s(e,b())}}t.U=void 0,t.U=o}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,o),s.exports}(()=>{var e=o(60616);(0,e.U)(window)})()})();