diff --git a/demos/simple-react/index.html b/demos/simple-react/index.html
new file mode 100644
index 0000000000..32d8cad011
--- /dev/null
+++ b/demos/simple-react/index.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/demos/simple-react/node_modules.jsb.zip b/demos/simple-react/node_modules.jsb.zip
new file mode 100644
index 0000000000..b24a7823ba
Binary files /dev/null and b/demos/simple-react/node_modules.jsb.zip differ
diff --git a/demos/simple-react/package.json b/demos/simple-react/package.json
index 785feeca80..b835925fc4 100644
--- a/demos/simple-react/package.json
+++ b/demos/simple-react/package.json
@@ -3,12 +3,15 @@
"version": "1.0.0",
"license": "MIT",
"dependencies": {
+ "@emotion/css": "^11.1.3",
"antd": "^4.16.1",
"left-pad": "^1.3.0",
"parcel": "2.0.0-beta.3",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
- "react-dom": "^17.0.2"
+ "react-dom": "^17.0.2",
+ "react-form": "^4.0.1",
+ "react-hook-form": "^7.8.3"
},
"parcel": "parceldist/index.js",
"targets": {
diff --git a/demos/simple-react/public/index.html b/demos/simple-react/public/index.html
index 91ced42ddf..d441dfdf19 100644
--- a/demos/simple-react/public/index.html
+++ b/demos/simple-react/public/index.html
@@ -1,9 +1,8 @@
-
-
-
+
+
diff --git a/demos/simple-react/snowpack.config.js b/demos/simple-react/snowpack.config.js
new file mode 100644
index 0000000000..40d8ec9b17
--- /dev/null
+++ b/demos/simple-react/snowpack.config.js
@@ -0,0 +1,23 @@
+// Snowpack Configuration File
+// See all supported options: https://www.snowpack.dev/reference/configuration
+
+/** @type {import("snowpack").SnowpackUserConfig } */
+module.exports = {
+ mount: {
+ src: "/dist",
+ public: { url: "/", static: true, resolve: false },
+ resolve: true,
+ },
+ plugins: [
+ /* ... */
+ ],
+ packageOptions: {
+ /* ... */
+ },
+ devOptions: {
+ /* ... */
+ },
+ buildOptions: {
+ /* ... */
+ },
+};
diff --git a/demos/simple-react/src/components/button.tsx b/demos/simple-react/src/components/button.tsx
index 2b4ae9483e..8614dacc31 100644
--- a/demos/simple-react/src/components/button.tsx
+++ b/demos/simple-react/src/components/button.tsx
@@ -2,6 +2,8 @@ import React from "react";
export const Button = ({ label, label2, onClick }) => (
-
{label}
+
Butto123n!123{label}
+
Butto123n!123{label}
+
Butto123n!123{label}
);
diff --git a/demos/simple-react/src/index.css b/demos/simple-react/src/index.css
new file mode 100644
index 0000000000..04e7110b41
--- /dev/null
+++ b/demos/simple-react/src/index.css
@@ -0,0 +1,3 @@
+body {
+ background-color: pink;
+}
diff --git a/demos/simple-react/src/index.tsx b/demos/simple-react/src/index.tsx
index 46e0027ef2..db66d786bd 100644
--- a/demos/simple-react/src/index.tsx
+++ b/demos/simple-react/src/index.tsx
@@ -1,17 +1,20 @@
import ReactDOM from "react-dom";
+import React from "react";
import { Button } from "./components/button";
-import { DatePicker } from "antd";
+import classNames from "classnames";
const Base = ({}) => {
return (
-
- I am the page
- Here is some text
- <>Fragmen!t>
-
+
+ Here is some text
+
+ <>
+ Fargment!1239899080909123123123123123poaksdpoaksdpopokasdpokasdpokaspodkapsodk
+ poaksdpok123123
+ >
@@ -25,5 +28,6 @@ function startReact() {
globalThis.addEventListener("DOMContentLoaded", () => {
startReact();
});
+startReact();
export { Base };
diff --git a/demos/simple-react/txt.js b/demos/simple-react/txt.js
new file mode 100644
index 0000000000..44bcaa7b68
--- /dev/null
+++ b/demos/simple-react/txt.js
@@ -0,0 +1,19273 @@
+var $$mod$ = Symbol.for;
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+
+export var __markAsModule = (target) =>
+ __defProp(target, "__esModule", { value: true });
+
+// lazy require to prevent loading one icon from a design system
+export var $$lzy = (target, module, props) => {
+ for (let key in props) {
+ if (!__hasOwnProp.call(target, key) && key !== "default")
+ __defProp(target, key, {
+ get: () => module()[props[key]],
+ enumerable: true,
+ });
+ }
+ return target;
+};
+
+export var __toModule = (module) => {
+ return __reExport(
+ __markAsModule(
+ __defProp(
+ module != null ? __create(__getProtoOf(module)) : {},
+ "default",
+ module && module.__esModule && "default" in module
+ ? { get: () => module.default, enumerable: true }
+ : { value: module, enumerable: true }
+ )
+ ),
+ module
+ );
+};
+
+export var __commonJS = (cb, name) => {
+ var mod = {};
+ var has_run = false;
+
+ return {
+ [`#init_${name}`]() {
+ if (has_run) {
+ return mod.exports;
+ }
+ has_run = true;
+ __name(cb);
+
+ mod = { exports: {} };
+
+ cb(mod, mod.exports);
+
+ // If it's a default-only export, don't crash if they call .default on the module
+ if (
+ typeof mod.exports === "object" &&
+ "default" in mod.exports &&
+ Object.keys(mod.exports).len === 1
+ ) {
+ mod.exports = mod.exports.default;
+ Object.defineProperty(mod.exports, "default", {
+ get() {
+ return mod.exports;
+ },
+ enumerable: false,
+ });
+ // If it's a namespace export without .default, pretend .default is the same as mod.exports
+ } else if (
+ typeof mod.exports === "object" &&
+ !("default" in mod.exports)
+ ) {
+ Object.defineProperty(mod.exports, "default", {
+ get() {
+ return mod.exports;
+ },
+ enumerable: false,
+ });
+ }
+
+ return mod.exports;
+ },
+ }[`#init_${name}`];
+};
+
+var require_cache = new WeakMap();
+
+export var __SPEEDY_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
+ RequireFailedError: class {},
+};
+
+// __name(
+// __SPEEDY_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED__MODULE_LOAD_CACHE.RequireFailedError,
+// "RequireFailedError"
+// );
+// __name(
+// __SPEEDY_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED__MODULE_LOAD_CACHE.Module,
+// "Module"
+// );
+
+export var __require = (namespace) => {
+ var entry = require_cache.get(namespace);
+ if (typeof entry !== "undefined") {
+ return entry;
+ }
+
+ var target =
+ Object.prototype.hasOwnProperty.call(namespace, "default") &&
+ Object.keys(namespace).length === 1
+ ? namespace["default"]
+ : namespace;
+
+ if (typeof target !== "function") {
+ throw new __SPEEDY_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.RequireFailedError(
+ `Couldn't find module "${
+ typeof namespace === "string"
+ ? namespace
+ : namespace.name || namespace.displayName || namespace.toString()
+ }"`
+ );
+ }
+
+ var exports = target();
+ require_cache.set(namespace, exports);
+ return exports;
+};
+
+if (
+ !(
+ "__SPEEDY_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED__MODULE_LOAD_CACHE" in
+ globalThis
+ )
+) {
+ globalThis.__SPEEDY_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED__MODULE_LOAD_CACHE =
+ new Map();
+}
+
+if (
+ !(
+ "__SPEEDY_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED__MODULE_REGISTRY" in
+ globalThis
+ )
+) {
+ globalThis.__SPEEDY_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED__MODULE_REGISTRY =
+ new Map();
+}
+
+export var $$m = (package_json_name, module_path, cb) => {
+ return __commonJS(cb, `${package_json_name}/${module_path}`);
+};
+
+export var __name = (target, name) => {
+ Object.defineProperty(target, "name", {
+ value: name,
+ enumerable: false,
+ configurable: true,
+ });
+
+ return target;
+};
+
+export const __esModule = true;
+
+// Used to implement ES6 exports to CommonJS
+export var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+
+export var __reExport = (target, module, desc) => {
+ if ((module && typeof module === "object") || typeof module === "function")
+ for (let key of __getOwnPropNames(module))
+ if (!__hasOwnProp.call(target, key) && key !== "default")
+ __defProp(target, key, {
+ get: () => module[key],
+ enumerable:
+ !(desc = __getOwnPropDesc(module, key)) || desc.enumerable,
+ });
+ return target;
+};
+
+
+// react-dom/index.js
+export var $1b4a06c4 = $$m("react-dom", "index.js", (module, exports) => {
+ ;
+
+ function checkDCE() {
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function")
+ return;
+ throw new Error("^_^");
+ try {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
+ } catch (err) {
+ console.error(err);
+ }
+ }
+ module.exports = $c48aad09();
+}, );
+
+
+
+// react/index.js
+export var $b9dfaf90 = $$m("react", "index.js", (module, exports) => {
+ ;
+
+ module.exports = $4ed1518d();
+}, );
+
+
+
+// react/jsx-dev-runtime.js
+export var $46a316da = $$m("react", "jsx-dev-runtime.js", (module, exports) => {
+ ;
+
+ module.exports = $1ae4404e();
+}, );
+
+
+
+// react-dom/cjs/react-dom.development.js
+export var $c48aad09 = $$m("react-dom", "cjs/react-dom.development.js", (module, exports) => {
+ ;
+
+ (function() {
+ ;
+ var React = $b9dfaf90();
+ var _assign = $7ea39cf4();
+ var Scheduler = $a129267();
+ var tracing = $b21755aa();
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
+ function warn(format) {
+ {
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1;_key < _len; _key++)
+ args[_key - 1] = arguments[_key];
+ printWarning("warn", format, args);
+ }
+ }
+ function error(format) {
+ {
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1;_key2 < _len2; _key2++)
+ args[_key2 - 1] = arguments[_key2];
+ printWarning("error", format, args);
+ }
+ }
+ function printWarning(level, format, args) {
+ {
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
+ if (stack !== "") {
+ format += "%s";
+ args = args.concat([stack]);
+ }
+ var argsWithFormat = args.map(function(item) {
+ return "" + item;
+ });
+ argsWithFormat.unshift("Warning: " + format);
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
+ }
+ }
+ if (!React)
+ throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");
+ var FunctionComponent = 0;
+ var ClassComponent = 1;
+ var IndeterminateComponent = 2;
+ var HostRoot = 3;
+ var HostPortal = 4;
+ var HostComponent = 5;
+ var HostText = 6;
+ var Fragment = 7;
+ var Mode = 8;
+ var ContextConsumer = 9;
+ var ContextProvider = 10;
+ var ForwardRef = 11;
+ var Profiler = 12;
+ var SuspenseComponent = 13;
+ var MemoComponent = 14;
+ var SimpleMemoComponent = 15;
+ var LazyComponent = 16;
+ var IncompleteClassComponent = 17;
+ var DehydratedFragment = 18;
+ var SuspenseListComponent = 19;
+ var FundamentalComponent = 20;
+ var ScopeComponent = 21;
+ var Block = 22;
+ var OffscreenComponent = 23;
+ var LegacyHiddenComponent = 24;
+ var enableProfilerTimer = true;
+ var enableFundamentalAPI = false;
+ var enableNewReconciler = false;
+ var warnAboutStringRefs = false;
+ var allNativeEvents = new Set;
+ var registrationNameDependencies = {};
+ var possibleRegistrationNames = {};
+ function registerTwoPhaseEvent(registrationName, dependencies) {
+ registerDirectEvent(registrationName, dependencies);
+ registerDirectEvent(registrationName + "Capture", dependencies);
+ }
+ function registerDirectEvent(registrationName, dependencies) {
+ if (registrationNameDependencies[registrationName])
+ error("EventRegistry: More than one plugin attempted to publish the same " + "registration name, `%s`.", registrationName);
+ registrationNameDependencies[registrationName] = dependencies;
+ {
+ var lowerCasedName = registrationName.toLowerCase();
+ possibleRegistrationNames[lowerCasedName] = registrationName;
+ if (registrationName === "onDoubleClick")
+ possibleRegistrationNames.ondblclick = registrationName;
+ }
+ for (var i = 0;i < dependencies.length; i++)
+ allNativeEvents.add(dependencies[i]);
+ }
+ var canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
+ var RESERVED = 0;
+ var STRING = 1;
+ var BOOLEANISH_STRING = 2;
+ var BOOLEAN = 3;
+ var OVERLOADED_BOOLEAN = 4;
+ var NUMERIC = 5;
+ var POSITIVE_NUMERIC = 6;
+ var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
+ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
+ var ROOT_ATTRIBUTE_NAME = "data-reactroot";
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$");
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var illegalAttributeNameCache = {};
+ var validatedAttributeNameCache = {};
+ function isAttributeNameSafe(attributeName) {
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
+ return true;
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
+ return false;
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
+ validatedAttributeNameCache[attributeName] = true;
+ return true;
+ }
+ illegalAttributeNameCache[attributeName] = true;
+ error("Invalid attribute name: `%s`", attributeName);
+ return false;
+ }
+ function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
+ if (propertyInfo !== null)
+ return propertyInfo.type === RESERVED;
+ if (isCustomComponentTag)
+ return false;
+ if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N"))
+ return true;
+ return false;
+ }
+ function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
+ if (propertyInfo !== null && propertyInfo.type === RESERVED)
+ return false;
+ switch (typeof value) {
+ case "function":
+ case "symbol":
+ return true;
+ case "boolean": {
+ if (isCustomComponentTag)
+ return false;
+ if (propertyInfo !== null)
+ return !propertyInfo.acceptsBooleans;
+ else {
+ var prefix = name.toLowerCase().slice(0, 5);
+ return prefix !== "data-" && prefix !== "aria-";
+ }
+ }
+ default:
+ return false;
+ }
+ }
+ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
+ if (value === null || typeof value === "undefined")
+ return true;
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag))
+ return true;
+ if (isCustomComponentTag)
+ return false;
+ if (propertyInfo !== null)
+ switch (propertyInfo.type) {
+ case BOOLEAN:
+ return !value;
+ case OVERLOADED_BOOLEAN:
+ return value === false;
+ case NUMERIC:
+ return isNaN(value);
+ case POSITIVE_NUMERIC:
+ return isNaN(value) || value < 1;
+ }
+ return false;
+ }
+ function getPropertyInfo(name) {
+ return properties.hasOwnProperty(name) ? properties[name] : null;
+ }
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
+ this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
+ this.attributeName = attributeName;
+ this.attributeNamespace = attributeNamespace;
+ this.mustUseProperty = mustUseProperty;
+ this.propertyName = name;
+ this.type = type;
+ this.sanitizeURL = sanitizeURL;
+ this.removeEmptyString = removeEmptyString;
+ }
+ var properties = {};
+ var reservedProps = [
+ "children",
+ "dangerouslySetInnerHTML",
+ "defaultValue",
+ "defaultChecked",
+ "innerHTML",
+ "suppressContentEditableWarning",
+ "suppressHydrationWarning",
+ "style"
+ ];
+ reservedProps.forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, RESERVED, false, name, null, false, false);
+ });
+ [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) {
+ var name = _ref[0], attributeName = _ref[1];
+ properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false);
+ });
+ ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name.toLowerCase(), null, false, false);
+ });
+ ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name, null, false, false);
+ });
+ [
+ "allowFullScreen",
+ "async",
+ "autoFocus",
+ "autoPlay",
+ "controls",
+ "default",
+ "defer",
+ "disabled",
+ "disablePictureInPicture",
+ "disableRemotePlayback",
+ "formNoValidate",
+ "hidden",
+ "loop",
+ "noModule",
+ "noValidate",
+ "open",
+ "playsInline",
+ "readOnly",
+ "required",
+ "reversed",
+ "scoped",
+ "seamless",
+ "itemScope"
+ ].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, name.toLowerCase(), null, false, false);
+ });
+ [
+ "checked",
+ "multiple",
+ "muted",
+ "selected"
+ ].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, name, null, false, false);
+ });
+ [
+ "capture",
+ "download"
+ ].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, name, null, false, false);
+ });
+ [
+ "cols",
+ "rows",
+ "size",
+ "span"
+ ].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, name, null, false, false);
+ });
+ ["rowSpan", "start"].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, NUMERIC, false, name.toLowerCase(), null, false, false);
+ });
+ var CAMELIZE = /[\-\:]([a-z])/g;
+ var capitalize = function(token) {
+ return token[1].toUpperCase();
+ };
+ [
+ "accent-height",
+ "alignment-baseline",
+ "arabic-form",
+ "baseline-shift",
+ "cap-height",
+ "clip-path",
+ "clip-rule",
+ "color-interpolation",
+ "color-interpolation-filters",
+ "color-profile",
+ "color-rendering",
+ "dominant-baseline",
+ "enable-background",
+ "fill-opacity",
+ "fill-rule",
+ "flood-color",
+ "flood-opacity",
+ "font-family",
+ "font-size",
+ "font-size-adjust",
+ "font-stretch",
+ "font-style",
+ "font-variant",
+ "font-weight",
+ "glyph-name",
+ "glyph-orientation-horizontal",
+ "glyph-orientation-vertical",
+ "horiz-adv-x",
+ "horiz-origin-x",
+ "image-rendering",
+ "letter-spacing",
+ "lighting-color",
+ "marker-end",
+ "marker-mid",
+ "marker-start",
+ "overline-position",
+ "overline-thickness",
+ "paint-order",
+ "panose-1",
+ "pointer-events",
+ "rendering-intent",
+ "shape-rendering",
+ "stop-color",
+ "stop-opacity",
+ "strikethrough-position",
+ "strikethrough-thickness",
+ "stroke-dasharray",
+ "stroke-dashoffset",
+ "stroke-linecap",
+ "stroke-linejoin",
+ "stroke-miterlimit",
+ "stroke-opacity",
+ "stroke-width",
+ "text-anchor",
+ "text-decoration",
+ "text-rendering",
+ "underline-position",
+ "underline-thickness",
+ "unicode-bidi",
+ "unicode-range",
+ "units-per-em",
+ "v-alphabetic",
+ "v-hanging",
+ "v-ideographic",
+ "v-mathematical",
+ "vector-effect",
+ "vert-adv-y",
+ "vert-origin-x",
+ "vert-origin-y",
+ "word-spacing",
+ "writing-mode",
+ "xmlns:xlink",
+ "x-height"
+ ].forEach(function(attributeName) {
+ var name = attributeName.replace(CAMELIZE, capitalize);
+ properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false);
+ });
+ [
+ "xlink:actuate",
+ "xlink:arcrole",
+ "xlink:role",
+ "xlink:show",
+ "xlink:title",
+ "xlink:type"
+ ].forEach(function(attributeName) {
+ var name = attributeName.replace(CAMELIZE, capitalize);
+ properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/1999/xlink", false, false);
+ });
+ [
+ "xml:base",
+ "xml:lang",
+ "xml:space"
+ ].forEach(function(attributeName) {
+ var name = attributeName.replace(CAMELIZE, capitalize);
+ properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/XML/1998/namespace", false, false);
+ });
+ ["tabIndex", "crossOrigin"].forEach(function(attributeName) {
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, false, false);
+ });
+ var xlinkHref = "xlinkHref";
+ properties[xlinkHref] = new PropertyInfoRecord("xlinkHref", STRING, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false);
+ ["src", "href", "action", "formAction"].forEach(function(attributeName) {
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, true, true);
+ });
+ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
+ var didWarn = false;
+ function sanitizeURL(url) {
+ if (!didWarn && isJavaScriptProtocol.test(url)) {
+ didWarn = true;
+ error("A future version of React will block javascript: URLs as a security precaution. " + "Use event handlers instead if you can. If you need to generate unsafe HTML try " + "using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url));
+ }
+ }
+ function getValueForProperty(node, name, expected, propertyInfo) {
+ if (propertyInfo.mustUseProperty) {
+ var propertyName = propertyInfo.propertyName;
+ return node[propertyName];
+ } else {
+ if (propertyInfo.sanitizeURL)
+ sanitizeURL("" + expected);
+ var attributeName = propertyInfo.attributeName;
+ var stringValue = null;
+ if (propertyInfo.type === OVERLOADED_BOOLEAN) {
+ if (node.hasAttribute(attributeName)) {
+ var value = node.getAttribute(attributeName);
+ if (value === "")
+ return true;
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false))
+ return value;
+ if (value === "" + expected)
+ return expected;
+ return value;
+ }
+ } else if (node.hasAttribute(attributeName)) {
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false))
+ return node.getAttribute(attributeName);
+ if (propertyInfo.type === BOOLEAN)
+ return expected;
+ stringValue = node.getAttribute(attributeName);
+ }
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false))
+ return stringValue === null ? expected : stringValue;
+ else if (stringValue === "" + expected)
+ return expected;
+ else
+ return stringValue;
+ }
+ }
+ function getValueForAttribute(node, name, expected) {
+ {
+ if (!isAttributeNameSafe(name))
+ return;
+ if (isOpaqueHydratingObject(expected))
+ return expected;
+ if (!node.hasAttribute(name))
+ return expected === undefined ? undefined : null;
+ var value = node.getAttribute(name);
+ if (value === "" + expected)
+ return expected;
+ return value;
+ }
+ }
+ function setValueForProperty(node, name, value, isCustomComponentTag) {
+ var propertyInfo = getPropertyInfo(name);
+ if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag))
+ return;
+ if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag))
+ value = null;
+ if (isCustomComponentTag || propertyInfo === null) {
+ if (isAttributeNameSafe(name)) {
+ var _attributeName = name;
+ if (value === null)
+ node.removeAttribute(_attributeName);
+ else
+ node.setAttribute(_attributeName, "" + value);
+ }
+ return;
+ }
+ var mustUseProperty = propertyInfo.mustUseProperty;
+ if (mustUseProperty) {
+ var propertyName = propertyInfo.propertyName;
+ if (value === null) {
+ var type = propertyInfo.type;
+ node[propertyName] = type === BOOLEAN ? false : "";
+ } else
+ node[propertyName] = value;
+ return;
+ }
+ var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace;
+ if (value === null)
+ node.removeAttribute(attributeName);
+ else {
+ var _type = propertyInfo.type;
+ var attributeValue;
+ if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true)
+ attributeValue = "";
+ else {
+ attributeValue = "" + value;
+ if (propertyInfo.sanitizeURL)
+ sanitizeURL(attributeValue.toString());
+ }
+ if (attributeNamespace)
+ node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
+ else
+ node.setAttribute(attributeName, attributeValue);
+ }
+ }
+ var REACT_ELEMENT_TYPE = 60103;
+ var REACT_PORTAL_TYPE = 60106;
+ var REACT_FRAGMENT_TYPE = 60107;
+ var REACT_STRICT_MODE_TYPE = 60108;
+ var REACT_PROFILER_TYPE = 60114;
+ var REACT_PROVIDER_TYPE = 60109;
+ var REACT_CONTEXT_TYPE = 60110;
+ var REACT_FORWARD_REF_TYPE = 60112;
+ var REACT_SUSPENSE_TYPE = 60113;
+ var REACT_SUSPENSE_LIST_TYPE = 60120;
+ var REACT_MEMO_TYPE = 60115;
+ var REACT_LAZY_TYPE = 60116;
+ var REACT_BLOCK_TYPE = 60121;
+ var REACT_SERVER_BLOCK_TYPE = 60122;
+ var REACT_FUNDAMENTAL_TYPE = 60117;
+ var REACT_SCOPE_TYPE = 60119;
+ var REACT_OPAQUE_ID_TYPE = 60128;
+ var REACT_DEBUG_TRACING_MODE_TYPE = 60129;
+ var REACT_OFFSCREEN_TYPE = 60130;
+ var REACT_LEGACY_HIDDEN_TYPE = 60131;
+ if (typeof Symbol === "function" && Symbol.for) {
+ var symbolFor = Symbol.for;
+ REACT_ELEMENT_TYPE = symbolFor("react.element");
+ REACT_PORTAL_TYPE = symbolFor("react.portal");
+ REACT_FRAGMENT_TYPE = symbolFor("react.fragment");
+ REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
+ REACT_PROFILER_TYPE = symbolFor("react.profiler");
+ REACT_PROVIDER_TYPE = symbolFor("react.provider");
+ REACT_CONTEXT_TYPE = symbolFor("react.context");
+ REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
+ REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
+ REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
+ REACT_MEMO_TYPE = symbolFor("react.memo");
+ REACT_LAZY_TYPE = symbolFor("react.lazy");
+ REACT_BLOCK_TYPE = symbolFor("react.block");
+ REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block");
+ REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental");
+ REACT_SCOPE_TYPE = symbolFor("react.scope");
+ REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id");
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
+ REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen");
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
+ }
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
+ function getIteratorFn(maybeIterable) {
+ if (maybeIterable === null || typeof maybeIterable !== "object")
+ return null;
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
+ if (typeof maybeIterator === "function")
+ return maybeIterator;
+ return null;
+ }
+ var disabledDepth = 0;
+ var prevLog;
+ var prevInfo;
+ var prevWarn;
+ var prevError;
+ var prevGroup;
+ var prevGroupCollapsed;
+ var prevGroupEnd;
+ function disabledLog() {
+ }
+ disabledLog.__reactDisabledLog = true;
+ function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd;
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ };
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ }
+ disabledDepth++;
+ }
+ }
+ function reenableLogs() {
+ {
+ disabledDepth--;
+ if (disabledDepth === 0) {
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ };
+ Object.defineProperties(console, {
+ log: _assign({}, props, {
+ value: prevLog
+ }),
+ info: _assign({}, props, {
+ value: prevInfo
+ }),
+ warn: _assign({}, props, {
+ value: prevWarn
+ }),
+ error: _assign({}, props, {
+ value: prevError
+ }),
+ group: _assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: _assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: _assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ }
+ if (disabledDepth < 0)
+ error("disabledDepth fell below zero. " + "This is a bug in React. Please file an issue.");
+ }
+ }
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
+ var prefix;
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === undefined)
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || "";
+ }
+ return "\n" + prefix + name;
+ }
+ }
+ var reentry = false;
+ var componentFrameCache;
+ {
+ var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap;
+ }
+ function describeNativeComponentFrame(fn, construct) {
+ if (!fn || reentry)
+ return "";
+ {
+ var frame = componentFrameCache.get(fn);
+ if (frame !== undefined)
+ return frame;
+ }
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = undefined;
+ var previousDispatcher;
+ {
+ previousDispatcher = ReactCurrentDispatcher.current;
+ ReactCurrentDispatcher.current = null;
+ disableLogs();
+ }
+ try {
+ if (construct) {
+ var Fake = function() {
+ throw Error();
+ };
+ Object.defineProperty(Fake.prototype, "props", {
+ set: function() {
+ throw Error();
+ }
+ });
+ if (typeof Reflect === "object" && Reflect.construct) {
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
+ }
+ fn.call(Fake.prototype);
+ }
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+ fn();
+ }
+ } catch (sample) {
+ if (sample && control && typeof sample.stack === "string") {
+ var sampleLines = sample.stack.split("\n");
+ var controlLines = control.stack.split("\n");
+ var s = sampleLines.length - 1;
+ var c = controlLines.length - 1;
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c])
+ c--;
+ for (;s >= 1 && c >= 0; s--, c--)
+ if (sampleLines[s] !== controlLines[c]) {
+ if (s !== 1 || c !== 1)
+ do {
+ s--;
+ c--;
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
+ var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
+ if (typeof fn === "function")
+ componentFrameCache.set(fn, _frame);
+ return _frame;
+ }
+ } while (s >= 1 && c >= 0);
+ break;
+ }
+ }
+ } finally {
+ reentry = false;
+ {
+ ReactCurrentDispatcher.current = previousDispatcher;
+ reenableLogs();
+ }
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ }
+ var name = fn ? fn.displayName || fn.name : "";
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
+ if (typeof fn === "function")
+ componentFrameCache.set(fn, syntheticFrame);
+ return syntheticFrame;
+ }
+ function describeClassComponentFrame(ctor, source, ownerFn) {
+ return describeNativeComponentFrame(ctor, true);
+ }
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
+ return describeNativeComponentFrame(fn, false);
+ }
+ function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+ }
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+ if (type == null)
+ return "";
+ if (typeof type === "function")
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ if (typeof type === "string")
+ return describeBuiltInComponentFrame(type);
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame("Suspense");
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame("SuspenseList");
+ }
+ if (typeof type === "object")
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+ case REACT_MEMO_TYPE:
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+ case REACT_BLOCK_TYPE:
+ return describeFunctionComponentFrame(type._render);
+ case REACT_LAZY_TYPE: {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ try {
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {
+ }
+ }
+ }
+ return "";
+ }
+ function describeFiber(fiber) {
+ var owner = fiber._debugOwner ? fiber._debugOwner.type : null;
+ var source = fiber._debugSource;
+ switch (fiber.tag) {
+ case HostComponent:
+ return describeBuiltInComponentFrame(fiber.type);
+ case LazyComponent:
+ return describeBuiltInComponentFrame("Lazy");
+ case SuspenseComponent:
+ return describeBuiltInComponentFrame("Suspense");
+ case SuspenseListComponent:
+ return describeBuiltInComponentFrame("SuspenseList");
+ case FunctionComponent:
+ case IndeterminateComponent:
+ case SimpleMemoComponent:
+ return describeFunctionComponentFrame(fiber.type);
+ case ForwardRef:
+ return describeFunctionComponentFrame(fiber.type.render);
+ case Block:
+ return describeFunctionComponentFrame(fiber.type._render);
+ case ClassComponent:
+ return describeClassComponentFrame(fiber.type);
+ default:
+ return "";
+ }
+ }
+ function getStackByFiberInDevAndProd(workInProgress) {
+ try {
+ var info = "";
+ var node = workInProgress;
+ do {
+ info += describeFiber(node);
+ node = node.return;
+ } while (node);
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
+ function getWrappedName(outerType, innerType, wrapperName) {
+ var functionName = innerType.displayName || innerType.name || "";
+ return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName);
+ }
+ function getContextName(type) {
+ return type.displayName || "Context";
+ }
+ function getComponentName(type) {
+ if (type == null)
+ return null;
+ if (typeof type.tag === "number")
+ error("Received an unexpected object in getComponentName(). " + "This is likely a bug in React. Please file an issue.");
+ if (typeof type === "function")
+ return type.displayName || type.name || null;
+ if (typeof type === "string")
+ return type;
+ switch (type) {
+ case REACT_FRAGMENT_TYPE:
+ return "Fragment";
+ case REACT_PORTAL_TYPE:
+ return "Portal";
+ 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";
+ }
+ if (typeof type === "object")
+ switch (type.$$typeof) {
+ case REACT_CONTEXT_TYPE:
+ var context = type;
+ return getContextName(context) + ".Consumer";
+ case REACT_PROVIDER_TYPE:
+ var provider = type;
+ return getContextName(provider._context) + ".Provider";
+ case REACT_FORWARD_REF_TYPE:
+ return getWrappedName(type, type.render, "ForwardRef");
+ case REACT_MEMO_TYPE:
+ return getComponentName(type.type);
+ case REACT_BLOCK_TYPE:
+ return getComponentName(type._render);
+ case REACT_LAZY_TYPE: {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ try {
+ return getComponentName(init(payload));
+ } catch (x) {
+ return null;
+ }
+ }
+ }
+ return null;
+ }
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var current = null;
+ var isRendering = false;
+ function getCurrentFiberOwnerNameInDevOrNull() {
+ {
+ if (current === null)
+ return null;
+ var owner = current._debugOwner;
+ if (owner !== null && typeof owner !== "undefined")
+ return getComponentName(owner.type);
+ }
+ return null;
+ }
+ function getCurrentFiberStackInDev() {
+ {
+ if (current === null)
+ return "";
+ return getStackByFiberInDevAndProd(current);
+ }
+ }
+ function resetCurrentFiber() {
+ {
+ ReactDebugCurrentFrame.getCurrentStack = null;
+ current = null;
+ isRendering = false;
+ }
+ }
+ function setCurrentFiber(fiber) {
+ {
+ ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
+ current = fiber;
+ isRendering = false;
+ }
+ }
+ function setIsRendering(rendering) {
+ isRendering = rendering;
+ }
+ function getIsRendering() {
+ return isRendering;
+ }
+ function toString(value) {
+ return "" + value;
+ }
+ function getToStringValue(value) {
+ switch (typeof value) {
+ case "boolean":
+ case "number":
+ case "object":
+ case "string":
+ case "undefined":
+ return value;
+ default:
+ return "";
+ }
+ }
+ var hasReadOnlyValue = {
+ button: true,
+ checkbox: true,
+ image: true,
+ hidden: true,
+ radio: true,
+ reset: true,
+ submit: true
+ };
+ function checkControlledValueProps(tagName, props) {
+ {
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null))
+ 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`.");
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null))
+ 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 isCheckable(elem) {
+ var type = elem.type;
+ var nodeName = elem.nodeName;
+ return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio");
+ }
+ function getTracker(node) {
+ return node._valueTracker;
+ }
+ function detachTracker(node) {
+ node._valueTracker = null;
+ }
+ function getValueFromNode(node) {
+ var value = "";
+ if (!node)
+ return value;
+ if (isCheckable(node))
+ value = node.checked ? "true" : "false";
+ else
+ value = node.value;
+ return value;
+ }
+ function trackValueOnNode(node) {
+ var valueField = isCheckable(node) ? "checked" : "value";
+ var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
+ var currentValue = "" + node[valueField];
+ if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function")
+ return;
+ var get = descriptor.get, set = descriptor.set;
+ Object.defineProperty(node, valueField, {
+ configurable: true,
+ get: function() {
+ return get.call(this);
+ },
+ set: function(value) {
+ currentValue = "" + value;
+ set.call(this, value);
+ }
+ });
+ Object.defineProperty(node, valueField, {
+ enumerable: descriptor.enumerable
+ });
+ var tracker = {
+ getValue: function() {
+ return currentValue;
+ },
+ setValue: function(value) {
+ currentValue = "" + value;
+ },
+ stopTracking: function() {
+ detachTracker(node);
+ delete node[valueField];
+ }
+ };
+ return tracker;
+ }
+ function track(node) {
+ if (getTracker(node))
+ return;
+ node._valueTracker = trackValueOnNode(node);
+ }
+ function updateValueIfChanged(node) {
+ if (!node)
+ return false;
+ var tracker = getTracker(node);
+ if (!tracker)
+ return true;
+ var lastValue = tracker.getValue();
+ var nextValue = getValueFromNode(node);
+ if (nextValue !== lastValue) {
+ tracker.setValue(nextValue);
+ return true;
+ }
+ return false;
+ }
+ function getActiveElement(doc) {
+ doc = doc || (typeof document !== "undefined" ? document : undefined);
+ if (typeof doc === "undefined")
+ return null;
+ try {
+ return doc.activeElement || doc.body;
+ } catch (e) {
+ return doc.body;
+ }
+ }
+ var didWarnValueDefaultValue = false;
+ var didWarnCheckedDefaultChecked = false;
+ var didWarnControlledToUncontrolled = false;
+ var didWarnUncontrolledToControlled = false;
+ function isControlled(props) {
+ var usesChecked = props.type === "checkbox" || props.type === "radio";
+ return usesChecked ? props.checked != null : props.value != null;
+ }
+ function getHostProps(element, props) {
+ var node = element;
+ var checked = props.checked;
+ var hostProps = _assign({}, props, {
+ defaultChecked: undefined,
+ defaultValue: undefined,
+ value: undefined,
+ checked: checked != null ? checked : node._wrapperState.initialChecked
+ });
+ return hostProps;
+ }
+ function initWrapperState(element, props) {
+ {
+ checkControlledValueProps("input", props);
+ if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
+ error("%s contains an input of type %s with both checked and defaultChecked props. " + "Input elements must be either controlled or uncontrolled " + "(specify either the checked prop, or the defaultChecked prop, but not " + "both). Decide between using a controlled or uncontrolled input " + "element and remove one of these props. More info: " + "https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type);
+ didWarnCheckedDefaultChecked = true;
+ }
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
+ error("%s contains an input of type %s with both value and defaultValue props. " + "Input elements must be either controlled or uncontrolled " + "(specify either the value prop, or the defaultValue prop, but not " + "both). Decide between using a controlled or uncontrolled input " + "element and remove one of these props. More info: " + "https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type);
+ didWarnValueDefaultValue = true;
+ }
+ }
+ var node = element;
+ var defaultValue = props.defaultValue == null ? "" : props.defaultValue;
+ node._wrapperState = {
+ initialChecked: props.checked != null ? props.checked : props.defaultChecked,
+ initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
+ controlled: isControlled(props)
+ };
+ }
+ function updateChecked(element, props) {
+ var node = element;
+ var checked = props.checked;
+ if (checked != null)
+ setValueForProperty(node, "checked", checked, false);
+ }
+ function updateWrapper(element, props) {
+ var node = element;
+ {
+ var controlled = isControlled(props);
+ if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
+ error("A component is changing an uncontrolled input to be controlled. " + "This is likely caused by the value changing from undefined to " + "a defined value, which should not happen. " + "Decide between using a controlled or uncontrolled input " + "element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components");
+ didWarnUncontrolledToControlled = true;
+ }
+ if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
+ error("A component is changing a controlled input to be uncontrolled. " + "This is likely caused by the value changing from a defined to " + "undefined, which should not happen. " + "Decide between using a controlled or uncontrolled input " + "element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components");
+ didWarnControlledToUncontrolled = true;
+ }
+ }
+ updateChecked(element, props);
+ var value = getToStringValue(props.value);
+ var type = props.type;
+ if (value != null) {
+ if (type === "number") {
+ if (value === 0 && node.value === "" || node.value != value)
+ node.value = toString(value);
+ } else if (node.value !== toString(value))
+ node.value = toString(value);
+ } else if (type === "submit" || type === "reset") {
+ node.removeAttribute("value");
+ return;
+ }
+ if (props.hasOwnProperty("value"))
+ setDefaultValue(node, props.type, value);
+ else if (props.hasOwnProperty("defaultValue"))
+ setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
+ if (props.checked == null && props.defaultChecked != null)
+ node.defaultChecked = !!props.defaultChecked;
+ }
+ function postMountWrapper(element, props, isHydrating) {
+ var node = element;
+ if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) {
+ var type = props.type;
+ var isButton = type === "submit" || type === "reset";
+ if (isButton && (props.value === undefined || props.value === null))
+ return;
+ var initialValue = toString(node._wrapperState.initialValue);
+ if (!isHydrating) {
+ if (initialValue !== node.value)
+ node.value = initialValue;
+ }
+ node.defaultValue = initialValue;
+ }
+ var name = node.name;
+ if (name !== "")
+ node.name = "";
+ {
+ node.defaultChecked = !node.defaultChecked;
+ node.defaultChecked = !!node._wrapperState.initialChecked;
+ }
+ if (name !== "")
+ node.name = name;
+ }
+ function restoreControlledState(element, props) {
+ var node = element;
+ updateWrapper(node, props);
+ updateNamedCousins(node, props);
+ }
+ function updateNamedCousins(rootNode, props) {
+ var name = props.name;
+ if (props.type === "radio" && name != null) {
+ var queryRoot = rootNode;
+ while (queryRoot.parentNode)
+ queryRoot = queryRoot.parentNode;
+ var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + "][type=\"radio\"]");
+ for (var i = 0;i < group.length; i++) {
+ var otherNode = group[i];
+ if (otherNode === rootNode || otherNode.form !== rootNode.form)
+ continue;
+ var otherProps = getFiberCurrentPropsFromNode(otherNode);
+ if (!otherProps)
+ throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");
+ updateValueIfChanged(otherNode);
+ updateWrapper(otherNode, otherProps);
+ }
+ }
+ }
+ function setDefaultValue(node, type, value) {
+ if (type !== "number" || getActiveElement(node.ownerDocument) !== node) {
+ if (value == null)
+ node.defaultValue = toString(node._wrapperState.initialValue);
+ else if (node.defaultValue !== toString(value))
+ node.defaultValue = toString(value);
+ }
+ }
+ var didWarnSelectedSetOnOption = false;
+ var didWarnInvalidChild = false;
+ function flattenChildren(children) {
+ var content = "";
+ React.Children.forEach(children, function(child) {
+ if (child == null)
+ return;
+ content += child;
+ });
+ return content;
+ }
+ function validateProps(element, props) {
+ {
+ if (typeof props.children === "object" && props.children !== null)
+ React.Children.forEach(props.children, function(child) {
+ if (child == null)
+ return;
+ if (typeof child === "string" || typeof child === "number")
+ return;
+ if (typeof child.type !== "string")
+ return;
+ if (!didWarnInvalidChild) {
+ didWarnInvalidChild = true;
+ error("Only strings and numbers are supported as