@pmmmwh/react-refresh-webpack-plugin
Version:
An **EXPERIMENTAL** Webpack plugin to enable "Fast Refresh" (also previously known as _Hot Reloading_) for React components.
1 lines • 14.8 kB
JavaScript
(()=>{var t={214:(t,e,r)=>{"use strict";r(397);var n=r(3565);t.exports=n},397:(t,e,r)=>{"use strict";r(2344)},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+""}},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")}},798:(t,e,r)=>{"use strict";var n,o,i=r(5951),u=r(6794),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(5951),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,x=t.target,_=t.global,j=t.stat,S=t.proto,O=_?n:j?n[x]:n[x]&&n[x].prototype,R=_?a:a[x]||p(a,x,{})[x],E=R.prototype;for(h in e)o=!(r=c(_?h:x+(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=x+"Prototype")||p(a,y,{}),p(a[y],h,d),t.real&&E&&(r||!E[h])&&p(E,h,d)))}},1175:(t,e,r)=>{"use strict";var n=r(9846);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},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")}))},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}},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)}}},1960:(t,e,r)=>{"use strict";var n=r(2671);t.exports=n},2046:t=>{"use strict";t.exports={}},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")}},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}},2344:(t,e,r)=>{"use strict";var n=r(1091),o=r(5951);n({global:!0,forced:o.globalThis!==o},{globalThis:o})},2361:(t,e,r)=>{"use strict";var n=r(5807),o=r(1907);t.exports=function(t){if("Function"===n(t))return o(t)}},2532:(t,e,r)=>{"use strict";var n=r(5951),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}},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},2671:(t,e,r)=>{"use strict";r(2344),t.exports=r(5951)},3565:(t,e,r)=>{"use strict";var n=r(1960);t.exports=n},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}))},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])}},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)}},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}},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,p="enumerable",l="configurable",v="writable";e.f=n?i?function(t,e,r){if(u(t),e=s(e),u(r),"function"==typeof t&&"prototype"===e&&"value"in r&&v in r&&!r[v]){var n=f(t,e);n&&n[v]&&(t[e]=r.value,r={configurable:l in r?r[l]:n[l],enumerable:p in r?r[p]:n[p],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}},4444:(t,e,r)=>{"use strict";t.exports=r(214)},4640:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},5582:(t,e,r)=>{"use strict";var n=r(2046),o=r(5951),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]}},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))}},5644:(t,e)=>{"use strict";!function(){function t(e){if(null!==e.fullKey)return e.fullKey;var r=e.ownKey;try{var n=e.getCustomHooks()}catch(t){return e.forceReset=!0,e.fullKey=r}for(var o=0;o<n.length;o++){var i=n[o];if("function"!=typeof i)return e.forceReset=!0,e.fullKey=r;if(void 0!==(i=l.get(i))){var u=t(i);i.forceReset&&(e.forceReset=!0),r+="\n---\n"+u}}return e.fullKey=r}function r(t){return v.get(t)}function n(t){var e=new Set;return t.forEach((function(t){e.add(t)})),e}function o(t,e){try{return t[e]}catch(t){}}function i(t,e){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length?arguments[3]:void 0;if(l.has(t)||l.set(t,{forceReset:r,ownKey:e,fullKey:null,getCustomHooks:n||function(){return[]}}),"object"==typeof t&&null!==t)switch(o(t,"$$typeof")){case s:i(t.render,e,r,n);break;case c:i(t.type,e,r,n)}}function u(e){void 0!==(e=l.get(e))&&t(e)}var s=Symbol.for("react.forward_ref"),c=Symbol.for("react.memo"),a="function"==typeof WeakMap?WeakMap:Map,f=new Map,p=new a,l=new a,v=new a,y=[],h=new Map,d=new Map,b=new Set,m=new Set,g="function"==typeof WeakMap?new WeakMap:null,w=!1;e._getMountedRootCount=function(){return b.size},e.collectCustomHooksForSignature=u,e.createSignatureFunctionForTransform=function(){var t,e,r=!1;return function(n,o,s,c){if("string"==typeof o)return t||(t=n,e="function"==typeof c),null==n||"function"!=typeof n&&"object"!=typeof n||i(n,o,s,c),n;!r&&e&&(r=!0,u(t))}},e.getFamilyByID=function(t){return f.get(t)},e.getFamilyByType=function(t){return p.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(){return r++},onScheduleFiberRoot:function(){},onCommitFiberRoot:function(){},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&&h.set(e,t),e},e.renderers.forEach((function(t,e){"function"==typeof t.scheduleRefresh&&"function"==typeof t.setRefreshHandler&&h.set(e,t)}));var o=e.onCommitFiberRoot,i=e.onScheduleFiberRoot||function(){};e.onScheduleFiberRoot=function(t,e,r){return w||(m.delete(e),null!==g&&g.set(e,r)),i.apply(this,arguments)},e.onCommitFiberRoot=function(t,e,r,n){var i=h.get(t);if(void 0!==i){d.set(e,i);var u=(i=e.current).alternate;null!==u?(u=null!=u.memoizedState&&null!=u.memoizedState.element&&b.has(e),i=null!=i.memoizedState&&null!=i.memoizedState.element,!u&&i?(b.add(e),m.delete(e)):u&&i||(u&&!i?(b.delete(e),n?m.add(e):d.delete(e)):u||i||n&&m.add(e))):b.add(e)}return o.apply(this,arguments)}}},e.isLikelyComponentType=function(t){switch(typeof t){case"function":if(null!=t.prototype){if(t.prototype.isReactComponent)return!0;var e=Object.getOwnPropertyNames(t.prototype);if(1<e.length||"constructor"!==e[0]||t.prototype.__proto__!==Object.prototype)return!1}return"string"==typeof(t=t.name||t.displayName)&&/^[A-Z]/.test(t);case"object":if(null!=t)switch(o(t,"$$typeof")){case s:case c:return!0}return!1;default:return!1}},e.performReactRefresh=function(){if(0===y.length||w)return null;w=!0;try{var e=new Set,o=new Set,i=y;y=[],i.forEach((function(r){var n=r[0];r=r[1];var i=n.current;v.set(i,n),v.set(r,n),n.current=r,i.prototype&&i.prototype.isReactComponent||r.prototype&&r.prototype.isReactComponent?r=!1:(i=l.get(i),r=l.get(r),r=void 0===i&&void 0===r||void 0!==i&&void 0!==r&&t(i)===t(r)&&!r.forceReset),r?o.add(n):e.add(n)}));var u={updatedFamilies:o,staleFamilies:e};h.forEach((function(t){t.setRefreshHandler(r)}));var s=!1,c=null,a=n(m),f=n(b),p=(x=d,_=new Map,x.forEach((function(t,e){_.set(e,t)})),_);if(a.forEach((function(t){var e=p.get(t);if(void 0===e)throw Error("Could not find helpers for a root. This is a bug in React Refresh.");if(m.has(t),null!==g&&g.has(t)){var r=g.get(t);try{e.scheduleRoot(t,r)}catch(t){s||(s=!0,c=t)}}})),f.forEach((function(t){var e=p.get(t);if(void 0===e)throw Error("Could not find helpers for a root. This is a bug in React Refresh.");b.has(t);try{e.scheduleRefresh(t,u)}catch(t){s||(s=!0,c=t)}})),s)throw c;return u}finally{w=!1}var x,_},e.register=function t(e,r){if(!(null===e||"function"!=typeof e&&"object"!=typeof e||p.has(e))){var n=f.get(r);if(void 0===n?(n={current:e},f.set(r,n)):y.push([n,e]),p.set(e,n),"object"==typeof e&&null!==e)switch(o(e,"$$typeof")){case s:t(e.render,r+"$render");break;case c:t(e.type,r+"$type")}}},e.setSignature=i}()},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)}},5816:(t,e,r)=>{"use strict";var n=r(6128);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5817:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},5951: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")()},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)})},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)}},6128:(t,e,r)=>{"use strict";var n=r(7376),o=r(5951),i=r(2532),u="__core-js_shared__",s=t.exports=o[u]||i(u,{});(s.versions||(s.versions=[])).push({version:"3.41.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6206:(t,e,r)=>{"use strict";t.exports=r(5644)},6264:(t,e,r)=>{"use strict";var n=r(5951),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]}},6285:(t,e,r)=>{"use strict";var n=r(2250);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},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)}},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")}},6794:(t,e,r)=>{"use strict";var n=r(5951).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},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},7136:t=>{"use strict";t.exports=function(t){return null==t}},7374:(t,e,r)=>{"use strict";var n=r(6946),o=r(4239);t.exports=function(t){return n(o(t))}},7376:t=>{"use strict";t.exports=!0},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},8280:(t,e,r)=>{"use strict";var n=r(1907);t.exports=n({}.isPrototypeOf)},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)}}},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}))},8828:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},9298:(t,e,r)=>{"use strict";var n=r(4239),o=Object;t.exports=function(t){return o(n(t))}},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)}},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(5951),o=r(6285),i=n.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},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)}},9846:(t,e,r)=>{"use strict";var n=r(798),o=r(8828),i=r(5951).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))}},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)}}})();