@kubb/react
Version:
React integration for Kubb, providing JSX runtime support and React component generation capabilities for code generation plugins.
1,275 lines (1,258 loc) • 881 kB
JavaScript
import { __commonJS, __toESM } from "./chunk-ZQaqVjc_.js";
import "./globals-Df5klKjG.js";
import { require_jsx_runtime, require_react } from "./jsx-runtime-CJOCOung.js";
import { createJSDocBlockText } from "@kubb/core/transformers";
import dedent from "dedent";
import process$1 from "node:process";
import { onExit } from "signal-exit";
import { getRelativePath } from "@kubb/core/fs";
import { print } from "@kubb/parser-ts";
import * as factory from "@kubb/parser-ts/factory";
import { orderBy } from "natural-orderby";
//#region src/components/Root.tsx
var import_react = /* @__PURE__ */ __toESM(require_react());
var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime());
var ErrorBoundary = class extends import_react.Component {
state = { hasError: false };
static displayName = "KubbErrorBoundary";
static getDerivedStateFromError(_error) {
return { hasError: true };
}
componentDidCatch(error) {
if (error) this.props.onError(error);
}
render() {
if (this.state.hasError) return null;
return this.props.children;
}
};
const RootContext = (0, import_react.createContext)({
exit: () => {},
meta: {}
});
function Root({ onError, onExit: onExit$1, logger, meta, children }) {
try {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorBoundary, {
logger,
onError: (error) => {
onError(error);
},
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RootContext.Provider, {
value: {
meta,
exit: onExit$1
},
children
})
});
} catch (_e) {
return null;
}
}
Root.Context = RootContext;
Root.displayName = "KubbRoot";
//#endregion
//#region src/components/App.tsx
const AppContext = (0, import_react.createContext)(void 0);
function App({ plugin, pluginManager, mode, children }) {
const { exit } = (0, import_react.useContext)(RootContext);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppContext.Provider, {
value: {
exit,
plugin,
pluginManager,
mode
},
children
});
}
App.Context = AppContext;
App.displayName = "KubbApp";
//#endregion
//#region src/components/Text.tsx
/**
* @deprecated
*/
function Text({ children }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("kubb-text", { children });
}
Text.displayName = "KubbText";
function Space({}) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("kubb-text", { children: " " });
}
Space.displayName = "KubbSpace";
Text.Space = Space;
//#endregion
//#region src/components/Const.tsx
function Const({ name, export: canExport, type, JSDoc, asConst, children }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
JSDoc?.comments && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [createJSDocBlockText({ comments: JSDoc?.comments }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {})] }),
canExport && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["export", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})] }),
"const ",
name,
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {}),
type && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
":",
type,
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})
] }),
"= ",
children,
asConst && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {}), "as const"] })
] });
}
Const.displayName = "KubbConst";
//#endregion
//#region src/components/File.tsx
const FileContext = (0, import_react.createContext)({});
function File({ children,...rest }) {
if (!rest.baseName || !rest.path) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("kubb-file", {
...rest,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FileContext.Provider, {
value: {
baseName: rest.baseName,
path: rest.path,
meta: rest.meta
},
children
})
});
}
File.displayName = "KubbFile";
function FileSource({ isTypeOnly, name, isExportable, isIndexable, children }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("kubb-source", {
name,
isTypeOnly,
isExportable,
isIndexable,
children
});
}
FileSource.displayName = "KubbFileSource";
function FileExport({ name, path, isTypeOnly, asAlias }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("kubb-export", {
name,
path,
isTypeOnly: isTypeOnly || false,
asAlias
});
}
FileExport.displayName = "KubbFileExport";
function FileImport({ name, root, path, isTypeOnly, isNameSpace }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("kubb-import", {
name,
root,
path,
isNameSpace,
isTypeOnly: isTypeOnly || false
});
}
FileImport.displayName = "KubbFileImport";
File.Export = FileExport;
File.Import = FileImport;
File.Source = FileSource;
File.Context = FileContext;
//#endregion
//#region ../../node_modules/.pnpm/indent-string@5.0.0/node_modules/indent-string/index.js
function indentString(string, count = 1, options = {}) {
const { indent = " ", includeEmptyLines = false } = options;
if (typeof string !== "string") throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof string}\``);
if (typeof count !== "number") throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``);
if (count < 0) throw new RangeError(`Expected \`count\` to be at least 0, got \`${count}\``);
if (typeof indent !== "string") throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof indent}\``);
if (count === 0) return string;
const regex = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
return string.replace(regex, indent.repeat(count));
}
//#endregion
//#region src/components/Indent.tsx
/**
* Indents all children by `size` spaces.
* Collapses consecutive <br /> tags to at most 2.
*/
function Indent({ size = 2, children }) {
if (!children) return null;
const filtered = import_react.Children.toArray(children).filter(Boolean);
const result = [];
let prevWasBr = false;
let brCount = 0;
filtered.forEach((child) => {
if (import_react.isValidElement(child) && child.type === "br") {
if (!prevWasBr || brCount < 2) {
result.push(child);
brCount++;
}
prevWasBr = true;
} else {
prevWasBr = false;
brCount = 0;
result.push(child);
}
});
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: result.map((child) => {
if (typeof child === "string") {
const cleaned = dedent(child);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: indentString(cleaned, size) });
}
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [" ".repeat(size), child] });
}) });
}
//#endregion
//#region src/components/Function.tsx
function Function({ name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc, children }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
JSDoc?.comments && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [createJSDocBlockText({ comments: JSDoc?.comments }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {})] }),
canExport && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["export", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})] }),
isDefault && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["default", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})] }),
async && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["async", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})] }),
"function ",
name,
generics && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
"<",
Array.isArray(generics) ? generics.join(", ").trim() : generics,
">"
] }),
"(",
params,
")",
returnType && !async && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [": ", returnType] }),
returnType && async && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
": Promise",
"<",
returnType,
">"
] }),
" {",
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Indent, {
size: 2,
children
}),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
"}"
] });
}
Function.displayName = "KubbFunction";
function ArrowFunction({ name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc, singleLine, children }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
JSDoc?.comments && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [createJSDocBlockText({ comments: JSDoc?.comments }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {})] }),
canExport && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["export", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})] }),
isDefault && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["default", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})] }),
"const ",
name,
" =",
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {}),
async && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["async", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})] }),
generics && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
"<",
Array.isArray(generics) ? generics.join(", ").trim() : generics,
">"
] }),
"(",
params,
")",
returnType && !async && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [": ", returnType] }),
returnType && async && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
": Promise",
"<",
returnType,
">"
] }),
singleLine && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
" => ",
children,
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {})
] }),
!singleLine && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
" => {",
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Indent, {
size: 2,
children
}),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
"}",
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {})
] })
] });
}
ArrowFunction.displayName = "KubbArrowFunction";
Function.Arrow = ArrowFunction;
//#endregion
//#region src/components/Type.tsx
function Type({ name, export: canExport, JSDoc, children }) {
if (name.charAt(0).toUpperCase() !== name.charAt(0)) throw new Error("Name should start with a capital letter(see TypeScript types)");
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
JSDoc?.comments && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [createJSDocBlockText({ comments: JSDoc?.comments }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {})] }),
canExport && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["export", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Space, {})] }),
"type ",
name,
" = ",
children
] });
}
Type.displayName = "KubbType";
//#endregion
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.1.1/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js
var require_react_reconciler_constants_production = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.1.1/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js": ((exports) => {
exports.ConcurrentRoot = 1;
exports.DefaultEventPriority = 32;
exports.NoEventPriority = 0;
}) });
//#endregion
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.1.1/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js
var require_react_reconciler_constants_development = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.1.1/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js": ((exports) => {
"production" !== process.env.NODE_ENV && (exports.ConcurrentRoot = 1, exports.ContinuousEventPriority = 8, exports.DefaultEventPriority = 32, exports.DiscreteEventPriority = 2, exports.IdleEventPriority = 268435456, exports.LegacyRoot = 0, exports.NoEventPriority = 0);
}) });
//#endregion
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.1.1/node_modules/react-reconciler/constants.js
var require_constants = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.1.1/node_modules/react-reconciler/constants.js": ((exports, module) => {
if (process.env.NODE_ENV === "production") module.exports = require_react_reconciler_constants_production();
else module.exports = require_react_reconciler_constants_development();
}) });
//#endregion
//#region src/dom.ts
var import_constants$1 = /* @__PURE__ */ __toESM(require_constants(), 1);
const createNode = (nodeName) => {
return {
nodeName,
attributes: {},
childNodes: [],
parentNode: void 0
};
};
const appendChildNode = (node, childNode) => {
if (childNode.parentNode) removeChildNode(childNode.parentNode, childNode);
childNode.parentNode = node;
node.childNodes.push(childNode);
};
const insertBeforeNode = (node, newChildNode, beforeChildNode) => {
if (newChildNode.parentNode) removeChildNode(newChildNode.parentNode, newChildNode);
newChildNode.parentNode = node;
const index = node.childNodes.indexOf(beforeChildNode);
if (index >= 0) {
node.childNodes.splice(index, 0, newChildNode);
return;
}
node.childNodes.push(newChildNode);
};
const removeChildNode = (node, removeNode) => {
removeNode.parentNode = void 0;
const index = node.childNodes.indexOf(removeNode);
if (index >= 0) node.childNodes.splice(index, 1);
};
const setAttribute = (node, key, value) => {
node.attributes[key] = value;
};
const createTextNode = (text) => {
const node = {
nodeName: "#text",
nodeValue: text,
parentNode: void 0
};
setTextNodeValue(node, text);
return node;
};
const setTextNodeValue = (node, text) => {
if (typeof text !== "string") text = String(text);
node.nodeValue = text;
};
const nodeNames = [
"kubb-export",
"kubb-file",
"kubb-source",
"kubb-import",
"kubb-text"
];
//#endregion
//#region ../../node_modules/.pnpm/scheduler@0.26.0/node_modules/scheduler/cjs/scheduler.production.js
var require_scheduler_production = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/scheduler@0.26.0/node_modules/scheduler/cjs/scheduler.production.js": ((exports) => {
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index;) {
var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
if (0 < compare(parent, node)) heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0], last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength;) {
var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
if (0 > compare(left, last)) rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
else if (rightIndex < length && 0 > compare(right, last)) heap[index] = right, heap[rightIndex] = last, index = rightIndex;
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
exports.unstable_now = void 0;
if ("object" === typeof performance && "function" === typeof performance.now) {
var localPerformance = performance;
exports.unstable_now = function() {
return localPerformance.now();
};
} else {
var localDate = Date, initialTime = localDate.now();
exports.unstable_now = function() {
return localDate.now() - initialTime;
};
}
var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, isHostCallbackScheduled = !1, isHostTimeoutScheduled = !1, needsPaint = !1, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer;) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime) pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
}
var isMessageLoopRunning = !1, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
function shouldYieldToHost() {
return needsPaint ? !0 : exports.unstable_now() - startTime < frameInterval ? !1 : !0;
}
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled && (isHostTimeoutScheduled = !1, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost());) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(currentTask.expirationTime <= currentTime);
currentTime = exports.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
hasMoreWork = !1;
}
}
break a;
} finally {
currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = !1;
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = !1;
}
}
}
var schedulePerformWorkUntilDeadline;
if ("function" === typeof localSetImmediate) schedulePerformWorkUntilDeadline = function() {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(), port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function() {
port.postMessage(null);
};
} else schedulePerformWorkUntilDeadline = function() {
localSetTimeout(performWorkUntilDeadline, 0);
};
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function() {
callback(exports.unstable_now());
}, ms);
}
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function(task) {
task.callback = null;
};
exports.unstable_forceFrameRate = function(fps) {
0 > fps || 125 < fps ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
};
exports.unstable_getCurrentPriorityLevel = function() {
return currentPriorityLevel;
};
exports.unstable_next = function(eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default: priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_requestPaint = function() {
needsPaint = !0;
};
exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5: break;
default: priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
var currentTime = exports.unstable_now();
"object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default: timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback,
priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = !0, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline())));
return priorityLevel;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function(callback) {
var parentPriorityLevel = currentPriorityLevel;
return function() {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
}) });
//#endregion
//#region ../../node_modules/.pnpm/scheduler@0.26.0/node_modules/scheduler/cjs/scheduler.development.js
var require_scheduler_development = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/scheduler@0.26.0/node_modules/scheduler/cjs/scheduler.development.js": ((exports) => {
"production" !== process.env.NODE_ENV && (function() {
function performWorkUntilDeadline$1() {
needsPaint$1 = !1;
if (isMessageLoopRunning$1) {
var currentTime = exports.unstable_now();
startTime$1 = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled$1 = !1;
isHostTimeoutScheduled$1 && (isHostTimeoutScheduled$1 = !1, localClearTimeout$1(taskTimeoutID$1), taskTimeoutID$1 = -1);
isPerformingWork$1 = !0;
var previousPriorityLevel = currentPriorityLevel$1;
try {
b: {
advanceTimers$1(currentTime);
for (currentTask$1 = peek$1(taskQueue$1); null !== currentTask$1 && !(currentTask$1.expirationTime > currentTime && shouldYieldToHost$1());) {
var callback = currentTask$1.callback;
if ("function" === typeof callback) {
currentTask$1.callback = null;
currentPriorityLevel$1 = currentTask$1.priorityLevel;
var continuationCallback = callback(currentTask$1.expirationTime <= currentTime);
currentTime = exports.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask$1.callback = continuationCallback;
advanceTimers$1(currentTime);
hasMoreWork = !0;
break b;
}
currentTask$1 === peek$1(taskQueue$1) && pop$1(taskQueue$1);
advanceTimers$1(currentTime);
} else pop$1(taskQueue$1);
currentTask$1 = peek$1(taskQueue$1);
}
if (null !== currentTask$1) hasMoreWork = !0;
else {
var firstTimer = peek$1(timerQueue$1);
null !== firstTimer && requestHostTimeout$1(handleTimeout$1, firstTimer.startTime - currentTime);
hasMoreWork = !1;
}
}
break a;
} finally {
currentTask$1 = null, currentPriorityLevel$1 = previousPriorityLevel, isPerformingWork$1 = !1;
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork ? schedulePerformWorkUntilDeadline$1() : isMessageLoopRunning$1 = !1;
}
}
}
function push$1(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index;) {
var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
if (0 < compare$1(parent, node)) heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
else break a;
}
}
function peek$1(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop$1(heap) {
if (0 === heap.length) return null;
var first = heap[0], last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength;) {
var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
if (0 > compare$1(left, last)) rightIndex < length && 0 > compare$1(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
else if (rightIndex < length && 0 > compare$1(right, last)) heap[index] = right, heap[rightIndex] = last, index = rightIndex;
else break a;
}
}
return first;
}
function compare$1(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
function advanceTimers$1(currentTime) {
for (var timer = peek$1(timerQueue$1); null !== timer;) {
if (null === timer.callback) pop$1(timerQueue$1);
else if (timer.startTime <= currentTime) pop$1(timerQueue$1), timer.sortIndex = timer.expirationTime, push$1(taskQueue$1, timer);
else break;
timer = peek$1(timerQueue$1);
}
}
function handleTimeout$1(currentTime) {
isHostTimeoutScheduled$1 = !1;
advanceTimers$1(currentTime);
if (!isHostCallbackScheduled$1) if (null !== peek$1(taskQueue$1)) isHostCallbackScheduled$1 = !0, isMessageLoopRunning$1 || (isMessageLoopRunning$1 = !0, schedulePerformWorkUntilDeadline$1());
else {
var firstTimer = peek$1(timerQueue$1);
null !== firstTimer && requestHostTimeout$1(handleTimeout$1, firstTimer.startTime - currentTime);
}
}
function shouldYieldToHost$1() {
return needsPaint$1 ? !0 : exports.unstable_now() - startTime$1 < frameInterval$1 ? !1 : !0;
}
function requestHostTimeout$1(callback, ms) {
taskTimeoutID$1 = localSetTimeout$1(function() {
callback(exports.unstable_now());
}, ms);
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
exports.unstable_now = void 0;
if ("object" === typeof performance && "function" === typeof performance.now) {
var localPerformance$1 = performance;
exports.unstable_now = function() {
return localPerformance$1.now();
};
} else {
var localDate$1 = Date, initialTime$1 = localDate$1.now();
exports.unstable_now = function() {
return localDate$1.now() - initialTime$1;
};
}
var taskQueue$1 = [], timerQueue$1 = [], taskIdCounter$1 = 1, currentTask$1 = null, currentPriorityLevel$1 = 3, isPerformingWork$1 = !1, isHostCallbackScheduled$1 = !1, isHostTimeoutScheduled$1 = !1, needsPaint$1 = !1, localSetTimeout$1 = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout$1 = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate$1 = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning$1 = !1, taskTimeoutID$1 = -1, frameInterval$1 = 5, startTime$1 = -1;
if ("function" === typeof localSetImmediate$1) var schedulePerformWorkUntilDeadline$1 = function() {
localSetImmediate$1(performWorkUntilDeadline$1);
};
else if ("undefined" !== typeof MessageChannel) {
var channel$1 = new MessageChannel(), port$1 = channel$1.port2;
channel$1.port1.onmessage = performWorkUntilDeadline$1;
schedulePerformWorkUntilDeadline$1 = function() {
port$1.postMessage(null);
};
} else schedulePerformWorkUntilDeadline$1 = function() {
localSetTimeout$1(performWorkUntilDeadline$1, 0);
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function(task) {
task.callback = null;
};
exports.unstable_forceFrameRate = function(fps) {
0 > fps || 125 < fps ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : frameInterval$1 = 0 < fps ? Math.floor(1e3 / fps) : 5;
};
exports.unstable_getCurrentPriorityLevel = function() {
return currentPriorityLevel$1;
};
exports.unstable_next = function(eventHandler) {
switch (currentPriorityLevel$1) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default: priorityLevel = currentPriorityLevel$1;
}
var previousPriorityLevel = currentPriorityLevel$1;
currentPriorityLevel$1 = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel$1 = previousPriorityLevel;
}
};
exports.unstable_requestPaint = function() {
needsPaint$1 = !0;
};
exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5: break;
default: priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel$1;
currentPriorityLevel$1 = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel$1 = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
var currentTime = exports.unstable_now();
"object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default: timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter$1++,
callback,
priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime ? (priorityLevel.sortIndex = options, push$1(timerQueue$1, priorityLevel), null === peek$1(taskQueue$1) && priorityLevel === peek$1(timerQueue$1) && (isHostTimeoutScheduled$1 ? (localClearTimeout$1(taskTimeoutID$1), taskTimeoutID$1 = -1) : isHostTimeoutScheduled$1 = !0, requestHostTimeout$1(handleTimeout$1, options - currentTime))) : (priorityLevel.sortIndex = timeout, push$1(taskQueue$1, priorityLevel), isHostCallbackScheduled$1 || isPerformingWork$1 || (isHostCallbackScheduled$1 = !0, isMessageLoopRunning$1 || (isMessageLoopRunning$1 = !0, schedulePerformWorkUntilDeadline$1())));
return priorityLevel;
};
exports.unstable_shouldYield = shouldYieldToHost$1;
exports.unstable_wrapCallback = function(callback) {
var parentPriorityLevel = currentPriorityLevel$1;
return function() {
var previousPriorityLevel = currentPriorityLevel$1;
currentPriorityLevel$1 = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel$1 = previousPriorityLevel;
}
};
};
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
}) });
//#endregion
//#region ../../node_modules/.pnpm/scheduler@0.26.0/node_modules/scheduler/index.js
var require_scheduler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/scheduler@0.26.0/node_modules/scheduler/index.js": ((exports, module) => {
if (process.env.NODE_ENV === "production") module.exports = require_scheduler_production();
else module.exports = require_scheduler_development();
}) });
//#endregion
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.1.1/node_modules/react-reconciler/cjs/react-reconciler.production.js
var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.1.1/node_modules/react-reconciler/cjs/react-reconciler.production.js": ((exports, module) => {
module.exports = function($$$config) {
function createFiber(tag, pendingProps, key, mode) {
return new FiberNode(tag, pendingProps, key, mode);
}
function noop() {}
function formatProdErrorMessage(code) {
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
function getNearestMountedFiber(fiber) {
var node = fiber, nearestMounted = fiber;
if (fiber.alternate) for (; node.return;) node = node.return;
else {
fiber = node;
do
node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return;
while (fiber);
}
return 3 === node.tag ? nearestMounted : null;
}
function assertIsMounted(fiber) {
if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188));
}
function findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
alternate = getNearestMountedFiber(fiber);
if (null === alternate) throw Error(formatProdErrorMessage(188));
return alternate !== fiber ? null : fiber;
}
for (var a = fiber, b = alternate;;) {
var parentA = a.return;
if (null === parentA) break;
var parentB = parentA.alternate;
if (null === parentB) {
b = parentA.return;
if (null !== b) {
a = b;
continue;
}
break;
}
if (parentA.child === parentB.child) {
for (parentB = parentA.child; parentB;) {
if (parentB === a) return assertIsMounted(parentA), fiber;
if (parentB === b) return assertIsMounted(parentA), alternate;
parentB = parentB.sibling;
}
throw Error(formatProdErrorMessage(188));
}
if (a.return !== b.return) a = parentA, b = parentB;
else {
for (var didFindChild = !1, child$0 = parentA.child; child$0;) {
if (child$0 === a) {
didFindChild = !0;
a = parentA;
b = parentB;
break;
}
if (child$0 === b) {
didFindChild = !0;
b = parentA;
a = parentB;
break;
}
child$0 = child$0.sibling;
}
if (!didFindChild) {
for (child$0 = parentB.child; child$0;) {
if (child$0 === a) {
didFindChild = !0;
a = parentB;
b = parentA;
break;
}
if (child$0 === b) {
didFindChild = !0;
b = parentB;
a = parentA;
break;
}
child$0 = child$0.sibling;
}
if (!didFindChild) throw Error(formatProdErrorMessage(189));
}
}
if (a.alternate !== b) throw Error(formatProdErrorMessage(190));
}
if (3 !== a.tag) throw Error(formatProdErrorMessage(188));
return a.stateNode.current === a ? fiber : alternate;
}
function findCurrentHostFiberImpl(node) {
var tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
for (node = node.child; null !== node;) {
tag = findCurrentHostFiberImpl(node);
if (null !== tag) return tag;
node = node.sibling;
}
return null;
}
function findCurrentHostFiberWithNoPortalsImpl(node) {
var tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
for (node = node.child; null !== node;) {
if (4 !== node.tag && (tag = findCurrentHostFiberWithNoPortalsImpl(node), null !== tag)) return tag;
node = node.sibling;
}
return null;
}
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE: return "Fragment";
case REACT_PROFILER_TYPE: return "Profiler";
case REACT_STRICT_MODE_TYPE: return "StrictMode";
case REACT_SUSPENSE_TYPE: return "Suspense";
case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
case REACT_ACTIVITY_TYPE: return "Activity";
}
if ("object" === typeof type) switch (type.$$typeof) {
case REACT_PORTAL_TYPE: return "Portal";
case REACT_CONTEXT_TYPE: return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function createCursor(defaultValue) {
return { current: defaultValue };
}
function pop$1(cursor) {
0 > index$jscomp$0 || (cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, index$jscomp$0--);
}
function push$1(cursor, value) {
index$jscomp$0++;
valueStack[index$jscomp$0] = cursor.current;
cursor.current = value;
}
function clz32Fallback(x) {
x >>>= 0;
return 0 === x ? 32 : 31 - (log$1(x) / LN2 | 0) | 0;
}
function getHighestPriorityLanes(lanes) {
var pendingSyncLanes = lanes & 42;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case 1: return 1;
case 2: return 2;
case 4: return 4;
case 8: return 8;
case 16: return 16;
case 32: return 32;
case 64: return 64;
case 128: return 128;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152: return lanes & 4194048;
case 4194304:
case 8388608:
case 16777216:
case 33554432: return lanes & 62914560;
case 67108864: return 67108864;
case 134217728: return 134217728;
case 268435456: return 268435456;
case 536870912: return 536870912;
case 1073741824: return 0;
default: return lanes;
}
}
function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0, suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes;
root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes;
}
function checkIfRootIsPrerendering(root, renderLanes$1) {
return 0 === (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & renderLanes$1);
}
function computeExpirationTime(lane, currentTime) {
switch (lane) {
case 1:
case 2:
case 4:
case 8:
case 64: return currentTime + 250;
case 16:
case 32:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152: return currentTime + 5e3;
case 4194304:
case 8388608:
case 16777216:
case 33554432: return -1;
case 67108864:
case 134217728:
case 268435456:
case 536870912:
case 1073741824: return -1;
default: return -1;
}
}
function claimNextTransitionLane() {
var lane = nextTransitionLane;
nextTransitionLane <<= 1;
0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256);
return lane;
}
function claimNextRetryLane() {
var lane = nextRetryLane;
nextRetryLane <<= 1;
0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
return lane;
}
function createLaneMap(initial) {
for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
return laneMap;
}
function markRootUpdated$1(root, updateLane) {
root.pendingLanes |= updateLane;
268435456 !== updateLane && (root.suspendedLanes = 0, root.pingedLanes = 0, root.warmLanes = 0);
}
function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
var previouslyPendingLanes = root.pendingLanes;
root.pendingLanes = remainingLanes;
root.suspendedLanes = 0;
root.pingedLanes = 0;
root.warmLanes = 0;
root.expiredLanes &= remainingLanes;
root.entangledLanes &= remainingLanes;
root.errorRecoveryDisabledLanes &= remainingLanes;
root.shellSuspendCounter = 0;
var entanglements = root.entanglements, expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates;
for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes;) {
var index$5 = 31 - clz32(remainingLanes), lane = 1 << index$5;
entanglements[index$5] = 0;
expirationTimes[index$5] = -1;
var hiddenUpdatesForLane = hiddenUpdates[index$5];
if (null !== hiddenUpdatesForLane) for (hiddenUpdates[index$5] = null, index$5 = 0; index$5 < hiddenUpdatesForLane.length; index$5++) {
var update = hiddenUpdatesForLane[index$5];
null !== update && (update.lane &= -536870913);
}
remainingLanes &= ~lane;
}
0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
}
function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
root.pendingLanes |= spawnedLane;
root.suspendedLanes &= ~spawnedLane;
var spawnedLaneIndex = 31 - clz32(spawnedLane);
root.entangledLanes |= spawnedLane;
root.entanglements[spawnedLaneIndex] = root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 4194090;
}
function markRootEntangled(root, entangledLanes) {
var rootEntangledLanes = root.entangledLanes |= entangledLanes;
for (root = root.entanglements; rootEntangledLanes;) {
var index$6 = 31 - clz32(rootEntangledLanes), lane = 1 << index$6;
lane & entangledLanes | root[index$6] & entangledLanes && (root[index$6] |= entangledLanes);
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydrationByLane(lane) {
switch (lane) {
case 2:
lane = 1;
break;
case 8:
lane = 4;
break;
case 32:
lane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
lane = 128;
break;
case 268435456:
lane = 134217728;
break;
default: lane = 0;
}
return lane;
}
function lanesToEventPriority(lanes) {
lanes &= -lanes;
return 2 < lanes ? 8 < lanes ? 0 !== (lanes & 134217727) ? 32 : 268435456 : 8 : 2;
}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode) try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {}
}
function describeBuiltInComponentFrame(name) {
if (void 0 === prefix) try {
throw Error();
} catch (x) {
var match = x.stack.trim().match(/\n( *(at )?)/);
prefix = match && match[1] || "";
suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
}
return "\n" + prefix + name + suffix;
}
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) return "";
reentry = !0;
var previousPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
try {
var RunInRootFrame = { DetermineComponentFrameRoot: function() {
try {
if (construct) {
var Fake = function() {
throw Error();
};
Object.defineProperty(Fake.prototype, "props", { set: function() {
throw Error();
} });
if ("object" === typeof Reflect && Reflect.construct) {
try {
Reflect.construct(Fake, []);
} catch (x) {
var control = x;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x$8) {
control = x$8;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x$9) {
control = x$9;
}
(Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {});
}
} catch (sample) {
if (sample && control && "string" === typeof sample.stack) return [sample.stack, control.stack];
}
return [null, null];
} };
RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, "name");
namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" });
var _RunInRootFrame$Deter = RunInRo