1 line
11 KiB
JSON
1 line
11 KiB
JSON
{"ast":null,"code":"import _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as ReactDOM from 'react-dom';\n// Let compiler not to search module usage\nvar fullClone = _objectSpread({}, ReactDOM);\nvar version = fullClone.version,\n reactRender = fullClone.render,\n unmountComponentAtNode = fullClone.unmountComponentAtNode;\nvar createRoot;\ntry {\n var mainVersion = Number((version || '').split('.')[0]);\n if (mainVersion >= 18) {\n createRoot = fullClone.createRoot;\n }\n} catch (e) {\n // Do nothing;\n}\nfunction toggleWarning(skip) {\n var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && _typeof(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;\n }\n}\nvar MARK = '__rc_react_root__';\n\n// ========================== Render ==========================\n\nfunction modernRender(node, container) {\n toggleWarning(true);\n var root = container[MARK] || createRoot(container);\n toggleWarning(false);\n root.render(node);\n container[MARK] = root;\n}\nfunction legacyRender(node, container) {\n reactRender(node, container);\n}\n\n/** @private Test usage. Not work in prod */\nexport function _r(node, container) {\n if (process.env.NODE_ENV !== 'production') {\n return legacyRender(node, container);\n }\n}\nexport function render(node, container) {\n if (createRoot) {\n modernRender(node, container);\n return;\n }\n legacyRender(node, container);\n}\n\n// ========================= Unmount ==========================\nfunction modernUnmount(_x) {\n return _modernUnmount.apply(this, arguments);\n}\nfunction _modernUnmount() {\n _modernUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(container) {\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", Promise.resolve().then(function () {\n var _container$MARK;\n (_container$MARK = container[MARK]) === null || _container$MARK === void 0 || _container$MARK.unmount();\n delete container[MARK];\n }));\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _modernUnmount.apply(this, arguments);\n}\nfunction legacyUnmount(container) {\n unmountComponentAtNode(container);\n}\n\n/** @private Test usage. Not work in prod */\nexport function _u(container) {\n if (process.env.NODE_ENV !== 'production') {\n return legacyUnmount(container);\n }\n}\nexport function unmount(_x2) {\n return _unmount.apply(this, arguments);\n}\nfunction _unmount() {\n _unmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n if (!(createRoot !== undefined)) {\n _context2.next = 2;\n break;\n }\n return _context2.abrupt(\"return\", modernUnmount(container));\n case 2:\n legacyUnmount(container);\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _unmount.apply(this, arguments);\n}","map":{"version":3,"names":["_regeneratorRuntime","_asyncToGenerator","_typeof","_objectSpread","ReactDOM","fullClone","version","reactRender","render","unmountComponentAtNode","createRoot","mainVersion","Number","split","e","toggleWarning","skip","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","usingClientEntryPoint","MARK","modernRender","node","container","root","legacyRender","_r","process","env","NODE_ENV","modernUnmount","_x","_modernUnmount","apply","arguments","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","Promise","resolve","then","_container$MARK","unmount","stop","legacyUnmount","_u","_x2","_unmount","_callee2","_callee2$","_context2","undefined"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-util/es/React/render.js"],"sourcesContent":["import _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as ReactDOM from 'react-dom';\n// Let compiler not to search module usage\nvar fullClone = _objectSpread({}, ReactDOM);\nvar version = fullClone.version,\n reactRender = fullClone.render,\n unmountComponentAtNode = fullClone.unmountComponentAtNode;\nvar createRoot;\ntry {\n var mainVersion = Number((version || '').split('.')[0]);\n if (mainVersion >= 18) {\n createRoot = fullClone.createRoot;\n }\n} catch (e) {\n // Do nothing;\n}\nfunction toggleWarning(skip) {\n var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && _typeof(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;\n }\n}\nvar MARK = '__rc_react_root__';\n\n// ========================== Render ==========================\n\nfunction modernRender(node, container) {\n toggleWarning(true);\n var root = container[MARK] || createRoot(container);\n toggleWarning(false);\n root.render(node);\n container[MARK] = root;\n}\nfunction legacyRender(node, container) {\n reactRender(node, container);\n}\n\n/** @private Test usage. Not work in prod */\nexport function _r(node, container) {\n if (process.env.NODE_ENV !== 'production') {\n return legacyRender(node, container);\n }\n}\nexport function render(node, container) {\n if (createRoot) {\n modernRender(node, container);\n return;\n }\n legacyRender(node, container);\n}\n\n// ========================= Unmount ==========================\nfunction modernUnmount(_x) {\n return _modernUnmount.apply(this, arguments);\n}\nfunction _modernUnmount() {\n _modernUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(container) {\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", Promise.resolve().then(function () {\n var _container$MARK;\n (_container$MARK = container[MARK]) === null || _container$MARK === void 0 || _container$MARK.unmount();\n delete container[MARK];\n }));\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _modernUnmount.apply(this, arguments);\n}\nfunction legacyUnmount(container) {\n unmountComponentAtNode(container);\n}\n\n/** @private Test usage. Not work in prod */\nexport function _u(container) {\n if (process.env.NODE_ENV !== 'production') {\n return legacyUnmount(container);\n }\n}\nexport function unmount(_x2) {\n return _unmount.apply(this, arguments);\n}\nfunction _unmount() {\n _unmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n if (!(createRoot !== undefined)) {\n _context2.next = 2;\n break;\n }\n return _context2.abrupt(\"return\", modernUnmount(container));\n case 2:\n legacyUnmount(container);\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _unmount.apply(this, arguments);\n}"],"mappings":"AAAA,OAAOA,mBAAmB,MAAM,+CAA+C;AAC/E,OAAOC,iBAAiB,MAAM,6CAA6C;AAC3E,OAAOC,OAAO,MAAM,mCAAmC;AACvD,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAO,KAAKC,QAAQ,MAAM,WAAW;AACrC;AACA,IAAIC,SAAS,GAAGF,aAAa,CAAC,CAAC,CAAC,EAAEC,QAAQ,CAAC;AAC3C,IAAIE,OAAO,GAAGD,SAAS,CAACC,OAAO;EAC7BC,WAAW,GAAGF,SAAS,CAACG,MAAM;EAC9BC,sBAAsB,GAAGJ,SAAS,CAACI,sBAAsB;AAC3D,IAAIC,UAAU;AACd,IAAI;EACF,IAAIC,WAAW,GAAGC,MAAM,CAAC,CAACN,OAAO,IAAI,EAAE,EAAEO,KAAK,C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