/** * @license React * react-dom-server.node.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict"; "production" !== process.env.NODE_ENV && (function () { function styleReplacer(match, prefix, s, suffix) { return "" + prefix + ("s" === s ? "\\73 " : "\\53 ") + suffix; } function scriptReplacer(match, prefix, s, suffix) { return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix; } function objectName(object) { return Object.prototype.toString .call(object) .replace(/^\[object (.*)\]$/, function (m, p0) { return p0; }); } function describeKeyForErrorMessage(key) { var encodedKey = JSON.stringify(key); return '"' + key + '"' === encodedKey ? key : encodedKey; } function describeValueForErrorMessage(value) { switch (typeof value) { case "string": return JSON.stringify( 10 >= value.length ? value : value.slice(0, 10) + "..." ); case "object": if (isArrayImpl(value)) return "[...]"; if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) return "client"; value = objectName(value); return "Object" === value ? "{...}" : value; case "function": return value.$$typeof === CLIENT_REFERENCE_TAG ? "client" : (value = value.displayName || value.name) ? "function " + value : "function"; default: return String(value); } } function describeElementType(type) { if ("string" === typeof type) return type; switch (type) { case REACT_SUSPENSE_TYPE: return "Suspense"; case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList"; } if ("object" === typeof type) switch (type.$$typeof) { case REACT_FORWARD_REF_TYPE: return describeElementType(type.render); case REACT_MEMO_TYPE: return describeElementType(type.type); case REACT_LAZY_TYPE: var payload = type._payload; type = type._init; try { return describeElementType(type(payload)); } catch (x) {} } return ""; } function describeObjectForErrorMessage(objectOrArray, expandedName) { var objKind = objectName(objectOrArray); if ("Object" !== objKind && "Array" !== objKind) return objKind; var start = -1, length = 0; if (isArrayImpl(objectOrArray)) if (jsxChildrenParents.has(objectOrArray)) { var type = jsxChildrenParents.get(objectOrArray); objKind = "<" + describeElementType(type) + ">"; for (var i = 0; i < objectOrArray.length; i++) { var value = objectOrArray[i]; value = "string" === typeof value ? value : "object" === typeof value && null !== value ? "{" + describeObjectForErrorMessage(value) + "}" : "{" + describeValueForErrorMessage(value) + "}"; "" + i === expandedName ? ((start = objKind.length), (length = value.length), (objKind += value)) : (objKind = 15 > value.length && 40 > objKind.length + value.length ? objKind + value : objKind + "{...}"); } objKind += ""; } else { objKind = "["; for (type = 0; type < objectOrArray.length; type++) 0 < type && (objKind += ", "), (i = objectOrArray[type]), (i = "object" === typeof i && null !== i ? describeObjectForErrorMessage(i) : describeValueForErrorMessage(i)), "" + type === expandedName ? ((start = objKind.length), (length = i.length), (objKind += i)) : (objKind = 10 > i.length && 40 > objKind.length + i.length ? objKind + i : objKind + "..."); objKind += "]"; } else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) objKind = "<" + describeElementType(objectOrArray.type) + "/>"; else { if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; if (jsxPropsParents.has(objectOrArray)) { objKind = jsxPropsParents.get(objectOrArray); objKind = "<" + (describeElementType(objKind) || "..."); type = Object.keys(objectOrArray); for (i = 0; i < type.length; i++) { objKind += " "; value = type[i]; objKind += describeKeyForErrorMessage(value) + "="; var _value2 = objectOrArray[value]; var _substr2 = value === expandedName && "object" === typeof _value2 && null !== _value2 ? describeObjectForErrorMessage(_value2) : describeValueForErrorMessage(_value2); "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); value === expandedName ? ((start = objKind.length), (length = _substr2.length), (objKind += _substr2)) : (objKind = 10 > _substr2.length && 40 > objKind.length + _substr2.length ? objKind + _substr2 : objKind + "..."); } objKind += ">"; } else { objKind = "{"; type = Object.keys(objectOrArray); for (i = 0; i < type.length; i++) 0 < i && (objKind += ", "), (value = type[i]), (objKind += describeKeyForErrorMessage(value) + ": "), (_value2 = objectOrArray[value]), (_value2 = "object" === typeof _value2 && null !== _value2 ? describeObjectForErrorMessage(_value2) : describeValueForErrorMessage(_value2)), value === expandedName ? ((start = objKind.length), (length = _value2.length), (objKind += _value2)) : (objKind = 10 > _value2.length && 40 > objKind.length + _value2.length ? objKind + _value2 : objKind + "..."); objKind += "}"; } } return void 0 === expandedName ? objKind : -1 < start && 0 < length ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), "\n " + objKind + "\n " + objectOrArray) : "\n " + objKind; } function flushBuffered(destination) { "function" === typeof destination.flush && destination.flush(); } function writeChunk(destination, chunk) { if ("string" === typeof chunk) { if (0 !== chunk.length) if (2048 < 3 * chunk.length) 0 < writtenBytes && (writeToDestination( destination, currentView.subarray(0, writtenBytes) ), (currentView = new Uint8Array(2048)), (writtenBytes = 0)), writeToDestination(destination, chunk); else { var target = currentView; 0 < writtenBytes && (target = currentView.subarray(writtenBytes)); target = textEncoder.encodeInto(chunk, target); var read = target.read; writtenBytes += target.written; read < chunk.length && (writeToDestination( destination, currentView.subarray(0, writtenBytes) ), (currentView = new Uint8Array(2048)), (writtenBytes = textEncoder.encodeInto( chunk.slice(read), currentView ).written)); 2048 === writtenBytes && (writeToDestination(destination, currentView), (currentView = new Uint8Array(2048)), (writtenBytes = 0)); } } else 0 !== chunk.byteLength && (2048 < chunk.byteLength ? (0 < writtenBytes && (writeToDestination( destination, currentView.subarray(0, writtenBytes) ), (currentView = new Uint8Array(2048)), (writtenBytes = 0)), writeToDestination(destination, chunk)) : ((target = currentView.length - writtenBytes), target < chunk.byteLength && (0 === target ? writeToDestination(destination, currentView) : (currentView.set(chunk.subarray(0, target), writtenBytes), (writtenBytes += target), writeToDestination(destination, currentView), (chunk = chunk.subarray(target))), (currentView = new Uint8Array(2048)), (writtenBytes = 0)), currentView.set(chunk, writtenBytes), (writtenBytes += chunk.byteLength), 2048 === writtenBytes && (writeToDestination(destination, currentView), (currentView = new Uint8Array(2048)), (writtenBytes = 0)))); } function writeToDestination(destination, view) { destination = destination.write(view); destinationHasCapacity$1 = destinationHasCapacity$1 && destination; } function writeChunkAndReturn(destination, chunk) { writeChunk(destination, chunk); return destinationHasCapacity$1; } function completeWriting(destination) { currentView && 0 < writtenBytes && destination.write(currentView.subarray(0, writtenBytes)); currentView = null; writtenBytes = 0; destinationHasCapacity$1 = !0; } function stringToPrecomputedChunk(content) { content = textEncoder.encode(content); 2048 < content.byteLength && console.error( "precomputed chunks must be smaller than the view size configured for this host. This is a bug in React." ); return content; } function typeName(value) { return ( ("function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag]) || value.constructor.name || "Object" ); } function willCoercionThrow(value) { try { return testStringCoercion(value), !1; } catch (e) { return !0; } } function testStringCoercion(value) { return "" + value; } function checkAttributeStringCoercion(value, attributeName) { if (willCoercionThrow(value)) return ( console.error( "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", attributeName, typeName(value) ), testStringCoercion(value) ); } function checkCSSPropertyStringCoercion(value, propName) { if (willCoercionThrow(value)) return ( console.error( "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", propName, typeName(value) ), testStringCoercion(value) ); } function checkHtmlStringCoercion(value) { if (willCoercionThrow(value)) return ( console.error( "The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.", typeName(value) ), testStringCoercion(value) ); } function isAttributeNameSafe(attributeName) { if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) return !0; if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1; if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) return (validatedAttributeNameCache[attributeName] = !0); illegalAttributeNameCache[attributeName] = !0; console.error("Invalid attribute name: `%s`", attributeName); return !1; } function checkControlledValueProps(tagName, props) { hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || null == props.value || ("select" === tagName ? console.error( "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." ) : console.error( "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." )); props.onChange || props.readOnly || props.disabled || null == props.checked || console.error( "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." ); } function validateProperty$1(tagName, name) { if ( hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name] ) return !0; if (rARIACamel$1.test(name)) { tagName = "aria-" + name.slice(4).toLowerCase(); tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null; if (null == tagName) return ( console.error( "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.", name ), (warnedProperties$1[name] = !0) ); if (name !== tagName) return ( console.error( "Invalid ARIA attribute `%s`. Did you mean `%s`?", name, tagName ), (warnedProperties$1[name] = !0) ); } if (rARIA$1.test(name)) { tagName = name.toLowerCase(); tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null; if (null == tagName) return (warnedProperties$1[name] = !0), !1; name !== tagName && (console.error( "Unknown ARIA attribute `%s`. Did you mean `%s`?", name, tagName ), (warnedProperties$1[name] = !0)); } return !0; } function validateProperties$2(type, props) { var invalidProps = [], key; for (key in props) validateProperty$1(type, key) || invalidProps.push(key); props = invalidProps .map(function (prop) { return "`" + prop + "`"; }) .join(", "); 1 === invalidProps.length ? console.error( "Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props", props, type ) : 1 < invalidProps.length && console.error( "Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props", props, type ); } function validateProperty(tagName, name, value, eventRegistry) { if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) return !0; var lowerCasedName = name.toLowerCase(); if ("onfocusin" === lowerCasedName || "onfocusout" === lowerCasedName) return ( console.error( "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React." ), (warnedProperties[name] = !0) ); if ( "function" === typeof value && (("form" === tagName && "action" === name) || ("input" === tagName && "formAction" === name) || ("button" === tagName && "formAction" === name)) ) return !0; if (null != eventRegistry) { tagName = eventRegistry.possibleRegistrationNames; if (eventRegistry.registrationNameDependencies.hasOwnProperty(name)) return !0; eventRegistry = tagName.hasOwnProperty(lowerCasedName) ? tagName[lowerCasedName] : null; if (null != eventRegistry) return ( console.error( "Invalid event handler property `%s`. Did you mean `%s`?", name, eventRegistry ), (warnedProperties[name] = !0) ); if (EVENT_NAME_REGEX.test(name)) return ( console.error( "Unknown event handler property `%s`. It will be ignored.", name ), (warnedProperties[name] = !0) ); } else if (EVENT_NAME_REGEX.test(name)) return ( INVALID_EVENT_NAME_REGEX.test(name) && console.error( "Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.", name ), (warnedProperties[name] = !0) ); if (rARIA.test(name) || rARIACamel.test(name)) return !0; if ("innerhtml" === lowerCasedName) return ( console.error( "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`." ), (warnedProperties[name] = !0) ); if ("aria" === lowerCasedName) return ( console.error( "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead." ), (warnedProperties[name] = !0) ); if ( "is" === lowerCasedName && null !== value && void 0 !== value && "string" !== typeof value ) return ( console.error( "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.", typeof value ), (warnedProperties[name] = !0) ); if ("number" === typeof value && isNaN(value)) return ( console.error( "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.", name ), (warnedProperties[name] = !0) ); if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { if ( ((lowerCasedName = possibleStandardNames[lowerCasedName]), lowerCasedName !== name) ) return ( console.error( "Invalid DOM property `%s`. Did you mean `%s`?", name, lowerCasedName ), (warnedProperties[name] = !0) ); } else if (name !== lowerCasedName) return ( console.error( "React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.", name, lowerCasedName ), (warnedProperties[name] = !0) ); switch (name) { case "dangerouslySetInnerHTML": case "children": case "style": case "suppressContentEditableWarning": case "suppressHydrationWarning": case "defaultValue": case "defaultChecked": case "innerHTML": case "ref": return !0; case "innerText": case "textContent": return !0; } switch (typeof value) { case "boolean": switch (name) { case "autoFocus": case "checked": case "multiple": case "muted": case "selected": case "contentEditable": case "spellCheck": case "draggable": case "value": case "autoReverse": case "externalResourcesRequired": case "focusable": case "preserveAlpha": case "allowFullScreen": case "async": case "autoPlay": case "controls": case "default": case "defer": case "disabled": case "disablePictureInPicture": case "disableRemotePlayback": case "formNoValidate": case "hidden": case "loop": case "noModule": case "noValidate": case "open": case "playsInline": case "readOnly": case "required": case "reversed": case "scoped": case "seamless": case "itemScope": case "capture": case "download": case "inert": return !0; default: lowerCasedName = name.toLowerCase().slice(0, 5); if ("data-" === lowerCasedName || "aria-" === lowerCasedName) return !0; value ? console.error( 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.', value, name, name, value, name ) : console.error( 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name ); return (warnedProperties[name] = !0); } case "function": case "symbol": return (warnedProperties[name] = !0), !1; case "string": if ("false" === value || "true" === value) { switch (name) { case "checked": case "selected": case "multiple": case "muted": case "allowFullScreen": case "async": case "autoPlay": case "controls": case "default": case "defer": case "disabled": case "disablePictureInPicture": case "disableRemotePlayback": case "formNoValidate": case "hidden": case "loop": case "noModule": case "noValidate": case "open": case "playsInline": case "readOnly": case "required": case "reversed": case "scoped": case "seamless": case "itemScope": case "inert": break; default: return !0; } console.error( "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?", value, name, "false" === value ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".', name, value ); warnedProperties[name] = !0; } } return !0; } function warnUnknownProperties(type, props, eventRegistry) { var unknownProps = [], key; for (key in props) validateProperty(type, key, props[key], eventRegistry) || unknownProps.push(key); props = unknownProps .map(function (prop) { return "`" + prop + "`"; }) .join(", "); 1 === unknownProps.length ? console.error( "Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ", props, type ) : 1 < unknownProps.length && console.error( "Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ", props, type ); } function camelize(string) { return string.replace(hyphenPattern, function (_, character) { return character.toUpperCase(); }); } function escapeTextForBrowser(text) { if ( "boolean" === typeof text || "number" === typeof text || "bigint" === typeof text ) return "" + text; checkHtmlStringCoercion(text); text = "" + text; var match = matchHtmlRegExp.exec(text); if (match) { var html = "", index, lastIndex = 0; for (index = match.index; index < text.length; index++) { switch (text.charCodeAt(index)) { case 34: match = """; break; case 38: match = "&"; break; case 39: match = "'"; break; case 60: match = "<"; break; case 62: match = ">"; break; default: continue; } lastIndex !== index && (html += text.slice(lastIndex, index)); lastIndex = index + 1; html += match; } text = lastIndex !== index ? html + text.slice(lastIndex, index) : html; } return text; } function sanitizeURL(url) { return isJavaScriptProtocol.test("" + url) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url; } function escapeEntireInlineScriptContent(scriptText) { checkHtmlStringCoercion(scriptText); return ("" + scriptText).replace(scriptRegex, scriptReplacer); } function createRenderState( resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength ) { var inlineScriptWithNonce = void 0 === nonce ? startInlineScript : stringToPrecomputedChunk( '