@pmmmwh/react-refresh-webpack-plugin
Version:
An **EXPERIMENTAL** Webpack plugin to enable "Fast Refresh" (also previously known as _Hot Reloading_) for React components.
10 lines • 15.5 kB
JavaScript
(()=>{var t={5644:(t,e)=>{"use strict";
/**
* @license React
* react-refresh-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(){var t=Symbol.for("react.forward_ref"),r=Symbol.for("react.memo"),n="function"==typeof WeakMap?WeakMap:Map,o=new Map,i=new n,u=new n,s=new n,c=[],a=new Map,f=new Map,p=new Set,l=new Set,v="function"==typeof WeakMap?new WeakMap:null,y=!1;function h(t){if(null!==t.fullKey)return t.fullKey;var e,r=t.ownKey;try{e=t.getCustomHooks()}catch(e){return t.forceReset=!0,t.fullKey=r,r}for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return t.forceReset=!0,t.fullKey=r,r;var i=u.get(o);if(void 0!==i){var s=h(i);i.forceReset&&(t.forceReset=!0),r+="\n---\n"+s}}return t.fullKey=r,r}function d(t){return t.prototype&&t.prototype.isReactComponent}function b(t,e){return!d(t)&&!d(e)&&!!function(t,e){var r=u.get(t),n=u.get(e);return void 0===r&&void 0===n||void 0!==r&&void 0!==n&&(h(r)===h(n)&&!n.forceReset)}(t,e)}function m(t){return s.get(t)}function g(t){var e=new Set;return t.forEach((function(t){e.add(t)})),e}function w(t,e){try{return t[e]}catch(t){return}}function _(e,n){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;if(u.has(e)||u.set(e,{forceReset:o,ownKey:n,fullKey:null,getCustomHooks:i||function(){return[]}}),"object"==typeof e&&null!==e)switch(w(e,"$$typeof")){case t:_(e.render,n,o,i);break;case r:_(e.type,n,o,i)}}function x(t){var e=u.get(t);void 0!==e&&h(e)}e._getMountedRootCount=function(){return p.size},e.collectCustomHooksForSignature=x,e.createSignatureFunctionForTransform=function(){var t,e,r=!1;return function(n,o,i,u){if("string"==typeof o)return t||(t=n,e="function"==typeof u),null==n||"function"!=typeof n&&"object"!=typeof n||_(n,o,i,u),n;!r&&e&&(r=!0,x(t))}},e.findAffectedHostInstances=function(t){var e=new Set;return p.forEach((function(r){var n=f.get(r);if(void 0===n)throw new Error("Could not find helpers for a root. This is a bug in React Refresh.");n.findHostInstancesForRefresh(r,t).forEach((function(t){e.add(t)}))})),e},e.getFamilyByID=function(t){return o.get(t)},e.getFamilyByType=function(t){return i.get(t)},e.hasUnrecoverableErrors=function(){return!1},e.injectIntoGlobalHook=function(t){var e=t.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(void 0===e){var r=0;t.__REACT_DEVTOOLS_GLOBAL_HOOK__=e={renderers:new Map,supportsFiber:!0,inject:function(t){return r++},onScheduleFiberRoot:function(t,e,r){},onCommitFiberRoot:function(t,e,r,n){},onCommitFiberUnmount:function(){}}}if(e.isDisabled)console.warn("Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). Fast Refresh is not compatible with this shim and will be disabled.");else{var n=e.inject;e.inject=function(t){var e=n.apply(this,arguments);return"function"==typeof t.scheduleRefresh&&"function"==typeof t.setRefreshHandler&&a.set(e,t),e},e.renderers.forEach((function(t,e){"function"==typeof t.scheduleRefresh&&"function"==typeof t.setRefreshHandler&&a.set(e,t)}));var o=e.onCommitFiberRoot,i=e.onScheduleFiberRoot||function(){};e.onScheduleFiberRoot=function(t,e,r){return y||(l.delete(e),null!==v&&v.set(e,r)),i.apply(this,arguments)},e.onCommitFiberRoot=function(t,e,r,n){var i=a.get(t);if(void 0!==i){f.set(e,i);var u=e.current,s=u.alternate;if(null!==s){var c=null!=s.memoizedState&&null!=s.memoizedState.element&&p.has(e),v=null!=u.memoizedState&&null!=u.memoizedState.element;!c&&v?(p.add(e),l.delete(e)):c&&v||(c&&!v?(p.delete(e),n?l.add(e):f.delete(e)):c||v||n&&l.add(e))}else p.add(e)}return o.apply(this,arguments)}}},e.isLikelyComponentType=function(e){switch(typeof e){case"function":if(null!=e.prototype){if(e.prototype.isReactComponent)return!0;var n=Object.getOwnPropertyNames(e.prototype);if(n.length>1||"constructor"!==n[0])return!1;if(e.prototype.__proto__!==Object.prototype)return!1}var o=e.name||e.displayName;return"string"==typeof o&&/^[A-Z]/.test(o);case"object":if(null!=e)switch(w(e,"$$typeof")){case t:case r:return!0;default:return!1}return!1;default:return!1}},e.performReactRefresh=function(){if(0===c.length)return null;if(y)return null;y=!0;try{var t=new Set,e=new Set,r=c;c=[],r.forEach((function(r){var n=r[0],o=r[1],i=n.current;s.set(i,n),s.set(o,n),n.current=o,b(i,o)?e.add(n):t.add(n)}));var n={updatedFamilies:e,staleFamilies:t};a.forEach((function(t){t.setRefreshHandler(m)}));var o=!1,i=null,u=g(l),h=g(p),d=(w=f,_=new Map,w.forEach((function(t,e){_.set(e,t)})),_);if(u.forEach((function(t){var e=d.get(t);if(void 0===e)throw new Error("Could not find helpers for a root. This is a bug in React Refresh.");if(l.has(t),null!==v&&v.has(t)){var r=v.get(t);try{e.scheduleRoot(t,r)}catch(t){o||(o=!0,i=t)}}})),h.forEach((function(t){var e=d.get(t);if(void 0===e)throw new Error("Could not find helpers for a root. This is a bug in React Refresh.");p.has(t);try{e.scheduleRefresh(t,n)}catch(t){o||(o=!0,i=t)}})),o)throw i;return n}finally{y=!1}var w,_},e.register=function e(n,u){if(null!==n&&("function"==typeof n||"object"==typeof n)&&!i.has(n)){var s=o.get(u);if(void 0===s?(s={current:n},o.set(u,s)):c.push([s,n]),i.set(n,s),"object"==typeof n&&null!==n)switch(w(n,"$$typeof")){case t:e(n.render,u+"$render");break;case r:e(n.type,u+"$type")}}},e.setSignature=_})()},6206:(t,e,r)=>{"use strict";t.exports=r(5644)},3565:(t,e,r)=>{"use strict";var n=r(1960);t.exports=n},2671:(t,e,r)=>{"use strict";r(2344),t.exports=r(1010)},4444:(t,e,r)=>{"use strict";t.exports=r(214)},214:(t,e,r)=>{"use strict";r(397);var n=r(3565);t.exports=n},2159:(t,e,r)=>{"use strict";var n=r(2250),o=r(4640),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},6624:(t,e,r)=>{"use strict";var n=r(6285),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},5807:(t,e,r)=>{"use strict";var n=r(1907),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},1626:(t,e,r)=>{"use strict";var n=r(9447),o=r(4284),i=r(5817);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},5817:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2532:(t,e,r)=>{"use strict";var n=r(1010),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},9447:(t,e,r)=>{"use strict";var n=r(8828);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:(t,e,r)=>{"use strict";var n=r(1010),o=r(6285),i=n.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},4723:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5683:(t,e,r)=>{"use strict";var n,o,i=r(1010),u=r(4723),s=i.process,c=i.Deno,a=s&&s.versions||c&&c.version,f=a&&a.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&u&&(!(n=u.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=u.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},1091:(t,e,r)=>{"use strict";var n=r(1010),o=r(6024),i=r(2361),u=r(2250),s=r(3846).f,c=r(7463),a=r(2046),f=r(8311),p=r(1626),l=r(9724);r(6128);var v=function(t){var e=function(r,n,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,i)}return o(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var r,o,y,h,d,b,m,g,w,_=t.target,x=t.global,j=t.stat,S=t.proto,O=x?n:j?n[_]:n[_]&&n[_].prototype,R=x?a:a[_]||p(a,_,{})[_],E=R.prototype;for(h in e)o=!(r=c(x?h:_+(j?".":"#")+h,t.forced))&&O&&l(O,h),b=R[h],o&&(m=t.dontCallGetSet?(w=s(O,h))&&w.value:O[h]),d=o&&m?m:e[h],(r||S||typeof b!=typeof d)&&(g=t.bind&&o?f(d,n):t.wrap&&o?v(d):S&&u(d)?i(d):d,(t.sham||d&&d.sham||b&&b.sham)&&p(g,"sham",!0),p(R,h,g),S&&(l(a,y=_+"Prototype")||p(a,y,{}),p(a[y],h,d),t.real&&E&&(r||!E[h])&&p(E,h,d)))}},8828:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},6024:(t,e,r)=>{"use strict";var n=r(1505),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?u.bind(i):function(){return u.apply(i,arguments)})},8311:(t,e,r)=>{"use strict";var n=r(2361),o=r(2159),i=r(1505),u=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?u(t,e):function(){return t.apply(e,arguments)}}},1505:(t,e,r)=>{"use strict";var n=r(8828);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3930:(t,e,r)=>{"use strict";var n=r(1505),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},2361:(t,e,r)=>{"use strict";var n=r(5807),o=r(1907);t.exports=function(t){if("Function"===n(t))return o(t)}},1907:(t,e,r)=>{"use strict";var n=r(1505),o=Function.prototype,i=o.call,u=n&&o.bind.bind(i,i);t.exports=n?u:function(t){return function(){return i.apply(t,arguments)}}},5582:(t,e,r)=>{"use strict";var n=r(2046),o=r(1010),i=r(2250),u=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?u(n[t])||u(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},9367:(t,e,r)=>{"use strict";var n=r(2159),o=r(7136);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},1010:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:(t,e,r)=>{"use strict";var n=r(1907),o=r(9298),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3648:(t,e,r)=>{"use strict";var n=r(9447),o=r(8828),i=r(9552);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},6946:(t,e,r)=>{"use strict";var n=r(1907),o=r(8828),i=r(5807),u=Object,s=n("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?s(t,""):u(t)}:u},2250:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},7463:(t,e,r)=>{"use strict";var n=r(8828),o=r(2250),i=/#|\.prototype\./,u=function(t,e){var r=c[s(t)];return r===f||r!==a&&(o(e)?n(e):!!e)},s=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},a=u.NATIVE="N",f=u.POLYFILL="P";t.exports=u},7136:t=>{"use strict";t.exports=function(t){return null==t}},6285:(t,e,r)=>{"use strict";var n=r(2250);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},7376:t=>{"use strict";t.exports=!0},5594:(t,e,r)=>{"use strict";var n=r(5582),o=r(2250),i=r(8280),u=r(1175),s=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,s(t))}},4284:(t,e,r)=>{"use strict";var n=r(9447),o=r(3648),i=r(8661),u=r(6624),s=r(470),c=TypeError,a=Object.defineProperty,f=Object.getOwnPropertyDescriptor;e.f=n?i?function(t,e,r){if(u(t),e=s(e),u(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=f(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return a(t,e,r)}:a:function(t,e,r){if(u(t),e=s(e),u(r),o)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},3846:(t,e,r)=>{"use strict";var n=r(9447),o=r(3930),i=r(2574),u=r(5817),s=r(7374),c=r(470),a=r(9724),f=r(3648),p=Object.getOwnPropertyDescriptor;e.f=n?p:function(t,e){if(t=s(t),e=c(e),f)try{return p(t,e)}catch(t){}if(a(t,e))return u(!o(i.f,t,e),t[e])}},8280:(t,e,r)=>{"use strict";var n=r(1907);t.exports=n({}.isPrototypeOf)},2574:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},581:(t,e,r)=>{"use strict";var n=r(3930),o=r(2250),i=r(6285),u=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!i(s=n(r,t)))return s;if(o(r=t.valueOf)&&!i(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!i(s=n(r,t)))return s;throw new u("Can't convert object to primitive value")}},2046:t=>{"use strict";t.exports={}},4239:(t,e,r)=>{"use strict";var n=r(7136),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},6128:(t,e,r)=>{"use strict";var n=r(7376),o=r(1010),i=r(2532),u=t.exports=o["__core-js_shared__"]||i("__core-js_shared__",{});(u.versions||(u.versions=[])).push({version:"3.37.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:(t,e,r)=>{"use strict";var n=r(6128);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},9846:(t,e,r)=>{"use strict";var n=r(5683),o=r(8828),i=r(1010).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},7374:(t,e,r)=>{"use strict";var n=r(6946),o=r(4239);t.exports=function(t){return n(o(t))}},9298:(t,e,r)=>{"use strict";var n=r(4239),o=Object;t.exports=function(t){return o(n(t))}},6028:(t,e,r)=>{"use strict";var n=r(3930),o=r(6285),i=r(5594),u=r(9367),s=r(581),c=r(6264),a=TypeError,f=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,c=u(t,f);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!o(r)||i(r))return r;throw new a("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},470:(t,e,r)=>{"use strict";var n=r(6028),o=r(5594);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},4640:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6499:(t,e,r)=>{"use strict";var n=r(1907),o=0,i=Math.random(),u=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},1175:(t,e,r)=>{"use strict";var n=r(9846);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:(t,e,r)=>{"use strict";var n=r(9447),o=r(8828);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6264:(t,e,r)=>{"use strict";var n=r(1010),o=r(5816),i=r(9724),u=r(6499),s=r(9846),c=r(1175),a=n.Symbol,f=o("wks"),p=c?a.for||a:a&&a.withoutSetter||u;t.exports=function(t){return i(f,t)||(f[t]=s&&i(a,t)?a[t]:p("Symbol."+t)),f[t]}},2344:(t,e,r)=>{"use strict";var n=r(1091),o=r(1010);n({global:!0,forced:o.globalThis!==o},{globalThis:o})},397:(t,e,r)=>{"use strict";r(2344)},1960:(t,e,r)=>{"use strict";var n=r(2671);t.exports=n}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();{const t=r(4444),e=r(6206);if(void 0!==t){var n="__reactRefreshInjected";"undefined"!=typeof __react_refresh_library__&&__react_refresh_library__&&(n+="_"+__react_refresh_library__),t[n]||(e.injectIntoGlobalHook(t),t[n]=!0)}}})();