PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.4
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.4
1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk 1.2.0 All 47 releases
fluent-cart / assets / ReactSupport.js

ReactSupport.js in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.6.4, at assets/ReactSupport.js

2 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const m=new Map,h=new Map,d=new Set,a=new Set;let _=new WeakMap;function b(o){let n=o.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n===void 0){let t=0;o.__REACT_DEVTOOLS_GLOBAL_HOOK__=n={renderers:new Map,supportsFiber:!0,inject:e=>t++,onScheduleFiberRoot:(e,i,s)=>{},onCommitFiberRoot:(e,i,s,c)=>{},onCommitFiberUnmount(){}}}if(n.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.");return}const R=n.inject;n.inject=function(t){const e=R.apply(this,arguments);return typeof t.scheduleRefresh=="function"&&typeof t.setRefreshHandler=="function"&&m.set(e,t),e},n.renderers.forEach((t,e)=>{typeof t.scheduleRefresh=="function"&&typeof t.setRefreshHandler=="function"&&m.set(e,t)});const p=n.onCommitFiberRoot,w=n.onScheduleFiberRoot||(()=>{});n.onScheduleFiberRoot=function(t,e,i){return a.delete(e),_!==null&&_.set(e,i),w.apply(this,arguments)},n.onCommitFiberRoot=function(t,e,i,s){const c=m.get(t);if(c!==void 0){h.set(e,c);const f=e.current,u=f.alternate;if(u!==null){const l=u.memoizedState!=null&&u.memoizedState.element!=null&&d.has(e),r=f.memoizedState!=null&&f.memoizedState.element!=null;!l&&r?(d.add(e),a.delete(e)):l&&r||(l&&!r?(d.delete(e),s?a.add(e):h.delete(e)):!l&&!r&&s&&a.add(e))}else d.add(e)}return p.apply(this,arguments)}}window.__registerBeforePerformReactRefresh=o=>{};const O={injectIntoGlobalHook:b};O.injectIntoGlobalHook(window);window.$RefreshReg$=()=>{};window.$RefreshSig$=()=>o=>o;window.__vite_plugin_react_preamble_installed__=!0;
2